@autobe/agent 0.25.7 → 0.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/AutoBeAgent.d.ts +2 -1
- package/lib/AutoBeAgent.js +30 -7
- package/lib/AutoBeAgent.js.map +1 -1
- package/lib/AutoBeMockAgent.js +13 -12
- package/lib/AutoBeMockAgent.js.map +1 -1
- package/lib/constants/AutoBeSystemPromptConstant.d.ts +27 -20
- package/lib/constants/AutoBeSystemPromptConstant.js.map +1 -1
- package/lib/context/AutoBeContext.d.ts +4 -1
- package/lib/context/AutoBeTokenUsage.d.ts +1 -1
- package/lib/context/AutoBeTokenUsage.js.map +1 -1
- package/lib/factory/AutoBeFunctionCallingMetricFactory.d.ts +7 -0
- package/lib/factory/AutoBeFunctionCallingMetricFactory.js +35 -0
- package/lib/factory/AutoBeFunctionCallingMetricFactory.js.map +1 -0
- package/lib/factory/AutoBeProcessAggregateFactory.d.ts +13 -0
- package/lib/factory/AutoBeProcessAggregateFactory.js +100 -0
- package/lib/factory/AutoBeProcessAggregateFactory.js.map +1 -0
- package/lib/factory/consentFunctionCall.js +3 -0
- package/lib/factory/consentFunctionCall.js.map +1 -1
- package/lib/factory/createAutoBeContext.d.ts +2 -1
- package/lib/factory/createAutoBeContext.js +82 -28
- package/lib/factory/createAutoBeContext.js.map +1 -1
- package/lib/factory/getCommonPrompt.d.ts +2 -0
- package/lib/factory/getCommonPrompt.js +20 -0
- package/lib/factory/getCommonPrompt.js.map +1 -0
- package/lib/index.mjs +20929 -19874
- package/lib/index.mjs.map +1 -1
- package/lib/orchestrate/analyze/histories/transformAnalyzeReviewHistories.js +1 -1
- package/lib/orchestrate/analyze/histories/transformAnalyzeReviewHistories.js.map +1 -1
- package/lib/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js +2 -2
- package/lib/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js.map +1 -1
- package/lib/orchestrate/analyze/histories/transformAnalyzeWriteHistories.js +6 -6
- package/lib/orchestrate/analyze/histories/transformAnalyzeWriteHistories.js.map +1 -1
- package/lib/orchestrate/analyze/orchestrateAnalyze.js +2 -1
- package/lib/orchestrate/analyze/orchestrateAnalyze.js.map +1 -1
- package/lib/orchestrate/analyze/orchestrateAnalyzeReview.js +2 -1
- package/lib/orchestrate/analyze/orchestrateAnalyzeReview.js.map +1 -1
- package/lib/orchestrate/analyze/orchestrateAnalyzeScenario.js +75 -74
- package/lib/orchestrate/analyze/orchestrateAnalyzeScenario.js.map +1 -1
- package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.js +5 -4
- package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.js.map +1 -1
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.d.ts +9 -9
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeWriteApplication.d.ts +1 -1
- package/lib/orchestrate/common/histories/transformCommonCorrectCastingHistories.js +2 -17
- package/lib/orchestrate/common/histories/transformCommonCorrectCastingHistories.js.map +1 -1
- package/lib/orchestrate/common/histories/transformPreviousAndLatestCorrectHistories.d.ts +6 -0
- package/lib/orchestrate/common/histories/transformPreviousAndLatestCorrectHistories.js +58 -0
- package/lib/orchestrate/common/histories/transformPreviousAndLatestCorrectHistories.js.map +1 -0
- package/lib/orchestrate/common/orchestrateCommonCorrectCasting.d.ts +2 -1
- package/lib/orchestrate/common/orchestrateCommonCorrectCasting.js +3 -2
- package/lib/orchestrate/common/orchestrateCommonCorrectCasting.js.map +1 -1
- package/lib/{factory/createAutoBeApplication.d.ts → orchestrate/facade/createAutoBeFacadeController.d.ts} +2 -2
- package/lib/{factory/createAutoBeApplication.js → orchestrate/facade/createAutoBeFacadeController.js} +53 -57
- package/lib/orchestrate/facade/createAutoBeFacadeController.js.map +1 -0
- package/lib/orchestrate/facade/histories/IAutoBeFacadeApplication.js.map +1 -0
- package/lib/orchestrate/facade/histories/IAutoBeFacadeApplicationProps.js.map +1 -0
- package/lib/orchestrate/facade/histories/IAutoBeFacadeApplicationResult.js.map +1 -0
- package/lib/orchestrate/facade/{transformFacadeStateMessage.d.ts → structures/transformFacadeStateMessage.d.ts} +1 -1
- package/lib/orchestrate/facade/structures/transformFacadeStateMessage.js +46 -0
- package/lib/orchestrate/facade/structures/transformFacadeStateMessage.js.map +1 -0
- package/lib/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.d.ts +2 -2
- package/lib/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.js +8 -8
- package/lib/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.js.map +1 -1
- package/lib/orchestrate/interface/histories/transformInterfaceComplementHistories.js +3 -3
- package/lib/orchestrate/interface/histories/transformInterfaceComplementHistories.js.map +1 -1
- package/lib/orchestrate/interface/histories/transformInterfaceEndpointHistories.js +1 -1
- package/lib/orchestrate/interface/histories/transformInterfaceEndpointHistories.js.map +1 -1
- package/lib/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.js +3 -2
- package/lib/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.js.map +1 -1
- package/lib/orchestrate/interface/histories/transformInterfaceGroupHistories.js +2 -2
- package/lib/orchestrate/interface/histories/transformInterfaceGroupHistories.js.map +1 -1
- package/lib/orchestrate/interface/histories/transformInterfaceOperationHistories.js +1 -1
- package/lib/orchestrate/interface/histories/transformInterfaceOperationHistories.js.map +1 -1
- package/lib/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js +2 -2
- package/lib/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js.map +1 -1
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaHistories.d.ts +1 -0
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaHistories.js +46 -20
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaHistories.js.map +1 -1
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaRenameHistories.d.ts +5 -0
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaRenameHistories.js +51 -0
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaRenameHistories.js.map +1 -0
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaReviewHistories.d.ts +11 -0
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaReviewHistories.js +81 -0
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaReviewHistories.js.map +1 -0
- package/lib/orchestrate/interface/orchestrateInterface.d.ts +1 -1
- package/lib/orchestrate/interface/orchestrateInterface.js +33 -6
- package/lib/orchestrate/interface/orchestrateInterface.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceAuthorizations.js +185 -97
- package/lib/orchestrate/interface/orchestrateInterfaceAuthorizations.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceComplement.js +234 -59
- package/lib/orchestrate/interface/orchestrateInterfaceComplement.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.js +5 -4
- package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceEndpointsReview.d.ts +0 -6
- package/lib/orchestrate/interface/orchestrateInterfaceEndpointsReview.js +4 -4
- package/lib/orchestrate/interface/orchestrateInterfaceEndpointsReview.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceGroups.d.ts +2 -2
- package/lib/orchestrate/interface/orchestrateInterfaceGroups.js +4 -3
- package/lib/orchestrate/interface/orchestrateInterfaceGroups.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceOperations.js +178 -90
- package/lib/orchestrate/interface/orchestrateInterfaceOperations.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceOperationsReview.js +176 -88
- package/lib/orchestrate/interface/orchestrateInterfaceOperationsReview.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfacePrerequisites.js +6 -5
- package/lib/orchestrate/interface/orchestrateInterfacePrerequisites.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceSchemaRename.d.ts +7 -0
- package/lib/orchestrate/interface/orchestrateInterfaceSchemaRename.js +445 -0
- package/lib/orchestrate/interface/orchestrateInterfaceSchemaRename.js.map +1 -0
- package/lib/orchestrate/interface/orchestrateInterfaceSchemaReview.d.ts +14 -0
- package/lib/orchestrate/interface/{orchestrateInterfaceSchemasReview.js → orchestrateInterfaceSchemaReview.js} +302 -121
- package/lib/orchestrate/interface/orchestrateInterfaceSchemaReview.js.map +1 -0
- package/lib/orchestrate/interface/orchestrateInterfaceSchemas.js +243 -65
- package/lib/orchestrate/interface/orchestrateInterfaceSchemas.js.map +1 -1
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.d.ts +22 -22
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.d.ts +7 -7
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaContentReviewApplication.d.ts +101 -0
- package/lib/orchestrate/interface/structures/{IAutobeInterfaceSchemasReviewApplication.js → IAutoBeInterfaceSchemaContentReviewApplication.js} +1 -1
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaContentReviewApplication.js.map +1 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaRelationReviewApplication.d.ts +97 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaRelationReviewApplication.js +3 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaRelationReviewApplication.js.map +1 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaRenameApplication.d.ts +44 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaRenameApplication.js +3 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaRenameApplication.js.map +1 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaSecurityReviewApplication.d.ts +92 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaSecurityReviewApplication.js +3 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaSecurityReviewApplication.js.map +1 -0
- package/lib/orchestrate/interface/utils/JsonSchemaFactory.js +65 -24
- package/lib/orchestrate/interface/utils/JsonSchemaFactory.js.map +1 -1
- package/lib/orchestrate/interface/utils/JsonSchemaValidator.js +94 -0
- package/lib/orchestrate/interface/utils/JsonSchemaValidator.js.map +1 -1
- package/lib/orchestrate/interface/utils/OperationValidator.d.ts +1 -1
- package/lib/orchestrate/prisma/histories/transformPrismaComponentsHistories.js +13 -13
- package/lib/orchestrate/prisma/histories/transformPrismaComponentsHistories.js.map +1 -1
- package/lib/orchestrate/prisma/histories/transformPrismaReviewHistories.js +1 -1
- package/lib/orchestrate/prisma/histories/transformPrismaReviewHistories.js.map +1 -1
- package/lib/orchestrate/prisma/histories/transformPrismaSchemaHistories.js +1 -1
- package/lib/orchestrate/prisma/histories/transformPrismaSchemaHistories.js.map +1 -1
- package/lib/orchestrate/prisma/orchestratePrisma.d.ts +1 -1
- package/lib/orchestrate/prisma/orchestratePrisma.js +1 -0
- package/lib/orchestrate/prisma/orchestratePrisma.js.map +1 -1
- package/lib/orchestrate/prisma/orchestratePrismaComponent.d.ts +2 -2
- package/lib/orchestrate/prisma/orchestratePrismaComponent.js +4 -3
- package/lib/orchestrate/prisma/orchestratePrismaComponent.js.map +1 -1
- package/lib/orchestrate/prisma/orchestratePrismaCorrect.js +2 -1
- package/lib/orchestrate/prisma/orchestratePrismaCorrect.js.map +1 -1
- package/lib/orchestrate/prisma/orchestratePrismaReview.js +2 -1
- package/lib/orchestrate/prisma/orchestratePrismaReview.js.map +1 -1
- package/lib/orchestrate/prisma/orchestratePrismaSchemas.d.ts +2 -2
- package/lib/orchestrate/prisma/orchestratePrismaSchemas.js +4 -3
- package/lib/orchestrate/prisma/orchestratePrismaSchemas.js.map +1 -1
- package/lib/orchestrate/realize/histories/transformRealizeAuthorization.d.ts +2 -2
- package/lib/orchestrate/realize/histories/transformRealizeAuthorization.js +8 -7
- package/lib/orchestrate/realize/histories/transformRealizeAuthorization.js.map +1 -1
- package/lib/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.js +4 -4
- package/lib/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.js.map +1 -1
- package/lib/orchestrate/realize/histories/transformRealizeCorrectCastingHistories.d.ts +4 -7
- package/lib/orchestrate/realize/histories/transformRealizeCorrectCastingHistories.js +8 -18
- package/lib/orchestrate/realize/histories/transformRealizeCorrectCastingHistories.js.map +1 -1
- package/lib/orchestrate/realize/histories/transformRealizeCorrectHistories.d.ts +0 -1
- package/lib/orchestrate/realize/histories/transformRealizeCorrectHistories.js +8 -28
- package/lib/orchestrate/realize/histories/transformRealizeCorrectHistories.js.map +1 -1
- package/lib/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.d.ts +1 -1
- package/lib/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.js +16 -280
- package/lib/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.js.map +1 -1
- package/lib/orchestrate/realize/histories/transformRealizeWriteHistories.js +1 -1
- package/lib/orchestrate/realize/histories/transformRealizeWriteHistories.js.map +1 -1
- package/lib/orchestrate/realize/orchestrateRealize.d.ts +1 -1
- package/lib/orchestrate/realize/orchestrateRealize.js +4 -3
- package/lib/orchestrate/realize/orchestrateRealize.js.map +1 -1
- package/lib/orchestrate/realize/orchestrateRealizeAuthorization.js +14 -13
- package/lib/orchestrate/realize/orchestrateRealizeAuthorization.js.map +1 -1
- package/lib/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js +12 -11
- package/lib/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js.map +1 -1
- package/lib/orchestrate/realize/orchestrateRealizeCorrect.d.ts +1 -1
- package/lib/orchestrate/realize/orchestrateRealizeCorrect.js +46 -24
- package/lib/orchestrate/realize/orchestrateRealizeCorrect.js.map +1 -1
- package/lib/orchestrate/realize/{orchestRateRealizeCorrectCasting.js → orchestrateRealizeCorrectCasting.js} +64 -51
- package/lib/orchestrate/realize/orchestrateRealizeCorrectCasting.js.map +1 -0
- package/lib/orchestrate/realize/orchestrateRealizeWrite.js +2 -1
- package/lib/orchestrate/realize/orchestrateRealizeWrite.js.map +1 -1
- package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.d.ts +3 -3
- package/lib/orchestrate/realize/utils/AutoBeRealizeAuthorizationReplaceImport.d.ts +2 -2
- package/lib/orchestrate/realize/utils/AutoBeRealizeAuthorizationReplaceImport.js +6 -6
- package/lib/orchestrate/realize/utils/AutoBeRealizeAuthorizationReplaceImport.js.map +1 -1
- package/lib/orchestrate/realize/utils/generateRealizeScenario.js +1 -1
- package/lib/orchestrate/realize/utils/generateRealizeScenario.js.map +1 -1
- package/lib/orchestrate/realize/utils/getRealizeWriteCodeTemplate.js +2 -2
- package/lib/orchestrate/realize/utils/getRealizeWriteCodeTemplate.js.map +1 -1
- package/lib/orchestrate/realize/utils/getRealizeWriteDto.js +1 -1
- package/lib/orchestrate/realize/utils/getRealizeWriteDto.js.map +1 -1
- package/lib/orchestrate/realize/utils/getRealizeWriteInputType.js +2 -2
- package/lib/orchestrate/realize/utils/getRealizeWriteInputType.js.map +1 -1
- package/lib/orchestrate/realize/utils/printErrorHints.js +1 -1
- package/lib/orchestrate/realize/utils/printErrorHints.js.map +1 -1
- package/lib/orchestrate/realize/utils/replaceImportStatements.js +0 -85
- package/lib/orchestrate/realize/utils/replaceImportStatements.js.map +1 -1
- package/lib/orchestrate/test/compile/getTestScenarioArtifacts.js +1 -1
- package/lib/orchestrate/test/compile/getTestScenarioArtifacts.js.map +1 -1
- package/lib/orchestrate/test/histories/transformTestCorrectHistories.js +5 -22
- package/lib/orchestrate/test/histories/transformTestCorrectHistories.js.map +1 -1
- package/lib/orchestrate/test/histories/transformTestCorrectInvalidRequestHistories.js +10 -10
- package/lib/orchestrate/test/histories/transformTestCorrectInvalidRequestHistories.js.map +1 -1
- package/lib/orchestrate/test/histories/transformTestScenarioHistories.js +5 -5
- package/lib/orchestrate/test/histories/transformTestScenarioHistories.js.map +1 -1
- package/lib/orchestrate/test/histories/transformTestScenarioReviewHistories.js +2 -2
- package/lib/orchestrate/test/histories/transformTestScenarioReviewHistories.js.map +1 -1
- package/lib/orchestrate/test/orchestrateTest.d.ts +1 -1
- package/lib/orchestrate/test/orchestrateTest.js +2 -1
- package/lib/orchestrate/test/orchestrateTest.js.map +1 -1
- package/lib/orchestrate/test/orchestrateTestCorrect.js +5 -1
- package/lib/orchestrate/test/orchestrateTestCorrect.js.map +1 -1
- package/lib/orchestrate/test/orchestrateTestCorrectInvalidRequest.js +4 -2
- package/lib/orchestrate/test/orchestrateTestCorrectInvalidRequest.js.map +1 -1
- package/lib/orchestrate/test/orchestrateTestScenario.js +28 -27
- package/lib/orchestrate/test/orchestrateTestScenario.js.map +1 -1
- package/lib/orchestrate/test/orchestrateTestScenarioReview.js +4 -3
- package/lib/orchestrate/test/orchestrateTestScenarioReview.js.map +1 -1
- package/lib/orchestrate/test/orchestrateTestWrite.js +2 -1
- package/lib/orchestrate/test/orchestrateTestWrite.js.map +1 -1
- package/lib/orchestrate/test/structures/{IAutoBeTestScenarioAuthorizationRole.d.ts → IAutoBeTestScenarioAuthorizationActor.d.ts} +1 -1
- package/lib/orchestrate/test/structures/{IAutoBeTestScenarioAuthorizationRole.js → IAutoBeTestScenarioAuthorizationActor.js} +1 -1
- package/lib/orchestrate/test/structures/IAutoBeTestScenarioAuthorizationActor.js.map +1 -0
- package/lib/utils/TokenUsageComputer.d.ts +5 -0
- package/lib/utils/TokenUsageComputer.js +29 -0
- package/lib/utils/TokenUsageComputer.js.map +1 -0
- package/package.json +7 -7
- package/src/AutoBeAgent.ts +43 -6
- package/src/AutoBeMockAgent.ts +13 -12
- package/src/constants/AutoBeSystemPromptConstant.ts +27 -20
- package/src/context/AutoBeContext.ts +8 -0
- package/src/context/AutoBeTokenUsage.ts +1 -1
- package/src/factory/AutoBeFunctionCallingMetricFactory.ts +44 -0
- package/src/factory/AutoBeProcessAggregateFactory.ts +141 -0
- package/src/factory/consentFunctionCall.ts +4 -0
- package/src/factory/createAutoBeContext.ts +101 -37
- package/src/factory/getCommonPrompt.ts +25 -0
- package/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.ts +5 -5
- package/src/orchestrate/analyze/orchestrateAnalyze.ts +2 -1
- package/src/orchestrate/analyze/orchestrateAnalyzeReview.ts +2 -1
- package/src/orchestrate/analyze/orchestrateAnalyzeScenario.ts +5 -4
- package/src/orchestrate/analyze/orchestrateAnalyzeWrite.ts +3 -2
- package/src/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.ts +9 -9
- package/src/orchestrate/analyze/structures/IAutoBeAnalyzeWriteApplication.ts +1 -1
- package/src/orchestrate/common/histories/transformCommonCorrectCastingHistories.ts +2 -20
- package/src/orchestrate/common/histories/transformPreviousAndLatestCorrectHistories.ts +65 -0
- package/src/orchestrate/common/orchestrateCommonCorrectCasting.ts +5 -2
- package/src/orchestrate/facade/createAutoBeFacadeController.ts +135 -0
- package/src/orchestrate/facade/{transformFacadeStateMessage.ts → structures/transformFacadeStateMessage.ts} +2 -2
- package/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.ts +9 -9
- package/src/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.ts +1 -0
- package/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.ts +45 -20
- package/src/orchestrate/interface/histories/transformInterfaceSchemaRenameHistories.ts +55 -0
- package/src/orchestrate/interface/histories/transformInterfaceSchemaReviewHistories.ts +90 -0
- package/src/orchestrate/interface/orchestrateInterface.ts +47 -16
- package/src/orchestrate/interface/orchestrateInterfaceAuthorizations.ts +20 -19
- package/src/orchestrate/interface/orchestrateInterfaceComplement.ts +2 -1
- package/src/orchestrate/interface/orchestrateInterfaceEndpoints.ts +7 -6
- package/src/orchestrate/interface/orchestrateInterfaceEndpointsReview.ts +5 -6
- package/src/orchestrate/interface/orchestrateInterfaceGroups.ts +7 -6
- package/src/orchestrate/interface/orchestrateInterfaceOperations.ts +25 -24
- package/src/orchestrate/interface/orchestrateInterfaceOperationsReview.ts +6 -5
- package/src/orchestrate/interface/orchestrateInterfacePrerequisites.ts +4 -3
- package/src/orchestrate/interface/orchestrateInterfaceSchemaRename.ts +270 -0
- package/src/orchestrate/interface/{orchestrateInterfaceSchemasReview.ts → orchestrateInterfaceSchemaReview.ts} +89 -76
- package/src/orchestrate/interface/orchestrateInterfaceSchemas.ts +18 -9
- package/src/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.ts +26 -22
- package/src/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.ts +7 -7
- package/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaContentReviewApplication.ts +108 -0
- package/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaRelationReviewApplication.ts +104 -0
- package/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaRenameApplication.ts +45 -0
- package/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaSecurityReviewApplication.ts +99 -0
- package/src/orchestrate/interface/utils/JsonSchemaFactory.ts +45 -3
- package/src/orchestrate/interface/utils/JsonSchemaValidator.ts +110 -0
- package/src/orchestrate/interface/utils/OperationValidator.ts +1 -1
- package/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.ts +12 -12
- package/src/orchestrate/prisma/orchestratePrisma.ts +6 -5
- package/src/orchestrate/prisma/orchestratePrismaComponent.ts +6 -5
- package/src/orchestrate/prisma/orchestratePrismaCorrect.ts +2 -1
- package/src/orchestrate/prisma/orchestratePrismaReview.ts +2 -1
- package/src/orchestrate/prisma/orchestratePrismaSchemas.ts +9 -8
- package/src/orchestrate/realize/histories/transformRealizeAuthorization.ts +8 -7
- package/src/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.ts +4 -4
- package/src/orchestrate/realize/histories/transformRealizeCorrectCastingHistories.ts +14 -28
- package/src/orchestrate/realize/histories/transformRealizeCorrectHistories.ts +13 -30
- package/src/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.ts +20 -285
- package/src/orchestrate/realize/orchestrateRealize.ts +4 -3
- package/src/orchestrate/realize/orchestrateRealizeAuthorization.ts +11 -10
- package/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.ts +5 -4
- package/src/orchestrate/realize/orchestrateRealizeCorrect.ts +77 -62
- package/src/orchestrate/realize/{orchestRateRealizeCorrectCasting.ts → orchestrateRealizeCorrectCasting.ts} +92 -90
- package/src/orchestrate/realize/orchestrateRealizeWrite.ts +2 -1
- package/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.ts +3 -3
- package/src/orchestrate/realize/utils/AutoBeRealizeAuthorizationReplaceImport.ts +10 -7
- package/src/orchestrate/realize/utils/generateRealizeScenario.ts +1 -1
- package/src/orchestrate/realize/utils/getRealizeWriteCodeTemplate.ts +2 -2
- package/src/orchestrate/realize/utils/getRealizeWriteDto.ts +1 -1
- package/src/orchestrate/realize/utils/getRealizeWriteInputType.ts +2 -2
- package/src/orchestrate/realize/utils/printErrorHints.ts +1 -1
- package/src/orchestrate/realize/utils/replaceImportStatements.ts +0 -90
- package/src/orchestrate/test/compile/getTestScenarioArtifacts.ts +1 -1
- package/src/orchestrate/test/histories/transformTestCorrectHistories.ts +6 -24
- package/src/orchestrate/test/histories/transformTestCorrectInvalidRequestHistories.ts +10 -10
- package/src/orchestrate/test/histories/transformTestScenarioHistories.ts +12 -10
- package/src/orchestrate/test/orchestrateTest.ts +3 -2
- package/src/orchestrate/test/orchestrateTestCorrect.ts +5 -1
- package/src/orchestrate/test/orchestrateTestCorrectInvalidRequest.ts +4 -2
- package/src/orchestrate/test/orchestrateTestScenario.ts +32 -31
- package/src/orchestrate/test/orchestrateTestScenarioReview.ts +4 -3
- package/src/orchestrate/test/orchestrateTestWrite.ts +2 -1
- package/src/orchestrate/test/structures/{IAutoBeTestScenarioAuthorizationRole.ts → IAutoBeTestScenarioAuthorizationActor.ts} +1 -1
- package/src/utils/TokenUsageComputer.ts +35 -0
- package/lib/context/IAutoBeFacadeApplication.js.map +0 -1
- package/lib/context/IAutoBeFacadeApplicationProps.js.map +0 -1
- package/lib/context/IAutoBeFacadeApplicationResult.js.map +0 -1
- package/lib/factory/createAutoBeApplication.js.map +0 -1
- package/lib/orchestrate/facade/transformFacadeStateMessage.js +0 -46
- package/lib/orchestrate/facade/transformFacadeStateMessage.js.map +0 -1
- package/lib/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.d.ts +0 -4
- package/lib/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.js +0 -60
- package/lib/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.js.map +0 -1
- package/lib/orchestrate/interface/orchestrateInterfaceSchemasReview.d.ts +0 -9
- package/lib/orchestrate/interface/orchestrateInterfaceSchemasReview.js.map +0 -1
- package/lib/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.d.ts +0 -91
- package/lib/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.js.map +0 -1
- package/lib/orchestrate/realize/orchestRateRealizeCorrectCasting.js.map +0 -1
- package/lib/orchestrate/test/structures/IAutoBeTestScenarioAuthorizationRole.js.map +0 -1
- package/src/factory/createAutoBeApplication.ts +0 -123
- package/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.ts +0 -67
- package/src/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.ts +0 -96
- /package/lib/{context → orchestrate/facade/histories}/IAutoBeFacadeApplication.d.ts +0 -0
- /package/lib/{context → orchestrate/facade/histories}/IAutoBeFacadeApplication.js +0 -0
- /package/lib/{context → orchestrate/facade/histories}/IAutoBeFacadeApplicationProps.d.ts +0 -0
- /package/lib/{context → orchestrate/facade/histories}/IAutoBeFacadeApplicationProps.js +0 -0
- /package/lib/{context → orchestrate/facade/histories}/IAutoBeFacadeApplicationResult.d.ts +0 -0
- /package/lib/{context → orchestrate/facade/histories}/IAutoBeFacadeApplicationResult.js +0 -0
- /package/lib/orchestrate/realize/{orchestRateRealizeCorrectCasting.d.ts → orchestrateRealizeCorrectCasting.d.ts} +0 -0
- /package/src/{context → orchestrate/facade/histories}/IAutoBeFacadeApplication.ts +0 -0
- /package/src/{context → orchestrate/facade/histories}/IAutoBeFacadeApplicationProps.ts +0 -0
- /package/src/{context → orchestrate/facade/histories}/IAutoBeFacadeApplicationResult.ts +0 -0
|
@@ -57,21 +57,21 @@ const transformInterfaceAuthorizationsHistories_1 = require("./histories/transfo
|
|
|
57
57
|
function orchestrateInterfaceAuthorizations(ctx, instruction) {
|
|
58
58
|
return __awaiter(this, void 0, void 0, function* () {
|
|
59
59
|
var _a, _b;
|
|
60
|
-
const
|
|
60
|
+
const actors = (_b = (_a = ctx.state().analyze) === null || _a === void 0 ? void 0 : _a.actors) !== null && _b !== void 0 ? _b : [];
|
|
61
61
|
const progress = {
|
|
62
|
-
total:
|
|
62
|
+
total: actors.length,
|
|
63
63
|
completed: 0,
|
|
64
64
|
};
|
|
65
|
-
const authorizations = yield (0, executeCachedBatch_1.executeCachedBatch)(
|
|
65
|
+
const authorizations = yield (0, executeCachedBatch_1.executeCachedBatch)(actors.map((a) => (promptCacheKey) => __awaiter(this, void 0, void 0, function* () {
|
|
66
66
|
const event = yield process(ctx, {
|
|
67
|
-
|
|
67
|
+
actor: a,
|
|
68
68
|
progress,
|
|
69
69
|
promptCacheKey,
|
|
70
70
|
instruction,
|
|
71
71
|
});
|
|
72
72
|
ctx.dispatch(event);
|
|
73
73
|
return {
|
|
74
|
-
|
|
74
|
+
name: a.name,
|
|
75
75
|
operations: event.operations,
|
|
76
76
|
};
|
|
77
77
|
})));
|
|
@@ -84,16 +84,16 @@ function process(ctx, props) {
|
|
|
84
84
|
const pointer = {
|
|
85
85
|
value: null,
|
|
86
86
|
};
|
|
87
|
-
const { tokenUsage } = yield ctx.conversate({
|
|
87
|
+
const { metric, tokenUsage } = yield ctx.conversate({
|
|
88
88
|
source: "interfaceAuthorization",
|
|
89
89
|
histories: (0, transformInterfaceAuthorizationsHistories_1.transformInterfaceAuthorizationsHistories)({
|
|
90
90
|
state: ctx.state(),
|
|
91
91
|
instruction: props.instruction,
|
|
92
|
-
|
|
92
|
+
actor: props.actor,
|
|
93
93
|
}),
|
|
94
94
|
controller: createController({
|
|
95
95
|
model: ctx.model,
|
|
96
|
-
|
|
96
|
+
actor: props.actor,
|
|
97
97
|
build: (next) => {
|
|
98
98
|
pointer.value = next;
|
|
99
99
|
},
|
|
@@ -109,6 +109,7 @@ function process(ctx, props) {
|
|
|
109
109
|
id: (0, uuid_1.v7)(),
|
|
110
110
|
operations: pointer.value.operations,
|
|
111
111
|
completed: ++props.progress.completed,
|
|
112
|
+
metric,
|
|
112
113
|
tokenUsage,
|
|
113
114
|
created_at: new Date().toISOString(),
|
|
114
115
|
step: (_b = (_a = ctx.state().analyze) === null || _a === void 0 ? void 0 : _a.step) !== null && _b !== void 0 ? _b : 0,
|
|
@@ -119,7 +120,7 @@ function process(ctx, props) {
|
|
|
119
120
|
function createController(props) {
|
|
120
121
|
(0, assertSchemaModel_1.assertSchemaModel)(props.model);
|
|
121
122
|
const validate = (next) => {
|
|
122
|
-
const result = (() => { const _io0 = input => Array.isArray(input.operations) && (1 <= input.operations.length && input.operations.every(elem => "object" === typeof elem && null !== elem && _io1(elem))); const _io1 = input => "string" === typeof input.specification && (null === input.authorizationType || "login" === input.authorizationType || "join" === input.authorizationType || "refresh" === input.authorizationType) && "string" === typeof input.description && "string" === typeof input.summary && (Array.isArray(input.parameters) && input.parameters.every(elem => "object" === typeof elem && null !== elem && _io2(elem))) && (null === input.requestBody || "object" === typeof input.requestBody && null !== input.requestBody && _io6(input.requestBody)) && (null === input.responseBody || "object" === typeof input.responseBody && null !== input.responseBody && _io7(input.responseBody)) && (null === input.
|
|
123
|
+
const result = (() => { const _iv4 = 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 _vv8 = 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 => Array.isArray(input.operations) && (1 <= input.operations.length && input.operations.every(elem => "object" === typeof elem && null !== elem && _io1(elem))); const _io1 = input => "string" === typeof input.specification && (null === input.authorizationType || "login" === input.authorizationType || "join" === input.authorizationType || "refresh" === input.authorizationType) && "string" === typeof input.description && "string" === typeof input.summary && (Array.isArray(input.parameters) && input.parameters.every(elem => "object" === typeof elem && null !== elem && _io2(elem))) && (null === input.requestBody || "object" === typeof input.requestBody && null !== input.requestBody && _io6(input.requestBody)) && (null === input.responseBody || "object" === typeof input.responseBody && null !== input.responseBody && _io7(input.responseBody)) && (null === input.authorizationActor || "string" === typeof input.authorizationActor && (RegExp("^[a-z][a-zA-Z0-9]*$").test(input.authorizationActor) && 1 <= input.authorizationActor.length)) && ("string" === typeof input.name && RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name)) && (Array.isArray(input.prerequisites) && input.prerequisites.every(elem => "object" === typeof elem && null !== elem && _io8(elem))) && ("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 _io2 = 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 && _iu0(input.schema)); const _io3 = 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 _io4 = 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 _io5 = input => (undefined === input.format || true === _iv4.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 _io6 = input => "string" === typeof input.description && "string" === typeof input.typeName; const _io7 = input => "string" === typeof input.description && "string" === typeof input.typeName; const _io8 = input => "object" === typeof input.endpoint && null !== input.endpoint && _io9(input.endpoint) && "string" === typeof input.description; const _io9 = input => "string" === typeof input.path && RegExp("^\\/[a-zA-Z0-9\\/_{}.-]*$").test(input.path) && ("get" === input.method || "post" === input.method || "put" === input.method || "delete" === input.method || "patch" === input.method); const _iu0 = input => (() => {
|
|
123
124
|
if ("number" === input.type)
|
|
124
125
|
return _io4(input);
|
|
125
126
|
else if ("integer" === input.type)
|
|
@@ -136,12 +137,12 @@ function createController(props) {
|
|
|
136
137
|
path: _path + ".operations",
|
|
137
138
|
expected: "Array<> & MinItems<1>",
|
|
138
139
|
value: input.operations
|
|
139
|
-
})) && input.operations.map((elem,
|
|
140
|
-
path: _path + ".operations[" +
|
|
140
|
+
})) && input.operations.map((elem, _index5) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
141
|
+
path: _path + ".operations[" + _index5 + "]",
|
|
141
142
|
expected: "AutoBeOpenApi.IOperation",
|
|
142
143
|
value: elem
|
|
143
|
-
})) && _vo1(elem, _path + ".operations[" +
|
|
144
|
-
path: _path + ".operations[" +
|
|
144
|
+
})) && _vo1(elem, _path + ".operations[" + _index5 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
145
|
+
path: _path + ".operations[" + _index5 + "]",
|
|
145
146
|
expected: "AutoBeOpenApi.IOperation",
|
|
146
147
|
value: elem
|
|
147
148
|
})).every(flag => flag)) || _report(_exceptionable, {
|
|
@@ -168,12 +169,12 @@ function createController(props) {
|
|
|
168
169
|
path: _path + ".parameters",
|
|
169
170
|
expected: "Array<AutoBeOpenApi.IParameter>",
|
|
170
171
|
value: input.parameters
|
|
171
|
-
})) && input.parameters.map((elem,
|
|
172
|
-
path: _path + ".parameters[" +
|
|
172
|
+
})) && input.parameters.map((elem, _index6) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
173
|
+
path: _path + ".parameters[" + _index6 + "]",
|
|
173
174
|
expected: "AutoBeOpenApi.IParameter",
|
|
174
175
|
value: elem
|
|
175
|
-
})) && _vo2(elem, _path + ".parameters[" +
|
|
176
|
-
path: _path + ".parameters[" +
|
|
176
|
+
})) && _vo2(elem, _path + ".parameters[" + _index6 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
177
|
+
path: _path + ".parameters[" + _index6 + "]",
|
|
177
178
|
expected: "AutoBeOpenApi.IParameter",
|
|
178
179
|
value: elem
|
|
179
180
|
})).every(flag => flag) || _report(_exceptionable, {
|
|
@@ -196,18 +197,18 @@ function createController(props) {
|
|
|
196
197
|
path: _path + ".responseBody",
|
|
197
198
|
expected: "(AutoBeOpenApi.IResponseBody | null)",
|
|
198
199
|
value: input.responseBody
|
|
199
|
-
}), null === input.
|
|
200
|
-
path: _path + ".
|
|
200
|
+
}), null === input.authorizationActor || "string" === typeof input.authorizationActor && (RegExp("^[a-z][a-zA-Z0-9]*$").test(input.authorizationActor) || _report(_exceptionable, {
|
|
201
|
+
path: _path + ".authorizationActor",
|
|
201
202
|
expected: "string & CamelCasePattern",
|
|
202
|
-
value: input.
|
|
203
|
-
})) && (1 <= input.
|
|
204
|
-
path: _path + ".
|
|
203
|
+
value: input.authorizationActor
|
|
204
|
+
})) && (1 <= input.authorizationActor.length || _report(_exceptionable, {
|
|
205
|
+
path: _path + ".authorizationActor",
|
|
205
206
|
expected: "string & MinLength<1>",
|
|
206
|
-
value: input.
|
|
207
|
+
value: input.authorizationActor
|
|
207
208
|
})) || _report(_exceptionable, {
|
|
208
|
-
path: _path + ".
|
|
209
|
+
path: _path + ".authorizationActor",
|
|
209
210
|
expected: "((string & CamelCasePattern & MinLength<1>) | null)",
|
|
210
|
-
value: input.
|
|
211
|
+
value: input.authorizationActor
|
|
211
212
|
}), "string" === typeof input.name && (RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name) || _report(_exceptionable, {
|
|
212
213
|
path: _path + ".name",
|
|
213
214
|
expected: "string & CamelCasePattern",
|
|
@@ -220,12 +221,12 @@ function createController(props) {
|
|
|
220
221
|
path: _path + ".prerequisites",
|
|
221
222
|
expected: "Array<AutoBeOpenApi.IPrerequisite>",
|
|
222
223
|
value: input.prerequisites
|
|
223
|
-
})) && input.prerequisites.map((elem,
|
|
224
|
-
path: _path + ".prerequisites[" +
|
|
224
|
+
})) && input.prerequisites.map((elem, _index7) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
225
|
+
path: _path + ".prerequisites[" + _index7 + "]",
|
|
225
226
|
expected: "AutoBeOpenApi.IPrerequisite",
|
|
226
227
|
value: elem
|
|
227
|
-
})) && _vo8(elem, _path + ".prerequisites[" +
|
|
228
|
-
path: _path + ".prerequisites[" +
|
|
228
|
+
})) && _vo8(elem, _path + ".prerequisites[" + _index7 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
229
|
+
path: _path + ".prerequisites[" + _index7 + "]",
|
|
229
230
|
expected: "AutoBeOpenApi.IPrerequisite",
|
|
230
231
|
value: elem
|
|
231
232
|
})).every(flag => flag) || _report(_exceptionable, {
|
|
@@ -332,9 +333,9 @@ function createController(props) {
|
|
|
332
333
|
path: _path + ".type",
|
|
333
334
|
expected: "\"number\"",
|
|
334
335
|
value: input.type
|
|
335
|
-
})].every(flag => flag); const _vo5 = (input, _path, _exceptionable = true) => [undefined === input.format ||
|
|
336
|
+
})].every(flag => flag); const _vo5 = (input, _path, _exceptionable = true) => [undefined === input.format || true === _vv8.has(input.format) || _report(_exceptionable, {
|
|
336
337
|
path: _path + ".format",
|
|
337
|
-
expected: "(
|
|
338
|
+
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)",
|
|
338
339
|
value: input.format
|
|
339
340
|
}), undefined === input.pattern || "string" === typeof input.pattern || _report(_exceptionable, {
|
|
340
341
|
path: _path + ".pattern",
|
|
@@ -448,15 +449,15 @@ function createController(props) {
|
|
|
448
449
|
if (result.success === false)
|
|
449
450
|
return result;
|
|
450
451
|
// remove login operation for guest role
|
|
451
|
-
if (props.
|
|
452
|
+
if (props.actor.kind === "guest") {
|
|
452
453
|
result.data.operations = result.data.operations.filter((op) => op.authorizationType !== "login");
|
|
453
454
|
}
|
|
454
455
|
const errors = [];
|
|
455
456
|
result.data.operations.forEach((op, i) => {
|
|
456
457
|
var _a, _b;
|
|
457
|
-
// validate
|
|
458
|
-
if (op.
|
|
459
|
-
op.
|
|
458
|
+
// validate authorizationActor
|
|
459
|
+
if (op.authorizationActor !== null) {
|
|
460
|
+
op.authorizationActor = props.actor.name;
|
|
460
461
|
}
|
|
461
462
|
// validate responseBody.typeName -> must be ~.IAuthorized
|
|
462
463
|
if (op.authorizationType === null)
|
|
@@ -485,7 +486,7 @@ function createController(props) {
|
|
|
485
486
|
For authentication operations (login, join, refresh), the response body type name must follow the convention "I{RoleName}.IAuthorized".
|
|
486
487
|
|
|
487
488
|
This standardized naming convention ensures consistency across all authentication endpoints and clearly identifies authorization response types.
|
|
488
|
-
The
|
|
489
|
+
The actor name should be in PascalCase format (e.g., IUser.IAuthorized, IAdmin.IAuthorized, ISeller.IAuthorized).
|
|
489
490
|
`,
|
|
490
491
|
});
|
|
491
492
|
});
|
|
@@ -497,7 +498,7 @@ function createController(props) {
|
|
|
497
498
|
"join",
|
|
498
499
|
"refresh"
|
|
499
500
|
])
|
|
500
|
-
if (props.
|
|
501
|
+
if (props.actor.kind === "guest" && type === "login")
|
|
501
502
|
continue;
|
|
502
503
|
else if (authorizationTypes.has(type) === false)
|
|
503
504
|
errors.push({
|
|
@@ -509,10 +510,10 @@ function createController(props) {
|
|
|
509
510
|
value: `No authorizationType "${type}" found in any operation`,
|
|
510
511
|
description: utils_1.StringUtil.trim `
|
|
511
512
|
There must be an operation that has defined AutoBeOpenApi.IOperation.authorizationType := "${type}"
|
|
512
|
-
for the "${props.
|
|
513
|
+
for the "${props.actor}" role's authorization activity; "${type}".
|
|
513
514
|
|
|
514
515
|
However, none of the operations have the AutoBeOpenApi.IOperation.authorizationType := "${type}"
|
|
515
|
-
value, so that the "${props.
|
|
516
|
+
value, so that the "${props.actor}" cannot perform the authorization ${type} activity.
|
|
516
517
|
|
|
517
518
|
Please make that operation at the next function calling. You have to do it.
|
|
518
519
|
`,
|
|
@@ -628,8 +629,8 @@ const collection = {
|
|
|
628
629
|
}
|
|
629
630
|
]
|
|
630
631
|
},
|
|
631
|
-
|
|
632
|
-
description: "Authorization
|
|
632
|
+
authorizationActor: {
|
|
633
|
+
description: "Authorization actor required to access this API operation.\n\nThis field specifies which user actor is allowed to access this endpoint.\nThe actor name must correspond exactly to the actual actors defined in\nyour system's Prisma schema.\n\n## Naming Convention\n\nActor names MUST use camelCase.\n\n## Actor-Based Path Convention\n\nWhen authorizationActor is specified, it should align with the path\nstructure:\n\n- If authorizationActor is \"admin\" \u2192 path might be \"/admin/resources/{id}\"\n- If authorizationActor is \"seller\" \u2192 path might be \"/seller/products\"\n- Special case: For user's own resources, use path prefix \"/my/\" regardless\n of actor\n\n## Important Guidelines\n\n- Set to `null` for public endpoints that require no authentication\n- Set to specific actor string for actor-restricted endpoints\n- The actor name MUST match exactly with the user type/actor defined in the\n database\n- This actor will be used by the Realize Agent to generate appropriate\n decorator and authorization logic in the provider functions\n- The controller will apply the corresponding authentication decorator\n based on this actor\n\n## Examples\n\n- `null` - Public endpoint, no authentication required\n- `\"user\"` - Any authenticated user can access\n- `\"admin\"` - Only admin users can access\n- `\"seller\"` - Only seller users can access\n- `\"moderator\"` - Only moderator users can access\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.",
|
|
633
634
|
anyOf: [
|
|
634
635
|
{
|
|
635
636
|
type: "null"
|
|
@@ -645,7 +646,7 @@ const collection = {
|
|
|
645
646
|
type: "string"
|
|
646
647
|
},
|
|
647
648
|
prerequisites: {
|
|
648
|
-
description: "Prerequisites for this API operation.\n\nThe `prerequisites` field defines API operations that must be\nsuccessfully executed before this operation can be performed. This\ncreates an explicit dependency chain between API endpoints, ensuring\nproper execution order and data availability.\n\n## CRITICAL WARNING: Authentication Prerequisites\n\n**NEVER include authentication-related operations as prerequisites!**\nAuthentication is handled separately through the `
|
|
649
|
+
description: "Prerequisites for this API operation.\n\nThe `prerequisites` field defines API operations that must be\nsuccessfully executed before this operation can be performed. This\ncreates an explicit dependency chain between API endpoints, ensuring\nproper execution order and data availability.\n\n## CRITICAL WARNING: Authentication Prerequisites\n\n**NEVER include authentication-related operations as prerequisites!**\nAuthentication is handled separately through the `authorizationActor`\nfield and should NOT be part of the prerequisite chain. Do NOT add\nprerequisites for:\n\n- Login endpoints\n- Token validation endpoints\n- User authentication checks\n- Permission verification endpoints\n\nPrerequisites are ONLY for business logic dependencies, NOT for\nauthentication/authorization.\n\n## Purpose and Use Cases\n\nPrerequisites are essential for operations that depend on:\n\n1. **Existence Validation**: Ensuring resources exist before manipulation\n2. **State Requirements**: Verifying resources are in the correct state\n3. **Data Dependencies**: Loading necessary data for the current operation\n4. **Business Logic Constraints**: Enforcing domain-specific rules\n\n## Execution Flow\n\nWhen an operation has prerequisites:\n\n1. Each prerequisite API must be called first in the specified order\n2. Prerequisites must return successful responses (2xx status codes)\n3. Only after all prerequisites succeed can the main operation proceed\n4. If any prerequisite fails, the operation should not be attempted\n\n## Common Patterns\n\n### Resource Existence Check\n\n```typescript\n// Before updating an order item, ensure the order exists\nprerequisites: [\n {\n endpoint: { path: \"/orders/{orderId}\", method: \"get\" },\n description: \"Order must exist in the system\",\n },\n];\n```\n\n### State Validation\n\n```typescript\n// Before processing payment, ensure order is in correct state\nprerequisites: [\n {\n endpoint: { path: \"/orders/{orderId}/status\", method: \"get\" },\n description: \"Order must be in 'pending_payment' status\",\n },\n];\n```\n\n### Hierarchical Dependencies\n\n```typescript\n// Before accessing a deeply nested resource\nprerequisites: [\n {\n endpoint: { path: \"/projects/{projectId}\", method: \"get\" },\n description: \"Project must exist\",\n },\n {\n endpoint: {\n path: \"/projects/{projectId}/tasks/{taskId}\",\n method: \"get\",\n },\n description: \"Task must exist within the project\",\n },\n];\n```\n\n## Important Guidelines\n\n1. **Order Matters**: Prerequisites are executed in array order\n2. **Parameter Inheritance**: Path parameters from prerequisites can be used\n in the main operation\n3. **Error Handling**: Failed prerequisites should prevent main operation\n4. **Performance**: Consider caching prerequisite results when appropriate\n5. **Documentation**: Each prerequisite must have a clear description\n explaining why it's required\n6. **No Authentication**: NEVER use prerequisites for authentication checks\n\n## Test Generation Impact\n\nThe Test Agent uses prerequisites to:\n\n- Generate proper test setup sequences\n- Create valid test data in the correct order\n- Ensure test scenarios follow realistic workflows\n- Validate error handling when prerequisites fail",
|
|
649
650
|
type: "array",
|
|
650
651
|
items: {
|
|
651
652
|
$ref: "#/$defs/AutoBeOpenApi.IPrerequisite"
|
|
@@ -675,7 +676,7 @@ const collection = {
|
|
|
675
676
|
"parameters",
|
|
676
677
|
"requestBody",
|
|
677
678
|
"responseBody",
|
|
678
|
-
"
|
|
679
|
+
"authorizationActor",
|
|
679
680
|
"name",
|
|
680
681
|
"prerequisites",
|
|
681
682
|
"path",
|
|
@@ -801,7 +802,30 @@ const collection = {
|
|
|
801
802
|
properties: {
|
|
802
803
|
format: {
|
|
803
804
|
description: "Format restriction.",
|
|
804
|
-
type: "string"
|
|
805
|
+
type: "string",
|
|
806
|
+
"enum": [
|
|
807
|
+
"date-time",
|
|
808
|
+
"password",
|
|
809
|
+
"regex",
|
|
810
|
+
"uuid",
|
|
811
|
+
"email",
|
|
812
|
+
"hostname",
|
|
813
|
+
"idn-email",
|
|
814
|
+
"idn-hostname",
|
|
815
|
+
"iri",
|
|
816
|
+
"iri-reference",
|
|
817
|
+
"ipv4",
|
|
818
|
+
"ipv6",
|
|
819
|
+
"uri",
|
|
820
|
+
"uri-reference",
|
|
821
|
+
"uri-template",
|
|
822
|
+
"url",
|
|
823
|
+
"date",
|
|
824
|
+
"time",
|
|
825
|
+
"duration",
|
|
826
|
+
"json-pointer",
|
|
827
|
+
"relative-json-pointer"
|
|
828
|
+
]
|
|
805
829
|
},
|
|
806
830
|
pattern: {
|
|
807
831
|
description: "Pattern restriction.",
|
|
@@ -868,7 +892,7 @@ const collection = {
|
|
|
868
892
|
]
|
|
869
893
|
},
|
|
870
894
|
"AutoBeOpenApi.IPrerequisite": {
|
|
871
|
-
description: "Prerequisite API operation dependency.\n\n`IPrerequisite` defines a dependency relationship between API operations,\nspecifying that certain endpoints must be successfully called before the\ncurrent operation can proceed. This ensures proper resource validation,\nstate checking, and data availability in complex API workflows.\n\n## CRITICAL WARNING: Authentication is NOT a Prerequisite\n\n**NEVER use prerequisites for authentication or authorization checks!**\n\nPrerequisites are ONLY for business logic dependencies such as:\n\n- Checking if a resource exists\n- Verifying resource state\n- Loading required data\n\nDo NOT create prerequisites for:\n\n- Login/authentication endpoints\n- Token validation\n- Permission checks\n- User authorization verification\n\nAuthentication is handled separately via the `
|
|
895
|
+
description: "Prerequisite API operation dependency.\n\n`IPrerequisite` defines a dependency relationship between API operations,\nspecifying that certain endpoints must be successfully called before the\ncurrent operation can proceed. This ensures proper resource validation,\nstate checking, and data availability in complex API workflows.\n\n## CRITICAL WARNING: Authentication is NOT a Prerequisite\n\n**NEVER use prerequisites for authentication or authorization checks!**\n\nPrerequisites are ONLY for business logic dependencies such as:\n\n- Checking if a resource exists\n- Verifying resource state\n- Loading required data\n\nDo NOT create prerequisites for:\n\n- Login/authentication endpoints\n- Token validation\n- Permission checks\n- User authorization verification\n\nAuthentication is handled separately via the `authorizationActor` field on\nthe operation itself. Mixing authentication with business prerequisites\ncreates confusion and incorrect test scenarios.\n\n## Core Concept\n\nPrerequisites create an execution dependency graph for API operations. They\nexplicitly declare which APIs must succeed before attempting the current\noperation, preventing invalid states and ensuring data consistency.\n\n## Structure\n\nEach prerequisite consists of:\n\n1. **endpoint**: The API endpoint that must be called first\n2. **description**: Clear explanation of why this prerequisite is required\n\n## Common Use Cases\n\n### 1. Resource Existence Validation\n\n```typescript\n{\n \"endpoint\": { \"path\": \"/users/{userId}\", \"method\": \"get\" },\n \"description\": \"User must exist before updating their profile\"\n}\n```\n\n### 2. Parent-Child Relationships\n\n```typescript\n{\n \"endpoint\": { \"path\": \"/posts/{postId}\", \"method\": \"get\" },\n \"description\": \"Post must exist before adding comments\"\n}\n```\n\n### 3. State Prerequisites\n\n```typescript\n{\n \"endpoint\": { \"path\": \"/orders/{orderId}/status\", \"method\": \"get\" },\n \"description\": \"Order must be in 'confirmed' state before shipping\"\n}\n```\n\n### 4. Business Logic Dependencies\n\n```typescript\n{\n \"endpoint\": {\n \"path\": \"/inventory/{productId}/stock\",\n \"method\": \"get\"\n },\n \"description\": \"Product must have sufficient stock before creating order\"\n}\n```\n\n## Implementation Guidelines\n\n1. **Clear Descriptions**: Always explain WHY the prerequisite is needed\n2. **Minimal Dependencies**: Only include truly necessary prerequisites\n3. **Logical Order**: If multiple prerequisites exist, order them logically\n4. **Error Context**: Description should help understand failure scenarios\n5. **No Authentication**: Prerequisites must NEVER be authentication checks\n\n## Test Generation Usage\n\nThe Test Agent utilizes prerequisites to:\n\n- Set up test data in the correct sequence\n- Generate realistic test scenarios\n- Create both positive and negative test cases\n- Ensure proper cleanup in reverse dependency order\n\n## Best Practices\n\n- Keep prerequisite chains as short as possible for performance\n- Consider caching prerequisite results when safe to do so\n- Ensure prerequisite descriptions are specific, not generic\n- Validate that circular dependencies don't exist\n- Document any side effects of prerequisite calls\n- NEVER use for authentication/authorization validation\n\n### Description of {@link endpoint} property:\n\n> The API endpoint that must be called before the main operation.\n> \n> This specifies the exact HTTP method and path of the prerequisite API.\n> The endpoint must be a valid operation defined elsewhere in the API\n> specification. Path parameters in the prerequisite endpoint can reference\n> the same parameters available in the main operation.",
|
|
872
896
|
type: "object",
|
|
873
897
|
properties: {
|
|
874
898
|
endpoint: {
|
|
@@ -912,7 +936,7 @@ const collection = {
|
|
|
912
936
|
}
|
|
913
937
|
},
|
|
914
938
|
description: "Creates an authorization Operations for the given roles\n\nThis method generates an OpenAPI interface that defines the authorization\nrequirements for the given roles. It ensures that the interface reflects\nthe correct permissions and access levels for each role.",
|
|
915
|
-
validate: (() => { const _io0 = input => Array.isArray(input.operations) && (1 <= input.operations.length && input.operations.every(elem => "object" === typeof elem && null !== elem && _io1(elem))); const _io1 = input => "string" === typeof input.specification && (null === input.authorizationType || "login" === input.authorizationType || "join" === input.authorizationType || "refresh" === input.authorizationType) && "string" === typeof input.description && "string" === typeof input.summary && (Array.isArray(input.parameters) && input.parameters.every(elem => "object" === typeof elem && null !== elem && _io2(elem))) && (null === input.requestBody || "object" === typeof input.requestBody && null !== input.requestBody && _io6(input.requestBody)) && (null === input.responseBody || "object" === typeof input.responseBody && null !== input.responseBody && _io7(input.responseBody)) && (null === input.
|
|
939
|
+
validate: (() => { const _iv4 = 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 _vv8 = 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 => Array.isArray(input.operations) && (1 <= input.operations.length && input.operations.every(elem => "object" === typeof elem && null !== elem && _io1(elem))); const _io1 = input => "string" === typeof input.specification && (null === input.authorizationType || "login" === input.authorizationType || "join" === input.authorizationType || "refresh" === input.authorizationType) && "string" === typeof input.description && "string" === typeof input.summary && (Array.isArray(input.parameters) && input.parameters.every(elem => "object" === typeof elem && null !== elem && _io2(elem))) && (null === input.requestBody || "object" === typeof input.requestBody && null !== input.requestBody && _io6(input.requestBody)) && (null === input.responseBody || "object" === typeof input.responseBody && null !== input.responseBody && _io7(input.responseBody)) && (null === input.authorizationActor || "string" === typeof input.authorizationActor && (RegExp("^[a-z][a-zA-Z0-9]*$").test(input.authorizationActor) && 1 <= input.authorizationActor.length)) && ("string" === typeof input.name && RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name)) && (Array.isArray(input.prerequisites) && input.prerequisites.every(elem => "object" === typeof elem && null !== elem && _io8(elem))) && ("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 _io2 = 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 && _iu0(input.schema)); const _io3 = 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 _io4 = 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 _io5 = input => (undefined === input.format || true === _iv4.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 _io6 = input => "string" === typeof input.description && "string" === typeof input.typeName; const _io7 = input => "string" === typeof input.description && "string" === typeof input.typeName; const _io8 = input => "object" === typeof input.endpoint && null !== input.endpoint && _io9(input.endpoint) && "string" === typeof input.description; const _io9 = input => "string" === typeof input.path && RegExp("^\\/[a-zA-Z0-9\\/_{}.-]*$").test(input.path) && ("get" === input.method || "post" === input.method || "put" === input.method || "delete" === input.method || "patch" === input.method); const _iu0 = input => (() => {
|
|
916
940
|
if ("number" === input.type)
|
|
917
941
|
return _io4(input);
|
|
918
942
|
else if ("integer" === input.type)
|
|
@@ -929,12 +953,12 @@ const collection = {
|
|
|
929
953
|
path: _path + ".operations",
|
|
930
954
|
expected: "Array<> & MinItems<1>",
|
|
931
955
|
value: input.operations
|
|
932
|
-
})) && input.operations.map((elem,
|
|
933
|
-
path: _path + ".operations[" +
|
|
956
|
+
})) && input.operations.map((elem, _index5) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
957
|
+
path: _path + ".operations[" + _index5 + "]",
|
|
934
958
|
expected: "AutoBeOpenApi.IOperation",
|
|
935
959
|
value: elem
|
|
936
|
-
})) && _vo1(elem, _path + ".operations[" +
|
|
937
|
-
path: _path + ".operations[" +
|
|
960
|
+
})) && _vo1(elem, _path + ".operations[" + _index5 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
961
|
+
path: _path + ".operations[" + _index5 + "]",
|
|
938
962
|
expected: "AutoBeOpenApi.IOperation",
|
|
939
963
|
value: elem
|
|
940
964
|
})).every(flag => flag)) || _report(_exceptionable, {
|
|
@@ -961,12 +985,12 @@ const collection = {
|
|
|
961
985
|
path: _path + ".parameters",
|
|
962
986
|
expected: "Array<AutoBeOpenApi.IParameter>",
|
|
963
987
|
value: input.parameters
|
|
964
|
-
})) && input.parameters.map((elem,
|
|
965
|
-
path: _path + ".parameters[" +
|
|
988
|
+
})) && input.parameters.map((elem, _index6) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
989
|
+
path: _path + ".parameters[" + _index6 + "]",
|
|
966
990
|
expected: "AutoBeOpenApi.IParameter",
|
|
967
991
|
value: elem
|
|
968
|
-
})) && _vo2(elem, _path + ".parameters[" +
|
|
969
|
-
path: _path + ".parameters[" +
|
|
992
|
+
})) && _vo2(elem, _path + ".parameters[" + _index6 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
993
|
+
path: _path + ".parameters[" + _index6 + "]",
|
|
970
994
|
expected: "AutoBeOpenApi.IParameter",
|
|
971
995
|
value: elem
|
|
972
996
|
})).every(flag => flag) || _report(_exceptionable, {
|
|
@@ -989,18 +1013,18 @@ const collection = {
|
|
|
989
1013
|
path: _path + ".responseBody",
|
|
990
1014
|
expected: "(AutoBeOpenApi.IResponseBody | null)",
|
|
991
1015
|
value: input.responseBody
|
|
992
|
-
}), null === input.
|
|
993
|
-
path: _path + ".
|
|
1016
|
+
}), null === input.authorizationActor || "string" === typeof input.authorizationActor && (RegExp("^[a-z][a-zA-Z0-9]*$").test(input.authorizationActor) || _report(_exceptionable, {
|
|
1017
|
+
path: _path + ".authorizationActor",
|
|
994
1018
|
expected: "string & CamelCasePattern",
|
|
995
|
-
value: input.
|
|
996
|
-
})) && (1 <= input.
|
|
997
|
-
path: _path + ".
|
|
1019
|
+
value: input.authorizationActor
|
|
1020
|
+
})) && (1 <= input.authorizationActor.length || _report(_exceptionable, {
|
|
1021
|
+
path: _path + ".authorizationActor",
|
|
998
1022
|
expected: "string & MinLength<1>",
|
|
999
|
-
value: input.
|
|
1023
|
+
value: input.authorizationActor
|
|
1000
1024
|
})) || _report(_exceptionable, {
|
|
1001
|
-
path: _path + ".
|
|
1025
|
+
path: _path + ".authorizationActor",
|
|
1002
1026
|
expected: "((string & CamelCasePattern & MinLength<1>) | null)",
|
|
1003
|
-
value: input.
|
|
1027
|
+
value: input.authorizationActor
|
|
1004
1028
|
}), "string" === typeof input.name && (RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name) || _report(_exceptionable, {
|
|
1005
1029
|
path: _path + ".name",
|
|
1006
1030
|
expected: "string & CamelCasePattern",
|
|
@@ -1013,12 +1037,12 @@ const collection = {
|
|
|
1013
1037
|
path: _path + ".prerequisites",
|
|
1014
1038
|
expected: "Array<AutoBeOpenApi.IPrerequisite>",
|
|
1015
1039
|
value: input.prerequisites
|
|
1016
|
-
})) && input.prerequisites.map((elem,
|
|
1017
|
-
path: _path + ".prerequisites[" +
|
|
1040
|
+
})) && input.prerequisites.map((elem, _index7) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
1041
|
+
path: _path + ".prerequisites[" + _index7 + "]",
|
|
1018
1042
|
expected: "AutoBeOpenApi.IPrerequisite",
|
|
1019
1043
|
value: elem
|
|
1020
|
-
})) && _vo8(elem, _path + ".prerequisites[" +
|
|
1021
|
-
path: _path + ".prerequisites[" +
|
|
1044
|
+
})) && _vo8(elem, _path + ".prerequisites[" + _index7 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
1045
|
+
path: _path + ".prerequisites[" + _index7 + "]",
|
|
1022
1046
|
expected: "AutoBeOpenApi.IPrerequisite",
|
|
1023
1047
|
value: elem
|
|
1024
1048
|
})).every(flag => flag) || _report(_exceptionable, {
|
|
@@ -1125,9 +1149,9 @@ const collection = {
|
|
|
1125
1149
|
path: _path + ".type",
|
|
1126
1150
|
expected: "\"number\"",
|
|
1127
1151
|
value: input.type
|
|
1128
|
-
})].every(flag => flag); const _vo5 = (input, _path, _exceptionable = true) => [undefined === input.format ||
|
|
1152
|
+
})].every(flag => flag); const _vo5 = (input, _path, _exceptionable = true) => [undefined === input.format || true === _vv8.has(input.format) || _report(_exceptionable, {
|
|
1129
1153
|
path: _path + ".format",
|
|
1130
|
-
expected: "(
|
|
1154
|
+
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)",
|
|
1131
1155
|
value: input.format
|
|
1132
1156
|
}), undefined === input.pattern || "string" === typeof input.pattern || _report(_exceptionable, {
|
|
1133
1157
|
path: _path + ".pattern",
|
|
@@ -1338,8 +1362,8 @@ const collection = {
|
|
|
1338
1362
|
}
|
|
1339
1363
|
]
|
|
1340
1364
|
},
|
|
1341
|
-
|
|
1342
|
-
description: "Authorization
|
|
1365
|
+
authorizationActor: {
|
|
1366
|
+
description: "Authorization actor required to access this API operation.\n\nThis field specifies which user actor is allowed to access this endpoint.\nThe actor name must correspond exactly to the actual actors defined in\nyour system's Prisma schema.\n\n## Naming Convention\n\nActor names MUST use camelCase.\n\n## Actor-Based Path Convention\n\nWhen authorizationActor is specified, it should align with the path\nstructure:\n\n- If authorizationActor is \"admin\" \u2192 path might be \"/admin/resources/{id}\"\n- If authorizationActor is \"seller\" \u2192 path might be \"/seller/products\"\n- Special case: For user's own resources, use path prefix \"/my/\" regardless\n of actor\n\n## Important Guidelines\n\n- Set to `null` for public endpoints that require no authentication\n- Set to specific actor string for actor-restricted endpoints\n- The actor name MUST match exactly with the user type/actor defined in the\n database\n- This actor will be used by the Realize Agent to generate appropriate\n decorator and authorization logic in the provider functions\n- The controller will apply the corresponding authentication decorator\n based on this actor\n\n## Examples\n\n- `null` - Public endpoint, no authentication required\n- `\"user\"` - Any authenticated user can access\n- `\"admin\"` - Only admin users can access\n- `\"seller\"` - Only seller users can access\n- `\"moderator\"` - Only moderator users can access\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.",
|
|
1343
1367
|
oneOf: [
|
|
1344
1368
|
{
|
|
1345
1369
|
type: "null"
|
|
@@ -1357,7 +1381,7 @@ const collection = {
|
|
|
1357
1381
|
pattern: "^[a-z][a-zA-Z0-9]*$"
|
|
1358
1382
|
},
|
|
1359
1383
|
prerequisites: {
|
|
1360
|
-
description: "Prerequisites for this API operation.\n\nThe `prerequisites` field defines API operations that must be\nsuccessfully executed before this operation can be performed. This\ncreates an explicit dependency chain between API endpoints, ensuring\nproper execution order and data availability.\n\n## CRITICAL WARNING: Authentication Prerequisites\n\n**NEVER include authentication-related operations as prerequisites!**\nAuthentication is handled separately through the `
|
|
1384
|
+
description: "Prerequisites for this API operation.\n\nThe `prerequisites` field defines API operations that must be\nsuccessfully executed before this operation can be performed. This\ncreates an explicit dependency chain between API endpoints, ensuring\nproper execution order and data availability.\n\n## CRITICAL WARNING: Authentication Prerequisites\n\n**NEVER include authentication-related operations as prerequisites!**\nAuthentication is handled separately through the `authorizationActor`\nfield and should NOT be part of the prerequisite chain. Do NOT add\nprerequisites for:\n\n- Login endpoints\n- Token validation endpoints\n- User authentication checks\n- Permission verification endpoints\n\nPrerequisites are ONLY for business logic dependencies, NOT for\nauthentication/authorization.\n\n## Purpose and Use Cases\n\nPrerequisites are essential for operations that depend on:\n\n1. **Existence Validation**: Ensuring resources exist before manipulation\n2. **State Requirements**: Verifying resources are in the correct state\n3. **Data Dependencies**: Loading necessary data for the current operation\n4. **Business Logic Constraints**: Enforcing domain-specific rules\n\n## Execution Flow\n\nWhen an operation has prerequisites:\n\n1. Each prerequisite API must be called first in the specified order\n2. Prerequisites must return successful responses (2xx status codes)\n3. Only after all prerequisites succeed can the main operation proceed\n4. If any prerequisite fails, the operation should not be attempted\n\n## Common Patterns\n\n### Resource Existence Check\n\n```typescript\n// Before updating an order item, ensure the order exists\nprerequisites: [\n {\n endpoint: { path: \"/orders/{orderId}\", method: \"get\" },\n description: \"Order must exist in the system\",\n },\n];\n```\n\n### State Validation\n\n```typescript\n// Before processing payment, ensure order is in correct state\nprerequisites: [\n {\n endpoint: { path: \"/orders/{orderId}/status\", method: \"get\" },\n description: \"Order must be in 'pending_payment' status\",\n },\n];\n```\n\n### Hierarchical Dependencies\n\n```typescript\n// Before accessing a deeply nested resource\nprerequisites: [\n {\n endpoint: { path: \"/projects/{projectId}\", method: \"get\" },\n description: \"Project must exist\",\n },\n {\n endpoint: {\n path: \"/projects/{projectId}/tasks/{taskId}\",\n method: \"get\",\n },\n description: \"Task must exist within the project\",\n },\n];\n```\n\n## Important Guidelines\n\n1. **Order Matters**: Prerequisites are executed in array order\n2. **Parameter Inheritance**: Path parameters from prerequisites can be used\n in the main operation\n3. **Error Handling**: Failed prerequisites should prevent main operation\n4. **Performance**: Consider caching prerequisite results when appropriate\n5. **Documentation**: Each prerequisite must have a clear description\n explaining why it's required\n6. **No Authentication**: NEVER use prerequisites for authentication checks\n\n## Test Generation Impact\n\nThe Test Agent uses prerequisites to:\n\n- Generate proper test setup sequences\n- Create valid test data in the correct order\n- Ensure test scenarios follow realistic workflows\n- Validate error handling when prerequisites fail",
|
|
1361
1385
|
type: "array",
|
|
1362
1386
|
items: {
|
|
1363
1387
|
$ref: "#/$defs/AutoBeOpenApi.IPrerequisite"
|
|
@@ -1397,7 +1421,7 @@ const collection = {
|
|
|
1397
1421
|
"parameters",
|
|
1398
1422
|
"requestBody",
|
|
1399
1423
|
"responseBody",
|
|
1400
|
-
"
|
|
1424
|
+
"authorizationActor",
|
|
1401
1425
|
"name",
|
|
1402
1426
|
"prerequisites",
|
|
1403
1427
|
"path",
|
|
@@ -1520,7 +1544,71 @@ const collection = {
|
|
|
1520
1544
|
properties: {
|
|
1521
1545
|
format: {
|
|
1522
1546
|
description: "Format restriction.",
|
|
1523
|
-
|
|
1547
|
+
oneOf: [
|
|
1548
|
+
{
|
|
1549
|
+
"const": "date-time"
|
|
1550
|
+
},
|
|
1551
|
+
{
|
|
1552
|
+
"const": "password"
|
|
1553
|
+
},
|
|
1554
|
+
{
|
|
1555
|
+
"const": "regex"
|
|
1556
|
+
},
|
|
1557
|
+
{
|
|
1558
|
+
"const": "uuid"
|
|
1559
|
+
},
|
|
1560
|
+
{
|
|
1561
|
+
"const": "email"
|
|
1562
|
+
},
|
|
1563
|
+
{
|
|
1564
|
+
"const": "hostname"
|
|
1565
|
+
},
|
|
1566
|
+
{
|
|
1567
|
+
"const": "idn-email"
|
|
1568
|
+
},
|
|
1569
|
+
{
|
|
1570
|
+
"const": "idn-hostname"
|
|
1571
|
+
},
|
|
1572
|
+
{
|
|
1573
|
+
"const": "iri"
|
|
1574
|
+
},
|
|
1575
|
+
{
|
|
1576
|
+
"const": "iri-reference"
|
|
1577
|
+
},
|
|
1578
|
+
{
|
|
1579
|
+
"const": "ipv4"
|
|
1580
|
+
},
|
|
1581
|
+
{
|
|
1582
|
+
"const": "ipv6"
|
|
1583
|
+
},
|
|
1584
|
+
{
|
|
1585
|
+
"const": "uri"
|
|
1586
|
+
},
|
|
1587
|
+
{
|
|
1588
|
+
"const": "uri-reference"
|
|
1589
|
+
},
|
|
1590
|
+
{
|
|
1591
|
+
"const": "uri-template"
|
|
1592
|
+
},
|
|
1593
|
+
{
|
|
1594
|
+
"const": "url"
|
|
1595
|
+
},
|
|
1596
|
+
{
|
|
1597
|
+
"const": "date"
|
|
1598
|
+
},
|
|
1599
|
+
{
|
|
1600
|
+
"const": "time"
|
|
1601
|
+
},
|
|
1602
|
+
{
|
|
1603
|
+
"const": "duration"
|
|
1604
|
+
},
|
|
1605
|
+
{
|
|
1606
|
+
"const": "json-pointer"
|
|
1607
|
+
},
|
|
1608
|
+
{
|
|
1609
|
+
"const": "relative-json-pointer"
|
|
1610
|
+
}
|
|
1611
|
+
]
|
|
1524
1612
|
},
|
|
1525
1613
|
pattern: {
|
|
1526
1614
|
description: "Pattern restriction.",
|
|
@@ -1586,7 +1674,7 @@ const collection = {
|
|
|
1586
1674
|
]
|
|
1587
1675
|
},
|
|
1588
1676
|
"AutoBeOpenApi.IPrerequisite": {
|
|
1589
|
-
description: "Prerequisite API operation dependency.\n\n`IPrerequisite` defines a dependency relationship between API operations,\nspecifying that certain endpoints must be successfully called before the\ncurrent operation can proceed. This ensures proper resource validation,\nstate checking, and data availability in complex API workflows.\n\n## CRITICAL WARNING: Authentication is NOT a Prerequisite\n\n**NEVER use prerequisites for authentication or authorization checks!**\n\nPrerequisites are ONLY for business logic dependencies such as:\n\n- Checking if a resource exists\n- Verifying resource state\n- Loading required data\n\nDo NOT create prerequisites for:\n\n- Login/authentication endpoints\n- Token validation\n- Permission checks\n- User authorization verification\n\nAuthentication is handled separately via the `
|
|
1677
|
+
description: "Prerequisite API operation dependency.\n\n`IPrerequisite` defines a dependency relationship between API operations,\nspecifying that certain endpoints must be successfully called before the\ncurrent operation can proceed. This ensures proper resource validation,\nstate checking, and data availability in complex API workflows.\n\n## CRITICAL WARNING: Authentication is NOT a Prerequisite\n\n**NEVER use prerequisites for authentication or authorization checks!**\n\nPrerequisites are ONLY for business logic dependencies such as:\n\n- Checking if a resource exists\n- Verifying resource state\n- Loading required data\n\nDo NOT create prerequisites for:\n\n- Login/authentication endpoints\n- Token validation\n- Permission checks\n- User authorization verification\n\nAuthentication is handled separately via the `authorizationActor` field on\nthe operation itself. Mixing authentication with business prerequisites\ncreates confusion and incorrect test scenarios.\n\n## Core Concept\n\nPrerequisites create an execution dependency graph for API operations. They\nexplicitly declare which APIs must succeed before attempting the current\noperation, preventing invalid states and ensuring data consistency.\n\n## Structure\n\nEach prerequisite consists of:\n\n1. **endpoint**: The API endpoint that must be called first\n2. **description**: Clear explanation of why this prerequisite is required\n\n## Common Use Cases\n\n### 1. Resource Existence Validation\n\n```typescript\n{\n \"endpoint\": { \"path\": \"/users/{userId}\", \"method\": \"get\" },\n \"description\": \"User must exist before updating their profile\"\n}\n```\n\n### 2. Parent-Child Relationships\n\n```typescript\n{\n \"endpoint\": { \"path\": \"/posts/{postId}\", \"method\": \"get\" },\n \"description\": \"Post must exist before adding comments\"\n}\n```\n\n### 3. State Prerequisites\n\n```typescript\n{\n \"endpoint\": { \"path\": \"/orders/{orderId}/status\", \"method\": \"get\" },\n \"description\": \"Order must be in 'confirmed' state before shipping\"\n}\n```\n\n### 4. Business Logic Dependencies\n\n```typescript\n{\n \"endpoint\": {\n \"path\": \"/inventory/{productId}/stock\",\n \"method\": \"get\"\n },\n \"description\": \"Product must have sufficient stock before creating order\"\n}\n```\n\n## Implementation Guidelines\n\n1. **Clear Descriptions**: Always explain WHY the prerequisite is needed\n2. **Minimal Dependencies**: Only include truly necessary prerequisites\n3. **Logical Order**: If multiple prerequisites exist, order them logically\n4. **Error Context**: Description should help understand failure scenarios\n5. **No Authentication**: Prerequisites must NEVER be authentication checks\n\n## Test Generation Usage\n\nThe Test Agent utilizes prerequisites to:\n\n- Set up test data in the correct sequence\n- Generate realistic test scenarios\n- Create both positive and negative test cases\n- Ensure proper cleanup in reverse dependency order\n\n## Best Practices\n\n- Keep prerequisite chains as short as possible for performance\n- Consider caching prerequisite results when safe to do so\n- Ensure prerequisite descriptions are specific, not generic\n- Validate that circular dependencies don't exist\n- Document any side effects of prerequisite calls\n- NEVER use for authentication/authorization validation",
|
|
1590
1678
|
type: "object",
|
|
1591
1679
|
properties: {
|
|
1592
1680
|
endpoint: {
|
|
@@ -1641,7 +1729,7 @@ const collection = {
|
|
|
1641
1729
|
}
|
|
1642
1730
|
},
|
|
1643
1731
|
description: "Creates an authorization Operations for the given roles\n\nThis method generates an OpenAPI interface that defines the authorization\nrequirements for the given roles. It ensures that the interface reflects\nthe correct permissions and access levels for each role.",
|
|
1644
|
-
validate: (() => { const _io0 = input => Array.isArray(input.operations) && (1 <= input.operations.length && input.operations.every(elem => "object" === typeof elem && null !== elem && _io1(elem))); const _io1 = input => "string" === typeof input.specification && (null === input.authorizationType || "login" === input.authorizationType || "join" === input.authorizationType || "refresh" === input.authorizationType) && "string" === typeof input.description && "string" === typeof input.summary && (Array.isArray(input.parameters) && input.parameters.every(elem => "object" === typeof elem && null !== elem && _io2(elem))) && (null === input.requestBody || "object" === typeof input.requestBody && null !== input.requestBody && _io6(input.requestBody)) && (null === input.responseBody || "object" === typeof input.responseBody && null !== input.responseBody && _io7(input.responseBody)) && (null === input.
|
|
1732
|
+
validate: (() => { const _iv4 = 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 _vv8 = 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 => Array.isArray(input.operations) && (1 <= input.operations.length && input.operations.every(elem => "object" === typeof elem && null !== elem && _io1(elem))); const _io1 = input => "string" === typeof input.specification && (null === input.authorizationType || "login" === input.authorizationType || "join" === input.authorizationType || "refresh" === input.authorizationType) && "string" === typeof input.description && "string" === typeof input.summary && (Array.isArray(input.parameters) && input.parameters.every(elem => "object" === typeof elem && null !== elem && _io2(elem))) && (null === input.requestBody || "object" === typeof input.requestBody && null !== input.requestBody && _io6(input.requestBody)) && (null === input.responseBody || "object" === typeof input.responseBody && null !== input.responseBody && _io7(input.responseBody)) && (null === input.authorizationActor || "string" === typeof input.authorizationActor && (RegExp("^[a-z][a-zA-Z0-9]*$").test(input.authorizationActor) && 1 <= input.authorizationActor.length)) && ("string" === typeof input.name && RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name)) && (Array.isArray(input.prerequisites) && input.prerequisites.every(elem => "object" === typeof elem && null !== elem && _io8(elem))) && ("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 _io2 = 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 && _iu0(input.schema)); const _io3 = 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 _io4 = 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 _io5 = input => (undefined === input.format || true === _iv4.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 _io6 = input => "string" === typeof input.description && "string" === typeof input.typeName; const _io7 = input => "string" === typeof input.description && "string" === typeof input.typeName; const _io8 = input => "object" === typeof input.endpoint && null !== input.endpoint && _io9(input.endpoint) && "string" === typeof input.description; const _io9 = input => "string" === typeof input.path && RegExp("^\\/[a-zA-Z0-9\\/_{}.-]*$").test(input.path) && ("get" === input.method || "post" === input.method || "put" === input.method || "delete" === input.method || "patch" === input.method); const _iu0 = input => (() => {
|
|
1645
1733
|
if ("number" === input.type)
|
|
1646
1734
|
return _io4(input);
|
|
1647
1735
|
else if ("integer" === input.type)
|
|
@@ -1658,12 +1746,12 @@ const collection = {
|
|
|
1658
1746
|
path: _path + ".operations",
|
|
1659
1747
|
expected: "Array<> & MinItems<1>",
|
|
1660
1748
|
value: input.operations
|
|
1661
|
-
})) && input.operations.map((elem,
|
|
1662
|
-
path: _path + ".operations[" +
|
|
1749
|
+
})) && input.operations.map((elem, _index5) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
1750
|
+
path: _path + ".operations[" + _index5 + "]",
|
|
1663
1751
|
expected: "AutoBeOpenApi.IOperation",
|
|
1664
1752
|
value: elem
|
|
1665
|
-
})) && _vo1(elem, _path + ".operations[" +
|
|
1666
|
-
path: _path + ".operations[" +
|
|
1753
|
+
})) && _vo1(elem, _path + ".operations[" + _index5 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
1754
|
+
path: _path + ".operations[" + _index5 + "]",
|
|
1667
1755
|
expected: "AutoBeOpenApi.IOperation",
|
|
1668
1756
|
value: elem
|
|
1669
1757
|
})).every(flag => flag)) || _report(_exceptionable, {
|
|
@@ -1690,12 +1778,12 @@ const collection = {
|
|
|
1690
1778
|
path: _path + ".parameters",
|
|
1691
1779
|
expected: "Array<AutoBeOpenApi.IParameter>",
|
|
1692
1780
|
value: input.parameters
|
|
1693
|
-
})) && input.parameters.map((elem,
|
|
1694
|
-
path: _path + ".parameters[" +
|
|
1781
|
+
})) && input.parameters.map((elem, _index6) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
1782
|
+
path: _path + ".parameters[" + _index6 + "]",
|
|
1695
1783
|
expected: "AutoBeOpenApi.IParameter",
|
|
1696
1784
|
value: elem
|
|
1697
|
-
})) && _vo2(elem, _path + ".parameters[" +
|
|
1698
|
-
path: _path + ".parameters[" +
|
|
1785
|
+
})) && _vo2(elem, _path + ".parameters[" + _index6 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
1786
|
+
path: _path + ".parameters[" + _index6 + "]",
|
|
1699
1787
|
expected: "AutoBeOpenApi.IParameter",
|
|
1700
1788
|
value: elem
|
|
1701
1789
|
})).every(flag => flag) || _report(_exceptionable, {
|
|
@@ -1718,18 +1806,18 @@ const collection = {
|
|
|
1718
1806
|
path: _path + ".responseBody",
|
|
1719
1807
|
expected: "(AutoBeOpenApi.IResponseBody | null)",
|
|
1720
1808
|
value: input.responseBody
|
|
1721
|
-
}), null === input.
|
|
1722
|
-
path: _path + ".
|
|
1809
|
+
}), null === input.authorizationActor || "string" === typeof input.authorizationActor && (RegExp("^[a-z][a-zA-Z0-9]*$").test(input.authorizationActor) || _report(_exceptionable, {
|
|
1810
|
+
path: _path + ".authorizationActor",
|
|
1723
1811
|
expected: "string & CamelCasePattern",
|
|
1724
|
-
value: input.
|
|
1725
|
-
})) && (1 <= input.
|
|
1726
|
-
path: _path + ".
|
|
1812
|
+
value: input.authorizationActor
|
|
1813
|
+
})) && (1 <= input.authorizationActor.length || _report(_exceptionable, {
|
|
1814
|
+
path: _path + ".authorizationActor",
|
|
1727
1815
|
expected: "string & MinLength<1>",
|
|
1728
|
-
value: input.
|
|
1816
|
+
value: input.authorizationActor
|
|
1729
1817
|
})) || _report(_exceptionable, {
|
|
1730
|
-
path: _path + ".
|
|
1818
|
+
path: _path + ".authorizationActor",
|
|
1731
1819
|
expected: "((string & CamelCasePattern & MinLength<1>) | null)",
|
|
1732
|
-
value: input.
|
|
1820
|
+
value: input.authorizationActor
|
|
1733
1821
|
}), "string" === typeof input.name && (RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name) || _report(_exceptionable, {
|
|
1734
1822
|
path: _path + ".name",
|
|
1735
1823
|
expected: "string & CamelCasePattern",
|
|
@@ -1742,12 +1830,12 @@ const collection = {
|
|
|
1742
1830
|
path: _path + ".prerequisites",
|
|
1743
1831
|
expected: "Array<AutoBeOpenApi.IPrerequisite>",
|
|
1744
1832
|
value: input.prerequisites
|
|
1745
|
-
})) && input.prerequisites.map((elem,
|
|
1746
|
-
path: _path + ".prerequisites[" +
|
|
1833
|
+
})) && input.prerequisites.map((elem, _index7) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
1834
|
+
path: _path + ".prerequisites[" + _index7 + "]",
|
|
1747
1835
|
expected: "AutoBeOpenApi.IPrerequisite",
|
|
1748
1836
|
value: elem
|
|
1749
|
-
})) && _vo8(elem, _path + ".prerequisites[" +
|
|
1750
|
-
path: _path + ".prerequisites[" +
|
|
1837
|
+
})) && _vo8(elem, _path + ".prerequisites[" + _index7 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
1838
|
+
path: _path + ".prerequisites[" + _index7 + "]",
|
|
1751
1839
|
expected: "AutoBeOpenApi.IPrerequisite",
|
|
1752
1840
|
value: elem
|
|
1753
1841
|
})).every(flag => flag) || _report(_exceptionable, {
|
|
@@ -1854,9 +1942,9 @@ const collection = {
|
|
|
1854
1942
|
path: _path + ".type",
|
|
1855
1943
|
expected: "\"number\"",
|
|
1856
1944
|
value: input.type
|
|
1857
|
-
})].every(flag => flag); const _vo5 = (input, _path, _exceptionable = true) => [undefined === input.format ||
|
|
1945
|
+
})].every(flag => flag); const _vo5 = (input, _path, _exceptionable = true) => [undefined === input.format || true === _vv8.has(input.format) || _report(_exceptionable, {
|
|
1858
1946
|
path: _path + ".format",
|
|
1859
|
-
expected: "(
|
|
1947
|
+
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)",
|
|
1860
1948
|
value: input.format
|
|
1861
1949
|
}), undefined === input.pattern || "string" === typeof input.pattern || _report(_exceptionable, {
|
|
1862
1950
|
path: _path + ".pattern",
|