@autobe/agent 0.25.7 → 0.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/AutoBeAgent.js +3 -0
- package/lib/AutoBeAgent.js.map +1 -1
- package/lib/AutoBeMockAgent.js +15 -12
- package/lib/AutoBeMockAgent.js.map +1 -1
- package/lib/constants/AutoBeSystemPromptConstant.d.ts +26 -19
- package/lib/constants/AutoBeSystemPromptConstant.js.map +1 -1
- package/lib/factory/consentFunctionCall.js +3 -0
- package/lib/factory/consentFunctionCall.js.map +1 -1
- package/lib/factory/createAutoBeContext.js +4 -1
- package/lib/factory/createAutoBeContext.js.map +1 -1
- package/lib/factory/getCommonPrompt.d.ts +2 -0
- package/lib/factory/getCommonPrompt.js +20 -0
- package/lib/factory/getCommonPrompt.js.map +1 -0
- package/lib/index.mjs +2636 -2258
- package/lib/index.mjs.map +1 -1
- package/lib/orchestrate/analyze/histories/transformAnalyzeReviewHistories.js +1 -1
- package/lib/orchestrate/analyze/histories/transformAnalyzeReviewHistories.js.map +1 -1
- package/lib/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js +2 -2
- package/lib/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js.map +1 -1
- package/lib/orchestrate/analyze/histories/transformAnalyzeWriteHistories.js +6 -6
- package/lib/orchestrate/analyze/histories/transformAnalyzeWriteHistories.js.map +1 -1
- package/lib/orchestrate/analyze/orchestrateAnalyze.js +1 -1
- package/lib/orchestrate/analyze/orchestrateAnalyze.js.map +1 -1
- package/lib/orchestrate/analyze/orchestrateAnalyzeScenario.js +73 -73
- package/lib/orchestrate/analyze/orchestrateAnalyzeScenario.js.map +1 -1
- package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.js +2 -2
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.d.ts +9 -9
- package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeWriteApplication.d.ts +1 -1
- package/lib/orchestrate/common/histories/transformCommonCorrectCastingHistories.js +2 -17
- package/lib/orchestrate/common/histories/transformCommonCorrectCastingHistories.js.map +1 -1
- package/lib/orchestrate/common/histories/transformPreviousAndLatestCorrectHistories.d.ts +6 -0
- package/lib/orchestrate/common/histories/transformPreviousAndLatestCorrectHistories.js +58 -0
- package/lib/orchestrate/common/histories/transformPreviousAndLatestCorrectHistories.js.map +1 -0
- package/lib/orchestrate/facade/transformFacadeStateMessage.js +1 -1
- package/lib/orchestrate/facade/transformFacadeStateMessage.js.map +1 -1
- package/lib/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.d.ts +2 -2
- package/lib/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.js +8 -8
- package/lib/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.js.map +1 -1
- package/lib/orchestrate/interface/histories/transformInterfaceComplementHistories.js +3 -3
- package/lib/orchestrate/interface/histories/transformInterfaceComplementHistories.js.map +1 -1
- package/lib/orchestrate/interface/histories/transformInterfaceEndpointHistories.js +1 -1
- package/lib/orchestrate/interface/histories/transformInterfaceEndpointHistories.js.map +1 -1
- package/lib/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.js +1 -1
- package/lib/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.js.map +1 -1
- package/lib/orchestrate/interface/histories/transformInterfaceGroupHistories.js +2 -2
- package/lib/orchestrate/interface/histories/transformInterfaceGroupHistories.js.map +1 -1
- package/lib/orchestrate/interface/histories/transformInterfaceOperationHistories.js +1 -1
- package/lib/orchestrate/interface/histories/transformInterfaceOperationHistories.js.map +1 -1
- package/lib/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js +2 -2
- package/lib/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js.map +1 -1
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaHistories.d.ts +1 -0
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaHistories.js +46 -20
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaHistories.js.map +1 -1
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaRenameHistories.d.ts +5 -0
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaRenameHistories.js +51 -0
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaRenameHistories.js.map +1 -0
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaReviewHistories.d.ts +11 -0
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaReviewHistories.js +81 -0
- package/lib/orchestrate/interface/histories/transformInterfaceSchemaReviewHistories.js.map +1 -0
- package/lib/orchestrate/interface/orchestrateInterface.js +24 -4
- package/lib/orchestrate/interface/orchestrateInterface.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceAuthorizations.js +52 -52
- package/lib/orchestrate/interface/orchestrateInterfaceAuthorizations.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.js +2 -2
- package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceEndpointsReview.js +2 -2
- package/lib/orchestrate/interface/orchestrateInterfaceEndpointsReview.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceGroups.d.ts +2 -2
- package/lib/orchestrate/interface/orchestrateInterfaceGroups.js +2 -2
- package/lib/orchestrate/interface/orchestrateInterfaceGroups.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceOperations.js +57 -57
- package/lib/orchestrate/interface/orchestrateInterfaceOperations.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceOperationsReview.js +43 -43
- package/lib/orchestrate/interface/orchestrateInterfaceOperationsReview.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfacePrerequisites.js +4 -4
- package/lib/orchestrate/interface/orchestrateInterfacePrerequisites.js.map +1 -1
- package/lib/orchestrate/interface/orchestrateInterfaceSchemaRename.d.ts +7 -0
- package/lib/orchestrate/interface/orchestrateInterfaceSchemaRename.js +444 -0
- package/lib/orchestrate/interface/orchestrateInterfaceSchemaRename.js.map +1 -0
- package/lib/orchestrate/interface/orchestrateInterfaceSchemaReview.d.ts +12 -0
- package/lib/orchestrate/interface/{orchestrateInterfaceSchemasReview.js → orchestrateInterfaceSchemaReview.js} +66 -57
- package/lib/orchestrate/interface/orchestrateInterfaceSchemaReview.js.map +1 -0
- package/lib/orchestrate/interface/orchestrateInterfaceSchemas.js +9 -6
- package/lib/orchestrate/interface/orchestrateInterfaceSchemas.js.map +1 -1
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.d.ts +22 -22
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.d.ts +7 -7
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaContentReviewApplication.d.ts +101 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaContentReviewApplication.js +3 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaContentReviewApplication.js.map +1 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaRelationReviewApplication.d.ts +97 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaRelationReviewApplication.js +3 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaRelationReviewApplication.js.map +1 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaRenameApplication.d.ts +44 -0
- package/lib/orchestrate/interface/structures/{IAutobeInterfaceSchemasReviewApplication.js → IAutoBeInterfaceSchemaRenameApplication.js} +1 -1
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaRenameApplication.js.map +1 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaSecurityReviewApplication.d.ts +92 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaSecurityReviewApplication.js +3 -0
- package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaSecurityReviewApplication.js.map +1 -0
- package/lib/orchestrate/interface/utils/JsonSchemaFactory.js +42 -1
- package/lib/orchestrate/interface/utils/JsonSchemaFactory.js.map +1 -1
- package/lib/orchestrate/interface/utils/JsonSchemaValidator.js +94 -0
- package/lib/orchestrate/interface/utils/JsonSchemaValidator.js.map +1 -1
- package/lib/orchestrate/interface/utils/OperationValidator.d.ts +1 -1
- package/lib/orchestrate/prisma/histories/transformPrismaComponentsHistories.js +13 -13
- package/lib/orchestrate/prisma/histories/transformPrismaComponentsHistories.js.map +1 -1
- package/lib/orchestrate/prisma/histories/transformPrismaReviewHistories.js +1 -1
- package/lib/orchestrate/prisma/histories/transformPrismaReviewHistories.js.map +1 -1
- package/lib/orchestrate/prisma/histories/transformPrismaSchemaHistories.js +1 -1
- package/lib/orchestrate/prisma/histories/transformPrismaSchemaHistories.js.map +1 -1
- package/lib/orchestrate/prisma/orchestratePrismaComponent.d.ts +2 -2
- package/lib/orchestrate/prisma/orchestratePrismaComponent.js +2 -2
- package/lib/orchestrate/prisma/orchestratePrismaComponent.js.map +1 -1
- package/lib/orchestrate/prisma/orchestratePrismaSchemas.d.ts +2 -2
- package/lib/orchestrate/prisma/orchestratePrismaSchemas.js +2 -2
- package/lib/orchestrate/prisma/orchestratePrismaSchemas.js.map +1 -1
- package/lib/orchestrate/realize/histories/transformRealizeAuthorization.d.ts +2 -2
- package/lib/orchestrate/realize/histories/transformRealizeAuthorization.js +8 -7
- package/lib/orchestrate/realize/histories/transformRealizeAuthorization.js.map +1 -1
- package/lib/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.js +4 -4
- package/lib/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.js.map +1 -1
- package/lib/orchestrate/realize/histories/transformRealizeCorrectCastingHistories.d.ts +4 -7
- package/lib/orchestrate/realize/histories/transformRealizeCorrectCastingHistories.js +8 -18
- package/lib/orchestrate/realize/histories/transformRealizeCorrectCastingHistories.js.map +1 -1
- package/lib/orchestrate/realize/histories/transformRealizeCorrectHistories.d.ts +0 -1
- package/lib/orchestrate/realize/histories/transformRealizeCorrectHistories.js +8 -28
- package/lib/orchestrate/realize/histories/transformRealizeCorrectHistories.js.map +1 -1
- package/lib/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.d.ts +1 -1
- package/lib/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.js +16 -280
- package/lib/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.js.map +1 -1
- package/lib/orchestrate/realize/histories/transformRealizeWriteHistories.js +1 -1
- package/lib/orchestrate/realize/histories/transformRealizeWriteHistories.js.map +1 -1
- package/lib/orchestrate/realize/orchestrateRealize.js +2 -2
- package/lib/orchestrate/realize/orchestrateRealize.js.map +1 -1
- package/lib/orchestrate/realize/orchestrateRealizeAuthorization.js +12 -12
- package/lib/orchestrate/realize/orchestrateRealizeAuthorization.js.map +1 -1
- package/lib/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js +9 -9
- package/lib/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js.map +1 -1
- package/lib/orchestrate/realize/orchestrateRealizeCorrect.d.ts +1 -1
- package/lib/orchestrate/realize/orchestrateRealizeCorrect.js +43 -22
- package/lib/orchestrate/realize/orchestrateRealizeCorrect.js.map +1 -1
- package/lib/orchestrate/realize/{orchestRateRealizeCorrectCasting.js → orchestrateRealizeCorrectCasting.js} +58 -46
- package/lib/orchestrate/realize/orchestrateRealizeCorrectCasting.js.map +1 -0
- package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.d.ts +3 -3
- package/lib/orchestrate/realize/utils/AutoBeRealizeAuthorizationReplaceImport.d.ts +2 -2
- package/lib/orchestrate/realize/utils/AutoBeRealizeAuthorizationReplaceImport.js +6 -6
- package/lib/orchestrate/realize/utils/AutoBeRealizeAuthorizationReplaceImport.js.map +1 -1
- package/lib/orchestrate/realize/utils/generateRealizeScenario.js +1 -1
- package/lib/orchestrate/realize/utils/generateRealizeScenario.js.map +1 -1
- package/lib/orchestrate/realize/utils/getRealizeWriteCodeTemplate.js +2 -2
- package/lib/orchestrate/realize/utils/getRealizeWriteCodeTemplate.js.map +1 -1
- package/lib/orchestrate/realize/utils/getRealizeWriteDto.js +1 -1
- package/lib/orchestrate/realize/utils/getRealizeWriteDto.js.map +1 -1
- package/lib/orchestrate/realize/utils/getRealizeWriteInputType.js +2 -2
- package/lib/orchestrate/realize/utils/getRealizeWriteInputType.js.map +1 -1
- package/lib/orchestrate/realize/utils/printErrorHints.js +1 -1
- package/lib/orchestrate/realize/utils/printErrorHints.js.map +1 -1
- package/lib/orchestrate/test/compile/getTestScenarioArtifacts.js +1 -1
- package/lib/orchestrate/test/compile/getTestScenarioArtifacts.js.map +1 -1
- package/lib/orchestrate/test/histories/transformTestCorrectHistories.js +5 -22
- package/lib/orchestrate/test/histories/transformTestCorrectHistories.js.map +1 -1
- package/lib/orchestrate/test/histories/transformTestCorrectInvalidRequestHistories.js +10 -10
- package/lib/orchestrate/test/histories/transformTestCorrectInvalidRequestHistories.js.map +1 -1
- package/lib/orchestrate/test/histories/transformTestScenarioHistories.js +5 -5
- package/lib/orchestrate/test/histories/transformTestScenarioHistories.js.map +1 -1
- package/lib/orchestrate/test/histories/transformTestScenarioReviewHistories.js +2 -2
- package/lib/orchestrate/test/histories/transformTestScenarioReviewHistories.js.map +1 -1
- package/lib/orchestrate/test/orchestrateTestCorrect.js +2 -0
- package/lib/orchestrate/test/orchestrateTestCorrect.js.map +1 -1
- package/lib/orchestrate/test/orchestrateTestCorrectInvalidRequest.js +1 -0
- package/lib/orchestrate/test/orchestrateTestCorrectInvalidRequest.js.map +1 -1
- package/lib/orchestrate/test/orchestrateTestScenario.js +26 -26
- package/lib/orchestrate/test/orchestrateTestScenario.js.map +1 -1
- package/lib/orchestrate/test/orchestrateTestScenarioReview.js +2 -2
- package/lib/orchestrate/test/orchestrateTestScenarioReview.js.map +1 -1
- package/lib/orchestrate/test/structures/{IAutoBeTestScenarioAuthorizationRole.d.ts → IAutoBeTestScenarioAuthorizationActor.d.ts} +1 -1
- package/lib/orchestrate/test/structures/{IAutoBeTestScenarioAuthorizationRole.js → IAutoBeTestScenarioAuthorizationActor.js} +1 -1
- package/lib/orchestrate/test/structures/IAutoBeTestScenarioAuthorizationActor.js.map +1 -0
- package/package.json +5 -5
- package/src/AutoBeAgent.ts +3 -0
- package/src/AutoBeMockAgent.ts +15 -12
- package/src/constants/AutoBeSystemPromptConstant.ts +26 -19
- package/src/factory/consentFunctionCall.ts +4 -0
- package/src/factory/createAutoBeContext.ts +5 -1
- package/src/factory/getCommonPrompt.ts +25 -0
- package/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.ts +5 -5
- package/src/orchestrate/analyze/orchestrateAnalyze.ts +1 -1
- package/src/orchestrate/analyze/orchestrateAnalyzeScenario.ts +3 -3
- package/src/orchestrate/analyze/structures/IAutoBeAnalyzeScenarioApplication.ts +9 -9
- package/src/orchestrate/analyze/structures/IAutoBeAnalyzeWriteApplication.ts +1 -1
- package/src/orchestrate/common/histories/transformCommonCorrectCastingHistories.ts +2 -20
- package/src/orchestrate/common/histories/transformPreviousAndLatestCorrectHistories.ts +65 -0
- package/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.ts +9 -9
- package/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.ts +45 -20
- package/src/orchestrate/interface/histories/transformInterfaceSchemaRenameHistories.ts +55 -0
- package/src/orchestrate/interface/histories/transformInterfaceSchemaReviewHistories.ts +90 -0
- package/src/orchestrate/interface/orchestrateInterface.ts +34 -14
- package/src/orchestrate/interface/orchestrateInterfaceAuthorizations.ts +18 -18
- package/src/orchestrate/interface/orchestrateInterfaceEndpoints.ts +4 -4
- package/src/orchestrate/interface/orchestrateInterfaceEndpointsReview.ts +2 -2
- package/src/orchestrate/interface/orchestrateInterfaceGroups.ts +5 -5
- package/src/orchestrate/interface/orchestrateInterfaceOperations.ts +23 -23
- package/src/orchestrate/interface/orchestrateInterfaceOperationsReview.ts +4 -4
- package/src/orchestrate/interface/orchestrateInterfacePrerequisites.ts +2 -2
- package/src/orchestrate/interface/orchestrateInterfaceSchemaRename.ts +269 -0
- package/src/orchestrate/interface/{orchestrateInterfaceSchemasReview.ts → orchestrateInterfaceSchemaReview.ts} +88 -70
- package/src/orchestrate/interface/orchestrateInterfaceSchemas.ts +16 -8
- package/src/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.ts +26 -22
- package/src/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.ts +7 -7
- package/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaContentReviewApplication.ts +108 -0
- package/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaRelationReviewApplication.ts +104 -0
- package/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaRenameApplication.ts +45 -0
- package/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaSecurityReviewApplication.ts +99 -0
- package/src/orchestrate/interface/utils/JsonSchemaFactory.ts +45 -3
- package/src/orchestrate/interface/utils/JsonSchemaValidator.ts +110 -0
- package/src/orchestrate/interface/utils/OperationValidator.ts +1 -1
- package/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.ts +12 -12
- package/src/orchestrate/prisma/orchestratePrisma.ts +4 -4
- package/src/orchestrate/prisma/orchestratePrismaComponent.ts +4 -4
- package/src/orchestrate/prisma/orchestratePrismaSchemas.ts +7 -7
- package/src/orchestrate/realize/histories/transformRealizeAuthorization.ts +8 -7
- package/src/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.ts +4 -4
- package/src/orchestrate/realize/histories/transformRealizeCorrectCastingHistories.ts +14 -28
- package/src/orchestrate/realize/histories/transformRealizeCorrectHistories.ts +13 -30
- package/src/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.ts +20 -285
- package/src/orchestrate/realize/orchestrateRealize.ts +1 -1
- package/src/orchestrate/realize/orchestrateRealizeAuthorization.ts +9 -9
- package/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.ts +3 -3
- package/src/orchestrate/realize/orchestrateRealizeCorrect.ts +74 -60
- package/src/orchestrate/realize/{orchestRateRealizeCorrectCasting.ts → orchestrateRealizeCorrectCasting.ts} +86 -85
- package/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.ts +3 -3
- package/src/orchestrate/realize/utils/AutoBeRealizeAuthorizationReplaceImport.ts +10 -7
- package/src/orchestrate/realize/utils/generateRealizeScenario.ts +1 -1
- package/src/orchestrate/realize/utils/getRealizeWriteCodeTemplate.ts +2 -2
- package/src/orchestrate/realize/utils/getRealizeWriteDto.ts +1 -1
- package/src/orchestrate/realize/utils/getRealizeWriteInputType.ts +2 -2
- package/src/orchestrate/realize/utils/printErrorHints.ts +1 -1
- package/src/orchestrate/test/compile/getTestScenarioArtifacts.ts +1 -1
- package/src/orchestrate/test/histories/transformTestCorrectHistories.ts +6 -24
- package/src/orchestrate/test/histories/transformTestCorrectInvalidRequestHistories.ts +10 -10
- package/src/orchestrate/test/histories/transformTestScenarioHistories.ts +12 -10
- package/src/orchestrate/test/orchestrateTestCorrect.ts +2 -0
- package/src/orchestrate/test/orchestrateTestCorrectInvalidRequest.ts +1 -0
- package/src/orchestrate/test/orchestrateTestScenario.ts +30 -30
- package/src/orchestrate/test/orchestrateTestScenarioReview.ts +2 -2
- package/src/orchestrate/test/structures/{IAutoBeTestScenarioAuthorizationRole.ts → IAutoBeTestScenarioAuthorizationActor.ts} +1 -1
- package/lib/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.d.ts +0 -4
- package/lib/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.js +0 -60
- package/lib/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.js.map +0 -1
- package/lib/orchestrate/interface/orchestrateInterfaceSchemasReview.d.ts +0 -9
- package/lib/orchestrate/interface/orchestrateInterfaceSchemasReview.js.map +0 -1
- package/lib/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.d.ts +0 -91
- package/lib/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.js.map +0 -1
- package/lib/orchestrate/realize/orchestRateRealizeCorrectCasting.js.map +0 -1
- package/lib/orchestrate/test/structures/IAutoBeTestScenarioAuthorizationRole.js.map +0 -1
- package/src/orchestrate/interface/histories/transformInterfaceSchemasReviewHistories.ts +0 -67
- package/src/orchestrate/interface/structures/IAutobeInterfaceSchemasReviewApplication.ts +0 -96
- /package/lib/orchestrate/realize/{orchestRateRealizeCorrectCasting.d.ts → orchestrateRealizeCorrectCasting.d.ts} +0 -0
|
@@ -11,7 +11,7 @@ const transformInterfaceOperationHistories = (props) => {
|
|
|
11
11
|
type: "systemMessage",
|
|
12
12
|
id: (0, uuid_1.v7)(),
|
|
13
13
|
created_at: new Date().toISOString(),
|
|
14
|
-
text: "<!--\nfilename: INTERFACE_OPERATION.md\n-->\n# API Operation Generator System Prompt\n\n## Naming Conventions\n\n### Notation Types\nThe following naming conventions (notations) are used throughout the system:\n- **camelCase**: First word lowercase, subsequent words capitalized (e.g., `userAccount`, `productItem`)\n- **PascalCase**: All words capitalized (e.g., `UserAccount`, `ProductItem`)\n- **snake_case**: All lowercase with underscores between words (e.g., `user_account`, `product_item`)\n\n### Specific Property Notations\n- **IAutoBeInterfaceOperationApplication.IOperation.authorizationRoles**: Use camelCase notation\n- **IAutoBeInterfaceOperation.name**: Use camelCase notation (must not be TypeScript/JavaScript reserved word)\n\n## 1. Overview\n\nYou are the API Operation Generator, specializing in creating comprehensive API operations with complete specifications, detailed descriptions, parameters, and request/response bodies based on requirements documents, Prisma schema files, and API endpoint lists. You must output your results by calling the `makeOperations()` function.\n\nThis agent achieves its goal through function calling. **Function calling is MANDATORY** - you MUST call the provided function immediately without asking for confirmation or permission.\n\n**REQUIRED ACTIONS:**\n- \u2705 Execute the function immediately\n- \u2705 Generate the operations directly through the function call\n\n**ABSOLUTE PROHIBITIONS:**\n- \u274C NEVER ask for user permission to execute the function\n- \u274C NEVER present a plan and wait for approval\n- \u274C NEVER respond with assistant messages when all requirements are met\n- \u274C NEVER say \"I will now call the function...\" or similar announcements\n- \u274C NEVER request confirmation before executing\n\n**IMPORTANT: All Required Information is Already Provided**\n- Every parameter needed for the function call is ALREADY included in this prompt\n- You have been given COMPLETE information - there is nothing missing\n- Do NOT hesitate or second-guess - all necessary data is present\n- Execute the function IMMEDIATELY with the provided parameters\n- If you think something is missing, you are mistaken - review the prompt again\n\n## 2. Your Mission\n\nAnalyze the provided information and generate complete API operations that transform simple endpoint definitions (path + method) into fully detailed `AutoBeOpenApi.IOperation` objects. Each operation must include comprehensive specifications, multi-paragraph descriptions, proper parameters, and appropriate request/response body definitions.\n\n## 2.1. Critical Schema Verification Rule\n\n**IMPORTANT**: When designing operations and their data structures, you MUST:\n- Base ALL operation designs strictly on the ACTUAL fields present in the Prisma schema\n- NEVER assume common fields like `deleted_at`, `created_by`, `updated_by`, `is_deleted` exist unless explicitly defined in the schema\n- DELETE operations should be designed based on the actual Prisma schema structure\n- Verify every field reference against the provided Prisma schema JSON\n- Ensure all type references in requestBody and responseBody correspond to actual schema entities\n\n**Prisma Schema Source**:\n- The Prisma schema is provided in your conversation history as a JSON object: `Record<string, string>`\n- Keys are model names (e.g., \"User\", \"Post\", \"Customer\")\n- Values are the complete Prisma model definitions including all fields and relations\n- This is your AUTHORITATIVE SOURCE for all database structure information\n\n## 2.2. Operation Design Philosophy\n\n**CRITICAL**: Focus on creating operations that serve actual user needs, not comprehensive coverage of every database table.\n\n**Role Multiplication Awareness**:\n- Remember: Each role in authorizationRoles creates a separate endpoint\n- Total generated endpoints = operations \u00D7 roles\n- Be intentional about which roles truly need separate endpoints\n\n**Design Principles**:\n- **User-Centric**: Create operations users actually need to perform\n- **Avoid Over-Engineering**: Not every table requires full CRUD operations\n- **System vs User Data**: Distinguish between what users manage vs what the system manages\n- **Business Logic Focus**: Operations should reflect business workflows, not database structure\n\n**Ask Before Creating Each Operation**:\n- Does a user actually perform this action?\n- Is this data user-managed or system-managed?\n- Will this operation ever be called from the UI/client?\n- Is this operation redundant with another operation?\n\n### 2.3. System-Generated Data: Critical Restrictions\n\n**\u26A0\uFE0F CRITICAL PRINCIPLE**: Data that is generated automatically by the system as side effects of other operations MUST NOT have manual creation/modification/deletion APIs.\n\n**Key Question**: \"Does the system create this data automatically when users perform other actions?\"\n- If YES \u2192 No POST/PUT/DELETE operations needed\n- If NO \u2192 Normal CRUD operations may be appropriate\n\n**System-Generated Data (ABSOLUTELY NO Write APIs)**:\n- **Audit Trails**: Created automatically when users perform actions\n - Example: When a user updates a post, the system automatically logs it\n - Implementation: Handled in provider/service logic, not separate API endpoints\n- **System Metrics**: Performance data collected automatically\n - Example: Response times, error rates, resource usage\n - Implementation: Monitoring libraries handle this internally\n- **Analytics Events**: User behavior tracked automatically\n - Example: Page views, click events, session duration\n - Implementation: Analytics SDK handles tracking internally\n\n**User-Managed Data (APIs Needed)**:\n- **Business Entities**: Core application data\n - Examples: users, posts, products, orders\n - Need: Full CRUD operations as per business requirements\n- **User Content**: Data created and managed by users\n - Examples: articles, comments, reviews, profiles\n - Need: Creation, editing, deletion APIs\n- **Configuration**: Settings users can modify\n - Examples: preferences, notification settings, display options\n - Need: Read and update operations\n\n**How System-Generated Data Works**:\n```typescript\n// Example: When user creates a post\nclass PostService {\n async create(data: CreatePostDto) {\n // Create the post\n const post = await this.prisma.post.create({ data });\n \n // System automatically logs this action (no separate API needed)\n await this.auditService.log({\n action: 'POST_CREATED',\n userId: data.userId,\n resourceId: post.id\n });\n \n // System automatically updates metrics (no separate API needed)\n await this.metricsService.increment('posts.created');\n \n return post;\n }\n}\n```\n\n**\uD83D\uDD34 CRITICAL PRINCIPLE**: If the requirements say \"THE system SHALL automatically [log/track/record]...\", this means the system handles it internally during normal operations. Creating manual APIs for this data is a FUNDAMENTAL ARCHITECTURAL ERROR.\n\n**Examples from Requirements**:\n- \u2705 \"Users SHALL create posts\" \u2192 Need POST /posts API\n- \u2705 \"Admins SHALL manage categories\" \u2192 Need CRUD /categories APIs\n- \u274C \"THE system SHALL log all user actions\" \u2192 Internal logging, no API\n- \u274C \"THE system SHALL track performance metrics\" \u2192 Internal monitoring, no API\n\n**Decision Framework**:\n\nAsk these questions for each table:\n1. **Who creates this data?**\n - User action \u2192 Need POST endpoint\n - System automatically \u2192 NO POST endpoint\n\n2. **Who modifies this data?**\n - User can edit \u2192 Need PUT/PATCH endpoint\n - System only \u2192 NO PUT endpoint\n\n3. **Can this data be deleted?**\n - User can delete \u2192 Need DELETE endpoint\n - Must be preserved for audit/compliance \u2192 NO DELETE endpoint\n\n4. **Do users need to view this data?**\n - Yes \u2192 Add GET/PATCH (search) endpoints\n - No \u2192 No read endpoints needed\n\n**Common Examples (Your project may differ)**:\n- Audit-related tables: Usually system records actions automatically\n- Metrics/Analytics tables: Usually system collects data automatically\n- History/Log tables: Often system-generated, but check requirements\n- Important: These are examples only - always check your specific requirements\n\n**How to Identify System-Generated Tables**:\n- Look for requirements language: \"THE system SHALL automatically...\"\n- Consider the table's purpose: Is it for tracking/recording system behavior?\n- Ask: \"Would a user ever manually create/edit/delete this data?\"\n- Examples (may vary by project):\n - Audit logs: System records actions automatically\n - Analytics events: System tracks user behavior automatically\n - Performance metrics: System collects measurements automatically\n\n**\u26A0\uFE0F MANDATORY**: DO NOT create operations for system-managed tables. These violate system integrity and create security vulnerabilities. Focus only on user-facing business operations.\n\n## 3. Input Materials\n\nYou will receive the following materials to guide your operation generation:\n\n### Requirements Analysis Report\n- Complete business requirements documentation\n- Functional specifications and workflows\n- User roles and permissions\n\n### Prisma Schema Information\n- Database schema with all tables and fields\n- Entity relationships and constraints\n- Available fields for each entity\n\n### Service Configuration\n- Service prefix for naming conventions (used for DTO type names)\n\n### Target Endpoints\n- List of endpoint paths and HTTP methods to implement\n- Each endpoint needs a corresponding operation\n\n### API Design Instructions\nAPI-specific instructions extracted by AI from the user's utterances, focusing ONLY on:\n- Request/response structure preferences\n- DTO schema design patterns\n- API behavior specifications\n- Error handling patterns\n- Operation naming conventions\n\n**IMPORTANT**: Follow these instructions when designing operation specifications. Carefully distinguish between:\n- Suggestions or recommendations (consider these as guidance)\n- Direct specifications or explicit commands (these must be followed exactly)\n\nWhen instructions contain direct specifications or explicit design decisions, follow them precisely even if you believe you have better alternatives - this is fundamental to your role as an AI assistant.\n\n## 4. Input Information\n\nYou will receive five types of information:\n1. **Requirements Analysis Document**: Functional requirements and business logic\n2. **Prisma Schema Files**: Database schema definitions with entities and relationships\n3. **API Endpoint Groups**: Group information with name and description that categorize the endpoints\n4. **API Endpoint List**: Simple endpoint definitions with path and method combinations\n5. **Service Prefix**: The service identifier that must be included in all DTO type names\n\n## 5. Output Format (Function Calling Interface)\n\nYou must return a structured output following the `IAutoBeInterfaceOperationApplication.IProps` interface:\n\n### TypeScript Interface\n\n```typescript\nexport namespace IAutoBeInterfaceOperationApplication {\n export interface IProps {\n operations: IOperation[]; // Array of API operations\n }\n \n // Each operation extends AutoBeOpenApi.IOperation but with authorizationRoles instead\n interface IOperation {\n specification: string; // REQUIRED: Detailed API specification\n path: string; // REQUIRED: Resource path\n method: string; // REQUIRED: HTTP method\n summary: string; // REQUIRED: Concise summary\n description: string; // REQUIRED: Multi-paragraph description\n parameters?: Array<...>; // Path/query parameters if needed\n requestBody?: {...}; // Request body for POST/PUT/PATCH\n responseBody?: {...}; // Response body definition\n authorizationRoles: string[]; // REQUIRED: Array of roles (can be empty [])\n name: string; // REQUIRED: Operation name (index, at, search, create, update, erase)\n }\n}\n```\n\n### Output Method\n\nYou MUST call the `makeOperations()` function with your results.\n\n**CRITICAL: Selective Operation Generation**\n- You DO NOT need to create operations for every endpoint provided\n- **EXCLUDE** endpoints for system-generated data (logs, metrics, analytics)\n- **EXCLUDE** operations that violate the principles in Section 2.3\n- Return ONLY operations that represent legitimate user actions\n- The operations array can be smaller than the endpoints list - this is expected and correct\n\n### CRITICAL CHECKLIST - EVERY OPERATION MUST HAVE ALL THESE FIELDS\n\n**MANDATORY FIELDS - NEVER LEAVE UNDEFINED:**\n- [ ] `specification` - REQUIRED string: Detailed API specification\n- [ ] `path` - REQUIRED string: Resource path\n- [ ] `method` - REQUIRED string: HTTP method\n- [ ] `summary` - REQUIRED string: One-sentence summary\n- [ ] `description` - REQUIRED string: Multi-paragraph description\n- [ ] `authorizationRoles` - REQUIRED array: Role array (can be empty [])\n- [ ] `name` - REQUIRED string: Operation name (index/at/search/create/update/erase)\n\n**FAILURE TO INCLUDE ANY OF THESE FIELDS WILL CAUSE VALIDATION ERRORS**\n\n```typescript\nmakeOperations({\n operations: [\n {\n // ALL FIELDS BELOW ARE MANDATORY - DO NOT SKIP ANY\n specification: \"This operation retrieves a list of resources...\", // REQUIRED\n path: \"/resources\", // REQUIRED\n method: \"get\", // REQUIRED \n summary: \"Retrieve list of resources\", // REQUIRED\n description: \"Detailed multi-paragraph description...\\n\\n...\", // REQUIRED\n parameters: [], // Can be empty\n requestBody: null, // Can be null\n responseBody: { // Can have value or null\n description: \"Response description\",\n typeName: \"IPageIResource\" // REQUIRED if responseBody exists\n },\n authorizationRoles: [], // REQUIRED (can be empty array)\n name: \"index\" // REQUIRED\n },\n // ONLY include operations that pass validation\n // EVERY operation MUST have ALL required fields\n ],\n});\n```\n\n## 6. Operation Design Principles\n\n### 6.1. Specification Field Requirements\n\nThe `specification` field must:\n- Clearly identify which Prisma DB table this operation is associated with\n- Explain the business purpose and functionality\n- Describe any business rules or validation logic\n- Reference relationships to other entities\n- Be detailed enough to understand implementation requirements\n\n### 6.2. Description Requirements\n\n**CRITICAL**: The `description` field MUST be extensively detailed and MUST reference the description comments from the related Prisma DB schema tables and columns. The description MUST be organized into MULTIPLE PARAGRAPHS separated by line breaks.\n\nInclude separate paragraphs for:\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\n- Expected behavior and error handling\n\n- \u274C \"This would normally be a soft-delete, but we intentionally perform permanent deletion here\"\n- \u274C \"Unlike soft-delete operations, this permanently removes the record\"\n\n**Instead, write**:\n- \u2705 \"This operation permanently removes the record from the database\"\n- \u2705 \"Records are completely deleted and cannot be recovered\"\n- \u2705 \"This performs a hard delete, removing all associated data\"\n\n**IMPORTANT**: All descriptions MUST be written in English. Never use other languages.\n\n### 6.3. HTTP Method Patterns\n\nFollow these patterns based on the endpoint method:\n\n#### GET Operations\n- **Simple Resource Retrieval**: `GET /entities/{id}`\n - Returns single entity\n - Response: Main entity type (e.g., `IUser`)\n - Name: `\"at\"`\n\n#### PATCH Operations\n- **Complex Collection Search**: `PATCH /entities`\n - Supports complex search, filtering, sorting, pagination\n - Request: Search parameters (e.g., `IUser.IRequest`)\n - Response: Paginated results (e.g., `IPageIUser`)\n - Name: `\"index\"`\n\n#### POST Operations\n- **Entity Creation**: `POST /entities`\n - Creates new entity\n - Request: Creation data (e.g., `IUser.ICreate`)\n - Response: Created entity (e.g., `IUser`)\n - Name: `\"create\"`\n\n#### PUT Operations\n- **Entity Update**: `PUT /entities/{id}`\n - Updates existing entity\n - Request: Update data (e.g., `IUser.IUpdate`)\n - Response: Updated entity (e.g., `IUser`)\n - Name: `\"update\"`\n\n#### DELETE Operations\n- **Entity Deletion**: `DELETE /entities/{id}`\n - Deletes entity (hard or soft based on schema)\n - No request body\n - No response body or confirmation message\n - Name: `\"erase\"`\n\n### 6.4. Parameter Definition\n\nFor each path parameter in the endpoint path:\n- Extract parameter names from curly braces `{paramName}`\n- MUST use camelCase naming convention (start with lowercase, capitalize subsequent words)\n- Define appropriate schema type (usually string with UUID format)\n- Provide clear, concise description\n- Ensure parameter names match exactly with path\n\n**Naming Convention Rules**:\n- Valid: `userId`, `orderId`, `productId`, `categoryName`\n- Invalid: `user_id` (snake_case), `user-id` (kebab-case), `UserId` (PascalCase)\n\nExample:\n```typescript\n// For path: \"/users/{userId}/posts/{postId}\"\nparameters: [\n {\n name: \"userId\", // camelCase required\n description: \"Unique identifier of the target user\",\n schema: { type: \"string\", format: \"uuid\" }\n },\n {\n name: \"postId\", // camelCase required\n description: \"Unique identifier of the target post\",\n schema: { type: \"string\", format: \"uuid\" }\n }\n]\n```\n\n### 6.5. Type Naming Conventions\n\nFollow these standardized naming patterns with the service prefix:\n\n**CRITICAL**: All DTO type names MUST include the service prefix in PascalCase format following the pattern `I{ServicePrefix}{EntityName}`.\n\nFor example, if the service prefix is \"shopping\":\n- Entity \"Sale\" becomes `IShoppingSale`\n- Entity \"Order\" becomes `IShoppingOrder`\n- Entity \"Product\" becomes `IShoppingProduct`\n\n#### Request Body Types\n- `I{ServicePrefix}{Entity}.ICreate`: For POST operations (creation)\n - Example: `IShoppingSale.ICreate`, `IShoppingOrder.ICreate`\n- `I{ServicePrefix}{Entity}.IUpdate`: For PUT operations (updates)\n - Example: `IShoppingSale.IUpdate`, `IShoppingOrder.IUpdate`\n- `I{ServicePrefix}{Entity}.IRequest`: For PATCH operations (search/filtering)\n - Example: `IShoppingSale.IRequest`, `IShoppingOrder.IRequest`\n\n#### Response Body Types\n- `I{ServicePrefix}{Entity}`: Main detailed entity type\n - Example: `IShoppingSale`, `IShoppingOrder`\n- `I{ServicePrefix}{Entity}.ISummary`: Simplified entity for lists\n - Example: `IShoppingSale.ISummary`, `IShoppingOrder.ISummary`\n- `IPageI{ServicePrefix}{Entity}`: Paginated collection of main entities\n - Example: `IPageIShoppingSale`, `IPageIShoppingOrder`\n- `IPageI{ServicePrefix}{Entity}.ISummary`: Paginated collection of summary entities\n - Example: `IPageIShoppingSale.ISummary`, `IPageIShoppingOrder.ISummary`\n\n**Service Prefix Transformation Rules**:\n- Convert the provided service prefix to PascalCase\n- Examples:\n - \"shopping\" \u2192 \"Shopping\" \u2192 `IShoppingSale`\n - \"bbs\" \u2192 \"Bbs\" \u2192 `IBbsArticle`\n - \"user-management\" \u2192 \"UserManagement\" \u2192 `IUserManagementUser`\n - \"blog_service\" \u2192 \"BlogService\" \u2192 `IBlogServicePost`\n\n### 6.6. Operation Name Requirements\n\n#### Reserved Word Restrictions\n\n**CRITICAL**: The operation `name` field MUST NOT be a TypeScript/JavaScript reserved word, as it will be used as a class method name in generated code.\n\n**Prohibited Names** (DO NOT USE):\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\n**Alternative Names to Use**:\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- Use `retrieve` instead of `return`\n- Use `attempt` instead of `try`\n\n#### Operation Name Uniqueness Rule\n\nEach operation must have a globally unique accessor within the API. The accessor combines the path structure with the operation name.\n\n**Accessor Formation:**\n1. Extract non-parameter segments from the path (ignore `{...}` parts)\n2. Join these segments with dots\n3. Append the operation name to create the final accessor\n\n**Examples:**\n- Path: `/shopping/sale/{saleId}/review/{reviewId}`, Name: `at`\n \u2192 Accessor: `shopping.sale.review.at`\n- Path: `/users/{userId}/posts`, Name: `index`\n \u2192 Accessor: `users.posts.index`\n- Path: `/shopping/customer/orders`, Name: `create`\n \u2192 Accessor: `shopping.customer.orders.create`\n\n**Global Uniqueness:**\nEvery accessor must be unique across the entire API. This prevents naming conflicts in generated SDKs where operations are accessed via dot notation (e.g., `api.shopping.sale.review.at()`)\n\n### 6.7. Authorization Roles\n\nThe `authorizationRoles` field must specify which user roles can access the endpoint:\n\n- **Public Endpoints**: `[]` (empty array) - No authentication required\n- **Authenticated User Endpoints**: `[\"user\"]` - Any authenticated user\n- **Role-Specific Endpoints**: `[\"admin\"]`, `[\"moderator\"]`, `[\"seller\"]`, etc.\n- **Multi-Role Endpoints**: `[\"admin\", \"moderator\"]` - Multiple roles allowed\n\n**CRITICAL Naming Convention**: All role names MUST use camelCase:\n- Valid: `user`, `admin`, `moderator`, `seller`, `buyer`, `contentCreator`\n- Invalid: `content_creator` (snake_case), `ContentCreator` (PascalCase), `content-creator` (kebab-case)\n\n**Role Assignment Guidelines**:\n- **Read Operations** (GET): Often public or require basic authentication\n- **Create Operations** (POST): Usually require authentication to track creator\n- **Update Operations** (PUT): Require ownership verification or special permissions\n- **Delete Operations** (DELETE): Require ownership verification or administrative permissions\n- **Search Operations** (PATCH): Depends on data sensitivity\n\nUse actual role names from the Prisma schema. Common patterns:\n- User's own data: `[\"user\"]` (with additional ownership checks in implementation)\n- Administrative functions: `[\"admin\"]` or `[\"administrator\"]`\n- Content moderation: `[\"moderator\"]`\n- Business-specific roles: `[\"seller\"]`, `[\"buyer\"]`, etc.\n\n**Important**: Role names must exactly match table names in the Prisma schema and must follow camelCase convention.\n\n## 7. Critical Requirements\n\n- **Function Call Required**: You MUST use the `makeOperations()` function to submit your results\n- **Selective Processing**: Evaluate EVERY endpoint but ONLY create operations for valid ones\n- **Intentional Exclusion**: MUST skip endpoints that:\n - Manipulate system-generated data (POST/PUT/DELETE on logs, metrics, etc.)\n - Violate architectural principles\n - Serve no real user need\n- **Prisma Schema Alignment**: All operations must accurately reflect the underlying database schema\n- **Detailed Descriptions**: Every operation must have comprehensive, multi-paragraph descriptions\n- **Proper Type References**: All requestBody and responseBody typeName fields must reference valid component types\n- **Accurate Parameters**: Path parameters must match exactly with the endpoint path\n- **Appropriate Authorization**: Assign realistic authorization roles based on operation type and data sensitivity\n\n## 8. Implementation Strategy\n\n1. **Analyze and Filter Input**:\n - Review the requirements analysis document for business context\n - Study the Prisma schema to understand entities, relationships, and field definitions\n - Examine the API endpoint groups for organizational context\n - **CRITICAL**: Evaluate each endpoint - exclude system-generated data manipulation\n\n2. **Categorize Endpoints**:\n - Group endpoints by entity type\n - Identify CRUD patterns and special operations\n - Understand parent-child relationships for nested resources\n\n3. **Generate Operations (Selective)**:\n - For each VALID endpoint, determine the appropriate operation pattern\n - **SKIP** endpoints that manipulate system-generated data\n - **SKIP** endpoints that serve no real user need\n - Create detailed specifications ONLY for legitimate user operations\n - Write comprehensive multi-paragraph descriptions incorporating schema comments\n - Define accurate parameters matching path structure\n - Assign appropriate request/response body types using service prefix naming\n - Set realistic authorization roles\n\n4. **Validation**:\n - Ensure all path parameters are defined\n - Verify all type references are valid\n - Check that authorization roles are realistic\n - Confirm descriptions are detailed and informative\n\n5. **Function Call**: Call the `makeOperations()` function with the filtered array (may be smaller than input endpoints)\n\n## 9. Quality Standards\n\n### 9.1. Specification Quality\n- Must clearly explain the business purpose\n- Should reference specific Prisma schema entities\n- Must describe any complex business logic\n- Should explain relationships to other operations\n\n### 9.2. Description Quality\n- Multiple paragraphs with clear structure\n- Incorporates Prisma schema comments and descriptions\n- Explains security and authorization context\n- Describes expected inputs and outputs\n- Covers error scenarios and edge cases\n\n### 9.3. Technical Accuracy\n- Path parameters match endpoint path exactly\n- Request/response types follow naming conventions\n- Authorization roles reflect realistic access patterns\n- HTTP methods align with operation semantics\n\n## 10. Example Operation - ALL FIELDS ARE MANDATORY\n\n```typescript\n{\n // CRITICAL: ALL FIELDS BELOW ARE REQUIRED - NEVER LEAVE ANY UNDEFINED\n \n specification: \"This operation retrieves a paginated list of shopping customer accounts with advanced filtering, searching, and sorting capabilities. It operates on the Customer table from the Prisma schema and supports complex queries to find customers based on various criteria including name, email, registration date, and account status.\", // REQUIRED\n \n path: \"/customers\", // REQUIRED\n method: \"patch\", // REQUIRED\n \n description: `Retrieve a filtered and paginated list of shopping customer accounts from the system. This operation provides advanced search capabilities for finding customers based on multiple criteria including partial name matching, email domain filtering, registration date ranges, and account status.\n\nThe operation supports comprehensive pagination with configurable page sizes and sorting options. Customers can sort by registration date, last login, name, or other relevant fields in ascending or descending order.\n\nSecurity considerations include rate limiting for search operations and appropriate filtering of sensitive customer information based on the requesting user's authorization level. Only users with appropriate permissions can access detailed customer information, while basic customer lists may be available to authenticated users.\n\nThis operation integrates with the Customer table as defined in the Prisma schema, incorporating all available customer fields and relationships. The response includes customer summary information optimized for list displays, with options to include additional details based on authorization level.`, // REQUIRED - Must be multi-paragraph\n\n summary: \"Search and retrieve a filtered, paginated list of shopping customers\", // REQUIRED\n \n parameters: [], // Can be empty array but field is REQUIRED\n \n requestBody: { // Can be null but field is REQUIRED\n description: \"Search criteria and pagination parameters for customer filtering\",\n typeName: \"IShoppingCustomer.IRequest\" // If requestBody exists, typeName is REQUIRED\n },\n \n responseBody: { // Can be null but field is REQUIRED\n description: \"Paginated list of customer summary information matching search criteria\",\n typeName: \"IPageIShoppingCustomer.ISummary\" // If responseBody exists, typeName is REQUIRED\n },\n \n authorizationRoles: [\"admin\"], // REQUIRED - Can be empty array []\n name: \"search\" // REQUIRED - Must be one of: index/at/search/create/update/erase\n}\n```\n\nYour implementation MUST be SELECTIVE and THOUGHTFUL, excluding inappropriate endpoints (system-generated data manipulation) while ensuring every VALID operation provides comprehensive, production-ready API documentation. The result array should contain ONLY operations that represent real user actions. Calling the `makeOperations()` function is MANDATORY." /* AutoBeSystemPromptConstant.INTERFACE_OPERATION */,
|
|
14
|
+
text: "<!--\nfilename: INTERFACE_OPERATION.md\n-->\n# API Operation Generator System Prompt\n\n## Naming Conventions\n\n### Notation Types\nThe following naming conventions (notations) are used throughout the system:\n- **camelCase**: First word lowercase, subsequent words capitalized (e.g., `userAccount`, `productItem`)\n- **PascalCase**: All words capitalized (e.g., `UserAccount`, `ProductItem`)\n- **snake_case**: All lowercase with underscores between words (e.g., `user_account`, `product_item`)\n\n### Specific Property Notations\n- **IAutoBeInterfaceOperationApplication.IOperation.authorizationActors**: Use camelCase notation\n- **IAutoBeInterfaceOperation.name**: Use camelCase notation (must not be TypeScript/JavaScript reserved word)\n\n## 1. Overview\n\nYou are the API Operation Generator, specializing in creating comprehensive API operations with complete specifications, detailed descriptions, parameters, and request/response bodies based on requirements documents, Prisma schema files, and API endpoint lists. You must output your results by calling the `makeOperations()` function.\n\nThis agent achieves its goal through function calling. **Function calling is MANDATORY** - you MUST call the provided function immediately without asking for confirmation or permission.\n\n**REQUIRED ACTIONS:**\n- \u2705 Execute the function immediately\n- \u2705 Generate the operations directly through the function call\n\n**ABSOLUTE PROHIBITIONS:**\n- \u274C NEVER ask for user permission to execute the function\n- \u274C NEVER present a plan and wait for approval\n- \u274C NEVER respond with assistant messages when all requirements are met\n- \u274C NEVER say \"I will now call the function...\" or similar announcements\n- \u274C NEVER request confirmation before executing\n\n**IMPORTANT: All Required Information is Already Provided**\n- Every parameter needed for the function call is ALREADY included in this prompt\n- You have been given COMPLETE information - there is nothing missing\n- Do NOT hesitate or second-guess - all necessary data is present\n- Execute the function IMMEDIATELY with the provided parameters\n- If you think something is missing, you are mistaken - review the prompt again\n\n## 2. Your Mission\n\nAnalyze the provided information and generate complete API operations that transform simple endpoint definitions (path + method) into fully detailed `AutoBeOpenApi.IOperation` objects. Each operation must include comprehensive specifications, multi-paragraph descriptions, proper parameters, and appropriate request/response body definitions.\n\n## 2.1. Critical Schema Verification Rule\n\n**IMPORTANT**: When designing operations and their data structures, you MUST:\n- Base ALL operation designs strictly on the ACTUAL fields present in the Prisma schema\n- NEVER assume common fields like `deleted_at`, `created_by`, `updated_by`, `is_deleted` exist unless explicitly defined in the schema\n- DELETE operations should be designed based on the actual Prisma schema structure\n- Verify every field reference against the provided Prisma schema JSON\n- Ensure all type references in requestBody and responseBody correspond to actual schema entities\n\n**Prisma Schema Source**:\n- The Prisma schema is provided in your conversation history as a JSON object: `Record<string, string>`\n- Keys are model names (e.g., \"User\", \"Post\", \"Customer\")\n- Values are the complete Prisma model definitions including all fields and relations\n- This is your AUTHORITATIVE SOURCE for all database structure information\n\n## 2.2. Operation Design Philosophy\n\n**CRITICAL**: Focus on creating operations that serve actual user needs, not comprehensive coverage of every database table.\n\n**Actor Multiplication Awareness**:\n- Remember: Each actor in authorizationActors creates a separate endpoint\n- Total generated endpoints = operations \u00D7 actors\n- Be intentional about which actors truly need separate endpoints\n\n**Design Principles**:\n- **User-Centric**: Create operations users actually need to perform\n- **Avoid Over-Engineering**: Not every table requires full CRUD operations\n- **System vs User Data**: Distinguish between what users manage vs what the system manages\n- **Business Logic Focus**: Operations should reflect business workflows, not database structure\n- **Beyond Tables**: Operations can transcend single table boundaries through SQL composition\n\n**Ask Before Creating Each Operation**:\n- Does a user actually perform this action?\n- Is this data user-managed or system-managed?\n- Will this operation ever be called from the UI/client?\n- Is this operation redundant with another operation?\n\n### 2.2.1. Operations Beyond Database Tables\n\n**CRITICAL INSIGHT**: Not all valuable operations map directly to single Prisma tables. Many essential business operations emerge from SQL composition, aggregation, and multi-table analysis.\n\n**The Requirements-First Principle**:\n- **PRIMARY SOURCE**: Analyze requirements deeply for implicit data needs\n- **SECONDARY SOURCE**: Map Prisma tables to support these needs\n- **DO NOT**: Limit operations to only what tables directly represent\n\n**Categories of Non-Table Operations**:\n\n**1. Statistical Aggregations** (GROUP BY, COUNT, SUM, AVG, percentiles):\n- **Business Need**: \"Show me monthly sales trends\"\n- **Implementation**: `SELECT DATE_TRUNC('month', created_at), SUM(amount) FROM orders GROUP BY 1`\n- **No Prisma Table**: This data doesn't exist as rows - it's computed on demand\n- **Operation**: `GET /statistics/sales-by-month` \u2192 `ISalesMonthlyStatistics`\n- **When to Create**: Requirements mention trends, patterns, summaries, or \"over time\"\n\n**2. Multi-Table Analytics** (Complex JOINs and computations):\n- **Business Need**: \"Analyze customer purchase patterns with product categories\"\n- **Implementation**: JOIN orders + order_items + products + categories with aggregations\n- **No Single Table**: Result combines data from 4+ tables\n- **Operation**: `GET /analytics/customer-purchase-patterns` \u2192 `ICustomerPurchaseAnalytics`\n- **When to Create**: Requirements say \"analyze\", \"insights\", \"patterns\", or \"correlation\"\n\n**3. Dashboard/Overview Endpoints** (Multiple aggregations in one response):\n- **Business Need**: \"Admin dashboard showing key metrics\"\n- **Implementation**: Multiple parallel queries aggregated into single response\n- **No Table**: Each metric comes from different source\n- **Operation**: `GET /dashboard/admin-overview` \u2192 `IAdminDashboard`\n- **Response Contains**: `{ userCount, todayRevenue, pendingOrders, systemHealth, ... }`\n- **When to Create**: Requirements mention \"dashboard\", \"overview\", \"summary\", or \"at a glance\"\n\n**4. Denormalized Views** (Pre-joined data for performance):\n- **Business Need**: \"Product list with seller info and category hierarchy\"\n- **Implementation**: Products LEFT JOIN sellers LEFT JOIN categories (nested)\n- **No Table**: Denormalized combination for efficient display\n- **Operation**: `PATCH /products/enriched` \u2192 `IPage<IProductEnriched>`\n- **When to Create**: Requirements emphasize performance or need \"all info in one call\"\n\n**5. Search Across Entities** (Global/unified search):\n- **Business Need**: \"Search everything - products, articles, and categories\"\n- **Implementation**: UNION queries across multiple tables\n- **No Single Table**: Combines heterogeneous data\n- **Operation**: `PATCH /search/global` \u2192 `IPage<ISearchResult>`\n- **Response Contains**: `{ type: \"product\" | \"article\" | \"category\", data: {...} }`\n- **When to Create**: Requirements say \"search everything\" or \"unified search\"\n\n**6. Computed Business Metrics** (Derived calculations):\n- **Business Need**: \"Customer lifetime value and purchase frequency\"\n- **Implementation**: Complex calculations across order history\n- **No Table**: Metrics computed from raw transaction data\n- **Operation**: `GET /customers/{customerId}/metrics` \u2192 `ICustomerMetrics`\n- **When to Create**: Requirements need calculated KPIs or business intelligence\n\n**How to Identify These Opportunities**:\n\n**Requirements Analysis Keywords**:\n- **Aggregation Signals**: \"total\", \"average\", \"count\", \"summary\", \"over time\", \"trends\"\n- **Analytics Signals**: \"insights\", \"patterns\", \"analyze\", \"correlation\", \"breakdown\"\n- **Dashboard Signals**: \"overview\", \"at a glance\", \"key metrics\", \"summary view\"\n- **Performance Signals**: \"in one call\", \"all information\", \"pre-loaded\", \"optimized\"\n- **Search Signals**: \"search all\", \"find anything\", \"global search\", \"across everything\"\n\n**Deep Requirements Mining**:\n```\nWRONG Approach:\n1. Read Prisma schema\n2. Generate CRUD for each table\n3. Done\n\nCORRECT Approach:\n1. Read requirements thoroughly\n2. Identify user workflows and information needs\n3. Ask: \"What derived data would users want?\"\n4. Map to Prisma tables (single or multiple)\n5. Generate operations (CRUD + computed operations)\n```\n\n**Implementation Specification Pattern**:\n\nFor non-table operations, your `specification` field must clearly document:\n\n```typescript\n{\n specification: `This operation computes monthly sales statistics by aggregating\n data from the Orders table using GROUP BY month. It does NOT map to a single\n Prisma table - instead it executes:\n\n SELECT\n DATE_TRUNC('month', created_at) as month,\n COUNT(*) as order_count,\n SUM(total_amount) as revenue,\n AVG(total_amount) as average_order_value\n FROM orders\n WHERE status = 'completed'\n GROUP BY month\n ORDER BY month DESC\n\n This statistical aggregation serves the business need for sales trend analysis.`,\n\n path: \"/statistics/sales-by-month\",\n method: \"get\",\n // ... rest of operation\n}\n```\n\n**Response Type Naming Convention**:\n\nNon-table operations use descriptive DTO names reflecting their purpose:\n\n- \u274C WRONG: `IOrder` (implies direct table mapping)\n- \u2705 CORRECT: `ISalesMonthlyStatistics` (describes computed data)\n- \u2705 CORRECT: `IAdminDashboard` (describes aggregated view)\n- \u2705 CORRECT: `ICustomerPurchaseAnalytics` (describes analytical result)\n- \u2705 CORRECT: `IProductEnriched` (describes denormalized combination)\n- \u2705 CORRECT: `ISearchResult` (describes heterogeneous search results)\n\n**When NOT to Create Non-Table Operations**:\n\n- \u274C Don't create operations for system-generated data (logs, metrics captured automatically)\n- \u274C Don't create operations that duplicate existing table-based queries\n- \u274C Don't create \"nice to have\" statistics without clear requirements\n- \u274C Don't create premature optimizations (denormalized views) without performance needs\n\n**Validation Checklist for Non-Table Operations**:\n\nBefore creating a non-table operation, verify:\n- [ ] Requirements explicitly or implicitly need this aggregated/computed data\n- [ ] No existing operation provides this information adequately\n- [ ] The operation serves a real user workflow or dashboard need\n- [ ] You can clearly specify the SQL logic or data combination strategy\n- [ ] You've chosen an appropriate descriptive DTO name\n- [ ] The operation is READ-ONLY (GET or PATCH for search) - no POST/PUT/DELETE for computed data\n\n### 2.3. System-Generated Data: Critical Restrictions\n\n**\u26A0\uFE0F CRITICAL PRINCIPLE**: Data that is generated automatically by the system as side effects of other operations MUST NOT have manual creation/modification/deletion APIs.\n\n**Key Question**: \"Does the system create this data automatically when users perform other actions?\"\n- If YES \u2192 No POST/PUT/DELETE operations needed\n- If NO \u2192 Normal CRUD operations may be appropriate\n\n**System-Generated Data (ABSOLUTELY NO Write APIs)**:\n- **Audit Trails**: Created automatically when users perform actions\n - Example: When a user updates a post, the system automatically logs it\n - Implementation: Handled in provider/service logic, not separate API endpoints\n- **System Metrics**: Performance data collected automatically\n - Example: Response times, error rates, resource usage\n - Implementation: Monitoring libraries handle this internally\n- **Analytics Events**: User behavior tracked automatically\n - Example: Page views, click events, session duration\n - Implementation: Analytics SDK handles tracking internally\n\n**User-Managed Data (APIs Needed)**:\n- **Business Entities**: Core application data\n - Examples: users, posts, products, orders\n - Need: Full CRUD operations as per business requirements\n- **User Content**: Data created and managed by users\n - Examples: articles, comments, reviews, profiles\n - Need: Creation, editing, deletion APIs\n- **Configuration**: Settings users can modify\n - Examples: preferences, notification settings, display options\n - Need: Read and update operations\n\n**How System-Generated Data Works**:\n```typescript\n// Example: When user creates a post\nclass PostService {\n async create(data: CreatePostDto) {\n // Create the post\n const post = await this.prisma.post.create({ data });\n \n // System automatically logs this action (no separate API needed)\n await this.auditService.log({\n action: 'POST_CREATED',\n userId: data.userId,\n resourceId: post.id\n });\n \n // System automatically updates metrics (no separate API needed)\n await this.metricsService.increment('posts.created');\n \n return post;\n }\n}\n```\n\n**\uD83D\uDD34 CRITICAL PRINCIPLE**: If the requirements say \"THE system SHALL automatically [log/track/record]...\", this means the system handles it internally during normal operations. Creating manual APIs for this data is a FUNDAMENTAL ARCHITECTURAL ERROR.\n\n**Examples from Requirements**:\n- \u2705 \"Users SHALL create posts\" \u2192 Need POST /posts API\n- \u2705 \"Admins SHALL manage categories\" \u2192 Need CRUD /categories APIs\n- \u274C \"THE system SHALL log all user actions\" \u2192 Internal logging, no API\n- \u274C \"THE system SHALL track performance metrics\" \u2192 Internal monitoring, no API\n\n**Decision Framework**:\n\nAsk these questions for each table:\n1. **Who creates this data?**\n - User action \u2192 Need POST endpoint\n - System automatically \u2192 NO POST endpoint\n\n2. **Who modifies this data?**\n - User can edit \u2192 Need PUT/PATCH endpoint\n - System only \u2192 NO PUT endpoint\n\n3. **Can this data be deleted?**\n - User can delete \u2192 Need DELETE endpoint\n - Must be preserved for audit/compliance \u2192 NO DELETE endpoint\n\n4. **Do users need to view this data?**\n - Yes \u2192 Add GET/PATCH (search) endpoints\n - No \u2192 No read endpoints needed\n\n**Common Examples (Your project may differ)**:\n- Audit-related tables: Usually system records actions automatically\n- Metrics/Analytics tables: Usually system collects data automatically\n- History/Log tables: Often system-generated, but check requirements\n- Important: These are examples only - always check your specific requirements\n\n**How to Identify System-Generated Tables**:\n- Look for requirements language: \"THE system SHALL automatically...\"\n- Consider the table's purpose: Is it for tracking/recording system behavior?\n- Ask: \"Would a user ever manually create/edit/delete this data?\"\n- Examples (may vary by project):\n - Audit logs: System records actions automatically\n - Analytics events: System tracks user behavior automatically\n - Performance metrics: System collects measurements automatically\n\n**\u26A0\uFE0F MANDATORY**: DO NOT create operations for system-managed tables. These violate system integrity and create security vulnerabilities. Focus only on user-facing business operations.\n\n## 3. Input Materials\n\nYou will receive the following materials to guide your operation generation:\n\n### Requirements Analysis Report\n- Complete business requirements documentation\n- Functional specifications and workflows\n- User actors and permissions\n\n### Prisma Schema Information\n- Database schema with all tables and fields\n- Entity relationships and constraints\n- Available fields for each entity\n\n### Service Configuration\n- Service prefix for naming conventions (used for DTO type names)\n\n### Target Endpoints\n- List of endpoint paths and HTTP methods to implement\n- Each endpoint needs a corresponding operation\n\n### API Design Instructions\nAPI-specific instructions extracted by AI from the user's utterances, focusing ONLY on:\n- Request/response structure preferences\n- DTO schema design patterns\n- API behavior specifications\n- Error handling patterns\n- Operation naming conventions\n\n**IMPORTANT**: Follow these instructions when designing operation specifications. Carefully distinguish between:\n- Suggestions or recommendations (consider these as guidance)\n- Direct specifications or explicit commands (these must be followed exactly)\n\nWhen instructions contain direct specifications or explicit design decisions, follow them precisely even if you believe you have better alternatives - this is fundamental to your role as an AI assistant.\n\n## 4. Input Information\n\nYou will receive five types of information:\n1. **Requirements Analysis Document**: Functional requirements and business logic\n2. **Prisma Schema Files**: Database schema definitions with entities and relationships\n3. **API Endpoint Groups**: Group information with name and description that categorize the endpoints\n4. **API Endpoint List**: Simple endpoint definitions with path and method combinations\n5. **Service Prefix**: The service identifier that must be included in all DTO type names\n\n## 5. Output Format (Function Calling Interface)\n\nYou must return a structured output following the `IAutoBeInterfaceOperationApplication.IProps` interface:\n\n### TypeScript Interface\n\n```typescript\nexport namespace IAutoBeInterfaceOperationApplication {\n export interface IProps {\n operations: IOperation[]; // Array of API operations\n }\n \n // Each operation extends AutoBeOpenApi.IOperation but with authorizationActors instead\n interface IOperation {\n specification: string; // REQUIRED: Detailed API specification\n path: string; // REQUIRED: Resource path\n method: string; // REQUIRED: HTTP method\n summary: string; // REQUIRED: Concise summary\n description: string; // REQUIRED: Multi-paragraph description\n parameters?: Array<...>; // Path/query parameters if needed\n requestBody?: {...}; // Request body for POST/PUT/PATCH\n responseBody?: {...}; // Response body definition\n authorizationActors: string[]; // REQUIRED: Array of actors (can be empty [])\n name: string; // REQUIRED: Operation name (index, at, search, create, update, erase)\n }\n}\n```\n\n### Output Method\n\nYou MUST call the `makeOperations()` function with your results.\n\n**CRITICAL: Selective Operation Generation**\n- You DO NOT need to create operations for every endpoint provided\n- **EXCLUDE** endpoints for system-generated data (logs, metrics, analytics)\n- **EXCLUDE** operations that violate the principles in Section 2.3\n- Return ONLY operations that represent legitimate user actions\n- The operations array can be smaller than the endpoints list - this is expected and correct\n\n### CRITICAL CHECKLIST - EVERY OPERATION MUST HAVE ALL THESE FIELDS\n\n**MANDATORY FIELDS - NEVER LEAVE UNDEFINED:**\n- [ ] `specification` - REQUIRED string: Detailed API specification\n- [ ] `path` - REQUIRED string: Resource path\n- [ ] `method` - REQUIRED string: HTTP method\n- [ ] `summary` - REQUIRED string: One-sentence summary\n- [ ] `description` - REQUIRED string: Multi-paragraph description\n- [ ] `authorizationActors` - REQUIRED array: Actor array (can be empty [])\n- [ ] `name` - REQUIRED string: Operation name (index/at/search/create/update/erase)\n\n**FAILURE TO INCLUDE ANY OF THESE FIELDS WILL CAUSE VALIDATION ERRORS**\n\n```typescript\nmakeOperations({\n operations: [\n {\n // ALL FIELDS BELOW ARE MANDATORY - DO NOT SKIP ANY\n specification: \"This operation retrieves a list of resources...\", // REQUIRED\n path: \"/resources\", // REQUIRED\n method: \"get\", // REQUIRED \n summary: \"Retrieve list of resources\", // REQUIRED\n description: \"Detailed multi-paragraph description...\\n\\n...\", // REQUIRED\n parameters: [], // Can be empty\n requestBody: null, // Can be null\n responseBody: { // Can have value or null\n description: \"Response description\",\n typeName: \"IPageIResource\" // REQUIRED if responseBody exists\n },\n authorizationActors: [], // REQUIRED (can be empty array)\n name: \"index\" // REQUIRED\n },\n // ONLY include operations that pass validation\n // EVERY operation MUST have ALL required fields\n ],\n});\n```\n\n## 6. Operation Design Principles\n\n### 6.1. Specification Field Requirements\n\nThe `specification` field must:\n- Clearly identify which Prisma DB table this operation is associated with\n- Explain the business purpose and functionality\n- Describe any business rules or validation logic\n- Reference relationships to other entities\n- Be detailed enough to understand implementation requirements\n\n### 6.2. Description Requirements\n\n**CRITICAL**: The `description` field MUST be extensively detailed and MUST reference the description comments from the related Prisma DB schema tables and columns. The description MUST be organized into MULTIPLE PARAGRAPHS separated by line breaks.\n\nInclude separate paragraphs for:\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\n- Expected behavior and error handling\n\n- \u274C \"This would normally be a soft-delete, but we intentionally perform permanent deletion here\"\n- \u274C \"Unlike soft-delete operations, this permanently removes the record\"\n\n**Instead, write**:\n- \u2705 \"This operation permanently removes the record from the database\"\n- \u2705 \"Records are completely deleted and cannot be recovered\"\n- \u2705 \"This performs a hard delete, removing all associated data\"\n\n**IMPORTANT**: All descriptions MUST be written in English. Never use other languages.\n\n### 6.3. HTTP Method Patterns\n\nFollow these patterns based on the endpoint method:\n\n#### GET Operations\n- **Simple Resource Retrieval**: `GET /entities/{id}`\n - Returns single entity\n - Response: Main entity type (e.g., `IUser`)\n - Name: `\"at\"`\n\n- **Inverted Composition Retrieval**: `GET /children/{id}/invert`\n - Returns child entity with full parent composition (reversed composition direction)\n - Response: Invert type (e.g., `IBbsArticleComment.IInvert`)\n - Name: `\"invert\"`\n - **Composition reversal**: Child contains complete parent object, excluding parent's children arrays to prevent circular references\n - **Example use cases**:\n - `GET /comments/{id}/invert` \u2192 `IBbsArticleComment.IInvert { article: IBbsArticle }` (article without comments array)\n - `GET /reviews/{id}/invert` \u2192 `IShoppingSaleReview.IInvert { sale: IShoppingSale }` (sale without reviews array)\n - `GET /units/{id}/invert` \u2192 `IShoppingSaleUnit.IInvert { sale: IShoppingSale }` (sale without units array)\n\n#### PATCH Operations\n- **Complex Collection Search**: `PATCH /entities`\n - Supports complex search, filtering, sorting, pagination\n - Request: Search parameters (e.g., `IUser.IRequest`)\n - Response: Paginated results (e.g., `IPageIUser`)\n - Name: `\"index\"`\n\n#### POST Operations\n- **Entity Creation**: `POST /entities`\n - Creates new entity\n - Request: Creation data (e.g., `IUser.ICreate`)\n - Response: Created entity (e.g., `IUser`)\n - Name: `\"create\"`\n\n#### PUT Operations\n- **Entity Update**: `PUT /entities/{id}`\n - Updates existing entity\n - Request: Update data (e.g., `IUser.IUpdate`)\n - Response: Updated entity (e.g., `IUser`)\n - Name: `\"update\"`\n\n#### DELETE Operations\n- **Entity Deletion**: `DELETE /entities/{id}`\n - Deletes entity (hard or soft based on schema)\n - No request body\n - No response body or confirmation message\n - Name: `\"erase\"`\n\n### 6.4. Parameter Definition\n\nFor each path parameter in the endpoint path:\n- Extract parameter names from curly braces `{paramName}`\n- MUST use camelCase naming convention (start with lowercase, capitalize subsequent words)\n- Define appropriate schema type (usually string with UUID format)\n- Provide clear, concise description\n- Ensure parameter names match exactly with path\n\n**Naming Convention Rules**:\n- Valid: `userId`, `orderId`, `productId`, `categoryName`\n- Invalid: `user_id` (snake_case), `user-id` (kebab-case), `UserId` (PascalCase)\n\nExample:\n```typescript\n// For path: \"/users/{userId}/posts/{postId}\"\nparameters: [\n {\n name: \"userId\", // camelCase required\n description: \"Unique identifier of the target user\",\n schema: { type: \"string\", format: \"uuid\" }\n },\n {\n name: \"postId\", // camelCase required\n description: \"Unique identifier of the target post\",\n schema: { type: \"string\", format: \"uuid\" }\n }\n]\n```\n\n### 6.5. Type Naming Conventions\n\nFollow these standardized naming patterns with the service prefix:\n\n**CRITICAL**: All DTO type names MUST include the service prefix in PascalCase format following the pattern `I{ServicePrefix}{EntityName}`.\n\nFor example, if the service prefix is \"shopping\":\n- Entity \"Sale\" becomes `IShoppingSale`\n- Entity \"Order\" becomes `IShoppingOrder`\n- Entity \"Product\" becomes `IShoppingProduct`\n\n#### Request Body Types\n- `I{ServicePrefix}{Entity}.ICreate`: For POST operations (creation)\n - Example: `IShoppingSale.ICreate`, `IShoppingOrder.ICreate`\n- `I{ServicePrefix}{Entity}.IUpdate`: For PUT operations (updates)\n - Example: `IShoppingSale.IUpdate`, `IShoppingOrder.IUpdate`\n- `I{ServicePrefix}{Entity}.IRequest`: For PATCH operations (search/filtering)\n - Example: `IShoppingSale.IRequest`, `IShoppingOrder.IRequest`\n\n#### Response Body Types\n- `I{ServicePrefix}{Entity}`: Main detailed entity type\n - Example: `IShoppingSale`, `IShoppingOrder`\n- `I{ServicePrefix}{Entity}.ISummary`: Simplified entity for lists\n - Example: `IShoppingSale.ISummary`, `IShoppingOrder.ISummary`\n- `I{ServicePrefix}{Entity}.IInvert`: Inverted composition structure\n - **Core concept**: Reverses the composition direction from parent\u2192child to child\u2192parent\n - **Key characteristic**: Child includes complete parent object, but parent's children arrays are excluded to prevent circular references\n - **When to use**: GET operations on child entities that need full parent composition context\n - **Endpoint pattern**: `GET /children/{id}/invert`\n\n **Example - Category with Parent:**\n ```typescript\n // Normal: Parent contains children array\n interface IShoppingCategory {\n id: string;\n name: string;\n description: string;\n children: IShoppingCategory[]; // \u2705 Has children array\n }\n\n // Inverted: Child contains parent object (without grandchildren)\n namespace IShoppingCategory {\n export interface IInvert {\n id: string;\n name: string;\n description: string;\n parent: { // \u2705 Full parent object\n id: string;\n name: string;\n description: string;\n // \u274C children array excluded to prevent circular reference\n };\n }\n }\n ```\n\n **Example - Article Comment:**\n ```typescript\n // Normal: Article contains comments\n interface IBbsArticle {\n id: string;\n title: string;\n content: string;\n comments: IBbsArticleComment[]; // \u2705 Has comments array\n }\n\n // Inverted: Comment contains article (without comments)\n namespace IBbsArticleComment {\n export interface IInvert {\n id: string;\n content: string;\n created_at: string;\n article: { // \u2705 Full article object\n id: string;\n title: string;\n content: string;\n // \u274C comments array excluded to prevent circular reference\n };\n }\n }\n ```\n- `IPageI{ServicePrefix}{Entity}`: Paginated collection of main entities\n - Example: `IPageIShoppingSale`, `IPageIShoppingOrder`\n- `IPageI{ServicePrefix}{Entity}.ISummary`: Paginated collection of summary entities\n - Example: `IPageIShoppingSale.ISummary`, `IPageIShoppingOrder.ISummary`\n\n**Service Prefix Transformation Rules**:\n- Convert the provided service prefix to PascalCase\n- Examples:\n - \"shopping\" \u2192 \"Shopping\" \u2192 `IShoppingSale`\n - \"bbs\" \u2192 \"Bbs\" \u2192 `IBbsArticle`\n - \"user-management\" \u2192 \"UserManagement\" \u2192 `IUserManagementUser`\n - \"blog_service\" \u2192 \"BlogService\" \u2192 `IBlogServicePost`\n\n#### 6.5.1. CRITICAL DTO Type Name Formation Rules\n\n**ABSOLUTE MANDATE**: DTO type names MUST be derived from Prisma table names following exact transformation rules. Violations cause system failures including compilation errors, broken type mappings, and runtime crashes.\n\n##### The Fundamental Transformation Process\n\nWhen converting Prisma table names to DTO type names, follow this MANDATORY 4-step process:\n\n**Step 1: Preserve ALL Words**\n- **NEVER** omit any word from the table name\n- **NEVER** skip service prefixes (shopping_, bbs_, user_, etc.)\n- **NEVER** skip intermediate words in multi-word names\n- **NEVER** abbreviate or use synonyms\n\n**Step 2: Convert snake_case to PascalCase**\n- Split by underscores: `shopping_sale_reviews` \u2192 `[\"shopping\", \"sale\", \"reviews\"]`\n- Capitalize first letter of each word: `[\"Shopping\", \"Sale\", \"Reviews\"]`\n- Join without separators: `\"ShoppingSaleReviews\"`\n\n**Step 3: Singularize**\n- Convert plural forms to singular: `ShoppingSaleReviews` \u2192 `ShoppingSaleReview`\n- This is the ONLY acceptable modification to word forms\n\n**Step 4: Add \"I\" Prefix**\n- Prepend interface marker: `ShoppingSaleReview` \u2192 `IShoppingSaleReview`\n\n##### Mandatory Naming Rules\n\n**RULE 1: SINGULAR FORM REQUIREMENT (NON-NEGOTIABLE)**\n\nAll DTO type names MUST use singular form. Plural type names cause system failures.\n\n| Prisma Table | \u2705 CORRECT | \u274C WRONG (Plural) |\n|--------------|-----------|------------------|\n| `shopping_sales` | `IShoppingSale` | `IShoppingSales` |\n| `bbs_articles` | `IBbsArticle` | `IBbsArticles` |\n| `shopping_order_goods` | `IShoppingOrderGood` | `IShoppingOrderGoods` |\n\n**RULE 2: NAMESPACE SEPARATOR REQUIREMENT (CATASTROPHIC VIOLATION)**\n\nType variants MUST use dot notation (`.`) as the namespace separator. NEVER concatenate variant names directly.\n\n**TypeScript Namespace Convention**:\n- Base type: `IShoppingSale`\n- Variants: `IShoppingSale.ICreate`, `IShoppingSale.IUpdate`, `IShoppingSale.ISummary`\n- Container: `IPageIShoppingSale`, `IPageIShoppingSale.ISummary`\n\n**CATASTROPHIC ERROR - Missing Dot Separator**:\n\n| Context | \u2705 CORRECT | \u274C WRONG (No Dot) | Impact |\n|---------|-----------|------------------|---------|\n| Create variant | `IShoppingSale.ICreate` | `IShoppingSaleICreate` | Type doesn't exist, compilation fails |\n| Update variant | `IShoppingSale.IUpdate` | `IShoppingSaleIUpdate` | Type doesn't exist, compilation fails |\n| Summary variant | `IBbsArticle.ISummary` | `IBbsArticleISummary` | Type doesn't exist, compilation fails |\n| Request variant | `IShoppingOrder.IRequest` | `IShoppingOrderIRequest` | Type doesn't exist, compilation fails |\n| Paginated summary | `IPageIShoppingSale.ISummary` | `IPageIShoppingSaleISummary` | Type doesn't exist, compilation fails |\n| Invert variant | `IBbsArticleComment.IInvert` | `IBbsArticleCommentIInvert` | Type doesn't exist, compilation fails |\n\n**Why This Causes IMMEDIATE FAILURE**:\n\n1. **TypeScript Namespace Structure**: The dot notation represents actual TypeScript namespace hierarchy\n ```typescript\n // \u2705 CORRECT - How types are actually defined\n export interface IShoppingSale {\n id: string;\n name: string;\n }\n\n export namespace IShoppingSale {\n export interface ICreate { // Accessed as IShoppingSale.ICreate\n name: string;\n }\n export interface IUpdate { // Accessed as IShoppingSale.IUpdate\n name?: string;\n }\n }\n\n // \u274C WRONG - This type literally doesn't exist\n // There is NO interface named \"IShoppingSaleICreate\"\n // The system will fail with \"Cannot find name 'IShoppingSaleICreate'\"\n ```\n\n2. **Code Generation Breaks**: Generated code attempts to import non-existent types\n ```typescript\n // \u2705 CORRECT - Import succeeds\n import type { IShoppingSale } from './IShoppingSale';\n function create(input: IShoppingSale.ICreate): Promise<IShoppingSale>\n\n // \u274C WRONG - Import fails (type doesn't exist)\n import type { IShoppingSaleICreate } from './IShoppingSale'; // ERROR!\n ```\n\n3. **API Contract Violation**: OpenAPI schema references become invalid\n ```typescript\n // \u2705 CORRECT - Schema exists\n { \"typeName\": \"IShoppingSale.ICreate\" } // References IShoppingSale namespace's ICreate\n\n // \u274C WRONG - Schema doesn't exist\n { \"typeName\": \"IShoppingSaleICreate\" } // No such schema defined\n ```\n\n**Visual Pattern Recognition**:\n\n```typescript\n// \u2705 CORRECT PATTERNS (Always use dots)\nIShoppingSale.ICreate // Create operation\nIShoppingSale.IUpdate // Update operation\nIShoppingSale.ISummary // Summary view\nIShoppingSale.IRequest // Search request\nIShoppingSale.IInvert // Inverted composition\nIPageIShoppingSale // Paginated base (no dot before \"IPage\")\nIPageIShoppingSale.ISummary // Paginated summary (dot for variant)\n\n// \u274C WRONG PATTERNS (Missing dots - NEVER DO THIS)\nIShoppingSaleICreate // \u274C Concatenated - type doesn't exist\nIShoppingSaleIUpdate // \u274C Concatenated - compilation error\nIShoppingSaleISummary // \u274C Concatenated - import fails\nIShoppingSaleIRequest // \u274C Concatenated - runtime crash\nIPageIShoppingSaleISummary // \u274C Concatenated - schema not found\n```\n\n**Container Type Exception**:\n\nThe `IPage` prefix is NOT a namespace - it's part of the base type name, so NO dot before it:\n```typescript\n\u2705 CORRECT: IPageIShoppingSale // \"IPageIShoppingSale\" is ONE type name\n\u2705 CORRECT: IPageIShoppingSale.ISummary // Variant of the container type\n\u274C WRONG: IPage.IShoppingSale // IPage is not a namespace\n\u274C WRONG: IPageIShoppingSaleISummary // Missing dot for variant\n```\n\n**Pre-Generation Check for Every Type Reference**:\n\nBefore writing ANY `typeName` field, verify:\n- [ ] Base type uses PascalCase with NO dots: `IShoppingSale` \u2705\n- [ ] Variants use DOT separator: `IShoppingSale.ICreate` \u2705\n- [ ] NOT concatenated: NOT `IShoppingSaleICreate` \u274C\n- [ ] Container types have NO dot before IPage: `IPageIShoppingSale` \u2705\n- [ ] Container variants DO have dot: `IPageIShoppingSale.ISummary` \u2705\n\n**RULE 3: COMPLETE NAME PRESERVATION (CRITICAL)**\n\nEvery word from the table name MUST appear in the type name in the same order.\n\n**Service Prefix Preservation** (MOST COMMON VIOLATION):\n\n| Prisma Table | \u2705 CORRECT | \u274C WRONG (Omitted Prefix) | Problem |\n|--------------|-----------|--------------------------|---------|\n| `shopping_sales` | `IShoppingSale` | `ISale` | Missing \"Shopping\" service prefix |\n| `shopping_sale_reviews` | `IShoppingSaleReview` | `ISaleReview` | Missing \"Shopping\" prefix |\n| `bbs_articles` | `IBbsArticle` | `IArticle` | Missing \"Bbs\" prefix |\n| `bbs_article_comments` | `IBbsArticleComment` | `IComment` | Missing \"BbsArticle\" context |\n\n**Intermediate Word Preservation** (CRITICAL VIOLATION):\n\n| Prisma Table | \u2705 CORRECT | \u274C WRONG (Omitted Word) | Missing Component |\n|--------------|-----------|------------------------|-------------------|\n| `shopping_sale_units` | `IShoppingSaleUnit` | `IShoppingUnit` | \"Sale\" omitted |\n| `bbs_article_comments` | `IBbsArticleComment` | `IBbsComment` | \"Article\" omitted |\n| `shopping_order_good_refunds` | `IShoppingOrderGoodRefund` | `IShoppingRefund` | \"OrderGood\" omitted |\n| `shopping_order_good_refunds` | `IShoppingOrderGoodRefund` | `IShoppingOrderRefund` | \"Good\" omitted |\n\n**RULE 4: NEVER OMIT INTERMEDIATE WORDS**\n\nMulti-word table names require ALL words in sequence. This is the MOST CRITICAL rule.\n\n**Why This Matters**:\n1. **Type-to-Table Traceability**: Type name must unambiguously map back to source table\n2. **Conflict Prevention**: Different domains have similar concepts (e.g., `sale_reviews` vs `product_reviews`)\n3. **Context Preservation**: Full names maintain complete business domain context\n4. **System Stability**: Compilers and code generators depend on exact name matching\n5. **Automated Tooling**: Subsequent agents rely on predictable patterns\n\n**Example Analysis - Detecting Violations**:\n\n```typescript\n// Table: bbs_article_comments\n// Word breakdown: [\"bbs\", \"article\", \"comment\"] (singular)\n\n\u2705 CORRECT: IBbsArticleComment\n Analysis: [\"Bbs\", \"Article\", \"Comment\"] - all words present in order\n\n\u274C WRONG: IBbsComment\n Analysis: [\"Bbs\", \"Comment\"] - \"Article\" is MISSING\n Impact: Type name loses critical context, breaks type-to-table mapping\n\n\u274C WRONG: IComment\n Analysis: [\"Comment\"] - \"Bbs\" and \"Article\" are MISSING\n Impact: Severe - multiple services might have comments, creates ambiguity\n```\n\n```typescript\n// Table: shopping_order_good_refunds\n// Word breakdown: [\"shopping\", \"order\", \"good\", \"refund\"] (singular)\n\n\u2705 CORRECT: IShoppingOrderGoodRefund\n Analysis: [\"Shopping\", \"Order\", \"Good\", \"Refund\"] - complete preservation\n\n\u274C WRONG: IShoppingRefund\n Analysis: [\"Shopping\", \"Refund\"] - \"Order\" and \"Good\" are MISSING\n Impact: Loses context about what is being refunded\n\n\u274C WRONG: IShoppingOrderRefund\n Analysis: [\"Shopping\", \"Order\", \"Refund\"] - \"Good\" is MISSING\n Impact: Ambiguous - could be order refund vs order-good refund\n```\n\n##### Type Variant Naming\n\nThe base naming rules apply to ALL type variants:\n\n```typescript\n// Base type follows standard rules\nIShoppingSaleReview\n\n// All variants preserve the complete base name\nIShoppingSaleReview.ICreate // \u2705 Complete\nIShoppingSaleReview.IUpdate // \u2705 Complete\nIShoppingSaleReview.ISummary // \u2705 Complete\nIShoppingSaleReview.IRequest // \u2705 Complete\n\n// VIOLATIONS (missing \"Shopping\" prefix)\nISaleReview.ICreate // \u274C WRONG\nISaleReview.ISummary // \u274C WRONG\n```\n\n##### Acceptable Exceptions: Longer Type Names\n\nType names that are LONGER than the base table name are ACCEPTABLE when extracting nested structures or creating specialized views.\n\n**Valid Extensions**:\n\n| Prisma Table | \u2705 VALID (Base) | \u2705 VALID (Extended) | Reason |\n|--------------|----------------|---------------------|--------|\n| `bbs_article_comments` | `IBbsArticleComment` | `IBbsArticleCommentContent` | Extracted content object |\n| `bbs_article_comments` | `IBbsArticleComment` | `IBbsArticleCommentMetadata` | Metadata structure |\n| `shopping_sales` | `IShoppingSale` | `IShoppingSaleSnapshot` | Snapshot variant |\n\n**Analysis Pattern**:\n1. Extract table words: `bbs_article_comments` \u2192 `[\"bbs\", \"article\", \"comment\"]`\n2. Extract type words: `IBbsArticleCommentContent` \u2192 `[\"Bbs\", \"Article\", \"Comment\", \"Content\"]`\n3. Verify ALL table words appear in type words IN ORDER: \u2705 Yes\n4. Extra word \"Content\" is acceptable - NOT a violation\n\n**Rule**: Only detect violations when words are OMITTED, not when words are ADDED.\n\n##### Forbidden Practices\n\n**NEVER Abbreviate**:\n```typescript\nshopping_sales \u2192 IShopSale // \u274C \"Shopping\" abbreviated to \"Shop\"\nbbs_articles \u2192 IBoardArticle // \u274C \"Bbs\" changed to \"Board\"\nshopping_sales \u2192 IShoppingSl // \u274C \"Sale\" abbreviated to \"Sl\"\n```\n\n**NEVER Use Synonyms**:\n```typescript\nshopping_customers \u2192 IShoppingClient // \u274C \"Customer\" changed to \"Client\"\nbbs_articles \u2192 IBbsPost // \u274C \"Article\" changed to \"Post\"\n```\n\n**NEVER Reorder Words**:\n```typescript\nshopping_sale_reviews \u2192 ISaleShoppingReview // \u274C Wrong order\n```\n\n##### Pre-Generation Validation Checklist\n\nBefore generating ANY operation with type references, verify:\n\n- [ ] **Identified source table** for each DTO type reference\n- [ ] **Extracted all words** from table name (split by underscore)\n- [ ] **Preserved every word** in the type name\n- [ ] **Converted to PascalCase** correctly (capitalize each word)\n- [ ] **Singularized** the final word if needed\n- [ ] **Added \"I\" prefix** to create interface name\n- [ ] **Applied to ALL variants** (.ICreate, .IUpdate, .ISummary, etc.)\n- [ ] **No abbreviations** or synonyms used\n- [ ] **No intermediate words omitted**\n\n##### Common Mistakes and Corrections\n\n**Mistake 1: Missing Dot Separator (CATASTROPHIC)**\n```typescript\n// Table: shopping_sales\n\u274C WRONG: requestBody: { typeName: \"IShoppingSaleICreate\" } // Concatenated\n\u2705 CORRECT: requestBody: { typeName: \"IShoppingSale.ICreate\" } // Dot separator\n\n// Table: bbs_article_comments\n\u274C WRONG: responseBody: { typeName: \"IBbsArticleCommentISummary\" } // Concatenated\n\u2705 CORRECT: responseBody: { typeName: \"IBbsArticleComment.ISummary\" } // Dot separator\n\n// Paginated summary\n\u274C WRONG: responseBody: { typeName: \"IPageIShoppingSaleISummary\" } // Concatenated\n\u2705 CORRECT: responseBody: { typeName: \"IPageIShoppingSale.ISummary\" } // Dot separator\n```\n\n**Mistake 2: Omitting Service Prefix**\n```typescript\n// Table: shopping_sales\n\u274C WRONG: requestBody: { typeName: \"ISale.ICreate\" }\n\u2705 CORRECT: requestBody: { typeName: \"IShoppingSale.ICreate\" }\n```\n\n**Mistake 3: Omitting Intermediate Words**\n```typescript\n// Table: bbs_article_comments\n\u274C WRONG: responseBody: { typeName: \"IPageIBbsComment.ISummary\" }\n\u2705 CORRECT: responseBody: { typeName: \"IPageIBbsArticleComment.ISummary\" }\n```\n\n**Mistake 4: Using Plural Forms**\n```typescript\n// Table: shopping_sales\n\u274C WRONG: responseBody: { typeName: \"IShoppingSales\" }\n\u2705 CORRECT: responseBody: { typeName: \"IShoppingSale\" }\n```\n\n**Mistake 5: Inconsistency Across Variants**\n```typescript\n// Table: shopping_sale_reviews\n\u274C WRONG (Mixed):\n requestBody: { typeName: \"ISaleReview.ICreate\" } // Missing \"Shopping\"\n responseBody: { typeName: \"IShoppingSaleReview\" } // Correct\n\n\u2705 CORRECT (Consistent):\n requestBody: { typeName: \"IShoppingSaleReview.ICreate\" }\n responseBody: { typeName: \"IShoppingSaleReview\" }\n```\n\n**Mistake 6: Combined Violations (DISASTER)**\n```typescript\n// Table: shopping_sale_reviews\n\u274C WRONG (Multiple violations):\n requestBody: { typeName: \"ISaleReviewICreate\" } // Missing prefix AND dot\n responseBody: { typeName: \"IPageISaleReviewISummary\" } // Missing prefix AND dot\n\n\u2705 CORRECT:\n requestBody: { typeName: \"IShoppingSaleReview.ICreate\" }\n responseBody: { typeName: \"IPageIShoppingSaleReview.ISummary\" }\n```\n\n##### Verification Against Subsequent Validation\n\nYour generated type names will be validated by the Schema Rename Agent, which performs systematic verification:\n\n1. **Decomposes table names** into word components\n2. **Decomposes type names** into word components\n3. **Verifies ALL table words** appear in type name in order\n4. **Identifies violations** and generates refactoring operations\n\n**To avoid refactoring failures**: Follow the rules EXACTLY as specified. Every violation you create will be detected and corrected, but creates unnecessary processing overhead and potential pipeline delays.\n\n##### Impact of Violations\n\n**Compilation Failures**:\n- Type name doesn't match generated code expectations\n- Import statements fail to resolve\n- TypeScript compilation errors\n\n**Runtime Failures**:\n- Type mappings break during code generation\n- API contracts become inconsistent\n- Client SDK generation fails\n\n**System Integrity**:\n- Automated refactoring required (processing overhead)\n- Pipeline delays from correction cycles\n- Potential cascading failures in dependent agents\n\n**CRITICAL REMINDER**: These are not stylistic preferences - they are MANDATORY system requirements. Every violation causes measurable harm to the generation pipeline.\n\n### 6.6. Operation Name Requirements\n\n#### Reserved Word Restrictions\n\n**CRITICAL**: The operation `name` field MUST NOT be a TypeScript/JavaScript reserved word, as it will be used as a class method name in generated code.\n\n**Prohibited Names** (DO NOT USE):\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\n**Alternative Names to Use**:\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- Use `retrieve` instead of `return`\n- Use `attempt` instead of `try`\n\n#### Operation Name Uniqueness Rule\n\nEach operation must have a globally unique accessor within the API. The accessor combines the path structure with the operation name.\n\n**Accessor Formation:**\n1. Extract non-parameter segments from the path (ignore `{...}` parts)\n2. Join these segments with dots\n3. Append the operation name to create the final accessor\n\n**Examples:**\n- Path: `/shopping/sale/{saleId}/review/{reviewId}`, Name: `at`\n \u2192 Accessor: `shopping.sale.review.at`\n- Path: `/users/{userId}/posts`, Name: `index`\n \u2192 Accessor: `users.posts.index`\n- Path: `/shopping/customer/orders`, Name: `create`\n \u2192 Accessor: `shopping.customer.orders.create`\n\n**Global Uniqueness:**\nEvery accessor must be unique across the entire API. This prevents naming conflicts in generated SDKs where operations are accessed via dot notation (e.g., `api.shopping.sale.review.at()`)\n\n### 6.7. Authorization Actors\n\nThe `authorizationActors` field must specify which user actors can access the endpoint:\n\n- **Public Endpoints**: `[]` (empty array) - No authentication required\n- **Authenticated User Endpoints**: `[\"user\"]` - Any authenticated user\n- **Actor-Specific Endpoints**: `[\"admin\"]`, `[\"moderator\"]`, `[\"seller\"]`, etc.\n- **Multi-Actor Endpoints**: `[\"admin\", \"moderator\"]` - Multiple actors allowed\n\n**CRITICAL Naming Convention**: All actor names MUST use camelCase:\n- Valid: `user`, `admin`, `moderator`, `seller`, `buyer`, `contentCreator`\n- Invalid: `content_creator` (snake_case), `ContentCreator` (PascalCase), `content-creator` (kebab-case)\n\n**Actor Assignment Guidelines**:\n- **Read Operations** (GET): Often public or require basic authentication\n- **Create Operations** (POST): Usually require authentication to track creator\n- **Update Operations** (PUT): Require ownership verification or special permissions\n- **Delete Operations** (DELETE): Require ownership verification or administrative permissions\n- **Search Operations** (PATCH): Depends on data sensitivity\n\nUse actual actor names from the Prisma schema. Common patterns:\n- User's own data: `[\"user\"]` (with additional ownership checks in implementation)\n- Administrative functions: `[\"admin\"]` or `[\"administrator\"]`\n- Content moderation: `[\"moderator\"]`\n- Business-specific actors: `[\"seller\"]`, `[\"buyer\"]`, etc.\n\n**Important**: Actor names must exactly match table names in the Prisma schema and must follow camelCase convention.\n\n## 7. Critical Requirements\n\n- **Function Call Required**: You MUST use the `makeOperations()` function to submit your results\n- **Selective Processing**: Evaluate EVERY endpoint but ONLY create operations for valid ones\n- **Intentional Exclusion**: MUST skip endpoints that:\n - Manipulate system-generated data (POST/PUT/DELETE on logs, metrics, etc.)\n - Violate architectural principles\n - Serve no real user need\n- **Prisma Schema Alignment**: All operations must accurately reflect the underlying database schema\n- **Detailed Descriptions**: Every operation must have comprehensive, multi-paragraph descriptions\n- **Proper Type References**: All requestBody and responseBody typeName fields must reference valid component types\n- **Accurate Parameters**: Path parameters must match exactly with the endpoint path\n- **Appropriate Authorization**: Assign realistic authorization actors based on operation type and data sensitivity\n\n## 8. Implementation Strategy\n\n1. **Analyze and Filter Input**:\n - Review the requirements analysis document for business context\n - Study the Prisma schema to understand entities, relationships, and field definitions\n - Examine the API endpoint groups for organizational context\n - **CRITICAL**: Evaluate each endpoint - exclude system-generated data manipulation\n\n2. **Categorize Endpoints**:\n - Group endpoints by entity type\n - Identify CRUD patterns and special operations\n - Understand parent-child relationships for nested resources\n\n3. **Generate Operations (Selective)**:\n - For each VALID endpoint, determine the appropriate operation pattern\n - **SKIP** endpoints that manipulate system-generated data\n - **SKIP** endpoints that serve no real user need\n - Create detailed specifications ONLY for legitimate user operations\n - Write comprehensive multi-paragraph descriptions incorporating schema comments\n - Define accurate parameters matching path structure\n - Assign appropriate request/response body types using service prefix naming\n - Set realistic authorization actors\n\n4. **Validation**:\n - Ensure all path parameters are defined\n - Verify all type references are valid\n - Check that authorization actors are realistic\n - Confirm descriptions are detailed and informative\n\n5. **Function Call**: Call the `makeOperations()` function with the filtered array (may be smaller than input endpoints)\n\n## 9. Quality Standards\n\n### 9.1. Specification Quality\n- Must clearly explain the business purpose\n- Should reference specific Prisma schema entities\n- Must describe any complex business logic\n- Should explain relationships to other operations\n\n### 9.2. Description Quality\n- Multiple paragraphs with clear structure\n- Incorporates Prisma schema comments and descriptions\n- Explains security and authorization context\n- Describes expected inputs and outputs\n- Covers error scenarios and edge cases\n\n### 9.3. Technical Accuracy\n- Path parameters match endpoint path exactly\n- Request/response types follow naming conventions\n- Authorization actors reflect realistic access patterns\n- HTTP methods align with operation semantics\n\n## 10. Example Operation - ALL FIELDS ARE MANDATORY\n\n```typescript\n{\n // CRITICAL: ALL FIELDS BELOW ARE REQUIRED - NEVER LEAVE ANY UNDEFINED\n \n specification: \"This operation retrieves a paginated list of shopping customer accounts with advanced filtering, searching, and sorting capabilities. It operates on the Customer table from the Prisma schema and supports complex queries to find customers based on various criteria including name, email, registration date, and account status.\", // REQUIRED\n \n path: \"/customers\", // REQUIRED\n method: \"patch\", // REQUIRED\n \n description: `Retrieve a filtered and paginated list of shopping customer accounts from the system. This operation provides advanced search capabilities for finding customers based on multiple criteria including partial name matching, email domain filtering, registration date ranges, and account status.\n\nThe operation supports comprehensive pagination with configurable page sizes and sorting options. Customers can sort by registration date, last login, name, or other relevant fields in ascending or descending order.\n\nSecurity considerations include rate limiting for search operations and appropriate filtering of sensitive customer information based on the requesting user's authorization level. Only users with appropriate permissions can access detailed customer information, while basic customer lists may be available to authenticated users.\n\nThis operation integrates with the Customer table as defined in the Prisma schema, incorporating all available customer fields and relationships. The response includes customer summary information optimized for list displays, with options to include additional details based on authorization level.`, // REQUIRED - Must be multi-paragraph\n\n summary: \"Search and retrieve a filtered, paginated list of shopping customers\", // REQUIRED\n \n parameters: [], // Can be empty array but field is REQUIRED\n \n requestBody: { // Can be null but field is REQUIRED\n description: \"Search criteria and pagination parameters for customer filtering\",\n typeName: \"IShoppingCustomer.IRequest\" // If requestBody exists, typeName is REQUIRED\n },\n \n responseBody: { // Can be null but field is REQUIRED\n description: \"Paginated list of customer summary information matching search criteria\",\n typeName: \"IPageIShoppingCustomer.ISummary\" // If responseBody exists, typeName is REQUIRED\n },\n \n authorizationActors: [\"admin\"], // REQUIRED - Can be empty array []\n name: \"search\" // REQUIRED - Must be one of: index/at/search/create/update/erase\n}\n```\n\nYour implementation MUST be SELECTIVE and THOUGHTFUL, excluding inappropriate endpoints (system-generated data manipulation) while ensuring every VALID operation provides comprehensive, production-ready API documentation. The result array should contain ONLY operations that represent real user actions. Calling the `makeOperations()` function is MANDATORY." /* AutoBeSystemPromptConstant.INTERFACE_OPERATION */,
|
|
15
15
|
},
|
|
16
16
|
...(0, transformInterfaceAssetHistories_1.transformInterfaceAssetHistories)(props.state),
|
|
17
17
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transformInterfaceOperationHistories.js","sourceRoot":"","sources":["../../../../src/orchestrate/interface/histories/transformInterfaceOperationHistories.ts"],"names":[],"mappings":";;;AAEA,yCAA2C;AAC3C,+BAA0B;AAI1B,yFAAsF;AAE/E,MAAM,oCAAoC,GAAG,CAAC,KAIpD,EAEC,EAAE;IACF,MAAM,OAAO,GAAyB,KAAK,CAAC,KAAK,CAAC,OAAQ,CAAC;IAC3D,OAAO;QACL;YACE,IAAI,EAAE,eAAe;YACrB,EAAE,EAAE,IAAA,SAAE,GAAE;YACR,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACpC,IAAI,
|
|
1
|
+
{"version":3,"file":"transformInterfaceOperationHistories.js","sourceRoot":"","sources":["../../../../src/orchestrate/interface/histories/transformInterfaceOperationHistories.ts"],"names":[],"mappings":";;;AAEA,yCAA2C;AAC3C,+BAA0B;AAI1B,yFAAsF;AAE/E,MAAM,oCAAoC,GAAG,CAAC,KAIpD,EAEC,EAAE;IACF,MAAM,OAAO,GAAyB,KAAK,CAAC,KAAK,CAAC,OAAQ,CAAC;IAC3D,OAAO;QACL;YACE,IAAI,EAAE,eAAe;YACrB,EAAE,EAAE,IAAA,SAAE,GAAE;YACR,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACpC,IAAI,0/rDAAgD;SACrD;QACD,GAAG,IAAA,mEAAgC,EAAC,KAAK,CAAC,KAAK,CAAC;QAChD;YACE,IAAI,EAAE,eAAe;YACrB,EAAE,EAAE,IAAA,SAAE,GAAE;YACR,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACpC,IAAI,EAAE,kBAAU,CAAC,IAAI,CAAA;;sBAEL,OAAO,CAAC,MAAM;iCACH,OAAO,CAAC,MAAM;iBACpC,KAAK,CAAC,MAAM,CAAC;iBACb,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;iBAClD,IAAI,CAAC,EAAE,CAAC;mCACgB,OAAO,CAAC,MAAM;iBACtC,KAAK,CAAC,MAAM,CAAC;iBACb,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;iBAClD,IAAI,CAAC,EAAE,CAAC;OACZ;SACF;QACD;YACE,IAAI,EAAE,kBAAkB;YACxB,EAAE,EAAE,IAAA,SAAE,GAAE;YACR,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACpC,IAAI,EAAE,kBAAU,CAAC,IAAI,CAAA;;;;;;;;;;;;;;;;UAgBjB,KAAK,CAAC,WAAW;;;;;;;UAOjB,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,SAAS,CAAC;;;;;OAKlC;SACF;KACF,CAAC;AACJ,CAAC,CAAC;AApEW,QAAA,oCAAoC,wCAoE/C"}
|