@autobe/agent 0.28.1 → 0.29.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/AutoBeAgent.js +1 -0
- package/lib/AutoBeAgent.js.map +1 -1
- package/lib/AutoBeMockAgent.js +1 -0
- package/lib/AutoBeMockAgent.js.map +1 -1
- package/lib/constants/AutoBeConfigConstant.d.ts +3 -1
- package/lib/constants/AutoBeSystemPromptConstant.d.ts +39 -26
- package/lib/constants/AutoBeSystemPromptConstant.js.map +1 -1
- package/lib/context/AutoBeContext.d.ts +1 -1
- package/lib/factory/createAutoBeContext.js +5 -3
- package/lib/factory/createAutoBeContext.js.map +1 -1
- package/lib/index.mjs +43501 -23602
- package/lib/index.mjs.map +1 -1
- package/lib/orchestrate/analyze/histories/transformAnalyzeReviewHistories.d.ts +7 -2
- package/lib/orchestrate/analyze/histories/transformAnalyzeReviewHistories.js +11 -21
- package/lib/orchestrate/analyze/histories/transformAnalyzeReviewHistories.js.map +1 -1
- package/lib/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.d.ts +2 -2
- package/lib/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js +12 -5
- package/lib/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js.map +1 -1
- package/lib/orchestrate/analyze/histories/transformAnalyzeWriteHistories.d.ts +2 -2
- package/lib/orchestrate/analyze/histories/transformAnalyzeWriteHistories.js +53 -50
- package/lib/orchestrate/analyze/histories/transformAnalyzeWriteHistories.js.map +1 -1
- package/lib/orchestrate/analyze/orchestrateAnalyze.js +2 -2
- package/lib/orchestrate/analyze/orchestrateAnalyze.js.map +1 -1
- package/lib/orchestrate/analyze/orchestrateAnalyzeReview.js +855 -258
- package/lib/orchestrate/analyze/orchestrateAnalyzeReview.js.map +1 -1
- package/lib/orchestrate/analyze/orchestrateAnalyzeScenario.js +2 -14
- package/lib/orchestrate/analyze/orchestrateAnalyzeScenario.js.map +1 -1
- package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.js +2 -9
- package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.js.map +1 -1
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.d.ts +110 -36
- package/lib/orchestrate/common/AutoBePreliminaryController.d.ts +40 -0
- package/lib/orchestrate/common/AutoBePreliminaryController.js +97 -0
- package/lib/orchestrate/common/AutoBePreliminaryController.js.map +1 -0
- package/lib/orchestrate/common/histories/transformCommonCorrectCastingHistory.d.ts +8 -0
- package/lib/orchestrate/{realize/histories/transformRealizeCorrectCastingHistories.js → common/histories/transformCommonCorrectCastingHistory.js} +16 -13
- package/lib/orchestrate/common/histories/transformCommonCorrectCastingHistory.js.map +1 -0
- package/lib/orchestrate/common/histories/transformPreliminaryHistory.d.ts +4 -0
- package/lib/orchestrate/common/histories/transformPreliminaryHistory.js +285 -0
- package/lib/orchestrate/common/histories/transformPreliminaryHistory.js.map +1 -0
- package/lib/orchestrate/common/histories/{transformPreviousAndLatestCorrectHistories.d.ts → transformPreviousAndLatestCorrectHistory.d.ts} +1 -1
- package/lib/orchestrate/common/histories/{transformPreviousAndLatestCorrectHistories.js → transformPreviousAndLatestCorrectHistory.js} +4 -4
- package/lib/orchestrate/common/histories/transformPreviousAndLatestCorrectHistory.js.map +1 -0
- package/lib/orchestrate/common/internal/complementPreliminaryCollection.d.ts +7 -0
- package/lib/orchestrate/common/internal/complementPreliminaryCollection.js +99 -0
- package/lib/orchestrate/common/internal/complementPreliminaryCollection.js.map +1 -0
- package/lib/orchestrate/common/internal/createPreliminaryCollection.d.ts +3 -0
- package/lib/orchestrate/common/internal/createPreliminaryCollection.js +20 -0
- package/lib/orchestrate/common/internal/createPreliminaryCollection.js.map +1 -0
- package/lib/orchestrate/common/internal/validatePreliminary.d.ts +5 -0
- package/lib/orchestrate/common/internal/validatePreliminary.js +217 -0
- package/lib/orchestrate/common/internal/validatePreliminary.js.map +1 -0
- package/lib/orchestrate/common/orchestrateCommonCorrectCasting.js +10 -22
- package/lib/orchestrate/common/orchestrateCommonCorrectCasting.js.map +1 -1
- package/lib/orchestrate/common/orchestratePreliminary.d.ts +12 -0
- package/lib/orchestrate/common/orchestratePreliminary.js +231 -0
- package/lib/orchestrate/common/orchestratePreliminary.js.map +1 -0
- package/lib/orchestrate/common/structures/AutoBePreliminaryRequest.d.ts +16 -0
- package/lib/orchestrate/{realize/structures/IAutoBeRealizeAuthorizationApplication.js → common/structures/AutoBePreliminaryRequest.js} +1 -1
- package/lib/orchestrate/common/structures/AutoBePreliminaryRequest.js.map +1 -0
- package/lib/orchestrate/common/structures/IAutoBeCommonCorrectCastingApplication.d.ts +1 -4
- package/lib/orchestrate/common/structures/IAutoBeOrchestrateResult.d.ts +9 -0
- package/lib/orchestrate/{interface/structures/IAutoBeInterfacePrerequisitesApplication.js → common/structures/IAutoBeOrchestrateResult.js} +1 -1
- package/lib/orchestrate/common/structures/IAutoBeOrchestrateResult.js.map +1 -0
- package/lib/orchestrate/common/structures/IAutoBePreliminaryCollection.d.ts +8 -0
- package/lib/orchestrate/{interface/structures/IAutoBeInterfaceEndpointsReviewApplication.js → common/structures/IAutoBePreliminaryCollection.js} +1 -1
- package/lib/orchestrate/common/structures/IAutoBePreliminaryCollection.js.map +1 -0
- package/lib/orchestrate/common/structures/IAutoBePreliminaryGetAnalysisFiles.d.ts +27 -0
- package/lib/orchestrate/{interface/structures/IAutoBeInterfaceOperationsReviewApplication.js → common/structures/IAutoBePreliminaryGetAnalysisFiles.js} +1 -1
- package/lib/orchestrate/common/structures/IAutoBePreliminaryGetAnalysisFiles.js.map +1 -0
- package/lib/orchestrate/common/structures/IAutoBePreliminaryGetInterfaceOperations.d.ts +28 -0
- package/lib/orchestrate/common/structures/IAutoBePreliminaryGetInterfaceOperations.js +3 -0
- package/lib/orchestrate/common/structures/IAutoBePreliminaryGetInterfaceOperations.js.map +1 -0
- package/lib/orchestrate/common/structures/IAutoBePreliminaryGetInterfaceSchemas.d.ts +27 -0
- package/lib/orchestrate/common/structures/IAutoBePreliminaryGetInterfaceSchemas.js +3 -0
- package/lib/orchestrate/common/structures/IAutoBePreliminaryGetInterfaceSchemas.js.map +1 -0
- package/lib/orchestrate/common/structures/IAutoBePreliminaryGetPrismaSchemas.d.ts +27 -0
- package/lib/orchestrate/common/structures/IAutoBePreliminaryGetPrismaSchemas.js +3 -0
- package/lib/orchestrate/common/structures/IAutoBePreliminaryGetPrismaSchemas.js.map +1 -0
- package/lib/orchestrate/interface/histories/transformInterfaceAuthorizationHistory.d.ts +10 -0
- package/lib/orchestrate/interface/histories/transformInterfaceAuthorizationHistory.js +70 -0
- package/lib/orchestrate/interface/histories/transformInterfaceAuthorizationHistory.js.map +1 -0
- package/lib/orchestrate/interface/histories/transformInterfaceCommonHistory.d.ts +3 -0
- package/lib/orchestrate/interface/histories/{transformInterfaceCommonHistories.js → transformInterfaceCommonHistory.js} +4 -4
- package/lib/orchestrate/interface/histories/transformInterfaceCommonHistory.js.map +1 -0
- package/lib/orchestrate/interface/histories/transformInterfaceComplementHistory.d.ts +9 -0
- package/lib/orchestrate/interface/histories/transformInterfaceComplementHistory.js +60 -0
- package/lib/orchestrate/interface/histories/transformInterfaceComplementHistory.js.map +1 -0
- package/lib/orchestrate/interface/histories/transformInterfaceEndpointHistory.d.ts +12 -0
- package/lib/orchestrate/interface/histories/transformInterfaceEndpointHistory.js +63 -0
- package/lib/orchestrate/interface/histories/transformInterfaceEndpointHistory.js.map +1 -0
- package/lib/orchestrate/interface/histories/transformInterfaceEndpointReviewHistory.d.ts +7 -0
- package/lib/orchestrate/interface/histories/transformInterfaceEndpointReviewHistory.js +36 -0
- package/lib/orchestrate/interface/histories/transformInterfaceEndpointReviewHistory.js.map +1 -0
- package/lib/orchestrate/interface/histories/transformInterfaceGroupHistory.d.ts +6 -0
- package/lib/orchestrate/interface/histories/transformInterfaceGroupHistory.js +68 -0
- package/lib/orchestrate/interface/histories/transformInterfaceGroupHistory.js.map +1 -0
- package/lib/orchestrate/interface/histories/transformInterfaceOperationHistory.d.ts +9 -0
- package/lib/orchestrate/interface/histories/transformInterfaceOperationHistory.js +72 -0
- package/lib/orchestrate/interface/histories/transformInterfaceOperationHistory.js.map +1 -0
- package/lib/orchestrate/interface/histories/transformInterfaceOperationReviewHistory.d.ts +7 -0
- package/lib/orchestrate/interface/histories/transformInterfaceOperationReviewHistory.js +38 -0
- package/lib/orchestrate/interface/histories/transformInterfaceOperationReviewHistory.js.map +1 -0
- package/lib/orchestrate/interface/histories/transformInterfacePrerequisiteHistory.d.ts +8 -0
- package/lib/orchestrate/interface/histories/transformInterfacePrerequisiteHistory.js +73 -0
- package/lib/orchestrate/interface/histories/transformInterfacePrerequisiteHistory.js.map +1 -0
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaHistory.d.ts +11 -0
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaHistory.js +95 -0
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaHistory.js.map +1 -0
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaRenameHistory.d.ts +5 -0
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaRenameHistory.js +54 -0
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaRenameHistory.js.map +1 -0
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaReviewHistory.d.ts +12 -0
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaReviewHistory.js +75 -0
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaReviewHistory.js.map +1 -0
- package/lib/orchestrate/interface/orchestrateInterface.js +90 -46
- package/lib/orchestrate/interface/orchestrateInterface.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceAuthorization.d.ts +6 -0
- package/lib/orchestrate/interface/{orchestrateInterfaceAuthorizations.js → orchestrateInterfaceAuthorization.js} +1370 -226
- package/lib/orchestrate/interface/orchestrateInterfaceAuthorization.js.map +1 -0
- package/lib/orchestrate/interface/orchestrateInterfaceComplement.d.ts +4 -3
- package/lib/orchestrate/interface/orchestrateInterfaceComplement.js +2807 -532
- package/lib/orchestrate/interface/orchestrateInterfaceComplement.js.map +1 -1
- package/lib/orchestrate/interface/{orchestrateInterfaceEndpoints.d.ts → orchestrateInterfaceEndpoint.d.ts} +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceEndpoint.js +1356 -0
- package/lib/orchestrate/interface/orchestrateInterfaceEndpoint.js.map +1 -0
- package/lib/orchestrate/interface/orchestrateInterfaceEndpointReview.d.ts +4 -0
- package/lib/orchestrate/interface/orchestrateInterfaceEndpointReview.js +1337 -0
- package/lib/orchestrate/interface/orchestrateInterfaceEndpointReview.js.map +1 -0
- package/lib/orchestrate/interface/{orchestrateInterfaceGroups.d.ts → orchestrateInterfaceGroup.d.ts} +1 -2
- package/lib/orchestrate/interface/orchestrateInterfaceGroup.js +621 -0
- package/lib/orchestrate/interface/orchestrateInterfaceGroup.js.map +1 -0
- package/lib/orchestrate/interface/{orchestrateInterfaceOperations.d.ts → orchestrateInterfaceOperation.d.ts} +1 -2
- package/lib/orchestrate/interface/{orchestrateInterfaceOperations.js → orchestrateInterfaceOperation.js} +1275 -216
- package/lib/orchestrate/interface/orchestrateInterfaceOperation.js.map +1 -0
- package/lib/orchestrate/interface/orchestrateInterfaceOperationReview.d.ts +4 -0
- package/lib/orchestrate/interface/{orchestrateInterfaceOperationsReview.js → orchestrateInterfaceOperationReview.js} +1421 -247
- package/lib/orchestrate/interface/orchestrateInterfaceOperationReview.js.map +1 -0
- package/lib/orchestrate/interface/{orchestrateInterfacePrerequisites.d.ts → orchestrateInterfacePrerequisite.d.ts} +1 -1
- package/lib/orchestrate/interface/orchestrateInterfacePrerequisite.js +2159 -0
- package/lib/orchestrate/interface/orchestrateInterfacePrerequisite.js.map +1 -0
- package/lib/orchestrate/interface/{orchestrateInterfaceSchemas.d.ts → orchestrateInterfaceSchema.d.ts} +1 -2
- package/lib/orchestrate/interface/{orchestrateInterfaceSchemas.js → orchestrateInterfaceSchema.js} +2550 -546
- package/lib/orchestrate/interface/orchestrateInterfaceSchema.js.map +1 -0
- package/lib/orchestrate/interface/orchestrateInterfaceSchemaRename.js +7 -17
- package/lib/orchestrate/interface/orchestrateInterfaceSchemaRename.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceSchemaReview.d.ts +1 -0
- package/lib/orchestrate/interface/orchestrateInterfaceSchemaReview.js +2823 -548
- package/lib/orchestrate/interface/orchestrateInterfaceSchemaReview.js.map +1 -1
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceAuthorizationsApplication.d.ts +56 -5
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceComplementApplication.d.ts +57 -10
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceEndpointApplication.d.ts +55 -10
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceEndpointReviewApplication.d.ts +96 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceEndpointReviewApplication.js +3 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceEndpointReviewApplication.js.map +1 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.d.ts +6 -82
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.d.ts +58 -13
- package/lib/orchestrate/interface/structures/{IAutoBeInterfaceOperationsReviewApplication.d.ts → IAutoBeInterfaceOperationReviewApplication.d.ts} +58 -28
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationReviewApplication.js +3 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationReviewApplication.js.map +1 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfacePrerequisiteApplication.d.ts +98 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfacePrerequisiteApplication.js +3 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfacePrerequisiteApplication.js.map +1 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.d.ts +56 -15
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaContentReviewApplication.d.ts +62 -22
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaRelationReviewApplication.d.ts +60 -21
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaSecurityReviewApplication.d.ts +61 -19
- package/lib/orchestrate/interface/utils/JsonSchemaFactory.js +29 -23
- package/lib/orchestrate/interface/utils/JsonSchemaFactory.js.map +1 -1
- package/lib/orchestrate/interface/utils/JsonSchemaNamingConvention.js +67 -61
- package/lib/orchestrate/interface/utils/JsonSchemaNamingConvention.js.map +1 -1
- package/lib/orchestrate/interface/utils/JsonSchemaValidator.d.ts +2 -1
- package/lib/orchestrate/interface/utils/JsonSchemaValidator.js +52 -25
- package/lib/orchestrate/interface/utils/JsonSchemaValidator.js.map +1 -1
- package/lib/orchestrate/interface/utils/OperationValidator.js +59 -1
- package/lib/orchestrate/interface/utils/OperationValidator.js.map +1 -1
- package/lib/orchestrate/prisma/histories/transformPrismaComponentsHistory.d.ts +6 -0
- package/lib/orchestrate/prisma/histories/transformPrismaComponentsHistory.js +98 -0
- package/lib/orchestrate/prisma/histories/transformPrismaComponentsHistory.js.map +1 -0
- package/lib/orchestrate/prisma/histories/transformPrismaCorrectHistory.d.ts +7 -0
- package/lib/orchestrate/prisma/histories/transformPrismaCorrectHistory.js +31 -0
- package/lib/orchestrate/prisma/histories/transformPrismaCorrectHistory.js.map +1 -0
- package/lib/orchestrate/prisma/histories/transformPrismaReviewHistory.d.ts +7 -0
- package/lib/orchestrate/prisma/histories/transformPrismaReviewHistory.js +38 -0
- package/lib/orchestrate/prisma/histories/transformPrismaReviewHistory.js.map +1 -0
- package/lib/orchestrate/prisma/histories/transformPrismaSchemaHistory.d.ts +8 -0
- package/lib/orchestrate/prisma/histories/transformPrismaSchemaHistory.js +79 -0
- package/lib/orchestrate/prisma/histories/transformPrismaSchemaHistory.js.map +1 -0
- package/lib/orchestrate/prisma/orchestratePrisma.js +9 -6
- package/lib/orchestrate/prisma/orchestratePrisma.js.map +1 -1
- package/lib/orchestrate/prisma/orchestratePrismaComponent.d.ts +1 -1
- package/lib/orchestrate/prisma/orchestratePrismaComponent.js +8 -14
- package/lib/orchestrate/prisma/orchestratePrismaComponent.js.map +1 -1
- package/lib/orchestrate/prisma/orchestratePrismaCorrect.js +2863 -1543
- package/lib/orchestrate/prisma/orchestratePrismaCorrect.js.map +1 -1
- package/lib/orchestrate/prisma/orchestratePrismaReview.d.ts +1 -1
- package/lib/orchestrate/prisma/orchestratePrismaReview.js +2886 -1566
- package/lib/orchestrate/prisma/orchestratePrismaReview.js.map +1 -1
- package/lib/orchestrate/prisma/{orchestratePrismaSchemas.d.ts → orchestratePrismaSchema.d.ts} +1 -1
- package/lib/orchestrate/prisma/orchestratePrismaSchema.js +3068 -0
- package/lib/orchestrate/prisma/orchestratePrismaSchema.js.map +1 -0
- package/lib/orchestrate/prisma/structures/IAutoBePrismaCorrectApplication.d.ts +74 -76
- package/lib/orchestrate/prisma/structures/IAutoBePrismaReviewApplication.d.ts +90 -72
- package/lib/orchestrate/prisma/structures/IAutoBePrismaSchemaApplication.d.ts +89 -66
- package/lib/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistory.d.ts +9 -0
- package/lib/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistory.js +79 -0
- package/lib/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistory.js.map +1 -0
- package/lib/orchestrate/realize/histories/transformRealizeAuthorizationWriteHistory.d.ts +7 -0
- package/lib/orchestrate/realize/histories/transformRealizeAuthorizationWriteHistory.js +41 -0
- package/lib/orchestrate/realize/histories/transformRealizeAuthorizationWriteHistory.js.map +1 -0
- package/lib/orchestrate/realize/histories/transformRealizeCorrectCastingHistory.d.ts +12 -0
- package/lib/orchestrate/realize/histories/transformRealizeCorrectCastingHistory.js +67 -0
- package/lib/orchestrate/realize/histories/transformRealizeCorrectCastingHistory.js.map +1 -0
- package/lib/orchestrate/realize/histories/transformRealizeCorrectHistory.d.ts +18 -0
- package/lib/orchestrate/realize/histories/transformRealizeCorrectHistory.js +54 -0
- package/lib/orchestrate/realize/histories/transformRealizeCorrectHistory.js.map +1 -0
- package/lib/orchestrate/realize/histories/transformRealizeWriteHistories.d.ts +4 -2
- package/lib/orchestrate/realize/histories/transformRealizeWriteHistories.js +140 -106
- package/lib/orchestrate/realize/histories/transformRealizeWriteHistories.js.map +1 -1
- package/lib/orchestrate/realize/histories/transformRealizeWriteMembershipHistory.d.ts +3 -0
- package/lib/orchestrate/realize/histories/transformRealizeWriteMembershipHistory.js +23 -0
- package/lib/orchestrate/realize/histories/transformRealizeWriteMembershipHistory.js.map +1 -0
- package/lib/orchestrate/realize/orchestrateRealize.js +4 -4
- package/lib/orchestrate/realize/orchestrateRealize.js.map +1 -1
- package/lib/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.d.ts +5 -1
- package/lib/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js +1288 -572
- package/lib/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js.map +1 -1
- package/lib/orchestrate/realize/{orchestrateRealizeAuthorization.d.ts → orchestrateRealizeAuthorizationWrite.d.ts} +1 -1
- package/lib/orchestrate/realize/orchestrateRealizeAuthorizationWrite.js +1410 -0
- package/lib/orchestrate/realize/orchestrateRealizeAuthorizationWrite.js.map +1 -0
- package/lib/orchestrate/realize/orchestrateRealizeCorrect.js +664 -140
- package/lib/orchestrate/realize/orchestrateRealizeCorrect.js.map +1 -1
- package/lib/orchestrate/realize/orchestrateRealizeCorrectCasting.js +20 -65
- package/lib/orchestrate/realize/orchestrateRealizeCorrectCasting.js.map +1 -1
- package/lib/orchestrate/realize/orchestrateRealizeWrite.js +660 -135
- package/lib/orchestrate/realize/orchestrateRealizeWrite.js.map +1 -1
- package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.d.ts +79 -19
- package/lib/orchestrate/realize/structures/{IAutoBeRealizeAuthorizationApplication.d.ts → IAutoBeRealizeAuthorizationWriteApplication.d.ts} +60 -27
- package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationWriteApplication.js +3 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationWriteApplication.js.map +1 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeCorrectApplication.d.ts +54 -5
- package/lib/orchestrate/realize/structures/IAutoBeRealizeScenarioResult.d.ts +6 -14
- package/lib/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.d.ts +54 -6
- package/lib/orchestrate/realize/utils/generateRealizeScenario.d.ts +1 -3
- package/lib/orchestrate/realize/utils/generateRealizeScenario.js +1 -7
- package/lib/orchestrate/realize/utils/generateRealizeScenario.js.map +1 -1
- package/lib/orchestrate/test/histories/transformTestCorrectHistories.d.ts +3 -3
- package/lib/orchestrate/test/histories/transformTestCorrectHistories.js +23 -20
- package/lib/orchestrate/test/histories/transformTestCorrectHistories.js.map +1 -1
- package/lib/orchestrate/test/histories/transformTestCorrectInvalidRequestHistory.d.ts +4 -0
- package/lib/orchestrate/test/histories/transformTestCorrectInvalidRequestHistory.js +36 -0
- package/lib/orchestrate/test/histories/transformTestCorrectInvalidRequestHistory.js.map +1 -0
- package/lib/orchestrate/test/histories/transformTestScenarioHistory.d.ts +11 -0
- package/lib/orchestrate/test/histories/transformTestScenarioHistory.js +95 -0
- package/lib/orchestrate/test/histories/transformTestScenarioHistory.js.map +1 -0
- package/lib/orchestrate/test/histories/transformTestScenarioReviewHistory.d.ts +10 -0
- package/lib/orchestrate/test/histories/transformTestScenarioReviewHistory.js +67 -0
- package/lib/orchestrate/test/histories/transformTestScenarioReviewHistory.js.map +1 -0
- package/lib/orchestrate/test/histories/{transformTestWriteHistories.d.ts → transformTestWriteHistory.d.ts} +4 -4
- package/lib/orchestrate/test/histories/{transformTestWriteHistories.js → transformTestWriteHistory.js} +79 -76
- package/lib/orchestrate/test/histories/transformTestWriteHistory.js.map +1 -0
- package/lib/orchestrate/test/orchestrateTestCorrect.js +13 -26
- package/lib/orchestrate/test/orchestrateTestCorrect.js.map +1 -1
- package/lib/orchestrate/test/orchestrateTestCorrectInvalidRequest.js +3 -15
- package/lib/orchestrate/test/orchestrateTestCorrectInvalidRequest.js.map +1 -1
- package/lib/orchestrate/test/orchestrateTestScenario.d.ts +1 -1
- package/lib/orchestrate/test/orchestrateTestScenario.js +1370 -316
- package/lib/orchestrate/test/orchestrateTestScenario.js.map +1 -1
- package/lib/orchestrate/test/orchestrateTestScenarioReview.d.ts +5 -3
- package/lib/orchestrate/test/orchestrateTestScenarioReview.js +1067 -288
- package/lib/orchestrate/test/orchestrateTestScenarioReview.js.map +1 -1
- package/lib/orchestrate/test/orchestrateTestWrite.js +8 -15
- package/lib/orchestrate/test/orchestrateTestWrite.js.map +1 -1
- package/lib/orchestrate/test/structures/IAutoBeTestScenarioApplication.d.ts +66 -4
- package/lib/orchestrate/test/structures/IAutoBeTestScenarioReviewApplication.d.ts +82 -14
- package/lib/structures/IAutoBeOrchestrateHistory.d.ts +5 -0
- package/lib/structures/IAutoBeOrchestrateHistory.js +3 -0
- package/lib/structures/IAutoBeOrchestrateHistory.js.map +1 -0
- package/lib/utils/executeCachedBatch.d.ts +5 -1
- package/lib/utils/executeCachedBatch.js +23 -5
- package/lib/utils/executeCachedBatch.js.map +1 -1
- package/lib/utils/validateEmptyCode.js +2 -2
- package/lib/utils/validateEmptyCode.js.map +1 -1
- package/package.json +8 -6
- package/src/AutoBeAgent.ts +1 -0
- package/src/AutoBeMockAgent.ts +1 -0
- package/src/constants/AutoBeConfigConstant.ts +2 -0
- package/src/constants/AutoBeSystemPromptConstant.ts +39 -26
- package/src/context/AutoBeContext.ts +1 -1
- package/src/factory/createAutoBeContext.ts +5 -2
- package/src/orchestrate/analyze/histories/transformAnalyzeReviewHistories.ts +17 -28
- package/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.ts +12 -6
- package/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.ts +62 -61
- package/src/orchestrate/analyze/orchestrateAnalyze.ts +2 -0
- package/src/orchestrate/analyze/orchestrateAnalyzeReview.ts +97 -48
- package/src/orchestrate/analyze/orchestrateAnalyzeScenario.ts +3 -16
- package/src/orchestrate/analyze/orchestrateAnalyzeWrite.ts +1 -2
- package/src/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.ts +114 -36
- package/src/orchestrate/common/AutoBePreliminaryController.ts +161 -0
- package/src/orchestrate/common/histories/transformCommonCorrectCastingHistory.ts +32 -0
- package/src/orchestrate/common/histories/transformPreliminaryHistory.ts +383 -0
- package/src/orchestrate/common/histories/{transformPreviousAndLatestCorrectHistories.ts → transformPreviousAndLatestCorrectHistory.ts} +1 -1
- package/src/orchestrate/common/internal/complementPreliminaryCollection.ts +123 -0
- package/src/orchestrate/common/internal/createPreliminaryCollection.ts +32 -0
- package/src/orchestrate/common/internal/validatePreliminary.ts +315 -0
- package/src/orchestrate/common/orchestrateCommonCorrectCasting.ts +8 -15
- package/src/orchestrate/common/orchestratePreliminary.ts +361 -0
- package/src/orchestrate/common/structures/AutoBePreliminaryRequest.ts +18 -0
- package/src/orchestrate/common/structures/IAutoBeCommonCorrectCastingApplication.ts +1 -4
- package/src/orchestrate/common/structures/IAutoBeOrchestrateResult.ts +13 -0
- package/src/orchestrate/common/structures/IAutoBePreliminaryCollection.ts +9 -0
- package/src/orchestrate/common/structures/IAutoBePreliminaryGetAnalysisFiles.ts +29 -0
- package/src/orchestrate/common/structures/IAutoBePreliminaryGetInterfaceOperations.ts +30 -0
- package/src/orchestrate/common/structures/IAutoBePreliminaryGetInterfaceSchemas.ts +29 -0
- package/src/orchestrate/common/structures/IAutoBePreliminaryGetPrismaSchemas.ts +29 -0
- package/src/orchestrate/interface/histories/transformInterfaceAuthorizationHistory.ts +77 -0
- package/src/orchestrate/interface/histories/{transformInterfaceCommonHistories.ts → transformInterfaceCommonHistory.ts} +1 -1
- package/src/orchestrate/interface/histories/{transformInterfaceGroupHistories.ts → transformInterfaceComplementHistory.ts} +35 -21
- package/src/orchestrate/interface/histories/transformInterfaceEndpointHistory.ts +74 -0
- package/src/orchestrate/interface/histories/transformInterfaceEndpointReviewHistory.ts +40 -0
- package/src/orchestrate/interface/histories/transformInterfaceGroupHistory.ts +72 -0
- package/src/orchestrate/interface/histories/transformInterfaceOperationHistory.ts +79 -0
- package/src/orchestrate/interface/histories/transformInterfaceOperationReviewHistory.ts +43 -0
- package/src/orchestrate/interface/histories/transformInterfacePrerequisiteHistory.ts +89 -0
- package/src/orchestrate/interface/histories/transformInterfaceSchemaHistory.ts +105 -0
- package/src/orchestrate/interface/histories/transformInterfaceSchemaRenameHistory.ts +56 -0
- package/src/orchestrate/interface/histories/transformInterfaceSchemaReviewHistory.ts +88 -0
- package/src/orchestrate/interface/orchestrateInterface.ts +115 -51
- package/src/orchestrate/interface/{orchestrateInterfaceAuthorizations.ts → orchestrateInterfaceAuthorization.ts} +91 -67
- package/src/orchestrate/interface/orchestrateInterfaceComplement.ts +174 -78
- package/src/orchestrate/interface/orchestrateInterfaceEndpoint.ts +207 -0
- package/src/orchestrate/interface/orchestrateInterfaceEndpointReview.ts +139 -0
- package/src/orchestrate/interface/orchestrateInterfaceGroup.ts +153 -0
- package/src/orchestrate/interface/{orchestrateInterfaceOperations.ts → orchestrateInterfaceOperation.ts} +109 -86
- package/src/orchestrate/interface/orchestrateInterfaceOperationReview.ts +186 -0
- package/src/orchestrate/interface/{orchestrateInterfacePrerequisites.ts → orchestrateInterfacePrerequisite.ts} +123 -58
- package/src/orchestrate/interface/{orchestrateInterfaceSchemas.ts → orchestrateInterfaceSchema.ts} +96 -90
- package/src/orchestrate/interface/orchestrateInterfaceSchemaRename.ts +10 -11
- package/src/orchestrate/interface/orchestrateInterfaceSchemaReview.ts +127 -60
- package/src/orchestrate/interface/structures/IAutoBeInterfaceAuthorizationsApplication.ts +63 -5
- package/src/orchestrate/interface/structures/IAutoBeInterfaceComplementApplication.ts +67 -12
- package/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointApplication.ts +63 -10
- package/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointReviewApplication.ts +106 -0
- package/src/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.ts +6 -84
- package/src/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.ts +65 -13
- package/src/orchestrate/interface/structures/{IAutoBeInterfaceOperationsReviewApplication.ts → IAutoBeInterfaceOperationReviewApplication.ts} +65 -30
- package/src/orchestrate/interface/structures/IAutoBeInterfacePrerequisiteApplication.ts +111 -0
- package/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.ts +65 -15
- package/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaContentReviewApplication.ts +71 -24
- package/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaRelationReviewApplication.ts +68 -23
- package/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaSecurityReviewApplication.ts +69 -21
- package/src/orchestrate/interface/utils/JsonSchemaFactory.ts +31 -23
- package/src/orchestrate/interface/utils/JsonSchemaNamingConvention.ts +73 -61
- package/src/orchestrate/interface/utils/JsonSchemaValidator.ts +53 -26
- package/src/orchestrate/interface/utils/OperationValidator.ts +69 -1
- package/src/orchestrate/prisma/histories/transformPrismaComponentsHistory.ts +109 -0
- package/src/orchestrate/prisma/histories/{transformPrismaCorrectHistories.ts → transformPrismaCorrectHistory.ts} +13 -22
- package/src/orchestrate/prisma/histories/transformPrismaReviewHistory.ts +42 -0
- package/src/orchestrate/prisma/histories/{transformPrismaSchemaHistories.ts → transformPrismaSchemaHistory.ts} +7 -8
- package/src/orchestrate/prisma/orchestratePrisma.ts +12 -17
- package/src/orchestrate/prisma/orchestratePrismaComponent.ts +7 -15
- package/src/orchestrate/prisma/orchestratePrismaCorrect.ts +129 -64
- package/src/orchestrate/prisma/orchestratePrismaReview.ts +115 -59
- package/src/orchestrate/prisma/{orchestratePrismaSchemas.ts → orchestratePrismaSchema.ts} +92 -60
- package/src/orchestrate/prisma/structures/IAutoBePrismaCorrectApplication.ts +81 -76
- package/src/orchestrate/prisma/structures/IAutoBePrismaReviewApplication.ts +97 -72
- package/src/orchestrate/prisma/structures/IAutoBePrismaSchemaApplication.ts +93 -66
- package/src/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistory.ts +89 -0
- package/src/orchestrate/realize/histories/transformRealizeAuthorizationWriteHistory.ts +45 -0
- package/src/orchestrate/realize/histories/transformRealizeCorrectCastingHistory.ts +85 -0
- package/src/orchestrate/realize/histories/transformRealizeCorrectHistory.ts +77 -0
- package/src/orchestrate/realize/histories/transformRealizeWriteHistories.ts +152 -121
- package/src/orchestrate/realize/histories/{transformRealizeWriteAuthorizationsHistories.ts → transformRealizeWriteMembershipHistory.ts} +2 -2
- package/src/orchestrate/realize/orchestrateRealize.ts +4 -3
- package/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.ts +155 -97
- package/src/orchestrate/realize/orchestrateRealizeAuthorizationWrite.ts +241 -0
- package/src/orchestrate/realize/orchestrateRealizeCorrect.ts +88 -86
- package/src/orchestrate/realize/orchestrateRealizeCorrectCasting.ts +17 -56
- package/src/orchestrate/realize/orchestrateRealizeWrite.ts +82 -78
- package/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.ts +85 -22
- package/src/orchestrate/realize/structures/{IAutoBeRealizeAuthorizationApplication.ts → IAutoBeRealizeAuthorizationWriteApplication.ts} +64 -29
- package/src/orchestrate/realize/structures/IAutoBeRealizeCorrectApplication.ts +58 -5
- package/src/orchestrate/realize/structures/IAutoBeRealizeScenarioResult.ts +6 -19
- package/src/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.ts +58 -6
- package/src/orchestrate/realize/utils/generateRealizeScenario.ts +2 -20
- package/src/orchestrate/test/histories/transformTestCorrectHistories.ts +30 -30
- package/src/orchestrate/test/histories/transformTestCorrectInvalidRequestHistory.ts +40 -0
- package/src/orchestrate/test/histories/transformTestScenarioHistory.ts +116 -0
- package/src/orchestrate/test/histories/transformTestScenarioReviewHistory.ts +85 -0
- package/src/orchestrate/test/histories/transformTestWriteHistory.ts +169 -0
- package/src/orchestrate/test/orchestrateTestCorrect.ts +13 -19
- package/src/orchestrate/test/orchestrateTestCorrectInvalidRequest.ts +5 -12
- package/src/orchestrate/test/orchestrateTestScenario.ts +143 -83
- package/src/orchestrate/test/orchestrateTestScenarioReview.ts +93 -76
- package/src/orchestrate/test/orchestrateTestWrite.ts +7 -7
- package/src/orchestrate/test/structures/IAutoBeTestScenarioApplication.ts +74 -4
- package/src/orchestrate/test/structures/IAutoBeTestScenarioReviewApplication.ts +89 -14
- package/src/structures/IAutoBeOrchestrateHistory.ts +6 -0
- package/src/utils/executeCachedBatch.ts +33 -7
- package/src/utils/validateEmptyCode.ts +2 -2
- package/lib/orchestrate/common/histories/transformCommonCorrectCastingHistories.d.ts +0 -8
- package/lib/orchestrate/common/histories/transformCommonCorrectCastingHistories.js +0 -16
- package/lib/orchestrate/common/histories/transformCommonCorrectCastingHistories.js.map +0 -1
- package/lib/orchestrate/common/histories/transformPreviousAndLatestCorrectHistories.js.map +0 -1
- package/lib/orchestrate/interface/histories/transformInterfaceAssetHistories.d.ts +0 -3
- package/lib/orchestrate/interface/histories/transformInterfaceAssetHistories.js +0 -62
- package/lib/orchestrate/interface/histories/transformInterfaceAssetHistories.js.map +0 -1
- package/lib/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.d.ts +0 -8
- package/lib/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.js +0 -68
- package/lib/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.js.map +0 -1
- package/lib/orchestrate/interface/histories/transformInterfaceCommonHistories.d.ts +0 -3
- package/lib/orchestrate/interface/histories/transformInterfaceCommonHistories.js.map +0 -1
- package/lib/orchestrate/interface/histories/transformInterfaceComplementHistories.d.ts +0 -9
- package/lib/orchestrate/interface/histories/transformInterfaceComplementHistories.js +0 -74
- package/lib/orchestrate/interface/histories/transformInterfaceComplementHistories.js.map +0 -1
- package/lib/orchestrate/interface/histories/transformInterfaceEndpointHistories.d.ts +0 -10
- package/lib/orchestrate/interface/histories/transformInterfaceEndpointHistories.js +0 -61
- package/lib/orchestrate/interface/histories/transformInterfaceEndpointHistories.js.map +0 -1
- package/lib/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.d.ts +0 -4
- package/lib/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.js +0 -34
- package/lib/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.js.map +0 -1
- package/lib/orchestrate/interface/histories/transformInterfaceGroupHistories.d.ts +0 -6
- package/lib/orchestrate/interface/histories/transformInterfaceGroupHistories.js +0 -52
- package/lib/orchestrate/interface/histories/transformInterfaceGroupHistories.js.map +0 -1
- package/lib/orchestrate/interface/histories/transformInterfaceOperationHistories.d.ts +0 -8
- package/lib/orchestrate/interface/histories/transformInterfaceOperationHistories.js +0 -71
- package/lib/orchestrate/interface/histories/transformInterfaceOperationHistories.js.map +0 -1
- package/lib/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.d.ts +0 -5
- package/lib/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js +0 -36
- package/lib/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js.map +0 -1
- package/lib/orchestrate/interface/histories/transformInterfacePrerequisitesHistories.d.ts +0 -3
- package/lib/orchestrate/interface/histories/transformInterfacePrerequisitesHistories.js +0 -102
- package/lib/orchestrate/interface/histories/transformInterfacePrerequisitesHistories.js.map +0 -1
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaHistories.d.ts +0 -9
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaHistories.js +0 -74
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaHistories.js.map +0 -1
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaRenameHistories.d.ts +0 -5
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaRenameHistories.js +0 -51
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaRenameHistories.js.map +0 -1
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaReviewHistories.d.ts +0 -11
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaReviewHistories.js +0 -81
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaReviewHistories.js.map +0 -1
- package/lib/orchestrate/interface/orchestrateInterfaceAuthorizations.d.ts +0 -4
- package/lib/orchestrate/interface/orchestrateInterfaceAuthorizations.js.map +0 -1
- package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.js +0 -508
- package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.js.map +0 -1
- package/lib/orchestrate/interface/orchestrateInterfaceEndpointsReview.d.ts +0 -4
- package/lib/orchestrate/interface/orchestrateInterfaceEndpointsReview.js +0 -488
- package/lib/orchestrate/interface/orchestrateInterfaceEndpointsReview.js.map +0 -1
- package/lib/orchestrate/interface/orchestrateInterfaceGroups.js +0 -458
- package/lib/orchestrate/interface/orchestrateInterfaceGroups.js.map +0 -1
- package/lib/orchestrate/interface/orchestrateInterfaceOperations.js.map +0 -1
- package/lib/orchestrate/interface/orchestrateInterfaceOperationsReview.d.ts +0 -4
- package/lib/orchestrate/interface/orchestrateInterfaceOperationsReview.js.map +0 -1
- package/lib/orchestrate/interface/orchestrateInterfacePrerequisites.js +0 -917
- package/lib/orchestrate/interface/orchestrateInterfacePrerequisites.js.map +0 -1
- package/lib/orchestrate/interface/orchestrateInterfaceSchemas.js.map +0 -1
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceEndpointsReviewApplication.d.ts +0 -60
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceEndpointsReviewApplication.js.map +0 -1
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.js.map +0 -1
- package/lib/orchestrate/interface/structures/IAutoBeInterfacePrerequisitesApplication.d.ts +0 -52
- package/lib/orchestrate/interface/structures/IAutoBeInterfacePrerequisitesApplication.js.map +0 -1
- package/lib/orchestrate/prisma/histories/transformPrismaComponentsHistories.d.ts +0 -6
- package/lib/orchestrate/prisma/histories/transformPrismaComponentsHistories.js +0 -95
- package/lib/orchestrate/prisma/histories/transformPrismaComponentsHistories.js.map +0 -1
- package/lib/orchestrate/prisma/histories/transformPrismaCorrectHistories.d.ts +0 -3
- package/lib/orchestrate/prisma/histories/transformPrismaCorrectHistories.js +0 -41
- package/lib/orchestrate/prisma/histories/transformPrismaCorrectHistories.js.map +0 -1
- package/lib/orchestrate/prisma/histories/transformPrismaReviewHistories.d.ts +0 -8
- package/lib/orchestrate/prisma/histories/transformPrismaReviewHistories.js +0 -62
- package/lib/orchestrate/prisma/histories/transformPrismaReviewHistories.js.map +0 -1
- package/lib/orchestrate/prisma/histories/transformPrismaSchemaHistories.d.ts +0 -8
- package/lib/orchestrate/prisma/histories/transformPrismaSchemaHistories.js +0 -78
- package/lib/orchestrate/prisma/histories/transformPrismaSchemaHistories.js.map +0 -1
- package/lib/orchestrate/prisma/orchestratePrismaSchemas.js +0 -1678
- package/lib/orchestrate/prisma/orchestratePrismaSchemas.js.map +0 -1
- package/lib/orchestrate/realize/histories/transformRealizeAuthorization.d.ts +0 -5
- package/lib/orchestrate/realize/histories/transformRealizeAuthorization.js +0 -44
- package/lib/orchestrate/realize/histories/transformRealizeAuthorization.js.map +0 -1
- package/lib/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.d.ts +0 -5
- package/lib/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.js +0 -82
- package/lib/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.js.map +0 -1
- package/lib/orchestrate/realize/histories/transformRealizeCorrectCastingHistories.d.ts +0 -5
- package/lib/orchestrate/realize/histories/transformRealizeCorrectCastingHistories.js.map +0 -1
- package/lib/orchestrate/realize/histories/transformRealizeCorrectHistories.d.ts +0 -13
- package/lib/orchestrate/realize/histories/transformRealizeCorrectHistories.js +0 -29
- package/lib/orchestrate/realize/histories/transformRealizeCorrectHistories.js.map +0 -1
- package/lib/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.d.ts +0 -3
- package/lib/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.js +0 -23
- package/lib/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.js.map +0 -1
- package/lib/orchestrate/realize/orchestrateRealizeAuthorization.js +0 -710
- package/lib/orchestrate/realize/orchestrateRealizeAuthorization.js.map +0 -1
- package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.js.map +0 -1
- package/lib/orchestrate/test/histories/transformTestCorrectInvalidRequestHistories.d.ts +0 -4
- package/lib/orchestrate/test/histories/transformTestCorrectInvalidRequestHistories.js +0 -33
- package/lib/orchestrate/test/histories/transformTestCorrectInvalidRequestHistories.js.map +0 -1
- package/lib/orchestrate/test/histories/transformTestScenarioHistories.d.ts +0 -10
- package/lib/orchestrate/test/histories/transformTestScenarioHistories.js +0 -101
- package/lib/orchestrate/test/histories/transformTestScenarioHistories.js.map +0 -1
- package/lib/orchestrate/test/histories/transformTestScenarioReviewHistories.d.ts +0 -8
- package/lib/orchestrate/test/histories/transformTestScenarioReviewHistories.js +0 -72
- package/lib/orchestrate/test/histories/transformTestScenarioReviewHistories.js.map +0 -1
- package/lib/orchestrate/test/histories/transformTestWriteHistories.js.map +0 -1
- package/src/orchestrate/common/histories/transformCommonCorrectCastingHistories.ts +0 -25
- package/src/orchestrate/interface/histories/transformInterfaceAssetHistories.ts +0 -72
- package/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.ts +0 -75
- package/src/orchestrate/interface/histories/transformInterfaceComplementHistories.ts +0 -82
- package/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.ts +0 -72
- package/src/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.ts +0 -40
- package/src/orchestrate/interface/histories/transformInterfaceOperationHistories.ts +0 -78
- package/src/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.ts +0 -44
- package/src/orchestrate/interface/histories/transformInterfacePrerequisitesHistories.ts +0 -118
- package/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.ts +0 -80
- package/src/orchestrate/interface/histories/transformInterfaceSchemaRenameHistories.ts +0 -55
- package/src/orchestrate/interface/histories/transformInterfaceSchemaReviewHistories.ts +0 -90
- package/src/orchestrate/interface/orchestrateInterfaceEndpoints.ts +0 -152
- package/src/orchestrate/interface/orchestrateInterfaceEndpointsReview.ts +0 -98
- package/src/orchestrate/interface/orchestrateInterfaceGroups.ts +0 -91
- package/src/orchestrate/interface/orchestrateInterfaceOperationsReview.ts +0 -157
- package/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointsReviewApplication.ts +0 -65
- package/src/orchestrate/interface/structures/IAutoBeInterfacePrerequisitesApplication.ts +0 -58
- package/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.ts +0 -104
- package/src/orchestrate/prisma/histories/transformPrismaReviewHistories.ts +0 -69
- package/src/orchestrate/realize/histories/transformRealizeAuthorization.ts +0 -52
- package/src/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.ts +0 -95
- package/src/orchestrate/realize/histories/transformRealizeCorrectCastingHistories.ts +0 -30
- package/src/orchestrate/realize/histories/transformRealizeCorrectHistories.ts +0 -46
- package/src/orchestrate/realize/orchestrateRealizeAuthorization.ts +0 -185
- package/src/orchestrate/test/histories/transformTestCorrectInvalidRequestHistories.ts +0 -39
- package/src/orchestrate/test/histories/transformTestScenarioHistories.ts +0 -125
- package/src/orchestrate/test/histories/transformTestScenarioReviewHistories.ts +0 -89
- package/src/orchestrate/test/histories/transformTestWriteHistories.ts +0 -172
|
@@ -0,0 +1,2159 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
36
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
37
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
38
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
39
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
40
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
41
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
42
|
+
});
|
|
43
|
+
};
|
|
44
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
45
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
46
|
+
};
|
|
47
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
|
+
exports.orchestrateInterfacePrerequisite = orchestrateInterfacePrerequisite;
|
|
49
|
+
const __typia_transform__validateReport = __importStar(require("typia/lib/internal/_validateReport.js"));
|
|
50
|
+
const __typia_transform__llmApplicationFinalize = __importStar(require("typia/lib/internal/_llmApplicationFinalize.js"));
|
|
51
|
+
const utils_1 = require("@autobe/utils");
|
|
52
|
+
const tstl_1 = require("tstl");
|
|
53
|
+
const typia_1 = __importDefault(require("typia"));
|
|
54
|
+
const uuid_1 = require("uuid");
|
|
55
|
+
const assertSchemaModel_1 = require("../../context/assertSchemaModel");
|
|
56
|
+
const divideArray_1 = require("../../utils/divideArray");
|
|
57
|
+
const executeCachedBatch_1 = require("../../utils/executeCachedBatch");
|
|
58
|
+
const AutoBePreliminaryController_1 = require("../common/AutoBePreliminaryController");
|
|
59
|
+
const transformInterfacePrerequisiteHistory_1 = require("./histories/transformInterfacePrerequisiteHistory");
|
|
60
|
+
function orchestrateInterfacePrerequisite(ctx, document) {
|
|
61
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
62
|
+
var _a;
|
|
63
|
+
const operations = (_a = document.operations.filter((op) => op.authorizationType === null)) !== null && _a !== void 0 ? _a : [];
|
|
64
|
+
const progress = {
|
|
65
|
+
total: operations.length,
|
|
66
|
+
completed: 0,
|
|
67
|
+
};
|
|
68
|
+
const prerequisiteOperations = document.operations.filter((op) => op.authorizationType === null && op.method === "post");
|
|
69
|
+
const dict = new tstl_1.HashMap(prerequisiteOperations.map((op) => new tstl_1.Pair({ path: op.path, method: op.method }, op)), utils_1.AutoBeOpenApiEndpointComparator.hashCode, utils_1.AutoBeOpenApiEndpointComparator.equals);
|
|
70
|
+
const prerequisitesNotFound = [
|
|
71
|
+
`You have to select one of the endpoints below`,
|
|
72
|
+
"",
|
|
73
|
+
" method | path ",
|
|
74
|
+
"--------|------",
|
|
75
|
+
...prerequisiteOperations
|
|
76
|
+
.map((op) => `\`${op.method}\` | \`${op.path}\``)
|
|
77
|
+
.join("\n"),
|
|
78
|
+
].join("\n");
|
|
79
|
+
const exclude = [];
|
|
80
|
+
let include = [...operations];
|
|
81
|
+
let trial = 0;
|
|
82
|
+
do {
|
|
83
|
+
const matrix = (0, divideArray_1.divideArray)({
|
|
84
|
+
array: include,
|
|
85
|
+
capacity: 2 /* AutoBeConfigConstant.INTERFACE_CAPACITY */,
|
|
86
|
+
});
|
|
87
|
+
yield (0, executeCachedBatch_1.executeCachedBatch)(ctx, matrix.map((ops) => (promptCacheKey) => __awaiter(this, void 0, void 0, function* () {
|
|
88
|
+
const row = yield divideAndConquer(ctx, {
|
|
89
|
+
dict: dict,
|
|
90
|
+
document,
|
|
91
|
+
includes: ops,
|
|
92
|
+
progress,
|
|
93
|
+
promptCacheKey,
|
|
94
|
+
prerequisitesNotFound,
|
|
95
|
+
});
|
|
96
|
+
exclude.push(...row);
|
|
97
|
+
return row;
|
|
98
|
+
})));
|
|
99
|
+
include = include.filter((op) => {
|
|
100
|
+
if (exclude.some((el) => el.endpoint.method === op.method && el.endpoint.path === op.path)) {
|
|
101
|
+
return false;
|
|
102
|
+
}
|
|
103
|
+
return true;
|
|
104
|
+
});
|
|
105
|
+
} while (include.length > 0 && ++trial < ctx.retry);
|
|
106
|
+
return exclude;
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
function divideAndConquer(ctx, props) {
|
|
110
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
111
|
+
try {
|
|
112
|
+
return yield process(ctx, props);
|
|
113
|
+
}
|
|
114
|
+
catch (_a) {
|
|
115
|
+
props.progress.completed += props.includes.length;
|
|
116
|
+
return [];
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
function process(ctx, props) {
|
|
121
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
122
|
+
const preliminary = new AutoBePreliminaryController_1.AutoBePreliminaryController({
|
|
123
|
+
application: {
|
|
124
|
+
version: "3.1",
|
|
125
|
+
components: {
|
|
126
|
+
schemas: {
|
|
127
|
+
"IAutoBeInterfacePrerequisiteApplication.IProps": {
|
|
128
|
+
type: "object",
|
|
129
|
+
properties: {
|
|
130
|
+
thinking: {
|
|
131
|
+
type: "string",
|
|
132
|
+
description: "Think before you act.\n\nBefore requesting preliminary data or completing your task, reflect on your\ncurrent state and explain your reasoning:\n\nFor preliminary requests (getAnalysisFiles, getPrismaSchemas, etc.):\n- What critical information is missing that you don't already have?\n- Why do you need it specifically right now?\n- Be brief - state the gap, don't list everything you have.\n\nFor completion (complete):\n- What key assets did you acquire?\n- What did you accomplish?\n- Why is it sufficient to complete?\n- Summarize - don't enumerate every single item.\n\nThis reflection helps you avoid duplicate requests and premature completion."
|
|
133
|
+
},
|
|
134
|
+
request: {
|
|
135
|
+
oneOf: [
|
|
136
|
+
{
|
|
137
|
+
$ref: "#/components/schemas/IAutoBePreliminaryGetAnalysisFiles"
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
$ref: "#/components/schemas/IAutoBePreliminaryGetInterfaceOperations"
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
$ref: "#/components/schemas/IAutoBePreliminaryGetInterfaceSchemas"
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
$ref: "#/components/schemas/IAutoBePreliminaryGetPrismaSchemas"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
$ref: "#/components/schemas/IAutoBeInterfacePrerequisiteApplication.IComplete"
|
|
150
|
+
}
|
|
151
|
+
],
|
|
152
|
+
discriminator: {
|
|
153
|
+
propertyName: "type",
|
|
154
|
+
mapping: {
|
|
155
|
+
getAnalysisFiles: "#/components/schemas/IAutoBePreliminaryGetAnalysisFiles",
|
|
156
|
+
getInterfaceOperations: "#/components/schemas/IAutoBePreliminaryGetInterfaceOperations",
|
|
157
|
+
getInterfaceSchemas: "#/components/schemas/IAutoBePreliminaryGetInterfaceSchemas",
|
|
158
|
+
getPrismaSchemas: "#/components/schemas/IAutoBePreliminaryGetPrismaSchemas",
|
|
159
|
+
complete: "#/components/schemas/IAutoBeInterfacePrerequisiteApplication.IComplete"
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
description: "Type discriminator for the request.\n\nDetermines which action to perform: preliminary data retrieval\n(getAnalysisFiles, getPrismaSchemas, getInterfaceOperations,\ngetInterfaceSchemas) or final prerequisite analysis (complete). When\npreliminary returns empty array, that type is removed from the union,\nphysically preventing repeated calls."
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
required: [
|
|
166
|
+
"thinking",
|
|
167
|
+
"request"
|
|
168
|
+
]
|
|
169
|
+
},
|
|
170
|
+
IAutoBePreliminaryGetAnalysisFiles: {
|
|
171
|
+
type: "object",
|
|
172
|
+
properties: {
|
|
173
|
+
type: {
|
|
174
|
+
"const": "getAnalysisFiles",
|
|
175
|
+
description: "Type discriminator for the request.\n\nDetermines which action to perform: preliminary data retrieval or actual\ntask execution. Value \"getAnalysisFiles\" indicates this is a preliminary\ndata request for analysis files."
|
|
176
|
+
},
|
|
177
|
+
fileNames: {
|
|
178
|
+
type: "array",
|
|
179
|
+
items: {
|
|
180
|
+
type: "string"
|
|
181
|
+
},
|
|
182
|
+
minItems: 1,
|
|
183
|
+
description: "List of analysis file names to retrieve.\n\nFile names from the analyze phase containing requirements, use cases, and\nbusiness logic documentation.\n\nCRITICAL: DO NOT request the same file names that you have already\nrequested in previous calls."
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
required: [
|
|
187
|
+
"type",
|
|
188
|
+
"fileNames"
|
|
189
|
+
],
|
|
190
|
+
description: "Request to retrieve requirements analysis files for context.\n\nThis type is used in the preliminary phase to request specific analysis files\nthat provide business requirements and domain context."
|
|
191
|
+
},
|
|
192
|
+
IAutoBePreliminaryGetInterfaceOperations: {
|
|
193
|
+
type: "object",
|
|
194
|
+
properties: {
|
|
195
|
+
type: {
|
|
196
|
+
"const": "getInterfaceOperations",
|
|
197
|
+
description: "Type discriminator for the request.\n\nDetermines which action to perform: preliminary data retrieval or actual\ntask execution. Value \"getInterfaceOperations\" indicates this is a\npreliminary data request for interface operations."
|
|
198
|
+
},
|
|
199
|
+
endpoints: {
|
|
200
|
+
type: "array",
|
|
201
|
+
items: {
|
|
202
|
+
$ref: "#/components/schemas/AutoBeOpenApi.IEndpoint"
|
|
203
|
+
},
|
|
204
|
+
minItems: 1,
|
|
205
|
+
description: "List of existing API operation endpoints to retrieve.\n\nOperations that have been generated in previous phases, containing paths,\nmethods, parameters, and request/response bodies.\n\nCRITICAL: DO NOT request the same endpoints that you have already requested\nin previous calls."
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
required: [
|
|
209
|
+
"type",
|
|
210
|
+
"endpoints"
|
|
211
|
+
],
|
|
212
|
+
description: "Request to retrieve existing interface operations for context.\n\nThis type is used in the preliminary phase to request already-generated API\noperations for review, validation, or complementary generation tasks."
|
|
213
|
+
},
|
|
214
|
+
"AutoBeOpenApi.IEndpoint": {
|
|
215
|
+
type: "object",
|
|
216
|
+
properties: {
|
|
217
|
+
path: {
|
|
218
|
+
type: "string",
|
|
219
|
+
pattern: "^\\/[a-zA-Z0-9\\/_{}.-]*$",
|
|
220
|
+
description: "HTTP path of the API operation.\n\nThe URL path for accessing this API operation, using path parameters\nenclosed in curly braces (e.g., `/shoppings/customers/sales/{saleId}`).\n\nIt must be corresponded to the {@link parameters path parameters}.\n\nThe path structure should clearly indicate which database entity this\noperation is manipulating, helping to ensure all entities have\nappropriate API coverage.\n\nPath validation rules:\n\n- Must start with a forward slash (/)\n- Can contain only: letters (a-z, A-Z), numbers (0-9), forward slashes (/),\n curly braces for parameters ({paramName}), hyphens (-), and underscores\n (_)\n- Parameters must be enclosed in curly braces: {paramName}\n- Resource names should be in camelCase\n- No quotes, spaces, or invalid special characters allowed\n- No domain or role-based prefixes\n\nValid examples:\n\n- \"/users\"\n- \"/users/{userId}\"\n- \"/articles/{articleId}/comments\"\n- \"/attachmentFiles\"\n- \"/orders/{orderId}/items/{itemId}\"\n\nInvalid examples:\n\n- \"'/users'\" (contains quotes)\n- \"/user profile\" (contains space)\n- \"/users/[userId]\" (wrong bracket format)\n- \"/admin/users\" (role prefix)\n- \"/api/v1/users\" (API prefix)"
|
|
221
|
+
},
|
|
222
|
+
method: {
|
|
223
|
+
oneOf: [
|
|
224
|
+
{
|
|
225
|
+
"const": "get"
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
"const": "post"
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
"const": "put"
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
"const": "delete"
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
"const": "patch"
|
|
238
|
+
}
|
|
239
|
+
],
|
|
240
|
+
description: "HTTP method of the API operation.\n\n**IMPORTANT**: Methods must be written in lowercase only (e.g., \"get\",\nnot \"GET\").\n\nNote that, if the API operation has {@link requestBody}, method must not\nbe `get`.\n\nAlso, even though the API operation has been designed to only get\ninformation, but it needs complicated request information, it must be\ndefined as `patch` method with {@link requestBody} data specification.\n\n- `get`: get information\n- `patch`: get information with complicated request data\n ({@link requestBody})\n- `post`: create new record\n- `put`: update existing record\n- `delete`: remove record"
|
|
241
|
+
}
|
|
242
|
+
},
|
|
243
|
+
required: [
|
|
244
|
+
"path",
|
|
245
|
+
"method"
|
|
246
|
+
],
|
|
247
|
+
description: "API endpoint information."
|
|
248
|
+
},
|
|
249
|
+
IAutoBePreliminaryGetInterfaceSchemas: {
|
|
250
|
+
type: "object",
|
|
251
|
+
properties: {
|
|
252
|
+
type: {
|
|
253
|
+
"const": "getInterfaceSchemas",
|
|
254
|
+
description: "Type discriminator for the request.\n\nDetermines which action to perform: preliminary data retrieval or actual\ntask execution. Value \"getInterfaceSchemas\" indicates this is a preliminary\ndata request for interface schemas."
|
|
255
|
+
},
|
|
256
|
+
typeNames: {
|
|
257
|
+
type: "array",
|
|
258
|
+
items: {
|
|
259
|
+
type: "string"
|
|
260
|
+
},
|
|
261
|
+
minItems: 1,
|
|
262
|
+
description: "List of schema type names to retrieve.\n\nSchema names from the OpenAPI components.schemas section (e.g., \"IUser\",\n\"IUser.ICreate\", \"IPost.IUpdate\").\n\nCRITICAL: DO NOT request the same type names that you have already\nrequested in previous calls."
|
|
263
|
+
}
|
|
264
|
+
},
|
|
265
|
+
required: [
|
|
266
|
+
"type",
|
|
267
|
+
"typeNames"
|
|
268
|
+
],
|
|
269
|
+
description: "Request to retrieve OpenAPI schema type definitions for context.\n\nThis type is used in the preliminary phase to request specific schema\ndefinitions from components.schemas for review or complementary generation."
|
|
270
|
+
},
|
|
271
|
+
IAutoBePreliminaryGetPrismaSchemas: {
|
|
272
|
+
type: "object",
|
|
273
|
+
properties: {
|
|
274
|
+
type: {
|
|
275
|
+
"const": "getPrismaSchemas",
|
|
276
|
+
description: "Type discriminator for the request.\n\nDetermines which action to perform: preliminary data retrieval or actual\ntask execution. Value \"getPrismaSchemas\" indicates this is a preliminary\ndata request for Prisma schemas."
|
|
277
|
+
},
|
|
278
|
+
schemaNames: {
|
|
279
|
+
type: "array",
|
|
280
|
+
items: {
|
|
281
|
+
type: "string"
|
|
282
|
+
},
|
|
283
|
+
minItems: 1,
|
|
284
|
+
description: "List of Prisma table names to retrieve.\n\nTable names from the Prisma schema file representing database entities\n(e.g., \"user\", \"post\", \"comment\").\n\nCRITICAL: DO NOT request the same schema names that you have already\nrequested in previous calls."
|
|
285
|
+
}
|
|
286
|
+
},
|
|
287
|
+
required: [
|
|
288
|
+
"type",
|
|
289
|
+
"schemaNames"
|
|
290
|
+
],
|
|
291
|
+
description: "Request to retrieve Prisma database schema definitions for context.\n\nThis type is used in the preliminary phase to request specific Prisma table\nschemas needed for generating type-safe API operations."
|
|
292
|
+
},
|
|
293
|
+
"IAutoBeInterfacePrerequisiteApplication.IComplete": {
|
|
294
|
+
type: "object",
|
|
295
|
+
properties: {
|
|
296
|
+
type: {
|
|
297
|
+
"const": "complete",
|
|
298
|
+
description: "Type discriminator for the request.\n\nDetermines which action to perform: preliminary data retrieval or actual\ntask execution. Value \"complete\" indicates this is the final task\nexecution request."
|
|
299
|
+
},
|
|
300
|
+
operations: {
|
|
301
|
+
type: "array",
|
|
302
|
+
items: {
|
|
303
|
+
$ref: "#/components/schemas/IAutoBeInterfacePrerequisiteApplication.IOperation"
|
|
304
|
+
},
|
|
305
|
+
description: "Target operations requiring prerequisite analysis.\n\nEach operation will be analyzed for dependency requirements and returned\nwith appropriate prerequisites from Available API Operations."
|
|
306
|
+
}
|
|
307
|
+
},
|
|
308
|
+
required: [
|
|
309
|
+
"type",
|
|
310
|
+
"operations"
|
|
311
|
+
],
|
|
312
|
+
description: "Request to analyze and generate API operation prerequisites.\n\nExecutes prerequisite analysis to determine which Available API Operations\nmust be executed before each Target Operation based on resource creation\ndependencies and existence validations."
|
|
313
|
+
},
|
|
314
|
+
"IAutoBeInterfacePrerequisiteApplication.IOperation": {
|
|
315
|
+
type: "object",
|
|
316
|
+
properties: {
|
|
317
|
+
endpoint: {
|
|
318
|
+
$ref: "#/components/schemas/AutoBeOpenApi.IEndpoint",
|
|
319
|
+
description: "The API endpoint being analyzed.\n\nIdentifies the specific operation (method + path) that needs\nprerequisites."
|
|
320
|
+
},
|
|
321
|
+
prerequisites: {
|
|
322
|
+
type: "array",
|
|
323
|
+
items: {
|
|
324
|
+
$ref: "#/components/schemas/AutoBeOpenApi.IPrerequisite"
|
|
325
|
+
},
|
|
326
|
+
description: "Required prerequisite operations.\n\nList of API operations that must be successfully executed before this\noperation can be performed. Based on resource creation dependencies and\nexistence validations from the analysis."
|
|
327
|
+
}
|
|
328
|
+
},
|
|
329
|
+
required: [
|
|
330
|
+
"endpoint",
|
|
331
|
+
"prerequisites"
|
|
332
|
+
],
|
|
333
|
+
description: "Operation with its analyzed prerequisite dependencies.\n\nRepresents a single API operation and its complete prerequisite chain\nneeded for successful execution."
|
|
334
|
+
},
|
|
335
|
+
"AutoBeOpenApi.IPrerequisite": {
|
|
336
|
+
type: "object",
|
|
337
|
+
properties: {
|
|
338
|
+
endpoint: {
|
|
339
|
+
$ref: "#/components/schemas/AutoBeOpenApi.IEndpoint",
|
|
340
|
+
description: "The API endpoint that must be called before the main operation.\n\nThis specifies the exact HTTP method and path of the prerequisite API.\nThe endpoint must be a valid operation defined elsewhere in the API\nspecification. Path parameters in the prerequisite endpoint can reference\nthe same parameters available in the main operation."
|
|
341
|
+
},
|
|
342
|
+
description: {
|
|
343
|
+
type: "string",
|
|
344
|
+
description: "Clear description of why this prerequisite is required.\n\nThis description should explain:\n\n- What validation or check this prerequisite performs\n- What state or condition must be satisfied\n- What happens if this prerequisite fails\n- Any specific data from the prerequisite used by the main operation\n\nThe description helps developers understand the dependency relationship\nand aids in debugging when prerequisites fail.\n\nGuidelines for good descriptions:\n\n- Be specific about the requirement (e.g., \"must be in 'active' state\")\n- Explain business logic constraints (e.g., \"budget must not be exceeded\")\n- Explain data dependencies (e.g., \"provides pricing information needed\")\n- Keep it concise but complete\n\n> MUST be written in English. Never use other languages."
|
|
345
|
+
}
|
|
346
|
+
},
|
|
347
|
+
required: [
|
|
348
|
+
"endpoint",
|
|
349
|
+
"description"
|
|
350
|
+
],
|
|
351
|
+
description: "Prerequisite API operation dependency.\n\n`IPrerequisite` defines a dependency relationship between API operations,\nspecifying that certain endpoints must be successfully called before the\ncurrent operation can proceed. This ensures proper resource validation,\nstate checking, and data availability in complex API workflows.\n\n## CRITICAL WARNING: Authentication is NOT a Prerequisite\n\n**NEVER use prerequisites for authentication or authorization checks!**\n\nPrerequisites are ONLY for business logic dependencies such as:\n\n- Checking if a resource exists\n- Verifying resource state\n- Loading required data\n\nDo NOT create prerequisites for:\n\n- Login/authentication endpoints\n- Token validation\n- Permission checks\n- User authorization verification\n\nAuthentication is handled separately via the `authorizationActor` field on\nthe operation itself. Mixing authentication with business prerequisites\ncreates confusion and incorrect test scenarios.\n\n## Core Concept\n\nPrerequisites create an execution dependency graph for API operations. They\nexplicitly declare which APIs must succeed before attempting the current\noperation, preventing invalid states and ensuring data consistency.\n\n## Structure\n\nEach prerequisite consists of:\n\n1. **endpoint**: The API endpoint that must be called first\n2. **description**: Clear explanation of why this prerequisite is required\n\n## Common Use Cases\n\n### 1. Resource Existence Validation\n\n```typescript\n{\n \"endpoint\": { \"path\": \"/users/{userId}\", \"method\": \"get\" },\n \"description\": \"User must exist before updating their profile\"\n}\n```\n\n### 2. Parent-Child Relationships\n\n```typescript\n{\n \"endpoint\": { \"path\": \"/posts/{postId}\", \"method\": \"get\" },\n \"description\": \"Post must exist before adding comments\"\n}\n```\n\n### 3. State Prerequisites\n\n```typescript\n{\n \"endpoint\": { \"path\": \"/orders/{orderId}/status\", \"method\": \"get\" },\n \"description\": \"Order must be in 'confirmed' state before shipping\"\n}\n```\n\n### 4. Business Logic Dependencies\n\n```typescript\n{\n \"endpoint\": {\n \"path\": \"/inventory/{productId}/stock\",\n \"method\": \"get\"\n },\n \"description\": \"Product must have sufficient stock before creating order\"\n}\n```\n\n## Implementation Guidelines\n\n1. **Clear Descriptions**: Always explain WHY the prerequisite is needed\n2. **Minimal Dependencies**: Only include truly necessary prerequisites\n3. **Logical Order**: If multiple prerequisites exist, order them logically\n4. **Error Context**: Description should help understand failure scenarios\n5. **No Authentication**: Prerequisites must NEVER be authentication checks\n\n## Test Generation Usage\n\nThe Test Agent utilizes prerequisites to:\n\n- Set up test data in the correct sequence\n- Generate realistic test scenarios\n- Create both positive and negative test cases\n- Ensure proper cleanup in reverse dependency order\n\n## Best Practices\n\n- Keep prerequisite chains as short as possible for performance\n- Consider caching prerequisite results when safe to do so\n- Ensure prerequisite descriptions are specific, not generic\n- Validate that circular dependencies don't exist\n- Document any side effects of prerequisite calls\n- NEVER use for authentication/authorization validation"
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
},
|
|
355
|
+
functions: [
|
|
356
|
+
{
|
|
357
|
+
name: "process",
|
|
358
|
+
async: false,
|
|
359
|
+
parameters: [
|
|
360
|
+
{
|
|
361
|
+
name: "props",
|
|
362
|
+
description: " Request containing either preliminary data request or complete\ntask",
|
|
363
|
+
required: true,
|
|
364
|
+
schema: {
|
|
365
|
+
$ref: "#/components/schemas/IAutoBeInterfacePrerequisiteApplication.IProps"
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
],
|
|
369
|
+
description: "Process prerequisite analysis task or preliminary data requests.\n\nAnalyzes each operation's dependencies and returns complete list with\nrequired prerequisite chains based on resource relationships."
|
|
370
|
+
}
|
|
371
|
+
]
|
|
372
|
+
},
|
|
373
|
+
source: SOURCE,
|
|
374
|
+
kinds: [
|
|
375
|
+
"analysisFiles",
|
|
376
|
+
"prismaSchemas",
|
|
377
|
+
"interfaceOperations",
|
|
378
|
+
"interfaceSchemas",
|
|
379
|
+
],
|
|
380
|
+
state: ctx.state(),
|
|
381
|
+
all: {
|
|
382
|
+
interfaceOperations: props.document.operations,
|
|
383
|
+
interfaceSchemas: props.document.components.schemas,
|
|
384
|
+
},
|
|
385
|
+
local: {
|
|
386
|
+
interfaceOperations: props.includes,
|
|
387
|
+
},
|
|
388
|
+
});
|
|
389
|
+
return yield preliminary.orchestrate(ctx, (out) => __awaiter(this, void 0, void 0, function* () {
|
|
390
|
+
var _a, _b;
|
|
391
|
+
const pointer = {
|
|
392
|
+
value: null,
|
|
393
|
+
};
|
|
394
|
+
const result = yield ctx.conversate(Object.assign({ source: SOURCE, controller: createController({
|
|
395
|
+
model: ctx.model,
|
|
396
|
+
document: props.document,
|
|
397
|
+
dict: props.dict,
|
|
398
|
+
includes: props.includes,
|
|
399
|
+
prerequisitesNotFound: props.prerequisitesNotFound,
|
|
400
|
+
preliminary,
|
|
401
|
+
build: (next) => {
|
|
402
|
+
pointer.value = next;
|
|
403
|
+
},
|
|
404
|
+
}), enforceFunctionCall: true, promptCacheKey: props.promptCacheKey }, (0, transformInterfacePrerequisiteHistory_1.transformInterfacePrerequisiteHistory)({
|
|
405
|
+
document: props.document,
|
|
406
|
+
includes: props.includes,
|
|
407
|
+
preliminary,
|
|
408
|
+
})));
|
|
409
|
+
if (pointer.value !== null) {
|
|
410
|
+
props.progress.completed += pointer.value.length;
|
|
411
|
+
ctx.dispatch({
|
|
412
|
+
type: SOURCE,
|
|
413
|
+
id: (0, uuid_1.v7)(),
|
|
414
|
+
created_at: new Date().toISOString(),
|
|
415
|
+
metric: result.metric,
|
|
416
|
+
tokenUsage: result.tokenUsage,
|
|
417
|
+
operations: pointer.value,
|
|
418
|
+
total: props.progress.total,
|
|
419
|
+
completed: props.progress.completed,
|
|
420
|
+
step: (_b = (_a = ctx.state().prisma) === null || _a === void 0 ? void 0 : _a.step) !== null && _b !== void 0 ? _b : 0,
|
|
421
|
+
});
|
|
422
|
+
return out(result)(pointer.value);
|
|
423
|
+
}
|
|
424
|
+
return out(result)(null);
|
|
425
|
+
}));
|
|
426
|
+
});
|
|
427
|
+
}
|
|
428
|
+
function createController(props) {
|
|
429
|
+
(0, assertSchemaModel_1.assertSchemaModel)(props.model);
|
|
430
|
+
const validate = (next) => {
|
|
431
|
+
const result = (() => { const _io0 = input => "string" === typeof input.thinking && ("object" === typeof input.request && null !== input.request && _iu0(input.request)); const _io1 = input => "getAnalysisFiles" === input.type && (Array.isArray(input.fileNames) && (1 <= input.fileNames.length && input.fileNames.every(elem => "string" === typeof elem))); const _io2 = input => "getInterfaceOperations" === input.type && (Array.isArray(input.endpoints) && (1 <= input.endpoints.length && input.endpoints.every(elem => "object" === typeof elem && null !== elem && _io3(elem)))); const _io3 = input => "string" === typeof input.path && RegExp("^\\/[a-zA-Z0-9\\/_{}.-]*$").test(input.path) && ("get" === input.method || "post" === input.method || "put" === input.method || "delete" === input.method || "patch" === input.method); const _io4 = input => "getInterfaceSchemas" === input.type && (Array.isArray(input.typeNames) && (1 <= input.typeNames.length && input.typeNames.every(elem => "string" === typeof elem))); const _io5 = input => "getPrismaSchemas" === input.type && (Array.isArray(input.schemaNames) && (1 <= input.schemaNames.length && input.schemaNames.every(elem => "string" === typeof elem))); const _io6 = input => "complete" === input.type && (Array.isArray(input.operations) && input.operations.every(elem => "object" === typeof elem && null !== elem && _io7(elem))); const _io7 = input => "object" === typeof input.endpoint && null !== input.endpoint && _io3(input.endpoint) && (Array.isArray(input.prerequisites) && input.prerequisites.every(elem => "object" === typeof elem && null !== elem && _io8(elem))); const _io8 = input => "object" === typeof input.endpoint && null !== input.endpoint && _io3(input.endpoint) && "string" === typeof input.description; const _iu0 = input => (() => {
|
|
432
|
+
if ("getAnalysisFiles" === input.type)
|
|
433
|
+
return _io1(input);
|
|
434
|
+
else if ("getInterfaceOperations" === input.type)
|
|
435
|
+
return _io2(input);
|
|
436
|
+
else if ("getInterfaceSchemas" === input.type)
|
|
437
|
+
return _io4(input);
|
|
438
|
+
else if ("getPrismaSchemas" === input.type)
|
|
439
|
+
return _io5(input);
|
|
440
|
+
else if ("complete" === input.type)
|
|
441
|
+
return _io6(input);
|
|
442
|
+
else
|
|
443
|
+
return false;
|
|
444
|
+
})(); const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.thinking || _report(_exceptionable, {
|
|
445
|
+
path: _path + ".thinking",
|
|
446
|
+
expected: "string",
|
|
447
|
+
value: input.thinking
|
|
448
|
+
}), ("object" === typeof input.request && null !== input.request || _report(_exceptionable, {
|
|
449
|
+
path: _path + ".request",
|
|
450
|
+
expected: "(IAutoBeInterfacePrerequisiteApplication.IComplete | IAutoBePreliminaryGetAnalysisFiles | IAutoBePreliminaryGetInterfaceOperations | IAutoBePreliminaryGetInterfaceSchemas | IAutoBePreliminaryGetPrismaSchemas)",
|
|
451
|
+
value: input.request
|
|
452
|
+
})) && _vu0(input.request, _path + ".request", true && _exceptionable) || _report(_exceptionable, {
|
|
453
|
+
path: _path + ".request",
|
|
454
|
+
expected: "(IAutoBeInterfacePrerequisiteApplication.IComplete | IAutoBePreliminaryGetAnalysisFiles | IAutoBePreliminaryGetInterfaceOperations | IAutoBePreliminaryGetInterfaceSchemas | IAutoBePreliminaryGetPrismaSchemas)",
|
|
455
|
+
value: input.request
|
|
456
|
+
})].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => ["getAnalysisFiles" === input.type || _report(_exceptionable, {
|
|
457
|
+
path: _path + ".type",
|
|
458
|
+
expected: "\"getAnalysisFiles\"",
|
|
459
|
+
value: input.type
|
|
460
|
+
}), (Array.isArray(input.fileNames) || _report(_exceptionable, {
|
|
461
|
+
path: _path + ".fileNames",
|
|
462
|
+
expected: "(Array<string> & MinItems<1>)",
|
|
463
|
+
value: input.fileNames
|
|
464
|
+
})) && ((1 <= input.fileNames.length || _report(_exceptionable, {
|
|
465
|
+
path: _path + ".fileNames",
|
|
466
|
+
expected: "Array<> & MinItems<1>",
|
|
467
|
+
value: input.fileNames
|
|
468
|
+
})) && input.fileNames.map((elem, _index7) => "string" === typeof elem || _report(_exceptionable, {
|
|
469
|
+
path: _path + ".fileNames[" + _index7 + "]",
|
|
470
|
+
expected: "string",
|
|
471
|
+
value: elem
|
|
472
|
+
})).every(flag => flag)) || _report(_exceptionable, {
|
|
473
|
+
path: _path + ".fileNames",
|
|
474
|
+
expected: "(Array<string> & MinItems<1>)",
|
|
475
|
+
value: input.fileNames
|
|
476
|
+
})].every(flag => flag); const _vo2 = (input, _path, _exceptionable = true) => ["getInterfaceOperations" === input.type || _report(_exceptionable, {
|
|
477
|
+
path: _path + ".type",
|
|
478
|
+
expected: "\"getInterfaceOperations\"",
|
|
479
|
+
value: input.type
|
|
480
|
+
}), (Array.isArray(input.endpoints) || _report(_exceptionable, {
|
|
481
|
+
path: _path + ".endpoints",
|
|
482
|
+
expected: "(Array<AutoBeOpenApi.IEndpoint> & MinItems<1>)",
|
|
483
|
+
value: input.endpoints
|
|
484
|
+
})) && ((1 <= input.endpoints.length || _report(_exceptionable, {
|
|
485
|
+
path: _path + ".endpoints",
|
|
486
|
+
expected: "Array<> & MinItems<1>",
|
|
487
|
+
value: input.endpoints
|
|
488
|
+
})) && input.endpoints.map((elem, _index8) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
489
|
+
path: _path + ".endpoints[" + _index8 + "]",
|
|
490
|
+
expected: "AutoBeOpenApi.IEndpoint",
|
|
491
|
+
value: elem
|
|
492
|
+
})) && _vo3(elem, _path + ".endpoints[" + _index8 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
493
|
+
path: _path + ".endpoints[" + _index8 + "]",
|
|
494
|
+
expected: "AutoBeOpenApi.IEndpoint",
|
|
495
|
+
value: elem
|
|
496
|
+
})).every(flag => flag)) || _report(_exceptionable, {
|
|
497
|
+
path: _path + ".endpoints",
|
|
498
|
+
expected: "(Array<AutoBeOpenApi.IEndpoint> & MinItems<1>)",
|
|
499
|
+
value: input.endpoints
|
|
500
|
+
})].every(flag => flag); const _vo3 = (input, _path, _exceptionable = true) => ["string" === typeof input.path && (RegExp("^\\/[a-zA-Z0-9\\/_{}.-]*$").test(input.path) || _report(_exceptionable, {
|
|
501
|
+
path: _path + ".path",
|
|
502
|
+
expected: "string & Pattern<\"^\\\\/[a-zA-Z0-9\\\\/_{}.-]*$\">",
|
|
503
|
+
value: input.path
|
|
504
|
+
})) || _report(_exceptionable, {
|
|
505
|
+
path: _path + ".path",
|
|
506
|
+
expected: "(string & Pattern<\"^\\\\/[a-zA-Z0-9\\\\/_{}.-]*$\">)",
|
|
507
|
+
value: input.path
|
|
508
|
+
}), "get" === input.method || "post" === input.method || "put" === input.method || "delete" === input.method || "patch" === input.method || _report(_exceptionable, {
|
|
509
|
+
path: _path + ".method",
|
|
510
|
+
expected: "(\"delete\" | \"get\" | \"patch\" | \"post\" | \"put\")",
|
|
511
|
+
value: input.method
|
|
512
|
+
})].every(flag => flag); const _vo4 = (input, _path, _exceptionable = true) => ["getInterfaceSchemas" === input.type || _report(_exceptionable, {
|
|
513
|
+
path: _path + ".type",
|
|
514
|
+
expected: "\"getInterfaceSchemas\"",
|
|
515
|
+
value: input.type
|
|
516
|
+
}), (Array.isArray(input.typeNames) || _report(_exceptionable, {
|
|
517
|
+
path: _path + ".typeNames",
|
|
518
|
+
expected: "(Array<string> & MinItems<1>)",
|
|
519
|
+
value: input.typeNames
|
|
520
|
+
})) && ((1 <= input.typeNames.length || _report(_exceptionable, {
|
|
521
|
+
path: _path + ".typeNames",
|
|
522
|
+
expected: "Array<> & MinItems<1>",
|
|
523
|
+
value: input.typeNames
|
|
524
|
+
})) && input.typeNames.map((elem, _index9) => "string" === typeof elem || _report(_exceptionable, {
|
|
525
|
+
path: _path + ".typeNames[" + _index9 + "]",
|
|
526
|
+
expected: "string",
|
|
527
|
+
value: elem
|
|
528
|
+
})).every(flag => flag)) || _report(_exceptionable, {
|
|
529
|
+
path: _path + ".typeNames",
|
|
530
|
+
expected: "(Array<string> & MinItems<1>)",
|
|
531
|
+
value: input.typeNames
|
|
532
|
+
})].every(flag => flag); const _vo5 = (input, _path, _exceptionable = true) => ["getPrismaSchemas" === input.type || _report(_exceptionable, {
|
|
533
|
+
path: _path + ".type",
|
|
534
|
+
expected: "\"getPrismaSchemas\"",
|
|
535
|
+
value: input.type
|
|
536
|
+
}), (Array.isArray(input.schemaNames) || _report(_exceptionable, {
|
|
537
|
+
path: _path + ".schemaNames",
|
|
538
|
+
expected: "(Array<string> & MinItems<1>)",
|
|
539
|
+
value: input.schemaNames
|
|
540
|
+
})) && ((1 <= input.schemaNames.length || _report(_exceptionable, {
|
|
541
|
+
path: _path + ".schemaNames",
|
|
542
|
+
expected: "Array<> & MinItems<1>",
|
|
543
|
+
value: input.schemaNames
|
|
544
|
+
})) && input.schemaNames.map((elem, _index10) => "string" === typeof elem || _report(_exceptionable, {
|
|
545
|
+
path: _path + ".schemaNames[" + _index10 + "]",
|
|
546
|
+
expected: "string",
|
|
547
|
+
value: elem
|
|
548
|
+
})).every(flag => flag)) || _report(_exceptionable, {
|
|
549
|
+
path: _path + ".schemaNames",
|
|
550
|
+
expected: "(Array<string> & MinItems<1>)",
|
|
551
|
+
value: input.schemaNames
|
|
552
|
+
})].every(flag => flag); const _vo6 = (input, _path, _exceptionable = true) => ["complete" === input.type || _report(_exceptionable, {
|
|
553
|
+
path: _path + ".type",
|
|
554
|
+
expected: "\"complete\"",
|
|
555
|
+
value: input.type
|
|
556
|
+
}), (Array.isArray(input.operations) || _report(_exceptionable, {
|
|
557
|
+
path: _path + ".operations",
|
|
558
|
+
expected: "Array<IAutoBeInterfacePrerequisiteApplication.IOperation>",
|
|
559
|
+
value: input.operations
|
|
560
|
+
})) && input.operations.map((elem, _index11) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
561
|
+
path: _path + ".operations[" + _index11 + "]",
|
|
562
|
+
expected: "IAutoBeInterfacePrerequisiteApplication.IOperation",
|
|
563
|
+
value: elem
|
|
564
|
+
})) && _vo7(elem, _path + ".operations[" + _index11 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
565
|
+
path: _path + ".operations[" + _index11 + "]",
|
|
566
|
+
expected: "IAutoBeInterfacePrerequisiteApplication.IOperation",
|
|
567
|
+
value: elem
|
|
568
|
+
})).every(flag => flag) || _report(_exceptionable, {
|
|
569
|
+
path: _path + ".operations",
|
|
570
|
+
expected: "Array<IAutoBeInterfacePrerequisiteApplication.IOperation>",
|
|
571
|
+
value: input.operations
|
|
572
|
+
})].every(flag => flag); const _vo7 = (input, _path, _exceptionable = true) => [("object" === typeof input.endpoint && null !== input.endpoint || _report(_exceptionable, {
|
|
573
|
+
path: _path + ".endpoint",
|
|
574
|
+
expected: "AutoBeOpenApi.IEndpoint",
|
|
575
|
+
value: input.endpoint
|
|
576
|
+
})) && _vo3(input.endpoint, _path + ".endpoint", true && _exceptionable) || _report(_exceptionable, {
|
|
577
|
+
path: _path + ".endpoint",
|
|
578
|
+
expected: "AutoBeOpenApi.IEndpoint",
|
|
579
|
+
value: input.endpoint
|
|
580
|
+
}), (Array.isArray(input.prerequisites) || _report(_exceptionable, {
|
|
581
|
+
path: _path + ".prerequisites",
|
|
582
|
+
expected: "Array<AutoBeOpenApi.IPrerequisite>",
|
|
583
|
+
value: input.prerequisites
|
|
584
|
+
})) && input.prerequisites.map((elem, _index12) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
585
|
+
path: _path + ".prerequisites[" + _index12 + "]",
|
|
586
|
+
expected: "AutoBeOpenApi.IPrerequisite",
|
|
587
|
+
value: elem
|
|
588
|
+
})) && _vo8(elem, _path + ".prerequisites[" + _index12 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
589
|
+
path: _path + ".prerequisites[" + _index12 + "]",
|
|
590
|
+
expected: "AutoBeOpenApi.IPrerequisite",
|
|
591
|
+
value: elem
|
|
592
|
+
})).every(flag => flag) || _report(_exceptionable, {
|
|
593
|
+
path: _path + ".prerequisites",
|
|
594
|
+
expected: "Array<AutoBeOpenApi.IPrerequisite>",
|
|
595
|
+
value: input.prerequisites
|
|
596
|
+
})].every(flag => flag); const _vo8 = (input, _path, _exceptionable = true) => [("object" === typeof input.endpoint && null !== input.endpoint || _report(_exceptionable, {
|
|
597
|
+
path: _path + ".endpoint",
|
|
598
|
+
expected: "AutoBeOpenApi.IEndpoint",
|
|
599
|
+
value: input.endpoint
|
|
600
|
+
})) && _vo3(input.endpoint, _path + ".endpoint", true && _exceptionable) || _report(_exceptionable, {
|
|
601
|
+
path: _path + ".endpoint",
|
|
602
|
+
expected: "AutoBeOpenApi.IEndpoint",
|
|
603
|
+
value: input.endpoint
|
|
604
|
+
}), "string" === typeof input.description || _report(_exceptionable, {
|
|
605
|
+
path: _path + ".description",
|
|
606
|
+
expected: "string",
|
|
607
|
+
value: input.description
|
|
608
|
+
})].every(flag => flag); const _vu0 = (input, _path, _exceptionable = true) => (() => {
|
|
609
|
+
if ("getAnalysisFiles" === input.type)
|
|
610
|
+
return _vo1(input, _path, true && _exceptionable);
|
|
611
|
+
else if ("getInterfaceOperations" === input.type)
|
|
612
|
+
return _vo2(input, _path, true && _exceptionable);
|
|
613
|
+
else if ("getInterfaceSchemas" === input.type)
|
|
614
|
+
return _vo4(input, _path, true && _exceptionable);
|
|
615
|
+
else if ("getPrismaSchemas" === input.type)
|
|
616
|
+
return _vo5(input, _path, true && _exceptionable);
|
|
617
|
+
else if ("complete" === input.type)
|
|
618
|
+
return _vo6(input, _path, true && _exceptionable);
|
|
619
|
+
else
|
|
620
|
+
return _report(_exceptionable, {
|
|
621
|
+
path: _path,
|
|
622
|
+
expected: "(IAutoBePreliminaryGetAnalysisFiles | IAutoBePreliminaryGetInterfaceOperations | IAutoBePreliminaryGetInterfaceSchemas | IAutoBePreliminaryGetPrismaSchemas | IAutoBeInterfacePrerequisiteApplication.IComplete)",
|
|
623
|
+
value: input
|
|
624
|
+
});
|
|
625
|
+
})(); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
|
|
626
|
+
if (false === __is(input)) {
|
|
627
|
+
errors = [];
|
|
628
|
+
_report = __typia_transform__validateReport._validateReport(errors);
|
|
629
|
+
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
|
|
630
|
+
path: _path + "",
|
|
631
|
+
expected: "IAutoBeInterfacePrerequisiteApplication.IProps",
|
|
632
|
+
value: input
|
|
633
|
+
})) && _vo0(input, _path + "", true) || _report(true, {
|
|
634
|
+
path: _path + "",
|
|
635
|
+
expected: "IAutoBeInterfacePrerequisiteApplication.IProps",
|
|
636
|
+
value: input
|
|
637
|
+
}))(input, "$input", true);
|
|
638
|
+
const success = 0 === errors.length;
|
|
639
|
+
return success ? {
|
|
640
|
+
success,
|
|
641
|
+
data: input
|
|
642
|
+
} : {
|
|
643
|
+
success,
|
|
644
|
+
errors,
|
|
645
|
+
data: input
|
|
646
|
+
};
|
|
647
|
+
}
|
|
648
|
+
return {
|
|
649
|
+
success: true,
|
|
650
|
+
data: input
|
|
651
|
+
};
|
|
652
|
+
}; })()(next);
|
|
653
|
+
if (result.success === false)
|
|
654
|
+
return result;
|
|
655
|
+
else if (result.data.request.type !== "complete")
|
|
656
|
+
return props.preliminary.validate({
|
|
657
|
+
thinking: result.data.thinking,
|
|
658
|
+
request: result.data.request,
|
|
659
|
+
});
|
|
660
|
+
const operations = result.data.request.operations;
|
|
661
|
+
const filteredOperations = [];
|
|
662
|
+
const errors = [];
|
|
663
|
+
props.includes.forEach((el) => {
|
|
664
|
+
// Find the matched operation in the includes
|
|
665
|
+
const matched = operations.find((op) => op.endpoint.method === el.method && op.endpoint.path === el.path);
|
|
666
|
+
// Remove duplicate operations in Prerequisites
|
|
667
|
+
if (matched) {
|
|
668
|
+
const prerequisites = new Map();
|
|
669
|
+
matched.prerequisites.forEach((op) => {
|
|
670
|
+
if (prerequisites.get(op.endpoint.method + op.endpoint.path) !==
|
|
671
|
+
undefined) {
|
|
672
|
+
return;
|
|
673
|
+
}
|
|
674
|
+
prerequisites.set(op.endpoint.method + op.endpoint.path, op);
|
|
675
|
+
});
|
|
676
|
+
matched.prerequisites = Array.from(prerequisites.values());
|
|
677
|
+
filteredOperations.push(matched);
|
|
678
|
+
}
|
|
679
|
+
});
|
|
680
|
+
filteredOperations.forEach((op, i) => {
|
|
681
|
+
op.prerequisites.forEach((p, j) => {
|
|
682
|
+
if (props.dict.has(p.endpoint) === false) {
|
|
683
|
+
errors.push({
|
|
684
|
+
value: p.endpoint,
|
|
685
|
+
path: `$input.request.operations[${i}].prerequisites[${j}].endpoint`,
|
|
686
|
+
expected: "AutoBeOpenApi.IEndpoint",
|
|
687
|
+
description: props.prerequisitesNotFound,
|
|
688
|
+
});
|
|
689
|
+
}
|
|
690
|
+
if (p.endpoint.method === op.endpoint.method &&
|
|
691
|
+
p.endpoint.path === op.endpoint.path) {
|
|
692
|
+
errors.push({
|
|
693
|
+
value: p.endpoint,
|
|
694
|
+
path: `$input.request.operations[${i}].prerequisites[${j}].endpoint`,
|
|
695
|
+
expected: "AutoBeOpenApi.IEndpoint",
|
|
696
|
+
description: "Self-reference is not allowed.",
|
|
697
|
+
});
|
|
698
|
+
}
|
|
699
|
+
});
|
|
700
|
+
});
|
|
701
|
+
return errors.length === 0
|
|
702
|
+
? {
|
|
703
|
+
success: true,
|
|
704
|
+
data: Object.assign(Object.assign({}, result.data), { request: Object.assign(Object.assign({}, result.data.request), { operations: filteredOperations }) }),
|
|
705
|
+
}
|
|
706
|
+
: {
|
|
707
|
+
success: false,
|
|
708
|
+
data: Object.assign(Object.assign({}, result.data), { request: Object.assign(Object.assign({}, result.data.request), { operations: filteredOperations }) }),
|
|
709
|
+
errors,
|
|
710
|
+
};
|
|
711
|
+
};
|
|
712
|
+
const application = collection[props.model === "chatgpt"
|
|
713
|
+
? "chatgpt"
|
|
714
|
+
: props.model === "gemini"
|
|
715
|
+
? "gemini"
|
|
716
|
+
: "claude"](validate);
|
|
717
|
+
return {
|
|
718
|
+
protocol: "class",
|
|
719
|
+
name: SOURCE,
|
|
720
|
+
application,
|
|
721
|
+
execute: {
|
|
722
|
+
process: (next) => {
|
|
723
|
+
if (next.request.type === "complete")
|
|
724
|
+
props.build(next.request.operations);
|
|
725
|
+
},
|
|
726
|
+
},
|
|
727
|
+
};
|
|
728
|
+
}
|
|
729
|
+
const collection = {
|
|
730
|
+
chatgpt: (validate) => (() => {
|
|
731
|
+
const application = {
|
|
732
|
+
model: "chatgpt",
|
|
733
|
+
options: {
|
|
734
|
+
reference: true,
|
|
735
|
+
strict: false,
|
|
736
|
+
separate: null
|
|
737
|
+
},
|
|
738
|
+
functions: [
|
|
739
|
+
{
|
|
740
|
+
name: "process",
|
|
741
|
+
parameters: {
|
|
742
|
+
description: " Request containing either preliminary data request or complete\ntask\n\n------------------------------\n\nCurrent Type: {@link IAutoBeInterfacePrerequisiteApplication.IProps}",
|
|
743
|
+
type: "object",
|
|
744
|
+
properties: {
|
|
745
|
+
thinking: {
|
|
746
|
+
description: "Think before you act.\n\nBefore requesting preliminary data or completing your task, reflect on your\ncurrent state and explain your reasoning:\n\nFor preliminary requests (getAnalysisFiles, getPrismaSchemas, etc.):\n- What critical information is missing that you don't already have?\n- Why do you need it specifically right now?\n- Be brief - state the gap, don't list everything you have.\n\nFor completion (complete):\n- What key assets did you acquire?\n- What did you accomplish?\n- Why is it sufficient to complete?\n- Summarize - don't enumerate every single item.\n\nThis reflection helps you avoid duplicate requests and premature completion.",
|
|
747
|
+
type: "string"
|
|
748
|
+
},
|
|
749
|
+
request: {
|
|
750
|
+
description: "Type discriminator for the request.\n\nDetermines which action to perform: preliminary data retrieval\n(getAnalysisFiles, getPrismaSchemas, getInterfaceOperations,\ngetInterfaceSchemas) or final prerequisite analysis (complete). When\npreliminary returns empty array, that type is removed from the union,\nphysically preventing repeated calls.",
|
|
751
|
+
anyOf: [
|
|
752
|
+
{
|
|
753
|
+
$ref: "#/$defs/IAutoBePreliminaryGetAnalysisFiles"
|
|
754
|
+
},
|
|
755
|
+
{
|
|
756
|
+
$ref: "#/$defs/IAutoBePreliminaryGetInterfaceOperations"
|
|
757
|
+
},
|
|
758
|
+
{
|
|
759
|
+
$ref: "#/$defs/IAutoBePreliminaryGetInterfaceSchemas"
|
|
760
|
+
},
|
|
761
|
+
{
|
|
762
|
+
$ref: "#/$defs/IAutoBePreliminaryGetPrismaSchemas"
|
|
763
|
+
},
|
|
764
|
+
{
|
|
765
|
+
$ref: "#/$defs/IAutoBeInterfacePrerequisiteApplication.IComplete"
|
|
766
|
+
}
|
|
767
|
+
],
|
|
768
|
+
"x-discriminator": {
|
|
769
|
+
propertyName: "type",
|
|
770
|
+
mapping: {
|
|
771
|
+
getAnalysisFiles: "#/$defs/IAutoBePreliminaryGetAnalysisFiles",
|
|
772
|
+
getInterfaceOperations: "#/$defs/IAutoBePreliminaryGetInterfaceOperations",
|
|
773
|
+
getInterfaceSchemas: "#/$defs/IAutoBePreliminaryGetInterfaceSchemas",
|
|
774
|
+
getPrismaSchemas: "#/$defs/IAutoBePreliminaryGetPrismaSchemas",
|
|
775
|
+
complete: "#/$defs/IAutoBeInterfacePrerequisiteApplication.IComplete"
|
|
776
|
+
}
|
|
777
|
+
}
|
|
778
|
+
}
|
|
779
|
+
},
|
|
780
|
+
required: [
|
|
781
|
+
"thinking",
|
|
782
|
+
"request"
|
|
783
|
+
],
|
|
784
|
+
additionalProperties: false,
|
|
785
|
+
$defs: {
|
|
786
|
+
IAutoBePreliminaryGetAnalysisFiles: {
|
|
787
|
+
description: "Request to retrieve requirements analysis files for context.\n\nThis type is used in the preliminary phase to request specific analysis files\nthat provide business requirements and domain context.",
|
|
788
|
+
type: "object",
|
|
789
|
+
properties: {
|
|
790
|
+
type: {
|
|
791
|
+
description: "Type discriminator for the request.\n\nDetermines which action to perform: preliminary data retrieval or actual\ntask execution. Value \"getAnalysisFiles\" indicates this is a preliminary\ndata request for analysis files.",
|
|
792
|
+
type: "string",
|
|
793
|
+
"enum": [
|
|
794
|
+
"getAnalysisFiles"
|
|
795
|
+
]
|
|
796
|
+
},
|
|
797
|
+
fileNames: {
|
|
798
|
+
description: "List of analysis file names to retrieve.\n\nFile names from the analyze phase containing requirements, use cases, and\nbusiness logic documentation.\n\nCRITICAL: DO NOT request the same file names that you have already\nrequested in previous calls.\n\n\n@minItems 1",
|
|
799
|
+
type: "array",
|
|
800
|
+
items: {
|
|
801
|
+
type: "string"
|
|
802
|
+
}
|
|
803
|
+
}
|
|
804
|
+
},
|
|
805
|
+
required: [
|
|
806
|
+
"type",
|
|
807
|
+
"fileNames"
|
|
808
|
+
]
|
|
809
|
+
},
|
|
810
|
+
IAutoBePreliminaryGetInterfaceOperations: {
|
|
811
|
+
description: "Request to retrieve existing interface operations for context.\n\nThis type is used in the preliminary phase to request already-generated API\noperations for review, validation, or complementary generation tasks.",
|
|
812
|
+
type: "object",
|
|
813
|
+
properties: {
|
|
814
|
+
type: {
|
|
815
|
+
description: "Type discriminator for the request.\n\nDetermines which action to perform: preliminary data retrieval or actual\ntask execution. Value \"getInterfaceOperations\" indicates this is a\npreliminary data request for interface operations.",
|
|
816
|
+
type: "string",
|
|
817
|
+
"enum": [
|
|
818
|
+
"getInterfaceOperations"
|
|
819
|
+
]
|
|
820
|
+
},
|
|
821
|
+
endpoints: {
|
|
822
|
+
description: "List of existing API operation endpoints to retrieve.\n\nOperations that have been generated in previous phases, containing paths,\nmethods, parameters, and request/response bodies.\n\nCRITICAL: DO NOT request the same endpoints that you have already requested\nin previous calls.\n\n\n@minItems 1",
|
|
823
|
+
type: "array",
|
|
824
|
+
items: {
|
|
825
|
+
$ref: "#/$defs/AutoBeOpenApi.IEndpoint"
|
|
826
|
+
}
|
|
827
|
+
}
|
|
828
|
+
},
|
|
829
|
+
required: [
|
|
830
|
+
"type",
|
|
831
|
+
"endpoints"
|
|
832
|
+
]
|
|
833
|
+
},
|
|
834
|
+
"AutoBeOpenApi.IEndpoint": {
|
|
835
|
+
description: "API endpoint information.",
|
|
836
|
+
type: "object",
|
|
837
|
+
properties: {
|
|
838
|
+
path: {
|
|
839
|
+
description: "HTTP path of the API operation.\n\nThe URL path for accessing this API operation, using path parameters\nenclosed in curly braces (e.g., `/shoppings/customers/sales/{saleId}`).\n\nIt must be corresponded to the {@link parameters path parameters}.\n\nThe path structure should clearly indicate which database entity this\noperation is manipulating, helping to ensure all entities have\nappropriate API coverage.\n\nPath validation rules:\n\n- Must start with a forward slash (/)\n- Can contain only: letters (a-z, A-Z), numbers (0-9), forward slashes (/),\n curly braces for parameters ({paramName}), hyphens (-), and underscores\n (_)\n- Parameters must be enclosed in curly braces: {paramName}\n- Resource names should be in camelCase\n- No quotes, spaces, or invalid special characters allowed\n- No domain or role-based prefixes\n\nValid examples:\n\n- \"/users\"\n- \"/users/{userId}\"\n- \"/articles/{articleId}/comments\"\n- \"/attachmentFiles\"\n- \"/orders/{orderId}/items/{itemId}\"\n\nInvalid examples:\n\n- \"'/users'\" (contains quotes)\n- \"/user profile\" (contains space)\n- \"/users/[userId]\" (wrong bracket format)\n- \"/admin/users\" (role prefix)\n- \"/api/v1/users\" (API prefix)\n\n\n@pattern ^\\/[a-zA-Z0-9\\/_{}.-]*$",
|
|
840
|
+
type: "string"
|
|
841
|
+
},
|
|
842
|
+
method: {
|
|
843
|
+
description: "HTTP method of the API operation.\n\n**IMPORTANT**: Methods must be written in lowercase only (e.g., \"get\",\nnot \"GET\").\n\nNote that, if the API operation has {@link requestBody}, method must not\nbe `get`.\n\nAlso, even though the API operation has been designed to only get\ninformation, but it needs complicated request information, it must be\ndefined as `patch` method with {@link requestBody} data specification.\n\n- `get`: get information\n- `patch`: get information with complicated request data\n ({@link requestBody})\n- `post`: create new record\n- `put`: update existing record\n- `delete`: remove record",
|
|
844
|
+
type: "string",
|
|
845
|
+
"enum": [
|
|
846
|
+
"get",
|
|
847
|
+
"post",
|
|
848
|
+
"put",
|
|
849
|
+
"delete",
|
|
850
|
+
"patch"
|
|
851
|
+
]
|
|
852
|
+
}
|
|
853
|
+
},
|
|
854
|
+
required: [
|
|
855
|
+
"path",
|
|
856
|
+
"method"
|
|
857
|
+
]
|
|
858
|
+
},
|
|
859
|
+
IAutoBePreliminaryGetInterfaceSchemas: {
|
|
860
|
+
description: "Request to retrieve OpenAPI schema type definitions for context.\n\nThis type is used in the preliminary phase to request specific schema\ndefinitions from components.schemas for review or complementary generation.",
|
|
861
|
+
type: "object",
|
|
862
|
+
properties: {
|
|
863
|
+
type: {
|
|
864
|
+
description: "Type discriminator for the request.\n\nDetermines which action to perform: preliminary data retrieval or actual\ntask execution. Value \"getInterfaceSchemas\" indicates this is a preliminary\ndata request for interface schemas.",
|
|
865
|
+
type: "string",
|
|
866
|
+
"enum": [
|
|
867
|
+
"getInterfaceSchemas"
|
|
868
|
+
]
|
|
869
|
+
},
|
|
870
|
+
typeNames: {
|
|
871
|
+
description: "List of schema type names to retrieve.\n\nSchema names from the OpenAPI components.schemas section (e.g., \"IUser\",\n\"IUser.ICreate\", \"IPost.IUpdate\").\n\nCRITICAL: DO NOT request the same type names that you have already\nrequested in previous calls.\n\n\n@minItems 1",
|
|
872
|
+
type: "array",
|
|
873
|
+
items: {
|
|
874
|
+
type: "string"
|
|
875
|
+
}
|
|
876
|
+
}
|
|
877
|
+
},
|
|
878
|
+
required: [
|
|
879
|
+
"type",
|
|
880
|
+
"typeNames"
|
|
881
|
+
]
|
|
882
|
+
},
|
|
883
|
+
IAutoBePreliminaryGetPrismaSchemas: {
|
|
884
|
+
description: "Request to retrieve Prisma database schema definitions for context.\n\nThis type is used in the preliminary phase to request specific Prisma table\nschemas needed for generating type-safe API operations.",
|
|
885
|
+
type: "object",
|
|
886
|
+
properties: {
|
|
887
|
+
type: {
|
|
888
|
+
description: "Type discriminator for the request.\n\nDetermines which action to perform: preliminary data retrieval or actual\ntask execution. Value \"getPrismaSchemas\" indicates this is a preliminary\ndata request for Prisma schemas.",
|
|
889
|
+
type: "string",
|
|
890
|
+
"enum": [
|
|
891
|
+
"getPrismaSchemas"
|
|
892
|
+
]
|
|
893
|
+
},
|
|
894
|
+
schemaNames: {
|
|
895
|
+
description: "List of Prisma table names to retrieve.\n\nTable names from the Prisma schema file representing database entities\n(e.g., \"user\", \"post\", \"comment\").\n\nCRITICAL: DO NOT request the same schema names that you have already\nrequested in previous calls.\n\n\n@minItems 1",
|
|
896
|
+
type: "array",
|
|
897
|
+
items: {
|
|
898
|
+
type: "string"
|
|
899
|
+
}
|
|
900
|
+
}
|
|
901
|
+
},
|
|
902
|
+
required: [
|
|
903
|
+
"type",
|
|
904
|
+
"schemaNames"
|
|
905
|
+
]
|
|
906
|
+
},
|
|
907
|
+
"IAutoBeInterfacePrerequisiteApplication.IComplete": {
|
|
908
|
+
description: "Request to analyze and generate API operation prerequisites.\n\nExecutes prerequisite analysis to determine which Available API Operations\nmust be executed before each Target Operation based on resource creation\ndependencies and existence validations.",
|
|
909
|
+
type: "object",
|
|
910
|
+
properties: {
|
|
911
|
+
type: {
|
|
912
|
+
description: "Type discriminator for the request.\n\nDetermines which action to perform: preliminary data retrieval or actual\ntask execution. Value \"complete\" indicates this is the final task\nexecution request.",
|
|
913
|
+
type: "string",
|
|
914
|
+
"enum": [
|
|
915
|
+
"complete"
|
|
916
|
+
]
|
|
917
|
+
},
|
|
918
|
+
operations: {
|
|
919
|
+
description: "Target operations requiring prerequisite analysis.\n\nEach operation will be analyzed for dependency requirements and returned\nwith appropriate prerequisites from Available API Operations.",
|
|
920
|
+
type: "array",
|
|
921
|
+
items: {
|
|
922
|
+
$ref: "#/$defs/IAutoBeInterfacePrerequisiteApplication.IOperation"
|
|
923
|
+
}
|
|
924
|
+
}
|
|
925
|
+
},
|
|
926
|
+
required: [
|
|
927
|
+
"type",
|
|
928
|
+
"operations"
|
|
929
|
+
]
|
|
930
|
+
},
|
|
931
|
+
"IAutoBeInterfacePrerequisiteApplication.IOperation": {
|
|
932
|
+
description: "Operation with its analyzed prerequisite dependencies.\n\nRepresents a single API operation and its complete prerequisite chain\nneeded for successful execution.",
|
|
933
|
+
type: "object",
|
|
934
|
+
properties: {
|
|
935
|
+
endpoint: {
|
|
936
|
+
description: "The API endpoint being analyzed.\n\nIdentifies the specific operation (method + path) that needs\nprerequisites.",
|
|
937
|
+
$ref: "#/$defs/AutoBeOpenApi.IEndpoint"
|
|
938
|
+
},
|
|
939
|
+
prerequisites: {
|
|
940
|
+
description: "Required prerequisite operations.\n\nList of API operations that must be successfully executed before this\noperation can be performed. Based on resource creation dependencies and\nexistence validations from the analysis.",
|
|
941
|
+
type: "array",
|
|
942
|
+
items: {
|
|
943
|
+
$ref: "#/$defs/AutoBeOpenApi.IPrerequisite"
|
|
944
|
+
}
|
|
945
|
+
}
|
|
946
|
+
},
|
|
947
|
+
required: [
|
|
948
|
+
"endpoint",
|
|
949
|
+
"prerequisites"
|
|
950
|
+
]
|
|
951
|
+
},
|
|
952
|
+
"AutoBeOpenApi.IPrerequisite": {
|
|
953
|
+
description: "Prerequisite API operation dependency.\n\n`IPrerequisite` defines a dependency relationship between API operations,\nspecifying that certain endpoints must be successfully called before the\ncurrent operation can proceed. This ensures proper resource validation,\nstate checking, and data availability in complex API workflows.\n\n## CRITICAL WARNING: Authentication is NOT a Prerequisite\n\n**NEVER use prerequisites for authentication or authorization checks!**\n\nPrerequisites are ONLY for business logic dependencies such as:\n\n- Checking if a resource exists\n- Verifying resource state\n- Loading required data\n\nDo NOT create prerequisites for:\n\n- Login/authentication endpoints\n- Token validation\n- Permission checks\n- User authorization verification\n\nAuthentication is handled separately via the `authorizationActor` field on\nthe operation itself. Mixing authentication with business prerequisites\ncreates confusion and incorrect test scenarios.\n\n## Core Concept\n\nPrerequisites create an execution dependency graph for API operations. They\nexplicitly declare which APIs must succeed before attempting the current\noperation, preventing invalid states and ensuring data consistency.\n\n## Structure\n\nEach prerequisite consists of:\n\n1. **endpoint**: The API endpoint that must be called first\n2. **description**: Clear explanation of why this prerequisite is required\n\n## Common Use Cases\n\n### 1. Resource Existence Validation\n\n```typescript\n{\n \"endpoint\": { \"path\": \"/users/{userId}\", \"method\": \"get\" },\n \"description\": \"User must exist before updating their profile\"\n}\n```\n\n### 2. Parent-Child Relationships\n\n```typescript\n{\n \"endpoint\": { \"path\": \"/posts/{postId}\", \"method\": \"get\" },\n \"description\": \"Post must exist before adding comments\"\n}\n```\n\n### 3. State Prerequisites\n\n```typescript\n{\n \"endpoint\": { \"path\": \"/orders/{orderId}/status\", \"method\": \"get\" },\n \"description\": \"Order must be in 'confirmed' state before shipping\"\n}\n```\n\n### 4. Business Logic Dependencies\n\n```typescript\n{\n \"endpoint\": {\n \"path\": \"/inventory/{productId}/stock\",\n \"method\": \"get\"\n },\n \"description\": \"Product must have sufficient stock before creating order\"\n}\n```\n\n## Implementation Guidelines\n\n1. **Clear Descriptions**: Always explain WHY the prerequisite is needed\n2. **Minimal Dependencies**: Only include truly necessary prerequisites\n3. **Logical Order**: If multiple prerequisites exist, order them logically\n4. **Error Context**: Description should help understand failure scenarios\n5. **No Authentication**: Prerequisites must NEVER be authentication checks\n\n## Test Generation Usage\n\nThe Test Agent utilizes prerequisites to:\n\n- Set up test data in the correct sequence\n- Generate realistic test scenarios\n- Create both positive and negative test cases\n- Ensure proper cleanup in reverse dependency order\n\n## Best Practices\n\n- Keep prerequisite chains as short as possible for performance\n- Consider caching prerequisite results when safe to do so\n- Ensure prerequisite descriptions are specific, not generic\n- Validate that circular dependencies don't exist\n- Document any side effects of prerequisite calls\n- NEVER use for authentication/authorization validation",
|
|
954
|
+
type: "object",
|
|
955
|
+
properties: {
|
|
956
|
+
endpoint: {
|
|
957
|
+
description: "The API endpoint that must be called before the main operation.\n\nThis specifies the exact HTTP method and path of the prerequisite API.\nThe endpoint must be a valid operation defined elsewhere in the API\nspecification. Path parameters in the prerequisite endpoint can reference\nthe same parameters available in the main operation.",
|
|
958
|
+
$ref: "#/$defs/AutoBeOpenApi.IEndpoint"
|
|
959
|
+
},
|
|
960
|
+
description: {
|
|
961
|
+
description: "Clear description of why this prerequisite is required.\n\nThis description should explain:\n\n- What validation or check this prerequisite performs\n- What state or condition must be satisfied\n- What happens if this prerequisite fails\n- Any specific data from the prerequisite used by the main operation\n\nThe description helps developers understand the dependency relationship\nand aids in debugging when prerequisites fail.\n\nGuidelines for good descriptions:\n\n- Be specific about the requirement (e.g., \"must be in 'active' state\")\n- Explain business logic constraints (e.g., \"budget must not be exceeded\")\n- Explain data dependencies (e.g., \"provides pricing information needed\")\n- Keep it concise but complete\n\n> MUST be written in English. Never use other languages.",
|
|
962
|
+
type: "string"
|
|
963
|
+
}
|
|
964
|
+
},
|
|
965
|
+
required: [
|
|
966
|
+
"endpoint",
|
|
967
|
+
"description"
|
|
968
|
+
]
|
|
969
|
+
}
|
|
970
|
+
}
|
|
971
|
+
},
|
|
972
|
+
description: "Process prerequisite analysis task or preliminary data requests.\n\nAnalyzes each operation's dependencies and returns complete list with\nrequired prerequisite chains based on resource relationships.",
|
|
973
|
+
validate: (() => { const _io0 = input => "string" === typeof input.thinking && ("object" === typeof input.request && null !== input.request && _iu0(input.request)); const _io1 = input => "getAnalysisFiles" === input.type && (Array.isArray(input.fileNames) && (1 <= input.fileNames.length && input.fileNames.every(elem => "string" === typeof elem))); const _io2 = input => "getInterfaceOperations" === input.type && (Array.isArray(input.endpoints) && (1 <= input.endpoints.length && input.endpoints.every(elem => "object" === typeof elem && null !== elem && _io3(elem)))); const _io3 = input => "string" === typeof input.path && RegExp("^\\/[a-zA-Z0-9\\/_{}.-]*$").test(input.path) && ("get" === input.method || "post" === input.method || "put" === input.method || "delete" === input.method || "patch" === input.method); const _io4 = input => "getInterfaceSchemas" === input.type && (Array.isArray(input.typeNames) && (1 <= input.typeNames.length && input.typeNames.every(elem => "string" === typeof elem))); const _io5 = input => "getPrismaSchemas" === input.type && (Array.isArray(input.schemaNames) && (1 <= input.schemaNames.length && input.schemaNames.every(elem => "string" === typeof elem))); const _io6 = input => "complete" === input.type && (Array.isArray(input.operations) && input.operations.every(elem => "object" === typeof elem && null !== elem && _io7(elem))); const _io7 = input => "object" === typeof input.endpoint && null !== input.endpoint && _io3(input.endpoint) && (Array.isArray(input.prerequisites) && input.prerequisites.every(elem => "object" === typeof elem && null !== elem && _io8(elem))); const _io8 = input => "object" === typeof input.endpoint && null !== input.endpoint && _io3(input.endpoint) && "string" === typeof input.description; const _iu0 = input => (() => {
|
|
974
|
+
if ("getAnalysisFiles" === input.type)
|
|
975
|
+
return _io1(input);
|
|
976
|
+
else if ("getInterfaceOperations" === input.type)
|
|
977
|
+
return _io2(input);
|
|
978
|
+
else if ("getInterfaceSchemas" === input.type)
|
|
979
|
+
return _io4(input);
|
|
980
|
+
else if ("getPrismaSchemas" === input.type)
|
|
981
|
+
return _io5(input);
|
|
982
|
+
else if ("complete" === input.type)
|
|
983
|
+
return _io6(input);
|
|
984
|
+
else
|
|
985
|
+
return false;
|
|
986
|
+
})(); const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.thinking || _report(_exceptionable, {
|
|
987
|
+
path: _path + ".thinking",
|
|
988
|
+
expected: "string",
|
|
989
|
+
value: input.thinking
|
|
990
|
+
}), ("object" === typeof input.request && null !== input.request || _report(_exceptionable, {
|
|
991
|
+
path: _path + ".request",
|
|
992
|
+
expected: "(IAutoBeInterfacePrerequisiteApplication.IComplete | IAutoBePreliminaryGetAnalysisFiles | IAutoBePreliminaryGetInterfaceOperations | IAutoBePreliminaryGetInterfaceSchemas | IAutoBePreliminaryGetPrismaSchemas)",
|
|
993
|
+
value: input.request
|
|
994
|
+
})) && _vu0(input.request, _path + ".request", true && _exceptionable) || _report(_exceptionable, {
|
|
995
|
+
path: _path + ".request",
|
|
996
|
+
expected: "(IAutoBeInterfacePrerequisiteApplication.IComplete | IAutoBePreliminaryGetAnalysisFiles | IAutoBePreliminaryGetInterfaceOperations | IAutoBePreliminaryGetInterfaceSchemas | IAutoBePreliminaryGetPrismaSchemas)",
|
|
997
|
+
value: input.request
|
|
998
|
+
})].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => ["getAnalysisFiles" === input.type || _report(_exceptionable, {
|
|
999
|
+
path: _path + ".type",
|
|
1000
|
+
expected: "\"getAnalysisFiles\"",
|
|
1001
|
+
value: input.type
|
|
1002
|
+
}), (Array.isArray(input.fileNames) || _report(_exceptionable, {
|
|
1003
|
+
path: _path + ".fileNames",
|
|
1004
|
+
expected: "(Array<string> & MinItems<1>)",
|
|
1005
|
+
value: input.fileNames
|
|
1006
|
+
})) && ((1 <= input.fileNames.length || _report(_exceptionable, {
|
|
1007
|
+
path: _path + ".fileNames",
|
|
1008
|
+
expected: "Array<> & MinItems<1>",
|
|
1009
|
+
value: input.fileNames
|
|
1010
|
+
})) && input.fileNames.map((elem, _index7) => "string" === typeof elem || _report(_exceptionable, {
|
|
1011
|
+
path: _path + ".fileNames[" + _index7 + "]",
|
|
1012
|
+
expected: "string",
|
|
1013
|
+
value: elem
|
|
1014
|
+
})).every(flag => flag)) || _report(_exceptionable, {
|
|
1015
|
+
path: _path + ".fileNames",
|
|
1016
|
+
expected: "(Array<string> & MinItems<1>)",
|
|
1017
|
+
value: input.fileNames
|
|
1018
|
+
})].every(flag => flag); const _vo2 = (input, _path, _exceptionable = true) => ["getInterfaceOperations" === input.type || _report(_exceptionable, {
|
|
1019
|
+
path: _path + ".type",
|
|
1020
|
+
expected: "\"getInterfaceOperations\"",
|
|
1021
|
+
value: input.type
|
|
1022
|
+
}), (Array.isArray(input.endpoints) || _report(_exceptionable, {
|
|
1023
|
+
path: _path + ".endpoints",
|
|
1024
|
+
expected: "(Array<AutoBeOpenApi.IEndpoint> & MinItems<1>)",
|
|
1025
|
+
value: input.endpoints
|
|
1026
|
+
})) && ((1 <= input.endpoints.length || _report(_exceptionable, {
|
|
1027
|
+
path: _path + ".endpoints",
|
|
1028
|
+
expected: "Array<> & MinItems<1>",
|
|
1029
|
+
value: input.endpoints
|
|
1030
|
+
})) && input.endpoints.map((elem, _index8) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
1031
|
+
path: _path + ".endpoints[" + _index8 + "]",
|
|
1032
|
+
expected: "AutoBeOpenApi.IEndpoint",
|
|
1033
|
+
value: elem
|
|
1034
|
+
})) && _vo3(elem, _path + ".endpoints[" + _index8 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
1035
|
+
path: _path + ".endpoints[" + _index8 + "]",
|
|
1036
|
+
expected: "AutoBeOpenApi.IEndpoint",
|
|
1037
|
+
value: elem
|
|
1038
|
+
})).every(flag => flag)) || _report(_exceptionable, {
|
|
1039
|
+
path: _path + ".endpoints",
|
|
1040
|
+
expected: "(Array<AutoBeOpenApi.IEndpoint> & MinItems<1>)",
|
|
1041
|
+
value: input.endpoints
|
|
1042
|
+
})].every(flag => flag); const _vo3 = (input, _path, _exceptionable = true) => ["string" === typeof input.path && (RegExp("^\\/[a-zA-Z0-9\\/_{}.-]*$").test(input.path) || _report(_exceptionable, {
|
|
1043
|
+
path: _path + ".path",
|
|
1044
|
+
expected: "string & Pattern<\"^\\\\/[a-zA-Z0-9\\\\/_{}.-]*$\">",
|
|
1045
|
+
value: input.path
|
|
1046
|
+
})) || _report(_exceptionable, {
|
|
1047
|
+
path: _path + ".path",
|
|
1048
|
+
expected: "(string & Pattern<\"^\\\\/[a-zA-Z0-9\\\\/_{}.-]*$\">)",
|
|
1049
|
+
value: input.path
|
|
1050
|
+
}), "get" === input.method || "post" === input.method || "put" === input.method || "delete" === input.method || "patch" === input.method || _report(_exceptionable, {
|
|
1051
|
+
path: _path + ".method",
|
|
1052
|
+
expected: "(\"delete\" | \"get\" | \"patch\" | \"post\" | \"put\")",
|
|
1053
|
+
value: input.method
|
|
1054
|
+
})].every(flag => flag); const _vo4 = (input, _path, _exceptionable = true) => ["getInterfaceSchemas" === input.type || _report(_exceptionable, {
|
|
1055
|
+
path: _path + ".type",
|
|
1056
|
+
expected: "\"getInterfaceSchemas\"",
|
|
1057
|
+
value: input.type
|
|
1058
|
+
}), (Array.isArray(input.typeNames) || _report(_exceptionable, {
|
|
1059
|
+
path: _path + ".typeNames",
|
|
1060
|
+
expected: "(Array<string> & MinItems<1>)",
|
|
1061
|
+
value: input.typeNames
|
|
1062
|
+
})) && ((1 <= input.typeNames.length || _report(_exceptionable, {
|
|
1063
|
+
path: _path + ".typeNames",
|
|
1064
|
+
expected: "Array<> & MinItems<1>",
|
|
1065
|
+
value: input.typeNames
|
|
1066
|
+
})) && input.typeNames.map((elem, _index9) => "string" === typeof elem || _report(_exceptionable, {
|
|
1067
|
+
path: _path + ".typeNames[" + _index9 + "]",
|
|
1068
|
+
expected: "string",
|
|
1069
|
+
value: elem
|
|
1070
|
+
})).every(flag => flag)) || _report(_exceptionable, {
|
|
1071
|
+
path: _path + ".typeNames",
|
|
1072
|
+
expected: "(Array<string> & MinItems<1>)",
|
|
1073
|
+
value: input.typeNames
|
|
1074
|
+
})].every(flag => flag); const _vo5 = (input, _path, _exceptionable = true) => ["getPrismaSchemas" === input.type || _report(_exceptionable, {
|
|
1075
|
+
path: _path + ".type",
|
|
1076
|
+
expected: "\"getPrismaSchemas\"",
|
|
1077
|
+
value: input.type
|
|
1078
|
+
}), (Array.isArray(input.schemaNames) || _report(_exceptionable, {
|
|
1079
|
+
path: _path + ".schemaNames",
|
|
1080
|
+
expected: "(Array<string> & MinItems<1>)",
|
|
1081
|
+
value: input.schemaNames
|
|
1082
|
+
})) && ((1 <= input.schemaNames.length || _report(_exceptionable, {
|
|
1083
|
+
path: _path + ".schemaNames",
|
|
1084
|
+
expected: "Array<> & MinItems<1>",
|
|
1085
|
+
value: input.schemaNames
|
|
1086
|
+
})) && input.schemaNames.map((elem, _index10) => "string" === typeof elem || _report(_exceptionable, {
|
|
1087
|
+
path: _path + ".schemaNames[" + _index10 + "]",
|
|
1088
|
+
expected: "string",
|
|
1089
|
+
value: elem
|
|
1090
|
+
})).every(flag => flag)) || _report(_exceptionable, {
|
|
1091
|
+
path: _path + ".schemaNames",
|
|
1092
|
+
expected: "(Array<string> & MinItems<1>)",
|
|
1093
|
+
value: input.schemaNames
|
|
1094
|
+
})].every(flag => flag); const _vo6 = (input, _path, _exceptionable = true) => ["complete" === input.type || _report(_exceptionable, {
|
|
1095
|
+
path: _path + ".type",
|
|
1096
|
+
expected: "\"complete\"",
|
|
1097
|
+
value: input.type
|
|
1098
|
+
}), (Array.isArray(input.operations) || _report(_exceptionable, {
|
|
1099
|
+
path: _path + ".operations",
|
|
1100
|
+
expected: "Array<IAutoBeInterfacePrerequisiteApplication.IOperation>",
|
|
1101
|
+
value: input.operations
|
|
1102
|
+
})) && input.operations.map((elem, _index11) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
1103
|
+
path: _path + ".operations[" + _index11 + "]",
|
|
1104
|
+
expected: "IAutoBeInterfacePrerequisiteApplication.IOperation",
|
|
1105
|
+
value: elem
|
|
1106
|
+
})) && _vo7(elem, _path + ".operations[" + _index11 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
1107
|
+
path: _path + ".operations[" + _index11 + "]",
|
|
1108
|
+
expected: "IAutoBeInterfacePrerequisiteApplication.IOperation",
|
|
1109
|
+
value: elem
|
|
1110
|
+
})).every(flag => flag) || _report(_exceptionable, {
|
|
1111
|
+
path: _path + ".operations",
|
|
1112
|
+
expected: "Array<IAutoBeInterfacePrerequisiteApplication.IOperation>",
|
|
1113
|
+
value: input.operations
|
|
1114
|
+
})].every(flag => flag); const _vo7 = (input, _path, _exceptionable = true) => [("object" === typeof input.endpoint && null !== input.endpoint || _report(_exceptionable, {
|
|
1115
|
+
path: _path + ".endpoint",
|
|
1116
|
+
expected: "AutoBeOpenApi.IEndpoint",
|
|
1117
|
+
value: input.endpoint
|
|
1118
|
+
})) && _vo3(input.endpoint, _path + ".endpoint", true && _exceptionable) || _report(_exceptionable, {
|
|
1119
|
+
path: _path + ".endpoint",
|
|
1120
|
+
expected: "AutoBeOpenApi.IEndpoint",
|
|
1121
|
+
value: input.endpoint
|
|
1122
|
+
}), (Array.isArray(input.prerequisites) || _report(_exceptionable, {
|
|
1123
|
+
path: _path + ".prerequisites",
|
|
1124
|
+
expected: "Array<AutoBeOpenApi.IPrerequisite>",
|
|
1125
|
+
value: input.prerequisites
|
|
1126
|
+
})) && input.prerequisites.map((elem, _index12) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
1127
|
+
path: _path + ".prerequisites[" + _index12 + "]",
|
|
1128
|
+
expected: "AutoBeOpenApi.IPrerequisite",
|
|
1129
|
+
value: elem
|
|
1130
|
+
})) && _vo8(elem, _path + ".prerequisites[" + _index12 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
1131
|
+
path: _path + ".prerequisites[" + _index12 + "]",
|
|
1132
|
+
expected: "AutoBeOpenApi.IPrerequisite",
|
|
1133
|
+
value: elem
|
|
1134
|
+
})).every(flag => flag) || _report(_exceptionable, {
|
|
1135
|
+
path: _path + ".prerequisites",
|
|
1136
|
+
expected: "Array<AutoBeOpenApi.IPrerequisite>",
|
|
1137
|
+
value: input.prerequisites
|
|
1138
|
+
})].every(flag => flag); const _vo8 = (input, _path, _exceptionable = true) => [("object" === typeof input.endpoint && null !== input.endpoint || _report(_exceptionable, {
|
|
1139
|
+
path: _path + ".endpoint",
|
|
1140
|
+
expected: "AutoBeOpenApi.IEndpoint",
|
|
1141
|
+
value: input.endpoint
|
|
1142
|
+
})) && _vo3(input.endpoint, _path + ".endpoint", true && _exceptionable) || _report(_exceptionable, {
|
|
1143
|
+
path: _path + ".endpoint",
|
|
1144
|
+
expected: "AutoBeOpenApi.IEndpoint",
|
|
1145
|
+
value: input.endpoint
|
|
1146
|
+
}), "string" === typeof input.description || _report(_exceptionable, {
|
|
1147
|
+
path: _path + ".description",
|
|
1148
|
+
expected: "string",
|
|
1149
|
+
value: input.description
|
|
1150
|
+
})].every(flag => flag); const _vu0 = (input, _path, _exceptionable = true) => (() => {
|
|
1151
|
+
if ("getAnalysisFiles" === input.type)
|
|
1152
|
+
return _vo1(input, _path, true && _exceptionable);
|
|
1153
|
+
else if ("getInterfaceOperations" === input.type)
|
|
1154
|
+
return _vo2(input, _path, true && _exceptionable);
|
|
1155
|
+
else if ("getInterfaceSchemas" === input.type)
|
|
1156
|
+
return _vo4(input, _path, true && _exceptionable);
|
|
1157
|
+
else if ("getPrismaSchemas" === input.type)
|
|
1158
|
+
return _vo5(input, _path, true && _exceptionable);
|
|
1159
|
+
else if ("complete" === input.type)
|
|
1160
|
+
return _vo6(input, _path, true && _exceptionable);
|
|
1161
|
+
else
|
|
1162
|
+
return _report(_exceptionable, {
|
|
1163
|
+
path: _path,
|
|
1164
|
+
expected: "(IAutoBePreliminaryGetAnalysisFiles | IAutoBePreliminaryGetInterfaceOperations | IAutoBePreliminaryGetInterfaceSchemas | IAutoBePreliminaryGetPrismaSchemas | IAutoBeInterfacePrerequisiteApplication.IComplete)",
|
|
1165
|
+
value: input
|
|
1166
|
+
});
|
|
1167
|
+
})(); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
|
|
1168
|
+
if (false === __is(input)) {
|
|
1169
|
+
errors = [];
|
|
1170
|
+
_report = __typia_transform__validateReport._validateReport(errors);
|
|
1171
|
+
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
|
|
1172
|
+
path: _path + "",
|
|
1173
|
+
expected: "IAutoBeInterfacePrerequisiteApplication.IProps",
|
|
1174
|
+
value: input
|
|
1175
|
+
})) && _vo0(input, _path + "", true) || _report(true, {
|
|
1176
|
+
path: _path + "",
|
|
1177
|
+
expected: "IAutoBeInterfacePrerequisiteApplication.IProps",
|
|
1178
|
+
value: input
|
|
1179
|
+
}))(input, "$input", true);
|
|
1180
|
+
const success = 0 === errors.length;
|
|
1181
|
+
return success ? {
|
|
1182
|
+
success,
|
|
1183
|
+
data: input
|
|
1184
|
+
} : {
|
|
1185
|
+
success,
|
|
1186
|
+
errors,
|
|
1187
|
+
data: input
|
|
1188
|
+
};
|
|
1189
|
+
}
|
|
1190
|
+
return {
|
|
1191
|
+
success: true,
|
|
1192
|
+
data: input
|
|
1193
|
+
};
|
|
1194
|
+
}; })()
|
|
1195
|
+
}
|
|
1196
|
+
]
|
|
1197
|
+
};
|
|
1198
|
+
__typia_transform__llmApplicationFinalize._llmApplicationFinalize(application, Object.assign(Object.assign({}, {
|
|
1199
|
+
validate: {
|
|
1200
|
+
process: validate,
|
|
1201
|
+
},
|
|
1202
|
+
}), { equals: false }));
|
|
1203
|
+
return application;
|
|
1204
|
+
})(),
|
|
1205
|
+
claude: (validate) => (() => {
|
|
1206
|
+
const application = {
|
|
1207
|
+
model: "claude",
|
|
1208
|
+
options: {
|
|
1209
|
+
reference: true,
|
|
1210
|
+
separate: null
|
|
1211
|
+
},
|
|
1212
|
+
functions: [
|
|
1213
|
+
{
|
|
1214
|
+
name: "process",
|
|
1215
|
+
parameters: {
|
|
1216
|
+
description: " Request containing either preliminary data request or complete\ntask\n\n------------------------------\n\nCurrent Type: {@link IAutoBeInterfacePrerequisiteApplication.IProps}",
|
|
1217
|
+
type: "object",
|
|
1218
|
+
properties: {
|
|
1219
|
+
thinking: {
|
|
1220
|
+
description: "Think before you act.\n\nBefore requesting preliminary data or completing your task, reflect on your\ncurrent state and explain your reasoning:\n\nFor preliminary requests (getAnalysisFiles, getPrismaSchemas, etc.):\n- What critical information is missing that you don't already have?\n- Why do you need it specifically right now?\n- Be brief - state the gap, don't list everything you have.\n\nFor completion (complete):\n- What key assets did you acquire?\n- What did you accomplish?\n- Why is it sufficient to complete?\n- Summarize - don't enumerate every single item.\n\nThis reflection helps you avoid duplicate requests and premature completion.",
|
|
1221
|
+
type: "string"
|
|
1222
|
+
},
|
|
1223
|
+
request: {
|
|
1224
|
+
description: "Type discriminator for the request.\n\nDetermines which action to perform: preliminary data retrieval\n(getAnalysisFiles, getPrismaSchemas, getInterfaceOperations,\ngetInterfaceSchemas) or final prerequisite analysis (complete). When\npreliminary returns empty array, that type is removed from the union,\nphysically preventing repeated calls.",
|
|
1225
|
+
oneOf: [
|
|
1226
|
+
{
|
|
1227
|
+
$ref: "#/$defs/IAutoBePreliminaryGetAnalysisFiles"
|
|
1228
|
+
},
|
|
1229
|
+
{
|
|
1230
|
+
$ref: "#/$defs/IAutoBePreliminaryGetInterfaceOperations"
|
|
1231
|
+
},
|
|
1232
|
+
{
|
|
1233
|
+
$ref: "#/$defs/IAutoBePreliminaryGetInterfaceSchemas"
|
|
1234
|
+
},
|
|
1235
|
+
{
|
|
1236
|
+
$ref: "#/$defs/IAutoBePreliminaryGetPrismaSchemas"
|
|
1237
|
+
},
|
|
1238
|
+
{
|
|
1239
|
+
$ref: "#/$defs/IAutoBeInterfacePrerequisiteApplication.IComplete"
|
|
1240
|
+
}
|
|
1241
|
+
],
|
|
1242
|
+
discriminator: {
|
|
1243
|
+
propertyName: "type",
|
|
1244
|
+
mapping: {
|
|
1245
|
+
getAnalysisFiles: "#/$defs/IAutoBePreliminaryGetAnalysisFiles",
|
|
1246
|
+
getInterfaceOperations: "#/$defs/IAutoBePreliminaryGetInterfaceOperations",
|
|
1247
|
+
getInterfaceSchemas: "#/$defs/IAutoBePreliminaryGetInterfaceSchemas",
|
|
1248
|
+
getPrismaSchemas: "#/$defs/IAutoBePreliminaryGetPrismaSchemas",
|
|
1249
|
+
complete: "#/$defs/IAutoBeInterfacePrerequisiteApplication.IComplete"
|
|
1250
|
+
}
|
|
1251
|
+
}
|
|
1252
|
+
}
|
|
1253
|
+
},
|
|
1254
|
+
required: [
|
|
1255
|
+
"thinking",
|
|
1256
|
+
"request"
|
|
1257
|
+
],
|
|
1258
|
+
additionalProperties: false,
|
|
1259
|
+
$defs: {
|
|
1260
|
+
IAutoBePreliminaryGetAnalysisFiles: {
|
|
1261
|
+
description: "Request to retrieve requirements analysis files for context.\n\nThis type is used in the preliminary phase to request specific analysis files\nthat provide business requirements and domain context.",
|
|
1262
|
+
type: "object",
|
|
1263
|
+
properties: {
|
|
1264
|
+
type: {
|
|
1265
|
+
description: "Type discriminator for the request.\n\nDetermines which action to perform: preliminary data retrieval or actual\ntask execution. Value \"getAnalysisFiles\" indicates this is a preliminary\ndata request for analysis files.",
|
|
1266
|
+
"const": "getAnalysisFiles"
|
|
1267
|
+
},
|
|
1268
|
+
fileNames: {
|
|
1269
|
+
description: "List of analysis file names to retrieve.\n\nFile names from the analyze phase containing requirements, use cases, and\nbusiness logic documentation.\n\nCRITICAL: DO NOT request the same file names that you have already\nrequested in previous calls.",
|
|
1270
|
+
type: "array",
|
|
1271
|
+
items: {
|
|
1272
|
+
type: "string"
|
|
1273
|
+
},
|
|
1274
|
+
minItems: 1
|
|
1275
|
+
}
|
|
1276
|
+
},
|
|
1277
|
+
required: [
|
|
1278
|
+
"type",
|
|
1279
|
+
"fileNames"
|
|
1280
|
+
]
|
|
1281
|
+
},
|
|
1282
|
+
IAutoBePreliminaryGetInterfaceOperations: {
|
|
1283
|
+
description: "Request to retrieve existing interface operations for context.\n\nThis type is used in the preliminary phase to request already-generated API\noperations for review, validation, or complementary generation tasks.",
|
|
1284
|
+
type: "object",
|
|
1285
|
+
properties: {
|
|
1286
|
+
type: {
|
|
1287
|
+
description: "Type discriminator for the request.\n\nDetermines which action to perform: preliminary data retrieval or actual\ntask execution. Value \"getInterfaceOperations\" indicates this is a\npreliminary data request for interface operations.",
|
|
1288
|
+
"const": "getInterfaceOperations"
|
|
1289
|
+
},
|
|
1290
|
+
endpoints: {
|
|
1291
|
+
description: "List of existing API operation endpoints to retrieve.\n\nOperations that have been generated in previous phases, containing paths,\nmethods, parameters, and request/response bodies.\n\nCRITICAL: DO NOT request the same endpoints that you have already requested\nin previous calls.",
|
|
1292
|
+
type: "array",
|
|
1293
|
+
items: {
|
|
1294
|
+
$ref: "#/$defs/AutoBeOpenApi.IEndpoint"
|
|
1295
|
+
},
|
|
1296
|
+
minItems: 1
|
|
1297
|
+
}
|
|
1298
|
+
},
|
|
1299
|
+
required: [
|
|
1300
|
+
"type",
|
|
1301
|
+
"endpoints"
|
|
1302
|
+
]
|
|
1303
|
+
},
|
|
1304
|
+
"AutoBeOpenApi.IEndpoint": {
|
|
1305
|
+
description: "API endpoint information.",
|
|
1306
|
+
type: "object",
|
|
1307
|
+
properties: {
|
|
1308
|
+
path: {
|
|
1309
|
+
description: "HTTP path of the API operation.\n\nThe URL path for accessing this API operation, using path parameters\nenclosed in curly braces (e.g., `/shoppings/customers/sales/{saleId}`).\n\nIt must be corresponded to the {@link parameters path parameters}.\n\nThe path structure should clearly indicate which database entity this\noperation is manipulating, helping to ensure all entities have\nappropriate API coverage.\n\nPath validation rules:\n\n- Must start with a forward slash (/)\n- Can contain only: letters (a-z, A-Z), numbers (0-9), forward slashes (/),\n curly braces for parameters ({paramName}), hyphens (-), and underscores\n (_)\n- Parameters must be enclosed in curly braces: {paramName}\n- Resource names should be in camelCase\n- No quotes, spaces, or invalid special characters allowed\n- No domain or role-based prefixes\n\nValid examples:\n\n- \"/users\"\n- \"/users/{userId}\"\n- \"/articles/{articleId}/comments\"\n- \"/attachmentFiles\"\n- \"/orders/{orderId}/items/{itemId}\"\n\nInvalid examples:\n\n- \"'/users'\" (contains quotes)\n- \"/user profile\" (contains space)\n- \"/users/[userId]\" (wrong bracket format)\n- \"/admin/users\" (role prefix)\n- \"/api/v1/users\" (API prefix)",
|
|
1310
|
+
type: "string",
|
|
1311
|
+
pattern: "^\\/[a-zA-Z0-9\\/_{}.-]*$"
|
|
1312
|
+
},
|
|
1313
|
+
method: {
|
|
1314
|
+
description: "HTTP method of the API operation.\n\n**IMPORTANT**: Methods must be written in lowercase only (e.g., \"get\",\nnot \"GET\").\n\nNote that, if the API operation has {@link requestBody}, method must not\nbe `get`.\n\nAlso, even though the API operation has been designed to only get\ninformation, but it needs complicated request information, it must be\ndefined as `patch` method with {@link requestBody} data specification.\n\n- `get`: get information\n- `patch`: get information with complicated request data\n ({@link requestBody})\n- `post`: create new record\n- `put`: update existing record\n- `delete`: remove record",
|
|
1315
|
+
oneOf: [
|
|
1316
|
+
{
|
|
1317
|
+
"const": "get"
|
|
1318
|
+
},
|
|
1319
|
+
{
|
|
1320
|
+
"const": "post"
|
|
1321
|
+
},
|
|
1322
|
+
{
|
|
1323
|
+
"const": "put"
|
|
1324
|
+
},
|
|
1325
|
+
{
|
|
1326
|
+
"const": "delete"
|
|
1327
|
+
},
|
|
1328
|
+
{
|
|
1329
|
+
"const": "patch"
|
|
1330
|
+
}
|
|
1331
|
+
]
|
|
1332
|
+
}
|
|
1333
|
+
},
|
|
1334
|
+
required: [
|
|
1335
|
+
"path",
|
|
1336
|
+
"method"
|
|
1337
|
+
]
|
|
1338
|
+
},
|
|
1339
|
+
IAutoBePreliminaryGetInterfaceSchemas: {
|
|
1340
|
+
description: "Request to retrieve OpenAPI schema type definitions for context.\n\nThis type is used in the preliminary phase to request specific schema\ndefinitions from components.schemas for review or complementary generation.",
|
|
1341
|
+
type: "object",
|
|
1342
|
+
properties: {
|
|
1343
|
+
type: {
|
|
1344
|
+
description: "Type discriminator for the request.\n\nDetermines which action to perform: preliminary data retrieval or actual\ntask execution. Value \"getInterfaceSchemas\" indicates this is a preliminary\ndata request for interface schemas.",
|
|
1345
|
+
"const": "getInterfaceSchemas"
|
|
1346
|
+
},
|
|
1347
|
+
typeNames: {
|
|
1348
|
+
description: "List of schema type names to retrieve.\n\nSchema names from the OpenAPI components.schemas section (e.g., \"IUser\",\n\"IUser.ICreate\", \"IPost.IUpdate\").\n\nCRITICAL: DO NOT request the same type names that you have already\nrequested in previous calls.",
|
|
1349
|
+
type: "array",
|
|
1350
|
+
items: {
|
|
1351
|
+
type: "string"
|
|
1352
|
+
},
|
|
1353
|
+
minItems: 1
|
|
1354
|
+
}
|
|
1355
|
+
},
|
|
1356
|
+
required: [
|
|
1357
|
+
"type",
|
|
1358
|
+
"typeNames"
|
|
1359
|
+
]
|
|
1360
|
+
},
|
|
1361
|
+
IAutoBePreliminaryGetPrismaSchemas: {
|
|
1362
|
+
description: "Request to retrieve Prisma database schema definitions for context.\n\nThis type is used in the preliminary phase to request specific Prisma table\nschemas needed for generating type-safe API operations.",
|
|
1363
|
+
type: "object",
|
|
1364
|
+
properties: {
|
|
1365
|
+
type: {
|
|
1366
|
+
description: "Type discriminator for the request.\n\nDetermines which action to perform: preliminary data retrieval or actual\ntask execution. Value \"getPrismaSchemas\" indicates this is a preliminary\ndata request for Prisma schemas.",
|
|
1367
|
+
"const": "getPrismaSchemas"
|
|
1368
|
+
},
|
|
1369
|
+
schemaNames: {
|
|
1370
|
+
description: "List of Prisma table names to retrieve.\n\nTable names from the Prisma schema file representing database entities\n(e.g., \"user\", \"post\", \"comment\").\n\nCRITICAL: DO NOT request the same schema names that you have already\nrequested in previous calls.",
|
|
1371
|
+
type: "array",
|
|
1372
|
+
items: {
|
|
1373
|
+
type: "string"
|
|
1374
|
+
},
|
|
1375
|
+
minItems: 1
|
|
1376
|
+
}
|
|
1377
|
+
},
|
|
1378
|
+
required: [
|
|
1379
|
+
"type",
|
|
1380
|
+
"schemaNames"
|
|
1381
|
+
]
|
|
1382
|
+
},
|
|
1383
|
+
"IAutoBeInterfacePrerequisiteApplication.IComplete": {
|
|
1384
|
+
description: "Request to analyze and generate API operation prerequisites.\n\nExecutes prerequisite analysis to determine which Available API Operations\nmust be executed before each Target Operation based on resource creation\ndependencies and existence validations.",
|
|
1385
|
+
type: "object",
|
|
1386
|
+
properties: {
|
|
1387
|
+
type: {
|
|
1388
|
+
description: "Type discriminator for the request.\n\nDetermines which action to perform: preliminary data retrieval or actual\ntask execution. Value \"complete\" indicates this is the final task\nexecution request.",
|
|
1389
|
+
"const": "complete"
|
|
1390
|
+
},
|
|
1391
|
+
operations: {
|
|
1392
|
+
description: "Target operations requiring prerequisite analysis.\n\nEach operation will be analyzed for dependency requirements and returned\nwith appropriate prerequisites from Available API Operations.",
|
|
1393
|
+
type: "array",
|
|
1394
|
+
items: {
|
|
1395
|
+
$ref: "#/$defs/IAutoBeInterfacePrerequisiteApplication.IOperation"
|
|
1396
|
+
}
|
|
1397
|
+
}
|
|
1398
|
+
},
|
|
1399
|
+
required: [
|
|
1400
|
+
"type",
|
|
1401
|
+
"operations"
|
|
1402
|
+
]
|
|
1403
|
+
},
|
|
1404
|
+
"IAutoBeInterfacePrerequisiteApplication.IOperation": {
|
|
1405
|
+
description: "Operation with its analyzed prerequisite dependencies.\n\nRepresents a single API operation and its complete prerequisite chain\nneeded for successful execution.",
|
|
1406
|
+
type: "object",
|
|
1407
|
+
properties: {
|
|
1408
|
+
endpoint: {
|
|
1409
|
+
description: "The API endpoint being analyzed.\n\nIdentifies the specific operation (method + path) that needs\nprerequisites.",
|
|
1410
|
+
$ref: "#/$defs/AutoBeOpenApi.IEndpoint"
|
|
1411
|
+
},
|
|
1412
|
+
prerequisites: {
|
|
1413
|
+
description: "Required prerequisite operations.\n\nList of API operations that must be successfully executed before this\noperation can be performed. Based on resource creation dependencies and\nexistence validations from the analysis.",
|
|
1414
|
+
type: "array",
|
|
1415
|
+
items: {
|
|
1416
|
+
$ref: "#/$defs/AutoBeOpenApi.IPrerequisite"
|
|
1417
|
+
}
|
|
1418
|
+
}
|
|
1419
|
+
},
|
|
1420
|
+
required: [
|
|
1421
|
+
"endpoint",
|
|
1422
|
+
"prerequisites"
|
|
1423
|
+
]
|
|
1424
|
+
},
|
|
1425
|
+
"AutoBeOpenApi.IPrerequisite": {
|
|
1426
|
+
description: "Prerequisite API operation dependency.\n\n`IPrerequisite` defines a dependency relationship between API operations,\nspecifying that certain endpoints must be successfully called before the\ncurrent operation can proceed. This ensures proper resource validation,\nstate checking, and data availability in complex API workflows.\n\n## CRITICAL WARNING: Authentication is NOT a Prerequisite\n\n**NEVER use prerequisites for authentication or authorization checks!**\n\nPrerequisites are ONLY for business logic dependencies such as:\n\n- Checking if a resource exists\n- Verifying resource state\n- Loading required data\n\nDo NOT create prerequisites for:\n\n- Login/authentication endpoints\n- Token validation\n- Permission checks\n- User authorization verification\n\nAuthentication is handled separately via the `authorizationActor` field on\nthe operation itself. Mixing authentication with business prerequisites\ncreates confusion and incorrect test scenarios.\n\n## Core Concept\n\nPrerequisites create an execution dependency graph for API operations. They\nexplicitly declare which APIs must succeed before attempting the current\noperation, preventing invalid states and ensuring data consistency.\n\n## Structure\n\nEach prerequisite consists of:\n\n1. **endpoint**: The API endpoint that must be called first\n2. **description**: Clear explanation of why this prerequisite is required\n\n## Common Use Cases\n\n### 1. Resource Existence Validation\n\n```typescript\n{\n \"endpoint\": { \"path\": \"/users/{userId}\", \"method\": \"get\" },\n \"description\": \"User must exist before updating their profile\"\n}\n```\n\n### 2. Parent-Child Relationships\n\n```typescript\n{\n \"endpoint\": { \"path\": \"/posts/{postId}\", \"method\": \"get\" },\n \"description\": \"Post must exist before adding comments\"\n}\n```\n\n### 3. State Prerequisites\n\n```typescript\n{\n \"endpoint\": { \"path\": \"/orders/{orderId}/status\", \"method\": \"get\" },\n \"description\": \"Order must be in 'confirmed' state before shipping\"\n}\n```\n\n### 4. Business Logic Dependencies\n\n```typescript\n{\n \"endpoint\": {\n \"path\": \"/inventory/{productId}/stock\",\n \"method\": \"get\"\n },\n \"description\": \"Product must have sufficient stock before creating order\"\n}\n```\n\n## Implementation Guidelines\n\n1. **Clear Descriptions**: Always explain WHY the prerequisite is needed\n2. **Minimal Dependencies**: Only include truly necessary prerequisites\n3. **Logical Order**: If multiple prerequisites exist, order them logically\n4. **Error Context**: Description should help understand failure scenarios\n5. **No Authentication**: Prerequisites must NEVER be authentication checks\n\n## Test Generation Usage\n\nThe Test Agent utilizes prerequisites to:\n\n- Set up test data in the correct sequence\n- Generate realistic test scenarios\n- Create both positive and negative test cases\n- Ensure proper cleanup in reverse dependency order\n\n## Best Practices\n\n- Keep prerequisite chains as short as possible for performance\n- Consider caching prerequisite results when safe to do so\n- Ensure prerequisite descriptions are specific, not generic\n- Validate that circular dependencies don't exist\n- Document any side effects of prerequisite calls\n- NEVER use for authentication/authorization validation",
|
|
1427
|
+
type: "object",
|
|
1428
|
+
properties: {
|
|
1429
|
+
endpoint: {
|
|
1430
|
+
description: "The API endpoint that must be called before the main operation.\n\nThis specifies the exact HTTP method and path of the prerequisite API.\nThe endpoint must be a valid operation defined elsewhere in the API\nspecification. Path parameters in the prerequisite endpoint can reference\nthe same parameters available in the main operation.",
|
|
1431
|
+
$ref: "#/$defs/AutoBeOpenApi.IEndpoint"
|
|
1432
|
+
},
|
|
1433
|
+
description: {
|
|
1434
|
+
description: "Clear description of why this prerequisite is required.\n\nThis description should explain:\n\n- What validation or check this prerequisite performs\n- What state or condition must be satisfied\n- What happens if this prerequisite fails\n- Any specific data from the prerequisite used by the main operation\n\nThe description helps developers understand the dependency relationship\nand aids in debugging when prerequisites fail.\n\nGuidelines for good descriptions:\n\n- Be specific about the requirement (e.g., \"must be in 'active' state\")\n- Explain business logic constraints (e.g., \"budget must not be exceeded\")\n- Explain data dependencies (e.g., \"provides pricing information needed\")\n- Keep it concise but complete\n\n> MUST be written in English. Never use other languages.",
|
|
1435
|
+
type: "string"
|
|
1436
|
+
}
|
|
1437
|
+
},
|
|
1438
|
+
required: [
|
|
1439
|
+
"endpoint",
|
|
1440
|
+
"description"
|
|
1441
|
+
]
|
|
1442
|
+
}
|
|
1443
|
+
}
|
|
1444
|
+
},
|
|
1445
|
+
description: "Process prerequisite analysis task or preliminary data requests.\n\nAnalyzes each operation's dependencies and returns complete list with\nrequired prerequisite chains based on resource relationships.",
|
|
1446
|
+
validate: (() => { const _io0 = input => "string" === typeof input.thinking && ("object" === typeof input.request && null !== input.request && _iu0(input.request)); const _io1 = input => "getAnalysisFiles" === input.type && (Array.isArray(input.fileNames) && (1 <= input.fileNames.length && input.fileNames.every(elem => "string" === typeof elem))); const _io2 = input => "getInterfaceOperations" === input.type && (Array.isArray(input.endpoints) && (1 <= input.endpoints.length && input.endpoints.every(elem => "object" === typeof elem && null !== elem && _io3(elem)))); const _io3 = input => "string" === typeof input.path && RegExp("^\\/[a-zA-Z0-9\\/_{}.-]*$").test(input.path) && ("get" === input.method || "post" === input.method || "put" === input.method || "delete" === input.method || "patch" === input.method); const _io4 = input => "getInterfaceSchemas" === input.type && (Array.isArray(input.typeNames) && (1 <= input.typeNames.length && input.typeNames.every(elem => "string" === typeof elem))); const _io5 = input => "getPrismaSchemas" === input.type && (Array.isArray(input.schemaNames) && (1 <= input.schemaNames.length && input.schemaNames.every(elem => "string" === typeof elem))); const _io6 = input => "complete" === input.type && (Array.isArray(input.operations) && input.operations.every(elem => "object" === typeof elem && null !== elem && _io7(elem))); const _io7 = input => "object" === typeof input.endpoint && null !== input.endpoint && _io3(input.endpoint) && (Array.isArray(input.prerequisites) && input.prerequisites.every(elem => "object" === typeof elem && null !== elem && _io8(elem))); const _io8 = input => "object" === typeof input.endpoint && null !== input.endpoint && _io3(input.endpoint) && "string" === typeof input.description; const _iu0 = input => (() => {
|
|
1447
|
+
if ("getAnalysisFiles" === input.type)
|
|
1448
|
+
return _io1(input);
|
|
1449
|
+
else if ("getInterfaceOperations" === input.type)
|
|
1450
|
+
return _io2(input);
|
|
1451
|
+
else if ("getInterfaceSchemas" === input.type)
|
|
1452
|
+
return _io4(input);
|
|
1453
|
+
else if ("getPrismaSchemas" === input.type)
|
|
1454
|
+
return _io5(input);
|
|
1455
|
+
else if ("complete" === input.type)
|
|
1456
|
+
return _io6(input);
|
|
1457
|
+
else
|
|
1458
|
+
return false;
|
|
1459
|
+
})(); const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.thinking || _report(_exceptionable, {
|
|
1460
|
+
path: _path + ".thinking",
|
|
1461
|
+
expected: "string",
|
|
1462
|
+
value: input.thinking
|
|
1463
|
+
}), ("object" === typeof input.request && null !== input.request || _report(_exceptionable, {
|
|
1464
|
+
path: _path + ".request",
|
|
1465
|
+
expected: "(IAutoBeInterfacePrerequisiteApplication.IComplete | IAutoBePreliminaryGetAnalysisFiles | IAutoBePreliminaryGetInterfaceOperations | IAutoBePreliminaryGetInterfaceSchemas | IAutoBePreliminaryGetPrismaSchemas)",
|
|
1466
|
+
value: input.request
|
|
1467
|
+
})) && _vu0(input.request, _path + ".request", true && _exceptionable) || _report(_exceptionable, {
|
|
1468
|
+
path: _path + ".request",
|
|
1469
|
+
expected: "(IAutoBeInterfacePrerequisiteApplication.IComplete | IAutoBePreliminaryGetAnalysisFiles | IAutoBePreliminaryGetInterfaceOperations | IAutoBePreliminaryGetInterfaceSchemas | IAutoBePreliminaryGetPrismaSchemas)",
|
|
1470
|
+
value: input.request
|
|
1471
|
+
})].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => ["getAnalysisFiles" === input.type || _report(_exceptionable, {
|
|
1472
|
+
path: _path + ".type",
|
|
1473
|
+
expected: "\"getAnalysisFiles\"",
|
|
1474
|
+
value: input.type
|
|
1475
|
+
}), (Array.isArray(input.fileNames) || _report(_exceptionable, {
|
|
1476
|
+
path: _path + ".fileNames",
|
|
1477
|
+
expected: "(Array<string> & MinItems<1>)",
|
|
1478
|
+
value: input.fileNames
|
|
1479
|
+
})) && ((1 <= input.fileNames.length || _report(_exceptionable, {
|
|
1480
|
+
path: _path + ".fileNames",
|
|
1481
|
+
expected: "Array<> & MinItems<1>",
|
|
1482
|
+
value: input.fileNames
|
|
1483
|
+
})) && input.fileNames.map((elem, _index7) => "string" === typeof elem || _report(_exceptionable, {
|
|
1484
|
+
path: _path + ".fileNames[" + _index7 + "]",
|
|
1485
|
+
expected: "string",
|
|
1486
|
+
value: elem
|
|
1487
|
+
})).every(flag => flag)) || _report(_exceptionable, {
|
|
1488
|
+
path: _path + ".fileNames",
|
|
1489
|
+
expected: "(Array<string> & MinItems<1>)",
|
|
1490
|
+
value: input.fileNames
|
|
1491
|
+
})].every(flag => flag); const _vo2 = (input, _path, _exceptionable = true) => ["getInterfaceOperations" === input.type || _report(_exceptionable, {
|
|
1492
|
+
path: _path + ".type",
|
|
1493
|
+
expected: "\"getInterfaceOperations\"",
|
|
1494
|
+
value: input.type
|
|
1495
|
+
}), (Array.isArray(input.endpoints) || _report(_exceptionable, {
|
|
1496
|
+
path: _path + ".endpoints",
|
|
1497
|
+
expected: "(Array<AutoBeOpenApi.IEndpoint> & MinItems<1>)",
|
|
1498
|
+
value: input.endpoints
|
|
1499
|
+
})) && ((1 <= input.endpoints.length || _report(_exceptionable, {
|
|
1500
|
+
path: _path + ".endpoints",
|
|
1501
|
+
expected: "Array<> & MinItems<1>",
|
|
1502
|
+
value: input.endpoints
|
|
1503
|
+
})) && input.endpoints.map((elem, _index8) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
1504
|
+
path: _path + ".endpoints[" + _index8 + "]",
|
|
1505
|
+
expected: "AutoBeOpenApi.IEndpoint",
|
|
1506
|
+
value: elem
|
|
1507
|
+
})) && _vo3(elem, _path + ".endpoints[" + _index8 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
1508
|
+
path: _path + ".endpoints[" + _index8 + "]",
|
|
1509
|
+
expected: "AutoBeOpenApi.IEndpoint",
|
|
1510
|
+
value: elem
|
|
1511
|
+
})).every(flag => flag)) || _report(_exceptionable, {
|
|
1512
|
+
path: _path + ".endpoints",
|
|
1513
|
+
expected: "(Array<AutoBeOpenApi.IEndpoint> & MinItems<1>)",
|
|
1514
|
+
value: input.endpoints
|
|
1515
|
+
})].every(flag => flag); const _vo3 = (input, _path, _exceptionable = true) => ["string" === typeof input.path && (RegExp("^\\/[a-zA-Z0-9\\/_{}.-]*$").test(input.path) || _report(_exceptionable, {
|
|
1516
|
+
path: _path + ".path",
|
|
1517
|
+
expected: "string & Pattern<\"^\\\\/[a-zA-Z0-9\\\\/_{}.-]*$\">",
|
|
1518
|
+
value: input.path
|
|
1519
|
+
})) || _report(_exceptionable, {
|
|
1520
|
+
path: _path + ".path",
|
|
1521
|
+
expected: "(string & Pattern<\"^\\\\/[a-zA-Z0-9\\\\/_{}.-]*$\">)",
|
|
1522
|
+
value: input.path
|
|
1523
|
+
}), "get" === input.method || "post" === input.method || "put" === input.method || "delete" === input.method || "patch" === input.method || _report(_exceptionable, {
|
|
1524
|
+
path: _path + ".method",
|
|
1525
|
+
expected: "(\"delete\" | \"get\" | \"patch\" | \"post\" | \"put\")",
|
|
1526
|
+
value: input.method
|
|
1527
|
+
})].every(flag => flag); const _vo4 = (input, _path, _exceptionable = true) => ["getInterfaceSchemas" === input.type || _report(_exceptionable, {
|
|
1528
|
+
path: _path + ".type",
|
|
1529
|
+
expected: "\"getInterfaceSchemas\"",
|
|
1530
|
+
value: input.type
|
|
1531
|
+
}), (Array.isArray(input.typeNames) || _report(_exceptionable, {
|
|
1532
|
+
path: _path + ".typeNames",
|
|
1533
|
+
expected: "(Array<string> & MinItems<1>)",
|
|
1534
|
+
value: input.typeNames
|
|
1535
|
+
})) && ((1 <= input.typeNames.length || _report(_exceptionable, {
|
|
1536
|
+
path: _path + ".typeNames",
|
|
1537
|
+
expected: "Array<> & MinItems<1>",
|
|
1538
|
+
value: input.typeNames
|
|
1539
|
+
})) && input.typeNames.map((elem, _index9) => "string" === typeof elem || _report(_exceptionable, {
|
|
1540
|
+
path: _path + ".typeNames[" + _index9 + "]",
|
|
1541
|
+
expected: "string",
|
|
1542
|
+
value: elem
|
|
1543
|
+
})).every(flag => flag)) || _report(_exceptionable, {
|
|
1544
|
+
path: _path + ".typeNames",
|
|
1545
|
+
expected: "(Array<string> & MinItems<1>)",
|
|
1546
|
+
value: input.typeNames
|
|
1547
|
+
})].every(flag => flag); const _vo5 = (input, _path, _exceptionable = true) => ["getPrismaSchemas" === input.type || _report(_exceptionable, {
|
|
1548
|
+
path: _path + ".type",
|
|
1549
|
+
expected: "\"getPrismaSchemas\"",
|
|
1550
|
+
value: input.type
|
|
1551
|
+
}), (Array.isArray(input.schemaNames) || _report(_exceptionable, {
|
|
1552
|
+
path: _path + ".schemaNames",
|
|
1553
|
+
expected: "(Array<string> & MinItems<1>)",
|
|
1554
|
+
value: input.schemaNames
|
|
1555
|
+
})) && ((1 <= input.schemaNames.length || _report(_exceptionable, {
|
|
1556
|
+
path: _path + ".schemaNames",
|
|
1557
|
+
expected: "Array<> & MinItems<1>",
|
|
1558
|
+
value: input.schemaNames
|
|
1559
|
+
})) && input.schemaNames.map((elem, _index10) => "string" === typeof elem || _report(_exceptionable, {
|
|
1560
|
+
path: _path + ".schemaNames[" + _index10 + "]",
|
|
1561
|
+
expected: "string",
|
|
1562
|
+
value: elem
|
|
1563
|
+
})).every(flag => flag)) || _report(_exceptionable, {
|
|
1564
|
+
path: _path + ".schemaNames",
|
|
1565
|
+
expected: "(Array<string> & MinItems<1>)",
|
|
1566
|
+
value: input.schemaNames
|
|
1567
|
+
})].every(flag => flag); const _vo6 = (input, _path, _exceptionable = true) => ["complete" === input.type || _report(_exceptionable, {
|
|
1568
|
+
path: _path + ".type",
|
|
1569
|
+
expected: "\"complete\"",
|
|
1570
|
+
value: input.type
|
|
1571
|
+
}), (Array.isArray(input.operations) || _report(_exceptionable, {
|
|
1572
|
+
path: _path + ".operations",
|
|
1573
|
+
expected: "Array<IAutoBeInterfacePrerequisiteApplication.IOperation>",
|
|
1574
|
+
value: input.operations
|
|
1575
|
+
})) && input.operations.map((elem, _index11) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
1576
|
+
path: _path + ".operations[" + _index11 + "]",
|
|
1577
|
+
expected: "IAutoBeInterfacePrerequisiteApplication.IOperation",
|
|
1578
|
+
value: elem
|
|
1579
|
+
})) && _vo7(elem, _path + ".operations[" + _index11 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
1580
|
+
path: _path + ".operations[" + _index11 + "]",
|
|
1581
|
+
expected: "IAutoBeInterfacePrerequisiteApplication.IOperation",
|
|
1582
|
+
value: elem
|
|
1583
|
+
})).every(flag => flag) || _report(_exceptionable, {
|
|
1584
|
+
path: _path + ".operations",
|
|
1585
|
+
expected: "Array<IAutoBeInterfacePrerequisiteApplication.IOperation>",
|
|
1586
|
+
value: input.operations
|
|
1587
|
+
})].every(flag => flag); const _vo7 = (input, _path, _exceptionable = true) => [("object" === typeof input.endpoint && null !== input.endpoint || _report(_exceptionable, {
|
|
1588
|
+
path: _path + ".endpoint",
|
|
1589
|
+
expected: "AutoBeOpenApi.IEndpoint",
|
|
1590
|
+
value: input.endpoint
|
|
1591
|
+
})) && _vo3(input.endpoint, _path + ".endpoint", true && _exceptionable) || _report(_exceptionable, {
|
|
1592
|
+
path: _path + ".endpoint",
|
|
1593
|
+
expected: "AutoBeOpenApi.IEndpoint",
|
|
1594
|
+
value: input.endpoint
|
|
1595
|
+
}), (Array.isArray(input.prerequisites) || _report(_exceptionable, {
|
|
1596
|
+
path: _path + ".prerequisites",
|
|
1597
|
+
expected: "Array<AutoBeOpenApi.IPrerequisite>",
|
|
1598
|
+
value: input.prerequisites
|
|
1599
|
+
})) && input.prerequisites.map((elem, _index12) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
1600
|
+
path: _path + ".prerequisites[" + _index12 + "]",
|
|
1601
|
+
expected: "AutoBeOpenApi.IPrerequisite",
|
|
1602
|
+
value: elem
|
|
1603
|
+
})) && _vo8(elem, _path + ".prerequisites[" + _index12 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
1604
|
+
path: _path + ".prerequisites[" + _index12 + "]",
|
|
1605
|
+
expected: "AutoBeOpenApi.IPrerequisite",
|
|
1606
|
+
value: elem
|
|
1607
|
+
})).every(flag => flag) || _report(_exceptionable, {
|
|
1608
|
+
path: _path + ".prerequisites",
|
|
1609
|
+
expected: "Array<AutoBeOpenApi.IPrerequisite>",
|
|
1610
|
+
value: input.prerequisites
|
|
1611
|
+
})].every(flag => flag); const _vo8 = (input, _path, _exceptionable = true) => [("object" === typeof input.endpoint && null !== input.endpoint || _report(_exceptionable, {
|
|
1612
|
+
path: _path + ".endpoint",
|
|
1613
|
+
expected: "AutoBeOpenApi.IEndpoint",
|
|
1614
|
+
value: input.endpoint
|
|
1615
|
+
})) && _vo3(input.endpoint, _path + ".endpoint", true && _exceptionable) || _report(_exceptionable, {
|
|
1616
|
+
path: _path + ".endpoint",
|
|
1617
|
+
expected: "AutoBeOpenApi.IEndpoint",
|
|
1618
|
+
value: input.endpoint
|
|
1619
|
+
}), "string" === typeof input.description || _report(_exceptionable, {
|
|
1620
|
+
path: _path + ".description",
|
|
1621
|
+
expected: "string",
|
|
1622
|
+
value: input.description
|
|
1623
|
+
})].every(flag => flag); const _vu0 = (input, _path, _exceptionable = true) => (() => {
|
|
1624
|
+
if ("getAnalysisFiles" === input.type)
|
|
1625
|
+
return _vo1(input, _path, true && _exceptionable);
|
|
1626
|
+
else if ("getInterfaceOperations" === input.type)
|
|
1627
|
+
return _vo2(input, _path, true && _exceptionable);
|
|
1628
|
+
else if ("getInterfaceSchemas" === input.type)
|
|
1629
|
+
return _vo4(input, _path, true && _exceptionable);
|
|
1630
|
+
else if ("getPrismaSchemas" === input.type)
|
|
1631
|
+
return _vo5(input, _path, true && _exceptionable);
|
|
1632
|
+
else if ("complete" === input.type)
|
|
1633
|
+
return _vo6(input, _path, true && _exceptionable);
|
|
1634
|
+
else
|
|
1635
|
+
return _report(_exceptionable, {
|
|
1636
|
+
path: _path,
|
|
1637
|
+
expected: "(IAutoBePreliminaryGetAnalysisFiles | IAutoBePreliminaryGetInterfaceOperations | IAutoBePreliminaryGetInterfaceSchemas | IAutoBePreliminaryGetPrismaSchemas | IAutoBeInterfacePrerequisiteApplication.IComplete)",
|
|
1638
|
+
value: input
|
|
1639
|
+
});
|
|
1640
|
+
})(); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
|
|
1641
|
+
if (false === __is(input)) {
|
|
1642
|
+
errors = [];
|
|
1643
|
+
_report = __typia_transform__validateReport._validateReport(errors);
|
|
1644
|
+
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
|
|
1645
|
+
path: _path + "",
|
|
1646
|
+
expected: "IAutoBeInterfacePrerequisiteApplication.IProps",
|
|
1647
|
+
value: input
|
|
1648
|
+
})) && _vo0(input, _path + "", true) || _report(true, {
|
|
1649
|
+
path: _path + "",
|
|
1650
|
+
expected: "IAutoBeInterfacePrerequisiteApplication.IProps",
|
|
1651
|
+
value: input
|
|
1652
|
+
}))(input, "$input", true);
|
|
1653
|
+
const success = 0 === errors.length;
|
|
1654
|
+
return success ? {
|
|
1655
|
+
success,
|
|
1656
|
+
data: input
|
|
1657
|
+
} : {
|
|
1658
|
+
success,
|
|
1659
|
+
errors,
|
|
1660
|
+
data: input
|
|
1661
|
+
};
|
|
1662
|
+
}
|
|
1663
|
+
return {
|
|
1664
|
+
success: true,
|
|
1665
|
+
data: input
|
|
1666
|
+
};
|
|
1667
|
+
}; })()
|
|
1668
|
+
}
|
|
1669
|
+
]
|
|
1670
|
+
};
|
|
1671
|
+
__typia_transform__llmApplicationFinalize._llmApplicationFinalize(application, Object.assign(Object.assign({}, {
|
|
1672
|
+
validate: {
|
|
1673
|
+
process: validate,
|
|
1674
|
+
},
|
|
1675
|
+
}), { equals: false }));
|
|
1676
|
+
return application;
|
|
1677
|
+
})(),
|
|
1678
|
+
gemini: (validate) => (() => {
|
|
1679
|
+
const application = {
|
|
1680
|
+
model: "gemini",
|
|
1681
|
+
options: {
|
|
1682
|
+
reference: true,
|
|
1683
|
+
separate: null
|
|
1684
|
+
},
|
|
1685
|
+
functions: [
|
|
1686
|
+
{
|
|
1687
|
+
name: "process",
|
|
1688
|
+
parameters: {
|
|
1689
|
+
description: " Request containing either preliminary data request or complete\ntask\n\n------------------------------\n\nCurrent Type: {@link IAutoBeInterfacePrerequisiteApplication.IProps}",
|
|
1690
|
+
type: "object",
|
|
1691
|
+
properties: {
|
|
1692
|
+
thinking: {
|
|
1693
|
+
description: "Think before you act.\n\nBefore requesting preliminary data or completing your task, reflect on your\ncurrent state and explain your reasoning:\n\nFor preliminary requests (getAnalysisFiles, getPrismaSchemas, etc.):\n- What critical information is missing that you don't already have?\n- Why do you need it specifically right now?\n- Be brief - state the gap, don't list everything you have.\n\nFor completion (complete):\n- What key assets did you acquire?\n- What did you accomplish?\n- Why is it sufficient to complete?\n- Summarize - don't enumerate every single item.\n\nThis reflection helps you avoid duplicate requests and premature completion.",
|
|
1694
|
+
type: "string"
|
|
1695
|
+
},
|
|
1696
|
+
request: {
|
|
1697
|
+
description: "Type discriminator for the request.\n\nDetermines which action to perform: preliminary data retrieval\n(getAnalysisFiles, getPrismaSchemas, getInterfaceOperations,\ngetInterfaceSchemas) or final prerequisite analysis (complete). When\npreliminary returns empty array, that type is removed from the union,\nphysically preventing repeated calls.",
|
|
1698
|
+
anyOf: [
|
|
1699
|
+
{
|
|
1700
|
+
$ref: "#/$defs/IAutoBePreliminaryGetAnalysisFiles"
|
|
1701
|
+
},
|
|
1702
|
+
{
|
|
1703
|
+
$ref: "#/$defs/IAutoBePreliminaryGetInterfaceOperations"
|
|
1704
|
+
},
|
|
1705
|
+
{
|
|
1706
|
+
$ref: "#/$defs/IAutoBePreliminaryGetInterfaceSchemas"
|
|
1707
|
+
},
|
|
1708
|
+
{
|
|
1709
|
+
$ref: "#/$defs/IAutoBePreliminaryGetPrismaSchemas"
|
|
1710
|
+
},
|
|
1711
|
+
{
|
|
1712
|
+
$ref: "#/$defs/IAutoBeInterfacePrerequisiteApplication.IComplete"
|
|
1713
|
+
}
|
|
1714
|
+
],
|
|
1715
|
+
"x-discriminator": {
|
|
1716
|
+
propertyName: "type",
|
|
1717
|
+
mapping: {
|
|
1718
|
+
getAnalysisFiles: "#/$defs/IAutoBePreliminaryGetAnalysisFiles",
|
|
1719
|
+
getInterfaceOperations: "#/$defs/IAutoBePreliminaryGetInterfaceOperations",
|
|
1720
|
+
getInterfaceSchemas: "#/$defs/IAutoBePreliminaryGetInterfaceSchemas",
|
|
1721
|
+
getPrismaSchemas: "#/$defs/IAutoBePreliminaryGetPrismaSchemas",
|
|
1722
|
+
complete: "#/$defs/IAutoBeInterfacePrerequisiteApplication.IComplete"
|
|
1723
|
+
}
|
|
1724
|
+
}
|
|
1725
|
+
}
|
|
1726
|
+
},
|
|
1727
|
+
required: [
|
|
1728
|
+
"thinking",
|
|
1729
|
+
"request"
|
|
1730
|
+
],
|
|
1731
|
+
additionalProperties: false,
|
|
1732
|
+
$defs: {
|
|
1733
|
+
IAutoBePreliminaryGetAnalysisFiles: {
|
|
1734
|
+
description: "Request to retrieve requirements analysis files for context.\n\nThis type is used in the preliminary phase to request specific analysis files\nthat provide business requirements and domain context.",
|
|
1735
|
+
type: "object",
|
|
1736
|
+
properties: {
|
|
1737
|
+
type: {
|
|
1738
|
+
description: "Type discriminator for the request.\n\nDetermines which action to perform: preliminary data retrieval or actual\ntask execution. Value \"getAnalysisFiles\" indicates this is a preliminary\ndata request for analysis files.",
|
|
1739
|
+
type: "string",
|
|
1740
|
+
"enum": [
|
|
1741
|
+
"getAnalysisFiles"
|
|
1742
|
+
]
|
|
1743
|
+
},
|
|
1744
|
+
fileNames: {
|
|
1745
|
+
description: "List of analysis file names to retrieve.\n\nFile names from the analyze phase containing requirements, use cases, and\nbusiness logic documentation.\n\nCRITICAL: DO NOT request the same file names that you have already\nrequested in previous calls.",
|
|
1746
|
+
type: "array",
|
|
1747
|
+
items: {
|
|
1748
|
+
type: "string"
|
|
1749
|
+
},
|
|
1750
|
+
minItems: 1
|
|
1751
|
+
}
|
|
1752
|
+
},
|
|
1753
|
+
required: [
|
|
1754
|
+
"type",
|
|
1755
|
+
"fileNames"
|
|
1756
|
+
]
|
|
1757
|
+
},
|
|
1758
|
+
IAutoBePreliminaryGetInterfaceOperations: {
|
|
1759
|
+
description: "Request to retrieve existing interface operations for context.\n\nThis type is used in the preliminary phase to request already-generated API\noperations for review, validation, or complementary generation tasks.",
|
|
1760
|
+
type: "object",
|
|
1761
|
+
properties: {
|
|
1762
|
+
type: {
|
|
1763
|
+
description: "Type discriminator for the request.\n\nDetermines which action to perform: preliminary data retrieval or actual\ntask execution. Value \"getInterfaceOperations\" indicates this is a\npreliminary data request for interface operations.",
|
|
1764
|
+
type: "string",
|
|
1765
|
+
"enum": [
|
|
1766
|
+
"getInterfaceOperations"
|
|
1767
|
+
]
|
|
1768
|
+
},
|
|
1769
|
+
endpoints: {
|
|
1770
|
+
description: "List of existing API operation endpoints to retrieve.\n\nOperations that have been generated in previous phases, containing paths,\nmethods, parameters, and request/response bodies.\n\nCRITICAL: DO NOT request the same endpoints that you have already requested\nin previous calls.",
|
|
1771
|
+
type: "array",
|
|
1772
|
+
items: {
|
|
1773
|
+
$ref: "#/$defs/AutoBeOpenApi.IEndpoint"
|
|
1774
|
+
},
|
|
1775
|
+
minItems: 1
|
|
1776
|
+
}
|
|
1777
|
+
},
|
|
1778
|
+
required: [
|
|
1779
|
+
"type",
|
|
1780
|
+
"endpoints"
|
|
1781
|
+
]
|
|
1782
|
+
},
|
|
1783
|
+
"AutoBeOpenApi.IEndpoint": {
|
|
1784
|
+
description: "API endpoint information.",
|
|
1785
|
+
type: "object",
|
|
1786
|
+
properties: {
|
|
1787
|
+
path: {
|
|
1788
|
+
description: "HTTP path of the API operation.\n\nThe URL path for accessing this API operation, using path parameters\nenclosed in curly braces (e.g., `/shoppings/customers/sales/{saleId}`).\n\nIt must be corresponded to the {@link parameters path parameters}.\n\nThe path structure should clearly indicate which database entity this\noperation is manipulating, helping to ensure all entities have\nappropriate API coverage.\n\nPath validation rules:\n\n- Must start with a forward slash (/)\n- Can contain only: letters (a-z, A-Z), numbers (0-9), forward slashes (/),\n curly braces for parameters ({paramName}), hyphens (-), and underscores\n (_)\n- Parameters must be enclosed in curly braces: {paramName}\n- Resource names should be in camelCase\n- No quotes, spaces, or invalid special characters allowed\n- No domain or role-based prefixes\n\nValid examples:\n\n- \"/users\"\n- \"/users/{userId}\"\n- \"/articles/{articleId}/comments\"\n- \"/attachmentFiles\"\n- \"/orders/{orderId}/items/{itemId}\"\n\nInvalid examples:\n\n- \"'/users'\" (contains quotes)\n- \"/user profile\" (contains space)\n- \"/users/[userId]\" (wrong bracket format)\n- \"/admin/users\" (role prefix)\n- \"/api/v1/users\" (API prefix)",
|
|
1789
|
+
type: "string",
|
|
1790
|
+
pattern: "^\\/[a-zA-Z0-9\\/_{}.-]*$"
|
|
1791
|
+
},
|
|
1792
|
+
method: {
|
|
1793
|
+
description: "HTTP method of the API operation.\n\n**IMPORTANT**: Methods must be written in lowercase only (e.g., \"get\",\nnot \"GET\").\n\nNote that, if the API operation has {@link requestBody}, method must not\nbe `get`.\n\nAlso, even though the API operation has been designed to only get\ninformation, but it needs complicated request information, it must be\ndefined as `patch` method with {@link requestBody} data specification.\n\n- `get`: get information\n- `patch`: get information with complicated request data\n ({@link requestBody})\n- `post`: create new record\n- `put`: update existing record\n- `delete`: remove record",
|
|
1794
|
+
type: "string",
|
|
1795
|
+
"enum": [
|
|
1796
|
+
"get",
|
|
1797
|
+
"post",
|
|
1798
|
+
"put",
|
|
1799
|
+
"delete",
|
|
1800
|
+
"patch"
|
|
1801
|
+
]
|
|
1802
|
+
}
|
|
1803
|
+
},
|
|
1804
|
+
required: [
|
|
1805
|
+
"path",
|
|
1806
|
+
"method"
|
|
1807
|
+
]
|
|
1808
|
+
},
|
|
1809
|
+
IAutoBePreliminaryGetInterfaceSchemas: {
|
|
1810
|
+
description: "Request to retrieve OpenAPI schema type definitions for context.\n\nThis type is used in the preliminary phase to request specific schema\ndefinitions from components.schemas for review or complementary generation.",
|
|
1811
|
+
type: "object",
|
|
1812
|
+
properties: {
|
|
1813
|
+
type: {
|
|
1814
|
+
description: "Type discriminator for the request.\n\nDetermines which action to perform: preliminary data retrieval or actual\ntask execution. Value \"getInterfaceSchemas\" indicates this is a preliminary\ndata request for interface schemas.",
|
|
1815
|
+
type: "string",
|
|
1816
|
+
"enum": [
|
|
1817
|
+
"getInterfaceSchemas"
|
|
1818
|
+
]
|
|
1819
|
+
},
|
|
1820
|
+
typeNames: {
|
|
1821
|
+
description: "List of schema type names to retrieve.\n\nSchema names from the OpenAPI components.schemas section (e.g., \"IUser\",\n\"IUser.ICreate\", \"IPost.IUpdate\").\n\nCRITICAL: DO NOT request the same type names that you have already\nrequested in previous calls.",
|
|
1822
|
+
type: "array",
|
|
1823
|
+
items: {
|
|
1824
|
+
type: "string"
|
|
1825
|
+
},
|
|
1826
|
+
minItems: 1
|
|
1827
|
+
}
|
|
1828
|
+
},
|
|
1829
|
+
required: [
|
|
1830
|
+
"type",
|
|
1831
|
+
"typeNames"
|
|
1832
|
+
]
|
|
1833
|
+
},
|
|
1834
|
+
IAutoBePreliminaryGetPrismaSchemas: {
|
|
1835
|
+
description: "Request to retrieve Prisma database schema definitions for context.\n\nThis type is used in the preliminary phase to request specific Prisma table\nschemas needed for generating type-safe API operations.",
|
|
1836
|
+
type: "object",
|
|
1837
|
+
properties: {
|
|
1838
|
+
type: {
|
|
1839
|
+
description: "Type discriminator for the request.\n\nDetermines which action to perform: preliminary data retrieval or actual\ntask execution. Value \"getPrismaSchemas\" indicates this is a preliminary\ndata request for Prisma schemas.",
|
|
1840
|
+
type: "string",
|
|
1841
|
+
"enum": [
|
|
1842
|
+
"getPrismaSchemas"
|
|
1843
|
+
]
|
|
1844
|
+
},
|
|
1845
|
+
schemaNames: {
|
|
1846
|
+
description: "List of Prisma table names to retrieve.\n\nTable names from the Prisma schema file representing database entities\n(e.g., \"user\", \"post\", \"comment\").\n\nCRITICAL: DO NOT request the same schema names that you have already\nrequested in previous calls.",
|
|
1847
|
+
type: "array",
|
|
1848
|
+
items: {
|
|
1849
|
+
type: "string"
|
|
1850
|
+
},
|
|
1851
|
+
minItems: 1
|
|
1852
|
+
}
|
|
1853
|
+
},
|
|
1854
|
+
required: [
|
|
1855
|
+
"type",
|
|
1856
|
+
"schemaNames"
|
|
1857
|
+
]
|
|
1858
|
+
},
|
|
1859
|
+
"IAutoBeInterfacePrerequisiteApplication.IComplete": {
|
|
1860
|
+
description: "Request to analyze and generate API operation prerequisites.\n\nExecutes prerequisite analysis to determine which Available API Operations\nmust be executed before each Target Operation based on resource creation\ndependencies and existence validations.",
|
|
1861
|
+
type: "object",
|
|
1862
|
+
properties: {
|
|
1863
|
+
type: {
|
|
1864
|
+
description: "Type discriminator for the request.\n\nDetermines which action to perform: preliminary data retrieval or actual\ntask execution. Value \"complete\" indicates this is the final task\nexecution request.",
|
|
1865
|
+
type: "string",
|
|
1866
|
+
"enum": [
|
|
1867
|
+
"complete"
|
|
1868
|
+
]
|
|
1869
|
+
},
|
|
1870
|
+
operations: {
|
|
1871
|
+
description: "Target operations requiring prerequisite analysis.\n\nEach operation will be analyzed for dependency requirements and returned\nwith appropriate prerequisites from Available API Operations.",
|
|
1872
|
+
type: "array",
|
|
1873
|
+
items: {
|
|
1874
|
+
$ref: "#/$defs/IAutoBeInterfacePrerequisiteApplication.IOperation"
|
|
1875
|
+
}
|
|
1876
|
+
}
|
|
1877
|
+
},
|
|
1878
|
+
required: [
|
|
1879
|
+
"type",
|
|
1880
|
+
"operations"
|
|
1881
|
+
]
|
|
1882
|
+
},
|
|
1883
|
+
"IAutoBeInterfacePrerequisiteApplication.IOperation": {
|
|
1884
|
+
description: "Operation with its analyzed prerequisite dependencies.\n\nRepresents a single API operation and its complete prerequisite chain\nneeded for successful execution.",
|
|
1885
|
+
type: "object",
|
|
1886
|
+
properties: {
|
|
1887
|
+
endpoint: {
|
|
1888
|
+
description: "The API endpoint being analyzed.\n\nIdentifies the specific operation (method + path) that needs\nprerequisites.",
|
|
1889
|
+
$ref: "#/$defs/AutoBeOpenApi.IEndpoint"
|
|
1890
|
+
},
|
|
1891
|
+
prerequisites: {
|
|
1892
|
+
description: "Required prerequisite operations.\n\nList of API operations that must be successfully executed before this\noperation can be performed. Based on resource creation dependencies and\nexistence validations from the analysis.",
|
|
1893
|
+
type: "array",
|
|
1894
|
+
items: {
|
|
1895
|
+
$ref: "#/$defs/AutoBeOpenApi.IPrerequisite"
|
|
1896
|
+
}
|
|
1897
|
+
}
|
|
1898
|
+
},
|
|
1899
|
+
required: [
|
|
1900
|
+
"endpoint",
|
|
1901
|
+
"prerequisites"
|
|
1902
|
+
]
|
|
1903
|
+
},
|
|
1904
|
+
"AutoBeOpenApi.IPrerequisite": {
|
|
1905
|
+
description: "Prerequisite API operation dependency.\n\n`IPrerequisite` defines a dependency relationship between API operations,\nspecifying that certain endpoints must be successfully called before the\ncurrent operation can proceed. This ensures proper resource validation,\nstate checking, and data availability in complex API workflows.\n\n## CRITICAL WARNING: Authentication is NOT a Prerequisite\n\n**NEVER use prerequisites for authentication or authorization checks!**\n\nPrerequisites are ONLY for business logic dependencies such as:\n\n- Checking if a resource exists\n- Verifying resource state\n- Loading required data\n\nDo NOT create prerequisites for:\n\n- Login/authentication endpoints\n- Token validation\n- Permission checks\n- User authorization verification\n\nAuthentication is handled separately via the `authorizationActor` field on\nthe operation itself. Mixing authentication with business prerequisites\ncreates confusion and incorrect test scenarios.\n\n## Core Concept\n\nPrerequisites create an execution dependency graph for API operations. They\nexplicitly declare which APIs must succeed before attempting the current\noperation, preventing invalid states and ensuring data consistency.\n\n## Structure\n\nEach prerequisite consists of:\n\n1. **endpoint**: The API endpoint that must be called first\n2. **description**: Clear explanation of why this prerequisite is required\n\n## Common Use Cases\n\n### 1. Resource Existence Validation\n\n```typescript\n{\n \"endpoint\": { \"path\": \"/users/{userId}\", \"method\": \"get\" },\n \"description\": \"User must exist before updating their profile\"\n}\n```\n\n### 2. Parent-Child Relationships\n\n```typescript\n{\n \"endpoint\": { \"path\": \"/posts/{postId}\", \"method\": \"get\" },\n \"description\": \"Post must exist before adding comments\"\n}\n```\n\n### 3. State Prerequisites\n\n```typescript\n{\n \"endpoint\": { \"path\": \"/orders/{orderId}/status\", \"method\": \"get\" },\n \"description\": \"Order must be in 'confirmed' state before shipping\"\n}\n```\n\n### 4. Business Logic Dependencies\n\n```typescript\n{\n \"endpoint\": {\n \"path\": \"/inventory/{productId}/stock\",\n \"method\": \"get\"\n },\n \"description\": \"Product must have sufficient stock before creating order\"\n}\n```\n\n## Implementation Guidelines\n\n1. **Clear Descriptions**: Always explain WHY the prerequisite is needed\n2. **Minimal Dependencies**: Only include truly necessary prerequisites\n3. **Logical Order**: If multiple prerequisites exist, order them logically\n4. **Error Context**: Description should help understand failure scenarios\n5. **No Authentication**: Prerequisites must NEVER be authentication checks\n\n## Test Generation Usage\n\nThe Test Agent utilizes prerequisites to:\n\n- Set up test data in the correct sequence\n- Generate realistic test scenarios\n- Create both positive and negative test cases\n- Ensure proper cleanup in reverse dependency order\n\n## Best Practices\n\n- Keep prerequisite chains as short as possible for performance\n- Consider caching prerequisite results when safe to do so\n- Ensure prerequisite descriptions are specific, not generic\n- Validate that circular dependencies don't exist\n- Document any side effects of prerequisite calls\n- NEVER use for authentication/authorization validation",
|
|
1906
|
+
type: "object",
|
|
1907
|
+
properties: {
|
|
1908
|
+
endpoint: {
|
|
1909
|
+
description: "The API endpoint that must be called before the main operation.\n\nThis specifies the exact HTTP method and path of the prerequisite API.\nThe endpoint must be a valid operation defined elsewhere in the API\nspecification. Path parameters in the prerequisite endpoint can reference\nthe same parameters available in the main operation.",
|
|
1910
|
+
$ref: "#/$defs/AutoBeOpenApi.IEndpoint"
|
|
1911
|
+
},
|
|
1912
|
+
description: {
|
|
1913
|
+
description: "Clear description of why this prerequisite is required.\n\nThis description should explain:\n\n- What validation or check this prerequisite performs\n- What state or condition must be satisfied\n- What happens if this prerequisite fails\n- Any specific data from the prerequisite used by the main operation\n\nThe description helps developers understand the dependency relationship\nand aids in debugging when prerequisites fail.\n\nGuidelines for good descriptions:\n\n- Be specific about the requirement (e.g., \"must be in 'active' state\")\n- Explain business logic constraints (e.g., \"budget must not be exceeded\")\n- Explain data dependencies (e.g., \"provides pricing information needed\")\n- Keep it concise but complete\n\n> MUST be written in English. Never use other languages.",
|
|
1914
|
+
type: "string"
|
|
1915
|
+
}
|
|
1916
|
+
},
|
|
1917
|
+
required: [
|
|
1918
|
+
"endpoint",
|
|
1919
|
+
"description"
|
|
1920
|
+
]
|
|
1921
|
+
}
|
|
1922
|
+
}
|
|
1923
|
+
},
|
|
1924
|
+
description: "Process prerequisite analysis task or preliminary data requests.\n\nAnalyzes each operation's dependencies and returns complete list with\nrequired prerequisite chains based on resource relationships.",
|
|
1925
|
+
validate: (() => { const _io0 = input => "string" === typeof input.thinking && ("object" === typeof input.request && null !== input.request && _iu0(input.request)); const _io1 = input => "getAnalysisFiles" === input.type && (Array.isArray(input.fileNames) && (1 <= input.fileNames.length && input.fileNames.every(elem => "string" === typeof elem))); const _io2 = input => "getInterfaceOperations" === input.type && (Array.isArray(input.endpoints) && (1 <= input.endpoints.length && input.endpoints.every(elem => "object" === typeof elem && null !== elem && _io3(elem)))); const _io3 = input => "string" === typeof input.path && RegExp("^\\/[a-zA-Z0-9\\/_{}.-]*$").test(input.path) && ("get" === input.method || "post" === input.method || "put" === input.method || "delete" === input.method || "patch" === input.method); const _io4 = input => "getInterfaceSchemas" === input.type && (Array.isArray(input.typeNames) && (1 <= input.typeNames.length && input.typeNames.every(elem => "string" === typeof elem))); const _io5 = input => "getPrismaSchemas" === input.type && (Array.isArray(input.schemaNames) && (1 <= input.schemaNames.length && input.schemaNames.every(elem => "string" === typeof elem))); const _io6 = input => "complete" === input.type && (Array.isArray(input.operations) && input.operations.every(elem => "object" === typeof elem && null !== elem && _io7(elem))); const _io7 = input => "object" === typeof input.endpoint && null !== input.endpoint && _io3(input.endpoint) && (Array.isArray(input.prerequisites) && input.prerequisites.every(elem => "object" === typeof elem && null !== elem && _io8(elem))); const _io8 = input => "object" === typeof input.endpoint && null !== input.endpoint && _io3(input.endpoint) && "string" === typeof input.description; const _iu0 = input => (() => {
|
|
1926
|
+
if ("getAnalysisFiles" === input.type)
|
|
1927
|
+
return _io1(input);
|
|
1928
|
+
else if ("getInterfaceOperations" === input.type)
|
|
1929
|
+
return _io2(input);
|
|
1930
|
+
else if ("getInterfaceSchemas" === input.type)
|
|
1931
|
+
return _io4(input);
|
|
1932
|
+
else if ("getPrismaSchemas" === input.type)
|
|
1933
|
+
return _io5(input);
|
|
1934
|
+
else if ("complete" === input.type)
|
|
1935
|
+
return _io6(input);
|
|
1936
|
+
else
|
|
1937
|
+
return false;
|
|
1938
|
+
})(); const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.thinking || _report(_exceptionable, {
|
|
1939
|
+
path: _path + ".thinking",
|
|
1940
|
+
expected: "string",
|
|
1941
|
+
value: input.thinking
|
|
1942
|
+
}), ("object" === typeof input.request && null !== input.request || _report(_exceptionable, {
|
|
1943
|
+
path: _path + ".request",
|
|
1944
|
+
expected: "(IAutoBeInterfacePrerequisiteApplication.IComplete | IAutoBePreliminaryGetAnalysisFiles | IAutoBePreliminaryGetInterfaceOperations | IAutoBePreliminaryGetInterfaceSchemas | IAutoBePreliminaryGetPrismaSchemas)",
|
|
1945
|
+
value: input.request
|
|
1946
|
+
})) && _vu0(input.request, _path + ".request", true && _exceptionable) || _report(_exceptionable, {
|
|
1947
|
+
path: _path + ".request",
|
|
1948
|
+
expected: "(IAutoBeInterfacePrerequisiteApplication.IComplete | IAutoBePreliminaryGetAnalysisFiles | IAutoBePreliminaryGetInterfaceOperations | IAutoBePreliminaryGetInterfaceSchemas | IAutoBePreliminaryGetPrismaSchemas)",
|
|
1949
|
+
value: input.request
|
|
1950
|
+
})].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => ["getAnalysisFiles" === input.type || _report(_exceptionable, {
|
|
1951
|
+
path: _path + ".type",
|
|
1952
|
+
expected: "\"getAnalysisFiles\"",
|
|
1953
|
+
value: input.type
|
|
1954
|
+
}), (Array.isArray(input.fileNames) || _report(_exceptionable, {
|
|
1955
|
+
path: _path + ".fileNames",
|
|
1956
|
+
expected: "(Array<string> & MinItems<1>)",
|
|
1957
|
+
value: input.fileNames
|
|
1958
|
+
})) && ((1 <= input.fileNames.length || _report(_exceptionable, {
|
|
1959
|
+
path: _path + ".fileNames",
|
|
1960
|
+
expected: "Array<> & MinItems<1>",
|
|
1961
|
+
value: input.fileNames
|
|
1962
|
+
})) && input.fileNames.map((elem, _index7) => "string" === typeof elem || _report(_exceptionable, {
|
|
1963
|
+
path: _path + ".fileNames[" + _index7 + "]",
|
|
1964
|
+
expected: "string",
|
|
1965
|
+
value: elem
|
|
1966
|
+
})).every(flag => flag)) || _report(_exceptionable, {
|
|
1967
|
+
path: _path + ".fileNames",
|
|
1968
|
+
expected: "(Array<string> & MinItems<1>)",
|
|
1969
|
+
value: input.fileNames
|
|
1970
|
+
})].every(flag => flag); const _vo2 = (input, _path, _exceptionable = true) => ["getInterfaceOperations" === input.type || _report(_exceptionable, {
|
|
1971
|
+
path: _path + ".type",
|
|
1972
|
+
expected: "\"getInterfaceOperations\"",
|
|
1973
|
+
value: input.type
|
|
1974
|
+
}), (Array.isArray(input.endpoints) || _report(_exceptionable, {
|
|
1975
|
+
path: _path + ".endpoints",
|
|
1976
|
+
expected: "(Array<AutoBeOpenApi.IEndpoint> & MinItems<1>)",
|
|
1977
|
+
value: input.endpoints
|
|
1978
|
+
})) && ((1 <= input.endpoints.length || _report(_exceptionable, {
|
|
1979
|
+
path: _path + ".endpoints",
|
|
1980
|
+
expected: "Array<> & MinItems<1>",
|
|
1981
|
+
value: input.endpoints
|
|
1982
|
+
})) && input.endpoints.map((elem, _index8) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
1983
|
+
path: _path + ".endpoints[" + _index8 + "]",
|
|
1984
|
+
expected: "AutoBeOpenApi.IEndpoint",
|
|
1985
|
+
value: elem
|
|
1986
|
+
})) && _vo3(elem, _path + ".endpoints[" + _index8 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
1987
|
+
path: _path + ".endpoints[" + _index8 + "]",
|
|
1988
|
+
expected: "AutoBeOpenApi.IEndpoint",
|
|
1989
|
+
value: elem
|
|
1990
|
+
})).every(flag => flag)) || _report(_exceptionable, {
|
|
1991
|
+
path: _path + ".endpoints",
|
|
1992
|
+
expected: "(Array<AutoBeOpenApi.IEndpoint> & MinItems<1>)",
|
|
1993
|
+
value: input.endpoints
|
|
1994
|
+
})].every(flag => flag); const _vo3 = (input, _path, _exceptionable = true) => ["string" === typeof input.path && (RegExp("^\\/[a-zA-Z0-9\\/_{}.-]*$").test(input.path) || _report(_exceptionable, {
|
|
1995
|
+
path: _path + ".path",
|
|
1996
|
+
expected: "string & Pattern<\"^\\\\/[a-zA-Z0-9\\\\/_{}.-]*$\">",
|
|
1997
|
+
value: input.path
|
|
1998
|
+
})) || _report(_exceptionable, {
|
|
1999
|
+
path: _path + ".path",
|
|
2000
|
+
expected: "(string & Pattern<\"^\\\\/[a-zA-Z0-9\\\\/_{}.-]*$\">)",
|
|
2001
|
+
value: input.path
|
|
2002
|
+
}), "get" === input.method || "post" === input.method || "put" === input.method || "delete" === input.method || "patch" === input.method || _report(_exceptionable, {
|
|
2003
|
+
path: _path + ".method",
|
|
2004
|
+
expected: "(\"delete\" | \"get\" | \"patch\" | \"post\" | \"put\")",
|
|
2005
|
+
value: input.method
|
|
2006
|
+
})].every(flag => flag); const _vo4 = (input, _path, _exceptionable = true) => ["getInterfaceSchemas" === input.type || _report(_exceptionable, {
|
|
2007
|
+
path: _path + ".type",
|
|
2008
|
+
expected: "\"getInterfaceSchemas\"",
|
|
2009
|
+
value: input.type
|
|
2010
|
+
}), (Array.isArray(input.typeNames) || _report(_exceptionable, {
|
|
2011
|
+
path: _path + ".typeNames",
|
|
2012
|
+
expected: "(Array<string> & MinItems<1>)",
|
|
2013
|
+
value: input.typeNames
|
|
2014
|
+
})) && ((1 <= input.typeNames.length || _report(_exceptionable, {
|
|
2015
|
+
path: _path + ".typeNames",
|
|
2016
|
+
expected: "Array<> & MinItems<1>",
|
|
2017
|
+
value: input.typeNames
|
|
2018
|
+
})) && input.typeNames.map((elem, _index9) => "string" === typeof elem || _report(_exceptionable, {
|
|
2019
|
+
path: _path + ".typeNames[" + _index9 + "]",
|
|
2020
|
+
expected: "string",
|
|
2021
|
+
value: elem
|
|
2022
|
+
})).every(flag => flag)) || _report(_exceptionable, {
|
|
2023
|
+
path: _path + ".typeNames",
|
|
2024
|
+
expected: "(Array<string> & MinItems<1>)",
|
|
2025
|
+
value: input.typeNames
|
|
2026
|
+
})].every(flag => flag); const _vo5 = (input, _path, _exceptionable = true) => ["getPrismaSchemas" === input.type || _report(_exceptionable, {
|
|
2027
|
+
path: _path + ".type",
|
|
2028
|
+
expected: "\"getPrismaSchemas\"",
|
|
2029
|
+
value: input.type
|
|
2030
|
+
}), (Array.isArray(input.schemaNames) || _report(_exceptionable, {
|
|
2031
|
+
path: _path + ".schemaNames",
|
|
2032
|
+
expected: "(Array<string> & MinItems<1>)",
|
|
2033
|
+
value: input.schemaNames
|
|
2034
|
+
})) && ((1 <= input.schemaNames.length || _report(_exceptionable, {
|
|
2035
|
+
path: _path + ".schemaNames",
|
|
2036
|
+
expected: "Array<> & MinItems<1>",
|
|
2037
|
+
value: input.schemaNames
|
|
2038
|
+
})) && input.schemaNames.map((elem, _index10) => "string" === typeof elem || _report(_exceptionable, {
|
|
2039
|
+
path: _path + ".schemaNames[" + _index10 + "]",
|
|
2040
|
+
expected: "string",
|
|
2041
|
+
value: elem
|
|
2042
|
+
})).every(flag => flag)) || _report(_exceptionable, {
|
|
2043
|
+
path: _path + ".schemaNames",
|
|
2044
|
+
expected: "(Array<string> & MinItems<1>)",
|
|
2045
|
+
value: input.schemaNames
|
|
2046
|
+
})].every(flag => flag); const _vo6 = (input, _path, _exceptionable = true) => ["complete" === input.type || _report(_exceptionable, {
|
|
2047
|
+
path: _path + ".type",
|
|
2048
|
+
expected: "\"complete\"",
|
|
2049
|
+
value: input.type
|
|
2050
|
+
}), (Array.isArray(input.operations) || _report(_exceptionable, {
|
|
2051
|
+
path: _path + ".operations",
|
|
2052
|
+
expected: "Array<IAutoBeInterfacePrerequisiteApplication.IOperation>",
|
|
2053
|
+
value: input.operations
|
|
2054
|
+
})) && input.operations.map((elem, _index11) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
2055
|
+
path: _path + ".operations[" + _index11 + "]",
|
|
2056
|
+
expected: "IAutoBeInterfacePrerequisiteApplication.IOperation",
|
|
2057
|
+
value: elem
|
|
2058
|
+
})) && _vo7(elem, _path + ".operations[" + _index11 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
2059
|
+
path: _path + ".operations[" + _index11 + "]",
|
|
2060
|
+
expected: "IAutoBeInterfacePrerequisiteApplication.IOperation",
|
|
2061
|
+
value: elem
|
|
2062
|
+
})).every(flag => flag) || _report(_exceptionable, {
|
|
2063
|
+
path: _path + ".operations",
|
|
2064
|
+
expected: "Array<IAutoBeInterfacePrerequisiteApplication.IOperation>",
|
|
2065
|
+
value: input.operations
|
|
2066
|
+
})].every(flag => flag); const _vo7 = (input, _path, _exceptionable = true) => [("object" === typeof input.endpoint && null !== input.endpoint || _report(_exceptionable, {
|
|
2067
|
+
path: _path + ".endpoint",
|
|
2068
|
+
expected: "AutoBeOpenApi.IEndpoint",
|
|
2069
|
+
value: input.endpoint
|
|
2070
|
+
})) && _vo3(input.endpoint, _path + ".endpoint", true && _exceptionable) || _report(_exceptionable, {
|
|
2071
|
+
path: _path + ".endpoint",
|
|
2072
|
+
expected: "AutoBeOpenApi.IEndpoint",
|
|
2073
|
+
value: input.endpoint
|
|
2074
|
+
}), (Array.isArray(input.prerequisites) || _report(_exceptionable, {
|
|
2075
|
+
path: _path + ".prerequisites",
|
|
2076
|
+
expected: "Array<AutoBeOpenApi.IPrerequisite>",
|
|
2077
|
+
value: input.prerequisites
|
|
2078
|
+
})) && input.prerequisites.map((elem, _index12) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
2079
|
+
path: _path + ".prerequisites[" + _index12 + "]",
|
|
2080
|
+
expected: "AutoBeOpenApi.IPrerequisite",
|
|
2081
|
+
value: elem
|
|
2082
|
+
})) && _vo8(elem, _path + ".prerequisites[" + _index12 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
2083
|
+
path: _path + ".prerequisites[" + _index12 + "]",
|
|
2084
|
+
expected: "AutoBeOpenApi.IPrerequisite",
|
|
2085
|
+
value: elem
|
|
2086
|
+
})).every(flag => flag) || _report(_exceptionable, {
|
|
2087
|
+
path: _path + ".prerequisites",
|
|
2088
|
+
expected: "Array<AutoBeOpenApi.IPrerequisite>",
|
|
2089
|
+
value: input.prerequisites
|
|
2090
|
+
})].every(flag => flag); const _vo8 = (input, _path, _exceptionable = true) => [("object" === typeof input.endpoint && null !== input.endpoint || _report(_exceptionable, {
|
|
2091
|
+
path: _path + ".endpoint",
|
|
2092
|
+
expected: "AutoBeOpenApi.IEndpoint",
|
|
2093
|
+
value: input.endpoint
|
|
2094
|
+
})) && _vo3(input.endpoint, _path + ".endpoint", true && _exceptionable) || _report(_exceptionable, {
|
|
2095
|
+
path: _path + ".endpoint",
|
|
2096
|
+
expected: "AutoBeOpenApi.IEndpoint",
|
|
2097
|
+
value: input.endpoint
|
|
2098
|
+
}), "string" === typeof input.description || _report(_exceptionable, {
|
|
2099
|
+
path: _path + ".description",
|
|
2100
|
+
expected: "string",
|
|
2101
|
+
value: input.description
|
|
2102
|
+
})].every(flag => flag); const _vu0 = (input, _path, _exceptionable = true) => (() => {
|
|
2103
|
+
if ("getAnalysisFiles" === input.type)
|
|
2104
|
+
return _vo1(input, _path, true && _exceptionable);
|
|
2105
|
+
else if ("getInterfaceOperations" === input.type)
|
|
2106
|
+
return _vo2(input, _path, true && _exceptionable);
|
|
2107
|
+
else if ("getInterfaceSchemas" === input.type)
|
|
2108
|
+
return _vo4(input, _path, true && _exceptionable);
|
|
2109
|
+
else if ("getPrismaSchemas" === input.type)
|
|
2110
|
+
return _vo5(input, _path, true && _exceptionable);
|
|
2111
|
+
else if ("complete" === input.type)
|
|
2112
|
+
return _vo6(input, _path, true && _exceptionable);
|
|
2113
|
+
else
|
|
2114
|
+
return _report(_exceptionable, {
|
|
2115
|
+
path: _path,
|
|
2116
|
+
expected: "(IAutoBePreliminaryGetAnalysisFiles | IAutoBePreliminaryGetInterfaceOperations | IAutoBePreliminaryGetInterfaceSchemas | IAutoBePreliminaryGetPrismaSchemas | IAutoBeInterfacePrerequisiteApplication.IComplete)",
|
|
2117
|
+
value: input
|
|
2118
|
+
});
|
|
2119
|
+
})(); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
|
|
2120
|
+
if (false === __is(input)) {
|
|
2121
|
+
errors = [];
|
|
2122
|
+
_report = __typia_transform__validateReport._validateReport(errors);
|
|
2123
|
+
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
|
|
2124
|
+
path: _path + "",
|
|
2125
|
+
expected: "IAutoBeInterfacePrerequisiteApplication.IProps",
|
|
2126
|
+
value: input
|
|
2127
|
+
})) && _vo0(input, _path + "", true) || _report(true, {
|
|
2128
|
+
path: _path + "",
|
|
2129
|
+
expected: "IAutoBeInterfacePrerequisiteApplication.IProps",
|
|
2130
|
+
value: input
|
|
2131
|
+
}))(input, "$input", true);
|
|
2132
|
+
const success = 0 === errors.length;
|
|
2133
|
+
return success ? {
|
|
2134
|
+
success,
|
|
2135
|
+
data: input
|
|
2136
|
+
} : {
|
|
2137
|
+
success,
|
|
2138
|
+
errors,
|
|
2139
|
+
data: input
|
|
2140
|
+
};
|
|
2141
|
+
}
|
|
2142
|
+
return {
|
|
2143
|
+
success: true,
|
|
2144
|
+
data: input
|
|
2145
|
+
};
|
|
2146
|
+
}; })()
|
|
2147
|
+
}
|
|
2148
|
+
]
|
|
2149
|
+
};
|
|
2150
|
+
__typia_transform__llmApplicationFinalize._llmApplicationFinalize(application, Object.assign(Object.assign({}, {
|
|
2151
|
+
validate: {
|
|
2152
|
+
process: validate,
|
|
2153
|
+
},
|
|
2154
|
+
}), { equals: false }));
|
|
2155
|
+
return application;
|
|
2156
|
+
})(),
|
|
2157
|
+
};
|
|
2158
|
+
const SOURCE = "interfacePrerequisite";
|
|
2159
|
+
//# sourceMappingURL=orchestrateInterfacePrerequisite.js.map
|