@autobe/agent 0.9.2 → 0.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (168) hide show
  1. package/lib/AutoBeAgent.js +11 -4
  2. package/lib/AutoBeAgent.js.map +1 -1
  3. package/lib/constants/AutoBeSystemPromptConstant.d.ts +7 -6
  4. package/lib/constants/AutoBeSystemPromptConstant.js.map +1 -1
  5. package/lib/context/AutoBeTokenUsage.d.ts +15 -1
  6. package/lib/context/AutoBeTokenUsage.js +56 -1
  7. package/lib/context/AutoBeTokenUsage.js.map +1 -1
  8. package/lib/factory/createAutoBeApplication.js +288 -653
  9. package/lib/factory/createAutoBeApplication.js.map +1 -1
  10. package/lib/index.mjs +4225 -6681
  11. package/lib/index.mjs.map +1 -1
  12. package/lib/orchestrate/analyze/AutoBeAnalyzeAgent.js +80 -321
  13. package/lib/orchestrate/analyze/AutoBeAnalyzeAgent.js.map +1 -1
  14. package/lib/orchestrate/analyze/AutoBeAnalyzeReviewer.js +0 -1
  15. package/lib/orchestrate/analyze/AutoBeAnalyzeReviewer.js.map +1 -1
  16. package/lib/orchestrate/analyze/orchestrateAnalyze.js +93 -266
  17. package/lib/orchestrate/analyze/orchestrateAnalyze.js.map +1 -1
  18. package/lib/orchestrate/facade/transformFacadeStateMessage.js +2 -2
  19. package/lib/orchestrate/facade/transformFacadeStateMessage.js.map +1 -1
  20. package/lib/orchestrate/index.d.ts +2 -2
  21. package/lib/orchestrate/index.js +4 -4
  22. package/lib/orchestrate/index.js.map +1 -1
  23. package/lib/orchestrate/interface/orchestrateInterfaceComplement.js +54 -142
  24. package/lib/orchestrate/interface/orchestrateInterfaceComplement.js.map +1 -1
  25. package/lib/orchestrate/interface/orchestrateInterfaceComponents.js +189 -201
  26. package/lib/orchestrate/interface/orchestrateInterfaceComponents.js.map +1 -1
  27. package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.js +71 -174
  28. package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.js.map +1 -1
  29. package/lib/orchestrate/interface/orchestrateInterfaceOperations.js +706 -1099
  30. package/lib/orchestrate/interface/orchestrateInterfaceOperations.js.map +1 -1
  31. package/lib/orchestrate/interface/transformInterfaceHistories.js +2 -0
  32. package/lib/orchestrate/interface/transformInterfaceHistories.js.map +1 -1
  33. package/lib/orchestrate/prisma/orchestratePrismaComponent.js +60 -177
  34. package/lib/orchestrate/prisma/orchestratePrismaComponent.js.map +1 -1
  35. package/lib/orchestrate/prisma/orchestratePrismaCorrect.js +502 -1073
  36. package/lib/orchestrate/prisma/orchestratePrismaCorrect.js.map +1 -1
  37. package/lib/orchestrate/prisma/orchestratePrismaSchema.js +519 -1125
  38. package/lib/orchestrate/prisma/orchestratePrismaSchema.js.map +1 -1
  39. package/lib/orchestrate/prisma/transformPrismaComponentsHistories.js +9 -0
  40. package/lib/orchestrate/prisma/transformPrismaComponentsHistories.js.map +1 -1
  41. package/lib/orchestrate/prisma/transformPrismaSchemaHistories.js +8 -0
  42. package/lib/orchestrate/prisma/transformPrismaSchemaHistories.js.map +1 -1
  43. package/lib/orchestrate/realize/orchestrateRealize.d.ts +11 -0
  44. package/lib/orchestrate/realize/orchestrateRealize.js +78 -0
  45. package/lib/orchestrate/realize/orchestrateRealize.js.map +1 -0
  46. package/lib/orchestrate/realize/orchestrateRealizeCoder.d.ts +25 -0
  47. package/lib/orchestrate/realize/orchestrateRealizeCoder.js +326 -0
  48. package/lib/orchestrate/realize/orchestrateRealizeCoder.js.map +1 -0
  49. package/lib/orchestrate/realize/orchestrateRealizePlanner.d.ts +80 -0
  50. package/lib/orchestrate/realize/orchestrateRealizePlanner.js +53 -0
  51. package/lib/orchestrate/realize/orchestrateRealizePlanner.js.map +1 -0
  52. package/lib/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.d.ts +39 -0
  53. package/lib/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.js +3 -0
  54. package/lib/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.js.map +1 -0
  55. package/lib/orchestrate/realize/transformRealizeCoderHistories.d.ts +5 -0
  56. package/lib/orchestrate/realize/transformRealizeCoderHistories.js +127 -0
  57. package/lib/orchestrate/realize/transformRealizeCoderHistories.js.map +1 -0
  58. package/lib/orchestrate/test/compile/completeTestCode.d.ts +2 -0
  59. package/lib/orchestrate/test/compile/completeTestCode.js +21 -0
  60. package/lib/orchestrate/test/compile/completeTestCode.js.map +1 -0
  61. package/lib/orchestrate/test/{filterTestFileName.js → compile/filterTestFileName.js} +1 -1
  62. package/lib/orchestrate/test/compile/filterTestFileName.js.map +1 -0
  63. package/lib/orchestrate/test/compile/getTestExternalDeclarations.d.ts +3 -0
  64. package/lib/orchestrate/test/compile/getTestExternalDeclarations.js +27 -0
  65. package/lib/orchestrate/test/compile/getTestExternalDeclarations.js.map +1 -0
  66. package/lib/orchestrate/test/compile/getTestScenarioArtifacts.d.ts +5 -0
  67. package/lib/orchestrate/test/{compileTestScenario.js → compile/getTestScenarioArtifacts.js} +10 -5
  68. package/lib/orchestrate/test/compile/getTestScenarioArtifacts.js.map +1 -0
  69. package/lib/orchestrate/test/orchestrateTest.js +14 -9
  70. package/lib/orchestrate/test/orchestrateTest.js.map +1 -1
  71. package/lib/orchestrate/test/orchestrateTestCorrect.d.ts +3 -2
  72. package/lib/orchestrate/test/orchestrateTestCorrect.js +142 -448
  73. package/lib/orchestrate/test/orchestrateTestCorrect.js.map +1 -1
  74. package/lib/orchestrate/test/orchestrateTestScenario.js +258 -532
  75. package/lib/orchestrate/test/orchestrateTestScenario.js.map +1 -1
  76. package/lib/orchestrate/test/orchestrateTestWrite.d.ts +3 -2
  77. package/lib/orchestrate/test/orchestrateTestWrite.js +124 -90
  78. package/lib/orchestrate/test/orchestrateTestWrite.js.map +1 -1
  79. package/lib/orchestrate/test/structures/IAutoBeTestCorrectApplication.d.ts +121 -0
  80. package/lib/orchestrate/test/structures/IAutoBeTestCorrectApplication.js +3 -0
  81. package/lib/orchestrate/test/structures/IAutoBeTestCorrectApplication.js.map +1 -0
  82. package/lib/orchestrate/test/structures/IAutoBeTestFunction.d.ts +8 -0
  83. package/lib/{utils/types/BackoffOptions.js → orchestrate/test/structures/IAutoBeTestFunction.js} +1 -1
  84. package/lib/orchestrate/test/structures/IAutoBeTestFunction.js.map +1 -0
  85. package/lib/orchestrate/test/structures/IAutoBeTestScenarioApplication.d.ts +14 -2
  86. package/lib/orchestrate/test/structures/IAutoBeTestWriteApplication.d.ts +112 -0
  87. package/lib/orchestrate/test/structures/IAutoBeTestWriteApplication.js +3 -0
  88. package/lib/orchestrate/test/structures/IAutoBeTestWriteApplication.js.map +1 -0
  89. package/lib/orchestrate/test/structures/IAutoBeTestWriteResult.d.ts +7 -0
  90. package/lib/orchestrate/test/structures/IAutoBeTestWriteResult.js +3 -0
  91. package/lib/orchestrate/test/structures/IAutoBeTestWriteResult.js.map +1 -0
  92. package/lib/orchestrate/test/transformTestCorrectHistories.d.ts +3 -2
  93. package/lib/orchestrate/test/transformTestCorrectHistories.js +28 -67
  94. package/lib/orchestrate/test/transformTestCorrectHistories.js.map +1 -1
  95. package/lib/orchestrate/test/transformTestWriteHistories.d.ts +5 -4
  96. package/lib/orchestrate/test/transformTestWriteHistories.js +161 -43
  97. package/lib/orchestrate/test/transformTestWriteHistories.js.map +1 -1
  98. package/lib/structures/IAutoBeConfig.d.ts +11 -0
  99. package/lib/utils/backoffRetry.d.ts +4 -7
  100. package/lib/utils/backoffRetry.js +19 -37
  101. package/lib/utils/backoffRetry.js.map +1 -1
  102. package/lib/utils/forceRetry.d.ts +1 -0
  103. package/lib/{orchestrate/orchestrateRealize.js → utils/forceRetry.js} +15 -8
  104. package/lib/utils/forceRetry.js.map +1 -0
  105. package/package.json +9 -12
  106. package/src/AutoBeAgent.ts +17 -3
  107. package/src/constants/AutoBeSystemPromptConstant.ts +7 -6
  108. package/src/context/AutoBeTokenUsage.ts +85 -1
  109. package/src/factory/createAutoBeApplication.ts +2 -3
  110. package/src/orchestrate/analyze/AutoBeAnalyzeAgent.ts +8 -3
  111. package/src/orchestrate/analyze/AutoBeAnalyzeReviewer.ts +0 -1
  112. package/src/orchestrate/analyze/orchestrateAnalyze.ts +6 -5
  113. package/src/orchestrate/facade/transformFacadeStateMessage.ts +2 -1
  114. package/src/orchestrate/index.ts +2 -2
  115. package/src/orchestrate/interface/orchestrateInterfaceComplement.ts +4 -3
  116. package/src/orchestrate/interface/orchestrateInterfaceComponents.ts +26 -23
  117. package/src/orchestrate/interface/orchestrateInterfaceEndpoints.ts +6 -4
  118. package/src/orchestrate/interface/orchestrateInterfaceOperations.ts +14 -11
  119. package/src/orchestrate/interface/transformInterfaceHistories.ts +2 -0
  120. package/src/orchestrate/prisma/orchestratePrismaComponent.ts +10 -5
  121. package/src/orchestrate/prisma/orchestratePrismaCorrect.ts +11 -5
  122. package/src/orchestrate/prisma/orchestratePrismaSchema.ts +16 -8
  123. package/src/orchestrate/prisma/transformPrismaComponentsHistories.ts +9 -0
  124. package/src/orchestrate/prisma/transformPrismaSchemaHistories.ts +8 -0
  125. package/src/orchestrate/realize/orchestrateRealize.ts +129 -0
  126. package/src/orchestrate/realize/orchestrateRealizeCoder.ts +148 -0
  127. package/src/orchestrate/realize/orchestrateRealizePlanner.ts +115 -0
  128. package/src/orchestrate/realize/structures/IAutoBeRealizeCoderApplication.ts +46 -0
  129. package/src/orchestrate/realize/transformRealizeCoderHistories.ts +136 -0
  130. package/src/orchestrate/test/compile/completeTestCode.ts +35 -0
  131. package/src/orchestrate/test/{filterTestFileName.ts → compile/filterTestFileName.ts} +1 -1
  132. package/src/orchestrate/test/compile/getTestExternalDeclarations.ts +24 -0
  133. package/src/orchestrate/test/{compileTestScenario.ts → compile/getTestScenarioArtifacts.ts} +16 -8
  134. package/src/orchestrate/test/experimental/orchestrateTestCorrect.ast +240 -0
  135. package/src/orchestrate/test/experimental/orchestrateTestWrite.ast +316 -0
  136. package/src/orchestrate/test/experimental/transformTestCorrectHistories.ast +52 -0
  137. package/src/orchestrate/test/orchestrateTest.ts +33 -16
  138. package/src/orchestrate/test/orchestrateTestCorrect.ts +109 -497
  139. package/src/orchestrate/test/orchestrateTestScenario.ts +102 -71
  140. package/src/orchestrate/test/orchestrateTestWrite.ts +55 -181
  141. package/src/orchestrate/test/structures/IAutoBeTestCorrectApplication.ts +126 -0
  142. package/src/orchestrate/test/structures/IAutoBeTestFunction.ts +10 -0
  143. package/src/orchestrate/test/structures/IAutoBeTestScenarioApplication.ts +14 -2
  144. package/src/orchestrate/test/structures/IAutoBeTestWriteApplication.ts +117 -0
  145. package/src/orchestrate/test/structures/IAutoBeTestWriteResult.ts +9 -0
  146. package/src/orchestrate/test/transformTestCorrectHistories.ts +38 -71
  147. package/src/orchestrate/test/transformTestWriteHistories.ts +88 -46
  148. package/src/structures/IAutoBeConfig.ts +9 -0
  149. package/src/utils/backoffRetry.ts +25 -36
  150. package/src/utils/forceRetry.ts +13 -0
  151. package/lib/factory/invertOpenApiDocument.d.ts +0 -3
  152. package/lib/factory/invertOpenApiDocument.js +0 -51
  153. package/lib/factory/invertOpenApiDocument.js.map +0 -1
  154. package/lib/orchestrate/orchestrateRealize.d.ts +0 -5
  155. package/lib/orchestrate/orchestrateRealize.js.map +0 -1
  156. package/lib/orchestrate/test/compileTestScenario.d.ts +0 -5
  157. package/lib/orchestrate/test/compileTestScenario.js.map +0 -1
  158. package/lib/orchestrate/test/filterTestFileName.js.map +0 -1
  159. package/lib/utils/StringUtil.d.ts +0 -4
  160. package/lib/utils/StringUtil.js +0 -43
  161. package/lib/utils/StringUtil.js.map +0 -1
  162. package/lib/utils/types/BackoffOptions.d.ts +0 -12
  163. package/lib/utils/types/BackoffOptions.js.map +0 -1
  164. package/src/factory/invertOpenApiDocument.ts +0 -63
  165. package/src/orchestrate/orchestrateRealize.ts +0 -18
  166. package/src/utils/StringUtil.ts +0 -45
  167. package/src/utils/types/BackoffOptions.ts +0 -15
  168. /package/lib/orchestrate/test/{filterTestFileName.d.ts → compile/filterTestFileName.d.ts} +0 -0
@@ -112,7 +112,6 @@ function process(ctx, endpoints) {
112
112
  describe: null,
113
113
  } }),
114
114
  histories: (0, transformInterfaceHistories_1.transformInterfaceHistories)(ctx.state(), "# API Endpoint Generator System Prompt\n\n## 1. Overview\n\nYou are the API Endpoint Generator, specializing in creating comprehensive lists of REST API endpoints with their paths and HTTP methods based on requirements documents, Prisma schema files, and ERD diagrams. You must output your results by calling the `makeEndpoints()` function.\n\n## 2. Your Mission\n\nAnalyze the provided information and generate a complete array of API endpoints that includes EVERY entity from the Prisma schema and addresses ALL functional requirements. You will call the `makeEndpoints()` function with an array of endpoint definitions that contain ONLY path and method properties.\n\n## 3. Output Method\n\nYou MUST call the `makeEndpoints()` function with your results.\n\n```typescript\nmakeEndpoints({\n endpoints: [\n {\n \"path\": \"/resources\",\n \"method\": \"get\"\n },\n {\n \"path\": \"/resources/{resourceId}\",\n \"method\": \"get\"\n },\n // more endpoints...\n ],\n});\n```\n\n## 4. Endpoint Design Principles\n\n### 4.1. Follow REST principles\n\n- Resource-centric URL design (use nouns, not verbs)\n- Appropriate HTTP methods:\n - `put`: Retrieve a collection resources with searching information\n - `get`: Retrieve a single resource\n - `post`: Create new resources\n - `delete`: Remove resources\n - `patch`: Partial updates or complex queries with request bodies\n\n### 4.2. Path Formatting Rules\n\n1. **Use camelCase for all resource names in paths**\n - Example: Use `/attachmentFiles` instead of `/attachment-files`\n\n2. **Use domain prefixes with slashes**\n - Example: Use `/shopping/channels` instead of `/shopping-channels`\n - **Important**: If you identify any service-related prefix in the DB schema, use it as the global prefix for ALL API endpoints\n\n3. **Structure hierarchical relationships with slashes**\n - Example: For a child entity like \"sale-snapshots\" under \"sales\", use `/shopping/sales/snapshots` instead of `/shopping-sale-snapshots`\n\n### 4.3. Path patterns\n\n- Collection endpoints: `/domain/resources`\n- Single resource endpoints: `/domain/resources/{resourceId}`\n- Nested resources: `/domain/resources/{resourceId}/subsidiaries/{subsidiaryId}`\n\n### 4.4. Standard API operations per entity\n\nFor EACH independent entity identified in the requirements document, Prisma DB Schema, and ERD diagram, you MUST include these standard endpoints:\n\n1. `PATCH /entity-plural` - List entities with searching\n2. `GET /entity-plural/{id}` - Get specific entity\n3. `POST /entity-plural` - Create entity\n4. `PUT /entity-plural/{id}` - Update entity\n5. `DELETE /entity-plural/{id}` - Delete entity\n\n## 5. Critical Requirements\n\n- **Function Call Required**: You MUST use the `makeEndpoints()` function to submit your results\n- **Complete Coverage**: EVERY independent entity in the Prisma schema MUST have corresponding endpoints\n- **No Omissions**: Process ALL independent entities regardless of quantity\n- **Strict Output Format**: ONLY include objects with `path` and `method` properties in your function call\n- **No Additional Properties**: Do NOT include any properties beyond `path` and `method`\n\n## 6. Implementation Strategy\n\n1. Identify ALL independent entities from the Prisma schema, requirements document, and ERD\n2. Identify service-related prefixes in the DB schema to use as the global prefix for ALL API endpoints\n3. Identify domain prefixes and hierarchical relationships between entities\n4. For each independent entity:\n - Convert kebab-case names to camelCase (e.g., `attachment-files` \u2192 `attachmentFiles`)\n - Structure paths to reflect domain and hierarchical relationships\n - Generate the standard endpoints\n5. Add endpoints for relationships and complex operations\n6. Verify ALL independent entities and requirements are covered\n7. Call the `makeEndpoints()` function with your complete array\n\nYour implementation MUST be COMPLETE and EXHAUSTIVE, ensuring NO independent entity or requirement is missed, while strictly adhering to the `AutoBeOpenApi.IEndpoint` interface format. Calling the `makeEndpoints()` function is MANDATORY.\n\n## 7. Path Transformation Examples\n\n| Original Format | Improved Format | Explanation |\n|-----------------|-----------------|-------------|\n| `/attachment-files` | `/attachmentFiles` | Convert kebab-case to camelCase |\n| `/bbs-articles` | `/bbs/articles` | Separate domain prefix with slash |\n| `/bbs-article-snapshots` | `/bbs/articles/snapshots` | Reflect hierarchy in URL structure |\n| `/shopping-sale-snapshots` | `/shopping/sales/snapshots` | Both domain prefix and hierarchy properly formatted |\n\nYour implementation MUST be COMPLETE and EXHAUSTIVE, ensuring NO independent entity or requirement is missed, while strictly adhering to the `AutoBeOpenApi.IEndpoint` interface format. Calling the `makeEndpoints()` function is MANDATORY.\n\nYou're right - I removed too much of the original structure. Here's a better version that maintains the section structure while adding explanations:\n\n## 8. Example Cases\n\nBelow are example projects that demonstrate the proper endpoint formatting.\n\n### 8.1. BBS (Bulletin Board System)\n\n```json\n{\"endpoints\":[{\"path\":\"/bbs/articles\",\"method\":\"post\"},{\"path\":\"/bbs/articles\",\"method\":\"patch\"},{\"path\":\"/bbs/articles/abridges\",\"method\":\"patch\"},{\"path\":\"/bbs/articles/{id}\",\"method\":\"get\"},{\"path\":\"/bbs/articles/{id}\",\"method\":\"put\"},{\"path\":\"/bbs/articles/{id}\",\"method\":\"delete\"},{\"path\":\"/bbs/articles/{articleId}/comments\",\"method\":\"post\"},{\"path\":\"/bbs/articles/{articleId}/comments\",\"method\":\"patch\"},{\"path\":\"/bbs/articles/{articleId}/comments/{id}\",\"method\":\"get\"},{\"path\":\"/bbs/articles/{articleId}/comments/{id}\",\"method\":\"put\"},{\"path\":\"/bbs/articles/{articleId}/comments/{id}\",\"method\":\"delete\"},{\"path\":\"/monitors/health\",\"method\":\"get\"},{\"path\":\"/monitors/performance\",\"method\":\"get\"},{\"path\":\"/monitors/system\",\"method\":\"get\"}]}\n```\n\n**Key points**: Notice how the domain prefix \"bbs\" is separated with a slash, entities use camelCase, and hierarchical relationships are expressed (e.g., `/bbs/articles/{articleId}/comments`).\n\n### 8.2. Shopping Mall\n\n```json\n{\"endpoints\":[{\"path\":\"/monitors/health\",\"method\":\"get\"},{\"path\":\"/monitors/performance\",\"method\":\"get\"},{\"path\":\"/monitors/system\",\"method\":\"get\"},{\"path\":\"/shoppings/admins/authenticate\",\"method\":\"get\"},{\"path\":\"/shoppings/admins/authenticate\",\"method\":\"post\"},{\"path\":\"/shoppings/admins/authenticate/login\",\"method\":\"put\"},{\"path\":\"/shoppings/admins/coupons\",\"method\":\"post\"},{\"path\":\"/shoppings/admins/coupons\",\"method\":\"patch\"},{\"path\":\"/shoppings/admins/coupons/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/admins/coupons/{id}\",\"method\":\"delete\"},{\"path\":\"/shoppings/admins/deposits\",\"method\":\"post\"},{\"path\":\"/shoppings/admins/deposits\",\"method\":\"patch\"},{\"path\":\"/shoppings/admins/deposits/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/admins/deposits/{id}\",\"method\":\"delete\"},{\"path\":\"/shoppings/admins/deposits/{code}/get\",\"method\":\"get\"},{\"path\":\"/shoppings/admins/mileages\",\"method\":\"post\"},{\"path\":\"/shoppings/admins/mileages\",\"method\":\"patch\"},{\"path\":\"/shoppings/admins/mileages/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/admins/mileages/{id}\",\"method\":\"delete\"},{\"path\":\"/shoppings/admins/mileages/{code}/get\",\"method\":\"get\"},{\"path\":\"/shoppings/admins/mileages/donations\",\"method\":\"post\"},{\"path\":\"/shoppings/admins/mileages/donations\",\"method\":\"patch\"},{\"path\":\"/shoppings/admins/mileages/donations/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/admins/orders\",\"method\":\"patch\"},{\"path\":\"/shoppings/admins/orders/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/admins/sales/details\",\"method\":\"patch\"},{\"path\":\"/shoppings/admins/sales\",\"method\":\"patch\"},{\"path\":\"/shoppings/admins/sales/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/admins/sales/{saleId}/questions/{inquiryId}/comments\",\"method\":\"post\"},{\"path\":\"/shoppings/admins/sales/{saleId}/questions/{inquiryId}/comments\",\"method\":\"patch\"},{\"path\":\"/shoppings/admins/sales/{saleId}/questions/{inquiryId}/comments/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/admins/sales/{saleId}/questions/{inquiryId}/comments/{id}\",\"method\":\"put\"},{\"path\":\"/shoppings/admins/sales/{saleId}/questions\",\"method\":\"patch\"},{\"path\":\"/shoppings/admins/sales/{saleId}/questions/abridges\",\"method\":\"patch\"},{\"path\":\"/shoppings/admins/sales/{saleId}/questions/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/admins/sales/{saleId}/reviews/{inquiryId}/comments\",\"method\":\"post\"},{\"path\":\"/shoppings/admins/sales/{saleId}/reviews/{inquiryId}/comments\",\"method\":\"patch\"},{\"path\":\"/shoppings/admins/sales/{saleId}/reviews/{inquiryId}/comments/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/admins/sales/{saleId}/reviews/{inquiryId}/comments/{id}\",\"method\":\"put\"},{\"path\":\"/shoppings/admins/sales/{saleId}/reviews\",\"method\":\"patch\"},{\"path\":\"/shoppings/admins/sales/{saleId}/reviews/abridges\",\"method\":\"patch\"},{\"path\":\"/shoppings/admins/sales/{saleId}/reviews/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/admins/sales/{saleId}/snapshots\",\"method\":\"patch\"},{\"path\":\"/shoppings/admins/sales/{saleId}/snapshots/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/admins/sales/{saleId}/snapshots/{id}/flip\",\"method\":\"get\"},{\"path\":\"/shoppings/admins/systematic/channels/{channelCode}/categories\",\"method\":\"post\"},{\"path\":\"/shoppings/admins/systematic/channels/{channelCode}/categories\",\"method\":\"patch\"},{\"path\":\"/shoppings/admins/systematic/channels/{channelCode}/categories/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/admins/systematic/channels/{channelCode}/categories/{id}\",\"method\":\"put\"},{\"path\":\"/shoppings/admins/systematic/channels/{channelCode}/categories/merge\",\"method\":\"delete\"},{\"path\":\"/shoppings/admins/systematic/channels/{channelCode}/categories/{id}/invert\",\"method\":\"get\"},{\"path\":\"/shoppings/admins/systematic/channels\",\"method\":\"post\"},{\"path\":\"/shoppings/admins/systematic/channels\",\"method\":\"patch\"},{\"path\":\"/shoppings/admins/systematic/channels/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/admins/systematic/channels/{id}\",\"method\":\"put\"},{\"path\":\"/shoppings/admins/systematic/channels/merge\",\"method\":\"delete\"},{\"path\":\"/shoppings/admins/systematic/channels/hierarchical\",\"method\":\"patch\"},{\"path\":\"/shoppings/admins/systematic/channels/{code}/get\",\"method\":\"get\"},{\"path\":\"/shoppings/admins/systematic/sections\",\"method\":\"post\"},{\"path\":\"/shoppings/admins/systematic/sections\",\"method\":\"patch\"},{\"path\":\"/shoppings/admins/systematic/sections/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/admins/systematic/sections/{id}\",\"method\":\"put\"},{\"path\":\"/shoppings/admins/systematic/sections/merge\",\"method\":\"delete\"},{\"path\":\"/shoppings/admins/systematic/sections/{code}/get\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/authenticate/refresh\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/authenticate\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/authenticate\",\"method\":\"post\"},{\"path\":\"/shoppings/customers/authenticate/join\",\"method\":\"post\"},{\"path\":\"/shoppings/customers/authenticate/login\",\"method\":\"put\"},{\"path\":\"/shoppings/customers/authenticate/activate\",\"method\":\"post\"},{\"path\":\"/shoppings/customers/authenticate/external\",\"method\":\"post\"},{\"path\":\"/shoppings/customers/authenticate/password/change\",\"method\":\"put\"},{\"path\":\"/shoppings/customers/coupons\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/coupons/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/coupons/tickets\",\"method\":\"post\"},{\"path\":\"/shoppings/customers/coupons/tickets\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/coupons/tickets/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/deposits/charges\",\"method\":\"post\"},{\"path\":\"/shoppings/customers/deposits/charges\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/deposits/charges/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/deposits/charges/{id}\",\"method\":\"put\"},{\"path\":\"/shoppings/customers/deposits/charges/{id}\",\"method\":\"delete\"},{\"path\":\"/shoppings/customers/deposits/charges/{chargeId}/publish/able\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/deposits/charges/{chargeId}/publish\",\"method\":\"post\"},{\"path\":\"/shoppings/customers/deposits/histories\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/deposits/histories/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/deposits/histories/balance\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/mileages/histories\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/mileages/histories/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/mileages/histories/balance\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/carts/commodities\",\"method\":\"post\"},{\"path\":\"/shoppings/customers/carts/commodities\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/carts/commodities/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/carts/commodities/{id}\",\"method\":\"put\"},{\"path\":\"/shoppings/customers/carts/commodities/{id}\",\"method\":\"delete\"},{\"path\":\"/shoppings/customers/carts/commodities/{id}/replica\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/carts/commodities/discountable\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/orders\",\"method\":\"post\"},{\"path\":\"/shoppings/customers/orders\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/orders/direct\",\"method\":\"post\"},{\"path\":\"/shoppings/customers/orders/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/orders/{id}\",\"method\":\"delete\"},{\"path\":\"/shoppings/customers/orders/{id}/price\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/orders/{id}/discountable\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/orders/{id}/discount\",\"method\":\"put\"},{\"path\":\"/shoppings/customers/orders/{orderId}/goods/{id}/confirm\",\"method\":\"put\"},{\"path\":\"/shoppings/customers/orders/{orderId}/publish/able\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/orders/{orderId}/publish\",\"method\":\"post\"},{\"path\":\"/shoppings/customers/orders/{orderId}/publish\",\"method\":\"delete\"},{\"path\":\"/shoppings/customers/sales/details\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/sales\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/sales/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/sales/{saleId}/questions/{inquiryId}/comments\",\"method\":\"post\"},{\"path\":\"/shoppings/customers/sales/{saleId}/questions/{inquiryId}/comments\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/sales/{saleId}/questions/{inquiryId}/comments/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/sales/{saleId}/questions/{inquiryId}/comments/{id}\",\"method\":\"put\"},{\"path\":\"/shoppings/customers/sales/{saleId}/questions\",\"method\":\"post\"},{\"path\":\"/shoppings/customers/sales/{saleId}/questions\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/sales/{saleId}/questions/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/sales/{saleId}/questions/{id}\",\"method\":\"post\"},{\"path\":\"/shoppings/customers/sales/{saleId}/questions/abridges\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/sales/{saleId}/reviews/{inquiryId}/comments\",\"method\":\"post\"},{\"path\":\"/shoppings/customers/sales/{saleId}/reviews/{inquiryId}/comments\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/sales/{saleId}/reviews/{inquiryId}/comments/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/sales/{saleId}/reviews/{inquiryId}/comments/{id}\",\"method\":\"put\"},{\"path\":\"/shoppings/customers/sales/{saleId}/reviews\",\"method\":\"post\"},{\"path\":\"/shoppings/customers/sales/{saleId}/reviews\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/sales/{saleId}/reviews/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/sales/{saleId}/reviews/{id}\",\"method\":\"post\"},{\"path\":\"/shoppings/customers/sales/{saleId}/reviews/abridges\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/sales/{saleId}/snapshots\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/sales/{saleId}/snapshots/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/sales/{saleId}/snapshots/{id}/flip\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/systematic/channels/{channelCode}/categories\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/systematic/channels/{channelCode}/categories/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/systematic/channels/{channelCode}/categories/{id}/invert\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/systematic/channels\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/systematic/channels/hierarchical\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/systematic/channels/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/systematic/channels/{code}/get\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/systematic/sections\",\"method\":\"patch\"},{\"path\":\"/shoppings/customers/systematic/sections/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/customers/systematic/sections/{code}/get\",\"method\":\"get\"},{\"path\":\"/shoppings/sellers/authenticate\",\"method\":\"get\"},{\"path\":\"/shoppings/sellers/authenticate\",\"method\":\"post\"},{\"path\":\"/shoppings/sellers/authenticate/login\",\"method\":\"put\"},{\"path\":\"/shoppings/sellers/deliveries\",\"method\":\"post\"},{\"path\":\"/shoppings/sellers/deliveries\",\"method\":\"patch\"},{\"path\":\"/shoppings/sellers/deliveries/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/sellers/deliveries/incompletes\",\"method\":\"patch\"},{\"path\":\"/shoppings/sellers/deliveries/{deliveryId}/journeys\",\"method\":\"post\"},{\"path\":\"/shoppings/sellers/deliveries/{deliveryId}/journeys/{id}/complete\",\"method\":\"put\"},{\"path\":\"/shoppings/sellers/deliveries/{deliveryId}/journeys/{id}\",\"method\":\"delete\"},{\"path\":\"/shoppings/sellers/deliveries/{deliveryId}/shippers\",\"method\":\"post\"},{\"path\":\"/shoppings/sellers/coupons\",\"method\":\"post\"},{\"path\":\"/shoppings/sellers/coupons\",\"method\":\"patch\"},{\"path\":\"/shoppings/sellers/coupons/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/sellers/coupons/{id}\",\"method\":\"delete\"},{\"path\":\"/shoppings/sellers/orders\",\"method\":\"patch\"},{\"path\":\"/shoppings/sellers/orders/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/sellers/sales\",\"method\":\"post\"},{\"path\":\"/shoppings/sellers/sales\",\"method\":\"patch\"},{\"path\":\"/shoppings/sellers/sales/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/sellers/sales/{id}\",\"method\":\"put\"},{\"path\":\"/shoppings/sellers/sales/{id}/open\",\"method\":\"put\"},{\"path\":\"/shoppings/sellers/sales/{id}/replica\",\"method\":\"post\"},{\"path\":\"/shoppings/sellers/sales/{id}/pause\",\"method\":\"delete\"},{\"path\":\"/shoppings/sellers/sales/{id}/suspend\",\"method\":\"delete\"},{\"path\":\"/shoppings/sellers/sales/{id}/restore\",\"method\":\"put\"},{\"path\":\"/shoppings/sellers/sales/details\",\"method\":\"patch\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/questions/{questionId}/answer\",\"method\":\"post\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/questions/{questionId}/answer\",\"method\":\"put\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/questions/{inquiryId}/comments\",\"method\":\"post\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/questions/{inquiryId}/comments\",\"method\":\"patch\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/questions/{inquiryId}/comments/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/questions/{inquiryId}/comments/{id}\",\"method\":\"put\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/questions\",\"method\":\"patch\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/questions/abridges\",\"method\":\"patch\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/questions/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/reviews/{reviewId}/answer\",\"method\":\"post\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/reviews/{reviewId}/answer\",\"method\":\"put\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/reviews/{inquiryId}/comments\",\"method\":\"post\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/reviews/{inquiryId}/comments\",\"method\":\"patch\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/reviews/{inquiryId}/comments/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/reviews/{inquiryId}/comments/{id}\",\"method\":\"put\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/reviews\",\"method\":\"patch\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/reviews/abridges\",\"method\":\"patch\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/reviews/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/snapshots/{id}/replica\",\"method\":\"post\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/snapshots\",\"method\":\"patch\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/snapshots/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/snapshots/{id}/flip\",\"method\":\"get\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/units/{unitId}/stocks/{stockId}/supplements\",\"method\":\"post\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/units/{unitId}/stocks/{stockId}/supplements\",\"method\":\"patch\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/units/{unitId}/stocks/{stockId}/supplements/{id}\",\"method\":\"put\"},{\"path\":\"/shoppings/sellers/sales/{saleId}/units/{unitId}/stocks/{stockId}/supplements/{id}\",\"method\":\"delete\"},{\"path\":\"/shoppings/sellers/systematic/channels/{channelCode}/categories\",\"method\":\"patch\"},{\"path\":\"/shoppings/sellers/systematic/channels/{channelCode}/categories/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/sellers/systematic/channels/{channelCode}/categories/{id}/invert\",\"method\":\"get\"},{\"path\":\"/shoppings/sellers/systematic/channels\",\"method\":\"patch\"},{\"path\":\"/shoppings/sellers/systematic/channels/hierarchical\",\"method\":\"patch\"},{\"path\":\"/shoppings/sellers/systematic/channels/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/sellers/systematic/channels/{code}/get\",\"method\":\"get\"},{\"path\":\"/shoppings/sellers/systematic/sections\",\"method\":\"patch\"},{\"path\":\"/shoppings/sellers/systematic/sections/{id}\",\"method\":\"get\"},{\"path\":\"/shoppings/sellers/systematic/sections/{code}/get\",\"method\":\"get\"}]}\n```\n\n**Key points**: Observe how `/shopping` is used as domain prefix, hierarchical relationships are reflected in paths (e.g., `/shopping/sales/{saleId}/reviews/{reviewId}`), and consistent HTTP methods are applied across similar operations." /* AutoBeSystemPromptConstant.INTERFACE_ENDPOINT */),
115
- tokenUsage: ctx.usage(),
116
115
  controllers: [
117
116
  createApplication({
118
117
  model: ctx.model,
@@ -125,13 +124,18 @@ function process(ctx, endpoints) {
125
124
  ],
126
125
  });
127
126
  (0, enforceToolCall_1.enforceToolCall)(agentica);
128
- yield agentica.conversate([
127
+ yield agentica
128
+ .conversate([
129
129
  "Make API operations for below endpoints:",
130
130
  "",
131
131
  "```json",
132
132
  JSON.stringify(Array.from(endpoints), null, 2),
133
133
  "```",
134
- ].join("\n"));
134
+ ].join("\n"))
135
+ .finally(() => {
136
+ const tokenUsage = agentica.getTokenUsage();
137
+ ctx.usage().record(tokenUsage, ["interface"]);
138
+ });
135
139
  if (pointer.value === null)
136
140
  throw new Error("Failed to create operations."); // never be happened
137
141
  return pointer.value;
@@ -141,7 +145,7 @@ function createApplication(props) {
141
145
  (0, assertSchemaModel_1.assertSchemaModel)(props.model);
142
146
  const application = collection[props.model];
143
147
  application.functions[0].validate = (next) => {
144
- const result = (() => { const _io0 = input => Array.isArray(input.operations) && input.operations.every(elem => "object" === typeof elem && null !== elem && _io1(elem)); const _io1 = input => "string" === typeof input.specification && "string" === typeof input.description && "string" === typeof input.summary && (Array.isArray(input.parameters) && input.parameters.every(elem => "object" === typeof elem && null !== elem && _io2(elem))) && (null === input.requestBody || "object" === typeof input.requestBody && null !== input.requestBody && _io6(input.requestBody)) && (null === input.responseBody || "object" === typeof input.responseBody && null !== input.responseBody && _io7(input.responseBody)) && "string" === typeof input.path && ("get" === input.method || "post" === input.method || "put" === input.method || "delete" === input.method || "patch" === input.method); const _io2 = input => "string" === typeof input.name && "string" === typeof input.description && ("object" === typeof input.schema && null !== input.schema && _iu0(input.schema)); const _io3 = input => (undefined === input.minimum || "number" === typeof input.minimum && (Math.floor(input.minimum) === input.minimum && -9223372036854776000 <= input.minimum && input.minimum <= 9223372036854776000)) && (undefined === input.maximum || "number" === typeof input.maximum && (Math.floor(input.maximum) === input.maximum && -9223372036854776000 <= input.maximum && input.maximum <= 9223372036854776000)) && (undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum) && (undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum) && (undefined === input.multipleOf || "number" === typeof input.multipleOf && (Math.floor(input.multipleOf) === input.multipleOf && 0 <= input.multipleOf && input.multipleOf <= 18446744073709552000 && 0 < input.multipleOf)) && "integer" === input.type; const _io4 = input => (undefined === input.minimum || "number" === typeof input.minimum) && (undefined === input.maximum || "number" === typeof input.maximum) && (undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum) && (undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum) && (undefined === input.multipleOf || "number" === typeof input.multipleOf && 0 < input.multipleOf) && "number" === input.type; const _io5 = input => (undefined === input.format || "string" === typeof input.format) && (undefined === input.pattern || "string" === typeof input.pattern) && (undefined === input.contentMediaType || "string" === typeof input.contentMediaType) && (undefined === input.minLength || "number" === typeof input.minLength && (Math.floor(input.minLength) === input.minLength && 0 <= input.minLength && input.minLength <= 18446744073709552000)) && (undefined === input.maxLength || "number" === typeof input.maxLength && (Math.floor(input.maxLength) === input.maxLength && 0 <= input.maxLength && input.maxLength <= 18446744073709552000)) && "string" === input.type; const _io6 = input => "string" === typeof input.description && "string" === typeof input.typeName; const _io7 = input => "string" === typeof input.description && "string" === typeof input.typeName; const _iu0 = input => (() => {
148
+ const result = (() => { const _io0 = input => Array.isArray(input.operations) && input.operations.every(elem => "object" === typeof elem && null !== elem && _io1(elem)); const _io1 = input => "string" === typeof input.specification && "string" === typeof input.description && "string" === typeof input.summary && (Array.isArray(input.parameters) && input.parameters.every(elem => "object" === typeof elem && null !== elem && _io2(elem))) && (null === input.requestBody || "object" === typeof input.requestBody && null !== input.requestBody && _io6(input.requestBody)) && (null === input.responseBody || "object" === typeof input.responseBody && null !== input.responseBody && _io7(input.responseBody)) && (null === input.authorization || undefined === input.authorization || "object" === typeof input.authorization && null !== input.authorization && _io8(input.authorization)) && "string" === typeof input.path && ("get" === input.method || "post" === input.method || "put" === input.method || "delete" === input.method || "patch" === input.method); const _io2 = input => "string" === typeof input.name && "string" === typeof input.description && ("object" === typeof input.schema && null !== input.schema && _iu0(input.schema)); const _io3 = input => (undefined === input.minimum || "number" === typeof input.minimum && (Math.floor(input.minimum) === input.minimum && -9223372036854776000 <= input.minimum && input.minimum <= 9223372036854776000)) && (undefined === input.maximum || "number" === typeof input.maximum && (Math.floor(input.maximum) === input.maximum && -9223372036854776000 <= input.maximum && input.maximum <= 9223372036854776000)) && (undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum) && (undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum) && (undefined === input.multipleOf || "number" === typeof input.multipleOf && (Math.floor(input.multipleOf) === input.multipleOf && 0 <= input.multipleOf && input.multipleOf <= 18446744073709552000 && 0 < input.multipleOf)) && "integer" === input.type; const _io4 = input => (undefined === input.minimum || "number" === typeof input.minimum) && (undefined === input.maximum || "number" === typeof input.maximum) && (undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum) && (undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum) && (undefined === input.multipleOf || "number" === typeof input.multipleOf && 0 < input.multipleOf) && "number" === input.type; const _io5 = input => (undefined === input.format || "string" === typeof input.format) && (undefined === input.pattern || "string" === typeof input.pattern) && (undefined === input.contentMediaType || "string" === typeof input.contentMediaType) && (undefined === input.minLength || "number" === typeof input.minLength && (Math.floor(input.minLength) === input.minLength && 0 <= input.minLength && input.minLength <= 18446744073709552000)) && (undefined === input.maxLength || "number" === typeof input.maxLength && (Math.floor(input.maxLength) === input.maxLength && 0 <= input.maxLength && input.maxLength <= 18446744073709552000)) && "string" === input.type; const _io6 = input => "string" === typeof input.description && "string" === typeof input.typeName; const _io7 = input => "string" === typeof input.description && "string" === typeof input.typeName; const _io8 = input => Array.isArray(input.role) && input.role.every(elem => "string" === typeof elem) && "Bearer" === input.type; const _iu0 = input => (() => {
145
149
  if ("number" === input.type)
146
150
  return _io4(input);
147
151
  else if ("integer" === input.type)
@@ -154,12 +158,12 @@ function createApplication(props) {
154
158
  path: _path + ".operations",
155
159
  expected: "Array<AutoBeOpenApi.IOperation>",
156
160
  value: input.operations
157
- })) && input.operations.map((elem, _index3) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
158
- path: _path + ".operations[" + _index3 + "]",
161
+ })) && input.operations.map((elem, _index4) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
162
+ path: _path + ".operations[" + _index4 + "]",
159
163
  expected: "AutoBeOpenApi.IOperation",
160
164
  value: elem
161
- })) && _vo1(elem, _path + ".operations[" + _index3 + "]", true && _exceptionable) || _report(_exceptionable, {
162
- path: _path + ".operations[" + _index3 + "]",
165
+ })) && _vo1(elem, _path + ".operations[" + _index4 + "]", true && _exceptionable) || _report(_exceptionable, {
166
+ path: _path + ".operations[" + _index4 + "]",
163
167
  expected: "AutoBeOpenApi.IOperation",
164
168
  value: elem
165
169
  })).every(flag => flag) || _report(_exceptionable, {
@@ -182,12 +186,12 @@ function createApplication(props) {
182
186
  path: _path + ".parameters",
183
187
  expected: "Array<AutoBeOpenApi.IParameter>",
184
188
  value: input.parameters
185
- })) && input.parameters.map((elem, _index4) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
186
- path: _path + ".parameters[" + _index4 + "]",
189
+ })) && input.parameters.map((elem, _index5) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
190
+ path: _path + ".parameters[" + _index5 + "]",
187
191
  expected: "AutoBeOpenApi.IParameter",
188
192
  value: elem
189
- })) && _vo2(elem, _path + ".parameters[" + _index4 + "]", true && _exceptionable) || _report(_exceptionable, {
190
- path: _path + ".parameters[" + _index4 + "]",
193
+ })) && _vo2(elem, _path + ".parameters[" + _index5 + "]", true && _exceptionable) || _report(_exceptionable, {
194
+ path: _path + ".parameters[" + _index5 + "]",
191
195
  expected: "AutoBeOpenApi.IParameter",
192
196
  value: elem
193
197
  })).every(flag => flag) || _report(_exceptionable, {
@@ -210,6 +214,14 @@ function createApplication(props) {
210
214
  path: _path + ".responseBody",
211
215
  expected: "(AutoBeOpenApi.IResponseBody | null)",
212
216
  value: input.responseBody
217
+ }), null === input.authorization || undefined === input.authorization || ("object" === typeof input.authorization && null !== input.authorization || _report(_exceptionable, {
218
+ path: _path + ".authorization",
219
+ expected: "(AutoBeOpenApi.IAuthorization | null | undefined)",
220
+ value: input.authorization
221
+ })) && _vo8(input.authorization, _path + ".authorization", true && _exceptionable) || _report(_exceptionable, {
222
+ path: _path + ".authorization",
223
+ expected: "(AutoBeOpenApi.IAuthorization | null | undefined)",
224
+ value: input.authorization
213
225
  }), "string" === typeof input.path || _report(_exceptionable, {
214
226
  path: _path + ".path",
215
227
  expected: "string",
@@ -350,6 +362,22 @@ function createApplication(props) {
350
362
  path: _path + ".typeName",
351
363
  expected: "string",
352
364
  value: input.typeName
365
+ })].every(flag => flag); const _vo8 = (input, _path, _exceptionable = true) => [(Array.isArray(input.role) || _report(_exceptionable, {
366
+ path: _path + ".role",
367
+ expected: "Array<string>",
368
+ value: input.role
369
+ })) && input.role.map((elem, _index6) => "string" === typeof elem || _report(_exceptionable, {
370
+ path: _path + ".role[" + _index6 + "]",
371
+ expected: "string",
372
+ value: elem
373
+ })).every(flag => flag) || _report(_exceptionable, {
374
+ path: _path + ".role",
375
+ expected: "Array<string>",
376
+ value: input.role
377
+ }), "Bearer" === input.type || _report(_exceptionable, {
378
+ path: _path + ".type",
379
+ expected: "\"Bearer\"",
380
+ value: input.type
353
381
  })].every(flag => flag); const _vu0 = (input, _path, _exceptionable = true) => (() => {
354
382
  if ("number" === input.type)
355
383
  return _vo4(input, _path, true && _exceptionable);
@@ -435,276 +463,10 @@ const claude = {
435
463
  type: "object",
436
464
  properties: {
437
465
  operations: {
438
- title: "Array of API operations to generate",
439
466
  description: "Array of API operations to generate.\n\nEach operation in this array must include:\n\n- Specification: Detailed API specification with clear purpose and\n functionality\n- Path: Resource-centric URL path (e.g., \"/resources/{resourceId}\")\n- Method: HTTP method (get, post, put, delete, patch)\n- Description: Extremely detailed multi-paragraph description referencing\n Prisma schema comments\n- Summary: Concise one-sentence summary of the endpoint\n- Parameters: Array of all necessary parameters with descriptions and schema\n definitions\n- RequestBody: For POST/PUT/PATCH methods, with typeName referencing\n components.schemas\n- ResponseBody: With typeName referencing appropriate response type\n\nAll operations must follow strict quality standards:\n\n1. Detailed descriptions referencing Prisma schema comments\n2. Accurate parameter definitions matching path parameters\n3. Appropriate request/response body type references\n4. Consistent patterns for CRUD operations\n\nFor list retrievals (typically PATCH), include pagination, search, and\nsorting. For detail retrieval (GET), return a single resource. For creation\n(POST), use .ICreate request body. For modification (PUT), use .IUpdate\nrequest body.",
440
467
  type: "array",
441
468
  items: {
442
- description: "Description of the current {@link AutoBeOpenApi.IOperation} type:\n\n> Operation of the Restful API.\n> \n> This interface defines a single API endpoint with its HTTP {@link method},\n> {@link path}, {@link parameters path parameters},\n> {@link requestBody request body}, and {@link responseBody} structure. It\n> corresponds to an individual operation in the paths section of an OpenAPI\n> document.\n> \n> Each operation requires a detailed explanation of its purpose through the\n> reason and description fields, making it clear why the API was designed and\n> how it should be used.\n> \n> All request bodies and responses for this operation must be object types\n> and must reference named types defined in the components section. The\n> content-type is always `application/json`. For file upload/download\n> operations, use `string & tags.Format<\"uri\">` in the appropriate schema\n> instead of binary data formats.\n> \n> In OpenAPI, this might represent:\n> \n> ```json\n> {\n> \"/shoppings/customers/orders\": {\n> \"post\": {\n> \"description\": \"Create a new order application from shopping cart...\",\n> \"parameters\": [...],\n> \"requestBody\": {...},\n> \"responses\": {...}\n> }\n> }\n> }\n> ```",
443
- type: "object",
444
- properties: {
445
- specification: {
446
- title: "Specification of the API operation",
447
- description: "Specification of the API operation.\n\nBefore defining the API operation interface, please describe what you're\nplanning to write in this `specification` field.\n\nThe specification must be fully detailed and clear, so that anyone can\nunderstand the purpose and functionality of the API operation and its\nrelated components (e.g., {@link path}, {@link parameters},\n{@link requestBody}).\n\nIMPORTANT: The specification MUST identify which Prisma DB table this\noperation is associated with, helping ensure complete coverage of all\ndatabase entities.",
448
- type: "string"
449
- },
450
- description: {
451
- title: "Detailed description about the API operation",
452
- description: "Detailed description about the API operation.\n\nIMPORTANT: This field MUST be extensively detailed and MUST reference the\ndescription comments from the related Prisma DB schema tables and\ncolumns. The description should be organized into MULTIPLE PARAGRAPHS\nseparated by line breaks to improve readability and comprehension.\n\nFor example, include separate paragraphs for:\n\n- The purpose and overview of the API operation\n- Security considerations and user permissions\n- Relationship to underlying database entities\n- Validation rules and business logic\n- Related API operations that might be used together with this one\n- Expected behavior and error handling\n\nWhen writing the description, be sure to incorporate the corresponding DB\nschema's description comments, matching the level of detail and style of\nthose comments. This ensures consistency between the API documentation\nand database structure.\n\nIf there's a dependency to other APIs, please describe the dependency API\noperation in this field with detailed reason. For example, if this API\noperation needs a pre-execution of other API operation, it must be\nexplicitly described.\n\n- `GET /shoppings/customers/sales` must be pre-executed to get entire list\n of summarized sales. Detailed sale information would be obtained by\n specifying the sale ID in the path parameter.\n\n> MUST be written in English. Never use other languages.",
453
- type: "string"
454
- },
455
- summary: {
456
- title: "Short summary of the API operation",
457
- description: "Short summary of the API operation.\n\nThis should be a concise description of the API operation, typically one\nsentence long. It should provide a quick overview of what the API does\nwithout going into too much detail.\n\nThis summary will be used in the OpenAPI documentation to give users a\nquick understanding of the API operation's purpose.\n\nIMPORTANT: The summary should clearly indicate which Prisma DB table this\noperation relates to, helping to ensure all tables have API coverage.\n\n> MUST be written in English. Never use other languages",
458
- type: "string"
459
- },
460
- parameters: {
461
- title: "List of path parameters",
462
- description: "List of path parameters.\n\nNote that, the {@link AutoBeOpenApi.IParameter.name identifier name} of\npath parameter must be corresponded to the\n{@link path API operation path}.\n\nFor example, if there's an API operation which has {@link path} of\n`/shoppings/customers/sales/{saleId}/questions/${questionId}/comments/${commentId}`,\nits list of {@link AutoBeOpenApi.IParameter.name path parameters} must be\nlike:\n\n- `saleId`\n- `questionId`\n- `commentId`",
463
- type: "array",
464
- items: {
465
- description: "Description of the current {@link AutoBeOpenApi.IParameter} type:\n\n> Path parameter information for API routes.\n> \n> This interface defines a path parameter that appears in the URL of an API\n> endpoint. Path parameters are enclosed in curly braces in the\n> {@link AutoBeOpenApi.IOperation.path operation path} and must be defined\n> with their types and descriptions.\n> \n> For example, if API operation path is\n> `/shoppings/customers/sales/{saleId}/questions/${questionId}/comments/${commentId}`,\n> the path parameters should be like below:\n> \n> ```json\n> {\n> \"path\": \"/shoppings/customers/sales/{saleId}/questions/${questionId}/comments/${commentId}\",\n> \"method\": \"get\",\n> \"parameters\": [\n> {\n> \"name\": \"saleId\",\n> \"in\": \"path\",\n> \"schema\": { \"type\": \"string\", \"format\": \"uuid\" },\n> \"description\": \"Target sale's ID\"\n> },\n> {\n> \"name\": \"questionId\",\n> \"in\": \"path\",\n> \"schema\": { \"type\": \"string\", \"format\": \"uuid\" },\n> \"description\": \"Target question's ID\"\n> },\n> {\n> \"name\": \"commentId\",\n> \"in\": \"path\",\n> \"schema\": { \"type\": \"string\", \"format\": \"uuid\" },\n> \"description\": \"Target comment's ID\"\n> }\n> ]\n> }\n> ```",
466
- type: "object",
467
- properties: {
468
- name: {
469
- title: "Identifier name of the path parameter",
470
- description: "Identifier name of the path parameter.\n\nThis name must match exactly with the parameter name in the route path.\nIt must be corresponded to the\n{@link AutoBeOpenApi.IOperation.path API operation path}.",
471
- type: "string"
472
- },
473
- description: {
474
- title: "Description about the path parameter",
475
- description: "Description about the path parameter.\n\nMake short, concise and clear description about the path parameter.\n\n> MUST be written in English. Never use other languages.",
476
- type: "string"
477
- },
478
- schema: {
479
- title: "Type schema of the path parameter",
480
- description: "Type schema of the path parameter.\n\nPath parameters are typically primitive types like\n{@link AutoBeOpenApi.IJsonSchema.IString strings},\n{@link AutoBeOpenApi.IJsonSchema.IInteger integers},\n{@link AutoBeOpenApi.IJsonSchema.INumber numbers}.\n\nIf you need other types, please use request body instead with object type\nencapsulation.",
481
- oneOf: [
482
- {
483
- type: "object",
484
- properties: {
485
- minimum: {
486
- title: "Minimum value restriction",
487
- description: "Minimum value restriction.",
488
- type: "number"
489
- },
490
- maximum: {
491
- title: "Maximum value restriction",
492
- description: "Maximum value restriction.",
493
- type: "number"
494
- },
495
- exclusiveMinimum: {
496
- title: "Exclusive minimum value restriction",
497
- description: "Exclusive minimum value restriction.",
498
- type: "number"
499
- },
500
- exclusiveMaximum: {
501
- title: "Exclusive maximum value restriction",
502
- description: "Exclusive maximum value restriction.",
503
- type: "number"
504
- },
505
- multipleOf: {
506
- title: "Multiple of value restriction",
507
- description: "Multiple of value restriction.",
508
- type: "number",
509
- exclusiveMinimum: 0
510
- },
511
- type: {
512
- title: "Discriminator value of the type",
513
- description: "Discriminator value of the type.",
514
- "const": "number"
515
- }
516
- },
517
- required: [
518
- "type"
519
- ],
520
- description: "Description of the current {@link AutoBeOpenApi.IJsonSchema.INumber} type:\n\n> Number (double) type info."
521
- },
522
- {
523
- type: "object",
524
- properties: {
525
- minimum: {
526
- title: "Minimum value restriction",
527
- description: "Minimum value restriction.",
528
- type: "integer"
529
- },
530
- maximum: {
531
- title: "Maximum value restriction",
532
- description: "Maximum value restriction.",
533
- type: "integer"
534
- },
535
- exclusiveMinimum: {
536
- title: "Exclusive minimum value restriction",
537
- description: "Exclusive minimum value restriction.",
538
- type: "number"
539
- },
540
- exclusiveMaximum: {
541
- title: "Exclusive maximum value restriction",
542
- description: "Exclusive maximum value restriction.",
543
- type: "number"
544
- },
545
- multipleOf: {
546
- title: "Multiple of value restriction",
547
- description: "Multiple of value restriction.",
548
- type: "integer",
549
- exclusiveMinimum: 0
550
- },
551
- type: {
552
- title: "Discriminator value of the type",
553
- description: "Discriminator value of the type.",
554
- "const": "integer"
555
- }
556
- },
557
- required: [
558
- "type"
559
- ],
560
- description: "Description of the current {@link AutoBeOpenApi.IJsonSchema.IInteger} type:\n\n> Integer type info."
561
- },
562
- {
563
- type: "object",
564
- properties: {
565
- format: {
566
- title: "Format restriction",
567
- description: "Format restriction.",
568
- type: "string"
569
- },
570
- pattern: {
571
- title: "Pattern restriction",
572
- description: "Pattern restriction.",
573
- type: "string"
574
- },
575
- contentMediaType: {
576
- title: "Content media type restriction",
577
- description: "Content media type restriction.",
578
- type: "string"
579
- },
580
- minLength: {
581
- title: "Minimum length restriction",
582
- description: "Minimum length restriction.",
583
- type: "integer",
584
- minimum: 0
585
- },
586
- maxLength: {
587
- title: "Maximum length restriction",
588
- description: "Maximum length restriction.",
589
- type: "integer",
590
- minimum: 0
591
- },
592
- type: {
593
- title: "Discriminator value of the type",
594
- description: "Discriminator value of the type.",
595
- "const": "string"
596
- }
597
- },
598
- required: [
599
- "type"
600
- ],
601
- description: "Description of the current {@link AutoBeOpenApi.IJsonSchema.IString} type:\n\n> String type info."
602
- }
603
- ]
604
- }
605
- },
606
- required: [
607
- "name",
608
- "description",
609
- "schema"
610
- ]
611
- }
612
- },
613
- requestBody: {
614
- title: "Request body of the API operation",
615
- description: "Request body of the API operation.\n\nDefines the payload structure for the request. Contains a description and\nschema reference to define the expected input data.\n\nShould be `null` for operations that don't require a request body, such\nas most \"get\" operations.",
616
- oneOf: [
617
- {
618
- type: "null"
619
- },
620
- {
621
- type: "object",
622
- properties: {
623
- description: {
624
- title: "Description about the request body",
625
- description: "Description about the request body.\n\nMake short, concise and clear description about the request body.\n\n> MUST be written in English. Never use other languages.",
626
- type: "string"
627
- },
628
- typeName: {
629
- title: "Request body type name",
630
- description: "Request body type name.\n\nThis specifies the data structure expected in the request body, that will\nbe transformed to {@link AutoBeOpenApi.IJsonSchema.IReference reference}\ntype in the {@link AutoBeOpenApi.IComponents.schemas components section}\nas an {@link AutoBeOpenApi.IJsonSchema.Object object} type.\n\nHere is the naming convention for the request body type:\n\n- `IEntityName.ICreate`: Request body for creation operations (POST)\n- `IEntityName.IUpdate`: Request body for update operations (PUT)\n- `IEntityName.IRequest`: Request parameters for list operations (often\n with search/pagination)\n\nWhat you write:\n\n```json\n{\n \"typeName\": \"IShoppingOrder.ICreate\"\n}\n```\n\nTransformed to:\n\n```json\n{\n \"schema\": {\n \"$ref\": \"#/components/schemas/IShoppingOrder.ICreate\"\n }\n}\n```",
631
- type: "string"
632
- }
633
- },
634
- required: [
635
- "description",
636
- "typeName"
637
- ],
638
- description: "Description of the current {@link AutoBeOpenApi.IRequestBody} type:\n\n> Request body information of OpenAPI operation.\n> \n> This interface defines the structure for request bodies in API routes. It\n> corresponds to the requestBody section in OpenAPI specifications, providing\n> both a description and schema reference for the request payload.\n> \n> The content-type for all request bodies is always `application/json`. Even\n> when file uploading is required, don't use `multipart/form-data` or\n> `application/x-www-form-urlencoded` content types. Instead, just define an\n> URI string property in the request body schema.\n> \n> Note that, all body schemas must be transformable to a\n> {@link AutoBeOpenApi.IJsonSchema.IReference reference} type defined in the\n> {@link AutoBeOpenApi.IComponents.schemas components section} as an\n> {@link AutoBeOpenApi.IJsonSchema.IObject object} type.\n> \n> In OpenAPI, this might represent:\n> \n> ```json\n> {\n> \"requestBody\": {\n> \"description\": \"Creation info of the order\",\n> \"content\": {\n> \"application/json\": {\n> \"schema\": {\n> \"$ref\": \"#/components/schemas/IShoppingOrder.ICreate\"\n> }\n> }\n> }\n> }\n> }\n> ```"
639
- }
640
- ]
641
- },
642
- responseBody: {
643
- title: "Response body of the API operation",
644
- description: "Response body of the API operation.\n\nDefines the structure of the successful response data. Contains a\ndescription and schema reference for the returned data.\n\nShould be null for operations that don't return any data.",
645
- oneOf: [
646
- {
647
- type: "null"
648
- },
649
- {
650
- type: "object",
651
- properties: {
652
- description: {
653
- title: "Description about the response body",
654
- description: "Description about the response body.\n\nMake short, concise and clear description about the response body.\n\n> MUST be written in English. Never use other languages.",
655
- type: "string"
656
- },
657
- typeName: {
658
- title: "Response body's data type",
659
- description: "Response body's data type.\n\nSpecifies the structure of the returned data (response body), that will\nbe transformed to {@link AutoBeOpenApi.IJsonSchema.IReference} type in the\n{@link AutoBeOpenApi.IComponents.schemas components section} as an\n{@link AutoBeOpenApi.IJsonSchema.IObject object} type.\n\nHere is the naming convention for the response body type:\n\n- `IEntityName`: Main entity with detailed information (e.g.,\n `IShoppingSale`)\n- `IEntityName.ISummary`: Simplified response version with essential\n properties\n- `IEntityName.IInvert`: Alternative view of an entity from a different\n perspective\n- `IPageIEntityName`: Paginated results container with `pagination` and\n `data` properties\n\nWhat you write:\n\n```json\n{\n \"typeName\": \"IShoppingOrder\"\n}\n```\n\nTransformed to:\n\n```json\n{\n \"schema\": {\n \"$ref\": \"#/components/schemas/IShoppingOrder\"\n }\n}\n```",
660
- type: "string"
661
- }
662
- },
663
- required: [
664
- "description",
665
- "typeName"
666
- ],
667
- description: "Description of the current {@link AutoBeOpenApi.IResponseBody} type:\n\n> Response body information for OpenAPI operation.\n> \n> This interface defines the structure of a successful response from an API\n> operation. It provides a description of the response and a schema reference\n> to define the returned data structure.\n> \n> The content-type for all responses is always `application/json`. Even when\n> file downloading is required, don't use `application/octet-stream` or\n> `multipart/form-data` content types. Instead, just define an URI string\n> property in the response body schema.\n> \n> In OpenAPI, this might represent:\n> \n> ```json\n> {\n> \"responses\": {\n> \"200\": {\n> \"description\": \"Order information\",\n> \"content\": {\n> \"application/json\": {\n> \"schema\": { \"$ref\": \"#/components/schemas/IShoppingOrder\" }\n> }\n> }\n> }\n> }\n> }\n> ```"
668
- }
669
- ]
670
- },
671
- path: {
672
- title: "HTTP path of the API operation",
673
- description: "HTTP path of the API operation.\n\nThe URL path for accessing this API operation, using path parameters\nenclosed in curly braces (e.g., `/shoppings/customers/sales/{saleId}`).\n\nIt must be corresponded to the {@link parameters path parameters}.\n\nThe path structure should clearly indicate which database entity this\noperation is manipulating, helping to ensure all entities have\nappropriate API coverage.",
674
- type: "string"
675
- },
676
- method: {
677
- title: "HTTP method of the API operation",
678
- description: "HTTP method of the API operation.\n\nNote that, if the API operation has {@link requestBody}, method must not\nbe `get`.\n\nAlso, even though the API operation has been designed to only get\ninformation, but it needs complicated request information, it must be\ndefined as `patch` method with {@link requestBody} data specification.\n\n- `get`: get information\n- `patch`: get information with complicated request data\n ({@link requestBody})\n- `post`: create new record\n- `put`: update existing record\n- `delete`: remove record",
679
- oneOf: [
680
- {
681
- "const": "get"
682
- },
683
- {
684
- "const": "post"
685
- },
686
- {
687
- "const": "put"
688
- },
689
- {
690
- "const": "delete"
691
- },
692
- {
693
- "const": "patch"
694
- }
695
- ]
696
- }
697
- },
698
- required: [
699
- "specification",
700
- "description",
701
- "summary",
702
- "parameters",
703
- "requestBody",
704
- "responseBody",
705
- "path",
706
- "method"
707
- ]
469
+ $ref: "#/$defs/AutoBeOpenApi.IOperation"
708
470
  }
709
471
  }
710
472
  },
@@ -712,10 +474,310 @@ const claude = {
712
474
  "operations"
713
475
  ],
714
476
  additionalProperties: false,
715
- $defs: {}
477
+ $defs: {
478
+ "AutoBeOpenApi.IOperation": {
479
+ description: "Operation of the Restful API.\n\nThis interface defines a single API endpoint with its HTTP {@link method},\n{@link path}, {@link parameters path parameters},\n{@link requestBody request body}, and {@link responseBody} structure. It\ncorresponds to an individual operation in the paths section of an OpenAPI\ndocument.\n\nEach operation requires a detailed explanation of its purpose through the\nreason and description fields, making it clear why the API was designed and\nhow it should be used.\n\nAll request bodies and responses for this operation must be object types\nand must reference named types defined in the components section. The\ncontent-type is always `application/json`. For file upload/download\noperations, use `string & tags.Format<\"uri\">` in the appropriate schema\ninstead of binary data formats.\n\nIn OpenAPI, this might represent:\n\n```json\n{\n \"/shoppings/customers/orders\": {\n \"post\": {\n \"description\": \"Create a new order application from shopping cart...\",\n \"parameters\": [...],\n \"requestBody\": {...},\n \"responses\": {...}\n }\n }\n}\n```",
480
+ type: "object",
481
+ properties: {
482
+ specification: {
483
+ description: "Specification of the API operation.\n\nBefore defining the API operation interface, please describe what you're\nplanning to write in this `specification` field.\n\nThe specification must be fully detailed and clear, so that anyone can\nunderstand the purpose and functionality of the API operation and its\nrelated components (e.g., {@link path}, {@link parameters},\n{@link requestBody}).\n\nIMPORTANT: The specification MUST identify which Prisma DB table this\noperation is associated with, helping ensure complete coverage of all\ndatabase entities.",
484
+ type: "string"
485
+ },
486
+ description: {
487
+ description: "Detailed description about the API operation.\n\nIMPORTANT: This field MUST be extensively detailed and MUST reference the\ndescription comments from the related Prisma DB schema tables and\ncolumns. The description should be organized into MULTIPLE PARAGRAPHS\nseparated by line breaks to improve readability and comprehension.\n\nFor example, include separate paragraphs for:\n\n- The purpose and overview of the API operation\n- Security considerations and user permissions\n- Relationship to underlying database entities\n- Validation rules and business logic\n- Related API operations that might be used together with this one\n- Expected behavior and error handling\n\nWhen writing the description, be sure to incorporate the corresponding DB\nschema's description comments, matching the level of detail and style of\nthose comments. This ensures consistency between the API documentation\nand database structure.\n\nIf there's a dependency to other APIs, please describe the dependency API\noperation in this field with detailed reason. For example, if this API\noperation needs a pre-execution of other API operation, it must be\nexplicitly described.\n\n- `GET /shoppings/customers/sales` must be pre-executed to get entire list\n of summarized sales. Detailed sale information would be obtained by\n specifying the sale ID in the path parameter.\n\n> MUST be written in English. Never use other languages.",
488
+ type: "string"
489
+ },
490
+ summary: {
491
+ description: "Short summary of the API operation.\n\nThis should be a concise description of the API operation, typically one\nsentence long. It should provide a quick overview of what the API does\nwithout going into too much detail.\n\nThis summary will be used in the OpenAPI documentation to give users a\nquick understanding of the API operation's purpose.\n\nIMPORTANT: The summary should clearly indicate which Prisma DB table this\noperation relates to, helping to ensure all tables have API coverage.\n\n> MUST be written in English. Never use other languages",
492
+ type: "string"
493
+ },
494
+ parameters: {
495
+ description: "List of path parameters.\n\nNote that, the {@link AutoBeOpenApi.IParameter.name identifier name} of\npath parameter must be corresponded to the\n{@link path API operation path}.\n\nFor example, if there's an API operation which has {@link path} of\n`/shoppings/customers/sales/{saleId}/questions/${questionId}/comments/${commentId}`,\nits list of {@link AutoBeOpenApi.IParameter.name path parameters} must be\nlike:\n\n- `saleId`\n- `questionId`\n- `commentId`",
496
+ type: "array",
497
+ items: {
498
+ $ref: "#/$defs/AutoBeOpenApi.IParameter"
499
+ }
500
+ },
501
+ requestBody: {
502
+ description: "Request body of the API operation.\n\nDefines the payload structure for the request. Contains a description and\nschema reference to define the expected input data.\n\nShould be `null` for operations that don't require a request body, such\nas most \"get\" operations.",
503
+ oneOf: [
504
+ {
505
+ type: "null"
506
+ },
507
+ {
508
+ $ref: "#/$defs/AutoBeOpenApi.IRequestBody"
509
+ }
510
+ ]
511
+ },
512
+ responseBody: {
513
+ description: "Response body of the API operation.\n\nDefines the structure of the successful response data. Contains a\ndescription and schema reference for the returned data.\n\nShould be null for operations that don't return any data.",
514
+ oneOf: [
515
+ {
516
+ type: "null"
517
+ },
518
+ {
519
+ $ref: "#/$defs/AutoBeOpenApi.IResponseBody"
520
+ }
521
+ ]
522
+ },
523
+ authorization: {
524
+ description: "Authorization\n\nDefines which user role is subject to strategies such as membership\nregistration, login, token issuance, refresh token, etc.",
525
+ oneOf: [
526
+ {
527
+ type: "null"
528
+ },
529
+ {
530
+ $ref: "#/$defs/AutoBeOpenApi.IAuthorization"
531
+ }
532
+ ],
533
+ discriminator: {
534
+ propertyName: "type",
535
+ mapping: {
536
+ Bearer: "#/$defs/AutoBeOpenApi.IAuthorization"
537
+ }
538
+ }
539
+ },
540
+ path: {
541
+ description: "HTTP path of the API operation.\n\nThe URL path for accessing this API operation, using path parameters\nenclosed in curly braces (e.g., `/shoppings/customers/sales/{saleId}`).\n\nIt must be corresponded to the {@link parameters path parameters}.\n\nThe path structure should clearly indicate which database entity this\noperation is manipulating, helping to ensure all entities have\nappropriate API coverage.",
542
+ type: "string"
543
+ },
544
+ method: {
545
+ description: "HTTP method of the API operation.\n\nNote that, if the API operation has {@link requestBody}, method must not\nbe `get`.\n\nAlso, even though the API operation has been designed to only get\ninformation, but it needs complicated request information, it must be\ndefined as `patch` method with {@link requestBody} data specification.\n\n- `get`: get information\n- `patch`: get information with complicated request data\n ({@link requestBody})\n- `post`: create new record\n- `put`: update existing record\n- `delete`: remove record",
546
+ oneOf: [
547
+ {
548
+ "const": "get"
549
+ },
550
+ {
551
+ "const": "post"
552
+ },
553
+ {
554
+ "const": "put"
555
+ },
556
+ {
557
+ "const": "delete"
558
+ },
559
+ {
560
+ "const": "patch"
561
+ }
562
+ ]
563
+ }
564
+ },
565
+ required: [
566
+ "specification",
567
+ "description",
568
+ "summary",
569
+ "parameters",
570
+ "requestBody",
571
+ "responseBody",
572
+ "path",
573
+ "method"
574
+ ]
575
+ },
576
+ "AutoBeOpenApi.IParameter": {
577
+ description: "Path parameter information for API routes.\n\nThis interface defines a path parameter that appears in the URL of an API\nendpoint. Path parameters are enclosed in curly braces in the\n{@link AutoBeOpenApi.IOperation.path operation path} and must be defined\nwith their types and descriptions.\n\nFor example, if API operation path is\n`/shoppings/customers/sales/{saleId}/questions/${questionId}/comments/${commentId}`,\nthe path parameters should be like below:\n\n```json\n{\n \"path\": \"/shoppings/customers/sales/{saleId}/questions/${questionId}/comments/${commentId}\",\n \"method\": \"get\",\n \"parameters\": [\n {\n \"name\": \"saleId\",\n \"in\": \"path\",\n \"schema\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"description\": \"Target sale's ID\"\n },\n {\n \"name\": \"questionId\",\n \"in\": \"path\",\n \"schema\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"description\": \"Target question's ID\"\n },\n {\n \"name\": \"commentId\",\n \"in\": \"path\",\n \"schema\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"description\": \"Target comment's ID\"\n }\n ]\n}\n```",
578
+ type: "object",
579
+ properties: {
580
+ name: {
581
+ description: "Identifier name of the path parameter.\n\nThis name must match exactly with the parameter name in the route path.\nIt must be corresponded to the\n{@link AutoBeOpenApi.IOperation.path API operation path}.",
582
+ type: "string"
583
+ },
584
+ description: {
585
+ description: "Description about the path parameter.\n\nMake short, concise and clear description about the path parameter.\n\n> MUST be written in English. Never use other languages.",
586
+ type: "string"
587
+ },
588
+ schema: {
589
+ description: "Type schema of the path parameter.\n\nPath parameters are typically primitive types like\n{@link AutoBeOpenApi.IJsonSchema.IString strings},\n{@link AutoBeOpenApi.IJsonSchema.IInteger integers},\n{@link AutoBeOpenApi.IJsonSchema.INumber numbers}.\n\nIf you need other types, please use request body instead with object type\nencapsulation.",
590
+ oneOf: [
591
+ {
592
+ $ref: "#/$defs/AutoBeOpenApi.IJsonSchema.INumber"
593
+ },
594
+ {
595
+ $ref: "#/$defs/AutoBeOpenApi.IJsonSchema.IInteger"
596
+ },
597
+ {
598
+ $ref: "#/$defs/AutoBeOpenApi.IJsonSchema.IString"
599
+ }
600
+ ],
601
+ discriminator: {
602
+ propertyName: "type",
603
+ mapping: {
604
+ number: "#/$defs/AutoBeOpenApi.IJsonSchema.INumber",
605
+ integer: "#/$defs/AutoBeOpenApi.IJsonSchema.IInteger",
606
+ string: "#/$defs/AutoBeOpenApi.IJsonSchema.IString"
607
+ }
608
+ }
609
+ }
610
+ },
611
+ required: [
612
+ "name",
613
+ "description",
614
+ "schema"
615
+ ]
616
+ },
617
+ "AutoBeOpenApi.IJsonSchema.INumber": {
618
+ description: "Number (double) type info.",
619
+ type: "object",
620
+ properties: {
621
+ minimum: {
622
+ description: "Minimum value restriction.",
623
+ type: "number"
624
+ },
625
+ maximum: {
626
+ description: "Maximum value restriction.",
627
+ type: "number"
628
+ },
629
+ exclusiveMinimum: {
630
+ description: "Exclusive minimum value restriction.",
631
+ type: "number"
632
+ },
633
+ exclusiveMaximum: {
634
+ description: "Exclusive maximum value restriction.",
635
+ type: "number"
636
+ },
637
+ multipleOf: {
638
+ description: "Multiple of value restriction.",
639
+ type: "number",
640
+ exclusiveMinimum: 0
641
+ },
642
+ type: {
643
+ description: "Discriminator value of the type.",
644
+ "const": "number"
645
+ }
646
+ },
647
+ required: [
648
+ "type"
649
+ ]
650
+ },
651
+ "AutoBeOpenApi.IJsonSchema.IInteger": {
652
+ description: "Integer type info.",
653
+ type: "object",
654
+ properties: {
655
+ minimum: {
656
+ description: "Minimum value restriction.",
657
+ type: "integer"
658
+ },
659
+ maximum: {
660
+ description: "Maximum value restriction.",
661
+ type: "integer"
662
+ },
663
+ exclusiveMinimum: {
664
+ description: "Exclusive minimum value restriction.",
665
+ type: "number"
666
+ },
667
+ exclusiveMaximum: {
668
+ description: "Exclusive maximum value restriction.",
669
+ type: "number"
670
+ },
671
+ multipleOf: {
672
+ description: "Multiple of value restriction.",
673
+ type: "integer",
674
+ exclusiveMinimum: 0
675
+ },
676
+ type: {
677
+ description: "Discriminator value of the type.",
678
+ "const": "integer"
679
+ }
680
+ },
681
+ required: [
682
+ "type"
683
+ ]
684
+ },
685
+ "AutoBeOpenApi.IJsonSchema.IString": {
686
+ description: "String type info.",
687
+ type: "object",
688
+ properties: {
689
+ format: {
690
+ description: "Format restriction.",
691
+ type: "string"
692
+ },
693
+ pattern: {
694
+ description: "Pattern restriction.",
695
+ type: "string"
696
+ },
697
+ contentMediaType: {
698
+ description: "Content media type restriction.",
699
+ type: "string"
700
+ },
701
+ minLength: {
702
+ description: "Minimum length restriction.",
703
+ type: "integer",
704
+ minimum: 0
705
+ },
706
+ maxLength: {
707
+ description: "Maximum length restriction.",
708
+ type: "integer",
709
+ minimum: 0
710
+ },
711
+ type: {
712
+ description: "Discriminator value of the type.",
713
+ "const": "string"
714
+ }
715
+ },
716
+ required: [
717
+ "type"
718
+ ]
719
+ },
720
+ "AutoBeOpenApi.IRequestBody": {
721
+ description: "Request body information of OpenAPI operation.\n\nThis interface defines the structure for request bodies in API routes. It\ncorresponds to the requestBody section in OpenAPI specifications, providing\nboth a description and schema reference for the request payload.\n\nThe content-type for all request bodies is always `application/json`. Even\nwhen file uploading is required, don't use `multipart/form-data` or\n`application/x-www-form-urlencoded` content types. Instead, just define an\nURI string property in the request body schema.\n\nNote that, all body schemas must be transformable to a\n{@link AutoBeOpenApi.IJsonSchema.IReference reference} type defined in the\n{@link AutoBeOpenApi.IComponents.schemas components section} as an\n{@link AutoBeOpenApi.IJsonSchema.IObject object} type.\n\nIn OpenAPI, this might represent:\n\n```json\n{\n \"requestBody\": {\n \"description\": \"Creation info of the order\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/IShoppingOrder.ICreate\"\n }\n }\n }\n }\n}\n```",
722
+ type: "object",
723
+ properties: {
724
+ description: {
725
+ description: "Description about the request body.\n\nMake short, concise and clear description about the request body.\n\n> MUST be written in English. Never use other languages.",
726
+ type: "string"
727
+ },
728
+ typeName: {
729
+ description: "Request body type name.\n\nThis specifies the data structure expected in the request body, that will\nbe transformed to {@link AutoBeOpenApi.IJsonSchema.IReference reference}\ntype in the {@link AutoBeOpenApi.IComponents.schemas components section}\nas an {@link AutoBeOpenApi.IJsonSchema.Object object} type.\n\nHere is the naming convention for the request body type:\n\n- `IEntityName.ICreate`: Request body for creation operations (POST)\n- `IEntityName.IUpdate`: Request body for update operations (PUT)\n- `IEntityName.IRequest`: Request parameters for list operations (often\n with search/pagination)\n\nWhat you write:\n\n```json\n{\n \"typeName\": \"IShoppingOrder.ICreate\"\n}\n```\n\nTransformed to:\n\n```json\n{\n \"schema\": {\n \"$ref\": \"#/components/schemas/IShoppingOrder.ICreate\"\n }\n}\n```",
730
+ type: "string"
731
+ }
732
+ },
733
+ required: [
734
+ "description",
735
+ "typeName"
736
+ ]
737
+ },
738
+ "AutoBeOpenApi.IResponseBody": {
739
+ description: "Response body information for OpenAPI operation.\n\nThis interface defines the structure of a successful response from an API\noperation. It provides a description of the response and a schema reference\nto define the returned data structure.\n\nThe content-type for all responses is always `application/json`. Even when\nfile downloading is required, don't use `application/octet-stream` or\n`multipart/form-data` content types. Instead, just define an URI string\nproperty in the response body schema.\n\nIn OpenAPI, this might represent:\n\n```json\n{\n \"responses\": {\n \"200\": {\n \"description\": \"Order information\",\n \"content\": {\n \"application/json\": {\n \"schema\": { \"$ref\": \"#/components/schemas/IShoppingOrder\" }\n }\n }\n }\n }\n}\n```",
740
+ type: "object",
741
+ properties: {
742
+ description: {
743
+ description: "Description about the response body.\n\nMake short, concise and clear description about the response body.\n\n> MUST be written in English. Never use other languages.",
744
+ type: "string"
745
+ },
746
+ typeName: {
747
+ description: "Response body's data type.\n\nSpecifies the structure of the returned data (response body), that will\nbe transformed to {@link AutoBeOpenApi.IJsonSchema.IReference} type in the\n{@link AutoBeOpenApi.IComponents.schemas components section} as an\n{@link AutoBeOpenApi.IJsonSchema.IObject object} type.\n\nHere is the naming convention for the response body type:\n\n- `IEntityName`: Main entity with detailed information (e.g.,\n `IShoppingSale`)\n- `IEntityName.ISummary`: Simplified response version with essential\n properties\n- `IEntityName.IInvert`: Alternative view of an entity from a different\n perspective\n- `IPageIEntityName`: Paginated results container with `pagination` and\n `data` properties\n\nWhat you write:\n\n```json\n{\n \"typeName\": \"IShoppingOrder\"\n}\n```\n\nTransformed to:\n\n```json\n{\n \"schema\": {\n \"$ref\": \"#/components/schemas/IShoppingOrder\"\n }\n}\n```",
748
+ type: "string"
749
+ }
750
+ },
751
+ required: [
752
+ "description",
753
+ "typeName"
754
+ ]
755
+ },
756
+ "AutoBeOpenApi.IAuthorization": {
757
+ description: "Authorization - Authentication and user type information\n\nThis field defines how the API authenticates the request and restricts\naccess to specific user types.\n\n\u2705 Only the `Authorization` HTTP header is used for authentication. The\nexpected format is:\n\nAuthorization: Bearer <access_token>\n\nThe token must be a bearer token (e.g., JWT or similar), and when parsed,\nit is guaranteed to include at least the authenticated actor's `id` field.\nNo other headers or cookie-based authentication methods are supported.",
758
+ type: "object",
759
+ properties: {
760
+ role: {
761
+ description: "Allowed user types for this API\n\nSpecifies which user types are permitted to access this API.\n\nThis is not a permission level or access control role. Instead, it\ndescribes **who** the user is \u2014 their type within the service's domain\nmodel. It must correspond 1:1 with how the user is represented in the\ndatabase.\n\nExamples:\n\n- \"buyer\": a customer who makes purchases\n- \"seller\": a vendor who offers products\n- \"moderator\": a content reviewer or manager\n\n\u26A0\uFE0F Important: Each `role` must **exactly match a table name defined in\nthe database schema**. This is not merely a convention or example \u2014 it is\na strict requirement.\n\nA valid role must meet the following criteria:\n\n- It must uniquely map to a user group at the database level, represented\n by a dedicated table.\n- It must not overlap semantically with other roles \u2014 for instance, both\n `admin` and `administrator` must not exist to describe the same type.\n\nTherefore, if a user type cannot be clearly and uniquely distinguished in\nthe database, It **cannot** be used as a valid `role` here.",
762
+ type: "array",
763
+ items: {
764
+ type: "string"
765
+ }
766
+ },
767
+ type: {
768
+ description: "Authentication method type\n\nCurrently only `\"bearer\"` is supported, which uses a Bearer token in the\nHTTP Authorization header.",
769
+ "const": "Bearer"
770
+ }
771
+ },
772
+ required: [
773
+ "role",
774
+ "type"
775
+ ]
776
+ }
777
+ }
716
778
  },
717
779
  description: "Generate detailed API operations from path/method combinations.\n\nThis function creates complete API operations following REST principles and\nquality standards. Each generated operation includes specification, path,\nmethod, detailed multi-paragraph description, concise summary, parameters,\nand appropriate request/response bodies.\n\nThe function processes as many operations as possible in a single call,\nwith progress tracking to ensure iterative completion of all required\nendpoints.",
718
- validate: (() => { const _io0 = input => Array.isArray(input.operations) && input.operations.every(elem => "object" === typeof elem && null !== elem && _io1(elem)); const _io1 = input => "string" === typeof input.specification && "string" === typeof input.description && "string" === typeof input.summary && (Array.isArray(input.parameters) && input.parameters.every(elem => "object" === typeof elem && null !== elem && _io2(elem))) && (null === input.requestBody || "object" === typeof input.requestBody && null !== input.requestBody && _io6(input.requestBody)) && (null === input.responseBody || "object" === typeof input.responseBody && null !== input.responseBody && _io7(input.responseBody)) && "string" === typeof input.path && ("get" === input.method || "post" === input.method || "put" === input.method || "delete" === input.method || "patch" === input.method); const _io2 = input => "string" === typeof input.name && "string" === typeof input.description && ("object" === typeof input.schema && null !== input.schema && _iu0(input.schema)); const _io3 = input => (undefined === input.minimum || "number" === typeof input.minimum && (Math.floor(input.minimum) === input.minimum && -9223372036854776000 <= input.minimum && input.minimum <= 9223372036854776000)) && (undefined === input.maximum || "number" === typeof input.maximum && (Math.floor(input.maximum) === input.maximum && -9223372036854776000 <= input.maximum && input.maximum <= 9223372036854776000)) && (undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum) && (undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum) && (undefined === input.multipleOf || "number" === typeof input.multipleOf && (Math.floor(input.multipleOf) === input.multipleOf && 0 <= input.multipleOf && input.multipleOf <= 18446744073709552000 && 0 < input.multipleOf)) && "integer" === input.type; const _io4 = input => (undefined === input.minimum || "number" === typeof input.minimum) && (undefined === input.maximum || "number" === typeof input.maximum) && (undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum) && (undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum) && (undefined === input.multipleOf || "number" === typeof input.multipleOf && 0 < input.multipleOf) && "number" === input.type; const _io5 = input => (undefined === input.format || "string" === typeof input.format) && (undefined === input.pattern || "string" === typeof input.pattern) && (undefined === input.contentMediaType || "string" === typeof input.contentMediaType) && (undefined === input.minLength || "number" === typeof input.minLength && (Math.floor(input.minLength) === input.minLength && 0 <= input.minLength && input.minLength <= 18446744073709552000)) && (undefined === input.maxLength || "number" === typeof input.maxLength && (Math.floor(input.maxLength) === input.maxLength && 0 <= input.maxLength && input.maxLength <= 18446744073709552000)) && "string" === input.type; const _io6 = input => "string" === typeof input.description && "string" === typeof input.typeName; const _io7 = input => "string" === typeof input.description && "string" === typeof input.typeName; const _iu0 = input => (() => {
780
+ validate: (() => { const _io0 = input => Array.isArray(input.operations) && input.operations.every(elem => "object" === typeof elem && null !== elem && _io1(elem)); const _io1 = input => "string" === typeof input.specification && "string" === typeof input.description && "string" === typeof input.summary && (Array.isArray(input.parameters) && input.parameters.every(elem => "object" === typeof elem && null !== elem && _io2(elem))) && (null === input.requestBody || "object" === typeof input.requestBody && null !== input.requestBody && _io6(input.requestBody)) && (null === input.responseBody || "object" === typeof input.responseBody && null !== input.responseBody && _io7(input.responseBody)) && (null === input.authorization || undefined === input.authorization || "object" === typeof input.authorization && null !== input.authorization && _io8(input.authorization)) && "string" === typeof input.path && ("get" === input.method || "post" === input.method || "put" === input.method || "delete" === input.method || "patch" === input.method); const _io2 = input => "string" === typeof input.name && "string" === typeof input.description && ("object" === typeof input.schema && null !== input.schema && _iu0(input.schema)); const _io3 = input => (undefined === input.minimum || "number" === typeof input.minimum && (Math.floor(input.minimum) === input.minimum && -9223372036854776000 <= input.minimum && input.minimum <= 9223372036854776000)) && (undefined === input.maximum || "number" === typeof input.maximum && (Math.floor(input.maximum) === input.maximum && -9223372036854776000 <= input.maximum && input.maximum <= 9223372036854776000)) && (undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum) && (undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum) && (undefined === input.multipleOf || "number" === typeof input.multipleOf && (Math.floor(input.multipleOf) === input.multipleOf && 0 <= input.multipleOf && input.multipleOf <= 18446744073709552000 && 0 < input.multipleOf)) && "integer" === input.type; const _io4 = input => (undefined === input.minimum || "number" === typeof input.minimum) && (undefined === input.maximum || "number" === typeof input.maximum) && (undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum) && (undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum) && (undefined === input.multipleOf || "number" === typeof input.multipleOf && 0 < input.multipleOf) && "number" === input.type; const _io5 = input => (undefined === input.format || "string" === typeof input.format) && (undefined === input.pattern || "string" === typeof input.pattern) && (undefined === input.contentMediaType || "string" === typeof input.contentMediaType) && (undefined === input.minLength || "number" === typeof input.minLength && (Math.floor(input.minLength) === input.minLength && 0 <= input.minLength && input.minLength <= 18446744073709552000)) && (undefined === input.maxLength || "number" === typeof input.maxLength && (Math.floor(input.maxLength) === input.maxLength && 0 <= input.maxLength && input.maxLength <= 18446744073709552000)) && "string" === input.type; const _io6 = input => "string" === typeof input.description && "string" === typeof input.typeName; const _io7 = input => "string" === typeof input.description && "string" === typeof input.typeName; const _io8 = input => Array.isArray(input.role) && input.role.every(elem => "string" === typeof elem) && "Bearer" === input.type; const _iu0 = input => (() => {
719
781
  if ("number" === input.type)
720
782
  return _io4(input);
721
783
  else if ("integer" === input.type)
@@ -728,12 +790,12 @@ const claude = {
728
790
  path: _path + ".operations",
729
791
  expected: "Array<AutoBeOpenApi.IOperation>",
730
792
  value: input.operations
731
- })) && input.operations.map((elem, _index3) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
732
- path: _path + ".operations[" + _index3 + "]",
793
+ })) && input.operations.map((elem, _index4) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
794
+ path: _path + ".operations[" + _index4 + "]",
733
795
  expected: "AutoBeOpenApi.IOperation",
734
796
  value: elem
735
- })) && _vo1(elem, _path + ".operations[" + _index3 + "]", true && _exceptionable) || _report(_exceptionable, {
736
- path: _path + ".operations[" + _index3 + "]",
797
+ })) && _vo1(elem, _path + ".operations[" + _index4 + "]", true && _exceptionable) || _report(_exceptionable, {
798
+ path: _path + ".operations[" + _index4 + "]",
737
799
  expected: "AutoBeOpenApi.IOperation",
738
800
  value: elem
739
801
  })).every(flag => flag) || _report(_exceptionable, {
@@ -756,12 +818,12 @@ const claude = {
756
818
  path: _path + ".parameters",
757
819
  expected: "Array<AutoBeOpenApi.IParameter>",
758
820
  value: input.parameters
759
- })) && input.parameters.map((elem, _index4) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
760
- path: _path + ".parameters[" + _index4 + "]",
821
+ })) && input.parameters.map((elem, _index5) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
822
+ path: _path + ".parameters[" + _index5 + "]",
761
823
  expected: "AutoBeOpenApi.IParameter",
762
824
  value: elem
763
- })) && _vo2(elem, _path + ".parameters[" + _index4 + "]", true && _exceptionable) || _report(_exceptionable, {
764
- path: _path + ".parameters[" + _index4 + "]",
825
+ })) && _vo2(elem, _path + ".parameters[" + _index5 + "]", true && _exceptionable) || _report(_exceptionable, {
826
+ path: _path + ".parameters[" + _index5 + "]",
765
827
  expected: "AutoBeOpenApi.IParameter",
766
828
  value: elem
767
829
  })).every(flag => flag) || _report(_exceptionable, {
@@ -784,6 +846,14 @@ const claude = {
784
846
  path: _path + ".responseBody",
785
847
  expected: "(AutoBeOpenApi.IResponseBody | null)",
786
848
  value: input.responseBody
849
+ }), null === input.authorization || undefined === input.authorization || ("object" === typeof input.authorization && null !== input.authorization || _report(_exceptionable, {
850
+ path: _path + ".authorization",
851
+ expected: "(AutoBeOpenApi.IAuthorization | null | undefined)",
852
+ value: input.authorization
853
+ })) && _vo8(input.authorization, _path + ".authorization", true && _exceptionable) || _report(_exceptionable, {
854
+ path: _path + ".authorization",
855
+ expected: "(AutoBeOpenApi.IAuthorization | null | undefined)",
856
+ value: input.authorization
787
857
  }), "string" === typeof input.path || _report(_exceptionable, {
788
858
  path: _path + ".path",
789
859
  expected: "string",
@@ -924,6 +994,22 @@ const claude = {
924
994
  path: _path + ".typeName",
925
995
  expected: "string",
926
996
  value: input.typeName
997
+ })].every(flag => flag); const _vo8 = (input, _path, _exceptionable = true) => [(Array.isArray(input.role) || _report(_exceptionable, {
998
+ path: _path + ".role",
999
+ expected: "Array<string>",
1000
+ value: input.role
1001
+ })) && input.role.map((elem, _index6) => "string" === typeof elem || _report(_exceptionable, {
1002
+ path: _path + ".role[" + _index6 + "]",
1003
+ expected: "string",
1004
+ value: elem
1005
+ })).every(flag => flag) || _report(_exceptionable, {
1006
+ path: _path + ".role",
1007
+ expected: "Array<string>",
1008
+ value: input.role
1009
+ }), "Bearer" === input.type || _report(_exceptionable, {
1010
+ path: _path + ".type",
1011
+ expected: "\"Bearer\"",
1012
+ value: input.type
927
1013
  })].every(flag => flag); const _vu0 = (input, _path, _exceptionable = true) => (() => {
928
1014
  if ("number" === input.type)
929
1015
  return _vo4(input, _path, true && _exceptionable);
@@ -984,272 +1070,10 @@ const collection = {
984
1070
  type: "object",
985
1071
  properties: {
986
1072
  operations: {
987
- title: "Array of API operations to generate",
988
1073
  description: "Array of API operations to generate.\n\nEach operation in this array must include:\n\n- Specification: Detailed API specification with clear purpose and\n functionality\n- Path: Resource-centric URL path (e.g., \"/resources/{resourceId}\")\n- Method: HTTP method (get, post, put, delete, patch)\n- Description: Extremely detailed multi-paragraph description referencing\n Prisma schema comments\n- Summary: Concise one-sentence summary of the endpoint\n- Parameters: Array of all necessary parameters with descriptions and schema\n definitions\n- RequestBody: For POST/PUT/PATCH methods, with typeName referencing\n components.schemas\n- ResponseBody: With typeName referencing appropriate response type\n\nAll operations must follow strict quality standards:\n\n1. Detailed descriptions referencing Prisma schema comments\n2. Accurate parameter definitions matching path parameters\n3. Appropriate request/response body type references\n4. Consistent patterns for CRUD operations\n\nFor list retrievals (typically PATCH), include pagination, search, and\nsorting. For detail retrieval (GET), return a single resource. For creation\n(POST), use .ICreate request body. For modification (PUT), use .IUpdate\nrequest body.",
989
1074
  type: "array",
990
1075
  items: {
991
- description: "Description of the current {@link AutoBeOpenApi.IOperation} type:\n\n> Operation of the Restful API.\n> \n> This interface defines a single API endpoint with its HTTP {@link method},\n> {@link path}, {@link parameters path parameters},\n> {@link requestBody request body}, and {@link responseBody} structure. It\n> corresponds to an individual operation in the paths section of an OpenAPI\n> document.\n> \n> Each operation requires a detailed explanation of its purpose through the\n> reason and description fields, making it clear why the API was designed and\n> how it should be used.\n> \n> All request bodies and responses for this operation must be object types\n> and must reference named types defined in the components section. The\n> content-type is always `application/json`. For file upload/download\n> operations, use `string & tags.Format<\"uri\">` in the appropriate schema\n> instead of binary data formats.\n> \n> In OpenAPI, this might represent:\n> \n> ```json\n> {\n> \"/shoppings/customers/orders\": {\n> \"post\": {\n> \"description\": \"Create a new order application from shopping cart...\",\n> \"parameters\": [...],\n> \"requestBody\": {...},\n> \"responses\": {...}\n> }\n> }\n> }\n> ```",
992
- type: "object",
993
- properties: {
994
- specification: {
995
- title: "Specification of the API operation",
996
- description: "Specification of the API operation.\n\nBefore defining the API operation interface, please describe what you're\nplanning to write in this `specification` field.\n\nThe specification must be fully detailed and clear, so that anyone can\nunderstand the purpose and functionality of the API operation and its\nrelated components (e.g., {@link path}, {@link parameters},\n{@link requestBody}).\n\nIMPORTANT: The specification MUST identify which Prisma DB table this\noperation is associated with, helping ensure complete coverage of all\ndatabase entities.",
997
- type: "string"
998
- },
999
- description: {
1000
- title: "Detailed description about the API operation",
1001
- description: "Detailed description about the API operation.\n\nIMPORTANT: This field MUST be extensively detailed and MUST reference the\ndescription comments from the related Prisma DB schema tables and\ncolumns. The description should be organized into MULTIPLE PARAGRAPHS\nseparated by line breaks to improve readability and comprehension.\n\nFor example, include separate paragraphs for:\n\n- The purpose and overview of the API operation\n- Security considerations and user permissions\n- Relationship to underlying database entities\n- Validation rules and business logic\n- Related API operations that might be used together with this one\n- Expected behavior and error handling\n\nWhen writing the description, be sure to incorporate the corresponding DB\nschema's description comments, matching the level of detail and style of\nthose comments. This ensures consistency between the API documentation\nand database structure.\n\nIf there's a dependency to other APIs, please describe the dependency API\noperation in this field with detailed reason. For example, if this API\noperation needs a pre-execution of other API operation, it must be\nexplicitly described.\n\n- `GET /shoppings/customers/sales` must be pre-executed to get entire list\n of summarized sales. Detailed sale information would be obtained by\n specifying the sale ID in the path parameter.\n\n> MUST be written in English. Never use other languages.",
1002
- type: "string"
1003
- },
1004
- summary: {
1005
- title: "Short summary of the API operation",
1006
- description: "Short summary of the API operation.\n\nThis should be a concise description of the API operation, typically one\nsentence long. It should provide a quick overview of what the API does\nwithout going into too much detail.\n\nThis summary will be used in the OpenAPI documentation to give users a\nquick understanding of the API operation's purpose.\n\nIMPORTANT: The summary should clearly indicate which Prisma DB table this\noperation relates to, helping to ensure all tables have API coverage.\n\n> MUST be written in English. Never use other languages",
1007
- type: "string"
1008
- },
1009
- parameters: {
1010
- title: "List of path parameters",
1011
- description: "List of path parameters.\n\nNote that, the {@link AutoBeOpenApi.IParameter.name identifier name} of\npath parameter must be corresponded to the\n{@link path API operation path}.\n\nFor example, if there's an API operation which has {@link path} of\n`/shoppings/customers/sales/{saleId}/questions/${questionId}/comments/${commentId}`,\nits list of {@link AutoBeOpenApi.IParameter.name path parameters} must be\nlike:\n\n- `saleId`\n- `questionId`\n- `commentId`",
1012
- type: "array",
1013
- items: {
1014
- description: "Description of the current {@link AutoBeOpenApi.IParameter} type:\n\n> Path parameter information for API routes.\n> \n> This interface defines a path parameter that appears in the URL of an API\n> endpoint. Path parameters are enclosed in curly braces in the\n> {@link AutoBeOpenApi.IOperation.path operation path} and must be defined\n> with their types and descriptions.\n> \n> For example, if API operation path is\n> `/shoppings/customers/sales/{saleId}/questions/${questionId}/comments/${commentId}`,\n> the path parameters should be like below:\n> \n> ```json\n> {\n> \"path\": \"/shoppings/customers/sales/{saleId}/questions/${questionId}/comments/${commentId}\",\n> \"method\": \"get\",\n> \"parameters\": [\n> {\n> \"name\": \"saleId\",\n> \"in\": \"path\",\n> \"schema\": { \"type\": \"string\", \"format\": \"uuid\" },\n> \"description\": \"Target sale's ID\"\n> },\n> {\n> \"name\": \"questionId\",\n> \"in\": \"path\",\n> \"schema\": { \"type\": \"string\", \"format\": \"uuid\" },\n> \"description\": \"Target question's ID\"\n> },\n> {\n> \"name\": \"commentId\",\n> \"in\": \"path\",\n> \"schema\": { \"type\": \"string\", \"format\": \"uuid\" },\n> \"description\": \"Target comment's ID\"\n> }\n> ]\n> }\n> ```",
1015
- type: "object",
1016
- properties: {
1017
- name: {
1018
- title: "Identifier name of the path parameter",
1019
- description: "Identifier name of the path parameter.\n\nThis name must match exactly with the parameter name in the route path.\nIt must be corresponded to the\n{@link AutoBeOpenApi.IOperation.path API operation path}.",
1020
- type: "string"
1021
- },
1022
- description: {
1023
- title: "Description about the path parameter",
1024
- description: "Description about the path parameter.\n\nMake short, concise and clear description about the path parameter.\n\n> MUST be written in English. Never use other languages.",
1025
- type: "string"
1026
- },
1027
- schema: {
1028
- title: "Type schema of the path parameter",
1029
- description: "Type schema of the path parameter.\n\nPath parameters are typically primitive types like\n{@link AutoBeOpenApi.IJsonSchema.IString strings},\n{@link AutoBeOpenApi.IJsonSchema.IInteger integers},\n{@link AutoBeOpenApi.IJsonSchema.INumber numbers}.\n\nIf you need other types, please use request body instead with object type\nencapsulation.",
1030
- anyOf: [
1031
- {
1032
- type: "object",
1033
- properties: {
1034
- minimum: {
1035
- title: "Minimum value restriction",
1036
- description: "Minimum value restriction.",
1037
- type: "number"
1038
- },
1039
- maximum: {
1040
- title: "Maximum value restriction",
1041
- description: "Maximum value restriction.",
1042
- type: "number"
1043
- },
1044
- exclusiveMinimum: {
1045
- title: "Exclusive minimum value restriction",
1046
- description: "Exclusive minimum value restriction.",
1047
- type: "number"
1048
- },
1049
- exclusiveMaximum: {
1050
- title: "Exclusive maximum value restriction",
1051
- description: "Exclusive maximum value restriction.",
1052
- type: "number"
1053
- },
1054
- multipleOf: {
1055
- title: "Multiple of value restriction",
1056
- description: "Multiple of value restriction.\n\n\n@exclusiveMinimum 0",
1057
- type: "number"
1058
- },
1059
- type: {
1060
- title: "Discriminator value of the type",
1061
- description: "Discriminator value of the type.",
1062
- type: "string",
1063
- "enum": [
1064
- "number"
1065
- ]
1066
- }
1067
- },
1068
- required: [
1069
- "type"
1070
- ],
1071
- description: "Description of the current {@link AutoBeOpenApi.IJsonSchema.INumber} type:\n\n> Number (double) type info."
1072
- },
1073
- {
1074
- type: "object",
1075
- properties: {
1076
- minimum: {
1077
- title: "Minimum value restriction",
1078
- description: "Minimum value restriction.",
1079
- type: "integer"
1080
- },
1081
- maximum: {
1082
- title: "Maximum value restriction",
1083
- description: "Maximum value restriction.",
1084
- type: "integer"
1085
- },
1086
- exclusiveMinimum: {
1087
- title: "Exclusive minimum value restriction",
1088
- description: "Exclusive minimum value restriction.",
1089
- type: "number"
1090
- },
1091
- exclusiveMaximum: {
1092
- title: "Exclusive maximum value restriction",
1093
- description: "Exclusive maximum value restriction.",
1094
- type: "number"
1095
- },
1096
- multipleOf: {
1097
- title: "Multiple of value restriction",
1098
- description: "Multiple of value restriction.\n\n\n@exclusiveMinimum 0",
1099
- type: "integer"
1100
- },
1101
- type: {
1102
- title: "Discriminator value of the type",
1103
- description: "Discriminator value of the type.",
1104
- type: "string",
1105
- "enum": [
1106
- "integer"
1107
- ]
1108
- }
1109
- },
1110
- required: [
1111
- "type"
1112
- ],
1113
- description: "Description of the current {@link AutoBeOpenApi.IJsonSchema.IInteger} type:\n\n> Integer type info."
1114
- },
1115
- {
1116
- type: "object",
1117
- properties: {
1118
- format: {
1119
- title: "Format restriction",
1120
- description: "Format restriction.",
1121
- type: "string"
1122
- },
1123
- pattern: {
1124
- title: "Pattern restriction",
1125
- description: "Pattern restriction.",
1126
- type: "string"
1127
- },
1128
- contentMediaType: {
1129
- title: "Content media type restriction",
1130
- description: "Content media type restriction.",
1131
- type: "string"
1132
- },
1133
- minLength: {
1134
- title: "Minimum length restriction",
1135
- description: "Minimum length restriction.\n\n\n@minimum 0",
1136
- type: "integer"
1137
- },
1138
- maxLength: {
1139
- title: "Maximum length restriction",
1140
- description: "Maximum length restriction.\n\n\n@minimum 0",
1141
- type: "integer"
1142
- },
1143
- type: {
1144
- title: "Discriminator value of the type",
1145
- description: "Discriminator value of the type.",
1146
- type: "string",
1147
- "enum": [
1148
- "string"
1149
- ]
1150
- }
1151
- },
1152
- required: [
1153
- "type"
1154
- ],
1155
- description: "Description of the current {@link AutoBeOpenApi.IJsonSchema.IString} type:\n\n> String type info."
1156
- }
1157
- ]
1158
- }
1159
- },
1160
- required: [
1161
- "name",
1162
- "description",
1163
- "schema"
1164
- ]
1165
- }
1166
- },
1167
- requestBody: {
1168
- title: "Request body of the API operation",
1169
- description: "Request body of the API operation.\n\nDefines the payload structure for the request. Contains a description and\nschema reference to define the expected input data.\n\nShould be `null` for operations that don't require a request body, such\nas most \"get\" operations.",
1170
- anyOf: [
1171
- {
1172
- type: "null"
1173
- },
1174
- {
1175
- type: "object",
1176
- properties: {
1177
- description: {
1178
- title: "Description about the request body",
1179
- description: "Description about the request body.\n\nMake short, concise and clear description about the request body.\n\n> MUST be written in English. Never use other languages.",
1180
- type: "string"
1181
- },
1182
- typeName: {
1183
- title: "Request body type name",
1184
- description: "Request body type name.\n\nThis specifies the data structure expected in the request body, that will\nbe transformed to {@link AutoBeOpenApi.IJsonSchema.IReference reference}\ntype in the {@link AutoBeOpenApi.IComponents.schemas components section}\nas an {@link AutoBeOpenApi.IJsonSchema.Object object} type.\n\nHere is the naming convention for the request body type:\n\n- `IEntityName.ICreate`: Request body for creation operations (POST)\n- `IEntityName.IUpdate`: Request body for update operations (PUT)\n- `IEntityName.IRequest`: Request parameters for list operations (often\n with search/pagination)\n\nWhat you write:\n\n```json\n{\n \"typeName\": \"IShoppingOrder.ICreate\"\n}\n```\n\nTransformed to:\n\n```json\n{\n \"schema\": {\n \"$ref\": \"#/components/schemas/IShoppingOrder.ICreate\"\n }\n}\n```",
1185
- type: "string"
1186
- }
1187
- },
1188
- required: [
1189
- "description",
1190
- "typeName"
1191
- ],
1192
- description: "Description of the current {@link AutoBeOpenApi.IRequestBody} type:\n\n> Request body information of OpenAPI operation.\n> \n> This interface defines the structure for request bodies in API routes. It\n> corresponds to the requestBody section in OpenAPI specifications, providing\n> both a description and schema reference for the request payload.\n> \n> The content-type for all request bodies is always `application/json`. Even\n> when file uploading is required, don't use `multipart/form-data` or\n> `application/x-www-form-urlencoded` content types. Instead, just define an\n> URI string property in the request body schema.\n> \n> Note that, all body schemas must be transformable to a\n> {@link AutoBeOpenApi.IJsonSchema.IReference reference} type defined in the\n> {@link AutoBeOpenApi.IComponents.schemas components section} as an\n> {@link AutoBeOpenApi.IJsonSchema.IObject object} type.\n> \n> In OpenAPI, this might represent:\n> \n> ```json\n> {\n> \"requestBody\": {\n> \"description\": \"Creation info of the order\",\n> \"content\": {\n> \"application/json\": {\n> \"schema\": {\n> \"$ref\": \"#/components/schemas/IShoppingOrder.ICreate\"\n> }\n> }\n> }\n> }\n> }\n> ```"
1193
- }
1194
- ]
1195
- },
1196
- responseBody: {
1197
- title: "Response body of the API operation",
1198
- description: "Response body of the API operation.\n\nDefines the structure of the successful response data. Contains a\ndescription and schema reference for the returned data.\n\nShould be null for operations that don't return any data.",
1199
- anyOf: [
1200
- {
1201
- type: "null"
1202
- },
1203
- {
1204
- type: "object",
1205
- properties: {
1206
- description: {
1207
- title: "Description about the response body",
1208
- description: "Description about the response body.\n\nMake short, concise and clear description about the response body.\n\n> MUST be written in English. Never use other languages.",
1209
- type: "string"
1210
- },
1211
- typeName: {
1212
- title: "Response body's data type",
1213
- description: "Response body's data type.\n\nSpecifies the structure of the returned data (response body), that will\nbe transformed to {@link AutoBeOpenApi.IJsonSchema.IReference} type in the\n{@link AutoBeOpenApi.IComponents.schemas components section} as an\n{@link AutoBeOpenApi.IJsonSchema.IObject object} type.\n\nHere is the naming convention for the response body type:\n\n- `IEntityName`: Main entity with detailed information (e.g.,\n `IShoppingSale`)\n- `IEntityName.ISummary`: Simplified response version with essential\n properties\n- `IEntityName.IInvert`: Alternative view of an entity from a different\n perspective\n- `IPageIEntityName`: Paginated results container with `pagination` and\n `data` properties\n\nWhat you write:\n\n```json\n{\n \"typeName\": \"IShoppingOrder\"\n}\n```\n\nTransformed to:\n\n```json\n{\n \"schema\": {\n \"$ref\": \"#/components/schemas/IShoppingOrder\"\n }\n}\n```",
1214
- type: "string"
1215
- }
1216
- },
1217
- required: [
1218
- "description",
1219
- "typeName"
1220
- ],
1221
- description: "Description of the current {@link AutoBeOpenApi.IResponseBody} type:\n\n> Response body information for OpenAPI operation.\n> \n> This interface defines the structure of a successful response from an API\n> operation. It provides a description of the response and a schema reference\n> to define the returned data structure.\n> \n> The content-type for all responses is always `application/json`. Even when\n> file downloading is required, don't use `application/octet-stream` or\n> `multipart/form-data` content types. Instead, just define an URI string\n> property in the response body schema.\n> \n> In OpenAPI, this might represent:\n> \n> ```json\n> {\n> \"responses\": {\n> \"200\": {\n> \"description\": \"Order information\",\n> \"content\": {\n> \"application/json\": {\n> \"schema\": { \"$ref\": \"#/components/schemas/IShoppingOrder\" }\n> }\n> }\n> }\n> }\n> }\n> ```"
1222
- }
1223
- ]
1224
- },
1225
- path: {
1226
- title: "HTTP path of the API operation",
1227
- description: "HTTP path of the API operation.\n\nThe URL path for accessing this API operation, using path parameters\nenclosed in curly braces (e.g., `/shoppings/customers/sales/{saleId}`).\n\nIt must be corresponded to the {@link parameters path parameters}.\n\nThe path structure should clearly indicate which database entity this\noperation is manipulating, helping to ensure all entities have\nappropriate API coverage.",
1228
- type: "string"
1229
- },
1230
- method: {
1231
- title: "HTTP method of the API operation",
1232
- description: "HTTP method of the API operation.\n\nNote that, if the API operation has {@link requestBody}, method must not\nbe `get`.\n\nAlso, even though the API operation has been designed to only get\ninformation, but it needs complicated request information, it must be\ndefined as `patch` method with {@link requestBody} data specification.\n\n- `get`: get information\n- `patch`: get information with complicated request data\n ({@link requestBody})\n- `post`: create new record\n- `put`: update existing record\n- `delete`: remove record",
1233
- type: "string",
1234
- "enum": [
1235
- "get",
1236
- "post",
1237
- "put",
1238
- "delete",
1239
- "patch"
1240
- ]
1241
- }
1242
- },
1243
- required: [
1244
- "specification",
1245
- "description",
1246
- "summary",
1247
- "parameters",
1248
- "requestBody",
1249
- "responseBody",
1250
- "path",
1251
- "method"
1252
- ]
1076
+ $ref: "#/$defs/AutoBeOpenApi.IOperation"
1253
1077
  }
1254
1078
  }
1255
1079
  },
@@ -1257,554 +1081,309 @@ const collection = {
1257
1081
  "operations"
1258
1082
  ],
1259
1083
  additionalProperties: false,
1260
- $defs: {}
1261
- },
1262
- description: "Generate detailed API operations from path/method combinations.\n\nThis function creates complete API operations following REST principles and\nquality standards. Each generated operation includes specification, path,\nmethod, detailed multi-paragraph description, concise summary, parameters,\nand appropriate request/response bodies.\n\nThe function processes as many operations as possible in a single call,\nwith progress tracking to ensure iterative completion of all required\nendpoints.",
1263
- validate: (() => { const _io0 = input => Array.isArray(input.operations) && input.operations.every(elem => "object" === typeof elem && null !== elem && _io1(elem)); const _io1 = input => "string" === typeof input.specification && "string" === typeof input.description && "string" === typeof input.summary && (Array.isArray(input.parameters) && input.parameters.every(elem => "object" === typeof elem && null !== elem && _io2(elem))) && (null === input.requestBody || "object" === typeof input.requestBody && null !== input.requestBody && _io6(input.requestBody)) && (null === input.responseBody || "object" === typeof input.responseBody && null !== input.responseBody && _io7(input.responseBody)) && "string" === typeof input.path && ("get" === input.method || "post" === input.method || "put" === input.method || "delete" === input.method || "patch" === input.method); const _io2 = input => "string" === typeof input.name && "string" === typeof input.description && ("object" === typeof input.schema && null !== input.schema && _iu0(input.schema)); const _io3 = input => (undefined === input.minimum || "number" === typeof input.minimum && (Math.floor(input.minimum) === input.minimum && -9223372036854776000 <= input.minimum && input.minimum <= 9223372036854776000)) && (undefined === input.maximum || "number" === typeof input.maximum && (Math.floor(input.maximum) === input.maximum && -9223372036854776000 <= input.maximum && input.maximum <= 9223372036854776000)) && (undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum) && (undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum) && (undefined === input.multipleOf || "number" === typeof input.multipleOf && (Math.floor(input.multipleOf) === input.multipleOf && 0 <= input.multipleOf && input.multipleOf <= 18446744073709552000 && 0 < input.multipleOf)) && "integer" === input.type; const _io4 = input => (undefined === input.minimum || "number" === typeof input.minimum) && (undefined === input.maximum || "number" === typeof input.maximum) && (undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum) && (undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum) && (undefined === input.multipleOf || "number" === typeof input.multipleOf && 0 < input.multipleOf) && "number" === input.type; const _io5 = input => (undefined === input.format || "string" === typeof input.format) && (undefined === input.pattern || "string" === typeof input.pattern) && (undefined === input.contentMediaType || "string" === typeof input.contentMediaType) && (undefined === input.minLength || "number" === typeof input.minLength && (Math.floor(input.minLength) === input.minLength && 0 <= input.minLength && input.minLength <= 18446744073709552000)) && (undefined === input.maxLength || "number" === typeof input.maxLength && (Math.floor(input.maxLength) === input.maxLength && 0 <= input.maxLength && input.maxLength <= 18446744073709552000)) && "string" === input.type; const _io6 = input => "string" === typeof input.description && "string" === typeof input.typeName; const _io7 = input => "string" === typeof input.description && "string" === typeof input.typeName; const _iu0 = input => (() => {
1264
- if ("number" === input.type)
1265
- return _io4(input);
1266
- else if ("integer" === input.type)
1267
- return _io3(input);
1268
- else if ("string" === input.type)
1269
- return _io5(input);
1270
- else
1271
- return false;
1272
- })(); const _vo0 = (input, _path, _exceptionable = true) => [(Array.isArray(input.operations) || _report(_exceptionable, {
1273
- path: _path + ".operations",
1274
- expected: "Array<AutoBeOpenApi.IOperation>",
1275
- value: input.operations
1276
- })) && input.operations.map((elem, _index3) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
1277
- path: _path + ".operations[" + _index3 + "]",
1278
- expected: "AutoBeOpenApi.IOperation",
1279
- value: elem
1280
- })) && _vo1(elem, _path + ".operations[" + _index3 + "]", true && _exceptionable) || _report(_exceptionable, {
1281
- path: _path + ".operations[" + _index3 + "]",
1282
- expected: "AutoBeOpenApi.IOperation",
1283
- value: elem
1284
- })).every(flag => flag) || _report(_exceptionable, {
1285
- path: _path + ".operations",
1286
- expected: "Array<AutoBeOpenApi.IOperation>",
1287
- value: input.operations
1288
- })].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.specification || _report(_exceptionable, {
1289
- path: _path + ".specification",
1290
- expected: "string",
1291
- value: input.specification
1292
- }), "string" === typeof input.description || _report(_exceptionable, {
1293
- path: _path + ".description",
1294
- expected: "string",
1295
- value: input.description
1296
- }), "string" === typeof input.summary || _report(_exceptionable, {
1297
- path: _path + ".summary",
1298
- expected: "string",
1299
- value: input.summary
1300
- }), (Array.isArray(input.parameters) || _report(_exceptionable, {
1301
- path: _path + ".parameters",
1302
- expected: "Array<AutoBeOpenApi.IParameter>",
1303
- value: input.parameters
1304
- })) && input.parameters.map((elem, _index4) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
1305
- path: _path + ".parameters[" + _index4 + "]",
1306
- expected: "AutoBeOpenApi.IParameter",
1307
- value: elem
1308
- })) && _vo2(elem, _path + ".parameters[" + _index4 + "]", true && _exceptionable) || _report(_exceptionable, {
1309
- path: _path + ".parameters[" + _index4 + "]",
1310
- expected: "AutoBeOpenApi.IParameter",
1311
- value: elem
1312
- })).every(flag => flag) || _report(_exceptionable, {
1313
- path: _path + ".parameters",
1314
- expected: "Array<AutoBeOpenApi.IParameter>",
1315
- value: input.parameters
1316
- }), null === input.requestBody || ("object" === typeof input.requestBody && null !== input.requestBody || _report(_exceptionable, {
1317
- path: _path + ".requestBody",
1318
- expected: "(AutoBeOpenApi.IRequestBody | null)",
1319
- value: input.requestBody
1320
- })) && _vo6(input.requestBody, _path + ".requestBody", true && _exceptionable) || _report(_exceptionable, {
1321
- path: _path + ".requestBody",
1322
- expected: "(AutoBeOpenApi.IRequestBody | null)",
1323
- value: input.requestBody
1324
- }), null === input.responseBody || ("object" === typeof input.responseBody && null !== input.responseBody || _report(_exceptionable, {
1325
- path: _path + ".responseBody",
1326
- expected: "(AutoBeOpenApi.IResponseBody | null)",
1327
- value: input.responseBody
1328
- })) && _vo7(input.responseBody, _path + ".responseBody", true && _exceptionable) || _report(_exceptionable, {
1329
- path: _path + ".responseBody",
1330
- expected: "(AutoBeOpenApi.IResponseBody | null)",
1331
- value: input.responseBody
1332
- }), "string" === typeof input.path || _report(_exceptionable, {
1333
- path: _path + ".path",
1334
- expected: "string",
1335
- value: input.path
1336
- }), "get" === input.method || "post" === input.method || "put" === input.method || "delete" === input.method || "patch" === input.method || _report(_exceptionable, {
1337
- path: _path + ".method",
1338
- expected: "(\"delete\" | \"get\" | \"patch\" | \"post\" | \"put\")",
1339
- value: input.method
1340
- })].every(flag => flag); const _vo2 = (input, _path, _exceptionable = true) => ["string" === typeof input.name || _report(_exceptionable, {
1341
- path: _path + ".name",
1342
- expected: "string",
1343
- value: input.name
1344
- }), "string" === typeof input.description || _report(_exceptionable, {
1345
- path: _path + ".description",
1346
- expected: "string",
1347
- value: input.description
1348
- }), ("object" === typeof input.schema && null !== input.schema || _report(_exceptionable, {
1349
- path: _path + ".schema",
1350
- expected: "(AutoBeOpenApi.IJsonSchema.IInteger | AutoBeOpenApi.IJsonSchema.INumber | AutoBeOpenApi.IJsonSchema.IString)",
1351
- value: input.schema
1352
- })) && _vu0(input.schema, _path + ".schema", true && _exceptionable) || _report(_exceptionable, {
1353
- path: _path + ".schema",
1354
- expected: "(AutoBeOpenApi.IJsonSchema.IInteger | AutoBeOpenApi.IJsonSchema.INumber | AutoBeOpenApi.IJsonSchema.IString)",
1355
- value: input.schema
1356
- })].every(flag => flag); const _vo3 = (input, _path, _exceptionable = true) => [undefined === input.minimum || "number" === typeof input.minimum && (Math.floor(input.minimum) === input.minimum && -9223372036854776000 <= input.minimum && input.minimum <= 9223372036854776000 || _report(_exceptionable, {
1357
- path: _path + ".minimum",
1358
- expected: "number & Type<\"int64\">",
1359
- value: input.minimum
1360
- })) || _report(_exceptionable, {
1361
- path: _path + ".minimum",
1362
- expected: "((number & Type<\"int64\">) | undefined)",
1363
- value: input.minimum
1364
- }), undefined === input.maximum || "number" === typeof input.maximum && (Math.floor(input.maximum) === input.maximum && -9223372036854776000 <= input.maximum && input.maximum <= 9223372036854776000 || _report(_exceptionable, {
1365
- path: _path + ".maximum",
1366
- expected: "number & Type<\"int64\">",
1367
- value: input.maximum
1368
- })) || _report(_exceptionable, {
1369
- path: _path + ".maximum",
1370
- expected: "((number & Type<\"int64\">) | undefined)",
1371
- value: input.maximum
1372
- }), undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum || _report(_exceptionable, {
1373
- path: _path + ".exclusiveMinimum",
1374
- expected: "(number | undefined)",
1375
- value: input.exclusiveMinimum
1376
- }), undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum || _report(_exceptionable, {
1377
- path: _path + ".exclusiveMaximum",
1378
- expected: "(number | undefined)",
1379
- value: input.exclusiveMaximum
1380
- }), undefined === input.multipleOf || "number" === typeof input.multipleOf && (Math.floor(input.multipleOf) === input.multipleOf && 0 <= input.multipleOf && input.multipleOf <= 18446744073709552000 || _report(_exceptionable, {
1381
- path: _path + ".multipleOf",
1382
- expected: "number & Type<\"uint64\">",
1383
- value: input.multipleOf
1384
- })) && (0 < input.multipleOf || _report(_exceptionable, {
1385
- path: _path + ".multipleOf",
1386
- expected: "number & ExclusiveMinimum<0>",
1387
- value: input.multipleOf
1388
- })) || _report(_exceptionable, {
1389
- path: _path + ".multipleOf",
1390
- expected: "((number & Type<\"uint64\"> & ExclusiveMinimum<0>) | undefined)",
1391
- value: input.multipleOf
1392
- }), "integer" === input.type || _report(_exceptionable, {
1393
- path: _path + ".type",
1394
- expected: "\"integer\"",
1395
- value: input.type
1396
- })].every(flag => flag); const _vo4 = (input, _path, _exceptionable = true) => [undefined === input.minimum || "number" === typeof input.minimum || _report(_exceptionable, {
1397
- path: _path + ".minimum",
1398
- expected: "(number | undefined)",
1399
- value: input.minimum
1400
- }), undefined === input.maximum || "number" === typeof input.maximum || _report(_exceptionable, {
1401
- path: _path + ".maximum",
1402
- expected: "(number | undefined)",
1403
- value: input.maximum
1404
- }), undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum || _report(_exceptionable, {
1405
- path: _path + ".exclusiveMinimum",
1406
- expected: "(number | undefined)",
1407
- value: input.exclusiveMinimum
1408
- }), undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum || _report(_exceptionable, {
1409
- path: _path + ".exclusiveMaximum",
1410
- expected: "(number | undefined)",
1411
- value: input.exclusiveMaximum
1412
- }), undefined === input.multipleOf || "number" === typeof input.multipleOf && (0 < input.multipleOf || _report(_exceptionable, {
1413
- path: _path + ".multipleOf",
1414
- expected: "number & ExclusiveMinimum<0>",
1415
- value: input.multipleOf
1416
- })) || _report(_exceptionable, {
1417
- path: _path + ".multipleOf",
1418
- expected: "((number & ExclusiveMinimum<0>) | undefined)",
1419
- value: input.multipleOf
1420
- }), "number" === input.type || _report(_exceptionable, {
1421
- path: _path + ".type",
1422
- expected: "\"number\"",
1423
- value: input.type
1424
- })].every(flag => flag); const _vo5 = (input, _path, _exceptionable = true) => [undefined === input.format || "string" === typeof input.format || _report(_exceptionable, {
1425
- path: _path + ".format",
1426
- expected: "(string | undefined)",
1427
- value: input.format
1428
- }), undefined === input.pattern || "string" === typeof input.pattern || _report(_exceptionable, {
1429
- path: _path + ".pattern",
1430
- expected: "(string | undefined)",
1431
- value: input.pattern
1432
- }), undefined === input.contentMediaType || "string" === typeof input.contentMediaType || _report(_exceptionable, {
1433
- path: _path + ".contentMediaType",
1434
- expected: "(string | undefined)",
1435
- value: input.contentMediaType
1436
- }), undefined === input.minLength || "number" === typeof input.minLength && (Math.floor(input.minLength) === input.minLength && 0 <= input.minLength && input.minLength <= 18446744073709552000 || _report(_exceptionable, {
1437
- path: _path + ".minLength",
1438
- expected: "number & Type<\"uint64\">",
1439
- value: input.minLength
1440
- })) || _report(_exceptionable, {
1441
- path: _path + ".minLength",
1442
- expected: "((number & Type<\"uint64\">) | undefined)",
1443
- value: input.minLength
1444
- }), undefined === input.maxLength || "number" === typeof input.maxLength && (Math.floor(input.maxLength) === input.maxLength && 0 <= input.maxLength && input.maxLength <= 18446744073709552000 || _report(_exceptionable, {
1445
- path: _path + ".maxLength",
1446
- expected: "number & Type<\"uint64\">",
1447
- value: input.maxLength
1448
- })) || _report(_exceptionable, {
1449
- path: _path + ".maxLength",
1450
- expected: "((number & Type<\"uint64\">) | undefined)",
1451
- value: input.maxLength
1452
- }), "string" === input.type || _report(_exceptionable, {
1453
- path: _path + ".type",
1454
- expected: "\"string\"",
1455
- value: input.type
1456
- })].every(flag => flag); const _vo6 = (input, _path, _exceptionable = true) => ["string" === typeof input.description || _report(_exceptionable, {
1457
- path: _path + ".description",
1458
- expected: "string",
1459
- value: input.description
1460
- }), "string" === typeof input.typeName || _report(_exceptionable, {
1461
- path: _path + ".typeName",
1462
- expected: "string",
1463
- value: input.typeName
1464
- })].every(flag => flag); const _vo7 = (input, _path, _exceptionable = true) => ["string" === typeof input.description || _report(_exceptionable, {
1465
- path: _path + ".description",
1466
- expected: "string",
1467
- value: input.description
1468
- }), "string" === typeof input.typeName || _report(_exceptionable, {
1469
- path: _path + ".typeName",
1470
- expected: "string",
1471
- value: input.typeName
1472
- })].every(flag => flag); const _vu0 = (input, _path, _exceptionable = true) => (() => {
1473
- if ("number" === input.type)
1474
- return _vo4(input, _path, true && _exceptionable);
1475
- else if ("integer" === input.type)
1476
- return _vo3(input, _path, true && _exceptionable);
1477
- else if ("string" === input.type)
1478
- return _vo5(input, _path, true && _exceptionable);
1479
- else
1480
- return _report(_exceptionable, {
1481
- path: _path,
1482
- expected: "(AutoBeOpenApi.IJsonSchema.INumber | AutoBeOpenApi.IJsonSchema.IInteger | AutoBeOpenApi.IJsonSchema.IString)",
1483
- value: input
1484
- });
1485
- })(); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
1486
- if (false === __is(input)) {
1487
- errors = [];
1488
- _report = __typia_transform__validateReport._validateReport(errors);
1489
- ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
1490
- path: _path + "",
1491
- expected: "IMakeOperationProps",
1492
- value: input
1493
- })) && _vo0(input, _path + "", true) || _report(true, {
1494
- path: _path + "",
1495
- expected: "IMakeOperationProps",
1496
- value: input
1497
- }))(input, "$input", true);
1498
- const success = 0 === errors.length;
1499
- return success ? {
1500
- success,
1501
- data: input
1502
- } : {
1503
- success,
1504
- errors,
1505
- data: input
1506
- };
1507
- }
1508
- return {
1509
- success: true,
1510
- data: input
1511
- };
1512
- }; })()
1513
- }
1514
- ]
1515
- },
1516
- claude,
1517
- llama: claude,
1518
- deepseek: claude,
1519
- "3.1": claude,
1520
- "3.0": {
1521
- model: "3.0",
1522
- options: {
1523
- constraint: true,
1524
- recursive: 3,
1525
- separate: null
1526
- },
1527
- functions: [
1528
- {
1529
- name: "makeOperations",
1530
- parameters: {
1531
- type: "object",
1532
- properties: {
1533
- operations: {
1534
- type: "array",
1535
- items: {
1536
- type: "object",
1537
- properties: {
1538
- specification: {
1539
- type: "string",
1540
- title: "Specification of the API operation",
1541
- description: "Specification of the API operation.\n\nBefore defining the API operation interface, please describe what you're\nplanning to write in this `specification` field.\n\nThe specification must be fully detailed and clear, so that anyone can\nunderstand the purpose and functionality of the API operation and its\nrelated components (e.g., {@link path}, {@link parameters},\n{@link requestBody}).\n\nIMPORTANT: The specification MUST identify which Prisma DB table this\noperation is associated with, helping ensure complete coverage of all\ndatabase entities."
1542
- },
1543
- description: {
1544
- type: "string",
1545
- title: "Detailed description about the API operation",
1546
- description: "Detailed description about the API operation.\n\nIMPORTANT: This field MUST be extensively detailed and MUST reference the\ndescription comments from the related Prisma DB schema tables and\ncolumns. The description should be organized into MULTIPLE PARAGRAPHS\nseparated by line breaks to improve readability and comprehension.\n\nFor example, include separate paragraphs for:\n\n- The purpose and overview of the API operation\n- Security considerations and user permissions\n- Relationship to underlying database entities\n- Validation rules and business logic\n- Related API operations that might be used together with this one\n- Expected behavior and error handling\n\nWhen writing the description, be sure to incorporate the corresponding DB\nschema's description comments, matching the level of detail and style of\nthose comments. This ensures consistency between the API documentation\nand database structure.\n\nIf there's a dependency to other APIs, please describe the dependency API\noperation in this field with detailed reason. For example, if this API\noperation needs a pre-execution of other API operation, it must be\nexplicitly described.\n\n- `GET /shoppings/customers/sales` must be pre-executed to get entire list\n of summarized sales. Detailed sale information would be obtained by\n specifying the sale ID in the path parameter.\n\n> MUST be written in English. Never use other languages."
1547
- },
1548
- summary: {
1549
- type: "string",
1550
- title: "Short summary of the API operation",
1551
- description: "Short summary of the API operation.\n\nThis should be a concise description of the API operation, typically one\nsentence long. It should provide a quick overview of what the API does\nwithout going into too much detail.\n\nThis summary will be used in the OpenAPI documentation to give users a\nquick understanding of the API operation's purpose.\n\nIMPORTANT: The summary should clearly indicate which Prisma DB table this\noperation relates to, helping to ensure all tables have API coverage.\n\n> MUST be written in English. Never use other languages"
1552
- },
1553
- parameters: {
1554
- type: "array",
1555
- items: {
1556
- type: "object",
1557
- properties: {
1558
- name: {
1559
- type: "string",
1560
- title: "Identifier name of the path parameter",
1561
- description: "Identifier name of the path parameter.\n\nThis name must match exactly with the parameter name in the route path.\nIt must be corresponded to the\n{@link AutoBeOpenApi.IOperation.path API operation path}."
1562
- },
1563
- description: {
1564
- type: "string",
1565
- title: "Description about the path parameter",
1566
- description: "Description about the path parameter.\n\nMake short, concise and clear description about the path parameter.\n\n> MUST be written in English. Never use other languages."
1567
- },
1568
- schema: {
1569
- oneOf: [
1570
- {
1571
- type: "object",
1572
- properties: {
1573
- minimum: {
1574
- type: "number",
1575
- title: "Minimum value restriction",
1576
- description: "Minimum value restriction."
1577
- },
1578
- maximum: {
1579
- type: "number",
1580
- title: "Maximum value restriction",
1581
- description: "Maximum value restriction."
1582
- },
1583
- exclusiveMinimum: {
1584
- type: "number",
1585
- title: "Exclusive minimum value restriction",
1586
- description: "Exclusive minimum value restriction."
1587
- },
1588
- exclusiveMaximum: {
1589
- type: "number",
1590
- title: "Exclusive maximum value restriction",
1591
- description: "Exclusive maximum value restriction."
1592
- },
1593
- multipleOf: {
1594
- type: "number",
1595
- exclusiveMinimum: 0,
1596
- title: "Multiple of value restriction",
1597
- description: "Multiple of value restriction."
1598
- },
1599
- type: {
1600
- type: "string",
1601
- "enum": [
1602
- "number"
1603
- ],
1604
- title: "Discriminator value of the type",
1605
- description: "Discriminator value of the type."
1606
- }
1607
- },
1608
- required: [
1609
- "type"
1610
- ],
1611
- description: "Description of the current {@link AutoBeOpenApi.IJsonSchema.INumber} type:\n\n> Number (double) type info.",
1612
- additionalProperties: false
1613
- },
1614
- {
1615
- type: "object",
1616
- properties: {
1617
- minimum: {
1618
- type: "integer",
1619
- title: "Minimum value restriction",
1620
- description: "Minimum value restriction."
1621
- },
1622
- maximum: {
1623
- type: "integer",
1624
- title: "Maximum value restriction",
1625
- description: "Maximum value restriction."
1626
- },
1627
- exclusiveMinimum: {
1628
- type: "number",
1629
- title: "Exclusive minimum value restriction",
1630
- description: "Exclusive minimum value restriction."
1631
- },
1632
- exclusiveMaximum: {
1633
- type: "number",
1634
- title: "Exclusive maximum value restriction",
1635
- description: "Exclusive maximum value restriction."
1636
- },
1637
- multipleOf: {
1638
- type: "integer",
1639
- exclusiveMinimum: 0,
1640
- title: "Multiple of value restriction",
1641
- description: "Multiple of value restriction."
1642
- },
1643
- type: {
1644
- type: "string",
1645
- "enum": [
1646
- "integer"
1647
- ],
1648
- title: "Discriminator value of the type",
1649
- description: "Discriminator value of the type."
1650
- }
1651
- },
1652
- required: [
1653
- "type"
1654
- ],
1655
- description: "Description of the current {@link AutoBeOpenApi.IJsonSchema.IInteger} type:\n\n> Integer type info.",
1656
- additionalProperties: false
1657
- },
1658
- {
1659
- type: "object",
1660
- properties: {
1661
- format: {
1662
- type: "string",
1663
- title: "Format restriction",
1664
- description: "Format restriction."
1665
- },
1666
- pattern: {
1667
- type: "string",
1668
- title: "Pattern restriction",
1669
- description: "Pattern restriction."
1670
- },
1671
- contentMediaType: {
1672
- type: "string",
1673
- title: "Content media type restriction",
1674
- description: "Content media type restriction."
1675
- },
1676
- minLength: {
1677
- type: "integer",
1678
- minimum: 0,
1679
- title: "Minimum length restriction",
1680
- description: "Minimum length restriction."
1681
- },
1682
- maxLength: {
1683
- type: "integer",
1684
- minimum: 0,
1685
- title: "Maximum length restriction",
1686
- description: "Maximum length restriction."
1687
- },
1688
- type: {
1689
- type: "string",
1690
- "enum": [
1691
- "string"
1692
- ],
1693
- title: "Discriminator value of the type",
1694
- description: "Discriminator value of the type."
1695
- }
1696
- },
1697
- required: [
1698
- "type"
1699
- ],
1700
- description: "Description of the current {@link AutoBeOpenApi.IJsonSchema.IString} type:\n\n> String type info.",
1701
- additionalProperties: false
1702
- }
1703
- ],
1704
- title: "Type schema of the path parameter",
1705
- description: "Type schema of the path parameter.\n\nPath parameters are typically primitive types like\n{@link AutoBeOpenApi.IJsonSchema.IString strings},\n{@link AutoBeOpenApi.IJsonSchema.IInteger integers},\n{@link AutoBeOpenApi.IJsonSchema.INumber numbers}.\n\nIf you need other types, please use request body instead with object type\nencapsulation."
1706
- }
1707
- },
1708
- required: [
1709
- "name",
1710
- "description",
1711
- "schema"
1712
- ],
1713
- description: "Description of the current {@link AutoBeOpenApi.IParameter} type:\n\n> Path parameter information for API routes.\n> \n> This interface defines a path parameter that appears in the URL of an API\n> endpoint. Path parameters are enclosed in curly braces in the\n> {@link AutoBeOpenApi.IOperation.path operation path} and must be defined\n> with their types and descriptions.\n> \n> For example, if API operation path is\n> `/shoppings/customers/sales/{saleId}/questions/${questionId}/comments/${commentId}`,\n> the path parameters should be like below:\n> \n> ```json\n> {\n> \"path\": \"/shoppings/customers/sales/{saleId}/questions/${questionId}/comments/${commentId}\",\n> \"method\": \"get\",\n> \"parameters\": [\n> {\n> \"name\": \"saleId\",\n> \"in\": \"path\",\n> \"schema\": { \"type\": \"string\", \"format\": \"uuid\" },\n> \"description\": \"Target sale's ID\"\n> },\n> {\n> \"name\": \"questionId\",\n> \"in\": \"path\",\n> \"schema\": { \"type\": \"string\", \"format\": \"uuid\" },\n> \"description\": \"Target question's ID\"\n> },\n> {\n> \"name\": \"commentId\",\n> \"in\": \"path\",\n> \"schema\": { \"type\": \"string\", \"format\": \"uuid\" },\n> \"description\": \"Target comment's ID\"\n> }\n> ]\n> }\n> ```",
1714
- additionalProperties: false
1084
+ $defs: {
1085
+ "AutoBeOpenApi.IOperation": {
1086
+ description: "Operation of the Restful API.\n\nThis interface defines a single API endpoint with its HTTP {@link method},\n{@link path}, {@link parameters path parameters},\n{@link requestBody request body}, and {@link responseBody} structure. It\ncorresponds to an individual operation in the paths section of an OpenAPI\ndocument.\n\nEach operation requires a detailed explanation of its purpose through the\nreason and description fields, making it clear why the API was designed and\nhow it should be used.\n\nAll request bodies and responses for this operation must be object types\nand must reference named types defined in the components section. The\ncontent-type is always `application/json`. For file upload/download\noperations, use `string & tags.Format<\"uri\">` in the appropriate schema\ninstead of binary data formats.\n\nIn OpenAPI, this might represent:\n\n```json\n{\n \"/shoppings/customers/orders\": {\n \"post\": {\n \"description\": \"Create a new order application from shopping cart...\",\n \"parameters\": [...],\n \"requestBody\": {...},\n \"responses\": {...}\n }\n }\n}\n```",
1087
+ type: "object",
1088
+ properties: {
1089
+ specification: {
1090
+ description: "Specification of the API operation.\n\nBefore defining the API operation interface, please describe what you're\nplanning to write in this `specification` field.\n\nThe specification must be fully detailed and clear, so that anyone can\nunderstand the purpose and functionality of the API operation and its\nrelated components (e.g., {@link path}, {@link parameters},\n{@link requestBody}).\n\nIMPORTANT: The specification MUST identify which Prisma DB table this\noperation is associated with, helping ensure complete coverage of all\ndatabase entities.",
1091
+ type: "string"
1092
+ },
1093
+ description: {
1094
+ description: "Detailed description about the API operation.\n\nIMPORTANT: This field MUST be extensively detailed and MUST reference the\ndescription comments from the related Prisma DB schema tables and\ncolumns. The description should be organized into MULTIPLE PARAGRAPHS\nseparated by line breaks to improve readability and comprehension.\n\nFor example, include separate paragraphs for:\n\n- The purpose and overview of the API operation\n- Security considerations and user permissions\n- Relationship to underlying database entities\n- Validation rules and business logic\n- Related API operations that might be used together with this one\n- Expected behavior and error handling\n\nWhen writing the description, be sure to incorporate the corresponding DB\nschema's description comments, matching the level of detail and style of\nthose comments. This ensures consistency between the API documentation\nand database structure.\n\nIf there's a dependency to other APIs, please describe the dependency API\noperation in this field with detailed reason. For example, if this API\noperation needs a pre-execution of other API operation, it must be\nexplicitly described.\n\n- `GET /shoppings/customers/sales` must be pre-executed to get entire list\n of summarized sales. Detailed sale information would be obtained by\n specifying the sale ID in the path parameter.\n\n> MUST be written in English. Never use other languages.",
1095
+ type: "string"
1096
+ },
1097
+ summary: {
1098
+ description: "Short summary of the API operation.\n\nThis should be a concise description of the API operation, typically one\nsentence long. It should provide a quick overview of what the API does\nwithout going into too much detail.\n\nThis summary will be used in the OpenAPI documentation to give users a\nquick understanding of the API operation's purpose.\n\nIMPORTANT: The summary should clearly indicate which Prisma DB table this\noperation relates to, helping to ensure all tables have API coverage.\n\n> MUST be written in English. Never use other languages",
1099
+ type: "string"
1100
+ },
1101
+ parameters: {
1102
+ description: "List of path parameters.\n\nNote that, the {@link AutoBeOpenApi.IParameter.name identifier name} of\npath parameter must be corresponded to the\n{@link path API operation path}.\n\nFor example, if there's an API operation which has {@link path} of\n`/shoppings/customers/sales/{saleId}/questions/${questionId}/comments/${commentId}`,\nits list of {@link AutoBeOpenApi.IParameter.name path parameters} must be\nlike:\n\n- `saleId`\n- `questionId`\n- `commentId`",
1103
+ type: "array",
1104
+ items: {
1105
+ $ref: "#/$defs/AutoBeOpenApi.IParameter"
1106
+ }
1107
+ },
1108
+ requestBody: {
1109
+ description: "Request body of the API operation.\n\nDefines the payload structure for the request. Contains a description and\nschema reference to define the expected input data.\n\nShould be `null` for operations that don't require a request body, such\nas most \"get\" operations.",
1110
+ anyOf: [
1111
+ {
1112
+ type: "null"
1715
1113
  },
1716
- title: "List of path parameters",
1717
- description: "List of path parameters.\n\nNote that, the {@link AutoBeOpenApi.IParameter.name identifier name} of\npath parameter must be corresponded to the\n{@link path API operation path}.\n\nFor example, if there's an API operation which has {@link path} of\n`/shoppings/customers/sales/{saleId}/questions/${questionId}/comments/${commentId}`,\nits list of {@link AutoBeOpenApi.IParameter.name path parameters} must be\nlike:\n\n- `saleId`\n- `questionId`\n- `commentId`"
1718
- },
1719
- requestBody: {
1720
- type: "object",
1721
- properties: {
1722
- description: {
1723
- type: "string",
1724
- title: "Description about the request body",
1725
- description: "Description about the request body.\n\nMake short, concise and clear description about the request body.\n\n> MUST be written in English. Never use other languages."
1726
- },
1727
- typeName: {
1728
- type: "string",
1729
- title: "Request body type name",
1730
- description: "Request body type name.\n\nThis specifies the data structure expected in the request body, that will\nbe transformed to {@link AutoBeOpenApi.IJsonSchema.IReference reference}\ntype in the {@link AutoBeOpenApi.IComponents.schemas components section}\nas an {@link AutoBeOpenApi.IJsonSchema.Object object} type.\n\nHere is the naming convention for the request body type:\n\n- `IEntityName.ICreate`: Request body for creation operations (POST)\n- `IEntityName.IUpdate`: Request body for update operations (PUT)\n- `IEntityName.IRequest`: Request parameters for list operations (often\n with search/pagination)\n\nWhat you write:\n\n```json\n{\n \"typeName\": \"IShoppingOrder.ICreate\"\n}\n```\n\nTransformed to:\n\n```json\n{\n \"schema\": {\n \"$ref\": \"#/components/schemas/IShoppingOrder.ICreate\"\n }\n}\n```"
1731
- }
1114
+ {
1115
+ $ref: "#/$defs/AutoBeOpenApi.IRequestBody"
1116
+ }
1117
+ ]
1118
+ },
1119
+ responseBody: {
1120
+ description: "Response body of the API operation.\n\nDefines the structure of the successful response data. Contains a\ndescription and schema reference for the returned data.\n\nShould be null for operations that don't return any data.",
1121
+ anyOf: [
1122
+ {
1123
+ type: "null"
1732
1124
  },
1733
- required: [
1734
- "description",
1735
- "typeName"
1736
- ],
1737
- title: "Request body of the API operation",
1738
- description: "Request body of the API operation.\n\nDefines the payload structure for the request. Contains a description and\nschema reference to define the expected input data.\n\nShould be `null` for operations that don't require a request body, such\nas most \"get\" operations.",
1739
- additionalProperties: false,
1740
- nullable: true
1741
- },
1742
- responseBody: {
1743
- type: "object",
1744
- properties: {
1745
- description: {
1746
- type: "string",
1747
- title: "Description about the response body",
1748
- description: "Description about the response body.\n\nMake short, concise and clear description about the response body.\n\n> MUST be written in English. Never use other languages."
1749
- },
1750
- typeName: {
1751
- type: "string",
1752
- title: "Response body's data type",
1753
- description: "Response body's data type.\n\nSpecifies the structure of the returned data (response body), that will\nbe transformed to {@link AutoBeOpenApi.IJsonSchema.IReference} type in the\n{@link AutoBeOpenApi.IComponents.schemas components section} as an\n{@link AutoBeOpenApi.IJsonSchema.IObject object} type.\n\nHere is the naming convention for the response body type:\n\n- `IEntityName`: Main entity with detailed information (e.g.,\n `IShoppingSale`)\n- `IEntityName.ISummary`: Simplified response version with essential\n properties\n- `IEntityName.IInvert`: Alternative view of an entity from a different\n perspective\n- `IPageIEntityName`: Paginated results container with `pagination` and\n `data` properties\n\nWhat you write:\n\n```json\n{\n \"typeName\": \"IShoppingOrder\"\n}\n```\n\nTransformed to:\n\n```json\n{\n \"schema\": {\n \"$ref\": \"#/components/schemas/IShoppingOrder\"\n }\n}\n```"
1754
- }
1125
+ {
1126
+ $ref: "#/$defs/AutoBeOpenApi.IResponseBody"
1127
+ }
1128
+ ]
1129
+ },
1130
+ authorization: {
1131
+ description: "Authorization\n\nDefines which user role is subject to strategies such as membership\nregistration, login, token issuance, refresh token, etc.",
1132
+ anyOf: [
1133
+ {
1134
+ type: "null"
1755
1135
  },
1756
- required: [
1757
- "description",
1758
- "typeName"
1759
- ],
1760
- title: "Response body of the API operation",
1761
- description: "Response body of the API operation.\n\nDefines the structure of the successful response data. Contains a\ndescription and schema reference for the returned data.\n\nShould be null for operations that don't return any data.",
1762
- additionalProperties: false,
1763
- nullable: true
1764
- },
1765
- path: {
1766
- type: "string",
1767
- title: "HTTP path of the API operation",
1768
- description: "HTTP path of the API operation.\n\nThe URL path for accessing this API operation, using path parameters\nenclosed in curly braces (e.g., `/shoppings/customers/sales/{saleId}`).\n\nIt must be corresponded to the {@link parameters path parameters}.\n\nThe path structure should clearly indicate which database entity this\noperation is manipulating, helping to ensure all entities have\nappropriate API coverage."
1769
- },
1770
- method: {
1771
- type: "string",
1772
- "enum": [
1773
- "get",
1774
- "post",
1775
- "put",
1776
- "delete",
1777
- "patch"
1778
- ],
1779
- title: "HTTP method of the API operation",
1780
- description: "HTTP method of the API operation.\n\nNote that, if the API operation has {@link requestBody}, method must not\nbe `get`.\n\nAlso, even though the API operation has been designed to only get\ninformation, but it needs complicated request information, it must be\ndefined as `patch` method with {@link requestBody} data specification.\n\n- `get`: get information\n- `patch`: get information with complicated request data\n ({@link requestBody})\n- `post`: create new record\n- `put`: update existing record\n- `delete`: remove record"
1136
+ {
1137
+ $ref: "#/$defs/AutoBeOpenApi.IAuthorization"
1138
+ }
1139
+ ],
1140
+ "x-discriminator": {
1141
+ propertyName: "type",
1142
+ mapping: {
1143
+ Bearer: "#/$defs/AutoBeOpenApi.IAuthorization"
1144
+ }
1781
1145
  }
1782
1146
  },
1783
- required: [
1784
- "specification",
1785
- "description",
1786
- "summary",
1787
- "parameters",
1788
- "requestBody",
1789
- "responseBody",
1790
- "path",
1791
- "method"
1792
- ],
1793
- description: "Description of the current {@link AutoBeOpenApi.IOperation} type:\n\n> Operation of the Restful API.\n> \n> This interface defines a single API endpoint with its HTTP {@link method},\n> {@link path}, {@link parameters path parameters},\n> {@link requestBody request body}, and {@link responseBody} structure. It\n> corresponds to an individual operation in the paths section of an OpenAPI\n> document.\n> \n> Each operation requires a detailed explanation of its purpose through the\n> reason and description fields, making it clear why the API was designed and\n> how it should be used.\n> \n> All request bodies and responses for this operation must be object types\n> and must reference named types defined in the components section. The\n> content-type is always `application/json`. For file upload/download\n> operations, use `string & tags.Format<\"uri\">` in the appropriate schema\n> instead of binary data formats.\n> \n> In OpenAPI, this might represent:\n> \n> ```json\n> {\n> \"/shoppings/customers/orders\": {\n> \"post\": {\n> \"description\": \"Create a new order application from shopping cart...\",\n> \"parameters\": [...],\n> \"requestBody\": {...},\n> \"responses\": {...}\n> }\n> }\n> }\n> ```",
1794
- additionalProperties: false
1147
+ path: {
1148
+ description: "HTTP path of the API operation.\n\nThe URL path for accessing this API operation, using path parameters\nenclosed in curly braces (e.g., `/shoppings/customers/sales/{saleId}`).\n\nIt must be corresponded to the {@link parameters path parameters}.\n\nThe path structure should clearly indicate which database entity this\noperation is manipulating, helping to ensure all entities have\nappropriate API coverage.",
1149
+ type: "string"
1150
+ },
1151
+ method: {
1152
+ description: "HTTP method of the API operation.\n\nNote that, if the API operation has {@link requestBody}, method must not\nbe `get`.\n\nAlso, even though the API operation has been designed to only get\ninformation, but it needs complicated request information, it must be\ndefined as `patch` method with {@link requestBody} data specification.\n\n- `get`: get information\n- `patch`: get information with complicated request data\n ({@link requestBody})\n- `post`: create new record\n- `put`: update existing record\n- `delete`: remove record",
1153
+ type: "string",
1154
+ "enum": [
1155
+ "get",
1156
+ "post",
1157
+ "put",
1158
+ "delete",
1159
+ "patch"
1160
+ ]
1161
+ }
1795
1162
  },
1796
- title: "Array of API operations to generate",
1797
- description: "Array of API operations to generate.\n\nEach operation in this array must include:\n\n- Specification: Detailed API specification with clear purpose and\n functionality\n- Path: Resource-centric URL path (e.g., \"/resources/{resourceId}\")\n- Method: HTTP method (get, post, put, delete, patch)\n- Description: Extremely detailed multi-paragraph description referencing\n Prisma schema comments\n- Summary: Concise one-sentence summary of the endpoint\n- Parameters: Array of all necessary parameters with descriptions and schema\n definitions\n- RequestBody: For POST/PUT/PATCH methods, with typeName referencing\n components.schemas\n- ResponseBody: With typeName referencing appropriate response type\n\nAll operations must follow strict quality standards:\n\n1. Detailed descriptions referencing Prisma schema comments\n2. Accurate parameter definitions matching path parameters\n3. Appropriate request/response body type references\n4. Consistent patterns for CRUD operations\n\nFor list retrievals (typically PATCH), include pagination, search, and\nsorting. For detail retrieval (GET), return a single resource. For creation\n(POST), use .ICreate request body. For modification (PUT), use .IUpdate\nrequest body."
1163
+ required: [
1164
+ "specification",
1165
+ "description",
1166
+ "summary",
1167
+ "parameters",
1168
+ "requestBody",
1169
+ "responseBody",
1170
+ "path",
1171
+ "method"
1172
+ ]
1173
+ },
1174
+ "AutoBeOpenApi.IParameter": {
1175
+ description: "Path parameter information for API routes.\n\nThis interface defines a path parameter that appears in the URL of an API\nendpoint. Path parameters are enclosed in curly braces in the\n{@link AutoBeOpenApi.IOperation.path operation path} and must be defined\nwith their types and descriptions.\n\nFor example, if API operation path is\n`/shoppings/customers/sales/{saleId}/questions/${questionId}/comments/${commentId}`,\nthe path parameters should be like below:\n\n```json\n{\n \"path\": \"/shoppings/customers/sales/{saleId}/questions/${questionId}/comments/${commentId}\",\n \"method\": \"get\",\n \"parameters\": [\n {\n \"name\": \"saleId\",\n \"in\": \"path\",\n \"schema\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"description\": \"Target sale's ID\"\n },\n {\n \"name\": \"questionId\",\n \"in\": \"path\",\n \"schema\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"description\": \"Target question's ID\"\n },\n {\n \"name\": \"commentId\",\n \"in\": \"path\",\n \"schema\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"description\": \"Target comment's ID\"\n }\n ]\n}\n```",
1176
+ type: "object",
1177
+ properties: {
1178
+ name: {
1179
+ description: "Identifier name of the path parameter.\n\nThis name must match exactly with the parameter name in the route path.\nIt must be corresponded to the\n{@link AutoBeOpenApi.IOperation.path API operation path}.",
1180
+ type: "string"
1181
+ },
1182
+ description: {
1183
+ description: "Description about the path parameter.\n\nMake short, concise and clear description about the path parameter.\n\n> MUST be written in English. Never use other languages.",
1184
+ type: "string"
1185
+ },
1186
+ schema: {
1187
+ description: "Type schema of the path parameter.\n\nPath parameters are typically primitive types like\n{@link AutoBeOpenApi.IJsonSchema.IString strings},\n{@link AutoBeOpenApi.IJsonSchema.IInteger integers},\n{@link AutoBeOpenApi.IJsonSchema.INumber numbers}.\n\nIf you need other types, please use request body instead with object type\nencapsulation.",
1188
+ anyOf: [
1189
+ {
1190
+ $ref: "#/$defs/AutoBeOpenApi.IJsonSchema.INumber"
1191
+ },
1192
+ {
1193
+ $ref: "#/$defs/AutoBeOpenApi.IJsonSchema.IInteger"
1194
+ },
1195
+ {
1196
+ $ref: "#/$defs/AutoBeOpenApi.IJsonSchema.IString"
1197
+ }
1198
+ ],
1199
+ "x-discriminator": {
1200
+ propertyName: "type",
1201
+ mapping: {
1202
+ number: "#/$defs/AutoBeOpenApi.IJsonSchema.INumber",
1203
+ integer: "#/$defs/AutoBeOpenApi.IJsonSchema.IInteger",
1204
+ string: "#/$defs/AutoBeOpenApi.IJsonSchema.IString"
1205
+ }
1206
+ }
1207
+ }
1208
+ },
1209
+ required: [
1210
+ "name",
1211
+ "description",
1212
+ "schema"
1213
+ ]
1214
+ },
1215
+ "AutoBeOpenApi.IJsonSchema.INumber": {
1216
+ description: "Number (double) type info.",
1217
+ type: "object",
1218
+ properties: {
1219
+ minimum: {
1220
+ description: "Minimum value restriction.",
1221
+ type: "number"
1222
+ },
1223
+ maximum: {
1224
+ description: "Maximum value restriction.",
1225
+ type: "number"
1226
+ },
1227
+ exclusiveMinimum: {
1228
+ description: "Exclusive minimum value restriction.",
1229
+ type: "number"
1230
+ },
1231
+ exclusiveMaximum: {
1232
+ description: "Exclusive maximum value restriction.",
1233
+ type: "number"
1234
+ },
1235
+ multipleOf: {
1236
+ description: "Multiple of value restriction.\n\n\n@exclusiveMinimum 0",
1237
+ type: "number"
1238
+ },
1239
+ type: {
1240
+ description: "Discriminator value of the type.",
1241
+ type: "string",
1242
+ "enum": [
1243
+ "number"
1244
+ ]
1245
+ }
1246
+ },
1247
+ required: [
1248
+ "type"
1249
+ ]
1250
+ },
1251
+ "AutoBeOpenApi.IJsonSchema.IInteger": {
1252
+ description: "Integer type info.",
1253
+ type: "object",
1254
+ properties: {
1255
+ minimum: {
1256
+ description: "Minimum value restriction.",
1257
+ type: "integer"
1258
+ },
1259
+ maximum: {
1260
+ description: "Maximum value restriction.",
1261
+ type: "integer"
1262
+ },
1263
+ exclusiveMinimum: {
1264
+ description: "Exclusive minimum value restriction.",
1265
+ type: "number"
1266
+ },
1267
+ exclusiveMaximum: {
1268
+ description: "Exclusive maximum value restriction.",
1269
+ type: "number"
1270
+ },
1271
+ multipleOf: {
1272
+ description: "Multiple of value restriction.\n\n\n@exclusiveMinimum 0",
1273
+ type: "integer"
1274
+ },
1275
+ type: {
1276
+ description: "Discriminator value of the type.",
1277
+ type: "string",
1278
+ "enum": [
1279
+ "integer"
1280
+ ]
1281
+ }
1282
+ },
1283
+ required: [
1284
+ "type"
1285
+ ]
1286
+ },
1287
+ "AutoBeOpenApi.IJsonSchema.IString": {
1288
+ description: "String type info.",
1289
+ type: "object",
1290
+ properties: {
1291
+ format: {
1292
+ description: "Format restriction.",
1293
+ type: "string"
1294
+ },
1295
+ pattern: {
1296
+ description: "Pattern restriction.",
1297
+ type: "string"
1298
+ },
1299
+ contentMediaType: {
1300
+ description: "Content media type restriction.",
1301
+ type: "string"
1302
+ },
1303
+ minLength: {
1304
+ description: "Minimum length restriction.\n\n\n@minimum 0",
1305
+ type: "integer"
1306
+ },
1307
+ maxLength: {
1308
+ description: "Maximum length restriction.\n\n\n@minimum 0",
1309
+ type: "integer"
1310
+ },
1311
+ type: {
1312
+ description: "Discriminator value of the type.",
1313
+ type: "string",
1314
+ "enum": [
1315
+ "string"
1316
+ ]
1317
+ }
1318
+ },
1319
+ required: [
1320
+ "type"
1321
+ ]
1322
+ },
1323
+ "AutoBeOpenApi.IRequestBody": {
1324
+ description: "Request body information of OpenAPI operation.\n\nThis interface defines the structure for request bodies in API routes. It\ncorresponds to the requestBody section in OpenAPI specifications, providing\nboth a description and schema reference for the request payload.\n\nThe content-type for all request bodies is always `application/json`. Even\nwhen file uploading is required, don't use `multipart/form-data` or\n`application/x-www-form-urlencoded` content types. Instead, just define an\nURI string property in the request body schema.\n\nNote that, all body schemas must be transformable to a\n{@link AutoBeOpenApi.IJsonSchema.IReference reference} type defined in the\n{@link AutoBeOpenApi.IComponents.schemas components section} as an\n{@link AutoBeOpenApi.IJsonSchema.IObject object} type.\n\nIn OpenAPI, this might represent:\n\n```json\n{\n \"requestBody\": {\n \"description\": \"Creation info of the order\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$ref\": \"#/components/schemas/IShoppingOrder.ICreate\"\n }\n }\n }\n }\n}\n```",
1325
+ type: "object",
1326
+ properties: {
1327
+ description: {
1328
+ description: "Description about the request body.\n\nMake short, concise and clear description about the request body.\n\n> MUST be written in English. Never use other languages.",
1329
+ type: "string"
1330
+ },
1331
+ typeName: {
1332
+ description: "Request body type name.\n\nThis specifies the data structure expected in the request body, that will\nbe transformed to {@link AutoBeOpenApi.IJsonSchema.IReference reference}\ntype in the {@link AutoBeOpenApi.IComponents.schemas components section}\nas an {@link AutoBeOpenApi.IJsonSchema.Object object} type.\n\nHere is the naming convention for the request body type:\n\n- `IEntityName.ICreate`: Request body for creation operations (POST)\n- `IEntityName.IUpdate`: Request body for update operations (PUT)\n- `IEntityName.IRequest`: Request parameters for list operations (often\n with search/pagination)\n\nWhat you write:\n\n```json\n{\n \"typeName\": \"IShoppingOrder.ICreate\"\n}\n```\n\nTransformed to:\n\n```json\n{\n \"schema\": {\n \"$ref\": \"#/components/schemas/IShoppingOrder.ICreate\"\n }\n}\n```",
1333
+ type: "string"
1334
+ }
1335
+ },
1336
+ required: [
1337
+ "description",
1338
+ "typeName"
1339
+ ]
1340
+ },
1341
+ "AutoBeOpenApi.IResponseBody": {
1342
+ description: "Response body information for OpenAPI operation.\n\nThis interface defines the structure of a successful response from an API\noperation. It provides a description of the response and a schema reference\nto define the returned data structure.\n\nThe content-type for all responses is always `application/json`. Even when\nfile downloading is required, don't use `application/octet-stream` or\n`multipart/form-data` content types. Instead, just define an URI string\nproperty in the response body schema.\n\nIn OpenAPI, this might represent:\n\n```json\n{\n \"responses\": {\n \"200\": {\n \"description\": \"Order information\",\n \"content\": {\n \"application/json\": {\n \"schema\": { \"$ref\": \"#/components/schemas/IShoppingOrder\" }\n }\n }\n }\n }\n}\n```",
1343
+ type: "object",
1344
+ properties: {
1345
+ description: {
1346
+ description: "Description about the response body.\n\nMake short, concise and clear description about the response body.\n\n> MUST be written in English. Never use other languages.",
1347
+ type: "string"
1348
+ },
1349
+ typeName: {
1350
+ description: "Response body's data type.\n\nSpecifies the structure of the returned data (response body), that will\nbe transformed to {@link AutoBeOpenApi.IJsonSchema.IReference} type in the\n{@link AutoBeOpenApi.IComponents.schemas components section} as an\n{@link AutoBeOpenApi.IJsonSchema.IObject object} type.\n\nHere is the naming convention for the response body type:\n\n- `IEntityName`: Main entity with detailed information (e.g.,\n `IShoppingSale`)\n- `IEntityName.ISummary`: Simplified response version with essential\n properties\n- `IEntityName.IInvert`: Alternative view of an entity from a different\n perspective\n- `IPageIEntityName`: Paginated results container with `pagination` and\n `data` properties\n\nWhat you write:\n\n```json\n{\n \"typeName\": \"IShoppingOrder\"\n}\n```\n\nTransformed to:\n\n```json\n{\n \"schema\": {\n \"$ref\": \"#/components/schemas/IShoppingOrder\"\n }\n}\n```",
1351
+ type: "string"
1352
+ }
1353
+ },
1354
+ required: [
1355
+ "description",
1356
+ "typeName"
1357
+ ]
1358
+ },
1359
+ "AutoBeOpenApi.IAuthorization": {
1360
+ description: "Authorization - Authentication and user type information\n\nThis field defines how the API authenticates the request and restricts\naccess to specific user types.\n\n\u2705 Only the `Authorization` HTTP header is used for authentication. The\nexpected format is:\n\nAuthorization: Bearer <access_token>\n\nThe token must be a bearer token (e.g., JWT or similar), and when parsed,\nit is guaranteed to include at least the authenticated actor's `id` field.\nNo other headers or cookie-based authentication methods are supported.",
1361
+ type: "object",
1362
+ properties: {
1363
+ role: {
1364
+ description: "Allowed user types for this API\n\nSpecifies which user types are permitted to access this API.\n\nThis is not a permission level or access control role. Instead, it\ndescribes **who** the user is \u2014 their type within the service's domain\nmodel. It must correspond 1:1 with how the user is represented in the\ndatabase.\n\nExamples:\n\n- \"buyer\": a customer who makes purchases\n- \"seller\": a vendor who offers products\n- \"moderator\": a content reviewer or manager\n\n\u26A0\uFE0F Important: Each `role` must **exactly match a table name defined in\nthe database schema**. This is not merely a convention or example \u2014 it is\na strict requirement.\n\nA valid role must meet the following criteria:\n\n- It must uniquely map to a user group at the database level, represented\n by a dedicated table.\n- It must not overlap semantically with other roles \u2014 for instance, both\n `admin` and `administrator` must not exist to describe the same type.\n\nTherefore, if a user type cannot be clearly and uniquely distinguished in\nthe database, It **cannot** be used as a valid `role` here.",
1365
+ type: "array",
1366
+ items: {
1367
+ type: "string"
1368
+ }
1369
+ },
1370
+ type: {
1371
+ description: "Authentication method type\n\nCurrently only `\"bearer\"` is supported, which uses a Bearer token in the\nHTTP Authorization header.",
1372
+ type: "string",
1373
+ "enum": [
1374
+ "Bearer"
1375
+ ]
1376
+ }
1377
+ },
1378
+ required: [
1379
+ "role",
1380
+ "type"
1381
+ ]
1798
1382
  }
1799
- },
1800
- required: [
1801
- "operations"
1802
- ],
1803
- description: " Properties containing the operations to generate.\n\n------------------------------\n\nCurrent Type: {@link IMakeOperationProps}",
1804
- additionalProperties: false
1383
+ }
1805
1384
  },
1806
1385
  description: "Generate detailed API operations from path/method combinations.\n\nThis function creates complete API operations following REST principles and\nquality standards. Each generated operation includes specification, path,\nmethod, detailed multi-paragraph description, concise summary, parameters,\nand appropriate request/response bodies.\n\nThe function processes as many operations as possible in a single call,\nwith progress tracking to ensure iterative completion of all required\nendpoints.",
1807
- validate: (() => { const _io0 = input => Array.isArray(input.operations) && input.operations.every(elem => "object" === typeof elem && null !== elem && _io1(elem)); const _io1 = input => "string" === typeof input.specification && "string" === typeof input.description && "string" === typeof input.summary && (Array.isArray(input.parameters) && input.parameters.every(elem => "object" === typeof elem && null !== elem && _io2(elem))) && (null === input.requestBody || "object" === typeof input.requestBody && null !== input.requestBody && _io6(input.requestBody)) && (null === input.responseBody || "object" === typeof input.responseBody && null !== input.responseBody && _io7(input.responseBody)) && "string" === typeof input.path && ("get" === input.method || "post" === input.method || "put" === input.method || "delete" === input.method || "patch" === input.method); const _io2 = input => "string" === typeof input.name && "string" === typeof input.description && ("object" === typeof input.schema && null !== input.schema && _iu0(input.schema)); const _io3 = input => (undefined === input.minimum || "number" === typeof input.minimum && (Math.floor(input.minimum) === input.minimum && -9223372036854776000 <= input.minimum && input.minimum <= 9223372036854776000)) && (undefined === input.maximum || "number" === typeof input.maximum && (Math.floor(input.maximum) === input.maximum && -9223372036854776000 <= input.maximum && input.maximum <= 9223372036854776000)) && (undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum) && (undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum) && (undefined === input.multipleOf || "number" === typeof input.multipleOf && (Math.floor(input.multipleOf) === input.multipleOf && 0 <= input.multipleOf && input.multipleOf <= 18446744073709552000 && 0 < input.multipleOf)) && "integer" === input.type; const _io4 = input => (undefined === input.minimum || "number" === typeof input.minimum) && (undefined === input.maximum || "number" === typeof input.maximum) && (undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum) && (undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum) && (undefined === input.multipleOf || "number" === typeof input.multipleOf && 0 < input.multipleOf) && "number" === input.type; const _io5 = input => (undefined === input.format || "string" === typeof input.format) && (undefined === input.pattern || "string" === typeof input.pattern) && (undefined === input.contentMediaType || "string" === typeof input.contentMediaType) && (undefined === input.minLength || "number" === typeof input.minLength && (Math.floor(input.minLength) === input.minLength && 0 <= input.minLength && input.minLength <= 18446744073709552000)) && (undefined === input.maxLength || "number" === typeof input.maxLength && (Math.floor(input.maxLength) === input.maxLength && 0 <= input.maxLength && input.maxLength <= 18446744073709552000)) && "string" === input.type; const _io6 = input => "string" === typeof input.description && "string" === typeof input.typeName; const _io7 = input => "string" === typeof input.description && "string" === typeof input.typeName; const _iu0 = input => (() => {
1386
+ validate: (() => { const _io0 = input => Array.isArray(input.operations) && input.operations.every(elem => "object" === typeof elem && null !== elem && _io1(elem)); const _io1 = input => "string" === typeof input.specification && "string" === typeof input.description && "string" === typeof input.summary && (Array.isArray(input.parameters) && input.parameters.every(elem => "object" === typeof elem && null !== elem && _io2(elem))) && (null === input.requestBody || "object" === typeof input.requestBody && null !== input.requestBody && _io6(input.requestBody)) && (null === input.responseBody || "object" === typeof input.responseBody && null !== input.responseBody && _io7(input.responseBody)) && (null === input.authorization || undefined === input.authorization || "object" === typeof input.authorization && null !== input.authorization && _io8(input.authorization)) && "string" === typeof input.path && ("get" === input.method || "post" === input.method || "put" === input.method || "delete" === input.method || "patch" === input.method); const _io2 = input => "string" === typeof input.name && "string" === typeof input.description && ("object" === typeof input.schema && null !== input.schema && _iu0(input.schema)); const _io3 = input => (undefined === input.minimum || "number" === typeof input.minimum && (Math.floor(input.minimum) === input.minimum && -9223372036854776000 <= input.minimum && input.minimum <= 9223372036854776000)) && (undefined === input.maximum || "number" === typeof input.maximum && (Math.floor(input.maximum) === input.maximum && -9223372036854776000 <= input.maximum && input.maximum <= 9223372036854776000)) && (undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum) && (undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum) && (undefined === input.multipleOf || "number" === typeof input.multipleOf && (Math.floor(input.multipleOf) === input.multipleOf && 0 <= input.multipleOf && input.multipleOf <= 18446744073709552000 && 0 < input.multipleOf)) && "integer" === input.type; const _io4 = input => (undefined === input.minimum || "number" === typeof input.minimum) && (undefined === input.maximum || "number" === typeof input.maximum) && (undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum) && (undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum) && (undefined === input.multipleOf || "number" === typeof input.multipleOf && 0 < input.multipleOf) && "number" === input.type; const _io5 = input => (undefined === input.format || "string" === typeof input.format) && (undefined === input.pattern || "string" === typeof input.pattern) && (undefined === input.contentMediaType || "string" === typeof input.contentMediaType) && (undefined === input.minLength || "number" === typeof input.minLength && (Math.floor(input.minLength) === input.minLength && 0 <= input.minLength && input.minLength <= 18446744073709552000)) && (undefined === input.maxLength || "number" === typeof input.maxLength && (Math.floor(input.maxLength) === input.maxLength && 0 <= input.maxLength && input.maxLength <= 18446744073709552000)) && "string" === input.type; const _io6 = input => "string" === typeof input.description && "string" === typeof input.typeName; const _io7 = input => "string" === typeof input.description && "string" === typeof input.typeName; const _io8 = input => Array.isArray(input.role) && input.role.every(elem => "string" === typeof elem) && "Bearer" === input.type; const _iu0 = input => (() => {
1808
1387
  if ("number" === input.type)
1809
1388
  return _io4(input);
1810
1389
  else if ("integer" === input.type)
@@ -1817,12 +1396,12 @@ const collection = {
1817
1396
  path: _path + ".operations",
1818
1397
  expected: "Array<AutoBeOpenApi.IOperation>",
1819
1398
  value: input.operations
1820
- })) && input.operations.map((elem, _index3) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
1821
- path: _path + ".operations[" + _index3 + "]",
1399
+ })) && input.operations.map((elem, _index4) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
1400
+ path: _path + ".operations[" + _index4 + "]",
1822
1401
  expected: "AutoBeOpenApi.IOperation",
1823
1402
  value: elem
1824
- })) && _vo1(elem, _path + ".operations[" + _index3 + "]", true && _exceptionable) || _report(_exceptionable, {
1825
- path: _path + ".operations[" + _index3 + "]",
1403
+ })) && _vo1(elem, _path + ".operations[" + _index4 + "]", true && _exceptionable) || _report(_exceptionable, {
1404
+ path: _path + ".operations[" + _index4 + "]",
1826
1405
  expected: "AutoBeOpenApi.IOperation",
1827
1406
  value: elem
1828
1407
  })).every(flag => flag) || _report(_exceptionable, {
@@ -1845,12 +1424,12 @@ const collection = {
1845
1424
  path: _path + ".parameters",
1846
1425
  expected: "Array<AutoBeOpenApi.IParameter>",
1847
1426
  value: input.parameters
1848
- })) && input.parameters.map((elem, _index4) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
1849
- path: _path + ".parameters[" + _index4 + "]",
1427
+ })) && input.parameters.map((elem, _index5) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
1428
+ path: _path + ".parameters[" + _index5 + "]",
1850
1429
  expected: "AutoBeOpenApi.IParameter",
1851
1430
  value: elem
1852
- })) && _vo2(elem, _path + ".parameters[" + _index4 + "]", true && _exceptionable) || _report(_exceptionable, {
1853
- path: _path + ".parameters[" + _index4 + "]",
1431
+ })) && _vo2(elem, _path + ".parameters[" + _index5 + "]", true && _exceptionable) || _report(_exceptionable, {
1432
+ path: _path + ".parameters[" + _index5 + "]",
1854
1433
  expected: "AutoBeOpenApi.IParameter",
1855
1434
  value: elem
1856
1435
  })).every(flag => flag) || _report(_exceptionable, {
@@ -1873,6 +1452,14 @@ const collection = {
1873
1452
  path: _path + ".responseBody",
1874
1453
  expected: "(AutoBeOpenApi.IResponseBody | null)",
1875
1454
  value: input.responseBody
1455
+ }), null === input.authorization || undefined === input.authorization || ("object" === typeof input.authorization && null !== input.authorization || _report(_exceptionable, {
1456
+ path: _path + ".authorization",
1457
+ expected: "(AutoBeOpenApi.IAuthorization | null | undefined)",
1458
+ value: input.authorization
1459
+ })) && _vo8(input.authorization, _path + ".authorization", true && _exceptionable) || _report(_exceptionable, {
1460
+ path: _path + ".authorization",
1461
+ expected: "(AutoBeOpenApi.IAuthorization | null | undefined)",
1462
+ value: input.authorization
1876
1463
  }), "string" === typeof input.path || _report(_exceptionable, {
1877
1464
  path: _path + ".path",
1878
1465
  expected: "string",
@@ -2013,6 +1600,22 @@ const collection = {
2013
1600
  path: _path + ".typeName",
2014
1601
  expected: "string",
2015
1602
  value: input.typeName
1603
+ })].every(flag => flag); const _vo8 = (input, _path, _exceptionable = true) => [(Array.isArray(input.role) || _report(_exceptionable, {
1604
+ path: _path + ".role",
1605
+ expected: "Array<string>",
1606
+ value: input.role
1607
+ })) && input.role.map((elem, _index6) => "string" === typeof elem || _report(_exceptionable, {
1608
+ path: _path + ".role[" + _index6 + "]",
1609
+ expected: "string",
1610
+ value: elem
1611
+ })).every(flag => flag) || _report(_exceptionable, {
1612
+ path: _path + ".role",
1613
+ expected: "Array<string>",
1614
+ value: input.role
1615
+ }), "Bearer" === input.type || _report(_exceptionable, {
1616
+ path: _path + ".type",
1617
+ expected: "\"Bearer\"",
1618
+ value: input.type
2016
1619
  })].every(flag => flag); const _vu0 = (input, _path, _exceptionable = true) => (() => {
2017
1620
  if ("number" === input.type)
2018
1621
  return _vo4(input, _path, true && _exceptionable);
@@ -2057,5 +1660,9 @@ const collection = {
2057
1660
  }
2058
1661
  ]
2059
1662
  },
1663
+ claude,
1664
+ llama: claude,
1665
+ deepseek: claude,
1666
+ "3.1": claude,
2060
1667
  };
2061
1668
  //# sourceMappingURL=orchestrateInterfaceOperations.js.map