@autobe/agent 0.28.1 → 0.29.1
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 +5 -4
- 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 +13 -13
- package/lib/factory/createAutoBeContext.js.map +1 -1
- package/lib/index.mjs +43499 -23744
- 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 +2 -1
- 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 +10 -5
- 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/factory/AutoBeFunctionCallingMetricFactory.d.ts +0 -7
- package/lib/factory/AutoBeFunctionCallingMetricFactory.js +0 -35
- package/lib/factory/AutoBeFunctionCallingMetricFactory.js.map +0 -1
- package/lib/factory/AutoBeProcessAggregateFactory.d.ts +0 -13
- package/lib/factory/AutoBeProcessAggregateFactory.js +0 -100
- package/lib/factory/AutoBeProcessAggregateFactory.js.map +0 -1
- 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/lib/utils/TokenUsageComputer.d.ts +0 -5
- package/lib/utils/TokenUsageComputer.js +0 -29
- package/lib/utils/TokenUsageComputer.js.map +0 -1
- package/src/factory/AutoBeFunctionCallingMetricFactory.ts +0 -44
- package/src/factory/AutoBeProcessAggregateFactory.ts +0 -141
- 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
- package/src/utils/TokenUsageComputer.ts +0 -35
|
@@ -45,7 +45,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
45
45
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
46
46
|
};
|
|
47
47
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
|
-
exports.
|
|
48
|
+
exports.orchestrateInterfaceOperation = orchestrateInterfaceOperation;
|
|
49
49
|
const __typia_transform__validateReport = __importStar(require("typia/lib/internal/_validateReport.js"));
|
|
50
50
|
const __typia_transform__llmApplicationFinalize = __importStar(require("typia/lib/internal/_llmApplicationFinalize.js"));
|
|
51
51
|
const utils_1 = require("@autobe/utils");
|
|
@@ -56,15 +56,15 @@ const uuid_1 = require("uuid");
|
|
|
56
56
|
const assertSchemaModel_1 = require("../../context/assertSchemaModel");
|
|
57
57
|
const divideArray_1 = require("../../utils/divideArray");
|
|
58
58
|
const executeCachedBatch_1 = require("../../utils/executeCachedBatch");
|
|
59
|
-
const
|
|
60
|
-
const
|
|
59
|
+
const AutoBePreliminaryController_1 = require("../common/AutoBePreliminaryController");
|
|
60
|
+
const transformInterfaceOperationHistory_1 = require("./histories/transformInterfaceOperationHistory");
|
|
61
|
+
const orchestrateInterfaceOperationReview_1 = require("./orchestrateInterfaceOperationReview");
|
|
61
62
|
const OperationValidator_1 = require("./utils/OperationValidator");
|
|
62
|
-
function
|
|
63
|
+
function orchestrateInterfaceOperation(ctx, props) {
|
|
63
64
|
return __awaiter(this, void 0, void 0, function* () {
|
|
64
|
-
var _a;
|
|
65
65
|
const matrix = (0, divideArray_1.divideArray)({
|
|
66
66
|
array: props.endpoints,
|
|
67
|
-
capacity:
|
|
67
|
+
capacity: 2 /* AutoBeConfigConstant.INTERFACE_CAPACITY */,
|
|
68
68
|
});
|
|
69
69
|
const progress = {
|
|
70
70
|
total: matrix.flat().length,
|
|
@@ -74,7 +74,7 @@ function orchestrateInterfaceOperations(ctx, props) {
|
|
|
74
74
|
total: matrix.length,
|
|
75
75
|
completed: 0,
|
|
76
76
|
};
|
|
77
|
-
return (yield (0, executeCachedBatch_1.executeCachedBatch)(matrix.map((it) => (promptCacheKey) => __awaiter(this, void 0, void 0, function* () {
|
|
77
|
+
return (yield (0, executeCachedBatch_1.executeCachedBatch)(ctx, matrix.map((it) => (promptCacheKey) => __awaiter(this, void 0, void 0, function* () {
|
|
78
78
|
const row = yield divideAndConquer(ctx, {
|
|
79
79
|
endpoints: it,
|
|
80
80
|
progress,
|
|
@@ -106,7 +106,7 @@ function divideAndConquer(ctx, props) {
|
|
|
106
106
|
remained.erase(item);
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
|
-
const newbie = yield (0,
|
|
109
|
+
const newbie = yield (0, orchestrateInterfaceOperationReview_1.orchestrateInterfaceOperationReview)(ctx, unique.toJSON().map((it) => it.second), props.reviewProgress);
|
|
110
110
|
for (const item of newbie)
|
|
111
111
|
unique.set(item, item);
|
|
112
112
|
return unique.toJSON().map((it) => it.second);
|
|
@@ -114,88 +114,622 @@ function divideAndConquer(ctx, props) {
|
|
|
114
114
|
}
|
|
115
115
|
function process(ctx, props) {
|
|
116
116
|
return __awaiter(this, void 0, void 0, function* () {
|
|
117
|
-
var _a, _b, _c, _d;
|
|
118
117
|
const prefix = NamingConvention_1.NamingConvention.camel(ctx.state().analyze.prefix);
|
|
119
|
-
const
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
:
|
|
155
|
-
|
|
156
|
-
|
|
118
|
+
const preliminary = new AutoBePreliminaryController_1.AutoBePreliminaryController({
|
|
119
|
+
application: {
|
|
120
|
+
version: "3.1",
|
|
121
|
+
components: {
|
|
122
|
+
schemas: {
|
|
123
|
+
"IAutoBeInterfaceOperationApplication.IProps": {
|
|
124
|
+
type: "object",
|
|
125
|
+
properties: {
|
|
126
|
+
thinking: {
|
|
127
|
+
type: "string",
|
|
128
|
+
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."
|
|
129
|
+
},
|
|
130
|
+
request: {
|
|
131
|
+
oneOf: [
|
|
132
|
+
{
|
|
133
|
+
$ref: "#/components/schemas/IAutoBePreliminaryGetAnalysisFiles"
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
$ref: "#/components/schemas/IAutoBePreliminaryGetPrismaSchemas"
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
$ref: "#/components/schemas/IAutoBeInterfaceOperationApplication.IComplete"
|
|
140
|
+
}
|
|
141
|
+
],
|
|
142
|
+
discriminator: {
|
|
143
|
+
propertyName: "type",
|
|
144
|
+
mapping: {
|
|
145
|
+
getAnalysisFiles: "#/components/schemas/IAutoBePreliminaryGetAnalysisFiles",
|
|
146
|
+
getPrismaSchemas: "#/components/schemas/IAutoBePreliminaryGetPrismaSchemas",
|
|
147
|
+
complete: "#/components/schemas/IAutoBeInterfaceOperationApplication.IComplete"
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
description: "Type discriminator for the request.\n\nDetermines which action to perform: preliminary data retrieval\n(getAnalysisFiles, getPrismaSchemas) or final operation generation\n(complete). When preliminary returns empty array, that type is removed\nfrom the union, physically preventing repeated calls."
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
required: [
|
|
154
|
+
"thinking",
|
|
155
|
+
"request"
|
|
156
|
+
]
|
|
157
|
+
},
|
|
158
|
+
IAutoBePreliminaryGetAnalysisFiles: {
|
|
159
|
+
type: "object",
|
|
160
|
+
properties: {
|
|
161
|
+
type: {
|
|
162
|
+
"const": "getAnalysisFiles",
|
|
163
|
+
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."
|
|
164
|
+
},
|
|
165
|
+
fileNames: {
|
|
166
|
+
type: "array",
|
|
167
|
+
items: {
|
|
168
|
+
type: "string"
|
|
169
|
+
},
|
|
170
|
+
minItems: 1,
|
|
171
|
+
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."
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
required: [
|
|
175
|
+
"type",
|
|
176
|
+
"fileNames"
|
|
177
|
+
],
|
|
178
|
+
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."
|
|
179
|
+
},
|
|
180
|
+
IAutoBePreliminaryGetPrismaSchemas: {
|
|
181
|
+
type: "object",
|
|
182
|
+
properties: {
|
|
183
|
+
type: {
|
|
184
|
+
"const": "getPrismaSchemas",
|
|
185
|
+
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."
|
|
186
|
+
},
|
|
187
|
+
schemaNames: {
|
|
188
|
+
type: "array",
|
|
189
|
+
items: {
|
|
190
|
+
type: "string"
|
|
191
|
+
},
|
|
192
|
+
minItems: 1,
|
|
193
|
+
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."
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
required: [
|
|
197
|
+
"type",
|
|
198
|
+
"schemaNames"
|
|
199
|
+
],
|
|
200
|
+
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."
|
|
201
|
+
},
|
|
202
|
+
"IAutoBeInterfaceOperationApplication.IComplete": {
|
|
203
|
+
type: "object",
|
|
204
|
+
properties: {
|
|
205
|
+
type: {
|
|
206
|
+
"const": "complete",
|
|
207
|
+
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."
|
|
208
|
+
},
|
|
209
|
+
operations: {
|
|
210
|
+
type: "array",
|
|
211
|
+
items: {
|
|
212
|
+
$ref: "#/components/schemas/IAutoBeInterfaceOperationApplication.IOperation"
|
|
213
|
+
},
|
|
214
|
+
description: "Array of API operations to generate.\n\nEach operation in this array includes:\n\n- Specification: Detailed API specification with clear purpose and\n functionality\n- Path: Resource-centric URL path (e.g., \"/resources/{resourceId}\")\n- Method: HTTP method (get, post, put, delete, patch)\n- Description: Extremely detailed multi-paragraph description referencing\n Prisma schema comments\n- Summary: Concise one-sentence summary of the endpoint\n- Parameters: Array of all necessary parameters with descriptions and\n schema definitions\n- RequestBody: For POST/PUT/PATCH methods, with typeName referencing\n components.schemas\n- ResponseBody: With typeName referencing appropriate response type\n\nAll operations follow strict quality standards:\n\n1. Detailed descriptions referencing Prisma schema comments\n2. Accurate parameter definitions matching path parameters\n3. Appropriate request/response body type references\n4. Consistent patterns for CRUD operations\n\nFor list retrievals (typically PATCH), include pagination, search, and\nsorting. For detail retrieval (GET), return a single resource. For\ncreation (POST), use .ICreate request body. For modification (PUT), use\n.IUpdate request body."
|
|
215
|
+
}
|
|
216
|
+
},
|
|
217
|
+
required: [
|
|
218
|
+
"type",
|
|
219
|
+
"operations"
|
|
220
|
+
],
|
|
221
|
+
description: "Request to generate detailed API operations.\n\nExecutes operation generation to create complete API operations following\nREST principles and quality standards. Each operation includes specification,\npath, method, detailed description, summary, parameters, and request/response\nbodies."
|
|
222
|
+
},
|
|
223
|
+
"IAutoBeInterfaceOperationApplication.IOperation": {
|
|
224
|
+
type: "object",
|
|
225
|
+
properties: {
|
|
226
|
+
specification: {
|
|
227
|
+
type: "string",
|
|
228
|
+
description: "Specification of the API operation.\n\nBefore defining the API operation interface, please describe what you're\nplanning to write in this `specification` field.\n\nThe specification must be fully detailed and clear, so that anyone can\nunderstand the purpose and functionality of the API operation and its\nrelated components (e.g., {@link path}, {@link parameters},\n{@link requestBody}).\n\nIMPORTANT: The specification MUST identify which Prisma DB table this\noperation is associated with, helping ensure complete coverage of all\ndatabase entities."
|
|
229
|
+
},
|
|
230
|
+
description: {
|
|
231
|
+
type: "string",
|
|
232
|
+
description: "Detailed description about the API operation.\n\nIMPORTANT: This field MUST be extensively detailed and MUST reference the\ndescription comments from the related Prisma DB schema tables and\ncolumns. The description should be organized into MULTIPLE PARAGRAPHS\nseparated by line breaks to improve readability and comprehension.\n\nFor example, include separate paragraphs for:\n\n- The purpose and overview of the API operation\n- Security considerations and user permissions\n- Relationship to underlying database entities\n- Validation rules and business logic\n- Related API operations that might be used together with this one\n- Expected behavior and error handling\n\nWhen writing the description, be sure to incorporate the corresponding DB\nschema's description comments, matching the level of detail and style of\nthose comments. This ensures consistency between the API documentation\nand database structure.\n\nIf there's a dependency to other APIs, please describe the dependency API\noperation in this field with detailed reason. For example, if this API\noperation needs a pre-execution of other API operation, it must be\nexplicitly described.\n\n- `GET /shoppings/customers/sales` must be pre-executed to get entire list\n of summarized sales. Detailed sale information would be obtained by\n specifying the sale ID in the path parameter.\n\n**CRITICAL WARNING about soft delete keywords**: DO NOT use terms like\n\"soft delete\", \"soft-delete\", or similar variations in this description\nUNLESS the operation actually implements soft deletion. These keywords\ntrigger validation logic that expects a corresponding soft_delete_column\nto be specified. Only use these terms when you intend to implement soft\ndeletion (marking records as deleted without removing them from the\ndatabase).\n\nExample of problematic description: \u274C \"This would normally be a\nsoft-delete, but we intentionally perform permanent deletion here\" - This\ntriggers soft delete validation despite being a hard delete operation.\n\n> MUST be written in English. Never use other languages."
|
|
233
|
+
},
|
|
234
|
+
summary: {
|
|
235
|
+
type: "string",
|
|
236
|
+
description: "Short summary of the API operation.\n\nThis should be a concise description of the API operation, typically one\nsentence long. It should provide a quick overview of what the API does\nwithout going into too much detail.\n\nThis summary will be used in the OpenAPI documentation to give users a\nquick understanding of the API operation's purpose.\n\nIMPORTANT: The summary should clearly indicate which Prisma DB table this\noperation relates to, helping to ensure all tables have API coverage.\n\n**CRITICAL WARNING about soft delete keywords**: DO NOT use terms like\n\"soft delete\", \"soft-delete\", or similar variations in this summary\nUNLESS the operation actually implements soft deletion. These keywords\ntrigger validation logic that expects a corresponding soft_delete_column\nto be specified. Only use these terms when you intend to implement soft\ndeletion (marking records as deleted without removing them from the\ndatabase).\n\n> MUST be written in English. Never use other languages"
|
|
237
|
+
},
|
|
238
|
+
parameters: {
|
|
239
|
+
type: "array",
|
|
240
|
+
items: {
|
|
241
|
+
$ref: "#/components/schemas/AutoBeOpenApi.IParameter"
|
|
242
|
+
},
|
|
243
|
+
description: "List of path parameters.\n\nNote that, the {@link AutoBeOpenApi.IParameter.name identifier name} of\npath parameter must be corresponded to the\n{@link path API operation path}.\n\nFor example, if there's an API operation which has {@link path} of\n`/shoppings/customers/sales/{saleId}/questions/${questionId}/comments/${commentId}`,\nits list of {@link AutoBeOpenApi.IParameter.name path parameters} must be\nlike:\n\n- `saleId`\n- `questionId`\n- `commentId`"
|
|
244
|
+
},
|
|
245
|
+
requestBody: {
|
|
246
|
+
oneOf: [
|
|
247
|
+
{
|
|
248
|
+
type: "null"
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
$ref: "#/components/schemas/AutoBeOpenApi.IRequestBody"
|
|
252
|
+
}
|
|
253
|
+
],
|
|
254
|
+
description: "Request body of the API operation.\n\nDefines the payload structure for the request. Contains a description and\nschema reference to define the expected input data.\n\nShould be `null` for operations that don't require a request body, such\nas most \"get\" operations."
|
|
255
|
+
},
|
|
256
|
+
responseBody: {
|
|
257
|
+
oneOf: [
|
|
258
|
+
{
|
|
259
|
+
type: "null"
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
$ref: "#/components/schemas/AutoBeOpenApi.IResponseBody"
|
|
263
|
+
}
|
|
264
|
+
],
|
|
265
|
+
description: "Response body of the API operation.\n\nDefines the structure of the successful response data. Contains a\ndescription and schema reference for the returned data.\n\nShould be null for operations that don't return any data."
|
|
266
|
+
},
|
|
267
|
+
name: {
|
|
268
|
+
type: "string",
|
|
269
|
+
pattern: "^[a-z][a-zA-Z0-9]*$",
|
|
270
|
+
description: "Functional name of the API endpoint.\n\nThis is a semantic identifier that represents the primary function or\npurpose of the API endpoint. It serves as a canonical name that can be\nused for code generation, SDK method names, and internal references.\n\n## Reserved Word Restrictions\n\nCRITICAL: The name MUST NOT be a TypeScript/JavaScript reserved word, as\nit will be used as a class method name in generated code. Avoid names\nlike:\n\n- `delete`, `for`, `if`, `else`, `while`, `do`, `switch`, `case`, `break`\n- `continue`, `function`, `return`, `with`, `in`, `of`, `instanceof`\n- `typeof`, `void`, `var`, `let`, `const`, `class`, `extends`, `import`\n- `export`, `default`, `try`, `catch`, `finally`, `throw`, `new`\n- `super`, `this`, `null`, `true`, `false`, `async`, `await`\n- `yield`, `static`, `private`, `protected`, `public`, `implements`\n- `interface`, `package`, `enum`, `debugger`\n\nInstead, use alternative names for these operations:\n\n- Use `erase` instead of `delete`\n- Use `iterate` instead of `for`\n- Use `when` instead of `if`\n- Use `cls` instead of `class`\n\n## Standard Endpoint Names\n\nUse these conventional names based on the endpoint's primary function:\n\n- **`index`**: List/search operations that return multiple entities\n\n - Typically used with PATCH method for complex queries\n - Example: `PATCH /users` \u2192 `name: \"index\"`\n- **`at`**: Retrieve a specific entity by identifier\n\n - Typically used with GET method on single resource\n - Example: `GET /users/{userId}` \u2192 `name: \"at\"`\n- **`create`**: Create a new entity\n\n - Typically used with POST method\n - Example: `POST /users` \u2192 `name: \"create\"`\n- **`update`**: Update an existing entity\n\n - Typically used with PUT method\n - Example: `PUT /users/{userId}` \u2192 `name: \"update\"`\n- **`erase`**: Delete/remove an entity (NOT `delete` - reserved word!)\n\n - Typically used with DELETE method\n - Example: `DELETE /users/{userId}` \u2192 `name: \"erase\"`\n\n## Custom Endpoint Names\n\nFor specialized operations beyond basic CRUD, use descriptive verbs:\n\n- **`activate`**: Enable or turn on a feature/entity\n- **`deactivate`**: Disable or turn off a feature/entity\n- **`approve`**: Approve a request or entity\n- **`reject`**: Reject a request or entity\n- **`publish`**: Make content publicly available\n- **`archive`**: Move to archived state\n- **`restore`**: Restore from archived/deleted state\n- **`duplicate`**: Create a copy of an entity\n- **`transfer`**: Move ownership or change assignment\n- **`validate`**: Validate data or state\n- **`process`**: Execute a business process or workflow\n- **`export`**: Generate downloadable data\n- **`import`**: Process uploaded data\n\n## Naming Guidelines\n\n- MUST use camelCase naming convention\n- Use singular verb forms\n- Be concise but descriptive\n- Avoid abbreviations unless widely understood\n- Ensure the name clearly represents the endpoint's primary action\n- For nested resources, focus on the action rather than hierarchy\n- NEVER use JavaScript/TypeScript reserved words\n\nValid Examples:\n\n- `index`, `create`, `update`, `erase` (single word)\n- `updatePassword`, `cancelOrder`, `publishArticle` (camelCase)\n- `validateEmail`, `generateReport`, `exportData` (camelCase)\n\nInvalid Examples:\n\n- `update_password` (snake_case not allowed)\n- `UpdatePassword` (PascalCase not allowed)\n- `update-password` (kebab-case not allowed)\n\nPath to Name Examples:\n\n- `GET /shopping/orders/{orderId}/items` \u2192 `name: \"index\"` (lists items)\n- `POST /shopping/orders/{orderId}/cancel` \u2192 `name: \"cancel\"`\n- `PUT /users/{userId}/password` \u2192 `name: \"updatePassword\"`\n\n## Uniqueness Rule\n\nThe `name` must be unique within the API's accessor namespace. The\naccessor is formed by combining the path segments (excluding parameters)\nwith the operation name.\n\nAccessor formation:\n\n1. Extract non-parameter segments from the path (remove `{...}` parts)\n2. Join segments with dots\n3. Append the operation name\n\nExamples:\n\n- Path: `/shopping/sale/{saleId}/review/{reviewId}`, Name: `at` \u2192 Accessor:\n `shopping.sale.review.at`\n- Path: `/users/{userId}/posts`, Name: `index` \u2192 Accessor:\n `users.posts.index`\n- Path: `/auth/login`, Name: `signIn` \u2192 Accessor: `auth.login.signIn`\n\nEach accessor must be globally unique across the entire API. This ensures\noperations can be uniquely identified in generated SDKs and prevents\nnaming conflicts."
|
|
271
|
+
},
|
|
272
|
+
authorizationActors: {
|
|
273
|
+
type: "array",
|
|
274
|
+
items: {
|
|
275
|
+
type: "string",
|
|
276
|
+
pattern: "^[a-z][a-zA-Z0-9]*$",
|
|
277
|
+
minLength: 1
|
|
278
|
+
},
|
|
279
|
+
description: "Authorization actors required to access this API operation.\n\nThis field specifies which user actors are allowed to access this\nendpoint. Multiple actors can be specified to allow different types of\nusers to access the same endpoint.\n\n## \u26A0\uFE0F CRITICAL: Actor Multiplication Effect\n\n**EACH ACTOR IN THIS ARRAY GENERATES A SEPARATE ENDPOINT**\n\n- If you specify `[\"admin\", \"moderator\", \"member\"]`, this creates 3\n separate endpoints\n- Total generated endpoints = operations \u00D7 average actors.length\n- Example: 100 operations with 3 actors each = 300 actual endpoints\n\n## \uD83D\uDD34 AVOID OVER-GENERATION\n\n**DO NOT create actor-specific endpoints when a public endpoint would\nsuffice:**\n\n- \u274C BAD: Separate GET endpoints for admin, member, moderator to view the\n same public data\n- \u2705 GOOD: Single public endpoint `[]` with actor-based filtering in\n business logic\n\n**DO NOT enumerate all possible actors when the Prisma schema uses a\nsingle User table:**\n\n- If Prisma has a User table with role/permission fields, you likely only\n need `[\"user\"]`\n- Avoid listing `[\"admin\", \"seller\", \"buyer\", \"moderator\", ...]`\n unnecessarily\n- The actual actor checking happens in business logic, not at the endpoint\n level\n\n## Naming Convention\n\nDO: Use camelCase for all actor names.\n\n## Important Guidelines\n\n- Set to empty array `[]` for public endpoints that require no\n authentication\n- Set to array with actor strings for actor-restricted endpoints\n- **MINIMIZE the number of actors per endpoint to prevent explosion**\n- Consider if the endpoint can be public with actor-based filtering instead\n- The actor names match exactly with the user type/actor defined in the\n database\n- This will be used by the Realize Agent to generate appropriate decorator\n and authorization logic in the provider functions\n- The controller will apply the corresponding authentication decorator\n based on these actors\n\n## Examples\n\n- `[]` - Public endpoint, no authentication required (PREFERRED for read\n operations)\n- `[\"user\"]` - Any authenticated user can access (PREFERRED for\n user-specific operations)\n- `[\"admin\"]` - Only admin users can access (USE SPARINGLY)\n- `[\"admin\", \"moderator\"]` - Both admin and moderator users can access\n (AVOID if possible)\n- `[\"seller\"]` - Only seller users can access (ONLY if Seller is a separate\n table)\n\n## Best Practices\n\n1. **Start with public `[]` for all read operations** unless sensitive data\n is involved\n2. **Use single actor `[\"user\"]` for authenticated operations** and handle\n permissions in business logic\n3. **Only use multiple actors when absolutely necessary** for different\n business logic paths\n4. **Remember: Fewer actors = Fewer endpoints = Better performance and\n maintainability**\n\nNote: The actual authentication/authorization implementation will be\nhandled by decorators at the controller level, and the provider function\nwill receive the authenticated user object with the appropriate type."
|
|
280
|
+
},
|
|
281
|
+
path: {
|
|
282
|
+
type: "string",
|
|
283
|
+
pattern: "^\\/[a-zA-Z0-9\\/_{}.-]*$",
|
|
284
|
+
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)"
|
|
285
|
+
},
|
|
286
|
+
method: {
|
|
287
|
+
oneOf: [
|
|
288
|
+
{
|
|
289
|
+
"const": "get"
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
"const": "post"
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
"const": "put"
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
"const": "delete"
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
"const": "patch"
|
|
302
|
+
}
|
|
303
|
+
],
|
|
304
|
+
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"
|
|
305
|
+
}
|
|
306
|
+
},
|
|
307
|
+
required: [
|
|
308
|
+
"specification",
|
|
309
|
+
"description",
|
|
310
|
+
"summary",
|
|
311
|
+
"parameters",
|
|
312
|
+
"requestBody",
|
|
313
|
+
"responseBody",
|
|
314
|
+
"name",
|
|
315
|
+
"authorizationActors",
|
|
316
|
+
"path",
|
|
317
|
+
"method"
|
|
318
|
+
],
|
|
319
|
+
description: "Operation of the Restful API.\n\nThis interface defines a single API endpoint with its HTTP {@link method},\n{@link path}, {@link parameters path parameters},\n{@link requestBody request body}, and {@link responseBody} structure. It\ncorresponds to an individual operation in the paths section of an OpenAPI\ndocument.\n\nEach operation requires a detailed explanation of its purpose through the\nreason and description fields, making it clear why the API was designed and\nhow it should be used.\n\nDO: Use object types for all request bodies and responses. DO: Reference\nnamed types defined in the components section. DO: Use `application/json`\nas the content-type. DO: Use `string & tags.Format<\"uri\">` in the schema\nfor file upload/download operations instead of binary data formats.\n\nIn OpenAPI, this might represent:\n\n```json\n{\n \"/shoppings/customers/orders\": {\n \"post\": {\n \"description\": \"Create a new order application from shopping cart...\",\n \"parameters\": [...],\n \"requestBody\": {...},\n \"responses\": {...}\n }\n }\n}\n```"
|
|
320
|
+
},
|
|
321
|
+
"AutoBeOpenApi.IParameter": {
|
|
322
|
+
type: "object",
|
|
323
|
+
properties: {
|
|
324
|
+
name: {
|
|
325
|
+
type: "string",
|
|
326
|
+
pattern: "^[a-z][a-zA-Z0-9]*$",
|
|
327
|
+
description: "Identifier name of the path parameter.\n\nThis name must match exactly with the parameter name in the route path.\nIt must be corresponded to the\n{@link AutoBeOpenApi.IOperation.path API operation path}.\n\nMUST use camelCase naming convention."
|
|
328
|
+
},
|
|
329
|
+
description: {
|
|
330
|
+
type: "string",
|
|
331
|
+
description: "Description about the path parameter.\n\nMake short, concise and clear description about the path parameter.\n\n> MUST be written in English. Never use other languages."
|
|
332
|
+
},
|
|
333
|
+
schema: {
|
|
334
|
+
oneOf: [
|
|
335
|
+
{
|
|
336
|
+
$ref: "#/components/schemas/AutoBeOpenApi.IJsonSchema.INumber"
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
$ref: "#/components/schemas/AutoBeOpenApi.IJsonSchema.IInteger"
|
|
340
|
+
},
|
|
341
|
+
{
|
|
342
|
+
$ref: "#/components/schemas/AutoBeOpenApi.IJsonSchema.IString"
|
|
343
|
+
}
|
|
344
|
+
],
|
|
345
|
+
discriminator: {
|
|
346
|
+
propertyName: "type",
|
|
347
|
+
mapping: {
|
|
348
|
+
number: "#/components/schemas/AutoBeOpenApi.IJsonSchema.INumber",
|
|
349
|
+
integer: "#/components/schemas/AutoBeOpenApi.IJsonSchema.IInteger",
|
|
350
|
+
string: "#/components/schemas/AutoBeOpenApi.IJsonSchema.IString"
|
|
351
|
+
}
|
|
352
|
+
},
|
|
353
|
+
description: "Type schema of the path parameter.\n\nPath parameters are typically primitive types like\n{@link AutoBeOpenApi.IJsonSchema.IString strings},\n{@link AutoBeOpenApi.IJsonSchema.IInteger integers},\n{@link AutoBeOpenApi.IJsonSchema.INumber numbers}.\n\nIf you need other types, please use request body instead with object type\nencapsulation."
|
|
354
|
+
}
|
|
355
|
+
},
|
|
356
|
+
required: [
|
|
357
|
+
"name",
|
|
358
|
+
"description",
|
|
359
|
+
"schema"
|
|
360
|
+
],
|
|
361
|
+
description: "Path parameter information for API routes.\n\nThis interface defines a path parameter that appears in the URL of an API\nendpoint. Path parameters are enclosed in curly braces in the\n{@link AutoBeOpenApi.IOperation.path operation path} and must be defined\nwith their types and descriptions.\n\nFor example, if API operation path is\n`/shoppings/customers/sales/{saleId}/questions/${questionId}/comments/${commentId}`,\nthe path parameters should be like below:\n\n```json\n{\n \"path\": \"/shoppings/customers/sales/{saleId}/questions/${questionId}/comments/${commentId}\",\n \"method\": \"get\",\n \"parameters\": [\n {\n \"name\": \"saleId\",\n \"in\": \"path\",\n \"schema\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"description\": \"Target sale's ID\"\n },\n {\n \"name\": \"questionId\",\n \"in\": \"path\",\n \"schema\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"description\": \"Target question's ID\"\n },\n {\n \"name\": \"commentId\",\n \"in\": \"path\",\n \"schema\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"description\": \"Target comment's ID\"\n }\n ]\n}\n```"
|
|
362
|
+
},
|
|
363
|
+
"AutoBeOpenApi.IJsonSchema.INumber": {
|
|
364
|
+
type: "object",
|
|
365
|
+
properties: {
|
|
366
|
+
minimum: {
|
|
367
|
+
type: "number",
|
|
368
|
+
description: "Minimum value restriction."
|
|
369
|
+
},
|
|
370
|
+
maximum: {
|
|
371
|
+
type: "number",
|
|
372
|
+
description: "Maximum value restriction."
|
|
373
|
+
},
|
|
374
|
+
exclusiveMinimum: {
|
|
375
|
+
type: "number",
|
|
376
|
+
description: "Exclusive minimum value restriction."
|
|
377
|
+
},
|
|
378
|
+
exclusiveMaximum: {
|
|
379
|
+
type: "number",
|
|
380
|
+
description: "Exclusive maximum value restriction."
|
|
381
|
+
},
|
|
382
|
+
multipleOf: {
|
|
383
|
+
type: "number",
|
|
384
|
+
exclusiveMinimum: 0,
|
|
385
|
+
description: "Multiple of value restriction."
|
|
386
|
+
},
|
|
387
|
+
type: {
|
|
388
|
+
"const": "number",
|
|
389
|
+
description: "Discriminator value of the type.\n\nCRITICAL: This MUST be a SINGLE string value, NOT an array. The type\nfield identifies the JSON Schema type and must be exactly one of:\n\"boolean\", \"integer\", \"number\", \"string\", \"array\", \"object\", or\n\"null\".\n\n\u274C INCORRECT: type: [\"string\", \"null\"] // This is WRONG! \u2705 CORRECT:\ntype: \"string\" // For nullable string, use oneOf instead\n\nIf you need to express a nullable type (e.g., string | null), you MUST\nuse the `IOneOf` structure:\n\n```typescript\n{\n \"oneOf\": [{ \"type\": \"string\" }, { \"type\": \"null\" }]\n}\n```\n\nNEVER use array notation in the type field. The type field is a\ndiscriminator that accepts only a single string value."
|
|
390
|
+
}
|
|
391
|
+
},
|
|
392
|
+
required: [
|
|
393
|
+
"type"
|
|
394
|
+
],
|
|
395
|
+
description: "Number (double) type info."
|
|
396
|
+
},
|
|
397
|
+
"AutoBeOpenApi.IJsonSchema.IInteger": {
|
|
398
|
+
type: "object",
|
|
399
|
+
properties: {
|
|
400
|
+
minimum: {
|
|
401
|
+
type: "integer",
|
|
402
|
+
description: "Minimum value restriction."
|
|
403
|
+
},
|
|
404
|
+
maximum: {
|
|
405
|
+
type: "integer",
|
|
406
|
+
description: "Maximum value restriction."
|
|
407
|
+
},
|
|
408
|
+
exclusiveMinimum: {
|
|
409
|
+
type: "number",
|
|
410
|
+
description: "Exclusive minimum value restriction."
|
|
411
|
+
},
|
|
412
|
+
exclusiveMaximum: {
|
|
413
|
+
type: "number",
|
|
414
|
+
description: "Exclusive maximum value restriction."
|
|
415
|
+
},
|
|
416
|
+
multipleOf: {
|
|
417
|
+
type: "integer",
|
|
418
|
+
exclusiveMinimum: 0,
|
|
419
|
+
description: "Multiple of value restriction."
|
|
420
|
+
},
|
|
421
|
+
type: {
|
|
422
|
+
"const": "integer",
|
|
423
|
+
description: "Discriminator value of the type.\n\nCRITICAL: This MUST be a SINGLE string value, NOT an array. The type\nfield identifies the JSON Schema type and must be exactly one of:\n\"boolean\", \"integer\", \"number\", \"string\", \"array\", \"object\", or\n\"null\".\n\n\u274C INCORRECT: type: [\"string\", \"null\"] // This is WRONG! \u2705 CORRECT:\ntype: \"string\" // For nullable string, use oneOf instead\n\nIf you need to express a nullable type (e.g., string | null), you MUST\nuse the `IOneOf` structure:\n\n```typescript\n{\n \"oneOf\": [{ \"type\": \"string\" }, { \"type\": \"null\" }]\n}\n```\n\nNEVER use array notation in the type field. The type field is a\ndiscriminator that accepts only a single string value."
|
|
424
|
+
}
|
|
425
|
+
},
|
|
426
|
+
required: [
|
|
427
|
+
"type"
|
|
428
|
+
],
|
|
429
|
+
description: "Integer type info."
|
|
430
|
+
},
|
|
431
|
+
"AutoBeOpenApi.IJsonSchema.IString": {
|
|
432
|
+
type: "object",
|
|
433
|
+
properties: {
|
|
434
|
+
format: {
|
|
435
|
+
oneOf: [
|
|
436
|
+
{
|
|
437
|
+
"const": "date-time"
|
|
438
|
+
},
|
|
439
|
+
{
|
|
440
|
+
"const": "password"
|
|
441
|
+
},
|
|
442
|
+
{
|
|
443
|
+
"const": "regex"
|
|
444
|
+
},
|
|
445
|
+
{
|
|
446
|
+
"const": "uuid"
|
|
447
|
+
},
|
|
448
|
+
{
|
|
449
|
+
"const": "email"
|
|
450
|
+
},
|
|
451
|
+
{
|
|
452
|
+
"const": "hostname"
|
|
453
|
+
},
|
|
454
|
+
{
|
|
455
|
+
"const": "idn-email"
|
|
456
|
+
},
|
|
457
|
+
{
|
|
458
|
+
"const": "idn-hostname"
|
|
459
|
+
},
|
|
460
|
+
{
|
|
461
|
+
"const": "iri"
|
|
462
|
+
},
|
|
463
|
+
{
|
|
464
|
+
"const": "iri-reference"
|
|
465
|
+
},
|
|
466
|
+
{
|
|
467
|
+
"const": "ipv4"
|
|
468
|
+
},
|
|
469
|
+
{
|
|
470
|
+
"const": "ipv6"
|
|
471
|
+
},
|
|
472
|
+
{
|
|
473
|
+
"const": "uri"
|
|
474
|
+
},
|
|
475
|
+
{
|
|
476
|
+
"const": "uri-reference"
|
|
477
|
+
},
|
|
478
|
+
{
|
|
479
|
+
"const": "uri-template"
|
|
480
|
+
},
|
|
481
|
+
{
|
|
482
|
+
"const": "url"
|
|
483
|
+
},
|
|
484
|
+
{
|
|
485
|
+
"const": "date"
|
|
486
|
+
},
|
|
487
|
+
{
|
|
488
|
+
"const": "time"
|
|
489
|
+
},
|
|
490
|
+
{
|
|
491
|
+
"const": "duration"
|
|
492
|
+
},
|
|
493
|
+
{
|
|
494
|
+
"const": "json-pointer"
|
|
495
|
+
},
|
|
496
|
+
{
|
|
497
|
+
"const": "relative-json-pointer"
|
|
498
|
+
}
|
|
499
|
+
],
|
|
500
|
+
description: "Format restriction."
|
|
501
|
+
},
|
|
502
|
+
pattern: {
|
|
503
|
+
type: "string",
|
|
504
|
+
description: "Pattern restriction."
|
|
505
|
+
},
|
|
506
|
+
contentMediaType: {
|
|
507
|
+
type: "string",
|
|
508
|
+
description: "Content media type restriction."
|
|
509
|
+
},
|
|
510
|
+
minLength: {
|
|
511
|
+
type: "integer",
|
|
512
|
+
minimum: 0,
|
|
513
|
+
description: "Minimum length restriction."
|
|
514
|
+
},
|
|
515
|
+
maxLength: {
|
|
516
|
+
type: "integer",
|
|
517
|
+
minimum: 0,
|
|
518
|
+
description: "Maximum length restriction."
|
|
519
|
+
},
|
|
520
|
+
type: {
|
|
521
|
+
"const": "string",
|
|
522
|
+
description: "Discriminator value of the type.\n\nCRITICAL: This MUST be a SINGLE string value, NOT an array. The type\nfield identifies the JSON Schema type and must be exactly one of:\n\"boolean\", \"integer\", \"number\", \"string\", \"array\", \"object\", or\n\"null\".\n\n\u274C INCORRECT: type: [\"string\", \"null\"] // This is WRONG! \u2705 CORRECT:\ntype: \"string\" // For nullable string, use oneOf instead\n\nIf you need to express a nullable type (e.g., string | null), you MUST\nuse the `IOneOf` structure:\n\n```typescript\n{\n \"oneOf\": [{ \"type\": \"string\" }, { \"type\": \"null\" }]\n}\n```\n\nNEVER use array notation in the type field. The type field is a\ndiscriminator that accepts only a single string value."
|
|
523
|
+
}
|
|
524
|
+
},
|
|
525
|
+
required: [
|
|
526
|
+
"type"
|
|
527
|
+
],
|
|
528
|
+
description: "String type info."
|
|
529
|
+
},
|
|
530
|
+
"AutoBeOpenApi.IRequestBody": {
|
|
531
|
+
type: "object",
|
|
532
|
+
properties: {
|
|
533
|
+
description: {
|
|
534
|
+
type: "string",
|
|
535
|
+
description: "Description about the request body.\n\nMake short, concise and clear description about the request body.\n\n> MUST be written in English. Never use other languages."
|
|
536
|
+
},
|
|
537
|
+
typeName: {
|
|
538
|
+
type: "string",
|
|
539
|
+
description: "Request body type name.\n\nThis specifies the data structure expected in the request body, that will\nbe transformed to {@link AutoBeOpenApi.IJsonSchema.IReference reference}\ntype in the {@link AutoBeOpenApi.IComponents.schemas components section}\nas an {@link AutoBeOpenApi.IJsonSchema.Object object} type.\n\nHere is the naming convention for the request body type:\n\n- `IEntityName.ICreate`: Request body for creation operations (POST)\n- `IEntityName.IUpdate`: Request body for update operations (PUT)\n- `IEntityName.IRequest`: Request parameters for list operations (often\n with search/pagination)\n\nWhat you write:\n\n```json\n{\n \"typeName\": \"IShoppingOrder.ICreate\"\n}\n```\n\nTransformed to:\n\n```json\n{\n \"schema\": {\n \"$ref\": \"#/components/schemas/IShoppingOrder.ICreate\"\n }\n}\n```"
|
|
540
|
+
}
|
|
541
|
+
},
|
|
542
|
+
required: [
|
|
543
|
+
"description",
|
|
544
|
+
"typeName"
|
|
545
|
+
],
|
|
546
|
+
description: "Request body information of OpenAPI operation.\n\nThis interface defines the structure for request bodies in API routes. It\ncorresponds to the requestBody section in OpenAPI specifications, providing\nboth a description and schema reference for the request payload.\n\nThe content-type for all request bodies is always `application/json`. Even\nwhen file uploading is required, don't use `multipart/form-data` or\n`application/x-www-form-urlencoded` content types. Instead, just define an\nURI string property in the request body schema.\n\nNote that, all body schemas must be transformable to a\n{@link AutoBeOpenApi.IJsonSchema.IReference reference} type defined in the\n{@link AutoBeOpenApi.IComponents.schemas components section} as an\n{@link AutoBeOpenApi.IJsonSchema.IObject object} type.\n\nIn OpenAPI, this might represent:\n\n```json\n{\n \"requestBody\": {\n \"description\": \"Creation info of the order\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/IShoppingOrder.ICreate\"\n }\n }\n }\n }\n}\n```"
|
|
547
|
+
},
|
|
548
|
+
"AutoBeOpenApi.IResponseBody": {
|
|
549
|
+
type: "object",
|
|
550
|
+
properties: {
|
|
551
|
+
description: {
|
|
552
|
+
type: "string",
|
|
553
|
+
description: "Description about the response body.\n\nMake short, concise and clear description about the response body.\n\n> MUST be written in English. Never use other languages."
|
|
554
|
+
},
|
|
555
|
+
typeName: {
|
|
556
|
+
type: "string",
|
|
557
|
+
description: "Response body's data type.\n\nSpecifies the structure of the returned data (response body), that will\nbe transformed to {@link AutoBeOpenApi.IJsonSchema.IReference} type in the\n{@link AutoBeOpenApi.IComponents.schemas components section} as an\n{@link AutoBeOpenApi.IJsonSchema.IObject object} type.\n\nHere is the naming convention for the response body type:\n\n- `IEntityName`: Main entity with detailed information (e.g.,\n `IShoppingSale`)\n- `IEntityName.ISummary`: Simplified response version with essential\n properties\n- `IEntityName.IInvert`: Alternative view of an entity from a different\n perspective\n- `IPageIEntityName`: Paginated results container with `pagination` and\n `data` properties\n\nWhat you write:\n\n```json\n{\n \"typeName\": \"IShoppingOrder\"\n}\n```\n\nTransformed to:\n\n```json\n{\n \"schema\": {\n \"$ref\": \"#/components/schemas/IShoppingOrder\"\n }\n}\n```"
|
|
558
|
+
}
|
|
559
|
+
},
|
|
560
|
+
required: [
|
|
561
|
+
"description",
|
|
562
|
+
"typeName"
|
|
563
|
+
],
|
|
564
|
+
description: "Response body information for OpenAPI operation.\n\nThis interface defines the structure of a successful response from an API\noperation. It provides a description of the response and a schema reference\nto define the returned data structure.\n\nThe content-type for all responses is always `application/json`. Even when\nfile downloading is required, don't use `application/octet-stream` or\n`multipart/form-data` content types. Instead, just define an URI string\nproperty in the response body schema.\n\nIn OpenAPI, this might represent:\n\n```json\n{\n \"responses\": {\n \"200\": {\n \"description\": \"Order information\",\n \"content\": {\n \"application/json\": {\n \"schema\": { \"$ref\": \"#/components/schemas/IShoppingOrder\" }\n }\n }\n }\n }\n}\n```"
|
|
565
|
+
}
|
|
566
|
+
}
|
|
157
567
|
},
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
568
|
+
functions: [
|
|
569
|
+
{
|
|
570
|
+
name: "process",
|
|
571
|
+
async: false,
|
|
572
|
+
parameters: [
|
|
573
|
+
{
|
|
574
|
+
name: "props",
|
|
575
|
+
description: " Request containing either preliminary data request or complete\ntask",
|
|
576
|
+
required: true,
|
|
577
|
+
schema: {
|
|
578
|
+
$ref: "#/components/schemas/IAutoBeInterfaceOperationApplication.IProps"
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
],
|
|
582
|
+
description: "Process operation generation task or preliminary data requests.\n\nCreates complete API operations following REST principles and quality\nstandards. Processes operations with progress tracking to ensure iterative\ncompletion."
|
|
583
|
+
}
|
|
584
|
+
]
|
|
585
|
+
},
|
|
586
|
+
source: SOURCE,
|
|
587
|
+
kinds: ["analysisFiles", "prismaSchemas"],
|
|
588
|
+
state: ctx.state(),
|
|
162
589
|
});
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
590
|
+
return yield preliminary.orchestrate(ctx, (out) => __awaiter(this, void 0, void 0, function* () {
|
|
591
|
+
var _a, _b, _c, _d;
|
|
592
|
+
const pointer = {
|
|
593
|
+
value: null,
|
|
594
|
+
};
|
|
595
|
+
const result = yield ctx.conversate(Object.assign({ source: SOURCE, controller: createController({
|
|
596
|
+
preliminary,
|
|
597
|
+
model: ctx.model,
|
|
598
|
+
actors: (_b = (_a = ctx.state().analyze) === null || _a === void 0 ? void 0 : _a.actors.map((it) => it.name)) !== null && _b !== void 0 ? _b : [],
|
|
599
|
+
build: (operations) => {
|
|
600
|
+
var _a;
|
|
601
|
+
(_a = pointer.value) !== null && _a !== void 0 ? _a : (pointer.value = []);
|
|
602
|
+
const matrix = operations.map((op) => {
|
|
603
|
+
if (op.authorizationActors.length === 0)
|
|
604
|
+
return [
|
|
605
|
+
Object.assign(Object.assign({}, op), { path: "/" +
|
|
606
|
+
[prefix, ...op.path.split("/")]
|
|
607
|
+
.filter((it) => it !== "")
|
|
608
|
+
.join("/"), authorizationActor: null, authorizationType: null, prerequisites: [] }),
|
|
609
|
+
];
|
|
610
|
+
return op.authorizationActors.map((actor) => (Object.assign(Object.assign({}, op), { path: "/" +
|
|
611
|
+
[prefix, actor, ...op.path.split("/")]
|
|
612
|
+
.filter((it) => it !== "")
|
|
613
|
+
.join("/"), authorizationActor: actor, authorizationType: null, prerequisites: [] })));
|
|
614
|
+
});
|
|
615
|
+
pointer.value.push(...matrix.flat());
|
|
616
|
+
props.progress.completed += matrix.flat().length;
|
|
617
|
+
props.progress.total += operations
|
|
618
|
+
.map((op) => props.endpoints.has({ path: op.path, method: op.method })
|
|
619
|
+
? op.authorizationActors.length === 0
|
|
620
|
+
? 0
|
|
621
|
+
: op.authorizationActors.length - 1
|
|
622
|
+
: op.authorizationActors.length)
|
|
623
|
+
.reduce((a, b) => a + b, 0);
|
|
624
|
+
},
|
|
625
|
+
}), enforceFunctionCall: true, promptCacheKey: props.promptCacheKey }, (0, transformInterfaceOperationHistory_1.transformInterfaceOperationHistory)({
|
|
626
|
+
endpoints: props.endpoints.toJSON(),
|
|
627
|
+
instruction: props.instruction,
|
|
628
|
+
prefix,
|
|
629
|
+
preliminary,
|
|
630
|
+
})));
|
|
631
|
+
if (pointer.value !== null) {
|
|
632
|
+
ctx.dispatch(Object.assign(Object.assign({ type: SOURCE, id: (0, uuid_1.v7)(), operations: pointer.value, metric: result.metric, tokenUsage: result.tokenUsage }, props.progress), { step: (_d = (_c = ctx.state().analyze) === null || _c === void 0 ? void 0 : _c.step) !== null && _d !== void 0 ? _d : 0, created_at: new Date().toISOString() }));
|
|
633
|
+
return out(result)(pointer.value);
|
|
634
|
+
}
|
|
635
|
+
return out(result)(null);
|
|
636
|
+
}));
|
|
168
637
|
});
|
|
169
638
|
}
|
|
170
639
|
function createController(props) {
|
|
171
640
|
(0, assertSchemaModel_1.assertSchemaModel)(props.model);
|
|
172
641
|
const validate = (next) => {
|
|
173
|
-
const result = (() => { const
|
|
642
|
+
const result = (() => { const _iv6 = new Set(["date-time", "password", "regex", "uuid", "email", "hostname", "idn-email", "idn-hostname", "iri", "iri-reference", "ipv4", "ipv6", "uri", "uri-reference", "uri-template", "url", "date", "time", "duration", "json-pointer", "relative-json-pointer"]); const _vv12 = new Set(["date-time", "password", "regex", "uuid", "email", "hostname", "idn-email", "idn-hostname", "iri", "iri-reference", "ipv4", "ipv6", "uri", "uri-reference", "uri-template", "url", "date", "time", "duration", "json-pointer", "relative-json-pointer"]); 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 => "getPrismaSchemas" === input.type && (Array.isArray(input.schemaNames) && (1 <= input.schemaNames.length && input.schemaNames.every(elem => "string" === typeof elem))); const _io3 = input => "complete" === input.type && (Array.isArray(input.operations) && input.operations.every(elem => "object" === typeof elem && null !== elem && _io4(elem))); const _io4 = input => "string" === typeof input.specification && "string" === typeof input.description && "string" === typeof input.summary && (Array.isArray(input.parameters) && input.parameters.every(elem => "object" === typeof elem && null !== elem && _io5(elem))) && (null === input.requestBody || "object" === typeof input.requestBody && null !== input.requestBody && _io9(input.requestBody)) && (null === input.responseBody || "object" === typeof input.responseBody && null !== input.responseBody && _io10(input.responseBody)) && ("string" === typeof input.name && RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name)) && (Array.isArray(input.authorizationActors) && input.authorizationActors.every(elem => "string" === typeof elem && (RegExp("^[a-z][a-zA-Z0-9]*$").test(elem) && 1 <= elem.length))) && ("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 _io5 = input => "string" === typeof input.name && RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name) && "string" === typeof input.description && ("object" === typeof input.schema && null !== input.schema && _iu1(input.schema)); const _io6 = input => (undefined === input.minimum || "number" === typeof input.minimum && (Math.floor(input.minimum) === input.minimum && -9223372036854776000 <= input.minimum && input.minimum <= 9223372036854776000)) && (undefined === input.maximum || "number" === typeof input.maximum && (Math.floor(input.maximum) === input.maximum && -9223372036854776000 <= input.maximum && input.maximum <= 9223372036854776000)) && (undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum) && (undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum) && (undefined === input.multipleOf || "number" === typeof input.multipleOf && (Math.floor(input.multipleOf) === input.multipleOf && 0 <= input.multipleOf && input.multipleOf <= 18446744073709552000 && 0 < input.multipleOf)) && "integer" === input.type; const _io7 = input => (undefined === input.minimum || "number" === typeof input.minimum) && (undefined === input.maximum || "number" === typeof input.maximum) && (undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum) && (undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum) && (undefined === input.multipleOf || "number" === typeof input.multipleOf && 0 < input.multipleOf) && "number" === input.type; const _io8 = input => (undefined === input.format || true === _iv6.has(input.format)) && (undefined === input.pattern || "string" === typeof input.pattern) && (undefined === input.contentMediaType || "string" === typeof input.contentMediaType) && (undefined === input.minLength || "number" === typeof input.minLength && (Math.floor(input.minLength) === input.minLength && 0 <= input.minLength && input.minLength <= 18446744073709552000)) && (undefined === input.maxLength || "number" === typeof input.maxLength && (Math.floor(input.maxLength) === input.maxLength && 0 <= input.maxLength && input.maxLength <= 18446744073709552000)) && "string" === input.type; const _io9 = input => "string" === typeof input.description && "string" === typeof input.typeName; const _io10 = input => "string" === typeof input.description && "string" === typeof input.typeName; const _iu0 = input => (() => {
|
|
643
|
+
if ("getAnalysisFiles" === input.type)
|
|
644
|
+
return _io1(input);
|
|
645
|
+
else if ("getPrismaSchemas" === input.type)
|
|
646
|
+
return _io2(input);
|
|
647
|
+
else if ("complete" === input.type)
|
|
648
|
+
return _io3(input);
|
|
649
|
+
else
|
|
650
|
+
return false;
|
|
651
|
+
})(); const _iu1 = input => (() => {
|
|
174
652
|
if ("number" === input.type)
|
|
175
|
-
return
|
|
653
|
+
return _io7(input);
|
|
176
654
|
else if ("integer" === input.type)
|
|
177
|
-
return
|
|
655
|
+
return _io6(input);
|
|
178
656
|
else if ("string" === input.type)
|
|
179
|
-
return
|
|
657
|
+
return _io8(input);
|
|
180
658
|
else
|
|
181
659
|
return false;
|
|
182
|
-
})(); const _vo0 = (input, _path, _exceptionable = true) => [
|
|
660
|
+
})(); const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.thinking || _report(_exceptionable, {
|
|
661
|
+
path: _path + ".thinking",
|
|
662
|
+
expected: "string",
|
|
663
|
+
value: input.thinking
|
|
664
|
+
}), ("object" === typeof input.request && null !== input.request || _report(_exceptionable, {
|
|
665
|
+
path: _path + ".request",
|
|
666
|
+
expected: "(IAutoBeInterfaceOperationApplication.IComplete | IAutoBePreliminaryGetAnalysisFiles | IAutoBePreliminaryGetPrismaSchemas)",
|
|
667
|
+
value: input.request
|
|
668
|
+
})) && _vu0(input.request, _path + ".request", true && _exceptionable) || _report(_exceptionable, {
|
|
669
|
+
path: _path + ".request",
|
|
670
|
+
expected: "(IAutoBeInterfaceOperationApplication.IComplete | IAutoBePreliminaryGetAnalysisFiles | IAutoBePreliminaryGetPrismaSchemas)",
|
|
671
|
+
value: input.request
|
|
672
|
+
})].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => ["getAnalysisFiles" === input.type || _report(_exceptionable, {
|
|
673
|
+
path: _path + ".type",
|
|
674
|
+
expected: "\"getAnalysisFiles\"",
|
|
675
|
+
value: input.type
|
|
676
|
+
}), (Array.isArray(input.fileNames) || _report(_exceptionable, {
|
|
677
|
+
path: _path + ".fileNames",
|
|
678
|
+
expected: "(Array<string> & MinItems<1>)",
|
|
679
|
+
value: input.fileNames
|
|
680
|
+
})) && ((1 <= input.fileNames.length || _report(_exceptionable, {
|
|
681
|
+
path: _path + ".fileNames",
|
|
682
|
+
expected: "Array<> & MinItems<1>",
|
|
683
|
+
value: input.fileNames
|
|
684
|
+
})) && input.fileNames.map((elem, _index7) => "string" === typeof elem || _report(_exceptionable, {
|
|
685
|
+
path: _path + ".fileNames[" + _index7 + "]",
|
|
686
|
+
expected: "string",
|
|
687
|
+
value: elem
|
|
688
|
+
})).every(flag => flag)) || _report(_exceptionable, {
|
|
689
|
+
path: _path + ".fileNames",
|
|
690
|
+
expected: "(Array<string> & MinItems<1>)",
|
|
691
|
+
value: input.fileNames
|
|
692
|
+
})].every(flag => flag); const _vo2 = (input, _path, _exceptionable = true) => ["getPrismaSchemas" === input.type || _report(_exceptionable, {
|
|
693
|
+
path: _path + ".type",
|
|
694
|
+
expected: "\"getPrismaSchemas\"",
|
|
695
|
+
value: input.type
|
|
696
|
+
}), (Array.isArray(input.schemaNames) || _report(_exceptionable, {
|
|
697
|
+
path: _path + ".schemaNames",
|
|
698
|
+
expected: "(Array<string> & MinItems<1>)",
|
|
699
|
+
value: input.schemaNames
|
|
700
|
+
})) && ((1 <= input.schemaNames.length || _report(_exceptionable, {
|
|
701
|
+
path: _path + ".schemaNames",
|
|
702
|
+
expected: "Array<> & MinItems<1>",
|
|
703
|
+
value: input.schemaNames
|
|
704
|
+
})) && input.schemaNames.map((elem, _index8) => "string" === typeof elem || _report(_exceptionable, {
|
|
705
|
+
path: _path + ".schemaNames[" + _index8 + "]",
|
|
706
|
+
expected: "string",
|
|
707
|
+
value: elem
|
|
708
|
+
})).every(flag => flag)) || _report(_exceptionable, {
|
|
709
|
+
path: _path + ".schemaNames",
|
|
710
|
+
expected: "(Array<string> & MinItems<1>)",
|
|
711
|
+
value: input.schemaNames
|
|
712
|
+
})].every(flag => flag); const _vo3 = (input, _path, _exceptionable = true) => ["complete" === input.type || _report(_exceptionable, {
|
|
713
|
+
path: _path + ".type",
|
|
714
|
+
expected: "\"complete\"",
|
|
715
|
+
value: input.type
|
|
716
|
+
}), (Array.isArray(input.operations) || _report(_exceptionable, {
|
|
183
717
|
path: _path + ".operations",
|
|
184
718
|
expected: "Array<IAutoBeInterfaceOperationApplication.IOperation>",
|
|
185
719
|
value: input.operations
|
|
186
|
-
})) && input.operations.map((elem,
|
|
187
|
-
path: _path + ".operations[" +
|
|
720
|
+
})) && input.operations.map((elem, _index9) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
721
|
+
path: _path + ".operations[" + _index9 + "]",
|
|
188
722
|
expected: "IAutoBeInterfaceOperationApplication.IOperation",
|
|
189
723
|
value: elem
|
|
190
|
-
})) &&
|
|
191
|
-
path: _path + ".operations[" +
|
|
724
|
+
})) && _vo4(elem, _path + ".operations[" + _index9 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
725
|
+
path: _path + ".operations[" + _index9 + "]",
|
|
192
726
|
expected: "IAutoBeInterfaceOperationApplication.IOperation",
|
|
193
727
|
value: elem
|
|
194
728
|
})).every(flag => flag) || _report(_exceptionable, {
|
|
195
729
|
path: _path + ".operations",
|
|
196
730
|
expected: "Array<IAutoBeInterfaceOperationApplication.IOperation>",
|
|
197
731
|
value: input.operations
|
|
198
|
-
})].every(flag => flag); const
|
|
732
|
+
})].every(flag => flag); const _vo4 = (input, _path, _exceptionable = true) => ["string" === typeof input.specification || _report(_exceptionable, {
|
|
199
733
|
path: _path + ".specification",
|
|
200
734
|
expected: "string",
|
|
201
735
|
value: input.specification
|
|
@@ -211,12 +745,12 @@ function createController(props) {
|
|
|
211
745
|
path: _path + ".parameters",
|
|
212
746
|
expected: "Array<AutoBeOpenApi.IParameter>",
|
|
213
747
|
value: input.parameters
|
|
214
|
-
})) && input.parameters.map((elem,
|
|
215
|
-
path: _path + ".parameters[" +
|
|
748
|
+
})) && input.parameters.map((elem, _index10) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
749
|
+
path: _path + ".parameters[" + _index10 + "]",
|
|
216
750
|
expected: "AutoBeOpenApi.IParameter",
|
|
217
751
|
value: elem
|
|
218
|
-
})) &&
|
|
219
|
-
path: _path + ".parameters[" +
|
|
752
|
+
})) && _vo5(elem, _path + ".parameters[" + _index10 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
753
|
+
path: _path + ".parameters[" + _index10 + "]",
|
|
220
754
|
expected: "AutoBeOpenApi.IParameter",
|
|
221
755
|
value: elem
|
|
222
756
|
})).every(flag => flag) || _report(_exceptionable, {
|
|
@@ -227,7 +761,7 @@ function createController(props) {
|
|
|
227
761
|
path: _path + ".requestBody",
|
|
228
762
|
expected: "(AutoBeOpenApi.IRequestBody | null)",
|
|
229
763
|
value: input.requestBody
|
|
230
|
-
})) &&
|
|
764
|
+
})) && _vo9(input.requestBody, _path + ".requestBody", true && _exceptionable) || _report(_exceptionable, {
|
|
231
765
|
path: _path + ".requestBody",
|
|
232
766
|
expected: "(AutoBeOpenApi.IRequestBody | null)",
|
|
233
767
|
value: input.requestBody
|
|
@@ -235,7 +769,7 @@ function createController(props) {
|
|
|
235
769
|
path: _path + ".responseBody",
|
|
236
770
|
expected: "(AutoBeOpenApi.IResponseBody | null)",
|
|
237
771
|
value: input.responseBody
|
|
238
|
-
})) &&
|
|
772
|
+
})) && _vo10(input.responseBody, _path + ".responseBody", true && _exceptionable) || _report(_exceptionable, {
|
|
239
773
|
path: _path + ".responseBody",
|
|
240
774
|
expected: "(AutoBeOpenApi.IResponseBody | null)",
|
|
241
775
|
value: input.responseBody
|
|
@@ -251,16 +785,16 @@ function createController(props) {
|
|
|
251
785
|
path: _path + ".authorizationActors",
|
|
252
786
|
expected: "Array<string & CamelCasePattern & MinLength<1>>",
|
|
253
787
|
value: input.authorizationActors
|
|
254
|
-
})) && input.authorizationActors.map((elem,
|
|
255
|
-
path: _path + ".authorizationActors[" +
|
|
788
|
+
})) && input.authorizationActors.map((elem, _index11) => "string" === typeof elem && (RegExp("^[a-z][a-zA-Z0-9]*$").test(elem) || _report(_exceptionable, {
|
|
789
|
+
path: _path + ".authorizationActors[" + _index11 + "]",
|
|
256
790
|
expected: "string & CamelCasePattern",
|
|
257
791
|
value: elem
|
|
258
792
|
})) && (1 <= elem.length || _report(_exceptionable, {
|
|
259
|
-
path: _path + ".authorizationActors[" +
|
|
793
|
+
path: _path + ".authorizationActors[" + _index11 + "]",
|
|
260
794
|
expected: "string & MinLength<1>",
|
|
261
795
|
value: elem
|
|
262
796
|
})) || _report(_exceptionable, {
|
|
263
|
-
path: _path + ".authorizationActors[" +
|
|
797
|
+
path: _path + ".authorizationActors[" + _index11 + "]",
|
|
264
798
|
expected: "(string & CamelCasePattern & MinLength<1>)",
|
|
265
799
|
value: elem
|
|
266
800
|
})).every(flag => flag) || _report(_exceptionable, {
|
|
@@ -279,7 +813,7 @@ function createController(props) {
|
|
|
279
813
|
path: _path + ".method",
|
|
280
814
|
expected: "(\"delete\" | \"get\" | \"patch\" | \"post\" | \"put\")",
|
|
281
815
|
value: input.method
|
|
282
|
-
})].every(flag => flag); const
|
|
816
|
+
})].every(flag => flag); const _vo5 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name) || _report(_exceptionable, {
|
|
283
817
|
path: _path + ".name",
|
|
284
818
|
expected: "string & CamelCasePattern",
|
|
285
819
|
value: input.name
|
|
@@ -295,11 +829,11 @@ function createController(props) {
|
|
|
295
829
|
path: _path + ".schema",
|
|
296
830
|
expected: "(AutoBeOpenApi.IJsonSchema.IInteger | AutoBeOpenApi.IJsonSchema.INumber | AutoBeOpenApi.IJsonSchema.IString)",
|
|
297
831
|
value: input.schema
|
|
298
|
-
})) &&
|
|
832
|
+
})) && _vu1(input.schema, _path + ".schema", true && _exceptionable) || _report(_exceptionable, {
|
|
299
833
|
path: _path + ".schema",
|
|
300
834
|
expected: "(AutoBeOpenApi.IJsonSchema.IInteger | AutoBeOpenApi.IJsonSchema.INumber | AutoBeOpenApi.IJsonSchema.IString)",
|
|
301
835
|
value: input.schema
|
|
302
|
-
})].every(flag => flag); const
|
|
836
|
+
})].every(flag => flag); const _vo6 = (input, _path, _exceptionable = true) => [undefined === input.minimum || "number" === typeof input.minimum && (Math.floor(input.minimum) === input.minimum && -9223372036854776000 <= input.minimum && input.minimum <= 9223372036854776000 || _report(_exceptionable, {
|
|
303
837
|
path: _path + ".minimum",
|
|
304
838
|
expected: "number & Type<\"int64\">",
|
|
305
839
|
value: input.minimum
|
|
@@ -339,7 +873,7 @@ function createController(props) {
|
|
|
339
873
|
path: _path + ".type",
|
|
340
874
|
expected: "\"integer\"",
|
|
341
875
|
value: input.type
|
|
342
|
-
})].every(flag => flag); const
|
|
876
|
+
})].every(flag => flag); const _vo7 = (input, _path, _exceptionable = true) => [undefined === input.minimum || "number" === typeof input.minimum || _report(_exceptionable, {
|
|
343
877
|
path: _path + ".minimum",
|
|
344
878
|
expected: "(number | undefined)",
|
|
345
879
|
value: input.minimum
|
|
@@ -367,7 +901,7 @@ function createController(props) {
|
|
|
367
901
|
path: _path + ".type",
|
|
368
902
|
expected: "\"number\"",
|
|
369
903
|
value: input.type
|
|
370
|
-
})].every(flag => flag); const
|
|
904
|
+
})].every(flag => flag); const _vo8 = (input, _path, _exceptionable = true) => [undefined === input.format || true === _vv12.has(input.format) || _report(_exceptionable, {
|
|
371
905
|
path: _path + ".format",
|
|
372
906
|
expected: "(\"date\" | \"date-time\" | \"duration\" | \"email\" | \"hostname\" | \"idn-email\" | \"idn-hostname\" | \"ipv4\" | \"ipv6\" | \"iri\" | \"iri-reference\" | \"json-pointer\" | \"password\" | \"regex\" | \"relative-json-pointer\" | \"time\" | \"uri\" | \"uri-reference\" | \"uri-template\" | \"url\" | \"uuid\" | undefined)",
|
|
373
907
|
value: input.format
|
|
@@ -399,7 +933,7 @@ function createController(props) {
|
|
|
399
933
|
path: _path + ".type",
|
|
400
934
|
expected: "\"string\"",
|
|
401
935
|
value: input.type
|
|
402
|
-
})].every(flag => flag); const
|
|
936
|
+
})].every(flag => flag); const _vo9 = (input, _path, _exceptionable = true) => ["string" === typeof input.description || _report(_exceptionable, {
|
|
403
937
|
path: _path + ".description",
|
|
404
938
|
expected: "string",
|
|
405
939
|
value: input.description
|
|
@@ -407,7 +941,7 @@ function createController(props) {
|
|
|
407
941
|
path: _path + ".typeName",
|
|
408
942
|
expected: "string",
|
|
409
943
|
value: input.typeName
|
|
410
|
-
})].every(flag => flag); const
|
|
944
|
+
})].every(flag => flag); const _vo10 = (input, _path, _exceptionable = true) => ["string" === typeof input.description || _report(_exceptionable, {
|
|
411
945
|
path: _path + ".description",
|
|
412
946
|
expected: "string",
|
|
413
947
|
value: input.description
|
|
@@ -416,12 +950,25 @@ function createController(props) {
|
|
|
416
950
|
expected: "string",
|
|
417
951
|
value: input.typeName
|
|
418
952
|
})].every(flag => flag); const _vu0 = (input, _path, _exceptionable = true) => (() => {
|
|
953
|
+
if ("getAnalysisFiles" === input.type)
|
|
954
|
+
return _vo1(input, _path, true && _exceptionable);
|
|
955
|
+
else if ("getPrismaSchemas" === input.type)
|
|
956
|
+
return _vo2(input, _path, true && _exceptionable);
|
|
957
|
+
else if ("complete" === input.type)
|
|
958
|
+
return _vo3(input, _path, true && _exceptionable);
|
|
959
|
+
else
|
|
960
|
+
return _report(_exceptionable, {
|
|
961
|
+
path: _path,
|
|
962
|
+
expected: "(IAutoBePreliminaryGetAnalysisFiles | IAutoBePreliminaryGetPrismaSchemas | IAutoBeInterfaceOperationApplication.IComplete)",
|
|
963
|
+
value: input
|
|
964
|
+
});
|
|
965
|
+
})(); const _vu1 = (input, _path, _exceptionable = true) => (() => {
|
|
419
966
|
if ("number" === input.type)
|
|
420
|
-
return
|
|
967
|
+
return _vo7(input, _path, true && _exceptionable);
|
|
421
968
|
else if ("integer" === input.type)
|
|
422
|
-
return
|
|
969
|
+
return _vo6(input, _path, true && _exceptionable);
|
|
423
970
|
else if ("string" === input.type)
|
|
424
|
-
return
|
|
971
|
+
return _vo8(input, _path, true && _exceptionable);
|
|
425
972
|
else
|
|
426
973
|
return _report(_exceptionable, {
|
|
427
974
|
path: _path,
|
|
@@ -458,10 +1005,15 @@ function createController(props) {
|
|
|
458
1005
|
}; })()(next);
|
|
459
1006
|
if (result.success === false)
|
|
460
1007
|
return result;
|
|
461
|
-
|
|
1008
|
+
else if (result.data.request.type !== "complete")
|
|
1009
|
+
return props.preliminary.validate({
|
|
1010
|
+
thinking: result.data.thinking,
|
|
1011
|
+
request: result.data.request,
|
|
1012
|
+
});
|
|
1013
|
+
const operations = result.data.request.operations;
|
|
462
1014
|
const errors = [];
|
|
463
1015
|
OperationValidator_1.OperationValidator.validate({
|
|
464
|
-
path: "$input.operations",
|
|
1016
|
+
path: "$input.request.operations",
|
|
465
1017
|
errors,
|
|
466
1018
|
operations,
|
|
467
1019
|
});
|
|
@@ -474,7 +1026,7 @@ function createController(props) {
|
|
|
474
1026
|
if (props.actors.includes(actor) === true)
|
|
475
1027
|
return;
|
|
476
1028
|
errors.push({
|
|
477
|
-
path: `$input.operations[${i}].authorizationActors[${j}]`,
|
|
1029
|
+
path: `$input.request.operations[${i}].authorizationActors[${j}]`,
|
|
478
1030
|
expected: `null | ${props.actors.map((str) => JSON.stringify(str)).join(" | ")}`,
|
|
479
1031
|
description: utils_1.StringUtil.trim `
|
|
480
1032
|
Actor "${actor}" is not defined in the roles list.
|
|
@@ -502,11 +1054,12 @@ function createController(props) {
|
|
|
502
1054
|
: "claude"](validate);
|
|
503
1055
|
return {
|
|
504
1056
|
protocol: "class",
|
|
505
|
-
name:
|
|
1057
|
+
name: SOURCE,
|
|
506
1058
|
application,
|
|
507
1059
|
execute: {
|
|
508
|
-
|
|
509
|
-
|
|
1060
|
+
process: (next) => {
|
|
1061
|
+
if (next.request.type === "complete")
|
|
1062
|
+
props.build(next.request.operations);
|
|
510
1063
|
},
|
|
511
1064
|
},
|
|
512
1065
|
};
|
|
@@ -522,24 +1075,116 @@ const collection = {
|
|
|
522
1075
|
},
|
|
523
1076
|
functions: [
|
|
524
1077
|
{
|
|
525
|
-
name: "
|
|
1078
|
+
name: "process",
|
|
526
1079
|
parameters: {
|
|
527
|
-
description: "
|
|
1080
|
+
description: " Request containing either preliminary data request or complete\ntask\n\n------------------------------\n\nCurrent Type: {@link IAutoBeInterfaceOperationApplication.IProps}",
|
|
528
1081
|
type: "object",
|
|
529
1082
|
properties: {
|
|
530
|
-
|
|
531
|
-
description: "
|
|
532
|
-
type: "
|
|
533
|
-
|
|
534
|
-
|
|
1083
|
+
thinking: {
|
|
1084
|
+
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.",
|
|
1085
|
+
type: "string"
|
|
1086
|
+
},
|
|
1087
|
+
request: {
|
|
1088
|
+
description: "Type discriminator for the request.\n\nDetermines which action to perform: preliminary data retrieval\n(getAnalysisFiles, getPrismaSchemas) or final operation generation\n(complete). When preliminary returns empty array, that type is removed\nfrom the union, physically preventing repeated calls.",
|
|
1089
|
+
anyOf: [
|
|
1090
|
+
{
|
|
1091
|
+
$ref: "#/$defs/IAutoBePreliminaryGetAnalysisFiles"
|
|
1092
|
+
},
|
|
1093
|
+
{
|
|
1094
|
+
$ref: "#/$defs/IAutoBePreliminaryGetPrismaSchemas"
|
|
1095
|
+
},
|
|
1096
|
+
{
|
|
1097
|
+
$ref: "#/$defs/IAutoBeInterfaceOperationApplication.IComplete"
|
|
1098
|
+
}
|
|
1099
|
+
],
|
|
1100
|
+
"x-discriminator": {
|
|
1101
|
+
propertyName: "type",
|
|
1102
|
+
mapping: {
|
|
1103
|
+
getAnalysisFiles: "#/$defs/IAutoBePreliminaryGetAnalysisFiles",
|
|
1104
|
+
getPrismaSchemas: "#/$defs/IAutoBePreliminaryGetPrismaSchemas",
|
|
1105
|
+
complete: "#/$defs/IAutoBeInterfaceOperationApplication.IComplete"
|
|
1106
|
+
}
|
|
535
1107
|
}
|
|
536
1108
|
}
|
|
537
1109
|
},
|
|
538
1110
|
required: [
|
|
539
|
-
"
|
|
1111
|
+
"thinking",
|
|
1112
|
+
"request"
|
|
540
1113
|
],
|
|
541
1114
|
additionalProperties: false,
|
|
542
1115
|
$defs: {
|
|
1116
|
+
IAutoBePreliminaryGetAnalysisFiles: {
|
|
1117
|
+
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.",
|
|
1118
|
+
type: "object",
|
|
1119
|
+
properties: {
|
|
1120
|
+
type: {
|
|
1121
|
+
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.",
|
|
1122
|
+
type: "string",
|
|
1123
|
+
"enum": [
|
|
1124
|
+
"getAnalysisFiles"
|
|
1125
|
+
]
|
|
1126
|
+
},
|
|
1127
|
+
fileNames: {
|
|
1128
|
+
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",
|
|
1129
|
+
type: "array",
|
|
1130
|
+
items: {
|
|
1131
|
+
type: "string"
|
|
1132
|
+
}
|
|
1133
|
+
}
|
|
1134
|
+
},
|
|
1135
|
+
required: [
|
|
1136
|
+
"type",
|
|
1137
|
+
"fileNames"
|
|
1138
|
+
]
|
|
1139
|
+
},
|
|
1140
|
+
IAutoBePreliminaryGetPrismaSchemas: {
|
|
1141
|
+
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.",
|
|
1142
|
+
type: "object",
|
|
1143
|
+
properties: {
|
|
1144
|
+
type: {
|
|
1145
|
+
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.",
|
|
1146
|
+
type: "string",
|
|
1147
|
+
"enum": [
|
|
1148
|
+
"getPrismaSchemas"
|
|
1149
|
+
]
|
|
1150
|
+
},
|
|
1151
|
+
schemaNames: {
|
|
1152
|
+
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",
|
|
1153
|
+
type: "array",
|
|
1154
|
+
items: {
|
|
1155
|
+
type: "string"
|
|
1156
|
+
}
|
|
1157
|
+
}
|
|
1158
|
+
},
|
|
1159
|
+
required: [
|
|
1160
|
+
"type",
|
|
1161
|
+
"schemaNames"
|
|
1162
|
+
]
|
|
1163
|
+
},
|
|
1164
|
+
"IAutoBeInterfaceOperationApplication.IComplete": {
|
|
1165
|
+
description: "Request to generate detailed API operations.\n\nExecutes operation generation to create complete API operations following\nREST principles and quality standards. Each operation includes specification,\npath, method, detailed description, summary, parameters, and request/response\nbodies.",
|
|
1166
|
+
type: "object",
|
|
1167
|
+
properties: {
|
|
1168
|
+
type: {
|
|
1169
|
+
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.",
|
|
1170
|
+
type: "string",
|
|
1171
|
+
"enum": [
|
|
1172
|
+
"complete"
|
|
1173
|
+
]
|
|
1174
|
+
},
|
|
1175
|
+
operations: {
|
|
1176
|
+
description: "Array of API operations to generate.\n\nEach operation in this array includes:\n\n- Specification: Detailed API specification with clear purpose and\n functionality\n- Path: Resource-centric URL path (e.g., \"/resources/{resourceId}\")\n- Method: HTTP method (get, post, put, delete, patch)\n- Description: Extremely detailed multi-paragraph description referencing\n Prisma schema comments\n- Summary: Concise one-sentence summary of the endpoint\n- Parameters: Array of all necessary parameters with descriptions and\n schema definitions\n- RequestBody: For POST/PUT/PATCH methods, with typeName referencing\n components.schemas\n- ResponseBody: With typeName referencing appropriate response type\n\nAll operations follow strict quality standards:\n\n1. Detailed descriptions referencing Prisma schema comments\n2. Accurate parameter definitions matching path parameters\n3. Appropriate request/response body type references\n4. Consistent patterns for CRUD operations\n\nFor list retrievals (typically PATCH), include pagination, search, and\nsorting. For detail retrieval (GET), return a single resource. For\ncreation (POST), use .ICreate request body. For modification (PUT), use\n.IUpdate request body.",
|
|
1177
|
+
type: "array",
|
|
1178
|
+
items: {
|
|
1179
|
+
$ref: "#/$defs/IAutoBeInterfaceOperationApplication.IOperation"
|
|
1180
|
+
}
|
|
1181
|
+
}
|
|
1182
|
+
},
|
|
1183
|
+
required: [
|
|
1184
|
+
"type",
|
|
1185
|
+
"operations"
|
|
1186
|
+
]
|
|
1187
|
+
},
|
|
543
1188
|
"IAutoBeInterfaceOperationApplication.IOperation": {
|
|
544
1189
|
description: "Operation of the Restful API.\n\nThis interface defines a single API endpoint with its HTTP {@link method},\n{@link path}, {@link parameters path parameters},\n{@link requestBody request body}, and {@link responseBody} structure. It\ncorresponds to an individual operation in the paths section of an OpenAPI\ndocument.\n\nEach operation requires a detailed explanation of its purpose through the\nreason and description fields, making it clear why the API was designed and\nhow it should be used.\n\nDO: Use object types for all request bodies and responses. DO: Reference\nnamed types defined in the components section. DO: Use `application/json`\nas the content-type. DO: Use `string & tags.Format<\"uri\">` in the schema\nfor file upload/download operations instead of binary data formats.\n\nIn OpenAPI, this might represent:\n\n```json\n{\n \"/shoppings/customers/orders\": {\n \"post\": {\n \"description\": \"Create a new order application from shopping cart...\",\n \"parameters\": [...],\n \"requestBody\": {...},\n \"responses\": {...}\n }\n }\n}\n```",
|
|
545
1190
|
type: "object",
|
|
@@ -590,7 +1235,7 @@ const collection = {
|
|
|
590
1235
|
type: "string"
|
|
591
1236
|
},
|
|
592
1237
|
authorizationActors: {
|
|
593
|
-
description: "Authorization actors required to access this API operation.\n\nThis field specifies which user actors are allowed to access this\nendpoint. Multiple actors can be specified to allow different types of\nusers to access the same endpoint.\n\n## \u26A0\uFE0F CRITICAL: Actor Multiplication Effect\n\n**EACH ACTOR IN THIS ARRAY GENERATES A SEPARATE ENDPOINT**\n\n- If you specify `[\"admin\", \"moderator\", \"member\"]`, this creates 3\n separate endpoints\n- Total generated endpoints = operations \u00D7 average actors.length\n- Example: 100 operations with 3 actors each = 300 actual endpoints\n\n## \uD83D\uDD34 AVOID OVER-GENERATION\n\n**DO NOT create actor-specific endpoints when a public endpoint would\nsuffice:**\n\n- \u274C BAD: Separate GET endpoints for admin, member, moderator to view the\n same public data\n- \u2705 GOOD: Single public endpoint `[]` with actor-based filtering in
|
|
1238
|
+
description: "Authorization actors required to access this API operation.\n\nThis field specifies which user actors are allowed to access this\nendpoint. Multiple actors can be specified to allow different types of\nusers to access the same endpoint.\n\n## \u26A0\uFE0F CRITICAL: Actor Multiplication Effect\n\n**EACH ACTOR IN THIS ARRAY GENERATES A SEPARATE ENDPOINT**\n\n- If you specify `[\"admin\", \"moderator\", \"member\"]`, this creates 3\n separate endpoints\n- Total generated endpoints = operations \u00D7 average actors.length\n- Example: 100 operations with 3 actors each = 300 actual endpoints\n\n## \uD83D\uDD34 AVOID OVER-GENERATION\n\n**DO NOT create actor-specific endpoints when a public endpoint would\nsuffice:**\n\n- \u274C BAD: Separate GET endpoints for admin, member, moderator to view the\n same public data\n- \u2705 GOOD: Single public endpoint `[]` with actor-based filtering in\n business logic\n\n**DO NOT enumerate all possible actors when the Prisma schema uses a\nsingle User table:**\n\n- If Prisma has a User table with role/permission fields, you likely only\n need `[\"user\"]`\n- Avoid listing `[\"admin\", \"seller\", \"buyer\", \"moderator\", ...]`\n unnecessarily\n- The actual actor checking happens in business logic, not at the endpoint\n level\n\n## Naming Convention\n\nDO: Use camelCase for all actor names.\n\n## Important Guidelines\n\n- Set to empty array `[]` for public endpoints that require no\n authentication\n- Set to array with actor strings for actor-restricted endpoints\n- **MINIMIZE the number of actors per endpoint to prevent explosion**\n- Consider if the endpoint can be public with actor-based filtering instead\n- The actor names match exactly with the user type/actor defined in the\n database\n- This will be used by the Realize Agent to generate appropriate decorator\n and authorization logic in the provider functions\n- The controller will apply the corresponding authentication decorator\n based on these actors\n\n## Examples\n\n- `[]` - Public endpoint, no authentication required (PREFERRED for read\n operations)\n- `[\"user\"]` - Any authenticated user can access (PREFERRED for\n user-specific operations)\n- `[\"admin\"]` - Only admin users can access (USE SPARINGLY)\n- `[\"admin\", \"moderator\"]` - Both admin and moderator users can access\n (AVOID if possible)\n- `[\"seller\"]` - Only seller users can access (ONLY if Seller is a separate\n table)\n\n## Best Practices\n\n1. **Start with public `[]` for all read operations** unless sensitive data\n is involved\n2. **Use single actor `[\"user\"]` for authenticated operations** and handle\n permissions in business logic\n3. **Only use multiple actors when absolutely necessary** for different\n business logic paths\n4. **Remember: Fewer actors = Fewer endpoints = Better performance and\n maintainability**\n\nNote: The actual authentication/authorization implementation will be\nhandled by decorators at the controller level, and the provider function\nwill receive the authenticated user object with the appropriate type.",
|
|
594
1239
|
type: "array",
|
|
595
1240
|
items: {
|
|
596
1241
|
description: "@minLength 1\n@pattern ^[a-z][a-zA-Z0-9]*$",
|
|
@@ -836,33 +1481,98 @@ const collection = {
|
|
|
836
1481
|
}
|
|
837
1482
|
}
|
|
838
1483
|
},
|
|
839
|
-
description: "
|
|
840
|
-
validate: (() => { const
|
|
1484
|
+
description: "Process operation generation task or preliminary data requests.\n\nCreates complete API operations following REST principles and quality\nstandards. Processes operations with progress tracking to ensure iterative\ncompletion.",
|
|
1485
|
+
validate: (() => { const _iv6 = new Set(["date-time", "password", "regex", "uuid", "email", "hostname", "idn-email", "idn-hostname", "iri", "iri-reference", "ipv4", "ipv6", "uri", "uri-reference", "uri-template", "url", "date", "time", "duration", "json-pointer", "relative-json-pointer"]); const _vv12 = new Set(["date-time", "password", "regex", "uuid", "email", "hostname", "idn-email", "idn-hostname", "iri", "iri-reference", "ipv4", "ipv6", "uri", "uri-reference", "uri-template", "url", "date", "time", "duration", "json-pointer", "relative-json-pointer"]); 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 => "getPrismaSchemas" === input.type && (Array.isArray(input.schemaNames) && (1 <= input.schemaNames.length && input.schemaNames.every(elem => "string" === typeof elem))); const _io3 = input => "complete" === input.type && (Array.isArray(input.operations) && input.operations.every(elem => "object" === typeof elem && null !== elem && _io4(elem))); const _io4 = input => "string" === typeof input.specification && "string" === typeof input.description && "string" === typeof input.summary && (Array.isArray(input.parameters) && input.parameters.every(elem => "object" === typeof elem && null !== elem && _io5(elem))) && (null === input.requestBody || "object" === typeof input.requestBody && null !== input.requestBody && _io9(input.requestBody)) && (null === input.responseBody || "object" === typeof input.responseBody && null !== input.responseBody && _io10(input.responseBody)) && ("string" === typeof input.name && RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name)) && (Array.isArray(input.authorizationActors) && input.authorizationActors.every(elem => "string" === typeof elem && (RegExp("^[a-z][a-zA-Z0-9]*$").test(elem) && 1 <= elem.length))) && ("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 _io5 = input => "string" === typeof input.name && RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name) && "string" === typeof input.description && ("object" === typeof input.schema && null !== input.schema && _iu1(input.schema)); const _io6 = input => (undefined === input.minimum || "number" === typeof input.minimum && (Math.floor(input.minimum) === input.minimum && -9223372036854776000 <= input.minimum && input.minimum <= 9223372036854776000)) && (undefined === input.maximum || "number" === typeof input.maximum && (Math.floor(input.maximum) === input.maximum && -9223372036854776000 <= input.maximum && input.maximum <= 9223372036854776000)) && (undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum) && (undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum) && (undefined === input.multipleOf || "number" === typeof input.multipleOf && (Math.floor(input.multipleOf) === input.multipleOf && 0 <= input.multipleOf && input.multipleOf <= 18446744073709552000 && 0 < input.multipleOf)) && "integer" === input.type; const _io7 = input => (undefined === input.minimum || "number" === typeof input.minimum) && (undefined === input.maximum || "number" === typeof input.maximum) && (undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum) && (undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum) && (undefined === input.multipleOf || "number" === typeof input.multipleOf && 0 < input.multipleOf) && "number" === input.type; const _io8 = input => (undefined === input.format || true === _iv6.has(input.format)) && (undefined === input.pattern || "string" === typeof input.pattern) && (undefined === input.contentMediaType || "string" === typeof input.contentMediaType) && (undefined === input.minLength || "number" === typeof input.minLength && (Math.floor(input.minLength) === input.minLength && 0 <= input.minLength && input.minLength <= 18446744073709552000)) && (undefined === input.maxLength || "number" === typeof input.maxLength && (Math.floor(input.maxLength) === input.maxLength && 0 <= input.maxLength && input.maxLength <= 18446744073709552000)) && "string" === input.type; const _io9 = input => "string" === typeof input.description && "string" === typeof input.typeName; const _io10 = input => "string" === typeof input.description && "string" === typeof input.typeName; const _iu0 = input => (() => {
|
|
1486
|
+
if ("getAnalysisFiles" === input.type)
|
|
1487
|
+
return _io1(input);
|
|
1488
|
+
else if ("getPrismaSchemas" === input.type)
|
|
1489
|
+
return _io2(input);
|
|
1490
|
+
else if ("complete" === input.type)
|
|
1491
|
+
return _io3(input);
|
|
1492
|
+
else
|
|
1493
|
+
return false;
|
|
1494
|
+
})(); const _iu1 = input => (() => {
|
|
841
1495
|
if ("number" === input.type)
|
|
842
|
-
return
|
|
1496
|
+
return _io7(input);
|
|
843
1497
|
else if ("integer" === input.type)
|
|
844
|
-
return
|
|
1498
|
+
return _io6(input);
|
|
845
1499
|
else if ("string" === input.type)
|
|
846
|
-
return
|
|
1500
|
+
return _io8(input);
|
|
847
1501
|
else
|
|
848
1502
|
return false;
|
|
849
|
-
})(); const _vo0 = (input, _path, _exceptionable = true) => [
|
|
1503
|
+
})(); const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.thinking || _report(_exceptionable, {
|
|
1504
|
+
path: _path + ".thinking",
|
|
1505
|
+
expected: "string",
|
|
1506
|
+
value: input.thinking
|
|
1507
|
+
}), ("object" === typeof input.request && null !== input.request || _report(_exceptionable, {
|
|
1508
|
+
path: _path + ".request",
|
|
1509
|
+
expected: "(IAutoBeInterfaceOperationApplication.IComplete | IAutoBePreliminaryGetAnalysisFiles | IAutoBePreliminaryGetPrismaSchemas)",
|
|
1510
|
+
value: input.request
|
|
1511
|
+
})) && _vu0(input.request, _path + ".request", true && _exceptionable) || _report(_exceptionable, {
|
|
1512
|
+
path: _path + ".request",
|
|
1513
|
+
expected: "(IAutoBeInterfaceOperationApplication.IComplete | IAutoBePreliminaryGetAnalysisFiles | IAutoBePreliminaryGetPrismaSchemas)",
|
|
1514
|
+
value: input.request
|
|
1515
|
+
})].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => ["getAnalysisFiles" === input.type || _report(_exceptionable, {
|
|
1516
|
+
path: _path + ".type",
|
|
1517
|
+
expected: "\"getAnalysisFiles\"",
|
|
1518
|
+
value: input.type
|
|
1519
|
+
}), (Array.isArray(input.fileNames) || _report(_exceptionable, {
|
|
1520
|
+
path: _path + ".fileNames",
|
|
1521
|
+
expected: "(Array<string> & MinItems<1>)",
|
|
1522
|
+
value: input.fileNames
|
|
1523
|
+
})) && ((1 <= input.fileNames.length || _report(_exceptionable, {
|
|
1524
|
+
path: _path + ".fileNames",
|
|
1525
|
+
expected: "Array<> & MinItems<1>",
|
|
1526
|
+
value: input.fileNames
|
|
1527
|
+
})) && input.fileNames.map((elem, _index7) => "string" === typeof elem || _report(_exceptionable, {
|
|
1528
|
+
path: _path + ".fileNames[" + _index7 + "]",
|
|
1529
|
+
expected: "string",
|
|
1530
|
+
value: elem
|
|
1531
|
+
})).every(flag => flag)) || _report(_exceptionable, {
|
|
1532
|
+
path: _path + ".fileNames",
|
|
1533
|
+
expected: "(Array<string> & MinItems<1>)",
|
|
1534
|
+
value: input.fileNames
|
|
1535
|
+
})].every(flag => flag); const _vo2 = (input, _path, _exceptionable = true) => ["getPrismaSchemas" === input.type || _report(_exceptionable, {
|
|
1536
|
+
path: _path + ".type",
|
|
1537
|
+
expected: "\"getPrismaSchemas\"",
|
|
1538
|
+
value: input.type
|
|
1539
|
+
}), (Array.isArray(input.schemaNames) || _report(_exceptionable, {
|
|
1540
|
+
path: _path + ".schemaNames",
|
|
1541
|
+
expected: "(Array<string> & MinItems<1>)",
|
|
1542
|
+
value: input.schemaNames
|
|
1543
|
+
})) && ((1 <= input.schemaNames.length || _report(_exceptionable, {
|
|
1544
|
+
path: _path + ".schemaNames",
|
|
1545
|
+
expected: "Array<> & MinItems<1>",
|
|
1546
|
+
value: input.schemaNames
|
|
1547
|
+
})) && input.schemaNames.map((elem, _index8) => "string" === typeof elem || _report(_exceptionable, {
|
|
1548
|
+
path: _path + ".schemaNames[" + _index8 + "]",
|
|
1549
|
+
expected: "string",
|
|
1550
|
+
value: elem
|
|
1551
|
+
})).every(flag => flag)) || _report(_exceptionable, {
|
|
1552
|
+
path: _path + ".schemaNames",
|
|
1553
|
+
expected: "(Array<string> & MinItems<1>)",
|
|
1554
|
+
value: input.schemaNames
|
|
1555
|
+
})].every(flag => flag); const _vo3 = (input, _path, _exceptionable = true) => ["complete" === input.type || _report(_exceptionable, {
|
|
1556
|
+
path: _path + ".type",
|
|
1557
|
+
expected: "\"complete\"",
|
|
1558
|
+
value: input.type
|
|
1559
|
+
}), (Array.isArray(input.operations) || _report(_exceptionable, {
|
|
850
1560
|
path: _path + ".operations",
|
|
851
1561
|
expected: "Array<IAutoBeInterfaceOperationApplication.IOperation>",
|
|
852
1562
|
value: input.operations
|
|
853
|
-
})) && input.operations.map((elem,
|
|
854
|
-
path: _path + ".operations[" +
|
|
1563
|
+
})) && input.operations.map((elem, _index9) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
1564
|
+
path: _path + ".operations[" + _index9 + "]",
|
|
855
1565
|
expected: "IAutoBeInterfaceOperationApplication.IOperation",
|
|
856
1566
|
value: elem
|
|
857
|
-
})) &&
|
|
858
|
-
path: _path + ".operations[" +
|
|
1567
|
+
})) && _vo4(elem, _path + ".operations[" + _index9 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
1568
|
+
path: _path + ".operations[" + _index9 + "]",
|
|
859
1569
|
expected: "IAutoBeInterfaceOperationApplication.IOperation",
|
|
860
1570
|
value: elem
|
|
861
1571
|
})).every(flag => flag) || _report(_exceptionable, {
|
|
862
1572
|
path: _path + ".operations",
|
|
863
1573
|
expected: "Array<IAutoBeInterfaceOperationApplication.IOperation>",
|
|
864
1574
|
value: input.operations
|
|
865
|
-
})].every(flag => flag); const
|
|
1575
|
+
})].every(flag => flag); const _vo4 = (input, _path, _exceptionable = true) => ["string" === typeof input.specification || _report(_exceptionable, {
|
|
866
1576
|
path: _path + ".specification",
|
|
867
1577
|
expected: "string",
|
|
868
1578
|
value: input.specification
|
|
@@ -878,12 +1588,12 @@ const collection = {
|
|
|
878
1588
|
path: _path + ".parameters",
|
|
879
1589
|
expected: "Array<AutoBeOpenApi.IParameter>",
|
|
880
1590
|
value: input.parameters
|
|
881
|
-
})) && input.parameters.map((elem,
|
|
882
|
-
path: _path + ".parameters[" +
|
|
1591
|
+
})) && input.parameters.map((elem, _index10) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
1592
|
+
path: _path + ".parameters[" + _index10 + "]",
|
|
883
1593
|
expected: "AutoBeOpenApi.IParameter",
|
|
884
1594
|
value: elem
|
|
885
|
-
})) &&
|
|
886
|
-
path: _path + ".parameters[" +
|
|
1595
|
+
})) && _vo5(elem, _path + ".parameters[" + _index10 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
1596
|
+
path: _path + ".parameters[" + _index10 + "]",
|
|
887
1597
|
expected: "AutoBeOpenApi.IParameter",
|
|
888
1598
|
value: elem
|
|
889
1599
|
})).every(flag => flag) || _report(_exceptionable, {
|
|
@@ -894,7 +1604,7 @@ const collection = {
|
|
|
894
1604
|
path: _path + ".requestBody",
|
|
895
1605
|
expected: "(AutoBeOpenApi.IRequestBody | null)",
|
|
896
1606
|
value: input.requestBody
|
|
897
|
-
})) &&
|
|
1607
|
+
})) && _vo9(input.requestBody, _path + ".requestBody", true && _exceptionable) || _report(_exceptionable, {
|
|
898
1608
|
path: _path + ".requestBody",
|
|
899
1609
|
expected: "(AutoBeOpenApi.IRequestBody | null)",
|
|
900
1610
|
value: input.requestBody
|
|
@@ -902,7 +1612,7 @@ const collection = {
|
|
|
902
1612
|
path: _path + ".responseBody",
|
|
903
1613
|
expected: "(AutoBeOpenApi.IResponseBody | null)",
|
|
904
1614
|
value: input.responseBody
|
|
905
|
-
})) &&
|
|
1615
|
+
})) && _vo10(input.responseBody, _path + ".responseBody", true && _exceptionable) || _report(_exceptionable, {
|
|
906
1616
|
path: _path + ".responseBody",
|
|
907
1617
|
expected: "(AutoBeOpenApi.IResponseBody | null)",
|
|
908
1618
|
value: input.responseBody
|
|
@@ -918,16 +1628,16 @@ const collection = {
|
|
|
918
1628
|
path: _path + ".authorizationActors",
|
|
919
1629
|
expected: "Array<string & CamelCasePattern & MinLength<1>>",
|
|
920
1630
|
value: input.authorizationActors
|
|
921
|
-
})) && input.authorizationActors.map((elem,
|
|
922
|
-
path: _path + ".authorizationActors[" +
|
|
1631
|
+
})) && input.authorizationActors.map((elem, _index11) => "string" === typeof elem && (RegExp("^[a-z][a-zA-Z0-9]*$").test(elem) || _report(_exceptionable, {
|
|
1632
|
+
path: _path + ".authorizationActors[" + _index11 + "]",
|
|
923
1633
|
expected: "string & CamelCasePattern",
|
|
924
1634
|
value: elem
|
|
925
1635
|
})) && (1 <= elem.length || _report(_exceptionable, {
|
|
926
|
-
path: _path + ".authorizationActors[" +
|
|
1636
|
+
path: _path + ".authorizationActors[" + _index11 + "]",
|
|
927
1637
|
expected: "string & MinLength<1>",
|
|
928
1638
|
value: elem
|
|
929
1639
|
})) || _report(_exceptionable, {
|
|
930
|
-
path: _path + ".authorizationActors[" +
|
|
1640
|
+
path: _path + ".authorizationActors[" + _index11 + "]",
|
|
931
1641
|
expected: "(string & CamelCasePattern & MinLength<1>)",
|
|
932
1642
|
value: elem
|
|
933
1643
|
})).every(flag => flag) || _report(_exceptionable, {
|
|
@@ -946,7 +1656,7 @@ const collection = {
|
|
|
946
1656
|
path: _path + ".method",
|
|
947
1657
|
expected: "(\"delete\" | \"get\" | \"patch\" | \"post\" | \"put\")",
|
|
948
1658
|
value: input.method
|
|
949
|
-
})].every(flag => flag); const
|
|
1659
|
+
})].every(flag => flag); const _vo5 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name) || _report(_exceptionable, {
|
|
950
1660
|
path: _path + ".name",
|
|
951
1661
|
expected: "string & CamelCasePattern",
|
|
952
1662
|
value: input.name
|
|
@@ -962,11 +1672,11 @@ const collection = {
|
|
|
962
1672
|
path: _path + ".schema",
|
|
963
1673
|
expected: "(AutoBeOpenApi.IJsonSchema.IInteger | AutoBeOpenApi.IJsonSchema.INumber | AutoBeOpenApi.IJsonSchema.IString)",
|
|
964
1674
|
value: input.schema
|
|
965
|
-
})) &&
|
|
1675
|
+
})) && _vu1(input.schema, _path + ".schema", true && _exceptionable) || _report(_exceptionable, {
|
|
966
1676
|
path: _path + ".schema",
|
|
967
1677
|
expected: "(AutoBeOpenApi.IJsonSchema.IInteger | AutoBeOpenApi.IJsonSchema.INumber | AutoBeOpenApi.IJsonSchema.IString)",
|
|
968
1678
|
value: input.schema
|
|
969
|
-
})].every(flag => flag); const
|
|
1679
|
+
})].every(flag => flag); const _vo6 = (input, _path, _exceptionable = true) => [undefined === input.minimum || "number" === typeof input.minimum && (Math.floor(input.minimum) === input.minimum && -9223372036854776000 <= input.minimum && input.minimum <= 9223372036854776000 || _report(_exceptionable, {
|
|
970
1680
|
path: _path + ".minimum",
|
|
971
1681
|
expected: "number & Type<\"int64\">",
|
|
972
1682
|
value: input.minimum
|
|
@@ -1006,7 +1716,7 @@ const collection = {
|
|
|
1006
1716
|
path: _path + ".type",
|
|
1007
1717
|
expected: "\"integer\"",
|
|
1008
1718
|
value: input.type
|
|
1009
|
-
})].every(flag => flag); const
|
|
1719
|
+
})].every(flag => flag); const _vo7 = (input, _path, _exceptionable = true) => [undefined === input.minimum || "number" === typeof input.minimum || _report(_exceptionable, {
|
|
1010
1720
|
path: _path + ".minimum",
|
|
1011
1721
|
expected: "(number | undefined)",
|
|
1012
1722
|
value: input.minimum
|
|
@@ -1034,7 +1744,7 @@ const collection = {
|
|
|
1034
1744
|
path: _path + ".type",
|
|
1035
1745
|
expected: "\"number\"",
|
|
1036
1746
|
value: input.type
|
|
1037
|
-
})].every(flag => flag); const
|
|
1747
|
+
})].every(flag => flag); const _vo8 = (input, _path, _exceptionable = true) => [undefined === input.format || true === _vv12.has(input.format) || _report(_exceptionable, {
|
|
1038
1748
|
path: _path + ".format",
|
|
1039
1749
|
expected: "(\"date\" | \"date-time\" | \"duration\" | \"email\" | \"hostname\" | \"idn-email\" | \"idn-hostname\" | \"ipv4\" | \"ipv6\" | \"iri\" | \"iri-reference\" | \"json-pointer\" | \"password\" | \"regex\" | \"relative-json-pointer\" | \"time\" | \"uri\" | \"uri-reference\" | \"uri-template\" | \"url\" | \"uuid\" | undefined)",
|
|
1040
1750
|
value: input.format
|
|
@@ -1066,7 +1776,7 @@ const collection = {
|
|
|
1066
1776
|
path: _path + ".type",
|
|
1067
1777
|
expected: "\"string\"",
|
|
1068
1778
|
value: input.type
|
|
1069
|
-
})].every(flag => flag); const
|
|
1779
|
+
})].every(flag => flag); const _vo9 = (input, _path, _exceptionable = true) => ["string" === typeof input.description || _report(_exceptionable, {
|
|
1070
1780
|
path: _path + ".description",
|
|
1071
1781
|
expected: "string",
|
|
1072
1782
|
value: input.description
|
|
@@ -1074,7 +1784,7 @@ const collection = {
|
|
|
1074
1784
|
path: _path + ".typeName",
|
|
1075
1785
|
expected: "string",
|
|
1076
1786
|
value: input.typeName
|
|
1077
|
-
})].every(flag => flag); const
|
|
1787
|
+
})].every(flag => flag); const _vo10 = (input, _path, _exceptionable = true) => ["string" === typeof input.description || _report(_exceptionable, {
|
|
1078
1788
|
path: _path + ".description",
|
|
1079
1789
|
expected: "string",
|
|
1080
1790
|
value: input.description
|
|
@@ -1083,12 +1793,25 @@ const collection = {
|
|
|
1083
1793
|
expected: "string",
|
|
1084
1794
|
value: input.typeName
|
|
1085
1795
|
})].every(flag => flag); const _vu0 = (input, _path, _exceptionable = true) => (() => {
|
|
1796
|
+
if ("getAnalysisFiles" === input.type)
|
|
1797
|
+
return _vo1(input, _path, true && _exceptionable);
|
|
1798
|
+
else if ("getPrismaSchemas" === input.type)
|
|
1799
|
+
return _vo2(input, _path, true && _exceptionable);
|
|
1800
|
+
else if ("complete" === input.type)
|
|
1801
|
+
return _vo3(input, _path, true && _exceptionable);
|
|
1802
|
+
else
|
|
1803
|
+
return _report(_exceptionable, {
|
|
1804
|
+
path: _path,
|
|
1805
|
+
expected: "(IAutoBePreliminaryGetAnalysisFiles | IAutoBePreliminaryGetPrismaSchemas | IAutoBeInterfaceOperationApplication.IComplete)",
|
|
1806
|
+
value: input
|
|
1807
|
+
});
|
|
1808
|
+
})(); const _vu1 = (input, _path, _exceptionable = true) => (() => {
|
|
1086
1809
|
if ("number" === input.type)
|
|
1087
|
-
return
|
|
1810
|
+
return _vo7(input, _path, true && _exceptionable);
|
|
1088
1811
|
else if ("integer" === input.type)
|
|
1089
|
-
return
|
|
1812
|
+
return _vo6(input, _path, true && _exceptionable);
|
|
1090
1813
|
else if ("string" === input.type)
|
|
1091
|
-
return
|
|
1814
|
+
return _vo8(input, _path, true && _exceptionable);
|
|
1092
1815
|
else
|
|
1093
1816
|
return _report(_exceptionable, {
|
|
1094
1817
|
path: _path,
|
|
@@ -1128,7 +1851,7 @@ const collection = {
|
|
|
1128
1851
|
};
|
|
1129
1852
|
__typia_transform__llmApplicationFinalize._llmApplicationFinalize(application, Object.assign(Object.assign({}, {
|
|
1130
1853
|
validate: {
|
|
1131
|
-
|
|
1854
|
+
process: validate,
|
|
1132
1855
|
},
|
|
1133
1856
|
}), { equals: false }));
|
|
1134
1857
|
return application;
|
|
@@ -1142,24 +1865,109 @@ const collection = {
|
|
|
1142
1865
|
},
|
|
1143
1866
|
functions: [
|
|
1144
1867
|
{
|
|
1145
|
-
name: "
|
|
1868
|
+
name: "process",
|
|
1146
1869
|
parameters: {
|
|
1147
|
-
description: "
|
|
1870
|
+
description: " Request containing either preliminary data request or complete\ntask\n\n------------------------------\n\nCurrent Type: {@link IAutoBeInterfaceOperationApplication.IProps}",
|
|
1148
1871
|
type: "object",
|
|
1149
1872
|
properties: {
|
|
1150
|
-
|
|
1151
|
-
description: "
|
|
1152
|
-
type: "
|
|
1153
|
-
|
|
1154
|
-
|
|
1873
|
+
thinking: {
|
|
1874
|
+
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.",
|
|
1875
|
+
type: "string"
|
|
1876
|
+
},
|
|
1877
|
+
request: {
|
|
1878
|
+
description: "Type discriminator for the request.\n\nDetermines which action to perform: preliminary data retrieval\n(getAnalysisFiles, getPrismaSchemas) or final operation generation\n(complete). When preliminary returns empty array, that type is removed\nfrom the union, physically preventing repeated calls.",
|
|
1879
|
+
oneOf: [
|
|
1880
|
+
{
|
|
1881
|
+
$ref: "#/$defs/IAutoBePreliminaryGetAnalysisFiles"
|
|
1882
|
+
},
|
|
1883
|
+
{
|
|
1884
|
+
$ref: "#/$defs/IAutoBePreliminaryGetPrismaSchemas"
|
|
1885
|
+
},
|
|
1886
|
+
{
|
|
1887
|
+
$ref: "#/$defs/IAutoBeInterfaceOperationApplication.IComplete"
|
|
1888
|
+
}
|
|
1889
|
+
],
|
|
1890
|
+
discriminator: {
|
|
1891
|
+
propertyName: "type",
|
|
1892
|
+
mapping: {
|
|
1893
|
+
getAnalysisFiles: "#/$defs/IAutoBePreliminaryGetAnalysisFiles",
|
|
1894
|
+
getPrismaSchemas: "#/$defs/IAutoBePreliminaryGetPrismaSchemas",
|
|
1895
|
+
complete: "#/$defs/IAutoBeInterfaceOperationApplication.IComplete"
|
|
1896
|
+
}
|
|
1155
1897
|
}
|
|
1156
1898
|
}
|
|
1157
1899
|
},
|
|
1158
1900
|
required: [
|
|
1159
|
-
"
|
|
1901
|
+
"thinking",
|
|
1902
|
+
"request"
|
|
1160
1903
|
],
|
|
1161
1904
|
additionalProperties: false,
|
|
1162
1905
|
$defs: {
|
|
1906
|
+
IAutoBePreliminaryGetAnalysisFiles: {
|
|
1907
|
+
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.",
|
|
1908
|
+
type: "object",
|
|
1909
|
+
properties: {
|
|
1910
|
+
type: {
|
|
1911
|
+
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.",
|
|
1912
|
+
"const": "getAnalysisFiles"
|
|
1913
|
+
},
|
|
1914
|
+
fileNames: {
|
|
1915
|
+
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.",
|
|
1916
|
+
type: "array",
|
|
1917
|
+
items: {
|
|
1918
|
+
type: "string"
|
|
1919
|
+
},
|
|
1920
|
+
minItems: 1
|
|
1921
|
+
}
|
|
1922
|
+
},
|
|
1923
|
+
required: [
|
|
1924
|
+
"type",
|
|
1925
|
+
"fileNames"
|
|
1926
|
+
]
|
|
1927
|
+
},
|
|
1928
|
+
IAutoBePreliminaryGetPrismaSchemas: {
|
|
1929
|
+
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.",
|
|
1930
|
+
type: "object",
|
|
1931
|
+
properties: {
|
|
1932
|
+
type: {
|
|
1933
|
+
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.",
|
|
1934
|
+
"const": "getPrismaSchemas"
|
|
1935
|
+
},
|
|
1936
|
+
schemaNames: {
|
|
1937
|
+
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.",
|
|
1938
|
+
type: "array",
|
|
1939
|
+
items: {
|
|
1940
|
+
type: "string"
|
|
1941
|
+
},
|
|
1942
|
+
minItems: 1
|
|
1943
|
+
}
|
|
1944
|
+
},
|
|
1945
|
+
required: [
|
|
1946
|
+
"type",
|
|
1947
|
+
"schemaNames"
|
|
1948
|
+
]
|
|
1949
|
+
},
|
|
1950
|
+
"IAutoBeInterfaceOperationApplication.IComplete": {
|
|
1951
|
+
description: "Request to generate detailed API operations.\n\nExecutes operation generation to create complete API operations following\nREST principles and quality standards. Each operation includes specification,\npath, method, detailed description, summary, parameters, and request/response\nbodies.",
|
|
1952
|
+
type: "object",
|
|
1953
|
+
properties: {
|
|
1954
|
+
type: {
|
|
1955
|
+
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.",
|
|
1956
|
+
"const": "complete"
|
|
1957
|
+
},
|
|
1958
|
+
operations: {
|
|
1959
|
+
description: "Array of API operations to generate.\n\nEach operation in this array includes:\n\n- Specification: Detailed API specification with clear purpose and\n functionality\n- Path: Resource-centric URL path (e.g., \"/resources/{resourceId}\")\n- Method: HTTP method (get, post, put, delete, patch)\n- Description: Extremely detailed multi-paragraph description referencing\n Prisma schema comments\n- Summary: Concise one-sentence summary of the endpoint\n- Parameters: Array of all necessary parameters with descriptions and\n schema definitions\n- RequestBody: For POST/PUT/PATCH methods, with typeName referencing\n components.schemas\n- ResponseBody: With typeName referencing appropriate response type\n\nAll operations follow strict quality standards:\n\n1. Detailed descriptions referencing Prisma schema comments\n2. Accurate parameter definitions matching path parameters\n3. Appropriate request/response body type references\n4. Consistent patterns for CRUD operations\n\nFor list retrievals (typically PATCH), include pagination, search, and\nsorting. For detail retrieval (GET), return a single resource. For\ncreation (POST), use .ICreate request body. For modification (PUT), use\n.IUpdate request body.",
|
|
1960
|
+
type: "array",
|
|
1961
|
+
items: {
|
|
1962
|
+
$ref: "#/$defs/IAutoBeInterfaceOperationApplication.IOperation"
|
|
1963
|
+
}
|
|
1964
|
+
}
|
|
1965
|
+
},
|
|
1966
|
+
required: [
|
|
1967
|
+
"type",
|
|
1968
|
+
"operations"
|
|
1969
|
+
]
|
|
1970
|
+
},
|
|
1163
1971
|
"IAutoBeInterfaceOperationApplication.IOperation": {
|
|
1164
1972
|
description: "Operation of the Restful API.\n\nThis interface defines a single API endpoint with its HTTP {@link method},\n{@link path}, {@link parameters path parameters},\n{@link requestBody request body}, and {@link responseBody} structure. It\ncorresponds to an individual operation in the paths section of an OpenAPI\ndocument.\n\nEach operation requires a detailed explanation of its purpose through the\nreason and description fields, making it clear why the API was designed and\nhow it should be used.\n\nDO: Use object types for all request bodies and responses. DO: Reference\nnamed types defined in the components section. DO: Use `application/json`\nas the content-type. DO: Use `string & tags.Format<\"uri\">` in the schema\nfor file upload/download operations instead of binary data formats.\n\nIn OpenAPI, this might represent:\n\n```json\n{\n \"/shoppings/customers/orders\": {\n \"post\": {\n \"description\": \"Create a new order application from shopping cart...\",\n \"parameters\": [...],\n \"requestBody\": {...},\n \"responses\": {...}\n }\n }\n}\n```",
|
|
1165
1973
|
type: "object",
|
|
@@ -1211,7 +2019,7 @@ const collection = {
|
|
|
1211
2019
|
pattern: "^[a-z][a-zA-Z0-9]*$"
|
|
1212
2020
|
},
|
|
1213
2021
|
authorizationActors: {
|
|
1214
|
-
description: "Authorization actors required to access this API operation.\n\nThis field specifies which user actors are allowed to access this\nendpoint. Multiple actors can be specified to allow different types of\nusers to access the same endpoint.\n\n## \u26A0\uFE0F CRITICAL: Actor Multiplication Effect\n\n**EACH ACTOR IN THIS ARRAY GENERATES A SEPARATE ENDPOINT**\n\n- If you specify `[\"admin\", \"moderator\", \"member\"]`, this creates 3\n separate endpoints\n- Total generated endpoints = operations \u00D7 average actors.length\n- Example: 100 operations with 3 actors each = 300 actual endpoints\n\n## \uD83D\uDD34 AVOID OVER-GENERATION\n\n**DO NOT create actor-specific endpoints when a public endpoint would\nsuffice:**\n\n- \u274C BAD: Separate GET endpoints for admin, member, moderator to view the\n same public data\n- \u2705 GOOD: Single public endpoint `[]` with actor-based filtering in
|
|
2022
|
+
description: "Authorization actors required to access this API operation.\n\nThis field specifies which user actors are allowed to access this\nendpoint. Multiple actors can be specified to allow different types of\nusers to access the same endpoint.\n\n## \u26A0\uFE0F CRITICAL: Actor Multiplication Effect\n\n**EACH ACTOR IN THIS ARRAY GENERATES A SEPARATE ENDPOINT**\n\n- If you specify `[\"admin\", \"moderator\", \"member\"]`, this creates 3\n separate endpoints\n- Total generated endpoints = operations \u00D7 average actors.length\n- Example: 100 operations with 3 actors each = 300 actual endpoints\n\n## \uD83D\uDD34 AVOID OVER-GENERATION\n\n**DO NOT create actor-specific endpoints when a public endpoint would\nsuffice:**\n\n- \u274C BAD: Separate GET endpoints for admin, member, moderator to view the\n same public data\n- \u2705 GOOD: Single public endpoint `[]` with actor-based filtering in\n business logic\n\n**DO NOT enumerate all possible actors when the Prisma schema uses a\nsingle User table:**\n\n- If Prisma has a User table with role/permission fields, you likely only\n need `[\"user\"]`\n- Avoid listing `[\"admin\", \"seller\", \"buyer\", \"moderator\", ...]`\n unnecessarily\n- The actual actor checking happens in business logic, not at the endpoint\n level\n\n## Naming Convention\n\nDO: Use camelCase for all actor names.\n\n## Important Guidelines\n\n- Set to empty array `[]` for public endpoints that require no\n authentication\n- Set to array with actor strings for actor-restricted endpoints\n- **MINIMIZE the number of actors per endpoint to prevent explosion**\n- Consider if the endpoint can be public with actor-based filtering instead\n- The actor names match exactly with the user type/actor defined in the\n database\n- This will be used by the Realize Agent to generate appropriate decorator\n and authorization logic in the provider functions\n- The controller will apply the corresponding authentication decorator\n based on these actors\n\n## Examples\n\n- `[]` - Public endpoint, no authentication required (PREFERRED for read\n operations)\n- `[\"user\"]` - Any authenticated user can access (PREFERRED for\n user-specific operations)\n- `[\"admin\"]` - Only admin users can access (USE SPARINGLY)\n- `[\"admin\", \"moderator\"]` - Both admin and moderator users can access\n (AVOID if possible)\n- `[\"seller\"]` - Only seller users can access (ONLY if Seller is a separate\n table)\n\n## Best Practices\n\n1. **Start with public `[]` for all read operations** unless sensitive data\n is involved\n2. **Use single actor `[\"user\"]` for authenticated operations** and handle\n permissions in business logic\n3. **Only use multiple actors when absolutely necessary** for different\n business logic paths\n4. **Remember: Fewer actors = Fewer endpoints = Better performance and\n maintainability**\n\nNote: The actual authentication/authorization implementation will be\nhandled by decorators at the controller level, and the provider function\nwill receive the authenticated user object with the appropriate type.",
|
|
1215
2023
|
type: "array",
|
|
1216
2024
|
items: {
|
|
1217
2025
|
type: "string",
|
|
@@ -1505,33 +2313,98 @@ const collection = {
|
|
|
1505
2313
|
}
|
|
1506
2314
|
}
|
|
1507
2315
|
},
|
|
1508
|
-
description: "
|
|
1509
|
-
validate: (() => { const
|
|
2316
|
+
description: "Process operation generation task or preliminary data requests.\n\nCreates complete API operations following REST principles and quality\nstandards. Processes operations with progress tracking to ensure iterative\ncompletion.",
|
|
2317
|
+
validate: (() => { const _iv6 = new Set(["date-time", "password", "regex", "uuid", "email", "hostname", "idn-email", "idn-hostname", "iri", "iri-reference", "ipv4", "ipv6", "uri", "uri-reference", "uri-template", "url", "date", "time", "duration", "json-pointer", "relative-json-pointer"]); const _vv12 = new Set(["date-time", "password", "regex", "uuid", "email", "hostname", "idn-email", "idn-hostname", "iri", "iri-reference", "ipv4", "ipv6", "uri", "uri-reference", "uri-template", "url", "date", "time", "duration", "json-pointer", "relative-json-pointer"]); 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 => "getPrismaSchemas" === input.type && (Array.isArray(input.schemaNames) && (1 <= input.schemaNames.length && input.schemaNames.every(elem => "string" === typeof elem))); const _io3 = input => "complete" === input.type && (Array.isArray(input.operations) && input.operations.every(elem => "object" === typeof elem && null !== elem && _io4(elem))); const _io4 = input => "string" === typeof input.specification && "string" === typeof input.description && "string" === typeof input.summary && (Array.isArray(input.parameters) && input.parameters.every(elem => "object" === typeof elem && null !== elem && _io5(elem))) && (null === input.requestBody || "object" === typeof input.requestBody && null !== input.requestBody && _io9(input.requestBody)) && (null === input.responseBody || "object" === typeof input.responseBody && null !== input.responseBody && _io10(input.responseBody)) && ("string" === typeof input.name && RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name)) && (Array.isArray(input.authorizationActors) && input.authorizationActors.every(elem => "string" === typeof elem && (RegExp("^[a-z][a-zA-Z0-9]*$").test(elem) && 1 <= elem.length))) && ("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 _io5 = input => "string" === typeof input.name && RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name) && "string" === typeof input.description && ("object" === typeof input.schema && null !== input.schema && _iu1(input.schema)); const _io6 = input => (undefined === input.minimum || "number" === typeof input.minimum && (Math.floor(input.minimum) === input.minimum && -9223372036854776000 <= input.minimum && input.minimum <= 9223372036854776000)) && (undefined === input.maximum || "number" === typeof input.maximum && (Math.floor(input.maximum) === input.maximum && -9223372036854776000 <= input.maximum && input.maximum <= 9223372036854776000)) && (undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum) && (undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum) && (undefined === input.multipleOf || "number" === typeof input.multipleOf && (Math.floor(input.multipleOf) === input.multipleOf && 0 <= input.multipleOf && input.multipleOf <= 18446744073709552000 && 0 < input.multipleOf)) && "integer" === input.type; const _io7 = input => (undefined === input.minimum || "number" === typeof input.minimum) && (undefined === input.maximum || "number" === typeof input.maximum) && (undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum) && (undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum) && (undefined === input.multipleOf || "number" === typeof input.multipleOf && 0 < input.multipleOf) && "number" === input.type; const _io8 = input => (undefined === input.format || true === _iv6.has(input.format)) && (undefined === input.pattern || "string" === typeof input.pattern) && (undefined === input.contentMediaType || "string" === typeof input.contentMediaType) && (undefined === input.minLength || "number" === typeof input.minLength && (Math.floor(input.minLength) === input.minLength && 0 <= input.minLength && input.minLength <= 18446744073709552000)) && (undefined === input.maxLength || "number" === typeof input.maxLength && (Math.floor(input.maxLength) === input.maxLength && 0 <= input.maxLength && input.maxLength <= 18446744073709552000)) && "string" === input.type; const _io9 = input => "string" === typeof input.description && "string" === typeof input.typeName; const _io10 = input => "string" === typeof input.description && "string" === typeof input.typeName; const _iu0 = input => (() => {
|
|
2318
|
+
if ("getAnalysisFiles" === input.type)
|
|
2319
|
+
return _io1(input);
|
|
2320
|
+
else if ("getPrismaSchemas" === input.type)
|
|
2321
|
+
return _io2(input);
|
|
2322
|
+
else if ("complete" === input.type)
|
|
2323
|
+
return _io3(input);
|
|
2324
|
+
else
|
|
2325
|
+
return false;
|
|
2326
|
+
})(); const _iu1 = input => (() => {
|
|
1510
2327
|
if ("number" === input.type)
|
|
1511
|
-
return
|
|
2328
|
+
return _io7(input);
|
|
1512
2329
|
else if ("integer" === input.type)
|
|
1513
|
-
return
|
|
2330
|
+
return _io6(input);
|
|
1514
2331
|
else if ("string" === input.type)
|
|
1515
|
-
return
|
|
2332
|
+
return _io8(input);
|
|
1516
2333
|
else
|
|
1517
2334
|
return false;
|
|
1518
|
-
})(); const _vo0 = (input, _path, _exceptionable = true) => [
|
|
2335
|
+
})(); const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.thinking || _report(_exceptionable, {
|
|
2336
|
+
path: _path + ".thinking",
|
|
2337
|
+
expected: "string",
|
|
2338
|
+
value: input.thinking
|
|
2339
|
+
}), ("object" === typeof input.request && null !== input.request || _report(_exceptionable, {
|
|
2340
|
+
path: _path + ".request",
|
|
2341
|
+
expected: "(IAutoBeInterfaceOperationApplication.IComplete | IAutoBePreliminaryGetAnalysisFiles | IAutoBePreliminaryGetPrismaSchemas)",
|
|
2342
|
+
value: input.request
|
|
2343
|
+
})) && _vu0(input.request, _path + ".request", true && _exceptionable) || _report(_exceptionable, {
|
|
2344
|
+
path: _path + ".request",
|
|
2345
|
+
expected: "(IAutoBeInterfaceOperationApplication.IComplete | IAutoBePreliminaryGetAnalysisFiles | IAutoBePreliminaryGetPrismaSchemas)",
|
|
2346
|
+
value: input.request
|
|
2347
|
+
})].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => ["getAnalysisFiles" === input.type || _report(_exceptionable, {
|
|
2348
|
+
path: _path + ".type",
|
|
2349
|
+
expected: "\"getAnalysisFiles\"",
|
|
2350
|
+
value: input.type
|
|
2351
|
+
}), (Array.isArray(input.fileNames) || _report(_exceptionable, {
|
|
2352
|
+
path: _path + ".fileNames",
|
|
2353
|
+
expected: "(Array<string> & MinItems<1>)",
|
|
2354
|
+
value: input.fileNames
|
|
2355
|
+
})) && ((1 <= input.fileNames.length || _report(_exceptionable, {
|
|
2356
|
+
path: _path + ".fileNames",
|
|
2357
|
+
expected: "Array<> & MinItems<1>",
|
|
2358
|
+
value: input.fileNames
|
|
2359
|
+
})) && input.fileNames.map((elem, _index7) => "string" === typeof elem || _report(_exceptionable, {
|
|
2360
|
+
path: _path + ".fileNames[" + _index7 + "]",
|
|
2361
|
+
expected: "string",
|
|
2362
|
+
value: elem
|
|
2363
|
+
})).every(flag => flag)) || _report(_exceptionable, {
|
|
2364
|
+
path: _path + ".fileNames",
|
|
2365
|
+
expected: "(Array<string> & MinItems<1>)",
|
|
2366
|
+
value: input.fileNames
|
|
2367
|
+
})].every(flag => flag); const _vo2 = (input, _path, _exceptionable = true) => ["getPrismaSchemas" === input.type || _report(_exceptionable, {
|
|
2368
|
+
path: _path + ".type",
|
|
2369
|
+
expected: "\"getPrismaSchemas\"",
|
|
2370
|
+
value: input.type
|
|
2371
|
+
}), (Array.isArray(input.schemaNames) || _report(_exceptionable, {
|
|
2372
|
+
path: _path + ".schemaNames",
|
|
2373
|
+
expected: "(Array<string> & MinItems<1>)",
|
|
2374
|
+
value: input.schemaNames
|
|
2375
|
+
})) && ((1 <= input.schemaNames.length || _report(_exceptionable, {
|
|
2376
|
+
path: _path + ".schemaNames",
|
|
2377
|
+
expected: "Array<> & MinItems<1>",
|
|
2378
|
+
value: input.schemaNames
|
|
2379
|
+
})) && input.schemaNames.map((elem, _index8) => "string" === typeof elem || _report(_exceptionable, {
|
|
2380
|
+
path: _path + ".schemaNames[" + _index8 + "]",
|
|
2381
|
+
expected: "string",
|
|
2382
|
+
value: elem
|
|
2383
|
+
})).every(flag => flag)) || _report(_exceptionable, {
|
|
2384
|
+
path: _path + ".schemaNames",
|
|
2385
|
+
expected: "(Array<string> & MinItems<1>)",
|
|
2386
|
+
value: input.schemaNames
|
|
2387
|
+
})].every(flag => flag); const _vo3 = (input, _path, _exceptionable = true) => ["complete" === input.type || _report(_exceptionable, {
|
|
2388
|
+
path: _path + ".type",
|
|
2389
|
+
expected: "\"complete\"",
|
|
2390
|
+
value: input.type
|
|
2391
|
+
}), (Array.isArray(input.operations) || _report(_exceptionable, {
|
|
1519
2392
|
path: _path + ".operations",
|
|
1520
2393
|
expected: "Array<IAutoBeInterfaceOperationApplication.IOperation>",
|
|
1521
2394
|
value: input.operations
|
|
1522
|
-
})) && input.operations.map((elem,
|
|
1523
|
-
path: _path + ".operations[" +
|
|
2395
|
+
})) && input.operations.map((elem, _index9) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
2396
|
+
path: _path + ".operations[" + _index9 + "]",
|
|
1524
2397
|
expected: "IAutoBeInterfaceOperationApplication.IOperation",
|
|
1525
2398
|
value: elem
|
|
1526
|
-
})) &&
|
|
1527
|
-
path: _path + ".operations[" +
|
|
2399
|
+
})) && _vo4(elem, _path + ".operations[" + _index9 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
2400
|
+
path: _path + ".operations[" + _index9 + "]",
|
|
1528
2401
|
expected: "IAutoBeInterfaceOperationApplication.IOperation",
|
|
1529
2402
|
value: elem
|
|
1530
2403
|
})).every(flag => flag) || _report(_exceptionable, {
|
|
1531
2404
|
path: _path + ".operations",
|
|
1532
2405
|
expected: "Array<IAutoBeInterfaceOperationApplication.IOperation>",
|
|
1533
2406
|
value: input.operations
|
|
1534
|
-
})].every(flag => flag); const
|
|
2407
|
+
})].every(flag => flag); const _vo4 = (input, _path, _exceptionable = true) => ["string" === typeof input.specification || _report(_exceptionable, {
|
|
1535
2408
|
path: _path + ".specification",
|
|
1536
2409
|
expected: "string",
|
|
1537
2410
|
value: input.specification
|
|
@@ -1547,12 +2420,12 @@ const collection = {
|
|
|
1547
2420
|
path: _path + ".parameters",
|
|
1548
2421
|
expected: "Array<AutoBeOpenApi.IParameter>",
|
|
1549
2422
|
value: input.parameters
|
|
1550
|
-
})) && input.parameters.map((elem,
|
|
1551
|
-
path: _path + ".parameters[" +
|
|
2423
|
+
})) && input.parameters.map((elem, _index10) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
2424
|
+
path: _path + ".parameters[" + _index10 + "]",
|
|
1552
2425
|
expected: "AutoBeOpenApi.IParameter",
|
|
1553
2426
|
value: elem
|
|
1554
|
-
})) &&
|
|
1555
|
-
path: _path + ".parameters[" +
|
|
2427
|
+
})) && _vo5(elem, _path + ".parameters[" + _index10 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
2428
|
+
path: _path + ".parameters[" + _index10 + "]",
|
|
1556
2429
|
expected: "AutoBeOpenApi.IParameter",
|
|
1557
2430
|
value: elem
|
|
1558
2431
|
})).every(flag => flag) || _report(_exceptionable, {
|
|
@@ -1563,7 +2436,7 @@ const collection = {
|
|
|
1563
2436
|
path: _path + ".requestBody",
|
|
1564
2437
|
expected: "(AutoBeOpenApi.IRequestBody | null)",
|
|
1565
2438
|
value: input.requestBody
|
|
1566
|
-
})) &&
|
|
2439
|
+
})) && _vo9(input.requestBody, _path + ".requestBody", true && _exceptionable) || _report(_exceptionable, {
|
|
1567
2440
|
path: _path + ".requestBody",
|
|
1568
2441
|
expected: "(AutoBeOpenApi.IRequestBody | null)",
|
|
1569
2442
|
value: input.requestBody
|
|
@@ -1571,7 +2444,7 @@ const collection = {
|
|
|
1571
2444
|
path: _path + ".responseBody",
|
|
1572
2445
|
expected: "(AutoBeOpenApi.IResponseBody | null)",
|
|
1573
2446
|
value: input.responseBody
|
|
1574
|
-
})) &&
|
|
2447
|
+
})) && _vo10(input.responseBody, _path + ".responseBody", true && _exceptionable) || _report(_exceptionable, {
|
|
1575
2448
|
path: _path + ".responseBody",
|
|
1576
2449
|
expected: "(AutoBeOpenApi.IResponseBody | null)",
|
|
1577
2450
|
value: input.responseBody
|
|
@@ -1587,16 +2460,16 @@ const collection = {
|
|
|
1587
2460
|
path: _path + ".authorizationActors",
|
|
1588
2461
|
expected: "Array<string & CamelCasePattern & MinLength<1>>",
|
|
1589
2462
|
value: input.authorizationActors
|
|
1590
|
-
})) && input.authorizationActors.map((elem,
|
|
1591
|
-
path: _path + ".authorizationActors[" +
|
|
2463
|
+
})) && input.authorizationActors.map((elem, _index11) => "string" === typeof elem && (RegExp("^[a-z][a-zA-Z0-9]*$").test(elem) || _report(_exceptionable, {
|
|
2464
|
+
path: _path + ".authorizationActors[" + _index11 + "]",
|
|
1592
2465
|
expected: "string & CamelCasePattern",
|
|
1593
2466
|
value: elem
|
|
1594
2467
|
})) && (1 <= elem.length || _report(_exceptionable, {
|
|
1595
|
-
path: _path + ".authorizationActors[" +
|
|
2468
|
+
path: _path + ".authorizationActors[" + _index11 + "]",
|
|
1596
2469
|
expected: "string & MinLength<1>",
|
|
1597
2470
|
value: elem
|
|
1598
2471
|
})) || _report(_exceptionable, {
|
|
1599
|
-
path: _path + ".authorizationActors[" +
|
|
2472
|
+
path: _path + ".authorizationActors[" + _index11 + "]",
|
|
1600
2473
|
expected: "(string & CamelCasePattern & MinLength<1>)",
|
|
1601
2474
|
value: elem
|
|
1602
2475
|
})).every(flag => flag) || _report(_exceptionable, {
|
|
@@ -1615,7 +2488,7 @@ const collection = {
|
|
|
1615
2488
|
path: _path + ".method",
|
|
1616
2489
|
expected: "(\"delete\" | \"get\" | \"patch\" | \"post\" | \"put\")",
|
|
1617
2490
|
value: input.method
|
|
1618
|
-
})].every(flag => flag); const
|
|
2491
|
+
})].every(flag => flag); const _vo5 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name) || _report(_exceptionable, {
|
|
1619
2492
|
path: _path + ".name",
|
|
1620
2493
|
expected: "string & CamelCasePattern",
|
|
1621
2494
|
value: input.name
|
|
@@ -1631,11 +2504,11 @@ const collection = {
|
|
|
1631
2504
|
path: _path + ".schema",
|
|
1632
2505
|
expected: "(AutoBeOpenApi.IJsonSchema.IInteger | AutoBeOpenApi.IJsonSchema.INumber | AutoBeOpenApi.IJsonSchema.IString)",
|
|
1633
2506
|
value: input.schema
|
|
1634
|
-
})) &&
|
|
2507
|
+
})) && _vu1(input.schema, _path + ".schema", true && _exceptionable) || _report(_exceptionable, {
|
|
1635
2508
|
path: _path + ".schema",
|
|
1636
2509
|
expected: "(AutoBeOpenApi.IJsonSchema.IInteger | AutoBeOpenApi.IJsonSchema.INumber | AutoBeOpenApi.IJsonSchema.IString)",
|
|
1637
2510
|
value: input.schema
|
|
1638
|
-
})].every(flag => flag); const
|
|
2511
|
+
})].every(flag => flag); const _vo6 = (input, _path, _exceptionable = true) => [undefined === input.minimum || "number" === typeof input.minimum && (Math.floor(input.minimum) === input.minimum && -9223372036854776000 <= input.minimum && input.minimum <= 9223372036854776000 || _report(_exceptionable, {
|
|
1639
2512
|
path: _path + ".minimum",
|
|
1640
2513
|
expected: "number & Type<\"int64\">",
|
|
1641
2514
|
value: input.minimum
|
|
@@ -1675,7 +2548,7 @@ const collection = {
|
|
|
1675
2548
|
path: _path + ".type",
|
|
1676
2549
|
expected: "\"integer\"",
|
|
1677
2550
|
value: input.type
|
|
1678
|
-
})].every(flag => flag); const
|
|
2551
|
+
})].every(flag => flag); const _vo7 = (input, _path, _exceptionable = true) => [undefined === input.minimum || "number" === typeof input.minimum || _report(_exceptionable, {
|
|
1679
2552
|
path: _path + ".minimum",
|
|
1680
2553
|
expected: "(number | undefined)",
|
|
1681
2554
|
value: input.minimum
|
|
@@ -1703,7 +2576,7 @@ const collection = {
|
|
|
1703
2576
|
path: _path + ".type",
|
|
1704
2577
|
expected: "\"number\"",
|
|
1705
2578
|
value: input.type
|
|
1706
|
-
})].every(flag => flag); const
|
|
2579
|
+
})].every(flag => flag); const _vo8 = (input, _path, _exceptionable = true) => [undefined === input.format || true === _vv12.has(input.format) || _report(_exceptionable, {
|
|
1707
2580
|
path: _path + ".format",
|
|
1708
2581
|
expected: "(\"date\" | \"date-time\" | \"duration\" | \"email\" | \"hostname\" | \"idn-email\" | \"idn-hostname\" | \"ipv4\" | \"ipv6\" | \"iri\" | \"iri-reference\" | \"json-pointer\" | \"password\" | \"regex\" | \"relative-json-pointer\" | \"time\" | \"uri\" | \"uri-reference\" | \"uri-template\" | \"url\" | \"uuid\" | undefined)",
|
|
1709
2582
|
value: input.format
|
|
@@ -1735,7 +2608,7 @@ const collection = {
|
|
|
1735
2608
|
path: _path + ".type",
|
|
1736
2609
|
expected: "\"string\"",
|
|
1737
2610
|
value: input.type
|
|
1738
|
-
})].every(flag => flag); const
|
|
2611
|
+
})].every(flag => flag); const _vo9 = (input, _path, _exceptionable = true) => ["string" === typeof input.description || _report(_exceptionable, {
|
|
1739
2612
|
path: _path + ".description",
|
|
1740
2613
|
expected: "string",
|
|
1741
2614
|
value: input.description
|
|
@@ -1743,7 +2616,7 @@ const collection = {
|
|
|
1743
2616
|
path: _path + ".typeName",
|
|
1744
2617
|
expected: "string",
|
|
1745
2618
|
value: input.typeName
|
|
1746
|
-
})].every(flag => flag); const
|
|
2619
|
+
})].every(flag => flag); const _vo10 = (input, _path, _exceptionable = true) => ["string" === typeof input.description || _report(_exceptionable, {
|
|
1747
2620
|
path: _path + ".description",
|
|
1748
2621
|
expected: "string",
|
|
1749
2622
|
value: input.description
|
|
@@ -1752,12 +2625,25 @@ const collection = {
|
|
|
1752
2625
|
expected: "string",
|
|
1753
2626
|
value: input.typeName
|
|
1754
2627
|
})].every(flag => flag); const _vu0 = (input, _path, _exceptionable = true) => (() => {
|
|
2628
|
+
if ("getAnalysisFiles" === input.type)
|
|
2629
|
+
return _vo1(input, _path, true && _exceptionable);
|
|
2630
|
+
else if ("getPrismaSchemas" === input.type)
|
|
2631
|
+
return _vo2(input, _path, true && _exceptionable);
|
|
2632
|
+
else if ("complete" === input.type)
|
|
2633
|
+
return _vo3(input, _path, true && _exceptionable);
|
|
2634
|
+
else
|
|
2635
|
+
return _report(_exceptionable, {
|
|
2636
|
+
path: _path,
|
|
2637
|
+
expected: "(IAutoBePreliminaryGetAnalysisFiles | IAutoBePreliminaryGetPrismaSchemas | IAutoBeInterfaceOperationApplication.IComplete)",
|
|
2638
|
+
value: input
|
|
2639
|
+
});
|
|
2640
|
+
})(); const _vu1 = (input, _path, _exceptionable = true) => (() => {
|
|
1755
2641
|
if ("number" === input.type)
|
|
1756
|
-
return
|
|
2642
|
+
return _vo7(input, _path, true && _exceptionable);
|
|
1757
2643
|
else if ("integer" === input.type)
|
|
1758
|
-
return
|
|
2644
|
+
return _vo6(input, _path, true && _exceptionable);
|
|
1759
2645
|
else if ("string" === input.type)
|
|
1760
|
-
return
|
|
2646
|
+
return _vo8(input, _path, true && _exceptionable);
|
|
1761
2647
|
else
|
|
1762
2648
|
return _report(_exceptionable, {
|
|
1763
2649
|
path: _path,
|
|
@@ -1797,7 +2683,7 @@ const collection = {
|
|
|
1797
2683
|
};
|
|
1798
2684
|
__typia_transform__llmApplicationFinalize._llmApplicationFinalize(application, Object.assign(Object.assign({}, {
|
|
1799
2685
|
validate: {
|
|
1800
|
-
|
|
2686
|
+
process: validate,
|
|
1801
2687
|
},
|
|
1802
2688
|
}), { equals: false }));
|
|
1803
2689
|
return application;
|
|
@@ -1811,24 +2697,118 @@ const collection = {
|
|
|
1811
2697
|
},
|
|
1812
2698
|
functions: [
|
|
1813
2699
|
{
|
|
1814
|
-
name: "
|
|
2700
|
+
name: "process",
|
|
1815
2701
|
parameters: {
|
|
1816
|
-
description: "
|
|
2702
|
+
description: " Request containing either preliminary data request or complete\ntask\n\n------------------------------\n\nCurrent Type: {@link IAutoBeInterfaceOperationApplication.IProps}",
|
|
1817
2703
|
type: "object",
|
|
1818
2704
|
properties: {
|
|
1819
|
-
|
|
1820
|
-
description: "
|
|
1821
|
-
type: "
|
|
1822
|
-
|
|
1823
|
-
|
|
2705
|
+
thinking: {
|
|
2706
|
+
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.",
|
|
2707
|
+
type: "string"
|
|
2708
|
+
},
|
|
2709
|
+
request: {
|
|
2710
|
+
description: "Type discriminator for the request.\n\nDetermines which action to perform: preliminary data retrieval\n(getAnalysisFiles, getPrismaSchemas) or final operation generation\n(complete). When preliminary returns empty array, that type is removed\nfrom the union, physically preventing repeated calls.",
|
|
2711
|
+
anyOf: [
|
|
2712
|
+
{
|
|
2713
|
+
$ref: "#/$defs/IAutoBePreliminaryGetAnalysisFiles"
|
|
2714
|
+
},
|
|
2715
|
+
{
|
|
2716
|
+
$ref: "#/$defs/IAutoBePreliminaryGetPrismaSchemas"
|
|
2717
|
+
},
|
|
2718
|
+
{
|
|
2719
|
+
$ref: "#/$defs/IAutoBeInterfaceOperationApplication.IComplete"
|
|
2720
|
+
}
|
|
2721
|
+
],
|
|
2722
|
+
"x-discriminator": {
|
|
2723
|
+
propertyName: "type",
|
|
2724
|
+
mapping: {
|
|
2725
|
+
getAnalysisFiles: "#/$defs/IAutoBePreliminaryGetAnalysisFiles",
|
|
2726
|
+
getPrismaSchemas: "#/$defs/IAutoBePreliminaryGetPrismaSchemas",
|
|
2727
|
+
complete: "#/$defs/IAutoBeInterfaceOperationApplication.IComplete"
|
|
2728
|
+
}
|
|
1824
2729
|
}
|
|
1825
2730
|
}
|
|
1826
2731
|
},
|
|
1827
2732
|
required: [
|
|
1828
|
-
"
|
|
2733
|
+
"thinking",
|
|
2734
|
+
"request"
|
|
1829
2735
|
],
|
|
1830
2736
|
additionalProperties: false,
|
|
1831
2737
|
$defs: {
|
|
2738
|
+
IAutoBePreliminaryGetAnalysisFiles: {
|
|
2739
|
+
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.",
|
|
2740
|
+
type: "object",
|
|
2741
|
+
properties: {
|
|
2742
|
+
type: {
|
|
2743
|
+
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.",
|
|
2744
|
+
type: "string",
|
|
2745
|
+
"enum": [
|
|
2746
|
+
"getAnalysisFiles"
|
|
2747
|
+
]
|
|
2748
|
+
},
|
|
2749
|
+
fileNames: {
|
|
2750
|
+
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.",
|
|
2751
|
+
type: "array",
|
|
2752
|
+
items: {
|
|
2753
|
+
type: "string"
|
|
2754
|
+
},
|
|
2755
|
+
minItems: 1
|
|
2756
|
+
}
|
|
2757
|
+
},
|
|
2758
|
+
required: [
|
|
2759
|
+
"type",
|
|
2760
|
+
"fileNames"
|
|
2761
|
+
]
|
|
2762
|
+
},
|
|
2763
|
+
IAutoBePreliminaryGetPrismaSchemas: {
|
|
2764
|
+
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.",
|
|
2765
|
+
type: "object",
|
|
2766
|
+
properties: {
|
|
2767
|
+
type: {
|
|
2768
|
+
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.",
|
|
2769
|
+
type: "string",
|
|
2770
|
+
"enum": [
|
|
2771
|
+
"getPrismaSchemas"
|
|
2772
|
+
]
|
|
2773
|
+
},
|
|
2774
|
+
schemaNames: {
|
|
2775
|
+
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.",
|
|
2776
|
+
type: "array",
|
|
2777
|
+
items: {
|
|
2778
|
+
type: "string"
|
|
2779
|
+
},
|
|
2780
|
+
minItems: 1
|
|
2781
|
+
}
|
|
2782
|
+
},
|
|
2783
|
+
required: [
|
|
2784
|
+
"type",
|
|
2785
|
+
"schemaNames"
|
|
2786
|
+
]
|
|
2787
|
+
},
|
|
2788
|
+
"IAutoBeInterfaceOperationApplication.IComplete": {
|
|
2789
|
+
description: "Request to generate detailed API operations.\n\nExecutes operation generation to create complete API operations following\nREST principles and quality standards. Each operation includes specification,\npath, method, detailed description, summary, parameters, and request/response\nbodies.",
|
|
2790
|
+
type: "object",
|
|
2791
|
+
properties: {
|
|
2792
|
+
type: {
|
|
2793
|
+
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.",
|
|
2794
|
+
type: "string",
|
|
2795
|
+
"enum": [
|
|
2796
|
+
"complete"
|
|
2797
|
+
]
|
|
2798
|
+
},
|
|
2799
|
+
operations: {
|
|
2800
|
+
description: "Array of API operations to generate.\n\nEach operation in this array includes:\n\n- Specification: Detailed API specification with clear purpose and\n functionality\n- Path: Resource-centric URL path (e.g., \"/resources/{resourceId}\")\n- Method: HTTP method (get, post, put, delete, patch)\n- Description: Extremely detailed multi-paragraph description referencing\n Prisma schema comments\n- Summary: Concise one-sentence summary of the endpoint\n- Parameters: Array of all necessary parameters with descriptions and\n schema definitions\n- RequestBody: For POST/PUT/PATCH methods, with typeName referencing\n components.schemas\n- ResponseBody: With typeName referencing appropriate response type\n\nAll operations follow strict quality standards:\n\n1. Detailed descriptions referencing Prisma schema comments\n2. Accurate parameter definitions matching path parameters\n3. Appropriate request/response body type references\n4. Consistent patterns for CRUD operations\n\nFor list retrievals (typically PATCH), include pagination, search, and\nsorting. For detail retrieval (GET), return a single resource. For\ncreation (POST), use .ICreate request body. For modification (PUT), use\n.IUpdate request body.",
|
|
2801
|
+
type: "array",
|
|
2802
|
+
items: {
|
|
2803
|
+
$ref: "#/$defs/IAutoBeInterfaceOperationApplication.IOperation"
|
|
2804
|
+
}
|
|
2805
|
+
}
|
|
2806
|
+
},
|
|
2807
|
+
required: [
|
|
2808
|
+
"type",
|
|
2809
|
+
"operations"
|
|
2810
|
+
]
|
|
2811
|
+
},
|
|
1832
2812
|
"IAutoBeInterfaceOperationApplication.IOperation": {
|
|
1833
2813
|
description: "Operation of the Restful API.\n\nThis interface defines a single API endpoint with its HTTP {@link method},\n{@link path}, {@link parameters path parameters},\n{@link requestBody request body}, and {@link responseBody} structure. It\ncorresponds to an individual operation in the paths section of an OpenAPI\ndocument.\n\nEach operation requires a detailed explanation of its purpose through the\nreason and description fields, making it clear why the API was designed and\nhow it should be used.\n\nDO: Use object types for all request bodies and responses. DO: Reference\nnamed types defined in the components section. DO: Use `application/json`\nas the content-type. DO: Use `string & tags.Format<\"uri\">` in the schema\nfor file upload/download operations instead of binary data formats.\n\nIn OpenAPI, this might represent:\n\n```json\n{\n \"/shoppings/customers/orders\": {\n \"post\": {\n \"description\": \"Create a new order application from shopping cart...\",\n \"parameters\": [...],\n \"requestBody\": {...},\n \"responses\": {...}\n }\n }\n}\n```",
|
|
1834
2814
|
type: "object",
|
|
@@ -1880,7 +2860,7 @@ const collection = {
|
|
|
1880
2860
|
pattern: "^[a-z][a-zA-Z0-9]*$"
|
|
1881
2861
|
},
|
|
1882
2862
|
authorizationActors: {
|
|
1883
|
-
description: "Authorization actors required to access this API operation.\n\nThis field specifies which user actors are allowed to access this\nendpoint. Multiple actors can be specified to allow different types of\nusers to access the same endpoint.\n\n## \u26A0\uFE0F CRITICAL: Actor Multiplication Effect\n\n**EACH ACTOR IN THIS ARRAY GENERATES A SEPARATE ENDPOINT**\n\n- If you specify `[\"admin\", \"moderator\", \"member\"]`, this creates 3\n separate endpoints\n- Total generated endpoints = operations \u00D7 average actors.length\n- Example: 100 operations with 3 actors each = 300 actual endpoints\n\n## \uD83D\uDD34 AVOID OVER-GENERATION\n\n**DO NOT create actor-specific endpoints when a public endpoint would\nsuffice:**\n\n- \u274C BAD: Separate GET endpoints for admin, member, moderator to view the\n same public data\n- \u2705 GOOD: Single public endpoint `[]` with actor-based filtering in
|
|
2863
|
+
description: "Authorization actors required to access this API operation.\n\nThis field specifies which user actors are allowed to access this\nendpoint. Multiple actors can be specified to allow different types of\nusers to access the same endpoint.\n\n## \u26A0\uFE0F CRITICAL: Actor Multiplication Effect\n\n**EACH ACTOR IN THIS ARRAY GENERATES A SEPARATE ENDPOINT**\n\n- If you specify `[\"admin\", \"moderator\", \"member\"]`, this creates 3\n separate endpoints\n- Total generated endpoints = operations \u00D7 average actors.length\n- Example: 100 operations with 3 actors each = 300 actual endpoints\n\n## \uD83D\uDD34 AVOID OVER-GENERATION\n\n**DO NOT create actor-specific endpoints when a public endpoint would\nsuffice:**\n\n- \u274C BAD: Separate GET endpoints for admin, member, moderator to view the\n same public data\n- \u2705 GOOD: Single public endpoint `[]` with actor-based filtering in\n business logic\n\n**DO NOT enumerate all possible actors when the Prisma schema uses a\nsingle User table:**\n\n- If Prisma has a User table with role/permission fields, you likely only\n need `[\"user\"]`\n- Avoid listing `[\"admin\", \"seller\", \"buyer\", \"moderator\", ...]`\n unnecessarily\n- The actual actor checking happens in business logic, not at the endpoint\n level\n\n## Naming Convention\n\nDO: Use camelCase for all actor names.\n\n## Important Guidelines\n\n- Set to empty array `[]` for public endpoints that require no\n authentication\n- Set to array with actor strings for actor-restricted endpoints\n- **MINIMIZE the number of actors per endpoint to prevent explosion**\n- Consider if the endpoint can be public with actor-based filtering instead\n- The actor names match exactly with the user type/actor defined in the\n database\n- This will be used by the Realize Agent to generate appropriate decorator\n and authorization logic in the provider functions\n- The controller will apply the corresponding authentication decorator\n based on these actors\n\n## Examples\n\n- `[]` - Public endpoint, no authentication required (PREFERRED for read\n operations)\n- `[\"user\"]` - Any authenticated user can access (PREFERRED for\n user-specific operations)\n- `[\"admin\"]` - Only admin users can access (USE SPARINGLY)\n- `[\"admin\", \"moderator\"]` - Both admin and moderator users can access\n (AVOID if possible)\n- `[\"seller\"]` - Only seller users can access (ONLY if Seller is a separate\n table)\n\n## Best Practices\n\n1. **Start with public `[]` for all read operations** unless sensitive data\n is involved\n2. **Use single actor `[\"user\"]` for authenticated operations** and handle\n permissions in business logic\n3. **Only use multiple actors when absolutely necessary** for different\n business logic paths\n4. **Remember: Fewer actors = Fewer endpoints = Better performance and\n maintainability**\n\nNote: The actual authentication/authorization implementation will be\nhandled by decorators at the controller level, and the provider function\nwill receive the authenticated user object with the appropriate type.",
|
|
1884
2864
|
type: "array",
|
|
1885
2865
|
items: {
|
|
1886
2866
|
type: "string",
|
|
@@ -2133,33 +3113,98 @@ const collection = {
|
|
|
2133
3113
|
}
|
|
2134
3114
|
}
|
|
2135
3115
|
},
|
|
2136
|
-
description: "
|
|
2137
|
-
validate: (() => { const
|
|
3116
|
+
description: "Process operation generation task or preliminary data requests.\n\nCreates complete API operations following REST principles and quality\nstandards. Processes operations with progress tracking to ensure iterative\ncompletion.",
|
|
3117
|
+
validate: (() => { const _iv6 = new Set(["date-time", "password", "regex", "uuid", "email", "hostname", "idn-email", "idn-hostname", "iri", "iri-reference", "ipv4", "ipv6", "uri", "uri-reference", "uri-template", "url", "date", "time", "duration", "json-pointer", "relative-json-pointer"]); const _vv12 = new Set(["date-time", "password", "regex", "uuid", "email", "hostname", "idn-email", "idn-hostname", "iri", "iri-reference", "ipv4", "ipv6", "uri", "uri-reference", "uri-template", "url", "date", "time", "duration", "json-pointer", "relative-json-pointer"]); 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 => "getPrismaSchemas" === input.type && (Array.isArray(input.schemaNames) && (1 <= input.schemaNames.length && input.schemaNames.every(elem => "string" === typeof elem))); const _io3 = input => "complete" === input.type && (Array.isArray(input.operations) && input.operations.every(elem => "object" === typeof elem && null !== elem && _io4(elem))); const _io4 = input => "string" === typeof input.specification && "string" === typeof input.description && "string" === typeof input.summary && (Array.isArray(input.parameters) && input.parameters.every(elem => "object" === typeof elem && null !== elem && _io5(elem))) && (null === input.requestBody || "object" === typeof input.requestBody && null !== input.requestBody && _io9(input.requestBody)) && (null === input.responseBody || "object" === typeof input.responseBody && null !== input.responseBody && _io10(input.responseBody)) && ("string" === typeof input.name && RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name)) && (Array.isArray(input.authorizationActors) && input.authorizationActors.every(elem => "string" === typeof elem && (RegExp("^[a-z][a-zA-Z0-9]*$").test(elem) && 1 <= elem.length))) && ("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 _io5 = input => "string" === typeof input.name && RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name) && "string" === typeof input.description && ("object" === typeof input.schema && null !== input.schema && _iu1(input.schema)); const _io6 = input => (undefined === input.minimum || "number" === typeof input.minimum && (Math.floor(input.minimum) === input.minimum && -9223372036854776000 <= input.minimum && input.minimum <= 9223372036854776000)) && (undefined === input.maximum || "number" === typeof input.maximum && (Math.floor(input.maximum) === input.maximum && -9223372036854776000 <= input.maximum && input.maximum <= 9223372036854776000)) && (undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum) && (undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum) && (undefined === input.multipleOf || "number" === typeof input.multipleOf && (Math.floor(input.multipleOf) === input.multipleOf && 0 <= input.multipleOf && input.multipleOf <= 18446744073709552000 && 0 < input.multipleOf)) && "integer" === input.type; const _io7 = input => (undefined === input.minimum || "number" === typeof input.minimum) && (undefined === input.maximum || "number" === typeof input.maximum) && (undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum) && (undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum) && (undefined === input.multipleOf || "number" === typeof input.multipleOf && 0 < input.multipleOf) && "number" === input.type; const _io8 = input => (undefined === input.format || true === _iv6.has(input.format)) && (undefined === input.pattern || "string" === typeof input.pattern) && (undefined === input.contentMediaType || "string" === typeof input.contentMediaType) && (undefined === input.minLength || "number" === typeof input.minLength && (Math.floor(input.minLength) === input.minLength && 0 <= input.minLength && input.minLength <= 18446744073709552000)) && (undefined === input.maxLength || "number" === typeof input.maxLength && (Math.floor(input.maxLength) === input.maxLength && 0 <= input.maxLength && input.maxLength <= 18446744073709552000)) && "string" === input.type; const _io9 = input => "string" === typeof input.description && "string" === typeof input.typeName; const _io10 = input => "string" === typeof input.description && "string" === typeof input.typeName; const _iu0 = input => (() => {
|
|
3118
|
+
if ("getAnalysisFiles" === input.type)
|
|
3119
|
+
return _io1(input);
|
|
3120
|
+
else if ("getPrismaSchemas" === input.type)
|
|
3121
|
+
return _io2(input);
|
|
3122
|
+
else if ("complete" === input.type)
|
|
3123
|
+
return _io3(input);
|
|
3124
|
+
else
|
|
3125
|
+
return false;
|
|
3126
|
+
})(); const _iu1 = input => (() => {
|
|
2138
3127
|
if ("number" === input.type)
|
|
2139
|
-
return
|
|
3128
|
+
return _io7(input);
|
|
2140
3129
|
else if ("integer" === input.type)
|
|
2141
|
-
return
|
|
3130
|
+
return _io6(input);
|
|
2142
3131
|
else if ("string" === input.type)
|
|
2143
|
-
return
|
|
3132
|
+
return _io8(input);
|
|
2144
3133
|
else
|
|
2145
3134
|
return false;
|
|
2146
|
-
})(); const _vo0 = (input, _path, _exceptionable = true) => [
|
|
3135
|
+
})(); const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.thinking || _report(_exceptionable, {
|
|
3136
|
+
path: _path + ".thinking",
|
|
3137
|
+
expected: "string",
|
|
3138
|
+
value: input.thinking
|
|
3139
|
+
}), ("object" === typeof input.request && null !== input.request || _report(_exceptionable, {
|
|
3140
|
+
path: _path + ".request",
|
|
3141
|
+
expected: "(IAutoBeInterfaceOperationApplication.IComplete | IAutoBePreliminaryGetAnalysisFiles | IAutoBePreliminaryGetPrismaSchemas)",
|
|
3142
|
+
value: input.request
|
|
3143
|
+
})) && _vu0(input.request, _path + ".request", true && _exceptionable) || _report(_exceptionable, {
|
|
3144
|
+
path: _path + ".request",
|
|
3145
|
+
expected: "(IAutoBeInterfaceOperationApplication.IComplete | IAutoBePreliminaryGetAnalysisFiles | IAutoBePreliminaryGetPrismaSchemas)",
|
|
3146
|
+
value: input.request
|
|
3147
|
+
})].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => ["getAnalysisFiles" === input.type || _report(_exceptionable, {
|
|
3148
|
+
path: _path + ".type",
|
|
3149
|
+
expected: "\"getAnalysisFiles\"",
|
|
3150
|
+
value: input.type
|
|
3151
|
+
}), (Array.isArray(input.fileNames) || _report(_exceptionable, {
|
|
3152
|
+
path: _path + ".fileNames",
|
|
3153
|
+
expected: "(Array<string> & MinItems<1>)",
|
|
3154
|
+
value: input.fileNames
|
|
3155
|
+
})) && ((1 <= input.fileNames.length || _report(_exceptionable, {
|
|
3156
|
+
path: _path + ".fileNames",
|
|
3157
|
+
expected: "Array<> & MinItems<1>",
|
|
3158
|
+
value: input.fileNames
|
|
3159
|
+
})) && input.fileNames.map((elem, _index7) => "string" === typeof elem || _report(_exceptionable, {
|
|
3160
|
+
path: _path + ".fileNames[" + _index7 + "]",
|
|
3161
|
+
expected: "string",
|
|
3162
|
+
value: elem
|
|
3163
|
+
})).every(flag => flag)) || _report(_exceptionable, {
|
|
3164
|
+
path: _path + ".fileNames",
|
|
3165
|
+
expected: "(Array<string> & MinItems<1>)",
|
|
3166
|
+
value: input.fileNames
|
|
3167
|
+
})].every(flag => flag); const _vo2 = (input, _path, _exceptionable = true) => ["getPrismaSchemas" === input.type || _report(_exceptionable, {
|
|
3168
|
+
path: _path + ".type",
|
|
3169
|
+
expected: "\"getPrismaSchemas\"",
|
|
3170
|
+
value: input.type
|
|
3171
|
+
}), (Array.isArray(input.schemaNames) || _report(_exceptionable, {
|
|
3172
|
+
path: _path + ".schemaNames",
|
|
3173
|
+
expected: "(Array<string> & MinItems<1>)",
|
|
3174
|
+
value: input.schemaNames
|
|
3175
|
+
})) && ((1 <= input.schemaNames.length || _report(_exceptionable, {
|
|
3176
|
+
path: _path + ".schemaNames",
|
|
3177
|
+
expected: "Array<> & MinItems<1>",
|
|
3178
|
+
value: input.schemaNames
|
|
3179
|
+
})) && input.schemaNames.map((elem, _index8) => "string" === typeof elem || _report(_exceptionable, {
|
|
3180
|
+
path: _path + ".schemaNames[" + _index8 + "]",
|
|
3181
|
+
expected: "string",
|
|
3182
|
+
value: elem
|
|
3183
|
+
})).every(flag => flag)) || _report(_exceptionable, {
|
|
3184
|
+
path: _path + ".schemaNames",
|
|
3185
|
+
expected: "(Array<string> & MinItems<1>)",
|
|
3186
|
+
value: input.schemaNames
|
|
3187
|
+
})].every(flag => flag); const _vo3 = (input, _path, _exceptionable = true) => ["complete" === input.type || _report(_exceptionable, {
|
|
3188
|
+
path: _path + ".type",
|
|
3189
|
+
expected: "\"complete\"",
|
|
3190
|
+
value: input.type
|
|
3191
|
+
}), (Array.isArray(input.operations) || _report(_exceptionable, {
|
|
2147
3192
|
path: _path + ".operations",
|
|
2148
3193
|
expected: "Array<IAutoBeInterfaceOperationApplication.IOperation>",
|
|
2149
3194
|
value: input.operations
|
|
2150
|
-
})) && input.operations.map((elem,
|
|
2151
|
-
path: _path + ".operations[" +
|
|
3195
|
+
})) && input.operations.map((elem, _index9) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
3196
|
+
path: _path + ".operations[" + _index9 + "]",
|
|
2152
3197
|
expected: "IAutoBeInterfaceOperationApplication.IOperation",
|
|
2153
3198
|
value: elem
|
|
2154
|
-
})) &&
|
|
2155
|
-
path: _path + ".operations[" +
|
|
3199
|
+
})) && _vo4(elem, _path + ".operations[" + _index9 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
3200
|
+
path: _path + ".operations[" + _index9 + "]",
|
|
2156
3201
|
expected: "IAutoBeInterfaceOperationApplication.IOperation",
|
|
2157
3202
|
value: elem
|
|
2158
3203
|
})).every(flag => flag) || _report(_exceptionable, {
|
|
2159
3204
|
path: _path + ".operations",
|
|
2160
3205
|
expected: "Array<IAutoBeInterfaceOperationApplication.IOperation>",
|
|
2161
3206
|
value: input.operations
|
|
2162
|
-
})].every(flag => flag); const
|
|
3207
|
+
})].every(flag => flag); const _vo4 = (input, _path, _exceptionable = true) => ["string" === typeof input.specification || _report(_exceptionable, {
|
|
2163
3208
|
path: _path + ".specification",
|
|
2164
3209
|
expected: "string",
|
|
2165
3210
|
value: input.specification
|
|
@@ -2175,12 +3220,12 @@ const collection = {
|
|
|
2175
3220
|
path: _path + ".parameters",
|
|
2176
3221
|
expected: "Array<AutoBeOpenApi.IParameter>",
|
|
2177
3222
|
value: input.parameters
|
|
2178
|
-
})) && input.parameters.map((elem,
|
|
2179
|
-
path: _path + ".parameters[" +
|
|
3223
|
+
})) && input.parameters.map((elem, _index10) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
3224
|
+
path: _path + ".parameters[" + _index10 + "]",
|
|
2180
3225
|
expected: "AutoBeOpenApi.IParameter",
|
|
2181
3226
|
value: elem
|
|
2182
|
-
})) &&
|
|
2183
|
-
path: _path + ".parameters[" +
|
|
3227
|
+
})) && _vo5(elem, _path + ".parameters[" + _index10 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
3228
|
+
path: _path + ".parameters[" + _index10 + "]",
|
|
2184
3229
|
expected: "AutoBeOpenApi.IParameter",
|
|
2185
3230
|
value: elem
|
|
2186
3231
|
})).every(flag => flag) || _report(_exceptionable, {
|
|
@@ -2191,7 +3236,7 @@ const collection = {
|
|
|
2191
3236
|
path: _path + ".requestBody",
|
|
2192
3237
|
expected: "(AutoBeOpenApi.IRequestBody | null)",
|
|
2193
3238
|
value: input.requestBody
|
|
2194
|
-
})) &&
|
|
3239
|
+
})) && _vo9(input.requestBody, _path + ".requestBody", true && _exceptionable) || _report(_exceptionable, {
|
|
2195
3240
|
path: _path + ".requestBody",
|
|
2196
3241
|
expected: "(AutoBeOpenApi.IRequestBody | null)",
|
|
2197
3242
|
value: input.requestBody
|
|
@@ -2199,7 +3244,7 @@ const collection = {
|
|
|
2199
3244
|
path: _path + ".responseBody",
|
|
2200
3245
|
expected: "(AutoBeOpenApi.IResponseBody | null)",
|
|
2201
3246
|
value: input.responseBody
|
|
2202
|
-
})) &&
|
|
3247
|
+
})) && _vo10(input.responseBody, _path + ".responseBody", true && _exceptionable) || _report(_exceptionable, {
|
|
2203
3248
|
path: _path + ".responseBody",
|
|
2204
3249
|
expected: "(AutoBeOpenApi.IResponseBody | null)",
|
|
2205
3250
|
value: input.responseBody
|
|
@@ -2215,16 +3260,16 @@ const collection = {
|
|
|
2215
3260
|
path: _path + ".authorizationActors",
|
|
2216
3261
|
expected: "Array<string & CamelCasePattern & MinLength<1>>",
|
|
2217
3262
|
value: input.authorizationActors
|
|
2218
|
-
})) && input.authorizationActors.map((elem,
|
|
2219
|
-
path: _path + ".authorizationActors[" +
|
|
3263
|
+
})) && input.authorizationActors.map((elem, _index11) => "string" === typeof elem && (RegExp("^[a-z][a-zA-Z0-9]*$").test(elem) || _report(_exceptionable, {
|
|
3264
|
+
path: _path + ".authorizationActors[" + _index11 + "]",
|
|
2220
3265
|
expected: "string & CamelCasePattern",
|
|
2221
3266
|
value: elem
|
|
2222
3267
|
})) && (1 <= elem.length || _report(_exceptionable, {
|
|
2223
|
-
path: _path + ".authorizationActors[" +
|
|
3268
|
+
path: _path + ".authorizationActors[" + _index11 + "]",
|
|
2224
3269
|
expected: "string & MinLength<1>",
|
|
2225
3270
|
value: elem
|
|
2226
3271
|
})) || _report(_exceptionable, {
|
|
2227
|
-
path: _path + ".authorizationActors[" +
|
|
3272
|
+
path: _path + ".authorizationActors[" + _index11 + "]",
|
|
2228
3273
|
expected: "(string & CamelCasePattern & MinLength<1>)",
|
|
2229
3274
|
value: elem
|
|
2230
3275
|
})).every(flag => flag) || _report(_exceptionable, {
|
|
@@ -2243,7 +3288,7 @@ const collection = {
|
|
|
2243
3288
|
path: _path + ".method",
|
|
2244
3289
|
expected: "(\"delete\" | \"get\" | \"patch\" | \"post\" | \"put\")",
|
|
2245
3290
|
value: input.method
|
|
2246
|
-
})].every(flag => flag); const
|
|
3291
|
+
})].every(flag => flag); const _vo5 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name) || _report(_exceptionable, {
|
|
2247
3292
|
path: _path + ".name",
|
|
2248
3293
|
expected: "string & CamelCasePattern",
|
|
2249
3294
|
value: input.name
|
|
@@ -2259,11 +3304,11 @@ const collection = {
|
|
|
2259
3304
|
path: _path + ".schema",
|
|
2260
3305
|
expected: "(AutoBeOpenApi.IJsonSchema.IInteger | AutoBeOpenApi.IJsonSchema.INumber | AutoBeOpenApi.IJsonSchema.IString)",
|
|
2261
3306
|
value: input.schema
|
|
2262
|
-
})) &&
|
|
3307
|
+
})) && _vu1(input.schema, _path + ".schema", true && _exceptionable) || _report(_exceptionable, {
|
|
2263
3308
|
path: _path + ".schema",
|
|
2264
3309
|
expected: "(AutoBeOpenApi.IJsonSchema.IInteger | AutoBeOpenApi.IJsonSchema.INumber | AutoBeOpenApi.IJsonSchema.IString)",
|
|
2265
3310
|
value: input.schema
|
|
2266
|
-
})].every(flag => flag); const
|
|
3311
|
+
})].every(flag => flag); const _vo6 = (input, _path, _exceptionable = true) => [undefined === input.minimum || "number" === typeof input.minimum && (Math.floor(input.minimum) === input.minimum && -9223372036854776000 <= input.minimum && input.minimum <= 9223372036854776000 || _report(_exceptionable, {
|
|
2267
3312
|
path: _path + ".minimum",
|
|
2268
3313
|
expected: "number & Type<\"int64\">",
|
|
2269
3314
|
value: input.minimum
|
|
@@ -2303,7 +3348,7 @@ const collection = {
|
|
|
2303
3348
|
path: _path + ".type",
|
|
2304
3349
|
expected: "\"integer\"",
|
|
2305
3350
|
value: input.type
|
|
2306
|
-
})].every(flag => flag); const
|
|
3351
|
+
})].every(flag => flag); const _vo7 = (input, _path, _exceptionable = true) => [undefined === input.minimum || "number" === typeof input.minimum || _report(_exceptionable, {
|
|
2307
3352
|
path: _path + ".minimum",
|
|
2308
3353
|
expected: "(number | undefined)",
|
|
2309
3354
|
value: input.minimum
|
|
@@ -2331,7 +3376,7 @@ const collection = {
|
|
|
2331
3376
|
path: _path + ".type",
|
|
2332
3377
|
expected: "\"number\"",
|
|
2333
3378
|
value: input.type
|
|
2334
|
-
})].every(flag => flag); const
|
|
3379
|
+
})].every(flag => flag); const _vo8 = (input, _path, _exceptionable = true) => [undefined === input.format || true === _vv12.has(input.format) || _report(_exceptionable, {
|
|
2335
3380
|
path: _path + ".format",
|
|
2336
3381
|
expected: "(\"date\" | \"date-time\" | \"duration\" | \"email\" | \"hostname\" | \"idn-email\" | \"idn-hostname\" | \"ipv4\" | \"ipv6\" | \"iri\" | \"iri-reference\" | \"json-pointer\" | \"password\" | \"regex\" | \"relative-json-pointer\" | \"time\" | \"uri\" | \"uri-reference\" | \"uri-template\" | \"url\" | \"uuid\" | undefined)",
|
|
2337
3382
|
value: input.format
|
|
@@ -2363,7 +3408,7 @@ const collection = {
|
|
|
2363
3408
|
path: _path + ".type",
|
|
2364
3409
|
expected: "\"string\"",
|
|
2365
3410
|
value: input.type
|
|
2366
|
-
})].every(flag => flag); const
|
|
3411
|
+
})].every(flag => flag); const _vo9 = (input, _path, _exceptionable = true) => ["string" === typeof input.description || _report(_exceptionable, {
|
|
2367
3412
|
path: _path + ".description",
|
|
2368
3413
|
expected: "string",
|
|
2369
3414
|
value: input.description
|
|
@@ -2371,7 +3416,7 @@ const collection = {
|
|
|
2371
3416
|
path: _path + ".typeName",
|
|
2372
3417
|
expected: "string",
|
|
2373
3418
|
value: input.typeName
|
|
2374
|
-
})].every(flag => flag); const
|
|
3419
|
+
})].every(flag => flag); const _vo10 = (input, _path, _exceptionable = true) => ["string" === typeof input.description || _report(_exceptionable, {
|
|
2375
3420
|
path: _path + ".description",
|
|
2376
3421
|
expected: "string",
|
|
2377
3422
|
value: input.description
|
|
@@ -2380,12 +3425,25 @@ const collection = {
|
|
|
2380
3425
|
expected: "string",
|
|
2381
3426
|
value: input.typeName
|
|
2382
3427
|
})].every(flag => flag); const _vu0 = (input, _path, _exceptionable = true) => (() => {
|
|
3428
|
+
if ("getAnalysisFiles" === input.type)
|
|
3429
|
+
return _vo1(input, _path, true && _exceptionable);
|
|
3430
|
+
else if ("getPrismaSchemas" === input.type)
|
|
3431
|
+
return _vo2(input, _path, true && _exceptionable);
|
|
3432
|
+
else if ("complete" === input.type)
|
|
3433
|
+
return _vo3(input, _path, true && _exceptionable);
|
|
3434
|
+
else
|
|
3435
|
+
return _report(_exceptionable, {
|
|
3436
|
+
path: _path,
|
|
3437
|
+
expected: "(IAutoBePreliminaryGetAnalysisFiles | IAutoBePreliminaryGetPrismaSchemas | IAutoBeInterfaceOperationApplication.IComplete)",
|
|
3438
|
+
value: input
|
|
3439
|
+
});
|
|
3440
|
+
})(); const _vu1 = (input, _path, _exceptionable = true) => (() => {
|
|
2383
3441
|
if ("number" === input.type)
|
|
2384
|
-
return
|
|
3442
|
+
return _vo7(input, _path, true && _exceptionable);
|
|
2385
3443
|
else if ("integer" === input.type)
|
|
2386
|
-
return
|
|
3444
|
+
return _vo6(input, _path, true && _exceptionable);
|
|
2387
3445
|
else if ("string" === input.type)
|
|
2388
|
-
return
|
|
3446
|
+
return _vo8(input, _path, true && _exceptionable);
|
|
2389
3447
|
else
|
|
2390
3448
|
return _report(_exceptionable, {
|
|
2391
3449
|
path: _path,
|
|
@@ -2425,10 +3483,11 @@ const collection = {
|
|
|
2425
3483
|
};
|
|
2426
3484
|
__typia_transform__llmApplicationFinalize._llmApplicationFinalize(application, Object.assign(Object.assign({}, {
|
|
2427
3485
|
validate: {
|
|
2428
|
-
|
|
3486
|
+
process: validate,
|
|
2429
3487
|
},
|
|
2430
3488
|
}), { equals: false }));
|
|
2431
3489
|
return application;
|
|
2432
3490
|
})(),
|
|
2433
3491
|
};
|
|
2434
|
-
|
|
3492
|
+
const SOURCE = "interfaceOperation";
|
|
3493
|
+
//# sourceMappingURL=orchestrateInterfaceOperation.js.map
|