@autobe/agent 0.18.0 → 0.19.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/AutoBeMockAgent.d.ts +2 -10
- package/lib/agent/src/AutoBeAgent.js +5 -0
- package/lib/agent/src/AutoBeAgent.js.map +1 -1
- package/lib/agent/src/AutoBeMockAgent.d.ts +2 -10
- package/lib/agent/src/AutoBeMockAgent.js +7 -2
- package/lib/agent/src/AutoBeMockAgent.js.map +1 -1
- package/lib/agent/src/constants/AutoBeSystemPromptConstant.d.ts +23 -29
- package/lib/agent/src/constants/AutoBeSystemPromptConstant.js.map +1 -1
- package/lib/agent/src/context/AutoBeTokenUsageComponent.d.ts +1 -0
- package/lib/agent/src/context/AutoBeTokenUsageComponent.js +14 -0
- package/lib/agent/src/context/AutoBeTokenUsageComponent.js.map +1 -1
- package/lib/agent/src/factory/consentFunctionCall.d.ts +10 -0
- package/lib/agent/src/factory/consentFunctionCall.js +212 -0
- package/lib/agent/src/factory/consentFunctionCall.js.map +1 -0
- package/lib/agent/src/factory/createAgenticaHistory.js +1 -0
- package/lib/agent/src/factory/createAgenticaHistory.js.map +1 -1
- package/lib/agent/src/factory/createAutoBeContext.js +71 -14
- package/lib/agent/src/factory/createAutoBeContext.js.map +1 -1
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.d.ts +3 -1
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.js +4 -4
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js +1 -1
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.d.ts +3 -1
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.js +16 -4
- package/lib/agent/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyze.js +8 -3
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyze.js.map +1 -1
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeReview.d.ts +2 -3
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeReview.js +7 -7
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeReview.js.map +1 -1
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeScenario.js +24 -37
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeScenario.js.map +1 -1
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeWrite.js +5 -3
- package/lib/agent/src/orchestrate/analyze/orchestrateAnalyzeWrite.js.map +1 -1
- package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.d.ts +16 -16
- package/lib/agent/src/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.d.ts +5 -5
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAssetHistories.js +1 -0
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAssetHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.js +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceComplementHistories.js +3 -3
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceComplementHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.js +2 -10
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceGroupHistories.js +2 -2
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceGroupHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationHistories.js +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js +3 -3
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.js +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.js +9 -3
- package/lib/agent/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterface.js +29 -9
- package/lib/agent/src/orchestrate/interface/orchestrateInterface.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceAuthorizations.d.ts +2 -2
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceAuthorizations.js +1565 -1142
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceAuthorizations.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceComplement.js +22 -4
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceComplement.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceGroups.d.ts +2 -2
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceGroups.js +11 -15
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceGroups.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperations.js +32 -26
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperations.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperationsReview.d.ts +2 -3
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperationsReview.js +135 -124
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceOperationsReview.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemas.js +371 -209
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemas.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemasReview.js +185 -179
- package/lib/agent/src/orchestrate/interface/orchestrateInterfaceSchemasReview.js.map +1 -1
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceComplementApplication.d.ts +38 -0
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.d.ts +16 -16
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.d.ts +59 -14
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.d.ts +37 -1
- package/lib/agent/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.d.ts +46 -14
- package/lib/agent/src/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.d.ts +18 -24
- package/lib/agent/src/orchestrate/interface/utils/validateAuthorizationSchema.d.ts +7 -0
- package/lib/agent/src/orchestrate/interface/utils/validateAuthorizationSchema.js +35 -0
- package/lib/agent/src/orchestrate/interface/utils/validateAuthorizationSchema.js.map +1 -0
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.js +11 -17
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaCorrectHistories.js +1 -1
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaCorrectHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaReviewHistories.js +2 -2
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaReviewHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.js +1 -1
- package/lib/agent/src/orchestrate/prisma/histories/transformPrismaSchemaHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/prisma/orchestratePrisma.js +13 -4
- package/lib/agent/src/orchestrate/prisma/orchestratePrisma.js.map +1 -1
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaComponent.d.ts +1 -2
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaComponent.js +6 -10
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaComponent.js.map +1 -1
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaCorrect.js +35 -2
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaCorrect.js.map +1 -1
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaReview.js +44 -3
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaReview.js.map +1 -1
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaSchemas.js +40 -3
- package/lib/agent/src/orchestrate/prisma/orchestratePrismaSchemas.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorization.js +2 -2
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorization.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.js +5 -5
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeCorrectHistories.d.ts +1 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeCorrectHistories.js +2 -2
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeCorrectHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.d.ts +3 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.js +278 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteHistories.d.ts +5 -2
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteHistories.js +12 -20
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeWriteHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/internal/compile.d.ts +3 -3
- package/lib/agent/src/orchestrate/realize/internal/compile.js +9 -26
- package/lib/agent/src/orchestrate/realize/internal/compile.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/orchestrateRealize.js +59 -42
- package/lib/agent/src/orchestrate/realize/orchestrateRealize.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorization.js +6 -6
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorization.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js +6 -6
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeCorrect.d.ts +8 -1
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeCorrect.js +17 -16
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeCorrect.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeWrite.d.ts +6 -1
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeWrite.js +24 -19
- package/lib/agent/src/orchestrate/realize/orchestrateRealizeWrite.js.map +1 -1
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.d.ts +3 -3
- package/lib/agent/src/orchestrate/realize/structures/{IAutoBeRealizeCoderApplication.js → IAutoBeRealizeCorrectApplication.js} +1 -1
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeCorrectApplication.js.map +1 -0
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.d.ts +19 -16
- package/lib/agent/src/orchestrate/realize/utils/replaceImportStatements.js +5 -1
- package/lib/agent/src/orchestrate/realize/utils/replaceImportStatements.js.map +1 -1
- package/lib/agent/src/orchestrate/test/histories/transformTestCorrectHistories.js +1 -1
- package/lib/agent/src/orchestrate/test/histories/transformTestCorrectHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/test/histories/transformTestScenarioHistories.d.ts +2 -1
- package/lib/agent/src/orchestrate/test/histories/transformTestScenarioHistories.js +95 -50
- package/lib/agent/src/orchestrate/test/histories/transformTestScenarioHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/test/histories/transformTestWriteHistories.js +1 -1
- package/lib/agent/src/orchestrate/test/histories/transformTestWriteHistories.js.map +1 -1
- package/lib/agent/src/orchestrate/test/orchestrateTest.js +12 -0
- package/lib/agent/src/orchestrate/test/orchestrateTest.js.map +1 -1
- package/lib/agent/src/orchestrate/test/orchestrateTestCorrect.js +4 -4
- package/lib/agent/src/orchestrate/test/orchestrateTestScenario.js +119 -16
- package/lib/agent/src/orchestrate/test/orchestrateTestScenario.js.map +1 -1
- package/lib/agent/src/orchestrate/test/orchestrateTestWrite.js.map +1 -1
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestCorrectApplication.d.ts +6 -5
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioApplication.d.ts +1 -1
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioAuthorizationRole.d.ts +6 -0
- package/lib/agent/src/orchestrate/{internal/IProgress.js → test/structures/IAutoBeTestScenarioAuthorizationRole.js} +1 -1
- package/lib/agent/src/orchestrate/test/structures/IAutoBeTestScenarioAuthorizationRole.js.map +1 -0
- package/lib/agent/src/utils/predicateStateMessage.d.ts +4 -0
- package/lib/agent/src/utils/predicateStateMessage.js +87 -0
- package/lib/agent/src/utils/predicateStateMessage.js.map +1 -0
- package/lib/constants/AutoBeSystemPromptConstant.d.ts +23 -29
- package/lib/context/AutoBeTokenUsageComponent.d.ts +1 -0
- package/lib/factory/consentFunctionCall.d.ts +10 -0
- package/lib/index.mjs +3036 -1648
- package/lib/index.mjs.map +1 -1
- package/lib/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.d.ts +3 -1
- package/lib/orchestrate/analyze/histories/transformAnalyzeWriteHistories.d.ts +3 -1
- package/lib/orchestrate/analyze/orchestrateAnalyzeReview.d.ts +2 -3
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.d.ts +16 -16
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.d.ts +5 -5
- package/lib/orchestrate/interface/orchestrateInterfaceAuthorizations.d.ts +2 -2
- package/lib/orchestrate/interface/orchestrateInterfaceGroups.d.ts +2 -2
- package/lib/orchestrate/interface/orchestrateInterfaceOperationsReview.d.ts +2 -3
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceComplementApplication.d.ts +38 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.d.ts +16 -16
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.d.ts +59 -14
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.d.ts +37 -1
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.d.ts +46 -14
- package/lib/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.d.ts +18 -24
- package/lib/orchestrate/interface/utils/validateAuthorizationSchema.d.ts +7 -0
- package/lib/orchestrate/prisma/orchestratePrismaComponent.d.ts +1 -2
- package/lib/orchestrate/realize/histories/transformRealizeCorrectHistories.d.ts +1 -0
- package/lib/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.d.ts +3 -0
- package/lib/orchestrate/realize/histories/transformRealizeWriteHistories.d.ts +5 -2
- package/lib/orchestrate/realize/internal/compile.d.ts +3 -3
- package/lib/orchestrate/realize/orchestrateRealizeCorrect.d.ts +8 -1
- package/lib/orchestrate/realize/orchestrateRealizeWrite.d.ts +6 -1
- package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.d.ts +3 -3
- package/lib/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.d.ts +19 -16
- package/lib/orchestrate/test/histories/transformTestScenarioHistories.d.ts +2 -1
- package/lib/orchestrate/test/structures/IAutoBeTestCorrectApplication.d.ts +6 -5
- package/lib/orchestrate/test/structures/IAutoBeTestScenarioApplication.d.ts +1 -1
- package/lib/orchestrate/test/structures/IAutoBeTestScenarioAuthorizationRole.d.ts +6 -0
- package/lib/utils/predicateStateMessage.d.ts +4 -0
- package/package.json +6 -6
- package/src/AutoBeAgent.ts +14 -0
- package/src/AutoBeMockAgent.ts +9 -11
- package/src/constants/AutoBeSystemPromptConstant.ts +23 -29
- package/src/context/AutoBeTokenUsageComponent.ts +20 -0
- package/src/factory/consentFunctionCall.ts +128 -0
- package/src/factory/createAgenticaHistory.ts +1 -0
- package/src/factory/createAutoBeContext.ts +99 -14
- package/src/orchestrate/analyze/histories/transformAnalyzeReviewerHistories.ts +11 -4
- package/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.ts +26 -4
- package/src/orchestrate/analyze/orchestrateAnalyze.ts +19 -14
- package/src/orchestrate/analyze/orchestrateAnalyzeReview.ts +3 -3
- package/src/orchestrate/analyze/orchestrateAnalyzeScenario.ts +8 -32
- package/src/orchestrate/analyze/orchestrateAnalyzeWrite.ts +5 -3
- package/src/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.ts +16 -16
- package/src/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.ts +5 -5
- package/src/orchestrate/interface/histories/transformInterfaceAssetHistories.ts +1 -0
- package/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.ts +0 -10
- package/src/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.ts +1 -1
- package/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.ts +9 -3
- package/src/orchestrate/interface/orchestrateInterface.ts +51 -12
- package/src/orchestrate/interface/orchestrateInterfaceAuthorizations.ts +126 -23
- package/src/orchestrate/interface/orchestrateInterfaceGroups.ts +6 -19
- package/src/orchestrate/interface/orchestrateInterfaceOperations.ts +32 -27
- package/src/orchestrate/interface/orchestrateInterfaceOperationsReview.ts +49 -32
- package/src/orchestrate/interface/orchestrateInterfaceSchemas.ts +127 -33
- package/src/orchestrate/interface/orchestrateInterfaceSchemasReview.ts +67 -65
- package/src/orchestrate/interface/structures/IAutoBeInterfaceComplementApplication.ts +39 -0
- package/src/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.ts +16 -16
- package/src/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.ts +62 -14
- package/src/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.ts +38 -1
- package/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.ts +47 -14
- package/src/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.ts +18 -24
- package/src/orchestrate/interface/utils/validateAuthorizationSchema.ts +41 -0
- package/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.ts +9 -16
- package/src/orchestrate/prisma/orchestratePrisma.ts +15 -6
- package/src/orchestrate/prisma/orchestratePrismaComponent.ts +6 -19
- package/src/orchestrate/prisma/orchestratePrismaReview.ts +15 -9
- package/src/orchestrate/realize/histories/transformRealizeAuthorization.ts +1 -1
- package/src/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.ts +19 -23
- package/src/orchestrate/realize/histories/transformRealizeCorrectHistories.ts +4 -2
- package/src/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.ts +285 -0
- package/src/orchestrate/realize/histories/transformRealizeWriteHistories.ts +27 -27
- package/src/orchestrate/realize/internal/compile.ts +28 -45
- package/src/orchestrate/realize/orchestrateRealize.ts +71 -67
- package/src/orchestrate/realize/orchestrateRealizeAuthorization.ts +3 -3
- package/src/orchestrate/realize/orchestrateRealizeCorrect.ts +19 -15
- package/src/orchestrate/realize/orchestrateRealizeWrite.ts +23 -15
- package/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.ts +3 -3
- package/src/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.ts +19 -16
- package/src/orchestrate/realize/utils/replaceImportStatements.ts +7 -0
- package/src/orchestrate/test/histories/transformTestScenarioHistories.ts +110 -59
- package/src/orchestrate/test/orchestrateTest.ts +12 -0
- package/src/orchestrate/test/orchestrateTestScenario.ts +155 -19
- package/src/orchestrate/test/orchestrateTestWrite.ts +3 -3
- package/src/orchestrate/test/structures/IAutoBeTestCorrectApplication.ts +6 -5
- package/src/orchestrate/test/structures/IAutoBeTestScenarioApplication.ts +1 -1
- package/src/orchestrate/test/structures/IAutoBeTestScenarioAuthorizationRole.ts +7 -0
- package/src/utils/predicateStateMessage.ts +107 -0
- package/lib/agent/src/orchestrate/internal/IProgress.d.ts +0 -4
- package/lib/agent/src/orchestrate/internal/IProgress.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeCoderHistories.d.ts +0 -7
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeCoderHistories.js +0 -213
- package/lib/agent/src/orchestrate/realize/histories/transformRealizeCoderHistories.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.d.ts +0 -345
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeCompile.d.ts +0 -56
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeCompile.js +0 -3
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeCompile.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeFailedSymbol.d.ts +0 -2
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeFailedSymbol.js +0 -5
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeFailedSymbol.js.map +0 -1
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeReviewApplication.js +0 -3
- package/lib/agent/src/orchestrate/realize/structures/IAutoBeRealizeReviewApplication.js.map +0 -1
- package/lib/agent/src/utils/pipe.d.ts +0 -5
- package/lib/agent/src/utils/pipe.js +0 -14
- package/lib/agent/src/utils/pipe.js.map +0 -1
- package/lib/orchestrate/internal/IProgress.d.ts +0 -4
- package/lib/orchestrate/realize/histories/transformRealizeCoderHistories.d.ts +0 -7
- package/lib/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.d.ts +0 -345
- package/lib/orchestrate/realize/structures/IAutoBeRealizeCompile.d.ts +0 -56
- package/lib/orchestrate/realize/structures/IAutoBeRealizeFailedSymbol.d.ts +0 -2
- package/lib/utils/pipe.d.ts +0 -5
- package/src/orchestrate/internal/IProgress.ts +0 -4
- package/src/orchestrate/realize/histories/transformRealizeCoderHistories.ts +0 -248
- package/src/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.ts +0 -358
- package/src/orchestrate/realize/structures/IAutoBeRealizeCompile.ts +0 -70
- package/src/orchestrate/realize/structures/IAutoBeRealizeFailedSymbol.ts +0 -2
- package/src/utils/pipe.ts +0 -39
- /package/lib/agent/src/orchestrate/realize/structures/{IAutoBeRealizeReviewApplication.d.ts → IAutoBeRealizeCorrectApplication.d.ts} +0 -0
- /package/lib/orchestrate/realize/structures/{IAutoBeRealizeReviewApplication.d.ts → IAutoBeRealizeCorrectApplication.d.ts} +0 -0
- /package/src/orchestrate/realize/structures/{IAutoBeRealizeReviewApplication.ts → IAutoBeRealizeCorrectApplication.ts} +0 -0
|
@@ -47,6 +47,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
47
47
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
48
|
exports.orchestrateInterfaceAuthorizations = orchestrateInterfaceAuthorizations;
|
|
49
49
|
const __typia_transform__validateReport = __importStar(require("typia/lib/internal/_validateReport.js"));
|
|
50
|
+
const __typia_transform__llmApplicationFinalize = __importStar(require("typia/lib/internal/_llmApplicationFinalize.js"));
|
|
51
|
+
const utils_1 = require("@autobe/utils");
|
|
50
52
|
const typia_1 = __importDefault(require("typia"));
|
|
51
53
|
const assertSchemaModel_1 = require("../../context/assertSchemaModel");
|
|
52
54
|
const transformInterfaceAuthorizationsHistories_1 = require("./histories/transformInterfaceAuthorizationsHistories");
|
|
@@ -58,12 +60,15 @@ function orchestrateInterfaceAuthorizations(ctx) {
|
|
|
58
60
|
total: roles.length,
|
|
59
61
|
completed: 0,
|
|
60
62
|
};
|
|
61
|
-
const
|
|
63
|
+
const authorizations = yield Promise.all(roles.map((role) => __awaiter(this, void 0, void 0, function* () {
|
|
62
64
|
const event = yield process(ctx, role, progress);
|
|
63
65
|
ctx.dispatch(event);
|
|
64
|
-
return
|
|
66
|
+
return {
|
|
67
|
+
role: role.name,
|
|
68
|
+
operations: event.operations,
|
|
69
|
+
};
|
|
65
70
|
})));
|
|
66
|
-
return
|
|
71
|
+
return authorizations;
|
|
67
72
|
});
|
|
68
73
|
}
|
|
69
74
|
function process(ctx, role, progress) {
|
|
@@ -77,6 +82,7 @@ function process(ctx, role, progress) {
|
|
|
77
82
|
histories: (0, transformInterfaceAuthorizationsHistories_1.transformInterfaceAuthorizationsHistories)(ctx.state(), role),
|
|
78
83
|
controller: createController({
|
|
79
84
|
model: ctx.model,
|
|
85
|
+
role: role.name,
|
|
80
86
|
build: (next) => {
|
|
81
87
|
pointer.value = next;
|
|
82
88
|
},
|
|
@@ -99,7 +105,369 @@ function process(ctx, role, progress) {
|
|
|
99
105
|
}
|
|
100
106
|
function createController(props) {
|
|
101
107
|
(0, assertSchemaModel_1.assertSchemaModel)(props.model);
|
|
102
|
-
const
|
|
108
|
+
const validate = (next) => {
|
|
109
|
+
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.authorizationRole || "string" === typeof input.authorizationRole && (RegExp("^[a-z][a-zA-Z0-9]*$").test(input.authorizationRole) && 1 <= input.authorizationRole.length)) && ("string" === typeof input.name && RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name)) && ("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 || "string" === typeof 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 _iu0 = input => (() => {
|
|
110
|
+
if ("number" === input.type)
|
|
111
|
+
return _io4(input);
|
|
112
|
+
else if ("integer" === input.type)
|
|
113
|
+
return _io3(input);
|
|
114
|
+
else if ("string" === input.type)
|
|
115
|
+
return _io5(input);
|
|
116
|
+
else
|
|
117
|
+
return false;
|
|
118
|
+
})(); const _vo0 = (input, _path, _exceptionable = true) => [(Array.isArray(input.operations) || _report(_exceptionable, {
|
|
119
|
+
path: _path + ".operations",
|
|
120
|
+
expected: "(Array<AutoBeOpenApi.IOperation> & MinItems<1>)",
|
|
121
|
+
value: input.operations
|
|
122
|
+
})) && ((1 <= input.operations.length || _report(_exceptionable, {
|
|
123
|
+
path: _path + ".operations",
|
|
124
|
+
expected: "Array<> & MinItems<1>",
|
|
125
|
+
value: input.operations
|
|
126
|
+
})) && input.operations.map((elem, _index3) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
127
|
+
path: _path + ".operations[" + _index3 + "]",
|
|
128
|
+
expected: "AutoBeOpenApi.IOperation",
|
|
129
|
+
value: elem
|
|
130
|
+
})) && _vo1(elem, _path + ".operations[" + _index3 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
131
|
+
path: _path + ".operations[" + _index3 + "]",
|
|
132
|
+
expected: "AutoBeOpenApi.IOperation",
|
|
133
|
+
value: elem
|
|
134
|
+
})).every(flag => flag)) || _report(_exceptionable, {
|
|
135
|
+
path: _path + ".operations",
|
|
136
|
+
expected: "(Array<AutoBeOpenApi.IOperation> & MinItems<1>)",
|
|
137
|
+
value: input.operations
|
|
138
|
+
})].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.specification || _report(_exceptionable, {
|
|
139
|
+
path: _path + ".specification",
|
|
140
|
+
expected: "string",
|
|
141
|
+
value: input.specification
|
|
142
|
+
}), null === input.authorizationType || "login" === input.authorizationType || "join" === input.authorizationType || "refresh" === input.authorizationType || _report(_exceptionable, {
|
|
143
|
+
path: _path + ".authorizationType",
|
|
144
|
+
expected: "(\"join\" | \"login\" | \"refresh\" | null)",
|
|
145
|
+
value: input.authorizationType
|
|
146
|
+
}), "string" === typeof input.description || _report(_exceptionable, {
|
|
147
|
+
path: _path + ".description",
|
|
148
|
+
expected: "string",
|
|
149
|
+
value: input.description
|
|
150
|
+
}), "string" === typeof input.summary || _report(_exceptionable, {
|
|
151
|
+
path: _path + ".summary",
|
|
152
|
+
expected: "string",
|
|
153
|
+
value: input.summary
|
|
154
|
+
}), (Array.isArray(input.parameters) || _report(_exceptionable, {
|
|
155
|
+
path: _path + ".parameters",
|
|
156
|
+
expected: "Array<AutoBeOpenApi.IParameter>",
|
|
157
|
+
value: input.parameters
|
|
158
|
+
})) && input.parameters.map((elem, _index4) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
159
|
+
path: _path + ".parameters[" + _index4 + "]",
|
|
160
|
+
expected: "AutoBeOpenApi.IParameter",
|
|
161
|
+
value: elem
|
|
162
|
+
})) && _vo2(elem, _path + ".parameters[" + _index4 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
163
|
+
path: _path + ".parameters[" + _index4 + "]",
|
|
164
|
+
expected: "AutoBeOpenApi.IParameter",
|
|
165
|
+
value: elem
|
|
166
|
+
})).every(flag => flag) || _report(_exceptionable, {
|
|
167
|
+
path: _path + ".parameters",
|
|
168
|
+
expected: "Array<AutoBeOpenApi.IParameter>",
|
|
169
|
+
value: input.parameters
|
|
170
|
+
}), null === input.requestBody || ("object" === typeof input.requestBody && null !== input.requestBody || _report(_exceptionable, {
|
|
171
|
+
path: _path + ".requestBody",
|
|
172
|
+
expected: "(AutoBeOpenApi.IRequestBody | null)",
|
|
173
|
+
value: input.requestBody
|
|
174
|
+
})) && _vo6(input.requestBody, _path + ".requestBody", true && _exceptionable) || _report(_exceptionable, {
|
|
175
|
+
path: _path + ".requestBody",
|
|
176
|
+
expected: "(AutoBeOpenApi.IRequestBody | null)",
|
|
177
|
+
value: input.requestBody
|
|
178
|
+
}), null === input.responseBody || ("object" === typeof input.responseBody && null !== input.responseBody || _report(_exceptionable, {
|
|
179
|
+
path: _path + ".responseBody",
|
|
180
|
+
expected: "(AutoBeOpenApi.IResponseBody | null)",
|
|
181
|
+
value: input.responseBody
|
|
182
|
+
})) && _vo7(input.responseBody, _path + ".responseBody", true && _exceptionable) || _report(_exceptionable, {
|
|
183
|
+
path: _path + ".responseBody",
|
|
184
|
+
expected: "(AutoBeOpenApi.IResponseBody | null)",
|
|
185
|
+
value: input.responseBody
|
|
186
|
+
}), null === input.authorizationRole || "string" === typeof input.authorizationRole && (RegExp("^[a-z][a-zA-Z0-9]*$").test(input.authorizationRole) || _report(_exceptionable, {
|
|
187
|
+
path: _path + ".authorizationRole",
|
|
188
|
+
expected: "string & CamelPattern",
|
|
189
|
+
value: input.authorizationRole
|
|
190
|
+
})) && (1 <= input.authorizationRole.length || _report(_exceptionable, {
|
|
191
|
+
path: _path + ".authorizationRole",
|
|
192
|
+
expected: "string & MinLength<1>",
|
|
193
|
+
value: input.authorizationRole
|
|
194
|
+
})) || _report(_exceptionable, {
|
|
195
|
+
path: _path + ".authorizationRole",
|
|
196
|
+
expected: "((string & CamelPattern & MinLength<1>) | null)",
|
|
197
|
+
value: input.authorizationRole
|
|
198
|
+
}), "string" === typeof input.name && (RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name) || _report(_exceptionable, {
|
|
199
|
+
path: _path + ".name",
|
|
200
|
+
expected: "string & CamelPattern",
|
|
201
|
+
value: input.name
|
|
202
|
+
})) || _report(_exceptionable, {
|
|
203
|
+
path: _path + ".name",
|
|
204
|
+
expected: "(string & CamelPattern)",
|
|
205
|
+
value: input.name
|
|
206
|
+
}), "string" === typeof input.path && (RegExp("^\\/[a-zA-Z0-9\\/_{}.-]*$").test(input.path) || _report(_exceptionable, {
|
|
207
|
+
path: _path + ".path",
|
|
208
|
+
expected: "string & Pattern<\"^\\\\/[a-zA-Z0-9\\\\/_{}.-]*$\">",
|
|
209
|
+
value: input.path
|
|
210
|
+
})) || _report(_exceptionable, {
|
|
211
|
+
path: _path + ".path",
|
|
212
|
+
expected: "(string & Pattern<\"^\\\\/[a-zA-Z0-9\\\\/_{}.-]*$\">)",
|
|
213
|
+
value: input.path
|
|
214
|
+
}), "get" === input.method || "post" === input.method || "put" === input.method || "delete" === input.method || "patch" === input.method || _report(_exceptionable, {
|
|
215
|
+
path: _path + ".method",
|
|
216
|
+
expected: "(\"delete\" | \"get\" | \"patch\" | \"post\" | \"put\")",
|
|
217
|
+
value: input.method
|
|
218
|
+
})].every(flag => flag); const _vo2 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name) || _report(_exceptionable, {
|
|
219
|
+
path: _path + ".name",
|
|
220
|
+
expected: "string & CamelPattern",
|
|
221
|
+
value: input.name
|
|
222
|
+
})) || _report(_exceptionable, {
|
|
223
|
+
path: _path + ".name",
|
|
224
|
+
expected: "(string & CamelPattern)",
|
|
225
|
+
value: input.name
|
|
226
|
+
}), "string" === typeof input.description || _report(_exceptionable, {
|
|
227
|
+
path: _path + ".description",
|
|
228
|
+
expected: "string",
|
|
229
|
+
value: input.description
|
|
230
|
+
}), ("object" === typeof input.schema && null !== input.schema || _report(_exceptionable, {
|
|
231
|
+
path: _path + ".schema",
|
|
232
|
+
expected: "(AutoBeOpenApi.IJsonSchema.IInteger | AutoBeOpenApi.IJsonSchema.INumber | AutoBeOpenApi.IJsonSchema.IString)",
|
|
233
|
+
value: input.schema
|
|
234
|
+
})) && _vu0(input.schema, _path + ".schema", true && _exceptionable) || _report(_exceptionable, {
|
|
235
|
+
path: _path + ".schema",
|
|
236
|
+
expected: "(AutoBeOpenApi.IJsonSchema.IInteger | AutoBeOpenApi.IJsonSchema.INumber | AutoBeOpenApi.IJsonSchema.IString)",
|
|
237
|
+
value: input.schema
|
|
238
|
+
})].every(flag => flag); const _vo3 = (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, {
|
|
239
|
+
path: _path + ".minimum",
|
|
240
|
+
expected: "number & Type<\"int64\">",
|
|
241
|
+
value: input.minimum
|
|
242
|
+
})) || _report(_exceptionable, {
|
|
243
|
+
path: _path + ".minimum",
|
|
244
|
+
expected: "((number & Type<\"int64\">) | undefined)",
|
|
245
|
+
value: input.minimum
|
|
246
|
+
}), undefined === input.maximum || "number" === typeof input.maximum && (Math.floor(input.maximum) === input.maximum && -9223372036854776000 <= input.maximum && input.maximum <= 9223372036854776000 || _report(_exceptionable, {
|
|
247
|
+
path: _path + ".maximum",
|
|
248
|
+
expected: "number & Type<\"int64\">",
|
|
249
|
+
value: input.maximum
|
|
250
|
+
})) || _report(_exceptionable, {
|
|
251
|
+
path: _path + ".maximum",
|
|
252
|
+
expected: "((number & Type<\"int64\">) | undefined)",
|
|
253
|
+
value: input.maximum
|
|
254
|
+
}), undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum || _report(_exceptionable, {
|
|
255
|
+
path: _path + ".exclusiveMinimum",
|
|
256
|
+
expected: "(number | undefined)",
|
|
257
|
+
value: input.exclusiveMinimum
|
|
258
|
+
}), undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum || _report(_exceptionable, {
|
|
259
|
+
path: _path + ".exclusiveMaximum",
|
|
260
|
+
expected: "(number | undefined)",
|
|
261
|
+
value: input.exclusiveMaximum
|
|
262
|
+
}), undefined === input.multipleOf || "number" === typeof input.multipleOf && (Math.floor(input.multipleOf) === input.multipleOf && 0 <= input.multipleOf && input.multipleOf <= 18446744073709552000 || _report(_exceptionable, {
|
|
263
|
+
path: _path + ".multipleOf",
|
|
264
|
+
expected: "number & Type<\"uint64\">",
|
|
265
|
+
value: input.multipleOf
|
|
266
|
+
})) && (0 < input.multipleOf || _report(_exceptionable, {
|
|
267
|
+
path: _path + ".multipleOf",
|
|
268
|
+
expected: "number & ExclusiveMinimum<0>",
|
|
269
|
+
value: input.multipleOf
|
|
270
|
+
})) || _report(_exceptionable, {
|
|
271
|
+
path: _path + ".multipleOf",
|
|
272
|
+
expected: "((number & Type<\"uint64\"> & ExclusiveMinimum<0>) | undefined)",
|
|
273
|
+
value: input.multipleOf
|
|
274
|
+
}), "integer" === input.type || _report(_exceptionable, {
|
|
275
|
+
path: _path + ".type",
|
|
276
|
+
expected: "\"integer\"",
|
|
277
|
+
value: input.type
|
|
278
|
+
})].every(flag => flag); const _vo4 = (input, _path, _exceptionable = true) => [undefined === input.minimum || "number" === typeof input.minimum || _report(_exceptionable, {
|
|
279
|
+
path: _path + ".minimum",
|
|
280
|
+
expected: "(number | undefined)",
|
|
281
|
+
value: input.minimum
|
|
282
|
+
}), undefined === input.maximum || "number" === typeof input.maximum || _report(_exceptionable, {
|
|
283
|
+
path: _path + ".maximum",
|
|
284
|
+
expected: "(number | undefined)",
|
|
285
|
+
value: input.maximum
|
|
286
|
+
}), undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum || _report(_exceptionable, {
|
|
287
|
+
path: _path + ".exclusiveMinimum",
|
|
288
|
+
expected: "(number | undefined)",
|
|
289
|
+
value: input.exclusiveMinimum
|
|
290
|
+
}), undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum || _report(_exceptionable, {
|
|
291
|
+
path: _path + ".exclusiveMaximum",
|
|
292
|
+
expected: "(number | undefined)",
|
|
293
|
+
value: input.exclusiveMaximum
|
|
294
|
+
}), undefined === input.multipleOf || "number" === typeof input.multipleOf && (0 < input.multipleOf || _report(_exceptionable, {
|
|
295
|
+
path: _path + ".multipleOf",
|
|
296
|
+
expected: "number & ExclusiveMinimum<0>",
|
|
297
|
+
value: input.multipleOf
|
|
298
|
+
})) || _report(_exceptionable, {
|
|
299
|
+
path: _path + ".multipleOf",
|
|
300
|
+
expected: "((number & ExclusiveMinimum<0>) | undefined)",
|
|
301
|
+
value: input.multipleOf
|
|
302
|
+
}), "number" === input.type || _report(_exceptionable, {
|
|
303
|
+
path: _path + ".type",
|
|
304
|
+
expected: "\"number\"",
|
|
305
|
+
value: input.type
|
|
306
|
+
})].every(flag => flag); const _vo5 = (input, _path, _exceptionable = true) => [undefined === input.format || "string" === typeof input.format || _report(_exceptionable, {
|
|
307
|
+
path: _path + ".format",
|
|
308
|
+
expected: "(string | undefined)",
|
|
309
|
+
value: input.format
|
|
310
|
+
}), undefined === input.pattern || "string" === typeof input.pattern || _report(_exceptionable, {
|
|
311
|
+
path: _path + ".pattern",
|
|
312
|
+
expected: "(string | undefined)",
|
|
313
|
+
value: input.pattern
|
|
314
|
+
}), undefined === input.contentMediaType || "string" === typeof input.contentMediaType || _report(_exceptionable, {
|
|
315
|
+
path: _path + ".contentMediaType",
|
|
316
|
+
expected: "(string | undefined)",
|
|
317
|
+
value: input.contentMediaType
|
|
318
|
+
}), undefined === input.minLength || "number" === typeof input.minLength && (Math.floor(input.minLength) === input.minLength && 0 <= input.minLength && input.minLength <= 18446744073709552000 || _report(_exceptionable, {
|
|
319
|
+
path: _path + ".minLength",
|
|
320
|
+
expected: "number & Type<\"uint64\">",
|
|
321
|
+
value: input.minLength
|
|
322
|
+
})) || _report(_exceptionable, {
|
|
323
|
+
path: _path + ".minLength",
|
|
324
|
+
expected: "((number & Type<\"uint64\">) | undefined)",
|
|
325
|
+
value: input.minLength
|
|
326
|
+
}), undefined === input.maxLength || "number" === typeof input.maxLength && (Math.floor(input.maxLength) === input.maxLength && 0 <= input.maxLength && input.maxLength <= 18446744073709552000 || _report(_exceptionable, {
|
|
327
|
+
path: _path + ".maxLength",
|
|
328
|
+
expected: "number & Type<\"uint64\">",
|
|
329
|
+
value: input.maxLength
|
|
330
|
+
})) || _report(_exceptionable, {
|
|
331
|
+
path: _path + ".maxLength",
|
|
332
|
+
expected: "((number & Type<\"uint64\">) | undefined)",
|
|
333
|
+
value: input.maxLength
|
|
334
|
+
}), "string" === input.type || _report(_exceptionable, {
|
|
335
|
+
path: _path + ".type",
|
|
336
|
+
expected: "\"string\"",
|
|
337
|
+
value: input.type
|
|
338
|
+
})].every(flag => flag); const _vo6 = (input, _path, _exceptionable = true) => ["string" === typeof input.description || _report(_exceptionable, {
|
|
339
|
+
path: _path + ".description",
|
|
340
|
+
expected: "string",
|
|
341
|
+
value: input.description
|
|
342
|
+
}), "string" === typeof input.typeName || _report(_exceptionable, {
|
|
343
|
+
path: _path + ".typeName",
|
|
344
|
+
expected: "string",
|
|
345
|
+
value: input.typeName
|
|
346
|
+
})].every(flag => flag); const _vo7 = (input, _path, _exceptionable = true) => ["string" === typeof input.description || _report(_exceptionable, {
|
|
347
|
+
path: _path + ".description",
|
|
348
|
+
expected: "string",
|
|
349
|
+
value: input.description
|
|
350
|
+
}), "string" === typeof input.typeName || _report(_exceptionable, {
|
|
351
|
+
path: _path + ".typeName",
|
|
352
|
+
expected: "string",
|
|
353
|
+
value: input.typeName
|
|
354
|
+
})].every(flag => flag); const _vu0 = (input, _path, _exceptionable = true) => (() => {
|
|
355
|
+
if ("number" === input.type)
|
|
356
|
+
return _vo4(input, _path, true && _exceptionable);
|
|
357
|
+
else if ("integer" === input.type)
|
|
358
|
+
return _vo3(input, _path, true && _exceptionable);
|
|
359
|
+
else if ("string" === input.type)
|
|
360
|
+
return _vo5(input, _path, true && _exceptionable);
|
|
361
|
+
else
|
|
362
|
+
return _report(_exceptionable, {
|
|
363
|
+
path: _path,
|
|
364
|
+
expected: "(AutoBeOpenApi.IJsonSchema.INumber | AutoBeOpenApi.IJsonSchema.IInteger | AutoBeOpenApi.IJsonSchema.IString)",
|
|
365
|
+
value: input
|
|
366
|
+
});
|
|
367
|
+
})(); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
|
|
368
|
+
if (false === __is(input)) {
|
|
369
|
+
errors = [];
|
|
370
|
+
_report = __typia_transform__validateReport._validateReport(errors);
|
|
371
|
+
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
|
|
372
|
+
path: _path + "",
|
|
373
|
+
expected: "IAutoBeInterfaceAuthorizationsApplication.IProps",
|
|
374
|
+
value: input
|
|
375
|
+
})) && _vo0(input, _path + "", true) || _report(true, {
|
|
376
|
+
path: _path + "",
|
|
377
|
+
expected: "IAutoBeInterfaceAuthorizationsApplication.IProps",
|
|
378
|
+
value: input
|
|
379
|
+
}))(input, "$input", true);
|
|
380
|
+
const success = 0 === errors.length;
|
|
381
|
+
return success ? {
|
|
382
|
+
success,
|
|
383
|
+
data: input
|
|
384
|
+
} : {
|
|
385
|
+
success,
|
|
386
|
+
errors,
|
|
387
|
+
data: input
|
|
388
|
+
};
|
|
389
|
+
}
|
|
390
|
+
return {
|
|
391
|
+
success: true,
|
|
392
|
+
data: input
|
|
393
|
+
};
|
|
394
|
+
}; })()(next);
|
|
395
|
+
if (result.success === false)
|
|
396
|
+
return result;
|
|
397
|
+
const errors = [];
|
|
398
|
+
result.data.operations.forEach((op, i) => {
|
|
399
|
+
var _a, _b;
|
|
400
|
+
// validate authorizationRole
|
|
401
|
+
if (op.authorizationRole !== null) {
|
|
402
|
+
op.authorizationRole = props.role;
|
|
403
|
+
}
|
|
404
|
+
// validate responseBody.typeName -> must be ~.IAuthorized
|
|
405
|
+
if (op.authorizationType === null)
|
|
406
|
+
return;
|
|
407
|
+
else if (op.responseBody === null)
|
|
408
|
+
errors.push({
|
|
409
|
+
path: `$input.operations.${i}.responseBody`,
|
|
410
|
+
expected: "Response body with I{RoleName(PascalCase)}.IAuthorized type is required",
|
|
411
|
+
value: op.responseBody,
|
|
412
|
+
description: [
|
|
413
|
+
"Response body is required for authentication operations.",
|
|
414
|
+
"",
|
|
415
|
+
"The responseBody must contain description and typeName fields.",
|
|
416
|
+
"typeName must be I{Prefix(PascalCase)}{RoleName(PascalCase)}.IAuthorized",
|
|
417
|
+
"description must be a detailed description of the response body.",
|
|
418
|
+
].join("\n"),
|
|
419
|
+
});
|
|
420
|
+
else if (!op.responseBody.typeName.endsWith(".IAuthorized"))
|
|
421
|
+
errors.push({
|
|
422
|
+
path: `$input.operations.${i}.responseBody.typeName`,
|
|
423
|
+
expected: `Type name must be I{RoleName(PascalCase)}.IAuthorized`,
|
|
424
|
+
value: (_a = op.responseBody) === null || _a === void 0 ? void 0 : _a.typeName,
|
|
425
|
+
description: [
|
|
426
|
+
`Wrong response body type name: ${(_b = op.responseBody) === null || _b === void 0 ? void 0 : _b.typeName}`,
|
|
427
|
+
"",
|
|
428
|
+
`For authentication operations (login, join, refresh), the response body type name must follow the convention "I{RoleName}.IAuthorized".`,
|
|
429
|
+
``,
|
|
430
|
+
`This standardized naming convention ensures consistency across all authentication endpoints and clearly identifies authorization response types.`,
|
|
431
|
+
`The Role name should be in PascalCase format (e.g., IUser.IAuthorized, IAdmin.IAuthorized, ISeller.IAuthorized).`,
|
|
432
|
+
].join("\n"),
|
|
433
|
+
});
|
|
434
|
+
});
|
|
435
|
+
const authorizationTypes = new Set(result.data.operations
|
|
436
|
+
.map((o) => o.authorizationType)
|
|
437
|
+
.filter((v) => v !== null));
|
|
438
|
+
for (const type of [
|
|
439
|
+
"login",
|
|
440
|
+
"join",
|
|
441
|
+
"refresh"
|
|
442
|
+
])
|
|
443
|
+
if (authorizationTypes.has(type) === false)
|
|
444
|
+
errors.push({
|
|
445
|
+
path: "$input.operations[].authorizationType",
|
|
446
|
+
expected: utils_1.StringUtil.trim `{
|
|
447
|
+
...(AutoBeOpenApi.IOperation data),
|
|
448
|
+
authorizationType: "${type}"
|
|
449
|
+
}`,
|
|
450
|
+
value: `No authorizationType "${type}" found in any operation`,
|
|
451
|
+
description: utils_1.StringUtil.trim `
|
|
452
|
+
There must be an operation that has defined AutoBeOpenApi.IOperation.authorizationType := "${type}"
|
|
453
|
+
for the "${props.role}" role's authorization activity; "${type}".
|
|
454
|
+
|
|
455
|
+
However, none of the operations have the AutoBeOpenApi.IOperation.authorizationType := "${type}"
|
|
456
|
+
value, so that the "${props.role}" cannot perform the authorization ${type} activity.
|
|
457
|
+
|
|
458
|
+
Please make that operation at the next function calling. You have to do it.
|
|
459
|
+
`,
|
|
460
|
+
});
|
|
461
|
+
if (errors.length !== 0) {
|
|
462
|
+
return {
|
|
463
|
+
success: false,
|
|
464
|
+
errors,
|
|
465
|
+
data: next,
|
|
466
|
+
};
|
|
467
|
+
}
|
|
468
|
+
return result;
|
|
469
|
+
};
|
|
470
|
+
const application = collection[props.model === "chatgpt" ? "chatgpt" : "claude"](validate);
|
|
103
471
|
return {
|
|
104
472
|
protocol: "class",
|
|
105
473
|
name: "Create Authorization Interface",
|
|
@@ -111,1198 +479,1253 @@ function createController(props) {
|
|
|
111
479
|
},
|
|
112
480
|
};
|
|
113
481
|
}
|
|
114
|
-
const
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
description: "Array of API operations to generate authorization operation for.\n\nEach operation in this array must include:\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 must 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.",
|
|
129
|
-
type: "array",
|
|
130
|
-
items: {
|
|
131
|
-
$ref: "#/$defs/AutoBeOpenApi.IOperation"
|
|
132
|
-
},
|
|
133
|
-
minItems: 1
|
|
134
|
-
}
|
|
135
|
-
},
|
|
136
|
-
required: [
|
|
137
|
-
"operations"
|
|
138
|
-
],
|
|
139
|
-
additionalProperties: false,
|
|
140
|
-
$defs: {
|
|
141
|
-
"AutoBeOpenApi.IOperation": {
|
|
142
|
-
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\nAll request bodies and responses for this operation must be object types\nand must reference named types defined in the components section. The\ncontent-type is always `application/json`. For file upload/download\noperations, use `string & tags.Format<\"uri\">` in the appropriate schema\ninstead 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```",
|
|
482
|
+
const collection = {
|
|
483
|
+
chatgpt: (validate) => (() => {
|
|
484
|
+
const application = {
|
|
485
|
+
model: "chatgpt",
|
|
486
|
+
options: {
|
|
487
|
+
reference: true,
|
|
488
|
+
strict: false,
|
|
489
|
+
separate: null
|
|
490
|
+
},
|
|
491
|
+
functions: [
|
|
492
|
+
{
|
|
493
|
+
name: "makeOperations",
|
|
494
|
+
parameters: {
|
|
495
|
+
description: "Current Type: {@link IAutoBeInterfaceAuthorizationsApplication.IProps}",
|
|
143
496
|
type: "object",
|
|
144
497
|
properties: {
|
|
145
|
-
|
|
146
|
-
description: "
|
|
147
|
-
type: "string"
|
|
148
|
-
},
|
|
149
|
-
description: {
|
|
150
|
-
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> MUST be written in English. Never use other languages.",
|
|
151
|
-
type: "string"
|
|
152
|
-
},
|
|
153
|
-
summary: {
|
|
154
|
-
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> MUST be written in English. Never use other languages",
|
|
155
|
-
type: "string"
|
|
156
|
-
},
|
|
157
|
-
parameters: {
|
|
158
|
-
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`",
|
|
498
|
+
operations: {
|
|
499
|
+
description: "Array of API operations to generate authorization operation for.\n\nEach operation in this array must include:\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 must 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.\n\n\n@minItems 1",
|
|
159
500
|
type: "array",
|
|
160
501
|
items: {
|
|
161
|
-
$ref: "#/$defs/AutoBeOpenApi.
|
|
502
|
+
$ref: "#/$defs/AutoBeOpenApi.IOperation"
|
|
162
503
|
}
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
504
|
+
}
|
|
505
|
+
},
|
|
506
|
+
required: [
|
|
507
|
+
"operations"
|
|
508
|
+
],
|
|
509
|
+
additionalProperties: false,
|
|
510
|
+
$defs: {
|
|
511
|
+
"AutoBeOpenApi.IOperation": {
|
|
512
|
+
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\nAll request bodies and responses for this operation must be object types\nand must reference named types defined in the components section. The\ncontent-type is always `application/json`. For file upload/download\noperations, use `string & tags.Format<\"uri\">` in the appropriate schema\ninstead 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```",
|
|
513
|
+
type: "object",
|
|
514
|
+
properties: {
|
|
515
|
+
specification: {
|
|
516
|
+
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.",
|
|
517
|
+
type: "string"
|
|
518
|
+
},
|
|
519
|
+
authorizationType: {
|
|
520
|
+
description: "Authorization type of the API operation.\n\n- `\"login\"`: User login operations that validate credentials\n- `\"join\"`: User registration operations that create accounts\n- `\"refresh\"`: Token refresh operations that renew access tokens\n- `null`: All other operations (CRUD, business logic, etc.)\n\nUse authentication values only for credential validation, user\nregistration, or token refresh operations. Use `null` for all other\nbusiness operations.\n\nExamples:\n\n- `/auth/login` \u2192 `\"login\"`\n- `/auth/register` \u2192 `\"join\"`\n- `/auth/refresh` \u2192 `\"refresh\"`\n- `/auth/validate` \u2192 `null`\n- `/users/{id}`, `/shoppings/customers/sales/cancel`, \u2192 `null`",
|
|
521
|
+
anyOf: [
|
|
522
|
+
{
|
|
523
|
+
type: "null"
|
|
524
|
+
},
|
|
525
|
+
{
|
|
526
|
+
type: "string",
|
|
527
|
+
"enum": [
|
|
528
|
+
"login",
|
|
529
|
+
"join",
|
|
530
|
+
"refresh"
|
|
531
|
+
]
|
|
532
|
+
}
|
|
533
|
+
]
|
|
534
|
+
},
|
|
535
|
+
description: {
|
|
536
|
+
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> MUST be written in English. Never use other languages.",
|
|
537
|
+
type: "string"
|
|
538
|
+
},
|
|
539
|
+
summary: {
|
|
540
|
+
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> MUST be written in English. Never use other languages",
|
|
541
|
+
type: "string"
|
|
542
|
+
},
|
|
543
|
+
parameters: {
|
|
544
|
+
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`",
|
|
545
|
+
type: "array",
|
|
546
|
+
items: {
|
|
547
|
+
$ref: "#/$defs/AutoBeOpenApi.IParameter"
|
|
548
|
+
}
|
|
549
|
+
},
|
|
550
|
+
requestBody: {
|
|
551
|
+
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.",
|
|
552
|
+
anyOf: [
|
|
553
|
+
{
|
|
554
|
+
type: "null"
|
|
555
|
+
},
|
|
556
|
+
{
|
|
557
|
+
$ref: "#/$defs/AutoBeOpenApi.IRequestBody"
|
|
558
|
+
}
|
|
559
|
+
]
|
|
560
|
+
},
|
|
561
|
+
responseBody: {
|
|
562
|
+
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.",
|
|
563
|
+
anyOf: [
|
|
564
|
+
{
|
|
565
|
+
type: "null"
|
|
566
|
+
},
|
|
567
|
+
{
|
|
568
|
+
$ref: "#/$defs/AutoBeOpenApi.IResponseBody"
|
|
569
|
+
}
|
|
570
|
+
]
|
|
571
|
+
},
|
|
572
|
+
authorizationRole: {
|
|
573
|
+
description: "Authorization role required to access this API operation.\n\nThis field specifies which user role is allowed to access this endpoint.\nThe role name must correspond exactly to the actual roles defined in your\nsystem's Prisma schema.\n\n## Naming Convention\n\nRole names MUST use camelCase.\n\n## Role-Based Path Convention\n\nWhen authorizationRole is specified, it should align with the path\nstructure:\n\n- If authorizationRole is \"admin\" \u2192 path might be \"/admin/resources/{id}\"\n- If authorizationRole is \"seller\" \u2192 path might be \"/seller/products\"\n- Special case: For user's own resources, use path prefix \"/my/\" regardless\n of role\n\n## Important Guidelines\n\n- Set to `null` for public endpoints that require no authentication\n- Set to specific role string for role-restricted endpoints\n- The role name MUST match exactly with the user type/role defined in the\n database\n- This role 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 role\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.",
|
|
574
|
+
anyOf: [
|
|
575
|
+
{
|
|
576
|
+
type: "null"
|
|
577
|
+
},
|
|
578
|
+
{
|
|
579
|
+
type: "string",
|
|
580
|
+
description: "@minLength 1\n@pattern ^[a-z][a-zA-Z0-9]*$"
|
|
581
|
+
}
|
|
582
|
+
]
|
|
583
|
+
},
|
|
584
|
+
name: {
|
|
585
|
+
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.\n\n\n@pattern ^[a-z][a-zA-Z0-9]*$",
|
|
586
|
+
type: "string"
|
|
169
587
|
},
|
|
170
|
-
{
|
|
171
|
-
|
|
588
|
+
path: {
|
|
589
|
+
description: "HTTP path of the API operation.\n\nThe URL path for accessing this API operation, using path parameters\nenclosed in curly braces (e.g., `/shoppings/customers/sales/{saleId}`).\n\nIt must be corresponded to the {@link parameters path parameters}.\n\nThe path structure should clearly indicate which database entity this\noperation is manipulating, helping to ensure all entities have\nappropriate API coverage.\n\nPath validation rules:\n\n- Must start with a forward slash (/)\n- Can contain only: letters (a-z, A-Z), numbers (0-9), forward slashes (/),\n curly braces for parameters ({paramName}), hyphens (-), and underscores\n (_)\n- Parameters must be enclosed in curly braces: {paramName}\n- Resource names should be in camelCase\n- No quotes, spaces, or invalid special characters allowed\n- No domain or role-based prefixes\n\nValid examples:\n\n- \"/users\"\n- \"/users/{userId}\"\n- \"/articles/{articleId}/comments\"\n- \"/attachmentFiles\"\n- \"/orders/{orderId}/items/{itemId}\"\n\nInvalid examples:\n\n- \"'/users'\" (contains quotes)\n- \"/user profile\" (contains space)\n- \"/users/[userId]\" (wrong bracket format)\n- \"/admin/users\" (role prefix)\n- \"/api/v1/users\" (API prefix)\n\n\n@pattern ^\\/[a-zA-Z0-9\\/_{}.-]*$",
|
|
590
|
+
type: "string"
|
|
591
|
+
},
|
|
592
|
+
method: {
|
|
593
|
+
description: "HTTP method of the API operation.\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",
|
|
594
|
+
type: "string",
|
|
595
|
+
"enum": [
|
|
596
|
+
"get",
|
|
597
|
+
"post",
|
|
598
|
+
"put",
|
|
599
|
+
"delete",
|
|
600
|
+
"patch"
|
|
601
|
+
]
|
|
172
602
|
}
|
|
603
|
+
},
|
|
604
|
+
required: [
|
|
605
|
+
"specification",
|
|
606
|
+
"authorizationType",
|
|
607
|
+
"description",
|
|
608
|
+
"summary",
|
|
609
|
+
"parameters",
|
|
610
|
+
"requestBody",
|
|
611
|
+
"responseBody",
|
|
612
|
+
"authorizationRole",
|
|
613
|
+
"name",
|
|
614
|
+
"path",
|
|
615
|
+
"method"
|
|
173
616
|
]
|
|
174
617
|
},
|
|
175
|
-
|
|
176
|
-
description: "
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
618
|
+
"AutoBeOpenApi.IParameter": {
|
|
619
|
+
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```",
|
|
620
|
+
type: "object",
|
|
621
|
+
properties: {
|
|
622
|
+
name: {
|
|
623
|
+
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.\n\n\n@pattern ^[a-z][a-zA-Z0-9]*$",
|
|
624
|
+
type: "string"
|
|
625
|
+
},
|
|
626
|
+
description: {
|
|
627
|
+
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.",
|
|
628
|
+
type: "string"
|
|
180
629
|
},
|
|
181
|
-
{
|
|
182
|
-
|
|
630
|
+
schema: {
|
|
631
|
+
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.",
|
|
632
|
+
anyOf: [
|
|
633
|
+
{
|
|
634
|
+
$ref: "#/$defs/AutoBeOpenApi.IJsonSchema.INumber"
|
|
635
|
+
},
|
|
636
|
+
{
|
|
637
|
+
$ref: "#/$defs/AutoBeOpenApi.IJsonSchema.IInteger"
|
|
638
|
+
},
|
|
639
|
+
{
|
|
640
|
+
$ref: "#/$defs/AutoBeOpenApi.IJsonSchema.IString"
|
|
641
|
+
}
|
|
642
|
+
],
|
|
643
|
+
"x-discriminator": {
|
|
644
|
+
propertyName: "type",
|
|
645
|
+
mapping: {
|
|
646
|
+
number: "#/$defs/AutoBeOpenApi.IJsonSchema.INumber",
|
|
647
|
+
integer: "#/$defs/AutoBeOpenApi.IJsonSchema.IInteger",
|
|
648
|
+
string: "#/$defs/AutoBeOpenApi.IJsonSchema.IString"
|
|
649
|
+
}
|
|
650
|
+
}
|
|
183
651
|
}
|
|
652
|
+
},
|
|
653
|
+
required: [
|
|
654
|
+
"name",
|
|
655
|
+
"description",
|
|
656
|
+
"schema"
|
|
184
657
|
]
|
|
185
658
|
},
|
|
186
|
-
|
|
187
|
-
description: "
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
659
|
+
"AutoBeOpenApi.IJsonSchema.INumber": {
|
|
660
|
+
description: "Number (double) type info.",
|
|
661
|
+
type: "object",
|
|
662
|
+
properties: {
|
|
663
|
+
minimum: {
|
|
664
|
+
description: "Minimum value restriction.",
|
|
665
|
+
type: "number"
|
|
666
|
+
},
|
|
667
|
+
maximum: {
|
|
668
|
+
description: "Maximum value restriction.",
|
|
669
|
+
type: "number"
|
|
191
670
|
},
|
|
192
|
-
{
|
|
671
|
+
exclusiveMinimum: {
|
|
672
|
+
description: "Exclusive minimum value restriction.",
|
|
673
|
+
type: "number"
|
|
674
|
+
},
|
|
675
|
+
exclusiveMaximum: {
|
|
676
|
+
description: "Exclusive maximum value restriction.",
|
|
677
|
+
type: "number"
|
|
678
|
+
},
|
|
679
|
+
multipleOf: {
|
|
680
|
+
description: "Multiple of value restriction.\n\n\n@exclusiveMinimum 0",
|
|
681
|
+
type: "number"
|
|
682
|
+
},
|
|
683
|
+
type: {
|
|
684
|
+
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.",
|
|
193
685
|
type: "string",
|
|
194
|
-
|
|
195
|
-
|
|
686
|
+
"enum": [
|
|
687
|
+
"number"
|
|
688
|
+
]
|
|
196
689
|
}
|
|
690
|
+
},
|
|
691
|
+
required: [
|
|
692
|
+
"type"
|
|
197
693
|
]
|
|
198
694
|
},
|
|
199
|
-
|
|
200
|
-
description: "
|
|
201
|
-
type: "
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
description: "HTTP method of the API operation.\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",
|
|
211
|
-
oneOf: [
|
|
212
|
-
{
|
|
213
|
-
"const": "get"
|
|
695
|
+
"AutoBeOpenApi.IJsonSchema.IInteger": {
|
|
696
|
+
description: "Integer type info.",
|
|
697
|
+
type: "object",
|
|
698
|
+
properties: {
|
|
699
|
+
minimum: {
|
|
700
|
+
description: "Minimum value restriction.",
|
|
701
|
+
type: "integer"
|
|
702
|
+
},
|
|
703
|
+
maximum: {
|
|
704
|
+
description: "Maximum value restriction.",
|
|
705
|
+
type: "integer"
|
|
214
706
|
},
|
|
215
|
-
{
|
|
216
|
-
|
|
707
|
+
exclusiveMinimum: {
|
|
708
|
+
description: "Exclusive minimum value restriction.",
|
|
709
|
+
type: "number"
|
|
217
710
|
},
|
|
218
|
-
{
|
|
219
|
-
|
|
711
|
+
exclusiveMaximum: {
|
|
712
|
+
description: "Exclusive maximum value restriction.",
|
|
713
|
+
type: "number"
|
|
220
714
|
},
|
|
221
|
-
{
|
|
222
|
-
|
|
715
|
+
multipleOf: {
|
|
716
|
+
description: "Multiple of value restriction.\n\n\n@exclusiveMinimum 0",
|
|
717
|
+
type: "integer"
|
|
223
718
|
},
|
|
224
|
-
{
|
|
225
|
-
"
|
|
719
|
+
type: {
|
|
720
|
+
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.",
|
|
721
|
+
type: "string",
|
|
722
|
+
"enum": [
|
|
723
|
+
"integer"
|
|
724
|
+
]
|
|
226
725
|
}
|
|
726
|
+
},
|
|
727
|
+
required: [
|
|
728
|
+
"type"
|
|
227
729
|
]
|
|
228
|
-
}
|
|
229
|
-
},
|
|
230
|
-
required: [
|
|
231
|
-
"specification",
|
|
232
|
-
"description",
|
|
233
|
-
"summary",
|
|
234
|
-
"parameters",
|
|
235
|
-
"requestBody",
|
|
236
|
-
"responseBody",
|
|
237
|
-
"authorizationRole",
|
|
238
|
-
"name",
|
|
239
|
-
"path",
|
|
240
|
-
"method"
|
|
241
|
-
]
|
|
242
|
-
},
|
|
243
|
-
"AutoBeOpenApi.IParameter": {
|
|
244
|
-
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```",
|
|
245
|
-
type: "object",
|
|
246
|
-
properties: {
|
|
247
|
-
name: {
|
|
248
|
-
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.",
|
|
249
|
-
type: "string",
|
|
250
|
-
pattern: "^[a-z][a-zA-Z0-9]*$"
|
|
251
|
-
},
|
|
252
|
-
description: {
|
|
253
|
-
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.",
|
|
254
|
-
type: "string"
|
|
255
730
|
},
|
|
256
|
-
|
|
257
|
-
description: "
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
731
|
+
"AutoBeOpenApi.IJsonSchema.IString": {
|
|
732
|
+
description: "String type info.",
|
|
733
|
+
type: "object",
|
|
734
|
+
properties: {
|
|
735
|
+
format: {
|
|
736
|
+
description: "Format restriction.",
|
|
737
|
+
type: "string"
|
|
261
738
|
},
|
|
262
|
-
{
|
|
263
|
-
|
|
739
|
+
pattern: {
|
|
740
|
+
description: "Pattern restriction.",
|
|
741
|
+
type: "string"
|
|
264
742
|
},
|
|
265
|
-
{
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
743
|
+
contentMediaType: {
|
|
744
|
+
description: "Content media type restriction.",
|
|
745
|
+
type: "string"
|
|
746
|
+
},
|
|
747
|
+
minLength: {
|
|
748
|
+
description: "Minimum length restriction.\n\n\n@minimum 0",
|
|
749
|
+
type: "integer"
|
|
750
|
+
},
|
|
751
|
+
maxLength: {
|
|
752
|
+
description: "Maximum length restriction.\n\n\n@minimum 0",
|
|
753
|
+
type: "integer"
|
|
754
|
+
},
|
|
755
|
+
type: {
|
|
756
|
+
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.",
|
|
757
|
+
type: "string",
|
|
758
|
+
"enum": [
|
|
759
|
+
"string"
|
|
760
|
+
]
|
|
275
761
|
}
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
"name",
|
|
281
|
-
"description",
|
|
282
|
-
"schema"
|
|
283
|
-
]
|
|
284
|
-
},
|
|
285
|
-
"AutoBeOpenApi.IJsonSchema.INumber": {
|
|
286
|
-
description: "Number (double) type info.",
|
|
287
|
-
type: "object",
|
|
288
|
-
properties: {
|
|
289
|
-
minimum: {
|
|
290
|
-
description: "Minimum value restriction.",
|
|
291
|
-
type: "number"
|
|
292
|
-
},
|
|
293
|
-
maximum: {
|
|
294
|
-
description: "Maximum value restriction.",
|
|
295
|
-
type: "number"
|
|
296
|
-
},
|
|
297
|
-
exclusiveMinimum: {
|
|
298
|
-
description: "Exclusive minimum value restriction.",
|
|
299
|
-
type: "number"
|
|
300
|
-
},
|
|
301
|
-
exclusiveMaximum: {
|
|
302
|
-
description: "Exclusive maximum value restriction.",
|
|
303
|
-
type: "number"
|
|
304
|
-
},
|
|
305
|
-
multipleOf: {
|
|
306
|
-
description: "Multiple of value restriction.",
|
|
307
|
-
type: "number",
|
|
308
|
-
exclusiveMinimum: 0
|
|
309
|
-
},
|
|
310
|
-
type: {
|
|
311
|
-
description: "Discriminator value of the type.",
|
|
312
|
-
"const": "number"
|
|
313
|
-
}
|
|
314
|
-
},
|
|
315
|
-
required: [
|
|
316
|
-
"type"
|
|
317
|
-
]
|
|
318
|
-
},
|
|
319
|
-
"AutoBeOpenApi.IJsonSchema.IInteger": {
|
|
320
|
-
description: "Integer type info.",
|
|
321
|
-
type: "object",
|
|
322
|
-
properties: {
|
|
323
|
-
minimum: {
|
|
324
|
-
description: "Minimum value restriction.",
|
|
325
|
-
type: "integer"
|
|
326
|
-
},
|
|
327
|
-
maximum: {
|
|
328
|
-
description: "Maximum value restriction.",
|
|
329
|
-
type: "integer"
|
|
330
|
-
},
|
|
331
|
-
exclusiveMinimum: {
|
|
332
|
-
description: "Exclusive minimum value restriction.",
|
|
333
|
-
type: "number"
|
|
334
|
-
},
|
|
335
|
-
exclusiveMaximum: {
|
|
336
|
-
description: "Exclusive maximum value restriction.",
|
|
337
|
-
type: "number"
|
|
338
|
-
},
|
|
339
|
-
multipleOf: {
|
|
340
|
-
description: "Multiple of value restriction.",
|
|
341
|
-
type: "integer",
|
|
342
|
-
exclusiveMinimum: 0
|
|
343
|
-
},
|
|
344
|
-
type: {
|
|
345
|
-
description: "Discriminator value of the type.",
|
|
346
|
-
"const": "integer"
|
|
347
|
-
}
|
|
348
|
-
},
|
|
349
|
-
required: [
|
|
350
|
-
"type"
|
|
351
|
-
]
|
|
352
|
-
},
|
|
353
|
-
"AutoBeOpenApi.IJsonSchema.IString": {
|
|
354
|
-
description: "String type info.",
|
|
355
|
-
type: "object",
|
|
356
|
-
properties: {
|
|
357
|
-
format: {
|
|
358
|
-
description: "Format restriction.",
|
|
359
|
-
type: "string"
|
|
360
|
-
},
|
|
361
|
-
pattern: {
|
|
362
|
-
description: "Pattern restriction.",
|
|
363
|
-
type: "string"
|
|
364
|
-
},
|
|
365
|
-
contentMediaType: {
|
|
366
|
-
description: "Content media type restriction.",
|
|
367
|
-
type: "string"
|
|
368
|
-
},
|
|
369
|
-
minLength: {
|
|
370
|
-
description: "Minimum length restriction.",
|
|
371
|
-
type: "integer",
|
|
372
|
-
minimum: 0
|
|
373
|
-
},
|
|
374
|
-
maxLength: {
|
|
375
|
-
description: "Maximum length restriction.",
|
|
376
|
-
type: "integer",
|
|
377
|
-
minimum: 0
|
|
762
|
+
},
|
|
763
|
+
required: [
|
|
764
|
+
"type"
|
|
765
|
+
]
|
|
378
766
|
},
|
|
379
|
-
|
|
380
|
-
description: "
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
767
|
+
"AutoBeOpenApi.IRequestBody": {
|
|
768
|
+
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```",
|
|
769
|
+
type: "object",
|
|
770
|
+
properties: {
|
|
771
|
+
description: {
|
|
772
|
+
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.",
|
|
773
|
+
type: "string"
|
|
774
|
+
},
|
|
775
|
+
typeName: {
|
|
776
|
+
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```",
|
|
777
|
+
type: "string"
|
|
778
|
+
}
|
|
779
|
+
},
|
|
780
|
+
required: [
|
|
781
|
+
"description",
|
|
782
|
+
"typeName"
|
|
783
|
+
]
|
|
395
784
|
},
|
|
396
|
-
|
|
397
|
-
description: "
|
|
398
|
-
type: "
|
|
785
|
+
"AutoBeOpenApi.IResponseBody": {
|
|
786
|
+
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```",
|
|
787
|
+
type: "object",
|
|
788
|
+
properties: {
|
|
789
|
+
description: {
|
|
790
|
+
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.",
|
|
791
|
+
type: "string"
|
|
792
|
+
},
|
|
793
|
+
typeName: {
|
|
794
|
+
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```",
|
|
795
|
+
type: "string"
|
|
796
|
+
}
|
|
797
|
+
},
|
|
798
|
+
required: [
|
|
799
|
+
"description",
|
|
800
|
+
"typeName"
|
|
801
|
+
]
|
|
399
802
|
}
|
|
400
|
-
}
|
|
401
|
-
required: [
|
|
402
|
-
"description",
|
|
403
|
-
"typeName"
|
|
404
|
-
]
|
|
803
|
+
}
|
|
405
804
|
},
|
|
406
|
-
"
|
|
407
|
-
|
|
805
|
+
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.",
|
|
806
|
+
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.authorizationRole || "string" === typeof input.authorizationRole && (RegExp("^[a-z][a-zA-Z0-9]*$").test(input.authorizationRole) && 1 <= input.authorizationRole.length)) && ("string" === typeof input.name && RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name)) && ("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 || "string" === typeof 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 _iu0 = input => (() => {
|
|
807
|
+
if ("number" === input.type)
|
|
808
|
+
return _io4(input);
|
|
809
|
+
else if ("integer" === input.type)
|
|
810
|
+
return _io3(input);
|
|
811
|
+
else if ("string" === input.type)
|
|
812
|
+
return _io5(input);
|
|
813
|
+
else
|
|
814
|
+
return false;
|
|
815
|
+
})(); const _vo0 = (input, _path, _exceptionable = true) => [(Array.isArray(input.operations) || _report(_exceptionable, {
|
|
816
|
+
path: _path + ".operations",
|
|
817
|
+
expected: "(Array<AutoBeOpenApi.IOperation> & MinItems<1>)",
|
|
818
|
+
value: input.operations
|
|
819
|
+
})) && ((1 <= input.operations.length || _report(_exceptionable, {
|
|
820
|
+
path: _path + ".operations",
|
|
821
|
+
expected: "Array<> & MinItems<1>",
|
|
822
|
+
value: input.operations
|
|
823
|
+
})) && input.operations.map((elem, _index3) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
824
|
+
path: _path + ".operations[" + _index3 + "]",
|
|
825
|
+
expected: "AutoBeOpenApi.IOperation",
|
|
826
|
+
value: elem
|
|
827
|
+
})) && _vo1(elem, _path + ".operations[" + _index3 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
828
|
+
path: _path + ".operations[" + _index3 + "]",
|
|
829
|
+
expected: "AutoBeOpenApi.IOperation",
|
|
830
|
+
value: elem
|
|
831
|
+
})).every(flag => flag)) || _report(_exceptionable, {
|
|
832
|
+
path: _path + ".operations",
|
|
833
|
+
expected: "(Array<AutoBeOpenApi.IOperation> & MinItems<1>)",
|
|
834
|
+
value: input.operations
|
|
835
|
+
})].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.specification || _report(_exceptionable, {
|
|
836
|
+
path: _path + ".specification",
|
|
837
|
+
expected: "string",
|
|
838
|
+
value: input.specification
|
|
839
|
+
}), null === input.authorizationType || "login" === input.authorizationType || "join" === input.authorizationType || "refresh" === input.authorizationType || _report(_exceptionable, {
|
|
840
|
+
path: _path + ".authorizationType",
|
|
841
|
+
expected: "(\"join\" | \"login\" | \"refresh\" | null)",
|
|
842
|
+
value: input.authorizationType
|
|
843
|
+
}), "string" === typeof input.description || _report(_exceptionable, {
|
|
844
|
+
path: _path + ".description",
|
|
845
|
+
expected: "string",
|
|
846
|
+
value: input.description
|
|
847
|
+
}), "string" === typeof input.summary || _report(_exceptionable, {
|
|
848
|
+
path: _path + ".summary",
|
|
849
|
+
expected: "string",
|
|
850
|
+
value: input.summary
|
|
851
|
+
}), (Array.isArray(input.parameters) || _report(_exceptionable, {
|
|
852
|
+
path: _path + ".parameters",
|
|
853
|
+
expected: "Array<AutoBeOpenApi.IParameter>",
|
|
854
|
+
value: input.parameters
|
|
855
|
+
})) && input.parameters.map((elem, _index4) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
856
|
+
path: _path + ".parameters[" + _index4 + "]",
|
|
857
|
+
expected: "AutoBeOpenApi.IParameter",
|
|
858
|
+
value: elem
|
|
859
|
+
})) && _vo2(elem, _path + ".parameters[" + _index4 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
860
|
+
path: _path + ".parameters[" + _index4 + "]",
|
|
861
|
+
expected: "AutoBeOpenApi.IParameter",
|
|
862
|
+
value: elem
|
|
863
|
+
})).every(flag => flag) || _report(_exceptionable, {
|
|
864
|
+
path: _path + ".parameters",
|
|
865
|
+
expected: "Array<AutoBeOpenApi.IParameter>",
|
|
866
|
+
value: input.parameters
|
|
867
|
+
}), null === input.requestBody || ("object" === typeof input.requestBody && null !== input.requestBody || _report(_exceptionable, {
|
|
868
|
+
path: _path + ".requestBody",
|
|
869
|
+
expected: "(AutoBeOpenApi.IRequestBody | null)",
|
|
870
|
+
value: input.requestBody
|
|
871
|
+
})) && _vo6(input.requestBody, _path + ".requestBody", true && _exceptionable) || _report(_exceptionable, {
|
|
872
|
+
path: _path + ".requestBody",
|
|
873
|
+
expected: "(AutoBeOpenApi.IRequestBody | null)",
|
|
874
|
+
value: input.requestBody
|
|
875
|
+
}), null === input.responseBody || ("object" === typeof input.responseBody && null !== input.responseBody || _report(_exceptionable, {
|
|
876
|
+
path: _path + ".responseBody",
|
|
877
|
+
expected: "(AutoBeOpenApi.IResponseBody | null)",
|
|
878
|
+
value: input.responseBody
|
|
879
|
+
})) && _vo7(input.responseBody, _path + ".responseBody", true && _exceptionable) || _report(_exceptionable, {
|
|
880
|
+
path: _path + ".responseBody",
|
|
881
|
+
expected: "(AutoBeOpenApi.IResponseBody | null)",
|
|
882
|
+
value: input.responseBody
|
|
883
|
+
}), null === input.authorizationRole || "string" === typeof input.authorizationRole && (RegExp("^[a-z][a-zA-Z0-9]*$").test(input.authorizationRole) || _report(_exceptionable, {
|
|
884
|
+
path: _path + ".authorizationRole",
|
|
885
|
+
expected: "string & CamelPattern",
|
|
886
|
+
value: input.authorizationRole
|
|
887
|
+
})) && (1 <= input.authorizationRole.length || _report(_exceptionable, {
|
|
888
|
+
path: _path + ".authorizationRole",
|
|
889
|
+
expected: "string & MinLength<1>",
|
|
890
|
+
value: input.authorizationRole
|
|
891
|
+
})) || _report(_exceptionable, {
|
|
892
|
+
path: _path + ".authorizationRole",
|
|
893
|
+
expected: "((string & CamelPattern & MinLength<1>) | null)",
|
|
894
|
+
value: input.authorizationRole
|
|
895
|
+
}), "string" === typeof input.name && (RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name) || _report(_exceptionable, {
|
|
896
|
+
path: _path + ".name",
|
|
897
|
+
expected: "string & CamelPattern",
|
|
898
|
+
value: input.name
|
|
899
|
+
})) || _report(_exceptionable, {
|
|
900
|
+
path: _path + ".name",
|
|
901
|
+
expected: "(string & CamelPattern)",
|
|
902
|
+
value: input.name
|
|
903
|
+
}), "string" === typeof input.path && (RegExp("^\\/[a-zA-Z0-9\\/_{}.-]*$").test(input.path) || _report(_exceptionable, {
|
|
904
|
+
path: _path + ".path",
|
|
905
|
+
expected: "string & Pattern<\"^\\\\/[a-zA-Z0-9\\\\/_{}.-]*$\">",
|
|
906
|
+
value: input.path
|
|
907
|
+
})) || _report(_exceptionable, {
|
|
908
|
+
path: _path + ".path",
|
|
909
|
+
expected: "(string & Pattern<\"^\\\\/[a-zA-Z0-9\\\\/_{}.-]*$\">)",
|
|
910
|
+
value: input.path
|
|
911
|
+
}), "get" === input.method || "post" === input.method || "put" === input.method || "delete" === input.method || "patch" === input.method || _report(_exceptionable, {
|
|
912
|
+
path: _path + ".method",
|
|
913
|
+
expected: "(\"delete\" | \"get\" | \"patch\" | \"post\" | \"put\")",
|
|
914
|
+
value: input.method
|
|
915
|
+
})].every(flag => flag); const _vo2 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name) || _report(_exceptionable, {
|
|
916
|
+
path: _path + ".name",
|
|
917
|
+
expected: "string & CamelPattern",
|
|
918
|
+
value: input.name
|
|
919
|
+
})) || _report(_exceptionable, {
|
|
920
|
+
path: _path + ".name",
|
|
921
|
+
expected: "(string & CamelPattern)",
|
|
922
|
+
value: input.name
|
|
923
|
+
}), "string" === typeof input.description || _report(_exceptionable, {
|
|
924
|
+
path: _path + ".description",
|
|
925
|
+
expected: "string",
|
|
926
|
+
value: input.description
|
|
927
|
+
}), ("object" === typeof input.schema && null !== input.schema || _report(_exceptionable, {
|
|
928
|
+
path: _path + ".schema",
|
|
929
|
+
expected: "(AutoBeOpenApi.IJsonSchema.IInteger | AutoBeOpenApi.IJsonSchema.INumber | AutoBeOpenApi.IJsonSchema.IString)",
|
|
930
|
+
value: input.schema
|
|
931
|
+
})) && _vu0(input.schema, _path + ".schema", true && _exceptionable) || _report(_exceptionable, {
|
|
932
|
+
path: _path + ".schema",
|
|
933
|
+
expected: "(AutoBeOpenApi.IJsonSchema.IInteger | AutoBeOpenApi.IJsonSchema.INumber | AutoBeOpenApi.IJsonSchema.IString)",
|
|
934
|
+
value: input.schema
|
|
935
|
+
})].every(flag => flag); const _vo3 = (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, {
|
|
936
|
+
path: _path + ".minimum",
|
|
937
|
+
expected: "number & Type<\"int64\">",
|
|
938
|
+
value: input.minimum
|
|
939
|
+
})) || _report(_exceptionable, {
|
|
940
|
+
path: _path + ".minimum",
|
|
941
|
+
expected: "((number & Type<\"int64\">) | undefined)",
|
|
942
|
+
value: input.minimum
|
|
943
|
+
}), undefined === input.maximum || "number" === typeof input.maximum && (Math.floor(input.maximum) === input.maximum && -9223372036854776000 <= input.maximum && input.maximum <= 9223372036854776000 || _report(_exceptionable, {
|
|
944
|
+
path: _path + ".maximum",
|
|
945
|
+
expected: "number & Type<\"int64\">",
|
|
946
|
+
value: input.maximum
|
|
947
|
+
})) || _report(_exceptionable, {
|
|
948
|
+
path: _path + ".maximum",
|
|
949
|
+
expected: "((number & Type<\"int64\">) | undefined)",
|
|
950
|
+
value: input.maximum
|
|
951
|
+
}), undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum || _report(_exceptionable, {
|
|
952
|
+
path: _path + ".exclusiveMinimum",
|
|
953
|
+
expected: "(number | undefined)",
|
|
954
|
+
value: input.exclusiveMinimum
|
|
955
|
+
}), undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum || _report(_exceptionable, {
|
|
956
|
+
path: _path + ".exclusiveMaximum",
|
|
957
|
+
expected: "(number | undefined)",
|
|
958
|
+
value: input.exclusiveMaximum
|
|
959
|
+
}), undefined === input.multipleOf || "number" === typeof input.multipleOf && (Math.floor(input.multipleOf) === input.multipleOf && 0 <= input.multipleOf && input.multipleOf <= 18446744073709552000 || _report(_exceptionable, {
|
|
960
|
+
path: _path + ".multipleOf",
|
|
961
|
+
expected: "number & Type<\"uint64\">",
|
|
962
|
+
value: input.multipleOf
|
|
963
|
+
})) && (0 < input.multipleOf || _report(_exceptionable, {
|
|
964
|
+
path: _path + ".multipleOf",
|
|
965
|
+
expected: "number & ExclusiveMinimum<0>",
|
|
966
|
+
value: input.multipleOf
|
|
967
|
+
})) || _report(_exceptionable, {
|
|
968
|
+
path: _path + ".multipleOf",
|
|
969
|
+
expected: "((number & Type<\"uint64\"> & ExclusiveMinimum<0>) | undefined)",
|
|
970
|
+
value: input.multipleOf
|
|
971
|
+
}), "integer" === input.type || _report(_exceptionable, {
|
|
972
|
+
path: _path + ".type",
|
|
973
|
+
expected: "\"integer\"",
|
|
974
|
+
value: input.type
|
|
975
|
+
})].every(flag => flag); const _vo4 = (input, _path, _exceptionable = true) => [undefined === input.minimum || "number" === typeof input.minimum || _report(_exceptionable, {
|
|
976
|
+
path: _path + ".minimum",
|
|
977
|
+
expected: "(number | undefined)",
|
|
978
|
+
value: input.minimum
|
|
979
|
+
}), undefined === input.maximum || "number" === typeof input.maximum || _report(_exceptionable, {
|
|
980
|
+
path: _path + ".maximum",
|
|
981
|
+
expected: "(number | undefined)",
|
|
982
|
+
value: input.maximum
|
|
983
|
+
}), undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum || _report(_exceptionable, {
|
|
984
|
+
path: _path + ".exclusiveMinimum",
|
|
985
|
+
expected: "(number | undefined)",
|
|
986
|
+
value: input.exclusiveMinimum
|
|
987
|
+
}), undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum || _report(_exceptionable, {
|
|
988
|
+
path: _path + ".exclusiveMaximum",
|
|
989
|
+
expected: "(number | undefined)",
|
|
990
|
+
value: input.exclusiveMaximum
|
|
991
|
+
}), undefined === input.multipleOf || "number" === typeof input.multipleOf && (0 < input.multipleOf || _report(_exceptionable, {
|
|
992
|
+
path: _path + ".multipleOf",
|
|
993
|
+
expected: "number & ExclusiveMinimum<0>",
|
|
994
|
+
value: input.multipleOf
|
|
995
|
+
})) || _report(_exceptionable, {
|
|
996
|
+
path: _path + ".multipleOf",
|
|
997
|
+
expected: "((number & ExclusiveMinimum<0>) | undefined)",
|
|
998
|
+
value: input.multipleOf
|
|
999
|
+
}), "number" === input.type || _report(_exceptionable, {
|
|
1000
|
+
path: _path + ".type",
|
|
1001
|
+
expected: "\"number\"",
|
|
1002
|
+
value: input.type
|
|
1003
|
+
})].every(flag => flag); const _vo5 = (input, _path, _exceptionable = true) => [undefined === input.format || "string" === typeof input.format || _report(_exceptionable, {
|
|
1004
|
+
path: _path + ".format",
|
|
1005
|
+
expected: "(string | undefined)",
|
|
1006
|
+
value: input.format
|
|
1007
|
+
}), undefined === input.pattern || "string" === typeof input.pattern || _report(_exceptionable, {
|
|
1008
|
+
path: _path + ".pattern",
|
|
1009
|
+
expected: "(string | undefined)",
|
|
1010
|
+
value: input.pattern
|
|
1011
|
+
}), undefined === input.contentMediaType || "string" === typeof input.contentMediaType || _report(_exceptionable, {
|
|
1012
|
+
path: _path + ".contentMediaType",
|
|
1013
|
+
expected: "(string | undefined)",
|
|
1014
|
+
value: input.contentMediaType
|
|
1015
|
+
}), undefined === input.minLength || "number" === typeof input.minLength && (Math.floor(input.minLength) === input.minLength && 0 <= input.minLength && input.minLength <= 18446744073709552000 || _report(_exceptionable, {
|
|
1016
|
+
path: _path + ".minLength",
|
|
1017
|
+
expected: "number & Type<\"uint64\">",
|
|
1018
|
+
value: input.minLength
|
|
1019
|
+
})) || _report(_exceptionable, {
|
|
1020
|
+
path: _path + ".minLength",
|
|
1021
|
+
expected: "((number & Type<\"uint64\">) | undefined)",
|
|
1022
|
+
value: input.minLength
|
|
1023
|
+
}), undefined === input.maxLength || "number" === typeof input.maxLength && (Math.floor(input.maxLength) === input.maxLength && 0 <= input.maxLength && input.maxLength <= 18446744073709552000 || _report(_exceptionable, {
|
|
1024
|
+
path: _path + ".maxLength",
|
|
1025
|
+
expected: "number & Type<\"uint64\">",
|
|
1026
|
+
value: input.maxLength
|
|
1027
|
+
})) || _report(_exceptionable, {
|
|
1028
|
+
path: _path + ".maxLength",
|
|
1029
|
+
expected: "((number & Type<\"uint64\">) | undefined)",
|
|
1030
|
+
value: input.maxLength
|
|
1031
|
+
}), "string" === input.type || _report(_exceptionable, {
|
|
1032
|
+
path: _path + ".type",
|
|
1033
|
+
expected: "\"string\"",
|
|
1034
|
+
value: input.type
|
|
1035
|
+
})].every(flag => flag); const _vo6 = (input, _path, _exceptionable = true) => ["string" === typeof input.description || _report(_exceptionable, {
|
|
1036
|
+
path: _path + ".description",
|
|
1037
|
+
expected: "string",
|
|
1038
|
+
value: input.description
|
|
1039
|
+
}), "string" === typeof input.typeName || _report(_exceptionable, {
|
|
1040
|
+
path: _path + ".typeName",
|
|
1041
|
+
expected: "string",
|
|
1042
|
+
value: input.typeName
|
|
1043
|
+
})].every(flag => flag); const _vo7 = (input, _path, _exceptionable = true) => ["string" === typeof input.description || _report(_exceptionable, {
|
|
1044
|
+
path: _path + ".description",
|
|
1045
|
+
expected: "string",
|
|
1046
|
+
value: input.description
|
|
1047
|
+
}), "string" === typeof input.typeName || _report(_exceptionable, {
|
|
1048
|
+
path: _path + ".typeName",
|
|
1049
|
+
expected: "string",
|
|
1050
|
+
value: input.typeName
|
|
1051
|
+
})].every(flag => flag); const _vu0 = (input, _path, _exceptionable = true) => (() => {
|
|
1052
|
+
if ("number" === input.type)
|
|
1053
|
+
return _vo4(input, _path, true && _exceptionable);
|
|
1054
|
+
else if ("integer" === input.type)
|
|
1055
|
+
return _vo3(input, _path, true && _exceptionable);
|
|
1056
|
+
else if ("string" === input.type)
|
|
1057
|
+
return _vo5(input, _path, true && _exceptionable);
|
|
1058
|
+
else
|
|
1059
|
+
return _report(_exceptionable, {
|
|
1060
|
+
path: _path,
|
|
1061
|
+
expected: "(AutoBeOpenApi.IJsonSchema.INumber | AutoBeOpenApi.IJsonSchema.IInteger | AutoBeOpenApi.IJsonSchema.IString)",
|
|
1062
|
+
value: input
|
|
1063
|
+
});
|
|
1064
|
+
})(); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
|
|
1065
|
+
if (false === __is(input)) {
|
|
1066
|
+
errors = [];
|
|
1067
|
+
_report = __typia_transform__validateReport._validateReport(errors);
|
|
1068
|
+
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
|
|
1069
|
+
path: _path + "",
|
|
1070
|
+
expected: "IAutoBeInterfaceAuthorizationsApplication.IProps",
|
|
1071
|
+
value: input
|
|
1072
|
+
})) && _vo0(input, _path + "", true) || _report(true, {
|
|
1073
|
+
path: _path + "",
|
|
1074
|
+
expected: "IAutoBeInterfaceAuthorizationsApplication.IProps",
|
|
1075
|
+
value: input
|
|
1076
|
+
}))(input, "$input", true);
|
|
1077
|
+
const success = 0 === errors.length;
|
|
1078
|
+
return success ? {
|
|
1079
|
+
success,
|
|
1080
|
+
data: input
|
|
1081
|
+
} : {
|
|
1082
|
+
success,
|
|
1083
|
+
errors,
|
|
1084
|
+
data: input
|
|
1085
|
+
};
|
|
1086
|
+
}
|
|
1087
|
+
return {
|
|
1088
|
+
success: true,
|
|
1089
|
+
data: input
|
|
1090
|
+
};
|
|
1091
|
+
}; })()
|
|
1092
|
+
}
|
|
1093
|
+
]
|
|
1094
|
+
};
|
|
1095
|
+
__typia_transform__llmApplicationFinalize._llmApplicationFinalize(application, Object.assign(Object.assign({}, {
|
|
1096
|
+
validate: {
|
|
1097
|
+
makeOperations: validate,
|
|
1098
|
+
},
|
|
1099
|
+
}), { equals: false }));
|
|
1100
|
+
return application;
|
|
1101
|
+
})(),
|
|
1102
|
+
claude: (validate) => (() => {
|
|
1103
|
+
const application = {
|
|
1104
|
+
model: "claude",
|
|
1105
|
+
options: {
|
|
1106
|
+
reference: true,
|
|
1107
|
+
separate: null
|
|
1108
|
+
},
|
|
1109
|
+
functions: [
|
|
1110
|
+
{
|
|
1111
|
+
name: "makeOperations",
|
|
1112
|
+
parameters: {
|
|
1113
|
+
description: "Current Type: {@link IAutoBeInterfaceAuthorizationsApplication.IProps}",
|
|
408
1114
|
type: "object",
|
|
409
1115
|
properties: {
|
|
410
|
-
|
|
411
|
-
description: "
|
|
412
|
-
type: "
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
1116
|
+
operations: {
|
|
1117
|
+
description: "Array of API operations to generate authorization operation for.\n\nEach operation in this array must include:\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 must 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.",
|
|
1118
|
+
type: "array",
|
|
1119
|
+
items: {
|
|
1120
|
+
$ref: "#/$defs/AutoBeOpenApi.IOperation"
|
|
1121
|
+
},
|
|
1122
|
+
minItems: 1
|
|
417
1123
|
}
|
|
418
1124
|
},
|
|
419
1125
|
required: [
|
|
420
|
-
"
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
expected: "string",
|
|
463
|
-
value: input.description
|
|
464
|
-
}), "string" === typeof input.summary || _report(_exceptionable, {
|
|
465
|
-
path: _path + ".summary",
|
|
466
|
-
expected: "string",
|
|
467
|
-
value: input.summary
|
|
468
|
-
}), (Array.isArray(input.parameters) || _report(_exceptionable, {
|
|
469
|
-
path: _path + ".parameters",
|
|
470
|
-
expected: "Array<AutoBeOpenApi.IParameter>",
|
|
471
|
-
value: input.parameters
|
|
472
|
-
})) && input.parameters.map((elem, _index4) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
473
|
-
path: _path + ".parameters[" + _index4 + "]",
|
|
474
|
-
expected: "AutoBeOpenApi.IParameter",
|
|
475
|
-
value: elem
|
|
476
|
-
})) && _vo2(elem, _path + ".parameters[" + _index4 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
477
|
-
path: _path + ".parameters[" + _index4 + "]",
|
|
478
|
-
expected: "AutoBeOpenApi.IParameter",
|
|
479
|
-
value: elem
|
|
480
|
-
})).every(flag => flag) || _report(_exceptionable, {
|
|
481
|
-
path: _path + ".parameters",
|
|
482
|
-
expected: "Array<AutoBeOpenApi.IParameter>",
|
|
483
|
-
value: input.parameters
|
|
484
|
-
}), null === input.requestBody || ("object" === typeof input.requestBody && null !== input.requestBody || _report(_exceptionable, {
|
|
485
|
-
path: _path + ".requestBody",
|
|
486
|
-
expected: "(AutoBeOpenApi.IRequestBody | null)",
|
|
487
|
-
value: input.requestBody
|
|
488
|
-
})) && _vo6(input.requestBody, _path + ".requestBody", true && _exceptionable) || _report(_exceptionable, {
|
|
489
|
-
path: _path + ".requestBody",
|
|
490
|
-
expected: "(AutoBeOpenApi.IRequestBody | null)",
|
|
491
|
-
value: input.requestBody
|
|
492
|
-
}), null === input.responseBody || ("object" === typeof input.responseBody && null !== input.responseBody || _report(_exceptionable, {
|
|
493
|
-
path: _path + ".responseBody",
|
|
494
|
-
expected: "(AutoBeOpenApi.IResponseBody | null)",
|
|
495
|
-
value: input.responseBody
|
|
496
|
-
})) && _vo7(input.responseBody, _path + ".responseBody", true && _exceptionable) || _report(_exceptionable, {
|
|
497
|
-
path: _path + ".responseBody",
|
|
498
|
-
expected: "(AutoBeOpenApi.IResponseBody | null)",
|
|
499
|
-
value: input.responseBody
|
|
500
|
-
}), null === input.authorizationRole || "string" === typeof input.authorizationRole && (RegExp("^[a-z][a-zA-Z0-9]*$").test(input.authorizationRole) || _report(_exceptionable, {
|
|
501
|
-
path: _path + ".authorizationRole",
|
|
502
|
-
expected: "string & CamelPattern",
|
|
503
|
-
value: input.authorizationRole
|
|
504
|
-
})) && (1 <= input.authorizationRole.length || _report(_exceptionable, {
|
|
505
|
-
path: _path + ".authorizationRole",
|
|
506
|
-
expected: "string & MinLength<1>",
|
|
507
|
-
value: input.authorizationRole
|
|
508
|
-
})) || _report(_exceptionable, {
|
|
509
|
-
path: _path + ".authorizationRole",
|
|
510
|
-
expected: "((string & CamelPattern & MinLength<1>) | null)",
|
|
511
|
-
value: input.authorizationRole
|
|
512
|
-
}), "string" === typeof input.name && (RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name) || _report(_exceptionable, {
|
|
513
|
-
path: _path + ".name",
|
|
514
|
-
expected: "string & CamelPattern",
|
|
515
|
-
value: input.name
|
|
516
|
-
})) || _report(_exceptionable, {
|
|
517
|
-
path: _path + ".name",
|
|
518
|
-
expected: "(string & CamelPattern)",
|
|
519
|
-
value: input.name
|
|
520
|
-
}), "string" === typeof input.path && (RegExp("^\\/[a-zA-Z0-9\\/_{}.-]*$").test(input.path) || _report(_exceptionable, {
|
|
521
|
-
path: _path + ".path",
|
|
522
|
-
expected: "string & Pattern<\"^\\\\/[a-zA-Z0-9\\\\/_{}.-]*$\">",
|
|
523
|
-
value: input.path
|
|
524
|
-
})) || _report(_exceptionable, {
|
|
525
|
-
path: _path + ".path",
|
|
526
|
-
expected: "(string & Pattern<\"^\\\\/[a-zA-Z0-9\\\\/_{}.-]*$\">)",
|
|
527
|
-
value: input.path
|
|
528
|
-
}), "get" === input.method || "post" === input.method || "put" === input.method || "delete" === input.method || "patch" === input.method || _report(_exceptionable, {
|
|
529
|
-
path: _path + ".method",
|
|
530
|
-
expected: "(\"delete\" | \"get\" | \"patch\" | \"post\" | \"put\")",
|
|
531
|
-
value: input.method
|
|
532
|
-
})].every(flag => flag); const _vo2 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name) || _report(_exceptionable, {
|
|
533
|
-
path: _path + ".name",
|
|
534
|
-
expected: "string & CamelPattern",
|
|
535
|
-
value: input.name
|
|
536
|
-
})) || _report(_exceptionable, {
|
|
537
|
-
path: _path + ".name",
|
|
538
|
-
expected: "(string & CamelPattern)",
|
|
539
|
-
value: input.name
|
|
540
|
-
}), "string" === typeof input.description || _report(_exceptionable, {
|
|
541
|
-
path: _path + ".description",
|
|
542
|
-
expected: "string",
|
|
543
|
-
value: input.description
|
|
544
|
-
}), ("object" === typeof input.schema && null !== input.schema || _report(_exceptionable, {
|
|
545
|
-
path: _path + ".schema",
|
|
546
|
-
expected: "(AutoBeOpenApi.IJsonSchema.IInteger | AutoBeOpenApi.IJsonSchema.INumber | AutoBeOpenApi.IJsonSchema.IString)",
|
|
547
|
-
value: input.schema
|
|
548
|
-
})) && _vu0(input.schema, _path + ".schema", true && _exceptionable) || _report(_exceptionable, {
|
|
549
|
-
path: _path + ".schema",
|
|
550
|
-
expected: "(AutoBeOpenApi.IJsonSchema.IInteger | AutoBeOpenApi.IJsonSchema.INumber | AutoBeOpenApi.IJsonSchema.IString)",
|
|
551
|
-
value: input.schema
|
|
552
|
-
})].every(flag => flag); const _vo3 = (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, {
|
|
553
|
-
path: _path + ".minimum",
|
|
554
|
-
expected: "number & Type<\"int64\">",
|
|
555
|
-
value: input.minimum
|
|
556
|
-
})) || _report(_exceptionable, {
|
|
557
|
-
path: _path + ".minimum",
|
|
558
|
-
expected: "((number & Type<\"int64\">) | undefined)",
|
|
559
|
-
value: input.minimum
|
|
560
|
-
}), undefined === input.maximum || "number" === typeof input.maximum && (Math.floor(input.maximum) === input.maximum && -9223372036854776000 <= input.maximum && input.maximum <= 9223372036854776000 || _report(_exceptionable, {
|
|
561
|
-
path: _path + ".maximum",
|
|
562
|
-
expected: "number & Type<\"int64\">",
|
|
563
|
-
value: input.maximum
|
|
564
|
-
})) || _report(_exceptionable, {
|
|
565
|
-
path: _path + ".maximum",
|
|
566
|
-
expected: "((number & Type<\"int64\">) | undefined)",
|
|
567
|
-
value: input.maximum
|
|
568
|
-
}), undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum || _report(_exceptionable, {
|
|
569
|
-
path: _path + ".exclusiveMinimum",
|
|
570
|
-
expected: "(number | undefined)",
|
|
571
|
-
value: input.exclusiveMinimum
|
|
572
|
-
}), undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum || _report(_exceptionable, {
|
|
573
|
-
path: _path + ".exclusiveMaximum",
|
|
574
|
-
expected: "(number | undefined)",
|
|
575
|
-
value: input.exclusiveMaximum
|
|
576
|
-
}), undefined === input.multipleOf || "number" === typeof input.multipleOf && (Math.floor(input.multipleOf) === input.multipleOf && 0 <= input.multipleOf && input.multipleOf <= 18446744073709552000 || _report(_exceptionable, {
|
|
577
|
-
path: _path + ".multipleOf",
|
|
578
|
-
expected: "number & Type<\"uint64\">",
|
|
579
|
-
value: input.multipleOf
|
|
580
|
-
})) && (0 < input.multipleOf || _report(_exceptionable, {
|
|
581
|
-
path: _path + ".multipleOf",
|
|
582
|
-
expected: "number & ExclusiveMinimum<0>",
|
|
583
|
-
value: input.multipleOf
|
|
584
|
-
})) || _report(_exceptionable, {
|
|
585
|
-
path: _path + ".multipleOf",
|
|
586
|
-
expected: "((number & Type<\"uint64\"> & ExclusiveMinimum<0>) | undefined)",
|
|
587
|
-
value: input.multipleOf
|
|
588
|
-
}), "integer" === input.type || _report(_exceptionable, {
|
|
589
|
-
path: _path + ".type",
|
|
590
|
-
expected: "\"integer\"",
|
|
591
|
-
value: input.type
|
|
592
|
-
})].every(flag => flag); const _vo4 = (input, _path, _exceptionable = true) => [undefined === input.minimum || "number" === typeof input.minimum || _report(_exceptionable, {
|
|
593
|
-
path: _path + ".minimum",
|
|
594
|
-
expected: "(number | undefined)",
|
|
595
|
-
value: input.minimum
|
|
596
|
-
}), undefined === input.maximum || "number" === typeof input.maximum || _report(_exceptionable, {
|
|
597
|
-
path: _path + ".maximum",
|
|
598
|
-
expected: "(number | undefined)",
|
|
599
|
-
value: input.maximum
|
|
600
|
-
}), undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum || _report(_exceptionable, {
|
|
601
|
-
path: _path + ".exclusiveMinimum",
|
|
602
|
-
expected: "(number | undefined)",
|
|
603
|
-
value: input.exclusiveMinimum
|
|
604
|
-
}), undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum || _report(_exceptionable, {
|
|
605
|
-
path: _path + ".exclusiveMaximum",
|
|
606
|
-
expected: "(number | undefined)",
|
|
607
|
-
value: input.exclusiveMaximum
|
|
608
|
-
}), undefined === input.multipleOf || "number" === typeof input.multipleOf && (0 < input.multipleOf || _report(_exceptionable, {
|
|
609
|
-
path: _path + ".multipleOf",
|
|
610
|
-
expected: "number & ExclusiveMinimum<0>",
|
|
611
|
-
value: input.multipleOf
|
|
612
|
-
})) || _report(_exceptionable, {
|
|
613
|
-
path: _path + ".multipleOf",
|
|
614
|
-
expected: "((number & ExclusiveMinimum<0>) | undefined)",
|
|
615
|
-
value: input.multipleOf
|
|
616
|
-
}), "number" === input.type || _report(_exceptionable, {
|
|
617
|
-
path: _path + ".type",
|
|
618
|
-
expected: "\"number\"",
|
|
619
|
-
value: input.type
|
|
620
|
-
})].every(flag => flag); const _vo5 = (input, _path, _exceptionable = true) => [undefined === input.format || "string" === typeof input.format || _report(_exceptionable, {
|
|
621
|
-
path: _path + ".format",
|
|
622
|
-
expected: "(string | undefined)",
|
|
623
|
-
value: input.format
|
|
624
|
-
}), undefined === input.pattern || "string" === typeof input.pattern || _report(_exceptionable, {
|
|
625
|
-
path: _path + ".pattern",
|
|
626
|
-
expected: "(string | undefined)",
|
|
627
|
-
value: input.pattern
|
|
628
|
-
}), undefined === input.contentMediaType || "string" === typeof input.contentMediaType || _report(_exceptionable, {
|
|
629
|
-
path: _path + ".contentMediaType",
|
|
630
|
-
expected: "(string | undefined)",
|
|
631
|
-
value: input.contentMediaType
|
|
632
|
-
}), undefined === input.minLength || "number" === typeof input.minLength && (Math.floor(input.minLength) === input.minLength && 0 <= input.minLength && input.minLength <= 18446744073709552000 || _report(_exceptionable, {
|
|
633
|
-
path: _path + ".minLength",
|
|
634
|
-
expected: "number & Type<\"uint64\">",
|
|
635
|
-
value: input.minLength
|
|
636
|
-
})) || _report(_exceptionable, {
|
|
637
|
-
path: _path + ".minLength",
|
|
638
|
-
expected: "((number & Type<\"uint64\">) | undefined)",
|
|
639
|
-
value: input.minLength
|
|
640
|
-
}), undefined === input.maxLength || "number" === typeof input.maxLength && (Math.floor(input.maxLength) === input.maxLength && 0 <= input.maxLength && input.maxLength <= 18446744073709552000 || _report(_exceptionable, {
|
|
641
|
-
path: _path + ".maxLength",
|
|
642
|
-
expected: "number & Type<\"uint64\">",
|
|
643
|
-
value: input.maxLength
|
|
644
|
-
})) || _report(_exceptionable, {
|
|
645
|
-
path: _path + ".maxLength",
|
|
646
|
-
expected: "((number & Type<\"uint64\">) | undefined)",
|
|
647
|
-
value: input.maxLength
|
|
648
|
-
}), "string" === input.type || _report(_exceptionable, {
|
|
649
|
-
path: _path + ".type",
|
|
650
|
-
expected: "\"string\"",
|
|
651
|
-
value: input.type
|
|
652
|
-
})].every(flag => flag); const _vo6 = (input, _path, _exceptionable = true) => ["string" === typeof input.description || _report(_exceptionable, {
|
|
653
|
-
path: _path + ".description",
|
|
654
|
-
expected: "string",
|
|
655
|
-
value: input.description
|
|
656
|
-
}), "string" === typeof input.typeName || _report(_exceptionable, {
|
|
657
|
-
path: _path + ".typeName",
|
|
658
|
-
expected: "string",
|
|
659
|
-
value: input.typeName
|
|
660
|
-
})].every(flag => flag); const _vo7 = (input, _path, _exceptionable = true) => ["string" === typeof input.description || _report(_exceptionable, {
|
|
661
|
-
path: _path + ".description",
|
|
662
|
-
expected: "string",
|
|
663
|
-
value: input.description
|
|
664
|
-
}), "string" === typeof input.typeName || _report(_exceptionable, {
|
|
665
|
-
path: _path + ".typeName",
|
|
666
|
-
expected: "string",
|
|
667
|
-
value: input.typeName
|
|
668
|
-
})].every(flag => flag); const _vu0 = (input, _path, _exceptionable = true) => (() => {
|
|
669
|
-
if ("number" === input.type)
|
|
670
|
-
return _vo4(input, _path, true && _exceptionable);
|
|
671
|
-
else if ("integer" === input.type)
|
|
672
|
-
return _vo3(input, _path, true && _exceptionable);
|
|
673
|
-
else if ("string" === input.type)
|
|
674
|
-
return _vo5(input, _path, true && _exceptionable);
|
|
675
|
-
else
|
|
676
|
-
return _report(_exceptionable, {
|
|
677
|
-
path: _path,
|
|
678
|
-
expected: "(AutoBeOpenApi.IJsonSchema.INumber | AutoBeOpenApi.IJsonSchema.IInteger | AutoBeOpenApi.IJsonSchema.IString)",
|
|
679
|
-
value: input
|
|
680
|
-
});
|
|
681
|
-
})(); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
|
|
682
|
-
if (false === __is(input)) {
|
|
683
|
-
errors = [];
|
|
684
|
-
_report = __typia_transform__validateReport._validateReport(errors);
|
|
685
|
-
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
|
|
686
|
-
path: _path + "",
|
|
687
|
-
expected: "IAutoBeInterfaceAuthorizationsApplication.IProps",
|
|
688
|
-
value: input
|
|
689
|
-
})) && _vo0(input, _path + "", true) || _report(true, {
|
|
690
|
-
path: _path + "",
|
|
691
|
-
expected: "IAutoBeInterfaceAuthorizationsApplication.IProps",
|
|
692
|
-
value: input
|
|
693
|
-
}))(input, "$input", true);
|
|
694
|
-
const success = 0 === errors.length;
|
|
695
|
-
return success ? {
|
|
696
|
-
success,
|
|
697
|
-
data: input
|
|
698
|
-
} : {
|
|
699
|
-
success,
|
|
700
|
-
errors,
|
|
701
|
-
data: input
|
|
702
|
-
};
|
|
703
|
-
}
|
|
704
|
-
return {
|
|
705
|
-
success: true,
|
|
706
|
-
data: input
|
|
707
|
-
};
|
|
708
|
-
}; })()
|
|
709
|
-
}
|
|
710
|
-
]
|
|
711
|
-
};
|
|
712
|
-
const collection = {
|
|
713
|
-
chatgpt: {
|
|
714
|
-
model: "chatgpt",
|
|
715
|
-
options: {
|
|
716
|
-
reference: true,
|
|
717
|
-
strict: false,
|
|
718
|
-
separate: null
|
|
719
|
-
},
|
|
720
|
-
functions: [
|
|
721
|
-
{
|
|
722
|
-
name: "makeOperations",
|
|
723
|
-
parameters: {
|
|
724
|
-
description: "Current Type: {@link IAutoBeInterfaceAuthorizationsApplication.IProps}",
|
|
725
|
-
type: "object",
|
|
726
|
-
properties: {
|
|
727
|
-
operations: {
|
|
728
|
-
description: "Array of API operations to generate authorization operation for.\n\nEach operation in this array must include:\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 must 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.\n\n\n@minItems 1",
|
|
729
|
-
type: "array",
|
|
730
|
-
items: {
|
|
731
|
-
$ref: "#/$defs/AutoBeOpenApi.IOperation"
|
|
732
|
-
}
|
|
733
|
-
}
|
|
734
|
-
},
|
|
735
|
-
required: [
|
|
736
|
-
"operations"
|
|
737
|
-
],
|
|
738
|
-
additionalProperties: false,
|
|
739
|
-
$defs: {
|
|
740
|
-
"AutoBeOpenApi.IOperation": {
|
|
741
|
-
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\nAll request bodies and responses for this operation must be object types\nand must reference named types defined in the components section. The\ncontent-type is always `application/json`. For file upload/download\noperations, use `string & tags.Format<\"uri\">` in the appropriate schema\ninstead 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```",
|
|
742
|
-
type: "object",
|
|
743
|
-
properties: {
|
|
744
|
-
specification: {
|
|
745
|
-
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.",
|
|
746
|
-
type: "string"
|
|
747
|
-
},
|
|
748
|
-
description: {
|
|
749
|
-
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> MUST be written in English. Never use other languages.",
|
|
750
|
-
type: "string"
|
|
751
|
-
},
|
|
752
|
-
summary: {
|
|
753
|
-
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> MUST be written in English. Never use other languages",
|
|
754
|
-
type: "string"
|
|
755
|
-
},
|
|
756
|
-
parameters: {
|
|
757
|
-
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`",
|
|
758
|
-
type: "array",
|
|
759
|
-
items: {
|
|
760
|
-
$ref: "#/$defs/AutoBeOpenApi.IParameter"
|
|
761
|
-
}
|
|
762
|
-
},
|
|
763
|
-
requestBody: {
|
|
764
|
-
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.",
|
|
765
|
-
anyOf: [
|
|
766
|
-
{
|
|
767
|
-
type: "null"
|
|
768
|
-
},
|
|
769
|
-
{
|
|
770
|
-
$ref: "#/$defs/AutoBeOpenApi.IRequestBody"
|
|
771
|
-
}
|
|
772
|
-
]
|
|
773
|
-
},
|
|
774
|
-
responseBody: {
|
|
775
|
-
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.",
|
|
776
|
-
anyOf: [
|
|
777
|
-
{
|
|
778
|
-
type: "null"
|
|
779
|
-
},
|
|
780
|
-
{
|
|
781
|
-
$ref: "#/$defs/AutoBeOpenApi.IResponseBody"
|
|
782
|
-
}
|
|
783
|
-
]
|
|
784
|
-
},
|
|
785
|
-
authorizationRole: {
|
|
786
|
-
description: "Authorization role required to access this API operation.\n\nThis field specifies which user role is allowed to access this endpoint.\nThe role name must correspond exactly to the actual roles defined in your\nsystem's Prisma schema.\n\n## Naming Convention\n\nRole names MUST use camelCase.\n\n## Role-Based Path Convention\n\nWhen authorizationRole is specified, it should align with the path\nstructure:\n\n- If authorizationRole is \"admin\" \u2192 path might be \"/admin/resources/{id}\"\n- If authorizationRole is \"seller\" \u2192 path might be \"/seller/products\"\n- Special case: For user's own resources, use path prefix \"/my/\" regardless\n of role\n\n## Important Guidelines\n\n- Set to `null` for public endpoints that require no authentication\n- Set to specific role string for role-restricted endpoints\n- The role name MUST match exactly with the user type/role defined in the\n database\n- This role 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 role\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.",
|
|
787
|
-
anyOf: [
|
|
788
|
-
{
|
|
789
|
-
type: "null"
|
|
790
|
-
},
|
|
791
|
-
{
|
|
792
|
-
type: "string",
|
|
793
|
-
description: "@minLength 1\n@pattern ^[a-z][a-zA-Z0-9]*$"
|
|
1126
|
+
"operations"
|
|
1127
|
+
],
|
|
1128
|
+
additionalProperties: false,
|
|
1129
|
+
$defs: {
|
|
1130
|
+
"AutoBeOpenApi.IOperation": {
|
|
1131
|
+
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\nAll request bodies and responses for this operation must be object types\nand must reference named types defined in the components section. The\ncontent-type is always `application/json`. For file upload/download\noperations, use `string & tags.Format<\"uri\">` in the appropriate schema\ninstead 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```",
|
|
1132
|
+
type: "object",
|
|
1133
|
+
properties: {
|
|
1134
|
+
specification: {
|
|
1135
|
+
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.",
|
|
1136
|
+
type: "string"
|
|
1137
|
+
},
|
|
1138
|
+
authorizationType: {
|
|
1139
|
+
description: "Authorization type of the API operation.\n\n- `\"login\"`: User login operations that validate credentials\n- `\"join\"`: User registration operations that create accounts\n- `\"refresh\"`: Token refresh operations that renew access tokens\n- `null`: All other operations (CRUD, business logic, etc.)\n\nUse authentication values only for credential validation, user\nregistration, or token refresh operations. Use `null` for all other\nbusiness operations.\n\nExamples:\n\n- `/auth/login` \u2192 `\"login\"`\n- `/auth/register` \u2192 `\"join\"`\n- `/auth/refresh` \u2192 `\"refresh\"`\n- `/auth/validate` \u2192 `null`\n- `/users/{id}`, `/shoppings/customers/sales/cancel`, \u2192 `null`",
|
|
1140
|
+
oneOf: [
|
|
1141
|
+
{
|
|
1142
|
+
type: "null"
|
|
1143
|
+
},
|
|
1144
|
+
{
|
|
1145
|
+
"const": "login"
|
|
1146
|
+
},
|
|
1147
|
+
{
|
|
1148
|
+
"const": "join"
|
|
1149
|
+
},
|
|
1150
|
+
{
|
|
1151
|
+
"const": "refresh"
|
|
1152
|
+
}
|
|
1153
|
+
]
|
|
1154
|
+
},
|
|
1155
|
+
description: {
|
|
1156
|
+
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> MUST be written in English. Never use other languages.",
|
|
1157
|
+
type: "string"
|
|
1158
|
+
},
|
|
1159
|
+
summary: {
|
|
1160
|
+
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> MUST be written in English. Never use other languages",
|
|
1161
|
+
type: "string"
|
|
1162
|
+
},
|
|
1163
|
+
parameters: {
|
|
1164
|
+
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`",
|
|
1165
|
+
type: "array",
|
|
1166
|
+
items: {
|
|
1167
|
+
$ref: "#/$defs/AutoBeOpenApi.IParameter"
|
|
794
1168
|
}
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
1169
|
+
},
|
|
1170
|
+
requestBody: {
|
|
1171
|
+
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.",
|
|
1172
|
+
oneOf: [
|
|
1173
|
+
{
|
|
1174
|
+
type: "null"
|
|
1175
|
+
},
|
|
1176
|
+
{
|
|
1177
|
+
$ref: "#/$defs/AutoBeOpenApi.IRequestBody"
|
|
1178
|
+
}
|
|
1179
|
+
]
|
|
1180
|
+
},
|
|
1181
|
+
responseBody: {
|
|
1182
|
+
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.",
|
|
1183
|
+
oneOf: [
|
|
1184
|
+
{
|
|
1185
|
+
type: "null"
|
|
1186
|
+
},
|
|
1187
|
+
{
|
|
1188
|
+
$ref: "#/$defs/AutoBeOpenApi.IResponseBody"
|
|
1189
|
+
}
|
|
1190
|
+
]
|
|
1191
|
+
},
|
|
1192
|
+
authorizationRole: {
|
|
1193
|
+
description: "Authorization role required to access this API operation.\n\nThis field specifies which user role is allowed to access this endpoint.\nThe role name must correspond exactly to the actual roles defined in your\nsystem's Prisma schema.\n\n## Naming Convention\n\nRole names MUST use camelCase.\n\n## Role-Based Path Convention\n\nWhen authorizationRole is specified, it should align with the path\nstructure:\n\n- If authorizationRole is \"admin\" \u2192 path might be \"/admin/resources/{id}\"\n- If authorizationRole is \"seller\" \u2192 path might be \"/seller/products\"\n- Special case: For user's own resources, use path prefix \"/my/\" regardless\n of role\n\n## Important Guidelines\n\n- Set to `null` for public endpoints that require no authentication\n- Set to specific role string for role-restricted endpoints\n- The role name MUST match exactly with the user type/role defined in the\n database\n- This role 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 role\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.",
|
|
1194
|
+
oneOf: [
|
|
1195
|
+
{
|
|
1196
|
+
type: "null"
|
|
1197
|
+
},
|
|
1198
|
+
{
|
|
1199
|
+
type: "string",
|
|
1200
|
+
pattern: "^[a-z][a-zA-Z0-9]*$",
|
|
1201
|
+
minLength: 1
|
|
1202
|
+
}
|
|
1203
|
+
]
|
|
1204
|
+
},
|
|
1205
|
+
name: {
|
|
1206
|
+
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.",
|
|
1207
|
+
type: "string",
|
|
1208
|
+
pattern: "^[a-z][a-zA-Z0-9]*$"
|
|
1209
|
+
},
|
|
1210
|
+
path: {
|
|
1211
|
+
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)",
|
|
1212
|
+
type: "string",
|
|
1213
|
+
pattern: "^\\/[a-zA-Z0-9\\/_{}.-]*$"
|
|
1214
|
+
},
|
|
1215
|
+
method: {
|
|
1216
|
+
description: "HTTP method of the API operation.\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",
|
|
1217
|
+
oneOf: [
|
|
1218
|
+
{
|
|
1219
|
+
"const": "get"
|
|
1220
|
+
},
|
|
1221
|
+
{
|
|
1222
|
+
"const": "post"
|
|
1223
|
+
},
|
|
1224
|
+
{
|
|
1225
|
+
"const": "put"
|
|
1226
|
+
},
|
|
1227
|
+
{
|
|
1228
|
+
"const": "delete"
|
|
1229
|
+
},
|
|
1230
|
+
{
|
|
1231
|
+
"const": "patch"
|
|
1232
|
+
}
|
|
1233
|
+
]
|
|
1234
|
+
}
|
|
804
1235
|
},
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
"
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
1236
|
+
required: [
|
|
1237
|
+
"specification",
|
|
1238
|
+
"authorizationType",
|
|
1239
|
+
"description",
|
|
1240
|
+
"summary",
|
|
1241
|
+
"parameters",
|
|
1242
|
+
"requestBody",
|
|
1243
|
+
"responseBody",
|
|
1244
|
+
"authorizationRole",
|
|
1245
|
+
"name",
|
|
1246
|
+
"path",
|
|
1247
|
+
"method"
|
|
1248
|
+
]
|
|
816
1249
|
},
|
|
817
|
-
|
|
818
|
-
"
|
|
819
|
-
"
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
},
|
|
851
|
-
{
|
|
852
|
-
$ref: "#/$defs/AutoBeOpenApi.IJsonSchema.IString"
|
|
853
|
-
}
|
|
854
|
-
],
|
|
855
|
-
"x-discriminator": {
|
|
856
|
-
propertyName: "type",
|
|
857
|
-
mapping: {
|
|
858
|
-
number: "#/$defs/AutoBeOpenApi.IJsonSchema.INumber",
|
|
859
|
-
integer: "#/$defs/AutoBeOpenApi.IJsonSchema.IInteger",
|
|
860
|
-
string: "#/$defs/AutoBeOpenApi.IJsonSchema.IString"
|
|
1250
|
+
"AutoBeOpenApi.IParameter": {
|
|
1251
|
+
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```",
|
|
1252
|
+
type: "object",
|
|
1253
|
+
properties: {
|
|
1254
|
+
name: {
|
|
1255
|
+
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.",
|
|
1256
|
+
type: "string",
|
|
1257
|
+
pattern: "^[a-z][a-zA-Z0-9]*$"
|
|
1258
|
+
},
|
|
1259
|
+
description: {
|
|
1260
|
+
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.",
|
|
1261
|
+
type: "string"
|
|
1262
|
+
},
|
|
1263
|
+
schema: {
|
|
1264
|
+
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.",
|
|
1265
|
+
oneOf: [
|
|
1266
|
+
{
|
|
1267
|
+
$ref: "#/$defs/AutoBeOpenApi.IJsonSchema.INumber"
|
|
1268
|
+
},
|
|
1269
|
+
{
|
|
1270
|
+
$ref: "#/$defs/AutoBeOpenApi.IJsonSchema.IInteger"
|
|
1271
|
+
},
|
|
1272
|
+
{
|
|
1273
|
+
$ref: "#/$defs/AutoBeOpenApi.IJsonSchema.IString"
|
|
1274
|
+
}
|
|
1275
|
+
],
|
|
1276
|
+
discriminator: {
|
|
1277
|
+
propertyName: "type",
|
|
1278
|
+
mapping: {
|
|
1279
|
+
number: "#/$defs/AutoBeOpenApi.IJsonSchema.INumber",
|
|
1280
|
+
integer: "#/$defs/AutoBeOpenApi.IJsonSchema.IInteger",
|
|
1281
|
+
string: "#/$defs/AutoBeOpenApi.IJsonSchema.IString"
|
|
1282
|
+
}
|
|
861
1283
|
}
|
|
862
1284
|
}
|
|
863
|
-
}
|
|
864
|
-
},
|
|
865
|
-
required: [
|
|
866
|
-
"name",
|
|
867
|
-
"description",
|
|
868
|
-
"schema"
|
|
869
|
-
]
|
|
870
|
-
},
|
|
871
|
-
"AutoBeOpenApi.IJsonSchema.INumber": {
|
|
872
|
-
description: "Number (double) type info.",
|
|
873
|
-
type: "object",
|
|
874
|
-
properties: {
|
|
875
|
-
minimum: {
|
|
876
|
-
description: "Minimum value restriction.",
|
|
877
|
-
type: "number"
|
|
878
|
-
},
|
|
879
|
-
maximum: {
|
|
880
|
-
description: "Maximum value restriction.",
|
|
881
|
-
type: "number"
|
|
882
|
-
},
|
|
883
|
-
exclusiveMinimum: {
|
|
884
|
-
description: "Exclusive minimum value restriction.",
|
|
885
|
-
type: "number"
|
|
886
|
-
},
|
|
887
|
-
exclusiveMaximum: {
|
|
888
|
-
description: "Exclusive maximum value restriction.",
|
|
889
|
-
type: "number"
|
|
890
1285
|
},
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
description: "Discriminator value of the type.",
|
|
897
|
-
type: "string",
|
|
898
|
-
"enum": [
|
|
899
|
-
"number"
|
|
900
|
-
]
|
|
901
|
-
}
|
|
1286
|
+
required: [
|
|
1287
|
+
"name",
|
|
1288
|
+
"description",
|
|
1289
|
+
"schema"
|
|
1290
|
+
]
|
|
902
1291
|
},
|
|
903
|
-
|
|
904
|
-
"type"
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
1292
|
+
"AutoBeOpenApi.IJsonSchema.INumber": {
|
|
1293
|
+
description: "Number (double) type info.",
|
|
1294
|
+
type: "object",
|
|
1295
|
+
properties: {
|
|
1296
|
+
minimum: {
|
|
1297
|
+
description: "Minimum value restriction.",
|
|
1298
|
+
type: "number"
|
|
1299
|
+
},
|
|
1300
|
+
maximum: {
|
|
1301
|
+
description: "Maximum value restriction.",
|
|
1302
|
+
type: "number"
|
|
1303
|
+
},
|
|
1304
|
+
exclusiveMinimum: {
|
|
1305
|
+
description: "Exclusive minimum value restriction.",
|
|
1306
|
+
type: "number"
|
|
1307
|
+
},
|
|
1308
|
+
exclusiveMaximum: {
|
|
1309
|
+
description: "Exclusive maximum value restriction.",
|
|
1310
|
+
type: "number"
|
|
1311
|
+
},
|
|
1312
|
+
multipleOf: {
|
|
1313
|
+
description: "Multiple of value restriction.",
|
|
1314
|
+
type: "number",
|
|
1315
|
+
exclusiveMinimum: 0
|
|
1316
|
+
},
|
|
1317
|
+
type: {
|
|
1318
|
+
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.",
|
|
1319
|
+
"const": "number"
|
|
1320
|
+
}
|
|
930
1321
|
},
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
"enum": [
|
|
935
|
-
"integer"
|
|
936
|
-
]
|
|
937
|
-
}
|
|
1322
|
+
required: [
|
|
1323
|
+
"type"
|
|
1324
|
+
]
|
|
938
1325
|
},
|
|
939
|
-
|
|
940
|
-
"type"
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
1326
|
+
"AutoBeOpenApi.IJsonSchema.IInteger": {
|
|
1327
|
+
description: "Integer type info.",
|
|
1328
|
+
type: "object",
|
|
1329
|
+
properties: {
|
|
1330
|
+
minimum: {
|
|
1331
|
+
description: "Minimum value restriction.",
|
|
1332
|
+
type: "integer"
|
|
1333
|
+
},
|
|
1334
|
+
maximum: {
|
|
1335
|
+
description: "Maximum value restriction.",
|
|
1336
|
+
type: "integer"
|
|
1337
|
+
},
|
|
1338
|
+
exclusiveMinimum: {
|
|
1339
|
+
description: "Exclusive minimum value restriction.",
|
|
1340
|
+
type: "number"
|
|
1341
|
+
},
|
|
1342
|
+
exclusiveMaximum: {
|
|
1343
|
+
description: "Exclusive maximum value restriction.",
|
|
1344
|
+
type: "number"
|
|
1345
|
+
},
|
|
1346
|
+
multipleOf: {
|
|
1347
|
+
description: "Multiple of value restriction.",
|
|
1348
|
+
type: "integer",
|
|
1349
|
+
exclusiveMinimum: 0
|
|
1350
|
+
},
|
|
1351
|
+
type: {
|
|
1352
|
+
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.",
|
|
1353
|
+
"const": "integer"
|
|
1354
|
+
}
|
|
966
1355
|
},
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
"enum": [
|
|
971
|
-
"string"
|
|
972
|
-
]
|
|
973
|
-
}
|
|
1356
|
+
required: [
|
|
1357
|
+
"type"
|
|
1358
|
+
]
|
|
974
1359
|
},
|
|
975
|
-
|
|
976
|
-
"type"
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
1360
|
+
"AutoBeOpenApi.IJsonSchema.IString": {
|
|
1361
|
+
description: "String type info.",
|
|
1362
|
+
type: "object",
|
|
1363
|
+
properties: {
|
|
1364
|
+
format: {
|
|
1365
|
+
description: "Format restriction.",
|
|
1366
|
+
type: "string"
|
|
1367
|
+
},
|
|
1368
|
+
pattern: {
|
|
1369
|
+
description: "Pattern restriction.",
|
|
1370
|
+
type: "string"
|
|
1371
|
+
},
|
|
1372
|
+
contentMediaType: {
|
|
1373
|
+
description: "Content media type restriction.",
|
|
1374
|
+
type: "string"
|
|
1375
|
+
},
|
|
1376
|
+
minLength: {
|
|
1377
|
+
description: "Minimum length restriction.",
|
|
1378
|
+
type: "integer",
|
|
1379
|
+
minimum: 0
|
|
1380
|
+
},
|
|
1381
|
+
maxLength: {
|
|
1382
|
+
description: "Maximum length restriction.",
|
|
1383
|
+
type: "integer",
|
|
1384
|
+
minimum: 0
|
|
1385
|
+
},
|
|
1386
|
+
type: {
|
|
1387
|
+
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.",
|
|
1388
|
+
"const": "string"
|
|
1389
|
+
}
|
|
986
1390
|
},
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
}
|
|
1391
|
+
required: [
|
|
1392
|
+
"type"
|
|
1393
|
+
]
|
|
991
1394
|
},
|
|
992
|
-
|
|
993
|
-
"description",
|
|
994
|
-
"
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1395
|
+
"AutoBeOpenApi.IRequestBody": {
|
|
1396
|
+
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```",
|
|
1397
|
+
type: "object",
|
|
1398
|
+
properties: {
|
|
1399
|
+
description: {
|
|
1400
|
+
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.",
|
|
1401
|
+
type: "string"
|
|
1402
|
+
},
|
|
1403
|
+
typeName: {
|
|
1404
|
+
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```",
|
|
1405
|
+
type: "string"
|
|
1406
|
+
}
|
|
1004
1407
|
},
|
|
1005
|
-
|
|
1006
|
-
description
|
|
1007
|
-
|
|
1008
|
-
|
|
1408
|
+
required: [
|
|
1409
|
+
"description",
|
|
1410
|
+
"typeName"
|
|
1411
|
+
]
|
|
1009
1412
|
},
|
|
1010
|
-
|
|
1011
|
-
"description",
|
|
1012
|
-
"
|
|
1013
|
-
|
|
1413
|
+
"AutoBeOpenApi.IResponseBody": {
|
|
1414
|
+
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```",
|
|
1415
|
+
type: "object",
|
|
1416
|
+
properties: {
|
|
1417
|
+
description: {
|
|
1418
|
+
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.",
|
|
1419
|
+
type: "string"
|
|
1420
|
+
},
|
|
1421
|
+
typeName: {
|
|
1422
|
+
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```",
|
|
1423
|
+
type: "string"
|
|
1424
|
+
}
|
|
1425
|
+
},
|
|
1426
|
+
required: [
|
|
1427
|
+
"description",
|
|
1428
|
+
"typeName"
|
|
1429
|
+
]
|
|
1430
|
+
}
|
|
1014
1431
|
}
|
|
1015
|
-
}
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1432
|
+
},
|
|
1433
|
+
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.",
|
|
1434
|
+
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.authorizationRole || "string" === typeof input.authorizationRole && (RegExp("^[a-z][a-zA-Z0-9]*$").test(input.authorizationRole) && 1 <= input.authorizationRole.length)) && ("string" === typeof input.name && RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name)) && ("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 || "string" === typeof 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 _iu0 = input => (() => {
|
|
1435
|
+
if ("number" === input.type)
|
|
1436
|
+
return _io4(input);
|
|
1437
|
+
else if ("integer" === input.type)
|
|
1438
|
+
return _io3(input);
|
|
1439
|
+
else if ("string" === input.type)
|
|
1440
|
+
return _io5(input);
|
|
1441
|
+
else
|
|
1442
|
+
return false;
|
|
1443
|
+
})(); const _vo0 = (input, _path, _exceptionable = true) => [(Array.isArray(input.operations) || _report(_exceptionable, {
|
|
1444
|
+
path: _path + ".operations",
|
|
1445
|
+
expected: "(Array<AutoBeOpenApi.IOperation> & MinItems<1>)",
|
|
1446
|
+
value: input.operations
|
|
1447
|
+
})) && ((1 <= input.operations.length || _report(_exceptionable, {
|
|
1448
|
+
path: _path + ".operations",
|
|
1449
|
+
expected: "Array<> & MinItems<1>",
|
|
1450
|
+
value: input.operations
|
|
1451
|
+
})) && input.operations.map((elem, _index3) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
1452
|
+
path: _path + ".operations[" + _index3 + "]",
|
|
1453
|
+
expected: "AutoBeOpenApi.IOperation",
|
|
1454
|
+
value: elem
|
|
1455
|
+
})) && _vo1(elem, _path + ".operations[" + _index3 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
1456
|
+
path: _path + ".operations[" + _index3 + "]",
|
|
1457
|
+
expected: "AutoBeOpenApi.IOperation",
|
|
1458
|
+
value: elem
|
|
1459
|
+
})).every(flag => flag)) || _report(_exceptionable, {
|
|
1460
|
+
path: _path + ".operations",
|
|
1461
|
+
expected: "(Array<AutoBeOpenApi.IOperation> & MinItems<1>)",
|
|
1462
|
+
value: input.operations
|
|
1463
|
+
})].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.specification || _report(_exceptionable, {
|
|
1464
|
+
path: _path + ".specification",
|
|
1465
|
+
expected: "string",
|
|
1466
|
+
value: input.specification
|
|
1467
|
+
}), null === input.authorizationType || "login" === input.authorizationType || "join" === input.authorizationType || "refresh" === input.authorizationType || _report(_exceptionable, {
|
|
1468
|
+
path: _path + ".authorizationType",
|
|
1469
|
+
expected: "(\"join\" | \"login\" | \"refresh\" | null)",
|
|
1470
|
+
value: input.authorizationType
|
|
1471
|
+
}), "string" === typeof input.description || _report(_exceptionable, {
|
|
1472
|
+
path: _path + ".description",
|
|
1473
|
+
expected: "string",
|
|
1474
|
+
value: input.description
|
|
1475
|
+
}), "string" === typeof input.summary || _report(_exceptionable, {
|
|
1476
|
+
path: _path + ".summary",
|
|
1477
|
+
expected: "string",
|
|
1478
|
+
value: input.summary
|
|
1479
|
+
}), (Array.isArray(input.parameters) || _report(_exceptionable, {
|
|
1480
|
+
path: _path + ".parameters",
|
|
1481
|
+
expected: "Array<AutoBeOpenApi.IParameter>",
|
|
1482
|
+
value: input.parameters
|
|
1483
|
+
})) && input.parameters.map((elem, _index4) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
|
|
1484
|
+
path: _path + ".parameters[" + _index4 + "]",
|
|
1485
|
+
expected: "AutoBeOpenApi.IParameter",
|
|
1486
|
+
value: elem
|
|
1487
|
+
})) && _vo2(elem, _path + ".parameters[" + _index4 + "]", true && _exceptionable) || _report(_exceptionable, {
|
|
1488
|
+
path: _path + ".parameters[" + _index4 + "]",
|
|
1489
|
+
expected: "AutoBeOpenApi.IParameter",
|
|
1490
|
+
value: elem
|
|
1491
|
+
})).every(flag => flag) || _report(_exceptionable, {
|
|
1492
|
+
path: _path + ".parameters",
|
|
1493
|
+
expected: "Array<AutoBeOpenApi.IParameter>",
|
|
1494
|
+
value: input.parameters
|
|
1495
|
+
}), null === input.requestBody || ("object" === typeof input.requestBody && null !== input.requestBody || _report(_exceptionable, {
|
|
1496
|
+
path: _path + ".requestBody",
|
|
1497
|
+
expected: "(AutoBeOpenApi.IRequestBody | null)",
|
|
1498
|
+
value: input.requestBody
|
|
1499
|
+
})) && _vo6(input.requestBody, _path + ".requestBody", true && _exceptionable) || _report(_exceptionable, {
|
|
1500
|
+
path: _path + ".requestBody",
|
|
1501
|
+
expected: "(AutoBeOpenApi.IRequestBody | null)",
|
|
1502
|
+
value: input.requestBody
|
|
1503
|
+
}), null === input.responseBody || ("object" === typeof input.responseBody && null !== input.responseBody || _report(_exceptionable, {
|
|
1504
|
+
path: _path + ".responseBody",
|
|
1505
|
+
expected: "(AutoBeOpenApi.IResponseBody | null)",
|
|
1506
|
+
value: input.responseBody
|
|
1507
|
+
})) && _vo7(input.responseBody, _path + ".responseBody", true && _exceptionable) || _report(_exceptionable, {
|
|
1508
|
+
path: _path + ".responseBody",
|
|
1509
|
+
expected: "(AutoBeOpenApi.IResponseBody | null)",
|
|
1510
|
+
value: input.responseBody
|
|
1511
|
+
}), null === input.authorizationRole || "string" === typeof input.authorizationRole && (RegExp("^[a-z][a-zA-Z0-9]*$").test(input.authorizationRole) || _report(_exceptionable, {
|
|
1512
|
+
path: _path + ".authorizationRole",
|
|
1513
|
+
expected: "string & CamelPattern",
|
|
1514
|
+
value: input.authorizationRole
|
|
1515
|
+
})) && (1 <= input.authorizationRole.length || _report(_exceptionable, {
|
|
1516
|
+
path: _path + ".authorizationRole",
|
|
1517
|
+
expected: "string & MinLength<1>",
|
|
1518
|
+
value: input.authorizationRole
|
|
1519
|
+
})) || _report(_exceptionable, {
|
|
1520
|
+
path: _path + ".authorizationRole",
|
|
1521
|
+
expected: "((string & CamelPattern & MinLength<1>) | null)",
|
|
1522
|
+
value: input.authorizationRole
|
|
1523
|
+
}), "string" === typeof input.name && (RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name) || _report(_exceptionable, {
|
|
1524
|
+
path: _path + ".name",
|
|
1525
|
+
expected: "string & CamelPattern",
|
|
1526
|
+
value: input.name
|
|
1527
|
+
})) || _report(_exceptionable, {
|
|
1528
|
+
path: _path + ".name",
|
|
1529
|
+
expected: "(string & CamelPattern)",
|
|
1530
|
+
value: input.name
|
|
1531
|
+
}), "string" === typeof input.path && (RegExp("^\\/[a-zA-Z0-9\\/_{}.-]*$").test(input.path) || _report(_exceptionable, {
|
|
1532
|
+
path: _path + ".path",
|
|
1533
|
+
expected: "string & Pattern<\"^\\\\/[a-zA-Z0-9\\\\/_{}.-]*$\">",
|
|
1534
|
+
value: input.path
|
|
1535
|
+
})) || _report(_exceptionable, {
|
|
1536
|
+
path: _path + ".path",
|
|
1537
|
+
expected: "(string & Pattern<\"^\\\\/[a-zA-Z0-9\\\\/_{}.-]*$\">)",
|
|
1538
|
+
value: input.path
|
|
1539
|
+
}), "get" === input.method || "post" === input.method || "put" === input.method || "delete" === input.method || "patch" === input.method || _report(_exceptionable, {
|
|
1540
|
+
path: _path + ".method",
|
|
1541
|
+
expected: "(\"delete\" | \"get\" | \"patch\" | \"post\" | \"put\")",
|
|
1542
|
+
value: input.method
|
|
1543
|
+
})].every(flag => flag); const _vo2 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name) || _report(_exceptionable, {
|
|
1544
|
+
path: _path + ".name",
|
|
1545
|
+
expected: "string & CamelPattern",
|
|
1546
|
+
value: input.name
|
|
1547
|
+
})) || _report(_exceptionable, {
|
|
1548
|
+
path: _path + ".name",
|
|
1549
|
+
expected: "(string & CamelPattern)",
|
|
1550
|
+
value: input.name
|
|
1551
|
+
}), "string" === typeof input.description || _report(_exceptionable, {
|
|
1552
|
+
path: _path + ".description",
|
|
1553
|
+
expected: "string",
|
|
1554
|
+
value: input.description
|
|
1555
|
+
}), ("object" === typeof input.schema && null !== input.schema || _report(_exceptionable, {
|
|
1556
|
+
path: _path + ".schema",
|
|
1557
|
+
expected: "(AutoBeOpenApi.IJsonSchema.IInteger | AutoBeOpenApi.IJsonSchema.INumber | AutoBeOpenApi.IJsonSchema.IString)",
|
|
1558
|
+
value: input.schema
|
|
1559
|
+
})) && _vu0(input.schema, _path + ".schema", true && _exceptionable) || _report(_exceptionable, {
|
|
1560
|
+
path: _path + ".schema",
|
|
1561
|
+
expected: "(AutoBeOpenApi.IJsonSchema.IInteger | AutoBeOpenApi.IJsonSchema.INumber | AutoBeOpenApi.IJsonSchema.IString)",
|
|
1562
|
+
value: input.schema
|
|
1563
|
+
})].every(flag => flag); const _vo3 = (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, {
|
|
1564
|
+
path: _path + ".minimum",
|
|
1565
|
+
expected: "number & Type<\"int64\">",
|
|
1566
|
+
value: input.minimum
|
|
1567
|
+
})) || _report(_exceptionable, {
|
|
1568
|
+
path: _path + ".minimum",
|
|
1569
|
+
expected: "((number & Type<\"int64\">) | undefined)",
|
|
1570
|
+
value: input.minimum
|
|
1571
|
+
}), undefined === input.maximum || "number" === typeof input.maximum && (Math.floor(input.maximum) === input.maximum && -9223372036854776000 <= input.maximum && input.maximum <= 9223372036854776000 || _report(_exceptionable, {
|
|
1572
|
+
path: _path + ".maximum",
|
|
1573
|
+
expected: "number & Type<\"int64\">",
|
|
1574
|
+
value: input.maximum
|
|
1575
|
+
})) || _report(_exceptionable, {
|
|
1576
|
+
path: _path + ".maximum",
|
|
1577
|
+
expected: "((number & Type<\"int64\">) | undefined)",
|
|
1578
|
+
value: input.maximum
|
|
1579
|
+
}), undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum || _report(_exceptionable, {
|
|
1580
|
+
path: _path + ".exclusiveMinimum",
|
|
1581
|
+
expected: "(number | undefined)",
|
|
1582
|
+
value: input.exclusiveMinimum
|
|
1583
|
+
}), undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum || _report(_exceptionable, {
|
|
1584
|
+
path: _path + ".exclusiveMaximum",
|
|
1585
|
+
expected: "(number | undefined)",
|
|
1586
|
+
value: input.exclusiveMaximum
|
|
1587
|
+
}), undefined === input.multipleOf || "number" === typeof input.multipleOf && (Math.floor(input.multipleOf) === input.multipleOf && 0 <= input.multipleOf && input.multipleOf <= 18446744073709552000 || _report(_exceptionable, {
|
|
1588
|
+
path: _path + ".multipleOf",
|
|
1589
|
+
expected: "number & Type<\"uint64\">",
|
|
1590
|
+
value: input.multipleOf
|
|
1591
|
+
})) && (0 < input.multipleOf || _report(_exceptionable, {
|
|
1592
|
+
path: _path + ".multipleOf",
|
|
1593
|
+
expected: "number & ExclusiveMinimum<0>",
|
|
1594
|
+
value: input.multipleOf
|
|
1595
|
+
})) || _report(_exceptionable, {
|
|
1596
|
+
path: _path + ".multipleOf",
|
|
1597
|
+
expected: "((number & Type<\"uint64\"> & ExclusiveMinimum<0>) | undefined)",
|
|
1598
|
+
value: input.multipleOf
|
|
1599
|
+
}), "integer" === input.type || _report(_exceptionable, {
|
|
1600
|
+
path: _path + ".type",
|
|
1601
|
+
expected: "\"integer\"",
|
|
1602
|
+
value: input.type
|
|
1603
|
+
})].every(flag => flag); const _vo4 = (input, _path, _exceptionable = true) => [undefined === input.minimum || "number" === typeof input.minimum || _report(_exceptionable, {
|
|
1604
|
+
path: _path + ".minimum",
|
|
1605
|
+
expected: "(number | undefined)",
|
|
1606
|
+
value: input.minimum
|
|
1607
|
+
}), undefined === input.maximum || "number" === typeof input.maximum || _report(_exceptionable, {
|
|
1608
|
+
path: _path + ".maximum",
|
|
1609
|
+
expected: "(number | undefined)",
|
|
1610
|
+
value: input.maximum
|
|
1611
|
+
}), undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum || _report(_exceptionable, {
|
|
1612
|
+
path: _path + ".exclusiveMinimum",
|
|
1613
|
+
expected: "(number | undefined)",
|
|
1614
|
+
value: input.exclusiveMinimum
|
|
1615
|
+
}), undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum || _report(_exceptionable, {
|
|
1616
|
+
path: _path + ".exclusiveMaximum",
|
|
1617
|
+
expected: "(number | undefined)",
|
|
1618
|
+
value: input.exclusiveMaximum
|
|
1619
|
+
}), undefined === input.multipleOf || "number" === typeof input.multipleOf && (0 < input.multipleOf || _report(_exceptionable, {
|
|
1620
|
+
path: _path + ".multipleOf",
|
|
1621
|
+
expected: "number & ExclusiveMinimum<0>",
|
|
1622
|
+
value: input.multipleOf
|
|
1623
|
+
})) || _report(_exceptionable, {
|
|
1624
|
+
path: _path + ".multipleOf",
|
|
1625
|
+
expected: "((number & ExclusiveMinimum<0>) | undefined)",
|
|
1626
|
+
value: input.multipleOf
|
|
1627
|
+
}), "number" === input.type || _report(_exceptionable, {
|
|
1628
|
+
path: _path + ".type",
|
|
1629
|
+
expected: "\"number\"",
|
|
1630
|
+
value: input.type
|
|
1631
|
+
})].every(flag => flag); const _vo5 = (input, _path, _exceptionable = true) => [undefined === input.format || "string" === typeof input.format || _report(_exceptionable, {
|
|
1632
|
+
path: _path + ".format",
|
|
1633
|
+
expected: "(string | undefined)",
|
|
1634
|
+
value: input.format
|
|
1635
|
+
}), undefined === input.pattern || "string" === typeof input.pattern || _report(_exceptionable, {
|
|
1636
|
+
path: _path + ".pattern",
|
|
1637
|
+
expected: "(string | undefined)",
|
|
1638
|
+
value: input.pattern
|
|
1639
|
+
}), undefined === input.contentMediaType || "string" === typeof input.contentMediaType || _report(_exceptionable, {
|
|
1640
|
+
path: _path + ".contentMediaType",
|
|
1641
|
+
expected: "(string | undefined)",
|
|
1642
|
+
value: input.contentMediaType
|
|
1643
|
+
}), undefined === input.minLength || "number" === typeof input.minLength && (Math.floor(input.minLength) === input.minLength && 0 <= input.minLength && input.minLength <= 18446744073709552000 || _report(_exceptionable, {
|
|
1644
|
+
path: _path + ".minLength",
|
|
1645
|
+
expected: "number & Type<\"uint64\">",
|
|
1646
|
+
value: input.minLength
|
|
1647
|
+
})) || _report(_exceptionable, {
|
|
1648
|
+
path: _path + ".minLength",
|
|
1649
|
+
expected: "((number & Type<\"uint64\">) | undefined)",
|
|
1650
|
+
value: input.minLength
|
|
1651
|
+
}), undefined === input.maxLength || "number" === typeof input.maxLength && (Math.floor(input.maxLength) === input.maxLength && 0 <= input.maxLength && input.maxLength <= 18446744073709552000 || _report(_exceptionable, {
|
|
1652
|
+
path: _path + ".maxLength",
|
|
1653
|
+
expected: "number & Type<\"uint64\">",
|
|
1654
|
+
value: input.maxLength
|
|
1655
|
+
})) || _report(_exceptionable, {
|
|
1656
|
+
path: _path + ".maxLength",
|
|
1657
|
+
expected: "((number & Type<\"uint64\">) | undefined)",
|
|
1658
|
+
value: input.maxLength
|
|
1659
|
+
}), "string" === input.type || _report(_exceptionable, {
|
|
1660
|
+
path: _path + ".type",
|
|
1661
|
+
expected: "\"string\"",
|
|
1662
|
+
value: input.type
|
|
1663
|
+
})].every(flag => flag); const _vo6 = (input, _path, _exceptionable = true) => ["string" === typeof input.description || _report(_exceptionable, {
|
|
1664
|
+
path: _path + ".description",
|
|
1665
|
+
expected: "string",
|
|
1666
|
+
value: input.description
|
|
1667
|
+
}), "string" === typeof input.typeName || _report(_exceptionable, {
|
|
1668
|
+
path: _path + ".typeName",
|
|
1669
|
+
expected: "string",
|
|
1670
|
+
value: input.typeName
|
|
1671
|
+
})].every(flag => flag); const _vo7 = (input, _path, _exceptionable = true) => ["string" === typeof input.description || _report(_exceptionable, {
|
|
1672
|
+
path: _path + ".description",
|
|
1673
|
+
expected: "string",
|
|
1674
|
+
value: input.description
|
|
1675
|
+
}), "string" === typeof input.typeName || _report(_exceptionable, {
|
|
1676
|
+
path: _path + ".typeName",
|
|
1677
|
+
expected: "string",
|
|
1678
|
+
value: input.typeName
|
|
1679
|
+
})].every(flag => flag); const _vu0 = (input, _path, _exceptionable = true) => (() => {
|
|
1680
|
+
if ("number" === input.type)
|
|
1681
|
+
return _vo4(input, _path, true && _exceptionable);
|
|
1682
|
+
else if ("integer" === input.type)
|
|
1683
|
+
return _vo3(input, _path, true && _exceptionable);
|
|
1684
|
+
else if ("string" === input.type)
|
|
1685
|
+
return _vo5(input, _path, true && _exceptionable);
|
|
1686
|
+
else
|
|
1687
|
+
return _report(_exceptionable, {
|
|
1688
|
+
path: _path,
|
|
1689
|
+
expected: "(AutoBeOpenApi.IJsonSchema.INumber | AutoBeOpenApi.IJsonSchema.IInteger | AutoBeOpenApi.IJsonSchema.IString)",
|
|
1690
|
+
value: input
|
|
1691
|
+
});
|
|
1692
|
+
})(); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
|
|
1693
|
+
if (false === __is(input)) {
|
|
1694
|
+
errors = [];
|
|
1695
|
+
_report = __typia_transform__validateReport._validateReport(errors);
|
|
1696
|
+
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
|
|
1697
|
+
path: _path + "",
|
|
1698
|
+
expected: "IAutoBeInterfaceAuthorizationsApplication.IProps",
|
|
1699
|
+
value: input
|
|
1700
|
+
})) && _vo0(input, _path + "", true) || _report(true, {
|
|
1701
|
+
path: _path + "",
|
|
1702
|
+
expected: "IAutoBeInterfaceAuthorizationsApplication.IProps",
|
|
1703
|
+
value: input
|
|
1704
|
+
}))(input, "$input", true);
|
|
1705
|
+
const success = 0 === errors.length;
|
|
1706
|
+
return success ? {
|
|
1707
|
+
success,
|
|
1708
|
+
data: input
|
|
1709
|
+
} : {
|
|
1710
|
+
success,
|
|
1711
|
+
errors,
|
|
1712
|
+
data: input
|
|
1713
|
+
};
|
|
1714
|
+
}
|
|
1715
|
+
return {
|
|
1716
|
+
success: true,
|
|
1292
1717
|
data: input
|
|
1293
1718
|
};
|
|
1294
|
-
}
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
deepseek: claude,
|
|
1306
|
-
"3.1": claude,
|
|
1719
|
+
}; })()
|
|
1720
|
+
}
|
|
1721
|
+
]
|
|
1722
|
+
};
|
|
1723
|
+
__typia_transform__llmApplicationFinalize._llmApplicationFinalize(application, Object.assign(Object.assign({}, {
|
|
1724
|
+
validate: {
|
|
1725
|
+
makeOperations: validate,
|
|
1726
|
+
},
|
|
1727
|
+
}), { equals: false }));
|
|
1728
|
+
return application;
|
|
1729
|
+
})(),
|
|
1307
1730
|
};
|
|
1308
1731
|
//# sourceMappingURL=orchestrateInterfaceAuthorizations.js.map
|