@autobe/agent 0.28.1 → 0.29.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (531) hide show
  1. package/lib/AutoBeAgent.js +1 -0
  2. package/lib/AutoBeAgent.js.map +1 -1
  3. package/lib/AutoBeMockAgent.js +1 -0
  4. package/lib/AutoBeMockAgent.js.map +1 -1
  5. package/lib/constants/AutoBeConfigConstant.d.ts +3 -1
  6. package/lib/constants/AutoBeSystemPromptConstant.d.ts +39 -26
  7. package/lib/constants/AutoBeSystemPromptConstant.js.map +1 -1
  8. package/lib/context/AutoBeContext.d.ts +1 -1
  9. package/lib/factory/createAutoBeContext.js +5 -3
  10. package/lib/factory/createAutoBeContext.js.map +1 -1
  11. package/lib/index.mjs +43501 -23602
  12. package/lib/index.mjs.map +1 -1
  13. package/lib/orchestrate/analyze/histories/transformAnalyzeReviewHistories.d.ts +7 -2
  14. package/lib/orchestrate/analyze/histories/transformAnalyzeReviewHistories.js +11 -21
  15. package/lib/orchestrate/analyze/histories/transformAnalyzeReviewHistories.js.map +1 -1
  16. package/lib/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.d.ts +2 -2
  17. package/lib/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js +12 -5
  18. package/lib/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.js.map +1 -1
  19. package/lib/orchestrate/analyze/histories/transformAnalyzeWriteHistories.d.ts +2 -2
  20. package/lib/orchestrate/analyze/histories/transformAnalyzeWriteHistories.js +53 -50
  21. package/lib/orchestrate/analyze/histories/transformAnalyzeWriteHistories.js.map +1 -1
  22. package/lib/orchestrate/analyze/orchestrateAnalyze.js +2 -2
  23. package/lib/orchestrate/analyze/orchestrateAnalyze.js.map +1 -1
  24. package/lib/orchestrate/analyze/orchestrateAnalyzeReview.js +855 -258
  25. package/lib/orchestrate/analyze/orchestrateAnalyzeReview.js.map +1 -1
  26. package/lib/orchestrate/analyze/orchestrateAnalyzeScenario.js +2 -14
  27. package/lib/orchestrate/analyze/orchestrateAnalyzeScenario.js.map +1 -1
  28. package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.js +2 -9
  29. package/lib/orchestrate/analyze/orchestrateAnalyzeWrite.js.map +1 -1
  30. package/lib/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.d.ts +110 -36
  31. package/lib/orchestrate/common/AutoBePreliminaryController.d.ts +40 -0
  32. package/lib/orchestrate/common/AutoBePreliminaryController.js +97 -0
  33. package/lib/orchestrate/common/AutoBePreliminaryController.js.map +1 -0
  34. package/lib/orchestrate/common/histories/transformCommonCorrectCastingHistory.d.ts +8 -0
  35. package/lib/orchestrate/{realize/histories/transformRealizeCorrectCastingHistories.js → common/histories/transformCommonCorrectCastingHistory.js} +16 -13
  36. package/lib/orchestrate/common/histories/transformCommonCorrectCastingHistory.js.map +1 -0
  37. package/lib/orchestrate/common/histories/transformPreliminaryHistory.d.ts +4 -0
  38. package/lib/orchestrate/common/histories/transformPreliminaryHistory.js +285 -0
  39. package/lib/orchestrate/common/histories/transformPreliminaryHistory.js.map +1 -0
  40. package/lib/orchestrate/common/histories/{transformPreviousAndLatestCorrectHistories.d.ts → transformPreviousAndLatestCorrectHistory.d.ts} +1 -1
  41. package/lib/orchestrate/common/histories/{transformPreviousAndLatestCorrectHistories.js → transformPreviousAndLatestCorrectHistory.js} +4 -4
  42. package/lib/orchestrate/common/histories/transformPreviousAndLatestCorrectHistory.js.map +1 -0
  43. package/lib/orchestrate/common/internal/complementPreliminaryCollection.d.ts +7 -0
  44. package/lib/orchestrate/common/internal/complementPreliminaryCollection.js +99 -0
  45. package/lib/orchestrate/common/internal/complementPreliminaryCollection.js.map +1 -0
  46. package/lib/orchestrate/common/internal/createPreliminaryCollection.d.ts +3 -0
  47. package/lib/orchestrate/common/internal/createPreliminaryCollection.js +20 -0
  48. package/lib/orchestrate/common/internal/createPreliminaryCollection.js.map +1 -0
  49. package/lib/orchestrate/common/internal/validatePreliminary.d.ts +5 -0
  50. package/lib/orchestrate/common/internal/validatePreliminary.js +217 -0
  51. package/lib/orchestrate/common/internal/validatePreliminary.js.map +1 -0
  52. package/lib/orchestrate/common/orchestrateCommonCorrectCasting.js +10 -22
  53. package/lib/orchestrate/common/orchestrateCommonCorrectCasting.js.map +1 -1
  54. package/lib/orchestrate/common/orchestratePreliminary.d.ts +12 -0
  55. package/lib/orchestrate/common/orchestratePreliminary.js +231 -0
  56. package/lib/orchestrate/common/orchestratePreliminary.js.map +1 -0
  57. package/lib/orchestrate/common/structures/AutoBePreliminaryRequest.d.ts +16 -0
  58. package/lib/orchestrate/{realize/structures/IAutoBeRealizeAuthorizationApplication.js → common/structures/AutoBePreliminaryRequest.js} +1 -1
  59. package/lib/orchestrate/common/structures/AutoBePreliminaryRequest.js.map +1 -0
  60. package/lib/orchestrate/common/structures/IAutoBeCommonCorrectCastingApplication.d.ts +1 -4
  61. package/lib/orchestrate/common/structures/IAutoBeOrchestrateResult.d.ts +9 -0
  62. package/lib/orchestrate/{interface/structures/IAutoBeInterfacePrerequisitesApplication.js → common/structures/IAutoBeOrchestrateResult.js} +1 -1
  63. package/lib/orchestrate/common/structures/IAutoBeOrchestrateResult.js.map +1 -0
  64. package/lib/orchestrate/common/structures/IAutoBePreliminaryCollection.d.ts +8 -0
  65. package/lib/orchestrate/{interface/structures/IAutoBeInterfaceEndpointsReviewApplication.js → common/structures/IAutoBePreliminaryCollection.js} +1 -1
  66. package/lib/orchestrate/common/structures/IAutoBePreliminaryCollection.js.map +1 -0
  67. package/lib/orchestrate/common/structures/IAutoBePreliminaryGetAnalysisFiles.d.ts +27 -0
  68. package/lib/orchestrate/{interface/structures/IAutoBeInterfaceOperationsReviewApplication.js → common/structures/IAutoBePreliminaryGetAnalysisFiles.js} +1 -1
  69. package/lib/orchestrate/common/structures/IAutoBePreliminaryGetAnalysisFiles.js.map +1 -0
  70. package/lib/orchestrate/common/structures/IAutoBePreliminaryGetInterfaceOperations.d.ts +28 -0
  71. package/lib/orchestrate/common/structures/IAutoBePreliminaryGetInterfaceOperations.js +3 -0
  72. package/lib/orchestrate/common/structures/IAutoBePreliminaryGetInterfaceOperations.js.map +1 -0
  73. package/lib/orchestrate/common/structures/IAutoBePreliminaryGetInterfaceSchemas.d.ts +27 -0
  74. package/lib/orchestrate/common/structures/IAutoBePreliminaryGetInterfaceSchemas.js +3 -0
  75. package/lib/orchestrate/common/structures/IAutoBePreliminaryGetInterfaceSchemas.js.map +1 -0
  76. package/lib/orchestrate/common/structures/IAutoBePreliminaryGetPrismaSchemas.d.ts +27 -0
  77. package/lib/orchestrate/common/structures/IAutoBePreliminaryGetPrismaSchemas.js +3 -0
  78. package/lib/orchestrate/common/structures/IAutoBePreliminaryGetPrismaSchemas.js.map +1 -0
  79. package/lib/orchestrate/interface/histories/transformInterfaceAuthorizationHistory.d.ts +10 -0
  80. package/lib/orchestrate/interface/histories/transformInterfaceAuthorizationHistory.js +70 -0
  81. package/lib/orchestrate/interface/histories/transformInterfaceAuthorizationHistory.js.map +1 -0
  82. package/lib/orchestrate/interface/histories/transformInterfaceCommonHistory.d.ts +3 -0
  83. package/lib/orchestrate/interface/histories/{transformInterfaceCommonHistories.js → transformInterfaceCommonHistory.js} +4 -4
  84. package/lib/orchestrate/interface/histories/transformInterfaceCommonHistory.js.map +1 -0
  85. package/lib/orchestrate/interface/histories/transformInterfaceComplementHistory.d.ts +9 -0
  86. package/lib/orchestrate/interface/histories/transformInterfaceComplementHistory.js +60 -0
  87. package/lib/orchestrate/interface/histories/transformInterfaceComplementHistory.js.map +1 -0
  88. package/lib/orchestrate/interface/histories/transformInterfaceEndpointHistory.d.ts +12 -0
  89. package/lib/orchestrate/interface/histories/transformInterfaceEndpointHistory.js +63 -0
  90. package/lib/orchestrate/interface/histories/transformInterfaceEndpointHistory.js.map +1 -0
  91. package/lib/orchestrate/interface/histories/transformInterfaceEndpointReviewHistory.d.ts +7 -0
  92. package/lib/orchestrate/interface/histories/transformInterfaceEndpointReviewHistory.js +36 -0
  93. package/lib/orchestrate/interface/histories/transformInterfaceEndpointReviewHistory.js.map +1 -0
  94. package/lib/orchestrate/interface/histories/transformInterfaceGroupHistory.d.ts +6 -0
  95. package/lib/orchestrate/interface/histories/transformInterfaceGroupHistory.js +68 -0
  96. package/lib/orchestrate/interface/histories/transformInterfaceGroupHistory.js.map +1 -0
  97. package/lib/orchestrate/interface/histories/transformInterfaceOperationHistory.d.ts +9 -0
  98. package/lib/orchestrate/interface/histories/transformInterfaceOperationHistory.js +72 -0
  99. package/lib/orchestrate/interface/histories/transformInterfaceOperationHistory.js.map +1 -0
  100. package/lib/orchestrate/interface/histories/transformInterfaceOperationReviewHistory.d.ts +7 -0
  101. package/lib/orchestrate/interface/histories/transformInterfaceOperationReviewHistory.js +38 -0
  102. package/lib/orchestrate/interface/histories/transformInterfaceOperationReviewHistory.js.map +1 -0
  103. package/lib/orchestrate/interface/histories/transformInterfacePrerequisiteHistory.d.ts +8 -0
  104. package/lib/orchestrate/interface/histories/transformInterfacePrerequisiteHistory.js +73 -0
  105. package/lib/orchestrate/interface/histories/transformInterfacePrerequisiteHistory.js.map +1 -0
  106. package/lib/orchestrate/interface/histories/transformInterfaceSchemaHistory.d.ts +11 -0
  107. package/lib/orchestrate/interface/histories/transformInterfaceSchemaHistory.js +95 -0
  108. package/lib/orchestrate/interface/histories/transformInterfaceSchemaHistory.js.map +1 -0
  109. package/lib/orchestrate/interface/histories/transformInterfaceSchemaRenameHistory.d.ts +5 -0
  110. package/lib/orchestrate/interface/histories/transformInterfaceSchemaRenameHistory.js +54 -0
  111. package/lib/orchestrate/interface/histories/transformInterfaceSchemaRenameHistory.js.map +1 -0
  112. package/lib/orchestrate/interface/histories/transformInterfaceSchemaReviewHistory.d.ts +12 -0
  113. package/lib/orchestrate/interface/histories/transformInterfaceSchemaReviewHistory.js +75 -0
  114. package/lib/orchestrate/interface/histories/transformInterfaceSchemaReviewHistory.js.map +1 -0
  115. package/lib/orchestrate/interface/orchestrateInterface.js +90 -46
  116. package/lib/orchestrate/interface/orchestrateInterface.js.map +1 -1
  117. package/lib/orchestrate/interface/orchestrateInterfaceAuthorization.d.ts +6 -0
  118. package/lib/orchestrate/interface/{orchestrateInterfaceAuthorizations.js → orchestrateInterfaceAuthorization.js} +1370 -226
  119. package/lib/orchestrate/interface/orchestrateInterfaceAuthorization.js.map +1 -0
  120. package/lib/orchestrate/interface/orchestrateInterfaceComplement.d.ts +4 -3
  121. package/lib/orchestrate/interface/orchestrateInterfaceComplement.js +2807 -532
  122. package/lib/orchestrate/interface/orchestrateInterfaceComplement.js.map +1 -1
  123. package/lib/orchestrate/interface/{orchestrateInterfaceEndpoints.d.ts → orchestrateInterfaceEndpoint.d.ts} +1 -1
  124. package/lib/orchestrate/interface/orchestrateInterfaceEndpoint.js +1356 -0
  125. package/lib/orchestrate/interface/orchestrateInterfaceEndpoint.js.map +1 -0
  126. package/lib/orchestrate/interface/orchestrateInterfaceEndpointReview.d.ts +4 -0
  127. package/lib/orchestrate/interface/orchestrateInterfaceEndpointReview.js +1337 -0
  128. package/lib/orchestrate/interface/orchestrateInterfaceEndpointReview.js.map +1 -0
  129. package/lib/orchestrate/interface/{orchestrateInterfaceGroups.d.ts → orchestrateInterfaceGroup.d.ts} +1 -2
  130. package/lib/orchestrate/interface/orchestrateInterfaceGroup.js +621 -0
  131. package/lib/orchestrate/interface/orchestrateInterfaceGroup.js.map +1 -0
  132. package/lib/orchestrate/interface/{orchestrateInterfaceOperations.d.ts → orchestrateInterfaceOperation.d.ts} +1 -2
  133. package/lib/orchestrate/interface/{orchestrateInterfaceOperations.js → orchestrateInterfaceOperation.js} +1275 -216
  134. package/lib/orchestrate/interface/orchestrateInterfaceOperation.js.map +1 -0
  135. package/lib/orchestrate/interface/orchestrateInterfaceOperationReview.d.ts +4 -0
  136. package/lib/orchestrate/interface/{orchestrateInterfaceOperationsReview.js → orchestrateInterfaceOperationReview.js} +1421 -247
  137. package/lib/orchestrate/interface/orchestrateInterfaceOperationReview.js.map +1 -0
  138. package/lib/orchestrate/interface/{orchestrateInterfacePrerequisites.d.ts → orchestrateInterfacePrerequisite.d.ts} +1 -1
  139. package/lib/orchestrate/interface/orchestrateInterfacePrerequisite.js +2159 -0
  140. package/lib/orchestrate/interface/orchestrateInterfacePrerequisite.js.map +1 -0
  141. package/lib/orchestrate/interface/{orchestrateInterfaceSchemas.d.ts → orchestrateInterfaceSchema.d.ts} +1 -2
  142. package/lib/orchestrate/interface/{orchestrateInterfaceSchemas.js → orchestrateInterfaceSchema.js} +2550 -546
  143. package/lib/orchestrate/interface/orchestrateInterfaceSchema.js.map +1 -0
  144. package/lib/orchestrate/interface/orchestrateInterfaceSchemaRename.js +7 -17
  145. package/lib/orchestrate/interface/orchestrateInterfaceSchemaRename.js.map +1 -1
  146. package/lib/orchestrate/interface/orchestrateInterfaceSchemaReview.d.ts +1 -0
  147. package/lib/orchestrate/interface/orchestrateInterfaceSchemaReview.js +2823 -548
  148. package/lib/orchestrate/interface/orchestrateInterfaceSchemaReview.js.map +1 -1
  149. package/lib/orchestrate/interface/structures/IAutoBeInterfaceAuthorizationsApplication.d.ts +56 -5
  150. package/lib/orchestrate/interface/structures/IAutoBeInterfaceComplementApplication.d.ts +57 -10
  151. package/lib/orchestrate/interface/structures/IAutoBeInterfaceEndpointApplication.d.ts +55 -10
  152. package/lib/orchestrate/interface/structures/IAutoBeInterfaceEndpointReviewApplication.d.ts +96 -0
  153. package/lib/orchestrate/interface/structures/IAutoBeInterfaceEndpointReviewApplication.js +3 -0
  154. package/lib/orchestrate/interface/structures/IAutoBeInterfaceEndpointReviewApplication.js.map +1 -0
  155. package/lib/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.d.ts +6 -82
  156. package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.d.ts +58 -13
  157. package/lib/orchestrate/interface/structures/{IAutoBeInterfaceOperationsReviewApplication.d.ts → IAutoBeInterfaceOperationReviewApplication.d.ts} +58 -28
  158. package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationReviewApplication.js +3 -0
  159. package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationReviewApplication.js.map +1 -0
  160. package/lib/orchestrate/interface/structures/IAutoBeInterfacePrerequisiteApplication.d.ts +98 -0
  161. package/lib/orchestrate/interface/structures/IAutoBeInterfacePrerequisiteApplication.js +3 -0
  162. package/lib/orchestrate/interface/structures/IAutoBeInterfacePrerequisiteApplication.js.map +1 -0
  163. package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.d.ts +56 -15
  164. package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaContentReviewApplication.d.ts +62 -22
  165. package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaRelationReviewApplication.d.ts +60 -21
  166. package/lib/orchestrate/interface/structures/IAutoBeInterfaceSchemaSecurityReviewApplication.d.ts +61 -19
  167. package/lib/orchestrate/interface/utils/JsonSchemaFactory.js +29 -23
  168. package/lib/orchestrate/interface/utils/JsonSchemaFactory.js.map +1 -1
  169. package/lib/orchestrate/interface/utils/JsonSchemaNamingConvention.js +67 -61
  170. package/lib/orchestrate/interface/utils/JsonSchemaNamingConvention.js.map +1 -1
  171. package/lib/orchestrate/interface/utils/JsonSchemaValidator.d.ts +2 -1
  172. package/lib/orchestrate/interface/utils/JsonSchemaValidator.js +52 -25
  173. package/lib/orchestrate/interface/utils/JsonSchemaValidator.js.map +1 -1
  174. package/lib/orchestrate/interface/utils/OperationValidator.js +59 -1
  175. package/lib/orchestrate/interface/utils/OperationValidator.js.map +1 -1
  176. package/lib/orchestrate/prisma/histories/transformPrismaComponentsHistory.d.ts +6 -0
  177. package/lib/orchestrate/prisma/histories/transformPrismaComponentsHistory.js +98 -0
  178. package/lib/orchestrate/prisma/histories/transformPrismaComponentsHistory.js.map +1 -0
  179. package/lib/orchestrate/prisma/histories/transformPrismaCorrectHistory.d.ts +7 -0
  180. package/lib/orchestrate/prisma/histories/transformPrismaCorrectHistory.js +31 -0
  181. package/lib/orchestrate/prisma/histories/transformPrismaCorrectHistory.js.map +1 -0
  182. package/lib/orchestrate/prisma/histories/transformPrismaReviewHistory.d.ts +7 -0
  183. package/lib/orchestrate/prisma/histories/transformPrismaReviewHistory.js +38 -0
  184. package/lib/orchestrate/prisma/histories/transformPrismaReviewHistory.js.map +1 -0
  185. package/lib/orchestrate/prisma/histories/transformPrismaSchemaHistory.d.ts +8 -0
  186. package/lib/orchestrate/prisma/histories/transformPrismaSchemaHistory.js +79 -0
  187. package/lib/orchestrate/prisma/histories/transformPrismaSchemaHistory.js.map +1 -0
  188. package/lib/orchestrate/prisma/orchestratePrisma.js +9 -6
  189. package/lib/orchestrate/prisma/orchestratePrisma.js.map +1 -1
  190. package/lib/orchestrate/prisma/orchestratePrismaComponent.d.ts +1 -1
  191. package/lib/orchestrate/prisma/orchestratePrismaComponent.js +8 -14
  192. package/lib/orchestrate/prisma/orchestratePrismaComponent.js.map +1 -1
  193. package/lib/orchestrate/prisma/orchestratePrismaCorrect.js +2863 -1543
  194. package/lib/orchestrate/prisma/orchestratePrismaCorrect.js.map +1 -1
  195. package/lib/orchestrate/prisma/orchestratePrismaReview.d.ts +1 -1
  196. package/lib/orchestrate/prisma/orchestratePrismaReview.js +2886 -1566
  197. package/lib/orchestrate/prisma/orchestratePrismaReview.js.map +1 -1
  198. package/lib/orchestrate/prisma/{orchestratePrismaSchemas.d.ts → orchestratePrismaSchema.d.ts} +1 -1
  199. package/lib/orchestrate/prisma/orchestratePrismaSchema.js +3068 -0
  200. package/lib/orchestrate/prisma/orchestratePrismaSchema.js.map +1 -0
  201. package/lib/orchestrate/prisma/structures/IAutoBePrismaCorrectApplication.d.ts +74 -76
  202. package/lib/orchestrate/prisma/structures/IAutoBePrismaReviewApplication.d.ts +90 -72
  203. package/lib/orchestrate/prisma/structures/IAutoBePrismaSchemaApplication.d.ts +89 -66
  204. package/lib/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistory.d.ts +9 -0
  205. package/lib/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistory.js +79 -0
  206. package/lib/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistory.js.map +1 -0
  207. package/lib/orchestrate/realize/histories/transformRealizeAuthorizationWriteHistory.d.ts +7 -0
  208. package/lib/orchestrate/realize/histories/transformRealizeAuthorizationWriteHistory.js +41 -0
  209. package/lib/orchestrate/realize/histories/transformRealizeAuthorizationWriteHistory.js.map +1 -0
  210. package/lib/orchestrate/realize/histories/transformRealizeCorrectCastingHistory.d.ts +12 -0
  211. package/lib/orchestrate/realize/histories/transformRealizeCorrectCastingHistory.js +67 -0
  212. package/lib/orchestrate/realize/histories/transformRealizeCorrectCastingHistory.js.map +1 -0
  213. package/lib/orchestrate/realize/histories/transformRealizeCorrectHistory.d.ts +18 -0
  214. package/lib/orchestrate/realize/histories/transformRealizeCorrectHistory.js +54 -0
  215. package/lib/orchestrate/realize/histories/transformRealizeCorrectHistory.js.map +1 -0
  216. package/lib/orchestrate/realize/histories/transformRealizeWriteHistories.d.ts +4 -2
  217. package/lib/orchestrate/realize/histories/transformRealizeWriteHistories.js +140 -106
  218. package/lib/orchestrate/realize/histories/transformRealizeWriteHistories.js.map +1 -1
  219. package/lib/orchestrate/realize/histories/transformRealizeWriteMembershipHistory.d.ts +3 -0
  220. package/lib/orchestrate/realize/histories/transformRealizeWriteMembershipHistory.js +23 -0
  221. package/lib/orchestrate/realize/histories/transformRealizeWriteMembershipHistory.js.map +1 -0
  222. package/lib/orchestrate/realize/orchestrateRealize.js +4 -4
  223. package/lib/orchestrate/realize/orchestrateRealize.js.map +1 -1
  224. package/lib/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.d.ts +5 -1
  225. package/lib/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js +1288 -572
  226. package/lib/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.js.map +1 -1
  227. package/lib/orchestrate/realize/{orchestrateRealizeAuthorization.d.ts → orchestrateRealizeAuthorizationWrite.d.ts} +1 -1
  228. package/lib/orchestrate/realize/orchestrateRealizeAuthorizationWrite.js +1410 -0
  229. package/lib/orchestrate/realize/orchestrateRealizeAuthorizationWrite.js.map +1 -0
  230. package/lib/orchestrate/realize/orchestrateRealizeCorrect.js +664 -140
  231. package/lib/orchestrate/realize/orchestrateRealizeCorrect.js.map +1 -1
  232. package/lib/orchestrate/realize/orchestrateRealizeCorrectCasting.js +20 -65
  233. package/lib/orchestrate/realize/orchestrateRealizeCorrectCasting.js.map +1 -1
  234. package/lib/orchestrate/realize/orchestrateRealizeWrite.js +660 -135
  235. package/lib/orchestrate/realize/orchestrateRealizeWrite.js.map +1 -1
  236. package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.d.ts +79 -19
  237. package/lib/orchestrate/realize/structures/{IAutoBeRealizeAuthorizationApplication.d.ts → IAutoBeRealizeAuthorizationWriteApplication.d.ts} +60 -27
  238. package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationWriteApplication.js +3 -0
  239. package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationWriteApplication.js.map +1 -0
  240. package/lib/orchestrate/realize/structures/IAutoBeRealizeCorrectApplication.d.ts +54 -5
  241. package/lib/orchestrate/realize/structures/IAutoBeRealizeScenarioResult.d.ts +6 -14
  242. package/lib/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.d.ts +54 -6
  243. package/lib/orchestrate/realize/utils/generateRealizeScenario.d.ts +1 -3
  244. package/lib/orchestrate/realize/utils/generateRealizeScenario.js +1 -7
  245. package/lib/orchestrate/realize/utils/generateRealizeScenario.js.map +1 -1
  246. package/lib/orchestrate/test/histories/transformTestCorrectHistories.d.ts +3 -3
  247. package/lib/orchestrate/test/histories/transformTestCorrectHistories.js +23 -20
  248. package/lib/orchestrate/test/histories/transformTestCorrectHistories.js.map +1 -1
  249. package/lib/orchestrate/test/histories/transformTestCorrectInvalidRequestHistory.d.ts +4 -0
  250. package/lib/orchestrate/test/histories/transformTestCorrectInvalidRequestHistory.js +36 -0
  251. package/lib/orchestrate/test/histories/transformTestCorrectInvalidRequestHistory.js.map +1 -0
  252. package/lib/orchestrate/test/histories/transformTestScenarioHistory.d.ts +11 -0
  253. package/lib/orchestrate/test/histories/transformTestScenarioHistory.js +95 -0
  254. package/lib/orchestrate/test/histories/transformTestScenarioHistory.js.map +1 -0
  255. package/lib/orchestrate/test/histories/transformTestScenarioReviewHistory.d.ts +10 -0
  256. package/lib/orchestrate/test/histories/transformTestScenarioReviewHistory.js +67 -0
  257. package/lib/orchestrate/test/histories/transformTestScenarioReviewHistory.js.map +1 -0
  258. package/lib/orchestrate/test/histories/{transformTestWriteHistories.d.ts → transformTestWriteHistory.d.ts} +4 -4
  259. package/lib/orchestrate/test/histories/{transformTestWriteHistories.js → transformTestWriteHistory.js} +79 -76
  260. package/lib/orchestrate/test/histories/transformTestWriteHistory.js.map +1 -0
  261. package/lib/orchestrate/test/orchestrateTestCorrect.js +13 -26
  262. package/lib/orchestrate/test/orchestrateTestCorrect.js.map +1 -1
  263. package/lib/orchestrate/test/orchestrateTestCorrectInvalidRequest.js +3 -15
  264. package/lib/orchestrate/test/orchestrateTestCorrectInvalidRequest.js.map +1 -1
  265. package/lib/orchestrate/test/orchestrateTestScenario.d.ts +1 -1
  266. package/lib/orchestrate/test/orchestrateTestScenario.js +1370 -316
  267. package/lib/orchestrate/test/orchestrateTestScenario.js.map +1 -1
  268. package/lib/orchestrate/test/orchestrateTestScenarioReview.d.ts +5 -3
  269. package/lib/orchestrate/test/orchestrateTestScenarioReview.js +1067 -288
  270. package/lib/orchestrate/test/orchestrateTestScenarioReview.js.map +1 -1
  271. package/lib/orchestrate/test/orchestrateTestWrite.js +8 -15
  272. package/lib/orchestrate/test/orchestrateTestWrite.js.map +1 -1
  273. package/lib/orchestrate/test/structures/IAutoBeTestScenarioApplication.d.ts +66 -4
  274. package/lib/orchestrate/test/structures/IAutoBeTestScenarioReviewApplication.d.ts +82 -14
  275. package/lib/structures/IAutoBeOrchestrateHistory.d.ts +5 -0
  276. package/lib/structures/IAutoBeOrchestrateHistory.js +3 -0
  277. package/lib/structures/IAutoBeOrchestrateHistory.js.map +1 -0
  278. package/lib/utils/executeCachedBatch.d.ts +5 -1
  279. package/lib/utils/executeCachedBatch.js +23 -5
  280. package/lib/utils/executeCachedBatch.js.map +1 -1
  281. package/lib/utils/validateEmptyCode.js +2 -2
  282. package/lib/utils/validateEmptyCode.js.map +1 -1
  283. package/package.json +8 -6
  284. package/src/AutoBeAgent.ts +1 -0
  285. package/src/AutoBeMockAgent.ts +1 -0
  286. package/src/constants/AutoBeConfigConstant.ts +2 -0
  287. package/src/constants/AutoBeSystemPromptConstant.ts +39 -26
  288. package/src/context/AutoBeContext.ts +1 -1
  289. package/src/factory/createAutoBeContext.ts +5 -2
  290. package/src/orchestrate/analyze/histories/transformAnalyzeReviewHistories.ts +17 -28
  291. package/src/orchestrate/analyze/histories/transformAnalyzeScenarioHistories.ts +12 -6
  292. package/src/orchestrate/analyze/histories/transformAnalyzeWriteHistories.ts +62 -61
  293. package/src/orchestrate/analyze/orchestrateAnalyze.ts +2 -0
  294. package/src/orchestrate/analyze/orchestrateAnalyzeReview.ts +97 -48
  295. package/src/orchestrate/analyze/orchestrateAnalyzeScenario.ts +3 -16
  296. package/src/orchestrate/analyze/orchestrateAnalyzeWrite.ts +1 -2
  297. package/src/orchestrate/analyze/structures/IAutoBeAnalyzeReviewApplication.ts +114 -36
  298. package/src/orchestrate/common/AutoBePreliminaryController.ts +161 -0
  299. package/src/orchestrate/common/histories/transformCommonCorrectCastingHistory.ts +32 -0
  300. package/src/orchestrate/common/histories/transformPreliminaryHistory.ts +383 -0
  301. package/src/orchestrate/common/histories/{transformPreviousAndLatestCorrectHistories.ts → transformPreviousAndLatestCorrectHistory.ts} +1 -1
  302. package/src/orchestrate/common/internal/complementPreliminaryCollection.ts +123 -0
  303. package/src/orchestrate/common/internal/createPreliminaryCollection.ts +32 -0
  304. package/src/orchestrate/common/internal/validatePreliminary.ts +315 -0
  305. package/src/orchestrate/common/orchestrateCommonCorrectCasting.ts +8 -15
  306. package/src/orchestrate/common/orchestratePreliminary.ts +361 -0
  307. package/src/orchestrate/common/structures/AutoBePreliminaryRequest.ts +18 -0
  308. package/src/orchestrate/common/structures/IAutoBeCommonCorrectCastingApplication.ts +1 -4
  309. package/src/orchestrate/common/structures/IAutoBeOrchestrateResult.ts +13 -0
  310. package/src/orchestrate/common/structures/IAutoBePreliminaryCollection.ts +9 -0
  311. package/src/orchestrate/common/structures/IAutoBePreliminaryGetAnalysisFiles.ts +29 -0
  312. package/src/orchestrate/common/structures/IAutoBePreliminaryGetInterfaceOperations.ts +30 -0
  313. package/src/orchestrate/common/structures/IAutoBePreliminaryGetInterfaceSchemas.ts +29 -0
  314. package/src/orchestrate/common/structures/IAutoBePreliminaryGetPrismaSchemas.ts +29 -0
  315. package/src/orchestrate/interface/histories/transformInterfaceAuthorizationHistory.ts +77 -0
  316. package/src/orchestrate/interface/histories/{transformInterfaceCommonHistories.ts → transformInterfaceCommonHistory.ts} +1 -1
  317. package/src/orchestrate/interface/histories/{transformInterfaceGroupHistories.ts → transformInterfaceComplementHistory.ts} +35 -21
  318. package/src/orchestrate/interface/histories/transformInterfaceEndpointHistory.ts +74 -0
  319. package/src/orchestrate/interface/histories/transformInterfaceEndpointReviewHistory.ts +40 -0
  320. package/src/orchestrate/interface/histories/transformInterfaceGroupHistory.ts +72 -0
  321. package/src/orchestrate/interface/histories/transformInterfaceOperationHistory.ts +79 -0
  322. package/src/orchestrate/interface/histories/transformInterfaceOperationReviewHistory.ts +43 -0
  323. package/src/orchestrate/interface/histories/transformInterfacePrerequisiteHistory.ts +89 -0
  324. package/src/orchestrate/interface/histories/transformInterfaceSchemaHistory.ts +105 -0
  325. package/src/orchestrate/interface/histories/transformInterfaceSchemaRenameHistory.ts +56 -0
  326. package/src/orchestrate/interface/histories/transformInterfaceSchemaReviewHistory.ts +88 -0
  327. package/src/orchestrate/interface/orchestrateInterface.ts +115 -51
  328. package/src/orchestrate/interface/{orchestrateInterfaceAuthorizations.ts → orchestrateInterfaceAuthorization.ts} +91 -67
  329. package/src/orchestrate/interface/orchestrateInterfaceComplement.ts +174 -78
  330. package/src/orchestrate/interface/orchestrateInterfaceEndpoint.ts +207 -0
  331. package/src/orchestrate/interface/orchestrateInterfaceEndpointReview.ts +139 -0
  332. package/src/orchestrate/interface/orchestrateInterfaceGroup.ts +153 -0
  333. package/src/orchestrate/interface/{orchestrateInterfaceOperations.ts → orchestrateInterfaceOperation.ts} +109 -86
  334. package/src/orchestrate/interface/orchestrateInterfaceOperationReview.ts +186 -0
  335. package/src/orchestrate/interface/{orchestrateInterfacePrerequisites.ts → orchestrateInterfacePrerequisite.ts} +123 -58
  336. package/src/orchestrate/interface/{orchestrateInterfaceSchemas.ts → orchestrateInterfaceSchema.ts} +96 -90
  337. package/src/orchestrate/interface/orchestrateInterfaceSchemaRename.ts +10 -11
  338. package/src/orchestrate/interface/orchestrateInterfaceSchemaReview.ts +127 -60
  339. package/src/orchestrate/interface/structures/IAutoBeInterfaceAuthorizationsApplication.ts +63 -5
  340. package/src/orchestrate/interface/structures/IAutoBeInterfaceComplementApplication.ts +67 -12
  341. package/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointApplication.ts +63 -10
  342. package/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointReviewApplication.ts +106 -0
  343. package/src/orchestrate/interface/structures/IAutoBeInterfaceGroupApplication.ts +6 -84
  344. package/src/orchestrate/interface/structures/IAutoBeInterfaceOperationApplication.ts +65 -13
  345. package/src/orchestrate/interface/structures/{IAutoBeInterfaceOperationsReviewApplication.ts → IAutoBeInterfaceOperationReviewApplication.ts} +65 -30
  346. package/src/orchestrate/interface/structures/IAutoBeInterfacePrerequisiteApplication.ts +111 -0
  347. package/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaApplication.ts +65 -15
  348. package/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaContentReviewApplication.ts +71 -24
  349. package/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaRelationReviewApplication.ts +68 -23
  350. package/src/orchestrate/interface/structures/IAutoBeInterfaceSchemaSecurityReviewApplication.ts +69 -21
  351. package/src/orchestrate/interface/utils/JsonSchemaFactory.ts +31 -23
  352. package/src/orchestrate/interface/utils/JsonSchemaNamingConvention.ts +73 -61
  353. package/src/orchestrate/interface/utils/JsonSchemaValidator.ts +53 -26
  354. package/src/orchestrate/interface/utils/OperationValidator.ts +69 -1
  355. package/src/orchestrate/prisma/histories/transformPrismaComponentsHistory.ts +109 -0
  356. package/src/orchestrate/prisma/histories/{transformPrismaCorrectHistories.ts → transformPrismaCorrectHistory.ts} +13 -22
  357. package/src/orchestrate/prisma/histories/transformPrismaReviewHistory.ts +42 -0
  358. package/src/orchestrate/prisma/histories/{transformPrismaSchemaHistories.ts → transformPrismaSchemaHistory.ts} +7 -8
  359. package/src/orchestrate/prisma/orchestratePrisma.ts +12 -17
  360. package/src/orchestrate/prisma/orchestratePrismaComponent.ts +7 -15
  361. package/src/orchestrate/prisma/orchestratePrismaCorrect.ts +129 -64
  362. package/src/orchestrate/prisma/orchestratePrismaReview.ts +115 -59
  363. package/src/orchestrate/prisma/{orchestratePrismaSchemas.ts → orchestratePrismaSchema.ts} +92 -60
  364. package/src/orchestrate/prisma/structures/IAutoBePrismaCorrectApplication.ts +81 -76
  365. package/src/orchestrate/prisma/structures/IAutoBePrismaReviewApplication.ts +97 -72
  366. package/src/orchestrate/prisma/structures/IAutoBePrismaSchemaApplication.ts +93 -66
  367. package/src/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistory.ts +89 -0
  368. package/src/orchestrate/realize/histories/transformRealizeAuthorizationWriteHistory.ts +45 -0
  369. package/src/orchestrate/realize/histories/transformRealizeCorrectCastingHistory.ts +85 -0
  370. package/src/orchestrate/realize/histories/transformRealizeCorrectHistory.ts +77 -0
  371. package/src/orchestrate/realize/histories/transformRealizeWriteHistories.ts +152 -121
  372. package/src/orchestrate/realize/histories/{transformRealizeWriteAuthorizationsHistories.ts → transformRealizeWriteMembershipHistory.ts} +2 -2
  373. package/src/orchestrate/realize/orchestrateRealize.ts +4 -3
  374. package/src/orchestrate/realize/orchestrateRealizeAuthorizationCorrect.ts +155 -97
  375. package/src/orchestrate/realize/orchestrateRealizeAuthorizationWrite.ts +241 -0
  376. package/src/orchestrate/realize/orchestrateRealizeCorrect.ts +88 -86
  377. package/src/orchestrate/realize/orchestrateRealizeCorrectCasting.ts +17 -56
  378. package/src/orchestrate/realize/orchestrateRealizeWrite.ts +82 -78
  379. package/src/orchestrate/realize/structures/IAutoBeRealizeAuthorizationCorrectApplication.ts +85 -22
  380. package/src/orchestrate/realize/structures/{IAutoBeRealizeAuthorizationApplication.ts → IAutoBeRealizeAuthorizationWriteApplication.ts} +64 -29
  381. package/src/orchestrate/realize/structures/IAutoBeRealizeCorrectApplication.ts +58 -5
  382. package/src/orchestrate/realize/structures/IAutoBeRealizeScenarioResult.ts +6 -19
  383. package/src/orchestrate/realize/structures/IAutoBeRealizeWriteApplication.ts +58 -6
  384. package/src/orchestrate/realize/utils/generateRealizeScenario.ts +2 -20
  385. package/src/orchestrate/test/histories/transformTestCorrectHistories.ts +30 -30
  386. package/src/orchestrate/test/histories/transformTestCorrectInvalidRequestHistory.ts +40 -0
  387. package/src/orchestrate/test/histories/transformTestScenarioHistory.ts +116 -0
  388. package/src/orchestrate/test/histories/transformTestScenarioReviewHistory.ts +85 -0
  389. package/src/orchestrate/test/histories/transformTestWriteHistory.ts +169 -0
  390. package/src/orchestrate/test/orchestrateTestCorrect.ts +13 -19
  391. package/src/orchestrate/test/orchestrateTestCorrectInvalidRequest.ts +5 -12
  392. package/src/orchestrate/test/orchestrateTestScenario.ts +143 -83
  393. package/src/orchestrate/test/orchestrateTestScenarioReview.ts +93 -76
  394. package/src/orchestrate/test/orchestrateTestWrite.ts +7 -7
  395. package/src/orchestrate/test/structures/IAutoBeTestScenarioApplication.ts +74 -4
  396. package/src/orchestrate/test/structures/IAutoBeTestScenarioReviewApplication.ts +89 -14
  397. package/src/structures/IAutoBeOrchestrateHistory.ts +6 -0
  398. package/src/utils/executeCachedBatch.ts +33 -7
  399. package/src/utils/validateEmptyCode.ts +2 -2
  400. package/lib/orchestrate/common/histories/transformCommonCorrectCastingHistories.d.ts +0 -8
  401. package/lib/orchestrate/common/histories/transformCommonCorrectCastingHistories.js +0 -16
  402. package/lib/orchestrate/common/histories/transformCommonCorrectCastingHistories.js.map +0 -1
  403. package/lib/orchestrate/common/histories/transformPreviousAndLatestCorrectHistories.js.map +0 -1
  404. package/lib/orchestrate/interface/histories/transformInterfaceAssetHistories.d.ts +0 -3
  405. package/lib/orchestrate/interface/histories/transformInterfaceAssetHistories.js +0 -62
  406. package/lib/orchestrate/interface/histories/transformInterfaceAssetHistories.js.map +0 -1
  407. package/lib/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.d.ts +0 -8
  408. package/lib/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.js +0 -68
  409. package/lib/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.js.map +0 -1
  410. package/lib/orchestrate/interface/histories/transformInterfaceCommonHistories.d.ts +0 -3
  411. package/lib/orchestrate/interface/histories/transformInterfaceCommonHistories.js.map +0 -1
  412. package/lib/orchestrate/interface/histories/transformInterfaceComplementHistories.d.ts +0 -9
  413. package/lib/orchestrate/interface/histories/transformInterfaceComplementHistories.js +0 -74
  414. package/lib/orchestrate/interface/histories/transformInterfaceComplementHistories.js.map +0 -1
  415. package/lib/orchestrate/interface/histories/transformInterfaceEndpointHistories.d.ts +0 -10
  416. package/lib/orchestrate/interface/histories/transformInterfaceEndpointHistories.js +0 -61
  417. package/lib/orchestrate/interface/histories/transformInterfaceEndpointHistories.js.map +0 -1
  418. package/lib/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.d.ts +0 -4
  419. package/lib/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.js +0 -34
  420. package/lib/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.js.map +0 -1
  421. package/lib/orchestrate/interface/histories/transformInterfaceGroupHistories.d.ts +0 -6
  422. package/lib/orchestrate/interface/histories/transformInterfaceGroupHistories.js +0 -52
  423. package/lib/orchestrate/interface/histories/transformInterfaceGroupHistories.js.map +0 -1
  424. package/lib/orchestrate/interface/histories/transformInterfaceOperationHistories.d.ts +0 -8
  425. package/lib/orchestrate/interface/histories/transformInterfaceOperationHistories.js +0 -71
  426. package/lib/orchestrate/interface/histories/transformInterfaceOperationHistories.js.map +0 -1
  427. package/lib/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.d.ts +0 -5
  428. package/lib/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js +0 -36
  429. package/lib/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.js.map +0 -1
  430. package/lib/orchestrate/interface/histories/transformInterfacePrerequisitesHistories.d.ts +0 -3
  431. package/lib/orchestrate/interface/histories/transformInterfacePrerequisitesHistories.js +0 -102
  432. package/lib/orchestrate/interface/histories/transformInterfacePrerequisitesHistories.js.map +0 -1
  433. package/lib/orchestrate/interface/histories/transformInterfaceSchemaHistories.d.ts +0 -9
  434. package/lib/orchestrate/interface/histories/transformInterfaceSchemaHistories.js +0 -74
  435. package/lib/orchestrate/interface/histories/transformInterfaceSchemaHistories.js.map +0 -1
  436. package/lib/orchestrate/interface/histories/transformInterfaceSchemaRenameHistories.d.ts +0 -5
  437. package/lib/orchestrate/interface/histories/transformInterfaceSchemaRenameHistories.js +0 -51
  438. package/lib/orchestrate/interface/histories/transformInterfaceSchemaRenameHistories.js.map +0 -1
  439. package/lib/orchestrate/interface/histories/transformInterfaceSchemaReviewHistories.d.ts +0 -11
  440. package/lib/orchestrate/interface/histories/transformInterfaceSchemaReviewHistories.js +0 -81
  441. package/lib/orchestrate/interface/histories/transformInterfaceSchemaReviewHistories.js.map +0 -1
  442. package/lib/orchestrate/interface/orchestrateInterfaceAuthorizations.d.ts +0 -4
  443. package/lib/orchestrate/interface/orchestrateInterfaceAuthorizations.js.map +0 -1
  444. package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.js +0 -508
  445. package/lib/orchestrate/interface/orchestrateInterfaceEndpoints.js.map +0 -1
  446. package/lib/orchestrate/interface/orchestrateInterfaceEndpointsReview.d.ts +0 -4
  447. package/lib/orchestrate/interface/orchestrateInterfaceEndpointsReview.js +0 -488
  448. package/lib/orchestrate/interface/orchestrateInterfaceEndpointsReview.js.map +0 -1
  449. package/lib/orchestrate/interface/orchestrateInterfaceGroups.js +0 -458
  450. package/lib/orchestrate/interface/orchestrateInterfaceGroups.js.map +0 -1
  451. package/lib/orchestrate/interface/orchestrateInterfaceOperations.js.map +0 -1
  452. package/lib/orchestrate/interface/orchestrateInterfaceOperationsReview.d.ts +0 -4
  453. package/lib/orchestrate/interface/orchestrateInterfaceOperationsReview.js.map +0 -1
  454. package/lib/orchestrate/interface/orchestrateInterfacePrerequisites.js +0 -917
  455. package/lib/orchestrate/interface/orchestrateInterfacePrerequisites.js.map +0 -1
  456. package/lib/orchestrate/interface/orchestrateInterfaceSchemas.js.map +0 -1
  457. package/lib/orchestrate/interface/structures/IAutoBeInterfaceEndpointsReviewApplication.d.ts +0 -60
  458. package/lib/orchestrate/interface/structures/IAutoBeInterfaceEndpointsReviewApplication.js.map +0 -1
  459. package/lib/orchestrate/interface/structures/IAutoBeInterfaceOperationsReviewApplication.js.map +0 -1
  460. package/lib/orchestrate/interface/structures/IAutoBeInterfacePrerequisitesApplication.d.ts +0 -52
  461. package/lib/orchestrate/interface/structures/IAutoBeInterfacePrerequisitesApplication.js.map +0 -1
  462. package/lib/orchestrate/prisma/histories/transformPrismaComponentsHistories.d.ts +0 -6
  463. package/lib/orchestrate/prisma/histories/transformPrismaComponentsHistories.js +0 -95
  464. package/lib/orchestrate/prisma/histories/transformPrismaComponentsHistories.js.map +0 -1
  465. package/lib/orchestrate/prisma/histories/transformPrismaCorrectHistories.d.ts +0 -3
  466. package/lib/orchestrate/prisma/histories/transformPrismaCorrectHistories.js +0 -41
  467. package/lib/orchestrate/prisma/histories/transformPrismaCorrectHistories.js.map +0 -1
  468. package/lib/orchestrate/prisma/histories/transformPrismaReviewHistories.d.ts +0 -8
  469. package/lib/orchestrate/prisma/histories/transformPrismaReviewHistories.js +0 -62
  470. package/lib/orchestrate/prisma/histories/transformPrismaReviewHistories.js.map +0 -1
  471. package/lib/orchestrate/prisma/histories/transformPrismaSchemaHistories.d.ts +0 -8
  472. package/lib/orchestrate/prisma/histories/transformPrismaSchemaHistories.js +0 -78
  473. package/lib/orchestrate/prisma/histories/transformPrismaSchemaHistories.js.map +0 -1
  474. package/lib/orchestrate/prisma/orchestratePrismaSchemas.js +0 -1678
  475. package/lib/orchestrate/prisma/orchestratePrismaSchemas.js.map +0 -1
  476. package/lib/orchestrate/realize/histories/transformRealizeAuthorization.d.ts +0 -5
  477. package/lib/orchestrate/realize/histories/transformRealizeAuthorization.js +0 -44
  478. package/lib/orchestrate/realize/histories/transformRealizeAuthorization.js.map +0 -1
  479. package/lib/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.d.ts +0 -5
  480. package/lib/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.js +0 -82
  481. package/lib/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.js.map +0 -1
  482. package/lib/orchestrate/realize/histories/transformRealizeCorrectCastingHistories.d.ts +0 -5
  483. package/lib/orchestrate/realize/histories/transformRealizeCorrectCastingHistories.js.map +0 -1
  484. package/lib/orchestrate/realize/histories/transformRealizeCorrectHistories.d.ts +0 -13
  485. package/lib/orchestrate/realize/histories/transformRealizeCorrectHistories.js +0 -29
  486. package/lib/orchestrate/realize/histories/transformRealizeCorrectHistories.js.map +0 -1
  487. package/lib/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.d.ts +0 -3
  488. package/lib/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.js +0 -23
  489. package/lib/orchestrate/realize/histories/transformRealizeWriteAuthorizationsHistories.js.map +0 -1
  490. package/lib/orchestrate/realize/orchestrateRealizeAuthorization.js +0 -710
  491. package/lib/orchestrate/realize/orchestrateRealizeAuthorization.js.map +0 -1
  492. package/lib/orchestrate/realize/structures/IAutoBeRealizeAuthorizationApplication.js.map +0 -1
  493. package/lib/orchestrate/test/histories/transformTestCorrectInvalidRequestHistories.d.ts +0 -4
  494. package/lib/orchestrate/test/histories/transformTestCorrectInvalidRequestHistories.js +0 -33
  495. package/lib/orchestrate/test/histories/transformTestCorrectInvalidRequestHistories.js.map +0 -1
  496. package/lib/orchestrate/test/histories/transformTestScenarioHistories.d.ts +0 -10
  497. package/lib/orchestrate/test/histories/transformTestScenarioHistories.js +0 -101
  498. package/lib/orchestrate/test/histories/transformTestScenarioHistories.js.map +0 -1
  499. package/lib/orchestrate/test/histories/transformTestScenarioReviewHistories.d.ts +0 -8
  500. package/lib/orchestrate/test/histories/transformTestScenarioReviewHistories.js +0 -72
  501. package/lib/orchestrate/test/histories/transformTestScenarioReviewHistories.js.map +0 -1
  502. package/lib/orchestrate/test/histories/transformTestWriteHistories.js.map +0 -1
  503. package/src/orchestrate/common/histories/transformCommonCorrectCastingHistories.ts +0 -25
  504. package/src/orchestrate/interface/histories/transformInterfaceAssetHistories.ts +0 -72
  505. package/src/orchestrate/interface/histories/transformInterfaceAuthorizationsHistories.ts +0 -75
  506. package/src/orchestrate/interface/histories/transformInterfaceComplementHistories.ts +0 -82
  507. package/src/orchestrate/interface/histories/transformInterfaceEndpointHistories.ts +0 -72
  508. package/src/orchestrate/interface/histories/transformInterfaceEndpointsReviewHistories.ts +0 -40
  509. package/src/orchestrate/interface/histories/transformInterfaceOperationHistories.ts +0 -78
  510. package/src/orchestrate/interface/histories/transformInterfaceOperationsReviewHistories.ts +0 -44
  511. package/src/orchestrate/interface/histories/transformInterfacePrerequisitesHistories.ts +0 -118
  512. package/src/orchestrate/interface/histories/transformInterfaceSchemaHistories.ts +0 -80
  513. package/src/orchestrate/interface/histories/transformInterfaceSchemaRenameHistories.ts +0 -55
  514. package/src/orchestrate/interface/histories/transformInterfaceSchemaReviewHistories.ts +0 -90
  515. package/src/orchestrate/interface/orchestrateInterfaceEndpoints.ts +0 -152
  516. package/src/orchestrate/interface/orchestrateInterfaceEndpointsReview.ts +0 -98
  517. package/src/orchestrate/interface/orchestrateInterfaceGroups.ts +0 -91
  518. package/src/orchestrate/interface/orchestrateInterfaceOperationsReview.ts +0 -157
  519. package/src/orchestrate/interface/structures/IAutoBeInterfaceEndpointsReviewApplication.ts +0 -65
  520. package/src/orchestrate/interface/structures/IAutoBeInterfacePrerequisitesApplication.ts +0 -58
  521. package/src/orchestrate/prisma/histories/transformPrismaComponentsHistories.ts +0 -104
  522. package/src/orchestrate/prisma/histories/transformPrismaReviewHistories.ts +0 -69
  523. package/src/orchestrate/realize/histories/transformRealizeAuthorization.ts +0 -52
  524. package/src/orchestrate/realize/histories/transformRealizeAuthorizationCorrectHistories.ts +0 -95
  525. package/src/orchestrate/realize/histories/transformRealizeCorrectCastingHistories.ts +0 -30
  526. package/src/orchestrate/realize/histories/transformRealizeCorrectHistories.ts +0 -46
  527. package/src/orchestrate/realize/orchestrateRealizeAuthorization.ts +0 -185
  528. package/src/orchestrate/test/histories/transformTestCorrectInvalidRequestHistories.ts +0 -39
  529. package/src/orchestrate/test/histories/transformTestScenarioHistories.ts +0 -125
  530. package/src/orchestrate/test/histories/transformTestScenarioReviewHistories.ts +0 -89
  531. package/src/orchestrate/test/histories/transformTestWriteHistories.ts +0 -172
@@ -0,0 +1,3068 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
36
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
37
+ return new (P || (P = Promise))(function (resolve, reject) {
38
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
39
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
40
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
41
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
42
+ });
43
+ };
44
+ var __importDefault = (this && this.__importDefault) || function (mod) {
45
+ return (mod && mod.__esModule) ? mod : { "default": mod };
46
+ };
47
+ Object.defineProperty(exports, "__esModule", { value: true });
48
+ exports.orchestratePrismaSchema = orchestratePrismaSchema;
49
+ const __typia_transform__isUniqueItems = __importStar(require("typia/lib/internal/_isUniqueItems.js"));
50
+ const __typia_transform__validateReport = __importStar(require("typia/lib/internal/_validateReport.js"));
51
+ const __typia_transform__llmApplicationFinalize = __importStar(require("typia/lib/internal/_llmApplicationFinalize.js"));
52
+ const __typia_transform__createStandardSchema = __importStar(require("typia/lib/internal/_createStandardSchema.js"));
53
+ const utils_1 = require("@autobe/utils");
54
+ const typia_1 = __importDefault(require("typia"));
55
+ const uuid_1 = require("uuid");
56
+ const assertSchemaModel_1 = require("../../context/assertSchemaModel");
57
+ const executeCachedBatch_1 = require("../../utils/executeCachedBatch");
58
+ const AutoBePreliminaryController_1 = require("../common/AutoBePreliminaryController");
59
+ const transformPrismaSchemaHistory_1 = require("./histories/transformPrismaSchemaHistory");
60
+ function orchestratePrismaSchema(ctx, instruction, componentList) {
61
+ return __awaiter(this, void 0, void 0, function* () {
62
+ const start = new Date();
63
+ const total = componentList
64
+ .map((c) => c.tables.length)
65
+ .reduce((x, y) => x + y, 0);
66
+ const completed = { value: 0 };
67
+ return yield (0, executeCachedBatch_1.executeCachedBatch)(ctx, componentList.map((component) => (promptCacheKey) => __awaiter(this, void 0, void 0, function* () {
68
+ const otherTables = componentList
69
+ .filter((y) => component !== y)
70
+ .map((c) => c.tables)
71
+ .flat();
72
+ const event = yield process(ctx, {
73
+ instruction,
74
+ component,
75
+ otherTables,
76
+ start,
77
+ total,
78
+ completed,
79
+ promptCacheKey,
80
+ });
81
+ ctx.dispatch(event);
82
+ return event;
83
+ })));
84
+ });
85
+ }
86
+ function process(ctx, props) {
87
+ return __awaiter(this, void 0, void 0, function* () {
88
+ const preliminary = new AutoBePreliminaryController_1.AutoBePreliminaryController({
89
+ application: {
90
+ version: "3.1",
91
+ components: {
92
+ schemas: {
93
+ "IAutoBePrismaSchemaApplication.IProps": {
94
+ type: "object",
95
+ properties: {
96
+ thinking: {
97
+ type: "string",
98
+ description: "Think before you act.\n\nBefore requesting preliminary data or completing your task, reflect on your\ncurrent state and explain your reasoning:\n\nFor preliminary requests (getAnalysisFiles, getPrismaSchemas, etc.):\n- What critical information is missing that you don't already have?\n- Why do you need it specifically right now?\n- Be brief - state the gap, don't list everything you have.\n\nFor completion (complete):\n- What key assets did you acquire?\n- What did you accomplish?\n- Why is it sufficient to complete?\n- Summarize - don't enumerate every single item.\n\nThis reflection helps you avoid duplicate requests and premature completion."
99
+ },
100
+ request: {
101
+ oneOf: [
102
+ {
103
+ $ref: "#/components/schemas/IAutoBePreliminaryGetAnalysisFiles"
104
+ },
105
+ {
106
+ $ref: "#/components/schemas/IAutoBePrismaSchemaApplication.IComplete"
107
+ }
108
+ ],
109
+ discriminator: {
110
+ propertyName: "type",
111
+ mapping: {
112
+ getAnalysisFiles: "#/components/schemas/IAutoBePreliminaryGetAnalysisFiles",
113
+ complete: "#/components/schemas/IAutoBePrismaSchemaApplication.IComplete"
114
+ }
115
+ },
116
+ description: "Type discriminator for the request.\n\nDetermines which action to perform: preliminary data retrieval\n(getAnalysisFiles) or final schema generation (complete). When\npreliminary returns empty array, that type is removed from the union,\nphysically preventing repeated calls."
117
+ }
118
+ },
119
+ required: [
120
+ "thinking",
121
+ "request"
122
+ ]
123
+ },
124
+ IAutoBePreliminaryGetAnalysisFiles: {
125
+ type: "object",
126
+ properties: {
127
+ type: {
128
+ "const": "getAnalysisFiles",
129
+ description: "Type discriminator for the request.\n\nDetermines which action to perform: preliminary data retrieval or actual\ntask execution. Value \"getAnalysisFiles\" indicates this is a preliminary\ndata request for analysis files."
130
+ },
131
+ fileNames: {
132
+ type: "array",
133
+ items: {
134
+ type: "string"
135
+ },
136
+ minItems: 1,
137
+ description: "List of analysis file names to retrieve.\n\nFile names from the analyze phase containing requirements, use cases, and\nbusiness logic documentation.\n\nCRITICAL: DO NOT request the same file names that you have already\nrequested in previous calls."
138
+ }
139
+ },
140
+ required: [
141
+ "type",
142
+ "fileNames"
143
+ ],
144
+ description: "Request to retrieve requirements analysis files for context.\n\nThis type is used in the preliminary phase to request specific analysis files\nthat provide business requirements and domain context."
145
+ },
146
+ "IAutoBePrismaSchemaApplication.IComplete": {
147
+ type: "object",
148
+ properties: {
149
+ type: {
150
+ "const": "complete",
151
+ description: "Type discriminator for the request.\n\nDetermines which action to perform: preliminary data retrieval or actual\ntask execution. Value \"complete\" indicates this is the final task\nexecution request."
152
+ },
153
+ plan: {
154
+ type: "string",
155
+ description: "Strategic database design analysis and planning.\n\nContains the database architecture strategy including table structures,\nrelationships, normalization approach, indexing strategies, and business\nrequirement mapping. This planning phase defines the blueprint for schema\nimplementation.\n\nKey planning aspects:\n\n- Assignment validation: Extract targetComponent.tables as complete\n specification\n- Table count: Must create exactly targetComponent.tables.length models\n- Component references: Identify existing tables for foreign key\n relationships\n- Normalization: Strict adherence to 1NF, 2NF, 3NF principles\n- Snapshot architecture: Design for historical data preservation\n- Junction tables: Plan M:N relationships with proper naming\n ({table1}_{table2})\n- Materialized views: Identify needs for mv_ prefixed denormalized tables"
156
+ },
157
+ models: {
158
+ type: "array",
159
+ items: {
160
+ $ref: "#/components/schemas/AutoBePrisma.IModel"
161
+ },
162
+ minItems: 1,
163
+ description: "Production-ready Prisma schema models.\n\nComplete AST representation of all database tables for the target\ncomponent. Each model implements the planned structure, relationships,\nindexes, and constraints following best practices.\n\nImplementation requirements:\n\n- Model count: Exactly matches targetComponent.tables.length (plus junction\n tables)\n- Table names: EXACT names from targetComponent.tables - no modifications\n- Primary keys: Always UUID type with field name \"id\"\n- Foreign keys: Proper IRelation configurations for all relationships\n- Business fields: Only raw data fields - no calculated or derived values\n- Data types: Limited to uuid, string, int, double, datetime, boolean, uri\n- Relationships: Correct patterns for 1:1, 1:N, and M:N\n- Indexes:\n\n - UniqueIndexes: Business constraints and composite unique keys\n - PlainIndexes: Multi-column query optimization (never single FK)\n - GinIndexes: Full-text search on appropriate string fields\n- Materialized views: Tables prefixed with \"mv_\" have material flag set\n- Documentation: Comprehensive English descriptions with business context\n\nQuality standards:\n\n- Strict adherence to 3NF (Third Normal Form)\n- No denormalization except in materialized views (mv_ tables)\n- All foreign keys reference valid existing tables\n- Consistent created_at, updated_at, deleted_at patterns\n- Proper historical data preservation where needed\n- Optimized index strategy for expected query patterns"
164
+ }
165
+ },
166
+ required: [
167
+ "type",
168
+ "plan",
169
+ "models"
170
+ ],
171
+ description: "Request to generate Prisma schema models.\n\nExecutes schema generation to create production-ready database models\nfollowing normalization principles, relationship patterns, and indexing\nstrategies."
172
+ },
173
+ "AutoBePrisma.IModel": {
174
+ type: "object",
175
+ properties: {
176
+ name: {
177
+ type: "string",
178
+ pattern: "^[a-z][a-z0-9_]*$",
179
+ description: "Name of the Prisma model (database table name).\n\nMUST use snake_case naming convention. Examples: \"shopping_customers\",\n\"shopping_sale_snapshots\", \"bbs_articles\" Materialized views use \"mv_\"\nprefix: \"mv_shopping_sale_last_snapshots\""
180
+ },
181
+ description: {
182
+ type: "string",
183
+ description: "Detailed description explaining the business purpose and usage of the\nmodel.\n\nShould include:\n\n- Business context and purpose\n- Key relationships with other models\n- Important behavioral notes or constraints\n- References to related entities using \"{@\\link ModelName}\" syntax\n\n**IMPORTANT**: Description must be written in English. Example: \"Customer\ninformation, but not a person but a **connection** basis...\""
184
+ },
185
+ material: {
186
+ type: "boolean",
187
+ description: "Indicates whether this model represents a materialized view for\nperformance optimization.\n\nMaterialized views are read-only computed tables that cache complex query\nresults. They're marked as \"@\\hidden\" in documentation and prefixed with\n\"mv_\" in naming. Examples: mv_shopping_sale_last_snapshots,\nmv_shopping_cart_commodity_prices"
188
+ },
189
+ stance: {
190
+ oneOf: [
191
+ {
192
+ "const": "primary"
193
+ },
194
+ {
195
+ "const": "subsidiary"
196
+ },
197
+ {
198
+ "const": "snapshot"
199
+ }
200
+ ],
201
+ description: "Specifies the architectural stance of this model within the database\nsystem.\n\nThis property defines how the table positions itself in relation to other\ntables and what role it plays in the overall data architecture,\nparticularly for API endpoint generation and business logic\norganization.\n\n## Values:\n\n### `\"primary\"` - Main Business Entity\n\nTables that represent core business concepts and serve as the primary\nsubjects of user operations. These tables typically warrant independent\nCRUD API endpoints since users directly interact with these entities.\n\n**Key principle**: If users need to independently create, search, filter,\nor manage entities regardless of their parent context, the table should\nbe primary stance.\n\n**API Requirements:**\n\n- Independent creation endpoints (POST /articles, POST /comments)\n- Search and filtering capabilities across all instances\n- Direct update and delete operations\n- List/pagination endpoints for browsing\n\n**Why `bbs_article_comments` is primary, not subsidiary:**\n\nAlthough comments belong to articles, they require independent\nmanagement:\n\n- **Search across articles**: \"Find all comments by user X across all\n articles\"\n- **Moderation workflows**: \"List all pending comments for review\"\n- **User activity**: \"Show all comments made by this user\"\n- **Independent operations**: Users edit/delete their comments directly\n- **Notification systems**: \"Alert when any comment is posted\"\n\nIf comments were subsidiary, these operations would be impossible or\nrequire inefficient nested queries through parent articles.\n\n**Characteristics:**\n\n- Represents tangible business concepts that users manage\n- Serves as reference points for other tables\n- Requires comprehensive API operations (CREATE, READ, UPDATE, DELETE)\n- Forms the backbone of the application's business logic\n\n**Examples:**\n\n- `bbs_articles` - Forum posts that users create, edit, and manage\n- `bbs_article_comments` - User comments that require independent\n management\n\n### `\"subsidiary\"` - Supporting/Dependent Entity\n\nTables that exist to support primary entities but are not independently\nmanaged by users. These tables are typically managed through their parent\nentities and may not need standalone API endpoints.\n\n**Characteristics:**\n\n- Depends on primary or snapshot entities for context\n- Often managed indirectly through parent entity operations\n- May have limited or no independent API operations\n- Provides supporting data or relationships\n\n**Examples:**\n\n- `bbs_article_snapshot_files` - Files attached to article snapshots\n- `bbs_article_snapshot_tags` - Tags associated with article snapshots\n- `bbs_article_comment_snapshot_files` - Files attached to comment\n snapshots\n\n### `\"snapshot\"` - Historical/Versioning Entity\n\nTables that capture point-in-time states of primary entities for audit\ntrails, version control, or historical tracking. These tables record\nchanges but are rarely modified directly by users.\n\n**Characteristics:**\n\n- Captures historical states of primary entities\n- Typically append-only (rarely updated or deleted)\n- Referenced for audit trails and change tracking\n- Usually read-only from user perspective\n\n**Examples:**\n\n- `bbs_article_snapshots` - Historical states of articles\n- `bbs_article_comment_snapshots` - Comment modification history\n\n## API Generation Guidelines:\n\nThe stance property guides automatic API endpoint generation:\n\n- **`\"primary\"`** \u2192 Generate full CRUD endpoints based on business\n requirements\n- **`\"subsidiary\"`** \u2192 Evaluate carefully; often managed through parent\n entities\n- **`\"snapshot\"`** \u2192 Typically read-only endpoints for historical data\n access"
202
+ },
203
+ primaryField: {
204
+ $ref: "#/components/schemas/AutoBePrisma.IPrimaryField",
205
+ description: "The primary key field of the model.\n\nIn all uploaded schemas, primary keys are always UUID type with \"@\\id\"\ndirective. Usually named \"id\" and marked with \"@\\db.Uuid\" for PostgreSQL\nmapping."
206
+ },
207
+ foreignFields: {
208
+ type: "array",
209
+ items: {
210
+ $ref: "#/components/schemas/AutoBePrisma.IForeignField"
211
+ },
212
+ description: "Array of foreign key fields that reference other models.\n\nThese establish relationships between models and include Prisma relation\ndirectives. Can be nullable (optional relationships) or required\n(mandatory relationships). May have unique constraints for 1:1\nrelationships."
213
+ },
214
+ plainFields: {
215
+ type: "array",
216
+ items: {
217
+ $ref: "#/components/schemas/AutoBePrisma.IPlainField"
218
+ },
219
+ description: "Array of regular data fields that don't reference other models.\n\nInclude business data like names, descriptions, timestamps, flags,\namounts, etc. Common patterns: created_at, updated_at, deleted_at for\nsoft deletion and auditing."
220
+ },
221
+ uniqueIndexes: {
222
+ type: "array",
223
+ items: {
224
+ $ref: "#/components/schemas/AutoBePrisma.IUniqueIndex"
225
+ },
226
+ description: "Array of unique indexes for enforcing data integrity constraints.\n\nEnsure uniqueness across single or multiple columns. Examples: unique\nemail addresses, unique codes within a channel, unique combinations like\n(channel_id, nickname)."
227
+ },
228
+ plainIndexes: {
229
+ type: "array",
230
+ items: {
231
+ $ref: "#/components/schemas/AutoBePrisma.IPlainIndex"
232
+ },
233
+ description: "Array of regular indexes for query performance optimization.\n\nSpeed up common query patterns like filtering by foreign keys, date\nranges, or frequently searched fields. Examples: indexes on created_at,\nforeign key fields, search fields."
234
+ },
235
+ ginIndexes: {
236
+ type: "array",
237
+ items: {
238
+ $ref: "#/components/schemas/AutoBePrisma.IGinIndex"
239
+ },
240
+ description: "Array of GIN (Generalized Inverted Index) indexes for full-text search.\n\nUsed specifically for PostgreSQL text search capabilities using trigram\noperations. Applied to text fields that need fuzzy matching or partial\ntext search. Examples: searching names, nicknames, titles, content\nbodies."
241
+ }
242
+ },
243
+ required: [
244
+ "name",
245
+ "description",
246
+ "material",
247
+ "stance",
248
+ "primaryField",
249
+ "foreignFields",
250
+ "plainFields",
251
+ "uniqueIndexes",
252
+ "plainIndexes",
253
+ "ginIndexes"
254
+ ],
255
+ description: "Interface representing a single Prisma model (database table).\n\nBased on the uploaded schemas, models follow specific patterns:\n\n- Main business entities (e.g., shopping_sales, shopping_customers)\n- Snapshot/versioning entities for audit trails (e.g.,\n shopping_sale_snapshots)\n- Junction tables for M:N relationships (e.g.,\n shopping_cart_commodity_stocks)\n- Materialized views for performance (prefixed with mv_)"
256
+ },
257
+ "AutoBePrisma.IPrimaryField": {
258
+ type: "object",
259
+ properties: {
260
+ name: {
261
+ type: "string",
262
+ pattern: "^[a-z][a-z0-9_]*$",
263
+ description: "Name of the primary key field.\n\nMUST use snake_case naming convention. Consistently named \"id\" across all\nmodels in the uploaded schemas. Represents the unique identifier for each\nrecord in the table."
264
+ },
265
+ type: {
266
+ "const": "uuid",
267
+ description: "Data type of the primary key field.\n\nAlways \"uuid\" in the uploaded schemas for better distributed system\nsupport and to avoid exposing sequential IDs that could reveal business\ninformation."
268
+ },
269
+ description: {
270
+ type: "string",
271
+ description: "Description of the primary key field's purpose.\n\nStandard description is \"Primary Key.\" across all models. Serves as the\nunique identifier for the model instance.\n\n**IMPORTANT**: Description must be written in English."
272
+ }
273
+ },
274
+ required: [
275
+ "name",
276
+ "type",
277
+ "description"
278
+ ],
279
+ description: "Interface representing the primary key field of a Prisma model.\n\nAll models in the uploaded schemas use UUID as primary key for better\ndistributed system compatibility and security (no sequential ID exposure)."
280
+ },
281
+ "AutoBePrisma.IForeignField": {
282
+ type: "object",
283
+ properties: {
284
+ name: {
285
+ type: "string",
286
+ pattern: "^[a-z][a-z0-9_]*$",
287
+ description: "Name of the foreign key field.\n\nMUST use snake_case naming convention. Follows convention:\n\"{target_model_name_without_prefix}_id\" Examples: \"shopping_customer_id\",\n\"bbs_article_id\", \"attachment_file_id\" For self-references: \"parent_id\"\n(e.g., in hierarchical structures)"
288
+ },
289
+ type: {
290
+ "const": "uuid",
291
+ description: "Data type of the foreign key field.\n\nAlways \"uuid\" to match the primary key type of referenced models. Ensures\nreferential integrity and consistency across the schema."
292
+ },
293
+ description: {
294
+ type: "string",
295
+ description: "Description explaining the purpose and target of this foreign key\nrelationship.\n\nShould reference the target model using format: \"Target model's {@\\link\nModelName.id}\" Examples: \"Belonged customer's {@\\link\nshopping_customers.id}\" May include additional context about the\nrelationship's business meaning.\n\n**IMPORTANT**: Description must be written in English."
296
+ },
297
+ relation: {
298
+ $ref: "#/components/schemas/AutoBePrisma.IRelation",
299
+ description: "Prisma relation configuration defining the association details.\n\nSpecifies how this foreign key connects to the target model, including\nrelation name, target model, and target field. This configuration is used\nto generate the appropriate Prisma relation directive in the schema."
300
+ },
301
+ unique: {
302
+ type: "boolean",
303
+ description: "Whether this foreign key has a unique constraint.\n\nTrue: Creates a 1:1 relationship (e.g., user profile, order publish\ndetails) false: Allows 1:N relationship (e.g., customer to multiple\norders) Used for enforcing business rules about relationship\ncardinality."
304
+ },
305
+ nullable: {
306
+ type: "boolean",
307
+ description: "Whether this foreign key can be null (optional relationship).\n\nTrue: Relationship is optional, foreign key can be null false:\nRelationship is required, foreign key cannot be null Reflects business\nrules about mandatory vs optional associations."
308
+ }
309
+ },
310
+ required: [
311
+ "name",
312
+ "type",
313
+ "description",
314
+ "relation",
315
+ "unique",
316
+ "nullable"
317
+ ],
318
+ description: "Interface representing a foreign key field that establishes relationships\nbetween models.\n\nForeign keys create associations between models, enabling relational data\nmodeling. They can represent 1:1, 1:N, or participate in M:N relationships\nthrough junction tables."
319
+ },
320
+ "AutoBePrisma.IRelation": {
321
+ type: "object",
322
+ properties: {
323
+ name: {
324
+ type: "string",
325
+ pattern: "^[a-z][a-zA-Z0-9]*$",
326
+ description: "Name of the relation property in the Prisma model.\n\nThis becomes the property name used to access the related model instance\nthrough the Prisma client. Should be descriptive and reflect the business\nrelationship being modeled.\n\nExamples:\n\n- \"customer\" for shopping_customer_id field\n- \"channel\" for shopping_channel_id field\n- \"parent\" for parent_id field in hierarchical structures\n- \"snapshot\" for versioning relationships\n- \"article\" for bbs_article_id field\n\nNaming convention: camelCase, descriptive of the relationship's business\nmeaning"
327
+ },
328
+ targetModel: {
329
+ type: "string",
330
+ description: "Name of the target model being referenced by this relation.\n\nMust exactly match an existing model name in the schema. This is used by\nPrisma to establish the foreign key constraint and generate the\nappropriate relation mapping.\n\nExamples:\n\n- \"shopping_customers\" for customer relationships\n- \"shopping_channels\" for channel relationships\n- \"bbs_articles\" for article relationships\n- \"attachment_files\" for file attachments\n\nThe target model should exist in the same schema or be accessible through\nthe Prisma schema configuration."
331
+ }
332
+ },
333
+ required: [
334
+ "name",
335
+ "targetModel"
336
+ ],
337
+ description: "Interface representing a Prisma relation configuration between models.\n\nThis interface defines how foreign key fields establish relationships with\ntheir target models. It provides the necessary information for Prisma to\ngenerate appropriate relation directives (@relation) in the schema,\nenabling proper relational data modeling and ORM functionality.\n\nThe relation configuration is essential for:\n\n- Generating correct Prisma relation syntax\n- Establishing bidirectional relationships between models\n- Enabling proper type-safe querying through Prisma client\n- Supporting complex relationship patterns (1:1, 1:N, M:N)"
338
+ },
339
+ "AutoBePrisma.IPlainField": {
340
+ type: "object",
341
+ properties: {
342
+ name: {
343
+ type: "string",
344
+ pattern: "^[a-z][a-z0-9_]*$",
345
+ description: "Name of the field in the database table.\n\nMUST use snake_case naming convention. Common patterns from uploaded\nschemas:\n\n- Timestamps: created_at, updated_at, deleted_at, opened_at, closed_at\n- Identifiers: code, name, nickname, title\n- Business data: value, quantity, price, volume, balance\n- Flags: primary, required, exclusive, secret, multiplicative"
346
+ },
347
+ type: {
348
+ oneOf: [
349
+ {
350
+ "const": "string"
351
+ },
352
+ {
353
+ "const": "boolean"
354
+ },
355
+ {
356
+ "const": "uuid"
357
+ },
358
+ {
359
+ "const": "uri"
360
+ },
361
+ {
362
+ "const": "int"
363
+ },
364
+ {
365
+ "const": "double"
366
+ },
367
+ {
368
+ "const": "datetime"
369
+ }
370
+ ],
371
+ description: "Data type of the field for Prisma schema generation.\n\nMaps to appropriate Prisma/PostgreSQL types:\n\n- Boolean: Boolean flags and yes/no values\n- Int: Integer numbers, quantities, sequences\n- Double: Decimal numbers, prices, monetary values, percentages\n- String: Text data, names, descriptions, codes\n- Uri: URL/URI fields for links and references\n- Uuid: UUID fields (for non-foreign-key UUIDs)\n- Datetime: Timestamp fields with date and time"
372
+ },
373
+ description: {
374
+ type: "string",
375
+ description: "Description explaining the business purpose and usage of this field.\n\nShould clearly explain:\n\n- What business concept this field represents\n- Valid values or constraints if applicable\n- How it relates to business processes\n- Any special behavioral notes\n\n**IMPORTANT**: Description must be written in English. Example: \"Amount\nof cash payment.\" or \"Whether the unit is required or not.\""
376
+ },
377
+ nullable: {
378
+ type: "boolean",
379
+ description: "Whether this field can contain null values.\n\nTrue: Field is optional and can be null (e.g., middle name, description)\nfalse: Field is required and cannot be null (e.g., creation timestamp,\nname) Reflects business rules about mandatory vs optional data."
380
+ }
381
+ },
382
+ required: [
383
+ "name",
384
+ "type",
385
+ "description",
386
+ "nullable"
387
+ ],
388
+ description: "Interface representing a regular data field that stores business\ninformation.\n\nThese fields contain the actual business data like names, amounts,\ntimestamps, flags, descriptions, and other domain-specific information."
389
+ },
390
+ "AutoBePrisma.IUniqueIndex": {
391
+ type: "object",
392
+ properties: {
393
+ fieldNames: {
394
+ type: "array",
395
+ items: {
396
+ type: "string"
397
+ },
398
+ minItems: 1,
399
+ uniqueItems: true,
400
+ description: "Array of field names that together form the unique constraint.\n\nCan be single field (e.g., [\"email\"]) or composite (e.g., [\"channel_id\",\n\"code\"]). All field names must exist in the model. Order matters for\ncomposite indexes. Examples: [\"code\"], [\"shopping_channel_id\",\n\"nickname\"], [\"email\"]"
401
+ },
402
+ unique: {
403
+ "const": true,
404
+ description: "Explicit marker indicating this is a unique index.\n\nAlways true to distinguish from regular indexes. Used by code generator\nto emit \"@@unique\" directive in Prisma schema instead of \"@@index\"."
405
+ }
406
+ },
407
+ required: [
408
+ "fieldNames",
409
+ "unique"
410
+ ],
411
+ description: "Interface representing a unique index constraint on one or more fields.\n\nUnique indexes enforce data integrity by ensuring no duplicate values exist\nfor the specified field combination. Essential for business rules that\nrequire uniqueness like email addresses, codes, or composite keys."
412
+ },
413
+ "AutoBePrisma.IPlainIndex": {
414
+ type: "object",
415
+ properties: {
416
+ fieldNames: {
417
+ type: "array",
418
+ items: {
419
+ type: "string"
420
+ },
421
+ minItems: 1,
422
+ uniqueItems: true,
423
+ description: "Array of field names to include in the performance index.\n\nCan be single field (e.g., [\"created_at\"]) or composite (e.g.,\n[\"customer_id\", \"created_at\"]). All field names must exist in the model.\nOrder matters for composite indexes and should match common query\npatterns. Examples: [\"created_at\"], [\"shopping_customer_id\",\n\"created_at\"], [\"ip\"]"
424
+ }
425
+ },
426
+ required: [
427
+ "fieldNames"
428
+ ],
429
+ description: "Interface representing a regular (non-unique) index for query performance.\n\nRegular indexes speed up database queries by creating optimized data\nstructures for common search patterns. Essential for foreign keys, date\nranges, and frequently filtered fields."
430
+ },
431
+ "AutoBePrisma.IGinIndex": {
432
+ type: "object",
433
+ properties: {
434
+ fieldName: {
435
+ type: "string",
436
+ description: "Name of the text field to index for full-text search capabilities.\n\nMust be a string field in the model that contains searchable text.\nExamples from uploaded schemas: \"nickname\", \"title\", \"body\", \"name\" Used\nwith PostgreSQL gin_trgm_ops for trigram-based fuzzy text search."
437
+ }
438
+ },
439
+ required: [
440
+ "fieldName"
441
+ ],
442
+ description: "Interface representing a GIN (Generalized Inverted Index) for full-text\nsearch.\n\nGIN indexes enable advanced PostgreSQL text search capabilities including\nfuzzy matching and partial text search using trigram operations. Essential\nfor user-facing search features on text content."
443
+ }
444
+ }
445
+ },
446
+ functions: [
447
+ {
448
+ name: "process",
449
+ async: false,
450
+ parameters: [
451
+ {
452
+ name: "props",
453
+ description: " Request containing either preliminary data request or complete\ntask",
454
+ required: true,
455
+ schema: {
456
+ $ref: "#/components/schemas/IAutoBePrismaSchemaApplication.IProps"
457
+ }
458
+ }
459
+ ],
460
+ description: "Process schema generation task or preliminary data requests.\n\nGenerates Prisma models for the target component following normalization\nprinciples and database design best practices."
461
+ }
462
+ ]
463
+ },
464
+ source: SOURCE,
465
+ kinds: ["analysisFiles"],
466
+ state: ctx.state(),
467
+ });
468
+ return yield preliminary.orchestrate(ctx, (out) => __awaiter(this, void 0, void 0, function* () {
469
+ var _a, _b, _c, _d;
470
+ const pointer = {
471
+ value: null,
472
+ };
473
+ const result = yield ctx.conversate(Object.assign({ source: SOURCE, controller: createController(ctx, {
474
+ preliminary,
475
+ targetComponent: props.component,
476
+ otherTables: props.otherTables,
477
+ build: (next) => {
478
+ pointer.value = next;
479
+ },
480
+ }), enforceFunctionCall: true, promptCacheKey: props.promptCacheKey }, (0, transformPrismaSchemaHistory_1.transformPrismaSchemaHistory)({
481
+ analysis: (_b = (_a = ctx
482
+ .state()
483
+ .analyze) === null || _a === void 0 ? void 0 : _a.files.map((file) => ({ [file.filename]: file.content })).reduce((acc, cur) => {
484
+ return Object.assign(acc, cur);
485
+ }, {})) !== null && _b !== void 0 ? _b : {},
486
+ targetComponent: props.component,
487
+ otherTables: props.otherTables,
488
+ instruction: props.instruction,
489
+ })));
490
+ if (pointer.value !== null)
491
+ return out(result)({
492
+ type: SOURCE,
493
+ id: (0, uuid_1.v7)(),
494
+ created_at: props.start.toISOString(),
495
+ plan: pointer.value.plan,
496
+ models: pointer.value.models,
497
+ file: {
498
+ filename: props.component.filename,
499
+ namespace: props.component.namespace,
500
+ models: pointer.value.models,
501
+ },
502
+ metric: result.metric,
503
+ tokenUsage: result.tokenUsage,
504
+ completed: (props.completed.value += props.component.tables.length),
505
+ total: props.total,
506
+ step: (_d = (_c = ctx.state().analyze) === null || _c === void 0 ? void 0 : _c.step) !== null && _d !== void 0 ? _d : 0,
507
+ });
508
+ return out(result)(null);
509
+ }));
510
+ });
511
+ }
512
+ function createController(ctx, props) {
513
+ (0, assertSchemaModel_1.assertSchemaModel)(ctx.model);
514
+ const validate = (input) => {
515
+ const result = defaultValidate(input);
516
+ if (result.success === false)
517
+ return result;
518
+ else if (result.data.request.type !== "complete")
519
+ return props.preliminary.validate({
520
+ thinking: result.data.thinking,
521
+ request: result.data.request,
522
+ });
523
+ const actual = result.data.request.models;
524
+ const expected = props.targetComponent.tables;
525
+ const missed = expected.filter((x) => actual.some((a) => a.name === x) === false);
526
+ if (missed.length === 0)
527
+ return result;
528
+ ctx.dispatch({
529
+ type: "prismaInsufficient",
530
+ id: (0, uuid_1.v7)(),
531
+ created_at: new Date().toISOString(),
532
+ component: props.targetComponent,
533
+ actual,
534
+ missed,
535
+ });
536
+ return {
537
+ success: false,
538
+ data: result.data,
539
+ errors: [
540
+ {
541
+ path: "$input.request.models",
542
+ value: result.data.request.models,
543
+ expected: `Array<AutoBePrisma.IModel>`,
544
+ description: utils_1.StringUtil.trim `
545
+ You missed some tables from the current domain's component.
546
+
547
+ Look at the following details to fix the schemas. Never forget to
548
+ compose the \`missed\` tables at the next function calling.
549
+
550
+ - filename: current domain's filename
551
+ - namespace: current domain's namespace
552
+ - expected: expected tables in the current domain
553
+ - actual: actual tables you made
554
+ - missed: tables you have missed, and you have to compose again
555
+
556
+ ${JSON.stringify({
557
+ filename: props.targetComponent.filename,
558
+ namespace: props.targetComponent.namespace,
559
+ expected,
560
+ actual,
561
+ missed,
562
+ })}
563
+ `,
564
+ },
565
+ ],
566
+ };
567
+ };
568
+ const application = collection[ctx.model === "chatgpt"
569
+ ? "chatgpt"
570
+ : ctx.model === "gemini"
571
+ ? "gemini"
572
+ : "claude"](validate);
573
+ return {
574
+ protocol: "class",
575
+ name: SOURCE,
576
+ application,
577
+ execute: {
578
+ process: (next) => {
579
+ if (next.request.type === "complete")
580
+ props.build(next.request);
581
+ },
582
+ },
583
+ };
584
+ }
585
+ const collection = {
586
+ chatgpt: (validate) => (() => {
587
+ const application = {
588
+ model: "chatgpt",
589
+ options: {
590
+ reference: true,
591
+ strict: false,
592
+ separate: null
593
+ },
594
+ functions: [
595
+ {
596
+ name: "process",
597
+ parameters: {
598
+ description: " Request containing either preliminary data request or complete\ntask\n\n------------------------------\n\nCurrent Type: {@link IAutoBePrismaSchemaApplication.IProps}",
599
+ type: "object",
600
+ properties: {
601
+ thinking: {
602
+ description: "Think before you act.\n\nBefore requesting preliminary data or completing your task, reflect on your\ncurrent state and explain your reasoning:\n\nFor preliminary requests (getAnalysisFiles, getPrismaSchemas, etc.):\n- What critical information is missing that you don't already have?\n- Why do you need it specifically right now?\n- Be brief - state the gap, don't list everything you have.\n\nFor completion (complete):\n- What key assets did you acquire?\n- What did you accomplish?\n- Why is it sufficient to complete?\n- Summarize - don't enumerate every single item.\n\nThis reflection helps you avoid duplicate requests and premature completion.",
603
+ type: "string"
604
+ },
605
+ request: {
606
+ description: "Type discriminator for the request.\n\nDetermines which action to perform: preliminary data retrieval\n(getAnalysisFiles) or final schema generation (complete). When\npreliminary returns empty array, that type is removed from the union,\nphysically preventing repeated calls.",
607
+ anyOf: [
608
+ {
609
+ $ref: "#/$defs/IAutoBePreliminaryGetAnalysisFiles"
610
+ },
611
+ {
612
+ $ref: "#/$defs/IAutoBePrismaSchemaApplication.IComplete"
613
+ }
614
+ ],
615
+ "x-discriminator": {
616
+ propertyName: "type",
617
+ mapping: {
618
+ getAnalysisFiles: "#/$defs/IAutoBePreliminaryGetAnalysisFiles",
619
+ complete: "#/$defs/IAutoBePrismaSchemaApplication.IComplete"
620
+ }
621
+ }
622
+ }
623
+ },
624
+ required: [
625
+ "thinking",
626
+ "request"
627
+ ],
628
+ additionalProperties: false,
629
+ $defs: {
630
+ IAutoBePreliminaryGetAnalysisFiles: {
631
+ description: "Request to retrieve requirements analysis files for context.\n\nThis type is used in the preliminary phase to request specific analysis files\nthat provide business requirements and domain context.",
632
+ type: "object",
633
+ properties: {
634
+ type: {
635
+ description: "Type discriminator for the request.\n\nDetermines which action to perform: preliminary data retrieval or actual\ntask execution. Value \"getAnalysisFiles\" indicates this is a preliminary\ndata request for analysis files.",
636
+ type: "string",
637
+ "enum": [
638
+ "getAnalysisFiles"
639
+ ]
640
+ },
641
+ fileNames: {
642
+ description: "List of analysis file names to retrieve.\n\nFile names from the analyze phase containing requirements, use cases, and\nbusiness logic documentation.\n\nCRITICAL: DO NOT request the same file names that you have already\nrequested in previous calls.\n\n\n@minItems 1",
643
+ type: "array",
644
+ items: {
645
+ type: "string"
646
+ }
647
+ }
648
+ },
649
+ required: [
650
+ "type",
651
+ "fileNames"
652
+ ]
653
+ },
654
+ "IAutoBePrismaSchemaApplication.IComplete": {
655
+ description: "Request to generate Prisma schema models.\n\nExecutes schema generation to create production-ready database models\nfollowing normalization principles, relationship patterns, and indexing\nstrategies.",
656
+ type: "object",
657
+ properties: {
658
+ type: {
659
+ description: "Type discriminator for the request.\n\nDetermines which action to perform: preliminary data retrieval or actual\ntask execution. Value \"complete\" indicates this is the final task\nexecution request.",
660
+ type: "string",
661
+ "enum": [
662
+ "complete"
663
+ ]
664
+ },
665
+ plan: {
666
+ description: "Strategic database design analysis and planning.\n\nContains the database architecture strategy including table structures,\nrelationships, normalization approach, indexing strategies, and business\nrequirement mapping. This planning phase defines the blueprint for schema\nimplementation.\n\nKey planning aspects:\n\n- Assignment validation: Extract targetComponent.tables as complete\n specification\n- Table count: Must create exactly targetComponent.tables.length models\n- Component references: Identify existing tables for foreign key\n relationships\n- Normalization: Strict adherence to 1NF, 2NF, 3NF principles\n- Snapshot architecture: Design for historical data preservation\n- Junction tables: Plan M:N relationships with proper naming\n ({table1}_{table2})\n- Materialized views: Identify needs for mv_ prefixed denormalized tables",
667
+ type: "string"
668
+ },
669
+ models: {
670
+ description: "Production-ready Prisma schema models.\n\nComplete AST representation of all database tables for the target\ncomponent. Each model implements the planned structure, relationships,\nindexes, and constraints following best practices.\n\nImplementation requirements:\n\n- Model count: Exactly matches targetComponent.tables.length (plus junction\n tables)\n- Table names: EXACT names from targetComponent.tables - no modifications\n- Primary keys: Always UUID type with field name \"id\"\n- Foreign keys: Proper IRelation configurations for all relationships\n- Business fields: Only raw data fields - no calculated or derived values\n- Data types: Limited to uuid, string, int, double, datetime, boolean, uri\n- Relationships: Correct patterns for 1:1, 1:N, and M:N\n- Indexes:\n\n - UniqueIndexes: Business constraints and composite unique keys\n - PlainIndexes: Multi-column query optimization (never single FK)\n - GinIndexes: Full-text search on appropriate string fields\n- Materialized views: Tables prefixed with \"mv_\" have material flag set\n- Documentation: Comprehensive English descriptions with business context\n\nQuality standards:\n\n- Strict adherence to 3NF (Third Normal Form)\n- No denormalization except in materialized views (mv_ tables)\n- All foreign keys reference valid existing tables\n- Consistent created_at, updated_at, deleted_at patterns\n- Proper historical data preservation where needed\n- Optimized index strategy for expected query patterns\n\n\n@minItems 1",
671
+ type: "array",
672
+ items: {
673
+ $ref: "#/$defs/AutoBePrisma.IModel"
674
+ }
675
+ }
676
+ },
677
+ required: [
678
+ "type",
679
+ "plan",
680
+ "models"
681
+ ]
682
+ },
683
+ "AutoBePrisma.IModel": {
684
+ description: "Interface representing a single Prisma model (database table).\n\nBased on the uploaded schemas, models follow specific patterns:\n\n- Main business entities (e.g., shopping_sales, shopping_customers)\n- Snapshot/versioning entities for audit trails (e.g.,\n shopping_sale_snapshots)\n- Junction tables for M:N relationships (e.g.,\n shopping_cart_commodity_stocks)\n- Materialized views for performance (prefixed with mv_)",
685
+ type: "object",
686
+ properties: {
687
+ name: {
688
+ description: "Name of the Prisma model (database table name).\n\nMUST use snake_case naming convention. Examples: \"shopping_customers\",\n\"shopping_sale_snapshots\", \"bbs_articles\" Materialized views use \"mv_\"\nprefix: \"mv_shopping_sale_last_snapshots\"\n\n\n@pattern ^[a-z][a-z0-9_]*$",
689
+ type: "string"
690
+ },
691
+ description: {
692
+ description: "Detailed description explaining the business purpose and usage of the\nmodel.\n\nShould include:\n\n- Business context and purpose\n- Key relationships with other models\n- Important behavioral notes or constraints\n- References to related entities using \"{@\\link ModelName}\" syntax\n\n**IMPORTANT**: Description must be written in English. Example: \"Customer\ninformation, but not a person but a **connection** basis...\"",
693
+ type: "string"
694
+ },
695
+ material: {
696
+ description: "Indicates whether this model represents a materialized view for\nperformance optimization.\n\nMaterialized views are read-only computed tables that cache complex query\nresults. They're marked as \"@\\hidden\" in documentation and prefixed with\n\"mv_\" in naming. Examples: mv_shopping_sale_last_snapshots,\nmv_shopping_cart_commodity_prices",
697
+ type: "boolean"
698
+ },
699
+ stance: {
700
+ description: "Specifies the architectural stance of this model within the database\nsystem.\n\nThis property defines how the table positions itself in relation to other\ntables and what role it plays in the overall data architecture,\nparticularly for API endpoint generation and business logic\norganization.\n\n## Values:\n\n### `\"primary\"` - Main Business Entity\n\nTables that represent core business concepts and serve as the primary\nsubjects of user operations. These tables typically warrant independent\nCRUD API endpoints since users directly interact with these entities.\n\n**Key principle**: If users need to independently create, search, filter,\nor manage entities regardless of their parent context, the table should\nbe primary stance.\n\n**API Requirements:**\n\n- Independent creation endpoints (POST /articles, POST /comments)\n- Search and filtering capabilities across all instances\n- Direct update and delete operations\n- List/pagination endpoints for browsing\n\n**Why `bbs_article_comments` is primary, not subsidiary:**\n\nAlthough comments belong to articles, they require independent\nmanagement:\n\n- **Search across articles**: \"Find all comments by user X across all\n articles\"\n- **Moderation workflows**: \"List all pending comments for review\"\n- **User activity**: \"Show all comments made by this user\"\n- **Independent operations**: Users edit/delete their comments directly\n- **Notification systems**: \"Alert when any comment is posted\"\n\nIf comments were subsidiary, these operations would be impossible or\nrequire inefficient nested queries through parent articles.\n\n**Characteristics:**\n\n- Represents tangible business concepts that users manage\n- Serves as reference points for other tables\n- Requires comprehensive API operations (CREATE, READ, UPDATE, DELETE)\n- Forms the backbone of the application's business logic\n\n**Examples:**\n\n- `bbs_articles` - Forum posts that users create, edit, and manage\n- `bbs_article_comments` - User comments that require independent\n management\n\n### `\"subsidiary\"` - Supporting/Dependent Entity\n\nTables that exist to support primary entities but are not independently\nmanaged by users. These tables are typically managed through their parent\nentities and may not need standalone API endpoints.\n\n**Characteristics:**\n\n- Depends on primary or snapshot entities for context\n- Often managed indirectly through parent entity operations\n- May have limited or no independent API operations\n- Provides supporting data or relationships\n\n**Examples:**\n\n- `bbs_article_snapshot_files` - Files attached to article snapshots\n- `bbs_article_snapshot_tags` - Tags associated with article snapshots\n- `bbs_article_comment_snapshot_files` - Files attached to comment\n snapshots\n\n### `\"snapshot\"` - Historical/Versioning Entity\n\nTables that capture point-in-time states of primary entities for audit\ntrails, version control, or historical tracking. These tables record\nchanges but are rarely modified directly by users.\n\n**Characteristics:**\n\n- Captures historical states of primary entities\n- Typically append-only (rarely updated or deleted)\n- Referenced for audit trails and change tracking\n- Usually read-only from user perspective\n\n**Examples:**\n\n- `bbs_article_snapshots` - Historical states of articles\n- `bbs_article_comment_snapshots` - Comment modification history\n\n## API Generation Guidelines:\n\nThe stance property guides automatic API endpoint generation:\n\n- **`\"primary\"`** \u2192 Generate full CRUD endpoints based on business\n requirements\n- **`\"subsidiary\"`** \u2192 Evaluate carefully; often managed through parent\n entities\n- **`\"snapshot\"`** \u2192 Typically read-only endpoints for historical data\n access",
701
+ type: "string",
702
+ "enum": [
703
+ "primary",
704
+ "subsidiary",
705
+ "snapshot"
706
+ ]
707
+ },
708
+ primaryField: {
709
+ description: "The primary key field of the model.\n\nIn all uploaded schemas, primary keys are always UUID type with \"@\\id\"\ndirective. Usually named \"id\" and marked with \"@\\db.Uuid\" for PostgreSQL\nmapping.",
710
+ $ref: "#/$defs/AutoBePrisma.IPrimaryField"
711
+ },
712
+ foreignFields: {
713
+ description: "Array of foreign key fields that reference other models.\n\nThese establish relationships between models and include Prisma relation\ndirectives. Can be nullable (optional relationships) or required\n(mandatory relationships). May have unique constraints for 1:1\nrelationships.",
714
+ type: "array",
715
+ items: {
716
+ $ref: "#/$defs/AutoBePrisma.IForeignField"
717
+ }
718
+ },
719
+ plainFields: {
720
+ description: "Array of regular data fields that don't reference other models.\n\nInclude business data like names, descriptions, timestamps, flags,\namounts, etc. Common patterns: created_at, updated_at, deleted_at for\nsoft deletion and auditing.",
721
+ type: "array",
722
+ items: {
723
+ $ref: "#/$defs/AutoBePrisma.IPlainField"
724
+ }
725
+ },
726
+ uniqueIndexes: {
727
+ description: "Array of unique indexes for enforcing data integrity constraints.\n\nEnsure uniqueness across single or multiple columns. Examples: unique\nemail addresses, unique codes within a channel, unique combinations like\n(channel_id, nickname).",
728
+ type: "array",
729
+ items: {
730
+ $ref: "#/$defs/AutoBePrisma.IUniqueIndex"
731
+ }
732
+ },
733
+ plainIndexes: {
734
+ description: "Array of regular indexes for query performance optimization.\n\nSpeed up common query patterns like filtering by foreign keys, date\nranges, or frequently searched fields. Examples: indexes on created_at,\nforeign key fields, search fields.",
735
+ type: "array",
736
+ items: {
737
+ $ref: "#/$defs/AutoBePrisma.IPlainIndex"
738
+ }
739
+ },
740
+ ginIndexes: {
741
+ description: "Array of GIN (Generalized Inverted Index) indexes for full-text search.\n\nUsed specifically for PostgreSQL text search capabilities using trigram\noperations. Applied to text fields that need fuzzy matching or partial\ntext search. Examples: searching names, nicknames, titles, content\nbodies.",
742
+ type: "array",
743
+ items: {
744
+ $ref: "#/$defs/AutoBePrisma.IGinIndex"
745
+ }
746
+ }
747
+ },
748
+ required: [
749
+ "name",
750
+ "description",
751
+ "material",
752
+ "stance",
753
+ "primaryField",
754
+ "foreignFields",
755
+ "plainFields",
756
+ "uniqueIndexes",
757
+ "plainIndexes",
758
+ "ginIndexes"
759
+ ]
760
+ },
761
+ "AutoBePrisma.IPrimaryField": {
762
+ description: "Interface representing the primary key field of a Prisma model.\n\nAll models in the uploaded schemas use UUID as primary key for better\ndistributed system compatibility and security (no sequential ID exposure).",
763
+ type: "object",
764
+ properties: {
765
+ name: {
766
+ description: "Name of the primary key field.\n\nMUST use snake_case naming convention. Consistently named \"id\" across all\nmodels in the uploaded schemas. Represents the unique identifier for each\nrecord in the table.\n\n\n@pattern ^[a-z][a-z0-9_]*$",
767
+ type: "string"
768
+ },
769
+ type: {
770
+ description: "Data type of the primary key field.\n\nAlways \"uuid\" in the uploaded schemas for better distributed system\nsupport and to avoid exposing sequential IDs that could reveal business\ninformation.",
771
+ type: "string",
772
+ "enum": [
773
+ "uuid"
774
+ ]
775
+ },
776
+ description: {
777
+ description: "Description of the primary key field's purpose.\n\nStandard description is \"Primary Key.\" across all models. Serves as the\nunique identifier for the model instance.\n\n**IMPORTANT**: Description must be written in English.",
778
+ type: "string"
779
+ }
780
+ },
781
+ required: [
782
+ "name",
783
+ "type",
784
+ "description"
785
+ ]
786
+ },
787
+ "AutoBePrisma.IForeignField": {
788
+ description: "Interface representing a foreign key field that establishes relationships\nbetween models.\n\nForeign keys create associations between models, enabling relational data\nmodeling. They can represent 1:1, 1:N, or participate in M:N relationships\nthrough junction tables.",
789
+ type: "object",
790
+ properties: {
791
+ name: {
792
+ description: "Name of the foreign key field.\n\nMUST use snake_case naming convention. Follows convention:\n\"{target_model_name_without_prefix}_id\" Examples: \"shopping_customer_id\",\n\"bbs_article_id\", \"attachment_file_id\" For self-references: \"parent_id\"\n(e.g., in hierarchical structures)\n\n\n@pattern ^[a-z][a-z0-9_]*$",
793
+ type: "string"
794
+ },
795
+ type: {
796
+ description: "Data type of the foreign key field.\n\nAlways \"uuid\" to match the primary key type of referenced models. Ensures\nreferential integrity and consistency across the schema.",
797
+ type: "string",
798
+ "enum": [
799
+ "uuid"
800
+ ]
801
+ },
802
+ description: {
803
+ description: "Description explaining the purpose and target of this foreign key\nrelationship.\n\nShould reference the target model using format: \"Target model's {@\\link\nModelName.id}\" Examples: \"Belonged customer's {@\\link\nshopping_customers.id}\" May include additional context about the\nrelationship's business meaning.\n\n**IMPORTANT**: Description must be written in English.",
804
+ type: "string"
805
+ },
806
+ relation: {
807
+ description: "Prisma relation configuration defining the association details.\n\nSpecifies how this foreign key connects to the target model, including\nrelation name, target model, and target field. This configuration is used\nto generate the appropriate Prisma relation directive in the schema.",
808
+ $ref: "#/$defs/AutoBePrisma.IRelation"
809
+ },
810
+ unique: {
811
+ description: "Whether this foreign key has a unique constraint.\n\nTrue: Creates a 1:1 relationship (e.g., user profile, order publish\ndetails) false: Allows 1:N relationship (e.g., customer to multiple\norders) Used for enforcing business rules about relationship\ncardinality.",
812
+ type: "boolean"
813
+ },
814
+ nullable: {
815
+ description: "Whether this foreign key can be null (optional relationship).\n\nTrue: Relationship is optional, foreign key can be null false:\nRelationship is required, foreign key cannot be null Reflects business\nrules about mandatory vs optional associations.",
816
+ type: "boolean"
817
+ }
818
+ },
819
+ required: [
820
+ "name",
821
+ "type",
822
+ "description",
823
+ "relation",
824
+ "unique",
825
+ "nullable"
826
+ ]
827
+ },
828
+ "AutoBePrisma.IRelation": {
829
+ description: "Interface representing a Prisma relation configuration between models.\n\nThis interface defines how foreign key fields establish relationships with\ntheir target models. It provides the necessary information for Prisma to\ngenerate appropriate relation directives (@relation) in the schema,\nenabling proper relational data modeling and ORM functionality.\n\nThe relation configuration is essential for:\n\n- Generating correct Prisma relation syntax\n- Establishing bidirectional relationships between models\n- Enabling proper type-safe querying through Prisma client\n- Supporting complex relationship patterns (1:1, 1:N, M:N)",
830
+ type: "object",
831
+ properties: {
832
+ name: {
833
+ description: "Name of the relation property in the Prisma model.\n\nThis becomes the property name used to access the related model instance\nthrough the Prisma client. Should be descriptive and reflect the business\nrelationship being modeled.\n\nExamples:\n\n- \"customer\" for shopping_customer_id field\n- \"channel\" for shopping_channel_id field\n- \"parent\" for parent_id field in hierarchical structures\n- \"snapshot\" for versioning relationships\n- \"article\" for bbs_article_id field\n\nNaming convention: camelCase, descriptive of the relationship's business\nmeaning\n\n\n@pattern ^[a-z][a-zA-Z0-9]*$",
834
+ type: "string"
835
+ },
836
+ targetModel: {
837
+ description: "Name of the target model being referenced by this relation.\n\nMust exactly match an existing model name in the schema. This is used by\nPrisma to establish the foreign key constraint and generate the\nappropriate relation mapping.\n\nExamples:\n\n- \"shopping_customers\" for customer relationships\n- \"shopping_channels\" for channel relationships\n- \"bbs_articles\" for article relationships\n- \"attachment_files\" for file attachments\n\nThe target model should exist in the same schema or be accessible through\nthe Prisma schema configuration.",
838
+ type: "string"
839
+ }
840
+ },
841
+ required: [
842
+ "name",
843
+ "targetModel"
844
+ ]
845
+ },
846
+ "AutoBePrisma.IPlainField": {
847
+ description: "Interface representing a regular data field that stores business\ninformation.\n\nThese fields contain the actual business data like names, amounts,\ntimestamps, flags, descriptions, and other domain-specific information.",
848
+ type: "object",
849
+ properties: {
850
+ name: {
851
+ description: "Name of the field in the database table.\n\nMUST use snake_case naming convention. Common patterns from uploaded\nschemas:\n\n- Timestamps: created_at, updated_at, deleted_at, opened_at, closed_at\n- Identifiers: code, name, nickname, title\n- Business data: value, quantity, price, volume, balance\n- Flags: primary, required, exclusive, secret, multiplicative\n\n\n@pattern ^[a-z][a-z0-9_]*$",
852
+ type: "string"
853
+ },
854
+ type: {
855
+ description: "Data type of the field for Prisma schema generation.\n\nMaps to appropriate Prisma/PostgreSQL types:\n\n- Boolean: Boolean flags and yes/no values\n- Int: Integer numbers, quantities, sequences\n- Double: Decimal numbers, prices, monetary values, percentages\n- String: Text data, names, descriptions, codes\n- Uri: URL/URI fields for links and references\n- Uuid: UUID fields (for non-foreign-key UUIDs)\n- Datetime: Timestamp fields with date and time",
856
+ type: "string",
857
+ "enum": [
858
+ "string",
859
+ "boolean",
860
+ "uuid",
861
+ "uri",
862
+ "int",
863
+ "double",
864
+ "datetime"
865
+ ]
866
+ },
867
+ description: {
868
+ description: "Description explaining the business purpose and usage of this field.\n\nShould clearly explain:\n\n- What business concept this field represents\n- Valid values or constraints if applicable\n- How it relates to business processes\n- Any special behavioral notes\n\n**IMPORTANT**: Description must be written in English. Example: \"Amount\nof cash payment.\" or \"Whether the unit is required or not.\"",
869
+ type: "string"
870
+ },
871
+ nullable: {
872
+ description: "Whether this field can contain null values.\n\nTrue: Field is optional and can be null (e.g., middle name, description)\nfalse: Field is required and cannot be null (e.g., creation timestamp,\nname) Reflects business rules about mandatory vs optional data.",
873
+ type: "boolean"
874
+ }
875
+ },
876
+ required: [
877
+ "name",
878
+ "type",
879
+ "description",
880
+ "nullable"
881
+ ]
882
+ },
883
+ "AutoBePrisma.IUniqueIndex": {
884
+ description: "Interface representing a unique index constraint on one or more fields.\n\nUnique indexes enforce data integrity by ensuring no duplicate values exist\nfor the specified field combination. Essential for business rules that\nrequire uniqueness like email addresses, codes, or composite keys.",
885
+ type: "object",
886
+ properties: {
887
+ fieldNames: {
888
+ description: "Array of field names that together form the unique constraint.\n\nCan be single field (e.g., [\"email\"]) or composite (e.g., [\"channel_id\",\n\"code\"]). All field names must exist in the model. Order matters for\ncomposite indexes. Examples: [\"code\"], [\"shopping_channel_id\",\n\"nickname\"], [\"email\"]\n\n\n@minItems 1\n@uniqueItems",
889
+ type: "array",
890
+ items: {
891
+ type: "string"
892
+ }
893
+ },
894
+ unique: {
895
+ description: "Explicit marker indicating this is a unique index.\n\nAlways true to distinguish from regular indexes. Used by code generator\nto emit \"@@unique\" directive in Prisma schema instead of \"@@index\".",
896
+ type: "boolean",
897
+ "enum": [
898
+ true
899
+ ]
900
+ }
901
+ },
902
+ required: [
903
+ "fieldNames",
904
+ "unique"
905
+ ]
906
+ },
907
+ "AutoBePrisma.IPlainIndex": {
908
+ description: "Interface representing a regular (non-unique) index for query performance.\n\nRegular indexes speed up database queries by creating optimized data\nstructures for common search patterns. Essential for foreign keys, date\nranges, and frequently filtered fields.",
909
+ type: "object",
910
+ properties: {
911
+ fieldNames: {
912
+ description: "Array of field names to include in the performance index.\n\nCan be single field (e.g., [\"created_at\"]) or composite (e.g.,\n[\"customer_id\", \"created_at\"]). All field names must exist in the model.\nOrder matters for composite indexes and should match common query\npatterns. Examples: [\"created_at\"], [\"shopping_customer_id\",\n\"created_at\"], [\"ip\"]\n\n\n@minItems 1\n@uniqueItems",
913
+ type: "array",
914
+ items: {
915
+ type: "string"
916
+ }
917
+ }
918
+ },
919
+ required: [
920
+ "fieldNames"
921
+ ]
922
+ },
923
+ "AutoBePrisma.IGinIndex": {
924
+ description: "Interface representing a GIN (Generalized Inverted Index) for full-text\nsearch.\n\nGIN indexes enable advanced PostgreSQL text search capabilities including\nfuzzy matching and partial text search using trigram operations. Essential\nfor user-facing search features on text content.",
925
+ type: "object",
926
+ properties: {
927
+ fieldName: {
928
+ description: "Name of the text field to index for full-text search capabilities.\n\nMust be a string field in the model that contains searchable text.\nExamples from uploaded schemas: \"nickname\", \"title\", \"body\", \"name\" Used\nwith PostgreSQL gin_trgm_ops for trigram-based fuzzy text search.",
929
+ type: "string"
930
+ }
931
+ },
932
+ required: [
933
+ "fieldName"
934
+ ]
935
+ }
936
+ }
937
+ },
938
+ description: "Process schema generation task or preliminary data requests.\n\nGenerates Prisma models for the target component following normalization\nprinciples and database design best practices.",
939
+ validate: (() => { const _io0 = input => "string" === typeof input.thinking && ("object" === typeof input.request && null !== input.request && _iu0(input.request)); const _io1 = input => "getAnalysisFiles" === input.type && (Array.isArray(input.fileNames) && (1 <= input.fileNames.length && input.fileNames.every(elem => "string" === typeof elem))); const _io2 = input => "complete" === input.type && "string" === typeof input.plan && (Array.isArray(input.models) && (1 <= input.models.length && input.models.every(elem => "object" === typeof elem && null !== elem && _io3(elem)))); const _io3 = input => "string" === typeof input.name && RegExp("^[a-z][a-z0-9_]*$").test(input.name) && "string" === typeof input.description && "boolean" === typeof input.material && ("primary" === input.stance || "subsidiary" === input.stance || "snapshot" === input.stance) && ("object" === typeof input.primaryField && null !== input.primaryField && _io4(input.primaryField)) && (Array.isArray(input.foreignFields) && input.foreignFields.every(elem => "object" === typeof elem && null !== elem && _io5(elem))) && (Array.isArray(input.plainFields) && input.plainFields.every(elem => "object" === typeof elem && null !== elem && _io7(elem))) && (Array.isArray(input.uniqueIndexes) && input.uniqueIndexes.every(elem => "object" === typeof elem && null !== elem && _io8(elem))) && (Array.isArray(input.plainIndexes) && input.plainIndexes.every(elem => "object" === typeof elem && null !== elem && _io9(elem))) && (Array.isArray(input.ginIndexes) && input.ginIndexes.every(elem => "object" === typeof elem && null !== elem && _io10(elem))); const _io4 = input => "string" === typeof input.name && RegExp("^[a-z][a-z0-9_]*$").test(input.name) && "uuid" === input.type && "string" === typeof input.description; const _io5 = input => "string" === typeof input.name && RegExp("^[a-z][a-z0-9_]*$").test(input.name) && "uuid" === input.type && "string" === typeof input.description && ("object" === typeof input.relation && null !== input.relation && _io6(input.relation)) && "boolean" === typeof input.unique && "boolean" === typeof input.nullable; const _io6 = input => "string" === typeof input.name && RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name) && "string" === typeof input.targetModel; const _io7 = input => "string" === typeof input.name && RegExp("^[a-z][a-z0-9_]*$").test(input.name) && ("string" === input.type || "boolean" === input.type || "uuid" === input.type || "uri" === input.type || "int" === input.type || "double" === input.type || "datetime" === input.type) && "string" === typeof input.description && "boolean" === typeof input.nullable; const _io8 = input => Array.isArray(input.fieldNames) && (1 <= input.fieldNames.length && __typia_transform__isUniqueItems._isUniqueItems(input.fieldNames) && input.fieldNames.every(elem => "string" === typeof elem)) && true === input.unique; const _io9 = input => Array.isArray(input.fieldNames) && (1 <= input.fieldNames.length && __typia_transform__isUniqueItems._isUniqueItems(input.fieldNames) && input.fieldNames.every(elem => "string" === typeof elem)); const _io10 = input => "string" === typeof input.fieldName; const _iu0 = input => (() => {
940
+ if ("getAnalysisFiles" === input.type)
941
+ return _io1(input);
942
+ else if ("complete" === input.type)
943
+ return _io2(input);
944
+ else
945
+ return false;
946
+ })(); const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.thinking || _report(_exceptionable, {
947
+ path: _path + ".thinking",
948
+ expected: "string",
949
+ value: input.thinking
950
+ }), ("object" === typeof input.request && null !== input.request || _report(_exceptionable, {
951
+ path: _path + ".request",
952
+ expected: "(IAutoBePreliminaryGetAnalysisFiles | IAutoBePrismaSchemaApplication.IComplete)",
953
+ value: input.request
954
+ })) && _vu0(input.request, _path + ".request", true && _exceptionable) || _report(_exceptionable, {
955
+ path: _path + ".request",
956
+ expected: "(IAutoBePreliminaryGetAnalysisFiles | IAutoBePrismaSchemaApplication.IComplete)",
957
+ value: input.request
958
+ })].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => ["getAnalysisFiles" === input.type || _report(_exceptionable, {
959
+ path: _path + ".type",
960
+ expected: "\"getAnalysisFiles\"",
961
+ value: input.type
962
+ }), (Array.isArray(input.fileNames) || _report(_exceptionable, {
963
+ path: _path + ".fileNames",
964
+ expected: "(Array<string> & MinItems<1>)",
965
+ value: input.fileNames
966
+ })) && ((1 <= input.fileNames.length || _report(_exceptionable, {
967
+ path: _path + ".fileNames",
968
+ expected: "Array<> & MinItems<1>",
969
+ value: input.fileNames
970
+ })) && input.fileNames.map((elem, _index10) => "string" === typeof elem || _report(_exceptionable, {
971
+ path: _path + ".fileNames[" + _index10 + "]",
972
+ expected: "string",
973
+ value: elem
974
+ })).every(flag => flag)) || _report(_exceptionable, {
975
+ path: _path + ".fileNames",
976
+ expected: "(Array<string> & MinItems<1>)",
977
+ value: input.fileNames
978
+ })].every(flag => flag); const _vo2 = (input, _path, _exceptionable = true) => ["complete" === input.type || _report(_exceptionable, {
979
+ path: _path + ".type",
980
+ expected: "\"complete\"",
981
+ value: input.type
982
+ }), "string" === typeof input.plan || _report(_exceptionable, {
983
+ path: _path + ".plan",
984
+ expected: "string",
985
+ value: input.plan
986
+ }), (Array.isArray(input.models) || _report(_exceptionable, {
987
+ path: _path + ".models",
988
+ expected: "(Array<AutoBePrisma.IModel> & MinItems<1>)",
989
+ value: input.models
990
+ })) && ((1 <= input.models.length || _report(_exceptionable, {
991
+ path: _path + ".models",
992
+ expected: "Array<> & MinItems<1>",
993
+ value: input.models
994
+ })) && input.models.map((elem, _index11) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
995
+ path: _path + ".models[" + _index11 + "]",
996
+ expected: "AutoBePrisma.IModel",
997
+ value: elem
998
+ })) && _vo3(elem, _path + ".models[" + _index11 + "]", true && _exceptionable) || _report(_exceptionable, {
999
+ path: _path + ".models[" + _index11 + "]",
1000
+ expected: "AutoBePrisma.IModel",
1001
+ value: elem
1002
+ })).every(flag => flag)) || _report(_exceptionable, {
1003
+ path: _path + ".models",
1004
+ expected: "(Array<AutoBePrisma.IModel> & MinItems<1>)",
1005
+ value: input.models
1006
+ })].every(flag => flag); const _vo3 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-z0-9_]*$").test(input.name) || _report(_exceptionable, {
1007
+ path: _path + ".name",
1008
+ expected: "string & SnakeCasePattern",
1009
+ value: input.name
1010
+ })) || _report(_exceptionable, {
1011
+ path: _path + ".name",
1012
+ expected: "(string & SnakeCasePattern)",
1013
+ value: input.name
1014
+ }), "string" === typeof input.description || _report(_exceptionable, {
1015
+ path: _path + ".description",
1016
+ expected: "string",
1017
+ value: input.description
1018
+ }), "boolean" === typeof input.material || _report(_exceptionable, {
1019
+ path: _path + ".material",
1020
+ expected: "boolean",
1021
+ value: input.material
1022
+ }), "primary" === input.stance || "subsidiary" === input.stance || "snapshot" === input.stance || _report(_exceptionable, {
1023
+ path: _path + ".stance",
1024
+ expected: "(\"primary\" | \"snapshot\" | \"subsidiary\")",
1025
+ value: input.stance
1026
+ }), ("object" === typeof input.primaryField && null !== input.primaryField || _report(_exceptionable, {
1027
+ path: _path + ".primaryField",
1028
+ expected: "AutoBePrisma.IPrimaryField",
1029
+ value: input.primaryField
1030
+ })) && _vo4(input.primaryField, _path + ".primaryField", true && _exceptionable) || _report(_exceptionable, {
1031
+ path: _path + ".primaryField",
1032
+ expected: "AutoBePrisma.IPrimaryField",
1033
+ value: input.primaryField
1034
+ }), (Array.isArray(input.foreignFields) || _report(_exceptionable, {
1035
+ path: _path + ".foreignFields",
1036
+ expected: "Array<AutoBePrisma.IForeignField>",
1037
+ value: input.foreignFields
1038
+ })) && input.foreignFields.map((elem, _index12) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
1039
+ path: _path + ".foreignFields[" + _index12 + "]",
1040
+ expected: "AutoBePrisma.IForeignField",
1041
+ value: elem
1042
+ })) && _vo5(elem, _path + ".foreignFields[" + _index12 + "]", true && _exceptionable) || _report(_exceptionable, {
1043
+ path: _path + ".foreignFields[" + _index12 + "]",
1044
+ expected: "AutoBePrisma.IForeignField",
1045
+ value: elem
1046
+ })).every(flag => flag) || _report(_exceptionable, {
1047
+ path: _path + ".foreignFields",
1048
+ expected: "Array<AutoBePrisma.IForeignField>",
1049
+ value: input.foreignFields
1050
+ }), (Array.isArray(input.plainFields) || _report(_exceptionable, {
1051
+ path: _path + ".plainFields",
1052
+ expected: "Array<AutoBePrisma.IPlainField>",
1053
+ value: input.plainFields
1054
+ })) && input.plainFields.map((elem, _index13) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
1055
+ path: _path + ".plainFields[" + _index13 + "]",
1056
+ expected: "AutoBePrisma.IPlainField",
1057
+ value: elem
1058
+ })) && _vo7(elem, _path + ".plainFields[" + _index13 + "]", true && _exceptionable) || _report(_exceptionable, {
1059
+ path: _path + ".plainFields[" + _index13 + "]",
1060
+ expected: "AutoBePrisma.IPlainField",
1061
+ value: elem
1062
+ })).every(flag => flag) || _report(_exceptionable, {
1063
+ path: _path + ".plainFields",
1064
+ expected: "Array<AutoBePrisma.IPlainField>",
1065
+ value: input.plainFields
1066
+ }), (Array.isArray(input.uniqueIndexes) || _report(_exceptionable, {
1067
+ path: _path + ".uniqueIndexes",
1068
+ expected: "Array<AutoBePrisma.IUniqueIndex>",
1069
+ value: input.uniqueIndexes
1070
+ })) && input.uniqueIndexes.map((elem, _index14) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
1071
+ path: _path + ".uniqueIndexes[" + _index14 + "]",
1072
+ expected: "AutoBePrisma.IUniqueIndex",
1073
+ value: elem
1074
+ })) && _vo8(elem, _path + ".uniqueIndexes[" + _index14 + "]", true && _exceptionable) || _report(_exceptionable, {
1075
+ path: _path + ".uniqueIndexes[" + _index14 + "]",
1076
+ expected: "AutoBePrisma.IUniqueIndex",
1077
+ value: elem
1078
+ })).every(flag => flag) || _report(_exceptionable, {
1079
+ path: _path + ".uniqueIndexes",
1080
+ expected: "Array<AutoBePrisma.IUniqueIndex>",
1081
+ value: input.uniqueIndexes
1082
+ }), (Array.isArray(input.plainIndexes) || _report(_exceptionable, {
1083
+ path: _path + ".plainIndexes",
1084
+ expected: "Array<AutoBePrisma.IPlainIndex>",
1085
+ value: input.plainIndexes
1086
+ })) && input.plainIndexes.map((elem, _index15) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
1087
+ path: _path + ".plainIndexes[" + _index15 + "]",
1088
+ expected: "AutoBePrisma.IPlainIndex",
1089
+ value: elem
1090
+ })) && _vo9(elem, _path + ".plainIndexes[" + _index15 + "]", true && _exceptionable) || _report(_exceptionable, {
1091
+ path: _path + ".plainIndexes[" + _index15 + "]",
1092
+ expected: "AutoBePrisma.IPlainIndex",
1093
+ value: elem
1094
+ })).every(flag => flag) || _report(_exceptionable, {
1095
+ path: _path + ".plainIndexes",
1096
+ expected: "Array<AutoBePrisma.IPlainIndex>",
1097
+ value: input.plainIndexes
1098
+ }), (Array.isArray(input.ginIndexes) || _report(_exceptionable, {
1099
+ path: _path + ".ginIndexes",
1100
+ expected: "Array<AutoBePrisma.IGinIndex>",
1101
+ value: input.ginIndexes
1102
+ })) && input.ginIndexes.map((elem, _index16) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
1103
+ path: _path + ".ginIndexes[" + _index16 + "]",
1104
+ expected: "AutoBePrisma.IGinIndex",
1105
+ value: elem
1106
+ })) && _vo10(elem, _path + ".ginIndexes[" + _index16 + "]", true && _exceptionable) || _report(_exceptionable, {
1107
+ path: _path + ".ginIndexes[" + _index16 + "]",
1108
+ expected: "AutoBePrisma.IGinIndex",
1109
+ value: elem
1110
+ })).every(flag => flag) || _report(_exceptionable, {
1111
+ path: _path + ".ginIndexes",
1112
+ expected: "Array<AutoBePrisma.IGinIndex>",
1113
+ value: input.ginIndexes
1114
+ })].every(flag => flag); const _vo4 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-z0-9_]*$").test(input.name) || _report(_exceptionable, {
1115
+ path: _path + ".name",
1116
+ expected: "string & SnakeCasePattern",
1117
+ value: input.name
1118
+ })) || _report(_exceptionable, {
1119
+ path: _path + ".name",
1120
+ expected: "(string & SnakeCasePattern)",
1121
+ value: input.name
1122
+ }), "uuid" === input.type || _report(_exceptionable, {
1123
+ path: _path + ".type",
1124
+ expected: "\"uuid\"",
1125
+ value: input.type
1126
+ }), "string" === typeof input.description || _report(_exceptionable, {
1127
+ path: _path + ".description",
1128
+ expected: "string",
1129
+ value: input.description
1130
+ })].every(flag => flag); const _vo5 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-z0-9_]*$").test(input.name) || _report(_exceptionable, {
1131
+ path: _path + ".name",
1132
+ expected: "string & SnakeCasePattern",
1133
+ value: input.name
1134
+ })) || _report(_exceptionable, {
1135
+ path: _path + ".name",
1136
+ expected: "(string & SnakeCasePattern)",
1137
+ value: input.name
1138
+ }), "uuid" === input.type || _report(_exceptionable, {
1139
+ path: _path + ".type",
1140
+ expected: "\"uuid\"",
1141
+ value: input.type
1142
+ }), "string" === typeof input.description || _report(_exceptionable, {
1143
+ path: _path + ".description",
1144
+ expected: "string",
1145
+ value: input.description
1146
+ }), ("object" === typeof input.relation && null !== input.relation || _report(_exceptionable, {
1147
+ path: _path + ".relation",
1148
+ expected: "AutoBePrisma.IRelation",
1149
+ value: input.relation
1150
+ })) && _vo6(input.relation, _path + ".relation", true && _exceptionable) || _report(_exceptionable, {
1151
+ path: _path + ".relation",
1152
+ expected: "AutoBePrisma.IRelation",
1153
+ value: input.relation
1154
+ }), "boolean" === typeof input.unique || _report(_exceptionable, {
1155
+ path: _path + ".unique",
1156
+ expected: "boolean",
1157
+ value: input.unique
1158
+ }), "boolean" === typeof input.nullable || _report(_exceptionable, {
1159
+ path: _path + ".nullable",
1160
+ expected: "boolean",
1161
+ value: input.nullable
1162
+ })].every(flag => flag); const _vo6 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name) || _report(_exceptionable, {
1163
+ path: _path + ".name",
1164
+ expected: "string & CamelCasePattern",
1165
+ value: input.name
1166
+ })) || _report(_exceptionable, {
1167
+ path: _path + ".name",
1168
+ expected: "(string & CamelCasePattern)",
1169
+ value: input.name
1170
+ }), "string" === typeof input.targetModel || _report(_exceptionable, {
1171
+ path: _path + ".targetModel",
1172
+ expected: "string",
1173
+ value: input.targetModel
1174
+ })].every(flag => flag); const _vo7 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-z0-9_]*$").test(input.name) || _report(_exceptionable, {
1175
+ path: _path + ".name",
1176
+ expected: "string & SnakeCasePattern",
1177
+ value: input.name
1178
+ })) || _report(_exceptionable, {
1179
+ path: _path + ".name",
1180
+ expected: "(string & SnakeCasePattern)",
1181
+ value: input.name
1182
+ }), "string" === input.type || "boolean" === input.type || "uuid" === input.type || "uri" === input.type || "int" === input.type || "double" === input.type || "datetime" === input.type || _report(_exceptionable, {
1183
+ path: _path + ".type",
1184
+ expected: "(\"boolean\" | \"datetime\" | \"double\" | \"int\" | \"string\" | \"uri\" | \"uuid\")",
1185
+ value: input.type
1186
+ }), "string" === typeof input.description || _report(_exceptionable, {
1187
+ path: _path + ".description",
1188
+ expected: "string",
1189
+ value: input.description
1190
+ }), "boolean" === typeof input.nullable || _report(_exceptionable, {
1191
+ path: _path + ".nullable",
1192
+ expected: "boolean",
1193
+ value: input.nullable
1194
+ })].every(flag => flag); const _vo8 = (input, _path, _exceptionable = true) => [(Array.isArray(input.fieldNames) || _report(_exceptionable, {
1195
+ path: _path + ".fieldNames",
1196
+ expected: "(Array<string> & MinItems<1> & UniqueItems<true>)",
1197
+ value: input.fieldNames
1198
+ })) && ((1 <= input.fieldNames.length || _report(_exceptionable, {
1199
+ path: _path + ".fieldNames",
1200
+ expected: "Array<> & MinItems<1>",
1201
+ value: input.fieldNames
1202
+ })) && (__typia_transform__isUniqueItems._isUniqueItems(input.fieldNames) || _report(_exceptionable, {
1203
+ path: _path + ".fieldNames",
1204
+ expected: "Array<> & UniqueItems<true>",
1205
+ value: input.fieldNames
1206
+ })) && input.fieldNames.map((elem, _index17) => "string" === typeof elem || _report(_exceptionable, {
1207
+ path: _path + ".fieldNames[" + _index17 + "]",
1208
+ expected: "string",
1209
+ value: elem
1210
+ })).every(flag => flag)) || _report(_exceptionable, {
1211
+ path: _path + ".fieldNames",
1212
+ expected: "(Array<string> & MinItems<1> & UniqueItems<true>)",
1213
+ value: input.fieldNames
1214
+ }), true === input.unique || _report(_exceptionable, {
1215
+ path: _path + ".unique",
1216
+ expected: "true",
1217
+ value: input.unique
1218
+ })].every(flag => flag); const _vo9 = (input, _path, _exceptionable = true) => [(Array.isArray(input.fieldNames) || _report(_exceptionable, {
1219
+ path: _path + ".fieldNames",
1220
+ expected: "(Array<string> & MinItems<1> & UniqueItems<true>)",
1221
+ value: input.fieldNames
1222
+ })) && ((1 <= input.fieldNames.length || _report(_exceptionable, {
1223
+ path: _path + ".fieldNames",
1224
+ expected: "Array<> & MinItems<1>",
1225
+ value: input.fieldNames
1226
+ })) && (__typia_transform__isUniqueItems._isUniqueItems(input.fieldNames) || _report(_exceptionable, {
1227
+ path: _path + ".fieldNames",
1228
+ expected: "Array<> & UniqueItems<true>",
1229
+ value: input.fieldNames
1230
+ })) && input.fieldNames.map((elem, _index18) => "string" === typeof elem || _report(_exceptionable, {
1231
+ path: _path + ".fieldNames[" + _index18 + "]",
1232
+ expected: "string",
1233
+ value: elem
1234
+ })).every(flag => flag)) || _report(_exceptionable, {
1235
+ path: _path + ".fieldNames",
1236
+ expected: "(Array<string> & MinItems<1> & UniqueItems<true>)",
1237
+ value: input.fieldNames
1238
+ })].every(flag => flag); const _vo10 = (input, _path, _exceptionable = true) => ["string" === typeof input.fieldName || _report(_exceptionable, {
1239
+ path: _path + ".fieldName",
1240
+ expected: "string",
1241
+ value: input.fieldName
1242
+ })].every(flag => flag); const _vu0 = (input, _path, _exceptionable = true) => (() => {
1243
+ if ("getAnalysisFiles" === input.type)
1244
+ return _vo1(input, _path, true && _exceptionable);
1245
+ else if ("complete" === input.type)
1246
+ return _vo2(input, _path, true && _exceptionable);
1247
+ else
1248
+ return _report(_exceptionable, {
1249
+ path: _path,
1250
+ expected: "(IAutoBePreliminaryGetAnalysisFiles | IAutoBePrismaSchemaApplication.IComplete)",
1251
+ value: input
1252
+ });
1253
+ })(); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
1254
+ if (false === __is(input)) {
1255
+ errors = [];
1256
+ _report = __typia_transform__validateReport._validateReport(errors);
1257
+ ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
1258
+ path: _path + "",
1259
+ expected: "IAutoBePrismaSchemaApplication.IProps",
1260
+ value: input
1261
+ })) && _vo0(input, _path + "", true) || _report(true, {
1262
+ path: _path + "",
1263
+ expected: "IAutoBePrismaSchemaApplication.IProps",
1264
+ value: input
1265
+ }))(input, "$input", true);
1266
+ const success = 0 === errors.length;
1267
+ return success ? {
1268
+ success,
1269
+ data: input
1270
+ } : {
1271
+ success,
1272
+ errors,
1273
+ data: input
1274
+ };
1275
+ }
1276
+ return {
1277
+ success: true,
1278
+ data: input
1279
+ };
1280
+ }; })()
1281
+ }
1282
+ ]
1283
+ };
1284
+ __typia_transform__llmApplicationFinalize._llmApplicationFinalize(application, Object.assign(Object.assign({}, {
1285
+ validate: {
1286
+ process: validate,
1287
+ },
1288
+ }), { equals: false }));
1289
+ return application;
1290
+ })(),
1291
+ claude: (validate) => (() => {
1292
+ const application = {
1293
+ model: "claude",
1294
+ options: {
1295
+ reference: true,
1296
+ separate: null
1297
+ },
1298
+ functions: [
1299
+ {
1300
+ name: "process",
1301
+ parameters: {
1302
+ description: " Request containing either preliminary data request or complete\ntask\n\n------------------------------\n\nCurrent Type: {@link IAutoBePrismaSchemaApplication.IProps}",
1303
+ type: "object",
1304
+ properties: {
1305
+ thinking: {
1306
+ description: "Think before you act.\n\nBefore requesting preliminary data or completing your task, reflect on your\ncurrent state and explain your reasoning:\n\nFor preliminary requests (getAnalysisFiles, getPrismaSchemas, etc.):\n- What critical information is missing that you don't already have?\n- Why do you need it specifically right now?\n- Be brief - state the gap, don't list everything you have.\n\nFor completion (complete):\n- What key assets did you acquire?\n- What did you accomplish?\n- Why is it sufficient to complete?\n- Summarize - don't enumerate every single item.\n\nThis reflection helps you avoid duplicate requests and premature completion.",
1307
+ type: "string"
1308
+ },
1309
+ request: {
1310
+ description: "Type discriminator for the request.\n\nDetermines which action to perform: preliminary data retrieval\n(getAnalysisFiles) or final schema generation (complete). When\npreliminary returns empty array, that type is removed from the union,\nphysically preventing repeated calls.",
1311
+ oneOf: [
1312
+ {
1313
+ $ref: "#/$defs/IAutoBePreliminaryGetAnalysisFiles"
1314
+ },
1315
+ {
1316
+ $ref: "#/$defs/IAutoBePrismaSchemaApplication.IComplete"
1317
+ }
1318
+ ],
1319
+ discriminator: {
1320
+ propertyName: "type",
1321
+ mapping: {
1322
+ getAnalysisFiles: "#/$defs/IAutoBePreliminaryGetAnalysisFiles",
1323
+ complete: "#/$defs/IAutoBePrismaSchemaApplication.IComplete"
1324
+ }
1325
+ }
1326
+ }
1327
+ },
1328
+ required: [
1329
+ "thinking",
1330
+ "request"
1331
+ ],
1332
+ additionalProperties: false,
1333
+ $defs: {
1334
+ IAutoBePreliminaryGetAnalysisFiles: {
1335
+ description: "Request to retrieve requirements analysis files for context.\n\nThis type is used in the preliminary phase to request specific analysis files\nthat provide business requirements and domain context.",
1336
+ type: "object",
1337
+ properties: {
1338
+ type: {
1339
+ description: "Type discriminator for the request.\n\nDetermines which action to perform: preliminary data retrieval or actual\ntask execution. Value \"getAnalysisFiles\" indicates this is a preliminary\ndata request for analysis files.",
1340
+ "const": "getAnalysisFiles"
1341
+ },
1342
+ fileNames: {
1343
+ description: "List of analysis file names to retrieve.\n\nFile names from the analyze phase containing requirements, use cases, and\nbusiness logic documentation.\n\nCRITICAL: DO NOT request the same file names that you have already\nrequested in previous calls.",
1344
+ type: "array",
1345
+ items: {
1346
+ type: "string"
1347
+ },
1348
+ minItems: 1
1349
+ }
1350
+ },
1351
+ required: [
1352
+ "type",
1353
+ "fileNames"
1354
+ ]
1355
+ },
1356
+ "IAutoBePrismaSchemaApplication.IComplete": {
1357
+ description: "Request to generate Prisma schema models.\n\nExecutes schema generation to create production-ready database models\nfollowing normalization principles, relationship patterns, and indexing\nstrategies.",
1358
+ type: "object",
1359
+ properties: {
1360
+ type: {
1361
+ description: "Type discriminator for the request.\n\nDetermines which action to perform: preliminary data retrieval or actual\ntask execution. Value \"complete\" indicates this is the final task\nexecution request.",
1362
+ "const": "complete"
1363
+ },
1364
+ plan: {
1365
+ description: "Strategic database design analysis and planning.\n\nContains the database architecture strategy including table structures,\nrelationships, normalization approach, indexing strategies, and business\nrequirement mapping. This planning phase defines the blueprint for schema\nimplementation.\n\nKey planning aspects:\n\n- Assignment validation: Extract targetComponent.tables as complete\n specification\n- Table count: Must create exactly targetComponent.tables.length models\n- Component references: Identify existing tables for foreign key\n relationships\n- Normalization: Strict adherence to 1NF, 2NF, 3NF principles\n- Snapshot architecture: Design for historical data preservation\n- Junction tables: Plan M:N relationships with proper naming\n ({table1}_{table2})\n- Materialized views: Identify needs for mv_ prefixed denormalized tables",
1366
+ type: "string"
1367
+ },
1368
+ models: {
1369
+ description: "Production-ready Prisma schema models.\n\nComplete AST representation of all database tables for the target\ncomponent. Each model implements the planned structure, relationships,\nindexes, and constraints following best practices.\n\nImplementation requirements:\n\n- Model count: Exactly matches targetComponent.tables.length (plus junction\n tables)\n- Table names: EXACT names from targetComponent.tables - no modifications\n- Primary keys: Always UUID type with field name \"id\"\n- Foreign keys: Proper IRelation configurations for all relationships\n- Business fields: Only raw data fields - no calculated or derived values\n- Data types: Limited to uuid, string, int, double, datetime, boolean, uri\n- Relationships: Correct patterns for 1:1, 1:N, and M:N\n- Indexes:\n\n - UniqueIndexes: Business constraints and composite unique keys\n - PlainIndexes: Multi-column query optimization (never single FK)\n - GinIndexes: Full-text search on appropriate string fields\n- Materialized views: Tables prefixed with \"mv_\" have material flag set\n- Documentation: Comprehensive English descriptions with business context\n\nQuality standards:\n\n- Strict adherence to 3NF (Third Normal Form)\n- No denormalization except in materialized views (mv_ tables)\n- All foreign keys reference valid existing tables\n- Consistent created_at, updated_at, deleted_at patterns\n- Proper historical data preservation where needed\n- Optimized index strategy for expected query patterns",
1370
+ type: "array",
1371
+ items: {
1372
+ $ref: "#/$defs/AutoBePrisma.IModel"
1373
+ },
1374
+ minItems: 1
1375
+ }
1376
+ },
1377
+ required: [
1378
+ "type",
1379
+ "plan",
1380
+ "models"
1381
+ ]
1382
+ },
1383
+ "AutoBePrisma.IModel": {
1384
+ description: "Interface representing a single Prisma model (database table).\n\nBased on the uploaded schemas, models follow specific patterns:\n\n- Main business entities (e.g., shopping_sales, shopping_customers)\n- Snapshot/versioning entities for audit trails (e.g.,\n shopping_sale_snapshots)\n- Junction tables for M:N relationships (e.g.,\n shopping_cart_commodity_stocks)\n- Materialized views for performance (prefixed with mv_)",
1385
+ type: "object",
1386
+ properties: {
1387
+ name: {
1388
+ description: "Name of the Prisma model (database table name).\n\nMUST use snake_case naming convention. Examples: \"shopping_customers\",\n\"shopping_sale_snapshots\", \"bbs_articles\" Materialized views use \"mv_\"\nprefix: \"mv_shopping_sale_last_snapshots\"",
1389
+ type: "string",
1390
+ pattern: "^[a-z][a-z0-9_]*$"
1391
+ },
1392
+ description: {
1393
+ description: "Detailed description explaining the business purpose and usage of the\nmodel.\n\nShould include:\n\n- Business context and purpose\n- Key relationships with other models\n- Important behavioral notes or constraints\n- References to related entities using \"{@\\link ModelName}\" syntax\n\n**IMPORTANT**: Description must be written in English. Example: \"Customer\ninformation, but not a person but a **connection** basis...\"",
1394
+ type: "string"
1395
+ },
1396
+ material: {
1397
+ description: "Indicates whether this model represents a materialized view for\nperformance optimization.\n\nMaterialized views are read-only computed tables that cache complex query\nresults. They're marked as \"@\\hidden\" in documentation and prefixed with\n\"mv_\" in naming. Examples: mv_shopping_sale_last_snapshots,\nmv_shopping_cart_commodity_prices",
1398
+ type: "boolean"
1399
+ },
1400
+ stance: {
1401
+ description: "Specifies the architectural stance of this model within the database\nsystem.\n\nThis property defines how the table positions itself in relation to other\ntables and what role it plays in the overall data architecture,\nparticularly for API endpoint generation and business logic\norganization.\n\n## Values:\n\n### `\"primary\"` - Main Business Entity\n\nTables that represent core business concepts and serve as the primary\nsubjects of user operations. These tables typically warrant independent\nCRUD API endpoints since users directly interact with these entities.\n\n**Key principle**: If users need to independently create, search, filter,\nor manage entities regardless of their parent context, the table should\nbe primary stance.\n\n**API Requirements:**\n\n- Independent creation endpoints (POST /articles, POST /comments)\n- Search and filtering capabilities across all instances\n- Direct update and delete operations\n- List/pagination endpoints for browsing\n\n**Why `bbs_article_comments` is primary, not subsidiary:**\n\nAlthough comments belong to articles, they require independent\nmanagement:\n\n- **Search across articles**: \"Find all comments by user X across all\n articles\"\n- **Moderation workflows**: \"List all pending comments for review\"\n- **User activity**: \"Show all comments made by this user\"\n- **Independent operations**: Users edit/delete their comments directly\n- **Notification systems**: \"Alert when any comment is posted\"\n\nIf comments were subsidiary, these operations would be impossible or\nrequire inefficient nested queries through parent articles.\n\n**Characteristics:**\n\n- Represents tangible business concepts that users manage\n- Serves as reference points for other tables\n- Requires comprehensive API operations (CREATE, READ, UPDATE, DELETE)\n- Forms the backbone of the application's business logic\n\n**Examples:**\n\n- `bbs_articles` - Forum posts that users create, edit, and manage\n- `bbs_article_comments` - User comments that require independent\n management\n\n### `\"subsidiary\"` - Supporting/Dependent Entity\n\nTables that exist to support primary entities but are not independently\nmanaged by users. These tables are typically managed through their parent\nentities and may not need standalone API endpoints.\n\n**Characteristics:**\n\n- Depends on primary or snapshot entities for context\n- Often managed indirectly through parent entity operations\n- May have limited or no independent API operations\n- Provides supporting data or relationships\n\n**Examples:**\n\n- `bbs_article_snapshot_files` - Files attached to article snapshots\n- `bbs_article_snapshot_tags` - Tags associated with article snapshots\n- `bbs_article_comment_snapshot_files` - Files attached to comment\n snapshots\n\n### `\"snapshot\"` - Historical/Versioning Entity\n\nTables that capture point-in-time states of primary entities for audit\ntrails, version control, or historical tracking. These tables record\nchanges but are rarely modified directly by users.\n\n**Characteristics:**\n\n- Captures historical states of primary entities\n- Typically append-only (rarely updated or deleted)\n- Referenced for audit trails and change tracking\n- Usually read-only from user perspective\n\n**Examples:**\n\n- `bbs_article_snapshots` - Historical states of articles\n- `bbs_article_comment_snapshots` - Comment modification history\n\n## API Generation Guidelines:\n\nThe stance property guides automatic API endpoint generation:\n\n- **`\"primary\"`** \u2192 Generate full CRUD endpoints based on business\n requirements\n- **`\"subsidiary\"`** \u2192 Evaluate carefully; often managed through parent\n entities\n- **`\"snapshot\"`** \u2192 Typically read-only endpoints for historical data\n access",
1402
+ oneOf: [
1403
+ {
1404
+ "const": "primary"
1405
+ },
1406
+ {
1407
+ "const": "subsidiary"
1408
+ },
1409
+ {
1410
+ "const": "snapshot"
1411
+ }
1412
+ ]
1413
+ },
1414
+ primaryField: {
1415
+ description: "The primary key field of the model.\n\nIn all uploaded schemas, primary keys are always UUID type with \"@\\id\"\ndirective. Usually named \"id\" and marked with \"@\\db.Uuid\" for PostgreSQL\nmapping.",
1416
+ $ref: "#/$defs/AutoBePrisma.IPrimaryField"
1417
+ },
1418
+ foreignFields: {
1419
+ description: "Array of foreign key fields that reference other models.\n\nThese establish relationships between models and include Prisma relation\ndirectives. Can be nullable (optional relationships) or required\n(mandatory relationships). May have unique constraints for 1:1\nrelationships.",
1420
+ type: "array",
1421
+ items: {
1422
+ $ref: "#/$defs/AutoBePrisma.IForeignField"
1423
+ }
1424
+ },
1425
+ plainFields: {
1426
+ description: "Array of regular data fields that don't reference other models.\n\nInclude business data like names, descriptions, timestamps, flags,\namounts, etc. Common patterns: created_at, updated_at, deleted_at for\nsoft deletion and auditing.",
1427
+ type: "array",
1428
+ items: {
1429
+ $ref: "#/$defs/AutoBePrisma.IPlainField"
1430
+ }
1431
+ },
1432
+ uniqueIndexes: {
1433
+ description: "Array of unique indexes for enforcing data integrity constraints.\n\nEnsure uniqueness across single or multiple columns. Examples: unique\nemail addresses, unique codes within a channel, unique combinations like\n(channel_id, nickname).",
1434
+ type: "array",
1435
+ items: {
1436
+ $ref: "#/$defs/AutoBePrisma.IUniqueIndex"
1437
+ }
1438
+ },
1439
+ plainIndexes: {
1440
+ description: "Array of regular indexes for query performance optimization.\n\nSpeed up common query patterns like filtering by foreign keys, date\nranges, or frequently searched fields. Examples: indexes on created_at,\nforeign key fields, search fields.",
1441
+ type: "array",
1442
+ items: {
1443
+ $ref: "#/$defs/AutoBePrisma.IPlainIndex"
1444
+ }
1445
+ },
1446
+ ginIndexes: {
1447
+ description: "Array of GIN (Generalized Inverted Index) indexes for full-text search.\n\nUsed specifically for PostgreSQL text search capabilities using trigram\noperations. Applied to text fields that need fuzzy matching or partial\ntext search. Examples: searching names, nicknames, titles, content\nbodies.",
1448
+ type: "array",
1449
+ items: {
1450
+ $ref: "#/$defs/AutoBePrisma.IGinIndex"
1451
+ }
1452
+ }
1453
+ },
1454
+ required: [
1455
+ "name",
1456
+ "description",
1457
+ "material",
1458
+ "stance",
1459
+ "primaryField",
1460
+ "foreignFields",
1461
+ "plainFields",
1462
+ "uniqueIndexes",
1463
+ "plainIndexes",
1464
+ "ginIndexes"
1465
+ ]
1466
+ },
1467
+ "AutoBePrisma.IPrimaryField": {
1468
+ description: "Interface representing the primary key field of a Prisma model.\n\nAll models in the uploaded schemas use UUID as primary key for better\ndistributed system compatibility and security (no sequential ID exposure).",
1469
+ type: "object",
1470
+ properties: {
1471
+ name: {
1472
+ description: "Name of the primary key field.\n\nMUST use snake_case naming convention. Consistently named \"id\" across all\nmodels in the uploaded schemas. Represents the unique identifier for each\nrecord in the table.",
1473
+ type: "string",
1474
+ pattern: "^[a-z][a-z0-9_]*$"
1475
+ },
1476
+ type: {
1477
+ description: "Data type of the primary key field.\n\nAlways \"uuid\" in the uploaded schemas for better distributed system\nsupport and to avoid exposing sequential IDs that could reveal business\ninformation.",
1478
+ "const": "uuid"
1479
+ },
1480
+ description: {
1481
+ description: "Description of the primary key field's purpose.\n\nStandard description is \"Primary Key.\" across all models. Serves as the\nunique identifier for the model instance.\n\n**IMPORTANT**: Description must be written in English.",
1482
+ type: "string"
1483
+ }
1484
+ },
1485
+ required: [
1486
+ "name",
1487
+ "type",
1488
+ "description"
1489
+ ]
1490
+ },
1491
+ "AutoBePrisma.IForeignField": {
1492
+ description: "Interface representing a foreign key field that establishes relationships\nbetween models.\n\nForeign keys create associations between models, enabling relational data\nmodeling. They can represent 1:1, 1:N, or participate in M:N relationships\nthrough junction tables.",
1493
+ type: "object",
1494
+ properties: {
1495
+ name: {
1496
+ description: "Name of the foreign key field.\n\nMUST use snake_case naming convention. Follows convention:\n\"{target_model_name_without_prefix}_id\" Examples: \"shopping_customer_id\",\n\"bbs_article_id\", \"attachment_file_id\" For self-references: \"parent_id\"\n(e.g., in hierarchical structures)",
1497
+ type: "string",
1498
+ pattern: "^[a-z][a-z0-9_]*$"
1499
+ },
1500
+ type: {
1501
+ description: "Data type of the foreign key field.\n\nAlways \"uuid\" to match the primary key type of referenced models. Ensures\nreferential integrity and consistency across the schema.",
1502
+ "const": "uuid"
1503
+ },
1504
+ description: {
1505
+ description: "Description explaining the purpose and target of this foreign key\nrelationship.\n\nShould reference the target model using format: \"Target model's {@\\link\nModelName.id}\" Examples: \"Belonged customer's {@\\link\nshopping_customers.id}\" May include additional context about the\nrelationship's business meaning.\n\n**IMPORTANT**: Description must be written in English.",
1506
+ type: "string"
1507
+ },
1508
+ relation: {
1509
+ description: "Prisma relation configuration defining the association details.\n\nSpecifies how this foreign key connects to the target model, including\nrelation name, target model, and target field. This configuration is used\nto generate the appropriate Prisma relation directive in the schema.",
1510
+ $ref: "#/$defs/AutoBePrisma.IRelation"
1511
+ },
1512
+ unique: {
1513
+ description: "Whether this foreign key has a unique constraint.\n\nTrue: Creates a 1:1 relationship (e.g., user profile, order publish\ndetails) false: Allows 1:N relationship (e.g., customer to multiple\norders) Used for enforcing business rules about relationship\ncardinality.",
1514
+ type: "boolean"
1515
+ },
1516
+ nullable: {
1517
+ description: "Whether this foreign key can be null (optional relationship).\n\nTrue: Relationship is optional, foreign key can be null false:\nRelationship is required, foreign key cannot be null Reflects business\nrules about mandatory vs optional associations.",
1518
+ type: "boolean"
1519
+ }
1520
+ },
1521
+ required: [
1522
+ "name",
1523
+ "type",
1524
+ "description",
1525
+ "relation",
1526
+ "unique",
1527
+ "nullable"
1528
+ ]
1529
+ },
1530
+ "AutoBePrisma.IRelation": {
1531
+ description: "Interface representing a Prisma relation configuration between models.\n\nThis interface defines how foreign key fields establish relationships with\ntheir target models. It provides the necessary information for Prisma to\ngenerate appropriate relation directives (@relation) in the schema,\nenabling proper relational data modeling and ORM functionality.\n\nThe relation configuration is essential for:\n\n- Generating correct Prisma relation syntax\n- Establishing bidirectional relationships between models\n- Enabling proper type-safe querying through Prisma client\n- Supporting complex relationship patterns (1:1, 1:N, M:N)",
1532
+ type: "object",
1533
+ properties: {
1534
+ name: {
1535
+ description: "Name of the relation property in the Prisma model.\n\nThis becomes the property name used to access the related model instance\nthrough the Prisma client. Should be descriptive and reflect the business\nrelationship being modeled.\n\nExamples:\n\n- \"customer\" for shopping_customer_id field\n- \"channel\" for shopping_channel_id field\n- \"parent\" for parent_id field in hierarchical structures\n- \"snapshot\" for versioning relationships\n- \"article\" for bbs_article_id field\n\nNaming convention: camelCase, descriptive of the relationship's business\nmeaning",
1536
+ type: "string",
1537
+ pattern: "^[a-z][a-zA-Z0-9]*$"
1538
+ },
1539
+ targetModel: {
1540
+ description: "Name of the target model being referenced by this relation.\n\nMust exactly match an existing model name in the schema. This is used by\nPrisma to establish the foreign key constraint and generate the\nappropriate relation mapping.\n\nExamples:\n\n- \"shopping_customers\" for customer relationships\n- \"shopping_channels\" for channel relationships\n- \"bbs_articles\" for article relationships\n- \"attachment_files\" for file attachments\n\nThe target model should exist in the same schema or be accessible through\nthe Prisma schema configuration.",
1541
+ type: "string"
1542
+ }
1543
+ },
1544
+ required: [
1545
+ "name",
1546
+ "targetModel"
1547
+ ]
1548
+ },
1549
+ "AutoBePrisma.IPlainField": {
1550
+ description: "Interface representing a regular data field that stores business\ninformation.\n\nThese fields contain the actual business data like names, amounts,\ntimestamps, flags, descriptions, and other domain-specific information.",
1551
+ type: "object",
1552
+ properties: {
1553
+ name: {
1554
+ description: "Name of the field in the database table.\n\nMUST use snake_case naming convention. Common patterns from uploaded\nschemas:\n\n- Timestamps: created_at, updated_at, deleted_at, opened_at, closed_at\n- Identifiers: code, name, nickname, title\n- Business data: value, quantity, price, volume, balance\n- Flags: primary, required, exclusive, secret, multiplicative",
1555
+ type: "string",
1556
+ pattern: "^[a-z][a-z0-9_]*$"
1557
+ },
1558
+ type: {
1559
+ description: "Data type of the field for Prisma schema generation.\n\nMaps to appropriate Prisma/PostgreSQL types:\n\n- Boolean: Boolean flags and yes/no values\n- Int: Integer numbers, quantities, sequences\n- Double: Decimal numbers, prices, monetary values, percentages\n- String: Text data, names, descriptions, codes\n- Uri: URL/URI fields for links and references\n- Uuid: UUID fields (for non-foreign-key UUIDs)\n- Datetime: Timestamp fields with date and time",
1560
+ oneOf: [
1561
+ {
1562
+ "const": "string"
1563
+ },
1564
+ {
1565
+ "const": "boolean"
1566
+ },
1567
+ {
1568
+ "const": "uuid"
1569
+ },
1570
+ {
1571
+ "const": "uri"
1572
+ },
1573
+ {
1574
+ "const": "int"
1575
+ },
1576
+ {
1577
+ "const": "double"
1578
+ },
1579
+ {
1580
+ "const": "datetime"
1581
+ }
1582
+ ]
1583
+ },
1584
+ description: {
1585
+ description: "Description explaining the business purpose and usage of this field.\n\nShould clearly explain:\n\n- What business concept this field represents\n- Valid values or constraints if applicable\n- How it relates to business processes\n- Any special behavioral notes\n\n**IMPORTANT**: Description must be written in English. Example: \"Amount\nof cash payment.\" or \"Whether the unit is required or not.\"",
1586
+ type: "string"
1587
+ },
1588
+ nullable: {
1589
+ description: "Whether this field can contain null values.\n\nTrue: Field is optional and can be null (e.g., middle name, description)\nfalse: Field is required and cannot be null (e.g., creation timestamp,\nname) Reflects business rules about mandatory vs optional data.",
1590
+ type: "boolean"
1591
+ }
1592
+ },
1593
+ required: [
1594
+ "name",
1595
+ "type",
1596
+ "description",
1597
+ "nullable"
1598
+ ]
1599
+ },
1600
+ "AutoBePrisma.IUniqueIndex": {
1601
+ description: "Interface representing a unique index constraint on one or more fields.\n\nUnique indexes enforce data integrity by ensuring no duplicate values exist\nfor the specified field combination. Essential for business rules that\nrequire uniqueness like email addresses, codes, or composite keys.",
1602
+ type: "object",
1603
+ properties: {
1604
+ fieldNames: {
1605
+ description: "Array of field names that together form the unique constraint.\n\nCan be single field (e.g., [\"email\"]) or composite (e.g., [\"channel_id\",\n\"code\"]). All field names must exist in the model. Order matters for\ncomposite indexes. Examples: [\"code\"], [\"shopping_channel_id\",\n\"nickname\"], [\"email\"]",
1606
+ type: "array",
1607
+ items: {
1608
+ type: "string"
1609
+ },
1610
+ minItems: 1,
1611
+ uniqueItems: true
1612
+ },
1613
+ unique: {
1614
+ description: "Explicit marker indicating this is a unique index.\n\nAlways true to distinguish from regular indexes. Used by code generator\nto emit \"@@unique\" directive in Prisma schema instead of \"@@index\".",
1615
+ "const": true
1616
+ }
1617
+ },
1618
+ required: [
1619
+ "fieldNames",
1620
+ "unique"
1621
+ ]
1622
+ },
1623
+ "AutoBePrisma.IPlainIndex": {
1624
+ description: "Interface representing a regular (non-unique) index for query performance.\n\nRegular indexes speed up database queries by creating optimized data\nstructures for common search patterns. Essential for foreign keys, date\nranges, and frequently filtered fields.",
1625
+ type: "object",
1626
+ properties: {
1627
+ fieldNames: {
1628
+ description: "Array of field names to include in the performance index.\n\nCan be single field (e.g., [\"created_at\"]) or composite (e.g.,\n[\"customer_id\", \"created_at\"]). All field names must exist in the model.\nOrder matters for composite indexes and should match common query\npatterns. Examples: [\"created_at\"], [\"shopping_customer_id\",\n\"created_at\"], [\"ip\"]",
1629
+ type: "array",
1630
+ items: {
1631
+ type: "string"
1632
+ },
1633
+ minItems: 1,
1634
+ uniqueItems: true
1635
+ }
1636
+ },
1637
+ required: [
1638
+ "fieldNames"
1639
+ ]
1640
+ },
1641
+ "AutoBePrisma.IGinIndex": {
1642
+ description: "Interface representing a GIN (Generalized Inverted Index) for full-text\nsearch.\n\nGIN indexes enable advanced PostgreSQL text search capabilities including\nfuzzy matching and partial text search using trigram operations. Essential\nfor user-facing search features on text content.",
1643
+ type: "object",
1644
+ properties: {
1645
+ fieldName: {
1646
+ description: "Name of the text field to index for full-text search capabilities.\n\nMust be a string field in the model that contains searchable text.\nExamples from uploaded schemas: \"nickname\", \"title\", \"body\", \"name\" Used\nwith PostgreSQL gin_trgm_ops for trigram-based fuzzy text search.",
1647
+ type: "string"
1648
+ }
1649
+ },
1650
+ required: [
1651
+ "fieldName"
1652
+ ]
1653
+ }
1654
+ }
1655
+ },
1656
+ description: "Process schema generation task or preliminary data requests.\n\nGenerates Prisma models for the target component following normalization\nprinciples and database design best practices.",
1657
+ validate: (() => { const _io0 = input => "string" === typeof input.thinking && ("object" === typeof input.request && null !== input.request && _iu0(input.request)); const _io1 = input => "getAnalysisFiles" === input.type && (Array.isArray(input.fileNames) && (1 <= input.fileNames.length && input.fileNames.every(elem => "string" === typeof elem))); const _io2 = input => "complete" === input.type && "string" === typeof input.plan && (Array.isArray(input.models) && (1 <= input.models.length && input.models.every(elem => "object" === typeof elem && null !== elem && _io3(elem)))); const _io3 = input => "string" === typeof input.name && RegExp("^[a-z][a-z0-9_]*$").test(input.name) && "string" === typeof input.description && "boolean" === typeof input.material && ("primary" === input.stance || "subsidiary" === input.stance || "snapshot" === input.stance) && ("object" === typeof input.primaryField && null !== input.primaryField && _io4(input.primaryField)) && (Array.isArray(input.foreignFields) && input.foreignFields.every(elem => "object" === typeof elem && null !== elem && _io5(elem))) && (Array.isArray(input.plainFields) && input.plainFields.every(elem => "object" === typeof elem && null !== elem && _io7(elem))) && (Array.isArray(input.uniqueIndexes) && input.uniqueIndexes.every(elem => "object" === typeof elem && null !== elem && _io8(elem))) && (Array.isArray(input.plainIndexes) && input.plainIndexes.every(elem => "object" === typeof elem && null !== elem && _io9(elem))) && (Array.isArray(input.ginIndexes) && input.ginIndexes.every(elem => "object" === typeof elem && null !== elem && _io10(elem))); const _io4 = input => "string" === typeof input.name && RegExp("^[a-z][a-z0-9_]*$").test(input.name) && "uuid" === input.type && "string" === typeof input.description; const _io5 = input => "string" === typeof input.name && RegExp("^[a-z][a-z0-9_]*$").test(input.name) && "uuid" === input.type && "string" === typeof input.description && ("object" === typeof input.relation && null !== input.relation && _io6(input.relation)) && "boolean" === typeof input.unique && "boolean" === typeof input.nullable; const _io6 = input => "string" === typeof input.name && RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name) && "string" === typeof input.targetModel; const _io7 = input => "string" === typeof input.name && RegExp("^[a-z][a-z0-9_]*$").test(input.name) && ("string" === input.type || "boolean" === input.type || "uuid" === input.type || "uri" === input.type || "int" === input.type || "double" === input.type || "datetime" === input.type) && "string" === typeof input.description && "boolean" === typeof input.nullable; const _io8 = input => Array.isArray(input.fieldNames) && (1 <= input.fieldNames.length && __typia_transform__isUniqueItems._isUniqueItems(input.fieldNames) && input.fieldNames.every(elem => "string" === typeof elem)) && true === input.unique; const _io9 = input => Array.isArray(input.fieldNames) && (1 <= input.fieldNames.length && __typia_transform__isUniqueItems._isUniqueItems(input.fieldNames) && input.fieldNames.every(elem => "string" === typeof elem)); const _io10 = input => "string" === typeof input.fieldName; const _iu0 = input => (() => {
1658
+ if ("getAnalysisFiles" === input.type)
1659
+ return _io1(input);
1660
+ else if ("complete" === input.type)
1661
+ return _io2(input);
1662
+ else
1663
+ return false;
1664
+ })(); const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.thinking || _report(_exceptionable, {
1665
+ path: _path + ".thinking",
1666
+ expected: "string",
1667
+ value: input.thinking
1668
+ }), ("object" === typeof input.request && null !== input.request || _report(_exceptionable, {
1669
+ path: _path + ".request",
1670
+ expected: "(IAutoBePreliminaryGetAnalysisFiles | IAutoBePrismaSchemaApplication.IComplete)",
1671
+ value: input.request
1672
+ })) && _vu0(input.request, _path + ".request", true && _exceptionable) || _report(_exceptionable, {
1673
+ path: _path + ".request",
1674
+ expected: "(IAutoBePreliminaryGetAnalysisFiles | IAutoBePrismaSchemaApplication.IComplete)",
1675
+ value: input.request
1676
+ })].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => ["getAnalysisFiles" === input.type || _report(_exceptionable, {
1677
+ path: _path + ".type",
1678
+ expected: "\"getAnalysisFiles\"",
1679
+ value: input.type
1680
+ }), (Array.isArray(input.fileNames) || _report(_exceptionable, {
1681
+ path: _path + ".fileNames",
1682
+ expected: "(Array<string> & MinItems<1>)",
1683
+ value: input.fileNames
1684
+ })) && ((1 <= input.fileNames.length || _report(_exceptionable, {
1685
+ path: _path + ".fileNames",
1686
+ expected: "Array<> & MinItems<1>",
1687
+ value: input.fileNames
1688
+ })) && input.fileNames.map((elem, _index10) => "string" === typeof elem || _report(_exceptionable, {
1689
+ path: _path + ".fileNames[" + _index10 + "]",
1690
+ expected: "string",
1691
+ value: elem
1692
+ })).every(flag => flag)) || _report(_exceptionable, {
1693
+ path: _path + ".fileNames",
1694
+ expected: "(Array<string> & MinItems<1>)",
1695
+ value: input.fileNames
1696
+ })].every(flag => flag); const _vo2 = (input, _path, _exceptionable = true) => ["complete" === input.type || _report(_exceptionable, {
1697
+ path: _path + ".type",
1698
+ expected: "\"complete\"",
1699
+ value: input.type
1700
+ }), "string" === typeof input.plan || _report(_exceptionable, {
1701
+ path: _path + ".plan",
1702
+ expected: "string",
1703
+ value: input.plan
1704
+ }), (Array.isArray(input.models) || _report(_exceptionable, {
1705
+ path: _path + ".models",
1706
+ expected: "(Array<AutoBePrisma.IModel> & MinItems<1>)",
1707
+ value: input.models
1708
+ })) && ((1 <= input.models.length || _report(_exceptionable, {
1709
+ path: _path + ".models",
1710
+ expected: "Array<> & MinItems<1>",
1711
+ value: input.models
1712
+ })) && input.models.map((elem, _index11) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
1713
+ path: _path + ".models[" + _index11 + "]",
1714
+ expected: "AutoBePrisma.IModel",
1715
+ value: elem
1716
+ })) && _vo3(elem, _path + ".models[" + _index11 + "]", true && _exceptionable) || _report(_exceptionable, {
1717
+ path: _path + ".models[" + _index11 + "]",
1718
+ expected: "AutoBePrisma.IModel",
1719
+ value: elem
1720
+ })).every(flag => flag)) || _report(_exceptionable, {
1721
+ path: _path + ".models",
1722
+ expected: "(Array<AutoBePrisma.IModel> & MinItems<1>)",
1723
+ value: input.models
1724
+ })].every(flag => flag); const _vo3 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-z0-9_]*$").test(input.name) || _report(_exceptionable, {
1725
+ path: _path + ".name",
1726
+ expected: "string & SnakeCasePattern",
1727
+ value: input.name
1728
+ })) || _report(_exceptionable, {
1729
+ path: _path + ".name",
1730
+ expected: "(string & SnakeCasePattern)",
1731
+ value: input.name
1732
+ }), "string" === typeof input.description || _report(_exceptionable, {
1733
+ path: _path + ".description",
1734
+ expected: "string",
1735
+ value: input.description
1736
+ }), "boolean" === typeof input.material || _report(_exceptionable, {
1737
+ path: _path + ".material",
1738
+ expected: "boolean",
1739
+ value: input.material
1740
+ }), "primary" === input.stance || "subsidiary" === input.stance || "snapshot" === input.stance || _report(_exceptionable, {
1741
+ path: _path + ".stance",
1742
+ expected: "(\"primary\" | \"snapshot\" | \"subsidiary\")",
1743
+ value: input.stance
1744
+ }), ("object" === typeof input.primaryField && null !== input.primaryField || _report(_exceptionable, {
1745
+ path: _path + ".primaryField",
1746
+ expected: "AutoBePrisma.IPrimaryField",
1747
+ value: input.primaryField
1748
+ })) && _vo4(input.primaryField, _path + ".primaryField", true && _exceptionable) || _report(_exceptionable, {
1749
+ path: _path + ".primaryField",
1750
+ expected: "AutoBePrisma.IPrimaryField",
1751
+ value: input.primaryField
1752
+ }), (Array.isArray(input.foreignFields) || _report(_exceptionable, {
1753
+ path: _path + ".foreignFields",
1754
+ expected: "Array<AutoBePrisma.IForeignField>",
1755
+ value: input.foreignFields
1756
+ })) && input.foreignFields.map((elem, _index12) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
1757
+ path: _path + ".foreignFields[" + _index12 + "]",
1758
+ expected: "AutoBePrisma.IForeignField",
1759
+ value: elem
1760
+ })) && _vo5(elem, _path + ".foreignFields[" + _index12 + "]", true && _exceptionable) || _report(_exceptionable, {
1761
+ path: _path + ".foreignFields[" + _index12 + "]",
1762
+ expected: "AutoBePrisma.IForeignField",
1763
+ value: elem
1764
+ })).every(flag => flag) || _report(_exceptionable, {
1765
+ path: _path + ".foreignFields",
1766
+ expected: "Array<AutoBePrisma.IForeignField>",
1767
+ value: input.foreignFields
1768
+ }), (Array.isArray(input.plainFields) || _report(_exceptionable, {
1769
+ path: _path + ".plainFields",
1770
+ expected: "Array<AutoBePrisma.IPlainField>",
1771
+ value: input.plainFields
1772
+ })) && input.plainFields.map((elem, _index13) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
1773
+ path: _path + ".plainFields[" + _index13 + "]",
1774
+ expected: "AutoBePrisma.IPlainField",
1775
+ value: elem
1776
+ })) && _vo7(elem, _path + ".plainFields[" + _index13 + "]", true && _exceptionable) || _report(_exceptionable, {
1777
+ path: _path + ".plainFields[" + _index13 + "]",
1778
+ expected: "AutoBePrisma.IPlainField",
1779
+ value: elem
1780
+ })).every(flag => flag) || _report(_exceptionable, {
1781
+ path: _path + ".plainFields",
1782
+ expected: "Array<AutoBePrisma.IPlainField>",
1783
+ value: input.plainFields
1784
+ }), (Array.isArray(input.uniqueIndexes) || _report(_exceptionable, {
1785
+ path: _path + ".uniqueIndexes",
1786
+ expected: "Array<AutoBePrisma.IUniqueIndex>",
1787
+ value: input.uniqueIndexes
1788
+ })) && input.uniqueIndexes.map((elem, _index14) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
1789
+ path: _path + ".uniqueIndexes[" + _index14 + "]",
1790
+ expected: "AutoBePrisma.IUniqueIndex",
1791
+ value: elem
1792
+ })) && _vo8(elem, _path + ".uniqueIndexes[" + _index14 + "]", true && _exceptionable) || _report(_exceptionable, {
1793
+ path: _path + ".uniqueIndexes[" + _index14 + "]",
1794
+ expected: "AutoBePrisma.IUniqueIndex",
1795
+ value: elem
1796
+ })).every(flag => flag) || _report(_exceptionable, {
1797
+ path: _path + ".uniqueIndexes",
1798
+ expected: "Array<AutoBePrisma.IUniqueIndex>",
1799
+ value: input.uniqueIndexes
1800
+ }), (Array.isArray(input.plainIndexes) || _report(_exceptionable, {
1801
+ path: _path + ".plainIndexes",
1802
+ expected: "Array<AutoBePrisma.IPlainIndex>",
1803
+ value: input.plainIndexes
1804
+ })) && input.plainIndexes.map((elem, _index15) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
1805
+ path: _path + ".plainIndexes[" + _index15 + "]",
1806
+ expected: "AutoBePrisma.IPlainIndex",
1807
+ value: elem
1808
+ })) && _vo9(elem, _path + ".plainIndexes[" + _index15 + "]", true && _exceptionable) || _report(_exceptionable, {
1809
+ path: _path + ".plainIndexes[" + _index15 + "]",
1810
+ expected: "AutoBePrisma.IPlainIndex",
1811
+ value: elem
1812
+ })).every(flag => flag) || _report(_exceptionable, {
1813
+ path: _path + ".plainIndexes",
1814
+ expected: "Array<AutoBePrisma.IPlainIndex>",
1815
+ value: input.plainIndexes
1816
+ }), (Array.isArray(input.ginIndexes) || _report(_exceptionable, {
1817
+ path: _path + ".ginIndexes",
1818
+ expected: "Array<AutoBePrisma.IGinIndex>",
1819
+ value: input.ginIndexes
1820
+ })) && input.ginIndexes.map((elem, _index16) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
1821
+ path: _path + ".ginIndexes[" + _index16 + "]",
1822
+ expected: "AutoBePrisma.IGinIndex",
1823
+ value: elem
1824
+ })) && _vo10(elem, _path + ".ginIndexes[" + _index16 + "]", true && _exceptionable) || _report(_exceptionable, {
1825
+ path: _path + ".ginIndexes[" + _index16 + "]",
1826
+ expected: "AutoBePrisma.IGinIndex",
1827
+ value: elem
1828
+ })).every(flag => flag) || _report(_exceptionable, {
1829
+ path: _path + ".ginIndexes",
1830
+ expected: "Array<AutoBePrisma.IGinIndex>",
1831
+ value: input.ginIndexes
1832
+ })].every(flag => flag); const _vo4 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-z0-9_]*$").test(input.name) || _report(_exceptionable, {
1833
+ path: _path + ".name",
1834
+ expected: "string & SnakeCasePattern",
1835
+ value: input.name
1836
+ })) || _report(_exceptionable, {
1837
+ path: _path + ".name",
1838
+ expected: "(string & SnakeCasePattern)",
1839
+ value: input.name
1840
+ }), "uuid" === input.type || _report(_exceptionable, {
1841
+ path: _path + ".type",
1842
+ expected: "\"uuid\"",
1843
+ value: input.type
1844
+ }), "string" === typeof input.description || _report(_exceptionable, {
1845
+ path: _path + ".description",
1846
+ expected: "string",
1847
+ value: input.description
1848
+ })].every(flag => flag); const _vo5 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-z0-9_]*$").test(input.name) || _report(_exceptionable, {
1849
+ path: _path + ".name",
1850
+ expected: "string & SnakeCasePattern",
1851
+ value: input.name
1852
+ })) || _report(_exceptionable, {
1853
+ path: _path + ".name",
1854
+ expected: "(string & SnakeCasePattern)",
1855
+ value: input.name
1856
+ }), "uuid" === input.type || _report(_exceptionable, {
1857
+ path: _path + ".type",
1858
+ expected: "\"uuid\"",
1859
+ value: input.type
1860
+ }), "string" === typeof input.description || _report(_exceptionable, {
1861
+ path: _path + ".description",
1862
+ expected: "string",
1863
+ value: input.description
1864
+ }), ("object" === typeof input.relation && null !== input.relation || _report(_exceptionable, {
1865
+ path: _path + ".relation",
1866
+ expected: "AutoBePrisma.IRelation",
1867
+ value: input.relation
1868
+ })) && _vo6(input.relation, _path + ".relation", true && _exceptionable) || _report(_exceptionable, {
1869
+ path: _path + ".relation",
1870
+ expected: "AutoBePrisma.IRelation",
1871
+ value: input.relation
1872
+ }), "boolean" === typeof input.unique || _report(_exceptionable, {
1873
+ path: _path + ".unique",
1874
+ expected: "boolean",
1875
+ value: input.unique
1876
+ }), "boolean" === typeof input.nullable || _report(_exceptionable, {
1877
+ path: _path + ".nullable",
1878
+ expected: "boolean",
1879
+ value: input.nullable
1880
+ })].every(flag => flag); const _vo6 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name) || _report(_exceptionable, {
1881
+ path: _path + ".name",
1882
+ expected: "string & CamelCasePattern",
1883
+ value: input.name
1884
+ })) || _report(_exceptionable, {
1885
+ path: _path + ".name",
1886
+ expected: "(string & CamelCasePattern)",
1887
+ value: input.name
1888
+ }), "string" === typeof input.targetModel || _report(_exceptionable, {
1889
+ path: _path + ".targetModel",
1890
+ expected: "string",
1891
+ value: input.targetModel
1892
+ })].every(flag => flag); const _vo7 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-z0-9_]*$").test(input.name) || _report(_exceptionable, {
1893
+ path: _path + ".name",
1894
+ expected: "string & SnakeCasePattern",
1895
+ value: input.name
1896
+ })) || _report(_exceptionable, {
1897
+ path: _path + ".name",
1898
+ expected: "(string & SnakeCasePattern)",
1899
+ value: input.name
1900
+ }), "string" === input.type || "boolean" === input.type || "uuid" === input.type || "uri" === input.type || "int" === input.type || "double" === input.type || "datetime" === input.type || _report(_exceptionable, {
1901
+ path: _path + ".type",
1902
+ expected: "(\"boolean\" | \"datetime\" | \"double\" | \"int\" | \"string\" | \"uri\" | \"uuid\")",
1903
+ value: input.type
1904
+ }), "string" === typeof input.description || _report(_exceptionable, {
1905
+ path: _path + ".description",
1906
+ expected: "string",
1907
+ value: input.description
1908
+ }), "boolean" === typeof input.nullable || _report(_exceptionable, {
1909
+ path: _path + ".nullable",
1910
+ expected: "boolean",
1911
+ value: input.nullable
1912
+ })].every(flag => flag); const _vo8 = (input, _path, _exceptionable = true) => [(Array.isArray(input.fieldNames) || _report(_exceptionable, {
1913
+ path: _path + ".fieldNames",
1914
+ expected: "(Array<string> & MinItems<1> & UniqueItems<true>)",
1915
+ value: input.fieldNames
1916
+ })) && ((1 <= input.fieldNames.length || _report(_exceptionable, {
1917
+ path: _path + ".fieldNames",
1918
+ expected: "Array<> & MinItems<1>",
1919
+ value: input.fieldNames
1920
+ })) && (__typia_transform__isUniqueItems._isUniqueItems(input.fieldNames) || _report(_exceptionable, {
1921
+ path: _path + ".fieldNames",
1922
+ expected: "Array<> & UniqueItems<true>",
1923
+ value: input.fieldNames
1924
+ })) && input.fieldNames.map((elem, _index17) => "string" === typeof elem || _report(_exceptionable, {
1925
+ path: _path + ".fieldNames[" + _index17 + "]",
1926
+ expected: "string",
1927
+ value: elem
1928
+ })).every(flag => flag)) || _report(_exceptionable, {
1929
+ path: _path + ".fieldNames",
1930
+ expected: "(Array<string> & MinItems<1> & UniqueItems<true>)",
1931
+ value: input.fieldNames
1932
+ }), true === input.unique || _report(_exceptionable, {
1933
+ path: _path + ".unique",
1934
+ expected: "true",
1935
+ value: input.unique
1936
+ })].every(flag => flag); const _vo9 = (input, _path, _exceptionable = true) => [(Array.isArray(input.fieldNames) || _report(_exceptionable, {
1937
+ path: _path + ".fieldNames",
1938
+ expected: "(Array<string> & MinItems<1> & UniqueItems<true>)",
1939
+ value: input.fieldNames
1940
+ })) && ((1 <= input.fieldNames.length || _report(_exceptionable, {
1941
+ path: _path + ".fieldNames",
1942
+ expected: "Array<> & MinItems<1>",
1943
+ value: input.fieldNames
1944
+ })) && (__typia_transform__isUniqueItems._isUniqueItems(input.fieldNames) || _report(_exceptionable, {
1945
+ path: _path + ".fieldNames",
1946
+ expected: "Array<> & UniqueItems<true>",
1947
+ value: input.fieldNames
1948
+ })) && input.fieldNames.map((elem, _index18) => "string" === typeof elem || _report(_exceptionable, {
1949
+ path: _path + ".fieldNames[" + _index18 + "]",
1950
+ expected: "string",
1951
+ value: elem
1952
+ })).every(flag => flag)) || _report(_exceptionable, {
1953
+ path: _path + ".fieldNames",
1954
+ expected: "(Array<string> & MinItems<1> & UniqueItems<true>)",
1955
+ value: input.fieldNames
1956
+ })].every(flag => flag); const _vo10 = (input, _path, _exceptionable = true) => ["string" === typeof input.fieldName || _report(_exceptionable, {
1957
+ path: _path + ".fieldName",
1958
+ expected: "string",
1959
+ value: input.fieldName
1960
+ })].every(flag => flag); const _vu0 = (input, _path, _exceptionable = true) => (() => {
1961
+ if ("getAnalysisFiles" === input.type)
1962
+ return _vo1(input, _path, true && _exceptionable);
1963
+ else if ("complete" === input.type)
1964
+ return _vo2(input, _path, true && _exceptionable);
1965
+ else
1966
+ return _report(_exceptionable, {
1967
+ path: _path,
1968
+ expected: "(IAutoBePreliminaryGetAnalysisFiles | IAutoBePrismaSchemaApplication.IComplete)",
1969
+ value: input
1970
+ });
1971
+ })(); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
1972
+ if (false === __is(input)) {
1973
+ errors = [];
1974
+ _report = __typia_transform__validateReport._validateReport(errors);
1975
+ ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
1976
+ path: _path + "",
1977
+ expected: "IAutoBePrismaSchemaApplication.IProps",
1978
+ value: input
1979
+ })) && _vo0(input, _path + "", true) || _report(true, {
1980
+ path: _path + "",
1981
+ expected: "IAutoBePrismaSchemaApplication.IProps",
1982
+ value: input
1983
+ }))(input, "$input", true);
1984
+ const success = 0 === errors.length;
1985
+ return success ? {
1986
+ success,
1987
+ data: input
1988
+ } : {
1989
+ success,
1990
+ errors,
1991
+ data: input
1992
+ };
1993
+ }
1994
+ return {
1995
+ success: true,
1996
+ data: input
1997
+ };
1998
+ }; })()
1999
+ }
2000
+ ]
2001
+ };
2002
+ __typia_transform__llmApplicationFinalize._llmApplicationFinalize(application, Object.assign(Object.assign({}, {
2003
+ validate: {
2004
+ process: validate,
2005
+ },
2006
+ }), { equals: false }));
2007
+ return application;
2008
+ })(),
2009
+ gemini: (validate) => (() => {
2010
+ const application = {
2011
+ model: "gemini",
2012
+ options: {
2013
+ reference: true,
2014
+ separate: null
2015
+ },
2016
+ functions: [
2017
+ {
2018
+ name: "process",
2019
+ parameters: {
2020
+ description: " Request containing either preliminary data request or complete\ntask\n\n------------------------------\n\nCurrent Type: {@link IAutoBePrismaSchemaApplication.IProps}",
2021
+ type: "object",
2022
+ properties: {
2023
+ thinking: {
2024
+ description: "Think before you act.\n\nBefore requesting preliminary data or completing your task, reflect on your\ncurrent state and explain your reasoning:\n\nFor preliminary requests (getAnalysisFiles, getPrismaSchemas, etc.):\n- What critical information is missing that you don't already have?\n- Why do you need it specifically right now?\n- Be brief - state the gap, don't list everything you have.\n\nFor completion (complete):\n- What key assets did you acquire?\n- What did you accomplish?\n- Why is it sufficient to complete?\n- Summarize - don't enumerate every single item.\n\nThis reflection helps you avoid duplicate requests and premature completion.",
2025
+ type: "string"
2026
+ },
2027
+ request: {
2028
+ description: "Type discriminator for the request.\n\nDetermines which action to perform: preliminary data retrieval\n(getAnalysisFiles) or final schema generation (complete). When\npreliminary returns empty array, that type is removed from the union,\nphysically preventing repeated calls.",
2029
+ anyOf: [
2030
+ {
2031
+ $ref: "#/$defs/IAutoBePreliminaryGetAnalysisFiles"
2032
+ },
2033
+ {
2034
+ $ref: "#/$defs/IAutoBePrismaSchemaApplication.IComplete"
2035
+ }
2036
+ ],
2037
+ "x-discriminator": {
2038
+ propertyName: "type",
2039
+ mapping: {
2040
+ getAnalysisFiles: "#/$defs/IAutoBePreliminaryGetAnalysisFiles",
2041
+ complete: "#/$defs/IAutoBePrismaSchemaApplication.IComplete"
2042
+ }
2043
+ }
2044
+ }
2045
+ },
2046
+ required: [
2047
+ "thinking",
2048
+ "request"
2049
+ ],
2050
+ additionalProperties: false,
2051
+ $defs: {
2052
+ IAutoBePreliminaryGetAnalysisFiles: {
2053
+ description: "Request to retrieve requirements analysis files for context.\n\nThis type is used in the preliminary phase to request specific analysis files\nthat provide business requirements and domain context.",
2054
+ type: "object",
2055
+ properties: {
2056
+ type: {
2057
+ description: "Type discriminator for the request.\n\nDetermines which action to perform: preliminary data retrieval or actual\ntask execution. Value \"getAnalysisFiles\" indicates this is a preliminary\ndata request for analysis files.",
2058
+ type: "string",
2059
+ "enum": [
2060
+ "getAnalysisFiles"
2061
+ ]
2062
+ },
2063
+ fileNames: {
2064
+ description: "List of analysis file names to retrieve.\n\nFile names from the analyze phase containing requirements, use cases, and\nbusiness logic documentation.\n\nCRITICAL: DO NOT request the same file names that you have already\nrequested in previous calls.",
2065
+ type: "array",
2066
+ items: {
2067
+ type: "string"
2068
+ },
2069
+ minItems: 1
2070
+ }
2071
+ },
2072
+ required: [
2073
+ "type",
2074
+ "fileNames"
2075
+ ]
2076
+ },
2077
+ "IAutoBePrismaSchemaApplication.IComplete": {
2078
+ description: "Request to generate Prisma schema models.\n\nExecutes schema generation to create production-ready database models\nfollowing normalization principles, relationship patterns, and indexing\nstrategies.",
2079
+ type: "object",
2080
+ properties: {
2081
+ type: {
2082
+ description: "Type discriminator for the request.\n\nDetermines which action to perform: preliminary data retrieval or actual\ntask execution. Value \"complete\" indicates this is the final task\nexecution request.",
2083
+ type: "string",
2084
+ "enum": [
2085
+ "complete"
2086
+ ]
2087
+ },
2088
+ plan: {
2089
+ description: "Strategic database design analysis and planning.\n\nContains the database architecture strategy including table structures,\nrelationships, normalization approach, indexing strategies, and business\nrequirement mapping. This planning phase defines the blueprint for schema\nimplementation.\n\nKey planning aspects:\n\n- Assignment validation: Extract targetComponent.tables as complete\n specification\n- Table count: Must create exactly targetComponent.tables.length models\n- Component references: Identify existing tables for foreign key\n relationships\n- Normalization: Strict adherence to 1NF, 2NF, 3NF principles\n- Snapshot architecture: Design for historical data preservation\n- Junction tables: Plan M:N relationships with proper naming\n ({table1}_{table2})\n- Materialized views: Identify needs for mv_ prefixed denormalized tables",
2090
+ type: "string"
2091
+ },
2092
+ models: {
2093
+ description: "Production-ready Prisma schema models.\n\nComplete AST representation of all database tables for the target\ncomponent. Each model implements the planned structure, relationships,\nindexes, and constraints following best practices.\n\nImplementation requirements:\n\n- Model count: Exactly matches targetComponent.tables.length (plus junction\n tables)\n- Table names: EXACT names from targetComponent.tables - no modifications\n- Primary keys: Always UUID type with field name \"id\"\n- Foreign keys: Proper IRelation configurations for all relationships\n- Business fields: Only raw data fields - no calculated or derived values\n- Data types: Limited to uuid, string, int, double, datetime, boolean, uri\n- Relationships: Correct patterns for 1:1, 1:N, and M:N\n- Indexes:\n\n - UniqueIndexes: Business constraints and composite unique keys\n - PlainIndexes: Multi-column query optimization (never single FK)\n - GinIndexes: Full-text search on appropriate string fields\n- Materialized views: Tables prefixed with \"mv_\" have material flag set\n- Documentation: Comprehensive English descriptions with business context\n\nQuality standards:\n\n- Strict adherence to 3NF (Third Normal Form)\n- No denormalization except in materialized views (mv_ tables)\n- All foreign keys reference valid existing tables\n- Consistent created_at, updated_at, deleted_at patterns\n- Proper historical data preservation where needed\n- Optimized index strategy for expected query patterns",
2094
+ type: "array",
2095
+ items: {
2096
+ $ref: "#/$defs/AutoBePrisma.IModel"
2097
+ },
2098
+ minItems: 1
2099
+ }
2100
+ },
2101
+ required: [
2102
+ "type",
2103
+ "plan",
2104
+ "models"
2105
+ ]
2106
+ },
2107
+ "AutoBePrisma.IModel": {
2108
+ description: "Interface representing a single Prisma model (database table).\n\nBased on the uploaded schemas, models follow specific patterns:\n\n- Main business entities (e.g., shopping_sales, shopping_customers)\n- Snapshot/versioning entities for audit trails (e.g.,\n shopping_sale_snapshots)\n- Junction tables for M:N relationships (e.g.,\n shopping_cart_commodity_stocks)\n- Materialized views for performance (prefixed with mv_)",
2109
+ type: "object",
2110
+ properties: {
2111
+ name: {
2112
+ description: "Name of the Prisma model (database table name).\n\nMUST use snake_case naming convention. Examples: \"shopping_customers\",\n\"shopping_sale_snapshots\", \"bbs_articles\" Materialized views use \"mv_\"\nprefix: \"mv_shopping_sale_last_snapshots\"",
2113
+ type: "string",
2114
+ pattern: "^[a-z][a-z0-9_]*$"
2115
+ },
2116
+ description: {
2117
+ description: "Detailed description explaining the business purpose and usage of the\nmodel.\n\nShould include:\n\n- Business context and purpose\n- Key relationships with other models\n- Important behavioral notes or constraints\n- References to related entities using \"{@\\link ModelName}\" syntax\n\n**IMPORTANT**: Description must be written in English. Example: \"Customer\ninformation, but not a person but a **connection** basis...\"",
2118
+ type: "string"
2119
+ },
2120
+ material: {
2121
+ description: "Indicates whether this model represents a materialized view for\nperformance optimization.\n\nMaterialized views are read-only computed tables that cache complex query\nresults. They're marked as \"@\\hidden\" in documentation and prefixed with\n\"mv_\" in naming. Examples: mv_shopping_sale_last_snapshots,\nmv_shopping_cart_commodity_prices",
2122
+ type: "boolean"
2123
+ },
2124
+ stance: {
2125
+ description: "Specifies the architectural stance of this model within the database\nsystem.\n\nThis property defines how the table positions itself in relation to other\ntables and what role it plays in the overall data architecture,\nparticularly for API endpoint generation and business logic\norganization.\n\n## Values:\n\n### `\"primary\"` - Main Business Entity\n\nTables that represent core business concepts and serve as the primary\nsubjects of user operations. These tables typically warrant independent\nCRUD API endpoints since users directly interact with these entities.\n\n**Key principle**: If users need to independently create, search, filter,\nor manage entities regardless of their parent context, the table should\nbe primary stance.\n\n**API Requirements:**\n\n- Independent creation endpoints (POST /articles, POST /comments)\n- Search and filtering capabilities across all instances\n- Direct update and delete operations\n- List/pagination endpoints for browsing\n\n**Why `bbs_article_comments` is primary, not subsidiary:**\n\nAlthough comments belong to articles, they require independent\nmanagement:\n\n- **Search across articles**: \"Find all comments by user X across all\n articles\"\n- **Moderation workflows**: \"List all pending comments for review\"\n- **User activity**: \"Show all comments made by this user\"\n- **Independent operations**: Users edit/delete their comments directly\n- **Notification systems**: \"Alert when any comment is posted\"\n\nIf comments were subsidiary, these operations would be impossible or\nrequire inefficient nested queries through parent articles.\n\n**Characteristics:**\n\n- Represents tangible business concepts that users manage\n- Serves as reference points for other tables\n- Requires comprehensive API operations (CREATE, READ, UPDATE, DELETE)\n- Forms the backbone of the application's business logic\n\n**Examples:**\n\n- `bbs_articles` - Forum posts that users create, edit, and manage\n- `bbs_article_comments` - User comments that require independent\n management\n\n### `\"subsidiary\"` - Supporting/Dependent Entity\n\nTables that exist to support primary entities but are not independently\nmanaged by users. These tables are typically managed through their parent\nentities and may not need standalone API endpoints.\n\n**Characteristics:**\n\n- Depends on primary or snapshot entities for context\n- Often managed indirectly through parent entity operations\n- May have limited or no independent API operations\n- Provides supporting data or relationships\n\n**Examples:**\n\n- `bbs_article_snapshot_files` - Files attached to article snapshots\n- `bbs_article_snapshot_tags` - Tags associated with article snapshots\n- `bbs_article_comment_snapshot_files` - Files attached to comment\n snapshots\n\n### `\"snapshot\"` - Historical/Versioning Entity\n\nTables that capture point-in-time states of primary entities for audit\ntrails, version control, or historical tracking. These tables record\nchanges but are rarely modified directly by users.\n\n**Characteristics:**\n\n- Captures historical states of primary entities\n- Typically append-only (rarely updated or deleted)\n- Referenced for audit trails and change tracking\n- Usually read-only from user perspective\n\n**Examples:**\n\n- `bbs_article_snapshots` - Historical states of articles\n- `bbs_article_comment_snapshots` - Comment modification history\n\n## API Generation Guidelines:\n\nThe stance property guides automatic API endpoint generation:\n\n- **`\"primary\"`** \u2192 Generate full CRUD endpoints based on business\n requirements\n- **`\"subsidiary\"`** \u2192 Evaluate carefully; often managed through parent\n entities\n- **`\"snapshot\"`** \u2192 Typically read-only endpoints for historical data\n access",
2126
+ type: "string",
2127
+ "enum": [
2128
+ "primary",
2129
+ "subsidiary",
2130
+ "snapshot"
2131
+ ]
2132
+ },
2133
+ primaryField: {
2134
+ description: "The primary key field of the model.\n\nIn all uploaded schemas, primary keys are always UUID type with \"@\\id\"\ndirective. Usually named \"id\" and marked with \"@\\db.Uuid\" for PostgreSQL\nmapping.",
2135
+ $ref: "#/$defs/AutoBePrisma.IPrimaryField"
2136
+ },
2137
+ foreignFields: {
2138
+ description: "Array of foreign key fields that reference other models.\n\nThese establish relationships between models and include Prisma relation\ndirectives. Can be nullable (optional relationships) or required\n(mandatory relationships). May have unique constraints for 1:1\nrelationships.",
2139
+ type: "array",
2140
+ items: {
2141
+ $ref: "#/$defs/AutoBePrisma.IForeignField"
2142
+ }
2143
+ },
2144
+ plainFields: {
2145
+ description: "Array of regular data fields that don't reference other models.\n\nInclude business data like names, descriptions, timestamps, flags,\namounts, etc. Common patterns: created_at, updated_at, deleted_at for\nsoft deletion and auditing.",
2146
+ type: "array",
2147
+ items: {
2148
+ $ref: "#/$defs/AutoBePrisma.IPlainField"
2149
+ }
2150
+ },
2151
+ uniqueIndexes: {
2152
+ description: "Array of unique indexes for enforcing data integrity constraints.\n\nEnsure uniqueness across single or multiple columns. Examples: unique\nemail addresses, unique codes within a channel, unique combinations like\n(channel_id, nickname).",
2153
+ type: "array",
2154
+ items: {
2155
+ $ref: "#/$defs/AutoBePrisma.IUniqueIndex"
2156
+ }
2157
+ },
2158
+ plainIndexes: {
2159
+ description: "Array of regular indexes for query performance optimization.\n\nSpeed up common query patterns like filtering by foreign keys, date\nranges, or frequently searched fields. Examples: indexes on created_at,\nforeign key fields, search fields.",
2160
+ type: "array",
2161
+ items: {
2162
+ $ref: "#/$defs/AutoBePrisma.IPlainIndex"
2163
+ }
2164
+ },
2165
+ ginIndexes: {
2166
+ description: "Array of GIN (Generalized Inverted Index) indexes for full-text search.\n\nUsed specifically for PostgreSQL text search capabilities using trigram\noperations. Applied to text fields that need fuzzy matching or partial\ntext search. Examples: searching names, nicknames, titles, content\nbodies.",
2167
+ type: "array",
2168
+ items: {
2169
+ $ref: "#/$defs/AutoBePrisma.IGinIndex"
2170
+ }
2171
+ }
2172
+ },
2173
+ required: [
2174
+ "name",
2175
+ "description",
2176
+ "material",
2177
+ "stance",
2178
+ "primaryField",
2179
+ "foreignFields",
2180
+ "plainFields",
2181
+ "uniqueIndexes",
2182
+ "plainIndexes",
2183
+ "ginIndexes"
2184
+ ]
2185
+ },
2186
+ "AutoBePrisma.IPrimaryField": {
2187
+ description: "Interface representing the primary key field of a Prisma model.\n\nAll models in the uploaded schemas use UUID as primary key for better\ndistributed system compatibility and security (no sequential ID exposure).",
2188
+ type: "object",
2189
+ properties: {
2190
+ name: {
2191
+ description: "Name of the primary key field.\n\nMUST use snake_case naming convention. Consistently named \"id\" across all\nmodels in the uploaded schemas. Represents the unique identifier for each\nrecord in the table.",
2192
+ type: "string",
2193
+ pattern: "^[a-z][a-z0-9_]*$"
2194
+ },
2195
+ type: {
2196
+ description: "Data type of the primary key field.\n\nAlways \"uuid\" in the uploaded schemas for better distributed system\nsupport and to avoid exposing sequential IDs that could reveal business\ninformation.",
2197
+ type: "string",
2198
+ "enum": [
2199
+ "uuid"
2200
+ ]
2201
+ },
2202
+ description: {
2203
+ description: "Description of the primary key field's purpose.\n\nStandard description is \"Primary Key.\" across all models. Serves as the\nunique identifier for the model instance.\n\n**IMPORTANT**: Description must be written in English.",
2204
+ type: "string"
2205
+ }
2206
+ },
2207
+ required: [
2208
+ "name",
2209
+ "type",
2210
+ "description"
2211
+ ]
2212
+ },
2213
+ "AutoBePrisma.IForeignField": {
2214
+ description: "Interface representing a foreign key field that establishes relationships\nbetween models.\n\nForeign keys create associations between models, enabling relational data\nmodeling. They can represent 1:1, 1:N, or participate in M:N relationships\nthrough junction tables.",
2215
+ type: "object",
2216
+ properties: {
2217
+ name: {
2218
+ description: "Name of the foreign key field.\n\nMUST use snake_case naming convention. Follows convention:\n\"{target_model_name_without_prefix}_id\" Examples: \"shopping_customer_id\",\n\"bbs_article_id\", \"attachment_file_id\" For self-references: \"parent_id\"\n(e.g., in hierarchical structures)",
2219
+ type: "string",
2220
+ pattern: "^[a-z][a-z0-9_]*$"
2221
+ },
2222
+ type: {
2223
+ description: "Data type of the foreign key field.\n\nAlways \"uuid\" to match the primary key type of referenced models. Ensures\nreferential integrity and consistency across the schema.",
2224
+ type: "string",
2225
+ "enum": [
2226
+ "uuid"
2227
+ ]
2228
+ },
2229
+ description: {
2230
+ description: "Description explaining the purpose and target of this foreign key\nrelationship.\n\nShould reference the target model using format: \"Target model's {@\\link\nModelName.id}\" Examples: \"Belonged customer's {@\\link\nshopping_customers.id}\" May include additional context about the\nrelationship's business meaning.\n\n**IMPORTANT**: Description must be written in English.",
2231
+ type: "string"
2232
+ },
2233
+ relation: {
2234
+ description: "Prisma relation configuration defining the association details.\n\nSpecifies how this foreign key connects to the target model, including\nrelation name, target model, and target field. This configuration is used\nto generate the appropriate Prisma relation directive in the schema.",
2235
+ $ref: "#/$defs/AutoBePrisma.IRelation"
2236
+ },
2237
+ unique: {
2238
+ description: "Whether this foreign key has a unique constraint.\n\nTrue: Creates a 1:1 relationship (e.g., user profile, order publish\ndetails) false: Allows 1:N relationship (e.g., customer to multiple\norders) Used for enforcing business rules about relationship\ncardinality.",
2239
+ type: "boolean"
2240
+ },
2241
+ nullable: {
2242
+ description: "Whether this foreign key can be null (optional relationship).\n\nTrue: Relationship is optional, foreign key can be null false:\nRelationship is required, foreign key cannot be null Reflects business\nrules about mandatory vs optional associations.",
2243
+ type: "boolean"
2244
+ }
2245
+ },
2246
+ required: [
2247
+ "name",
2248
+ "type",
2249
+ "description",
2250
+ "relation",
2251
+ "unique",
2252
+ "nullable"
2253
+ ]
2254
+ },
2255
+ "AutoBePrisma.IRelation": {
2256
+ description: "Interface representing a Prisma relation configuration between models.\n\nThis interface defines how foreign key fields establish relationships with\ntheir target models. It provides the necessary information for Prisma to\ngenerate appropriate relation directives (@relation) in the schema,\nenabling proper relational data modeling and ORM functionality.\n\nThe relation configuration is essential for:\n\n- Generating correct Prisma relation syntax\n- Establishing bidirectional relationships between models\n- Enabling proper type-safe querying through Prisma client\n- Supporting complex relationship patterns (1:1, 1:N, M:N)",
2257
+ type: "object",
2258
+ properties: {
2259
+ name: {
2260
+ description: "Name of the relation property in the Prisma model.\n\nThis becomes the property name used to access the related model instance\nthrough the Prisma client. Should be descriptive and reflect the business\nrelationship being modeled.\n\nExamples:\n\n- \"customer\" for shopping_customer_id field\n- \"channel\" for shopping_channel_id field\n- \"parent\" for parent_id field in hierarchical structures\n- \"snapshot\" for versioning relationships\n- \"article\" for bbs_article_id field\n\nNaming convention: camelCase, descriptive of the relationship's business\nmeaning",
2261
+ type: "string",
2262
+ pattern: "^[a-z][a-zA-Z0-9]*$"
2263
+ },
2264
+ targetModel: {
2265
+ description: "Name of the target model being referenced by this relation.\n\nMust exactly match an existing model name in the schema. This is used by\nPrisma to establish the foreign key constraint and generate the\nappropriate relation mapping.\n\nExamples:\n\n- \"shopping_customers\" for customer relationships\n- \"shopping_channels\" for channel relationships\n- \"bbs_articles\" for article relationships\n- \"attachment_files\" for file attachments\n\nThe target model should exist in the same schema or be accessible through\nthe Prisma schema configuration.",
2266
+ type: "string"
2267
+ }
2268
+ },
2269
+ required: [
2270
+ "name",
2271
+ "targetModel"
2272
+ ]
2273
+ },
2274
+ "AutoBePrisma.IPlainField": {
2275
+ description: "Interface representing a regular data field that stores business\ninformation.\n\nThese fields contain the actual business data like names, amounts,\ntimestamps, flags, descriptions, and other domain-specific information.",
2276
+ type: "object",
2277
+ properties: {
2278
+ name: {
2279
+ description: "Name of the field in the database table.\n\nMUST use snake_case naming convention. Common patterns from uploaded\nschemas:\n\n- Timestamps: created_at, updated_at, deleted_at, opened_at, closed_at\n- Identifiers: code, name, nickname, title\n- Business data: value, quantity, price, volume, balance\n- Flags: primary, required, exclusive, secret, multiplicative",
2280
+ type: "string",
2281
+ pattern: "^[a-z][a-z0-9_]*$"
2282
+ },
2283
+ type: {
2284
+ description: "Data type of the field for Prisma schema generation.\n\nMaps to appropriate Prisma/PostgreSQL types:\n\n- Boolean: Boolean flags and yes/no values\n- Int: Integer numbers, quantities, sequences\n- Double: Decimal numbers, prices, monetary values, percentages\n- String: Text data, names, descriptions, codes\n- Uri: URL/URI fields for links and references\n- Uuid: UUID fields (for non-foreign-key UUIDs)\n- Datetime: Timestamp fields with date and time",
2285
+ type: "string",
2286
+ "enum": [
2287
+ "string",
2288
+ "boolean",
2289
+ "uuid",
2290
+ "uri",
2291
+ "int",
2292
+ "double",
2293
+ "datetime"
2294
+ ]
2295
+ },
2296
+ description: {
2297
+ description: "Description explaining the business purpose and usage of this field.\n\nShould clearly explain:\n\n- What business concept this field represents\n- Valid values or constraints if applicable\n- How it relates to business processes\n- Any special behavioral notes\n\n**IMPORTANT**: Description must be written in English. Example: \"Amount\nof cash payment.\" or \"Whether the unit is required or not.\"",
2298
+ type: "string"
2299
+ },
2300
+ nullable: {
2301
+ description: "Whether this field can contain null values.\n\nTrue: Field is optional and can be null (e.g., middle name, description)\nfalse: Field is required and cannot be null (e.g., creation timestamp,\nname) Reflects business rules about mandatory vs optional data.",
2302
+ type: "boolean"
2303
+ }
2304
+ },
2305
+ required: [
2306
+ "name",
2307
+ "type",
2308
+ "description",
2309
+ "nullable"
2310
+ ]
2311
+ },
2312
+ "AutoBePrisma.IUniqueIndex": {
2313
+ description: "Interface representing a unique index constraint on one or more fields.\n\nUnique indexes enforce data integrity by ensuring no duplicate values exist\nfor the specified field combination. Essential for business rules that\nrequire uniqueness like email addresses, codes, or composite keys.",
2314
+ type: "object",
2315
+ properties: {
2316
+ fieldNames: {
2317
+ description: "Array of field names that together form the unique constraint.\n\nCan be single field (e.g., [\"email\"]) or composite (e.g., [\"channel_id\",\n\"code\"]). All field names must exist in the model. Order matters for\ncomposite indexes. Examples: [\"code\"], [\"shopping_channel_id\",\n\"nickname\"], [\"email\"]",
2318
+ type: "array",
2319
+ items: {
2320
+ type: "string"
2321
+ },
2322
+ minItems: 1,
2323
+ uniqueItems: true
2324
+ },
2325
+ unique: {
2326
+ description: "Explicit marker indicating this is a unique index.\n\nAlways true to distinguish from regular indexes. Used by code generator\nto emit \"@@unique\" directive in Prisma schema instead of \"@@index\".",
2327
+ type: "boolean",
2328
+ "enum": [
2329
+ true
2330
+ ]
2331
+ }
2332
+ },
2333
+ required: [
2334
+ "fieldNames",
2335
+ "unique"
2336
+ ]
2337
+ },
2338
+ "AutoBePrisma.IPlainIndex": {
2339
+ description: "Interface representing a regular (non-unique) index for query performance.\n\nRegular indexes speed up database queries by creating optimized data\nstructures for common search patterns. Essential for foreign keys, date\nranges, and frequently filtered fields.",
2340
+ type: "object",
2341
+ properties: {
2342
+ fieldNames: {
2343
+ description: "Array of field names to include in the performance index.\n\nCan be single field (e.g., [\"created_at\"]) or composite (e.g.,\n[\"customer_id\", \"created_at\"]). All field names must exist in the model.\nOrder matters for composite indexes and should match common query\npatterns. Examples: [\"created_at\"], [\"shopping_customer_id\",\n\"created_at\"], [\"ip\"]",
2344
+ type: "array",
2345
+ items: {
2346
+ type: "string"
2347
+ },
2348
+ minItems: 1,
2349
+ uniqueItems: true
2350
+ }
2351
+ },
2352
+ required: [
2353
+ "fieldNames"
2354
+ ]
2355
+ },
2356
+ "AutoBePrisma.IGinIndex": {
2357
+ description: "Interface representing a GIN (Generalized Inverted Index) for full-text\nsearch.\n\nGIN indexes enable advanced PostgreSQL text search capabilities including\nfuzzy matching and partial text search using trigram operations. Essential\nfor user-facing search features on text content.",
2358
+ type: "object",
2359
+ properties: {
2360
+ fieldName: {
2361
+ description: "Name of the text field to index for full-text search capabilities.\n\nMust be a string field in the model that contains searchable text.\nExamples from uploaded schemas: \"nickname\", \"title\", \"body\", \"name\" Used\nwith PostgreSQL gin_trgm_ops for trigram-based fuzzy text search.",
2362
+ type: "string"
2363
+ }
2364
+ },
2365
+ required: [
2366
+ "fieldName"
2367
+ ]
2368
+ }
2369
+ }
2370
+ },
2371
+ description: "Process schema generation task or preliminary data requests.\n\nGenerates Prisma models for the target component following normalization\nprinciples and database design best practices.",
2372
+ validate: (() => { const _io0 = input => "string" === typeof input.thinking && ("object" === typeof input.request && null !== input.request && _iu0(input.request)); const _io1 = input => "getAnalysisFiles" === input.type && (Array.isArray(input.fileNames) && (1 <= input.fileNames.length && input.fileNames.every(elem => "string" === typeof elem))); const _io2 = input => "complete" === input.type && "string" === typeof input.plan && (Array.isArray(input.models) && (1 <= input.models.length && input.models.every(elem => "object" === typeof elem && null !== elem && _io3(elem)))); const _io3 = input => "string" === typeof input.name && RegExp("^[a-z][a-z0-9_]*$").test(input.name) && "string" === typeof input.description && "boolean" === typeof input.material && ("primary" === input.stance || "subsidiary" === input.stance || "snapshot" === input.stance) && ("object" === typeof input.primaryField && null !== input.primaryField && _io4(input.primaryField)) && (Array.isArray(input.foreignFields) && input.foreignFields.every(elem => "object" === typeof elem && null !== elem && _io5(elem))) && (Array.isArray(input.plainFields) && input.plainFields.every(elem => "object" === typeof elem && null !== elem && _io7(elem))) && (Array.isArray(input.uniqueIndexes) && input.uniqueIndexes.every(elem => "object" === typeof elem && null !== elem && _io8(elem))) && (Array.isArray(input.plainIndexes) && input.plainIndexes.every(elem => "object" === typeof elem && null !== elem && _io9(elem))) && (Array.isArray(input.ginIndexes) && input.ginIndexes.every(elem => "object" === typeof elem && null !== elem && _io10(elem))); const _io4 = input => "string" === typeof input.name && RegExp("^[a-z][a-z0-9_]*$").test(input.name) && "uuid" === input.type && "string" === typeof input.description; const _io5 = input => "string" === typeof input.name && RegExp("^[a-z][a-z0-9_]*$").test(input.name) && "uuid" === input.type && "string" === typeof input.description && ("object" === typeof input.relation && null !== input.relation && _io6(input.relation)) && "boolean" === typeof input.unique && "boolean" === typeof input.nullable; const _io6 = input => "string" === typeof input.name && RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name) && "string" === typeof input.targetModel; const _io7 = input => "string" === typeof input.name && RegExp("^[a-z][a-z0-9_]*$").test(input.name) && ("string" === input.type || "boolean" === input.type || "uuid" === input.type || "uri" === input.type || "int" === input.type || "double" === input.type || "datetime" === input.type) && "string" === typeof input.description && "boolean" === typeof input.nullable; const _io8 = input => Array.isArray(input.fieldNames) && (1 <= input.fieldNames.length && __typia_transform__isUniqueItems._isUniqueItems(input.fieldNames) && input.fieldNames.every(elem => "string" === typeof elem)) && true === input.unique; const _io9 = input => Array.isArray(input.fieldNames) && (1 <= input.fieldNames.length && __typia_transform__isUniqueItems._isUniqueItems(input.fieldNames) && input.fieldNames.every(elem => "string" === typeof elem)); const _io10 = input => "string" === typeof input.fieldName; const _iu0 = input => (() => {
2373
+ if ("getAnalysisFiles" === input.type)
2374
+ return _io1(input);
2375
+ else if ("complete" === input.type)
2376
+ return _io2(input);
2377
+ else
2378
+ return false;
2379
+ })(); const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.thinking || _report(_exceptionable, {
2380
+ path: _path + ".thinking",
2381
+ expected: "string",
2382
+ value: input.thinking
2383
+ }), ("object" === typeof input.request && null !== input.request || _report(_exceptionable, {
2384
+ path: _path + ".request",
2385
+ expected: "(IAutoBePreliminaryGetAnalysisFiles | IAutoBePrismaSchemaApplication.IComplete)",
2386
+ value: input.request
2387
+ })) && _vu0(input.request, _path + ".request", true && _exceptionable) || _report(_exceptionable, {
2388
+ path: _path + ".request",
2389
+ expected: "(IAutoBePreliminaryGetAnalysisFiles | IAutoBePrismaSchemaApplication.IComplete)",
2390
+ value: input.request
2391
+ })].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => ["getAnalysisFiles" === input.type || _report(_exceptionable, {
2392
+ path: _path + ".type",
2393
+ expected: "\"getAnalysisFiles\"",
2394
+ value: input.type
2395
+ }), (Array.isArray(input.fileNames) || _report(_exceptionable, {
2396
+ path: _path + ".fileNames",
2397
+ expected: "(Array<string> & MinItems<1>)",
2398
+ value: input.fileNames
2399
+ })) && ((1 <= input.fileNames.length || _report(_exceptionable, {
2400
+ path: _path + ".fileNames",
2401
+ expected: "Array<> & MinItems<1>",
2402
+ value: input.fileNames
2403
+ })) && input.fileNames.map((elem, _index10) => "string" === typeof elem || _report(_exceptionable, {
2404
+ path: _path + ".fileNames[" + _index10 + "]",
2405
+ expected: "string",
2406
+ value: elem
2407
+ })).every(flag => flag)) || _report(_exceptionable, {
2408
+ path: _path + ".fileNames",
2409
+ expected: "(Array<string> & MinItems<1>)",
2410
+ value: input.fileNames
2411
+ })].every(flag => flag); const _vo2 = (input, _path, _exceptionable = true) => ["complete" === input.type || _report(_exceptionable, {
2412
+ path: _path + ".type",
2413
+ expected: "\"complete\"",
2414
+ value: input.type
2415
+ }), "string" === typeof input.plan || _report(_exceptionable, {
2416
+ path: _path + ".plan",
2417
+ expected: "string",
2418
+ value: input.plan
2419
+ }), (Array.isArray(input.models) || _report(_exceptionable, {
2420
+ path: _path + ".models",
2421
+ expected: "(Array<AutoBePrisma.IModel> & MinItems<1>)",
2422
+ value: input.models
2423
+ })) && ((1 <= input.models.length || _report(_exceptionable, {
2424
+ path: _path + ".models",
2425
+ expected: "Array<> & MinItems<1>",
2426
+ value: input.models
2427
+ })) && input.models.map((elem, _index11) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
2428
+ path: _path + ".models[" + _index11 + "]",
2429
+ expected: "AutoBePrisma.IModel",
2430
+ value: elem
2431
+ })) && _vo3(elem, _path + ".models[" + _index11 + "]", true && _exceptionable) || _report(_exceptionable, {
2432
+ path: _path + ".models[" + _index11 + "]",
2433
+ expected: "AutoBePrisma.IModel",
2434
+ value: elem
2435
+ })).every(flag => flag)) || _report(_exceptionable, {
2436
+ path: _path + ".models",
2437
+ expected: "(Array<AutoBePrisma.IModel> & MinItems<1>)",
2438
+ value: input.models
2439
+ })].every(flag => flag); const _vo3 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-z0-9_]*$").test(input.name) || _report(_exceptionable, {
2440
+ path: _path + ".name",
2441
+ expected: "string & SnakeCasePattern",
2442
+ value: input.name
2443
+ })) || _report(_exceptionable, {
2444
+ path: _path + ".name",
2445
+ expected: "(string & SnakeCasePattern)",
2446
+ value: input.name
2447
+ }), "string" === typeof input.description || _report(_exceptionable, {
2448
+ path: _path + ".description",
2449
+ expected: "string",
2450
+ value: input.description
2451
+ }), "boolean" === typeof input.material || _report(_exceptionable, {
2452
+ path: _path + ".material",
2453
+ expected: "boolean",
2454
+ value: input.material
2455
+ }), "primary" === input.stance || "subsidiary" === input.stance || "snapshot" === input.stance || _report(_exceptionable, {
2456
+ path: _path + ".stance",
2457
+ expected: "(\"primary\" | \"snapshot\" | \"subsidiary\")",
2458
+ value: input.stance
2459
+ }), ("object" === typeof input.primaryField && null !== input.primaryField || _report(_exceptionable, {
2460
+ path: _path + ".primaryField",
2461
+ expected: "AutoBePrisma.IPrimaryField",
2462
+ value: input.primaryField
2463
+ })) && _vo4(input.primaryField, _path + ".primaryField", true && _exceptionable) || _report(_exceptionable, {
2464
+ path: _path + ".primaryField",
2465
+ expected: "AutoBePrisma.IPrimaryField",
2466
+ value: input.primaryField
2467
+ }), (Array.isArray(input.foreignFields) || _report(_exceptionable, {
2468
+ path: _path + ".foreignFields",
2469
+ expected: "Array<AutoBePrisma.IForeignField>",
2470
+ value: input.foreignFields
2471
+ })) && input.foreignFields.map((elem, _index12) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
2472
+ path: _path + ".foreignFields[" + _index12 + "]",
2473
+ expected: "AutoBePrisma.IForeignField",
2474
+ value: elem
2475
+ })) && _vo5(elem, _path + ".foreignFields[" + _index12 + "]", true && _exceptionable) || _report(_exceptionable, {
2476
+ path: _path + ".foreignFields[" + _index12 + "]",
2477
+ expected: "AutoBePrisma.IForeignField",
2478
+ value: elem
2479
+ })).every(flag => flag) || _report(_exceptionable, {
2480
+ path: _path + ".foreignFields",
2481
+ expected: "Array<AutoBePrisma.IForeignField>",
2482
+ value: input.foreignFields
2483
+ }), (Array.isArray(input.plainFields) || _report(_exceptionable, {
2484
+ path: _path + ".plainFields",
2485
+ expected: "Array<AutoBePrisma.IPlainField>",
2486
+ value: input.plainFields
2487
+ })) && input.plainFields.map((elem, _index13) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
2488
+ path: _path + ".plainFields[" + _index13 + "]",
2489
+ expected: "AutoBePrisma.IPlainField",
2490
+ value: elem
2491
+ })) && _vo7(elem, _path + ".plainFields[" + _index13 + "]", true && _exceptionable) || _report(_exceptionable, {
2492
+ path: _path + ".plainFields[" + _index13 + "]",
2493
+ expected: "AutoBePrisma.IPlainField",
2494
+ value: elem
2495
+ })).every(flag => flag) || _report(_exceptionable, {
2496
+ path: _path + ".plainFields",
2497
+ expected: "Array<AutoBePrisma.IPlainField>",
2498
+ value: input.plainFields
2499
+ }), (Array.isArray(input.uniqueIndexes) || _report(_exceptionable, {
2500
+ path: _path + ".uniqueIndexes",
2501
+ expected: "Array<AutoBePrisma.IUniqueIndex>",
2502
+ value: input.uniqueIndexes
2503
+ })) && input.uniqueIndexes.map((elem, _index14) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
2504
+ path: _path + ".uniqueIndexes[" + _index14 + "]",
2505
+ expected: "AutoBePrisma.IUniqueIndex",
2506
+ value: elem
2507
+ })) && _vo8(elem, _path + ".uniqueIndexes[" + _index14 + "]", true && _exceptionable) || _report(_exceptionable, {
2508
+ path: _path + ".uniqueIndexes[" + _index14 + "]",
2509
+ expected: "AutoBePrisma.IUniqueIndex",
2510
+ value: elem
2511
+ })).every(flag => flag) || _report(_exceptionable, {
2512
+ path: _path + ".uniqueIndexes",
2513
+ expected: "Array<AutoBePrisma.IUniqueIndex>",
2514
+ value: input.uniqueIndexes
2515
+ }), (Array.isArray(input.plainIndexes) || _report(_exceptionable, {
2516
+ path: _path + ".plainIndexes",
2517
+ expected: "Array<AutoBePrisma.IPlainIndex>",
2518
+ value: input.plainIndexes
2519
+ })) && input.plainIndexes.map((elem, _index15) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
2520
+ path: _path + ".plainIndexes[" + _index15 + "]",
2521
+ expected: "AutoBePrisma.IPlainIndex",
2522
+ value: elem
2523
+ })) && _vo9(elem, _path + ".plainIndexes[" + _index15 + "]", true && _exceptionable) || _report(_exceptionable, {
2524
+ path: _path + ".plainIndexes[" + _index15 + "]",
2525
+ expected: "AutoBePrisma.IPlainIndex",
2526
+ value: elem
2527
+ })).every(flag => flag) || _report(_exceptionable, {
2528
+ path: _path + ".plainIndexes",
2529
+ expected: "Array<AutoBePrisma.IPlainIndex>",
2530
+ value: input.plainIndexes
2531
+ }), (Array.isArray(input.ginIndexes) || _report(_exceptionable, {
2532
+ path: _path + ".ginIndexes",
2533
+ expected: "Array<AutoBePrisma.IGinIndex>",
2534
+ value: input.ginIndexes
2535
+ })) && input.ginIndexes.map((elem, _index16) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
2536
+ path: _path + ".ginIndexes[" + _index16 + "]",
2537
+ expected: "AutoBePrisma.IGinIndex",
2538
+ value: elem
2539
+ })) && _vo10(elem, _path + ".ginIndexes[" + _index16 + "]", true && _exceptionable) || _report(_exceptionable, {
2540
+ path: _path + ".ginIndexes[" + _index16 + "]",
2541
+ expected: "AutoBePrisma.IGinIndex",
2542
+ value: elem
2543
+ })).every(flag => flag) || _report(_exceptionable, {
2544
+ path: _path + ".ginIndexes",
2545
+ expected: "Array<AutoBePrisma.IGinIndex>",
2546
+ value: input.ginIndexes
2547
+ })].every(flag => flag); const _vo4 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-z0-9_]*$").test(input.name) || _report(_exceptionable, {
2548
+ path: _path + ".name",
2549
+ expected: "string & SnakeCasePattern",
2550
+ value: input.name
2551
+ })) || _report(_exceptionable, {
2552
+ path: _path + ".name",
2553
+ expected: "(string & SnakeCasePattern)",
2554
+ value: input.name
2555
+ }), "uuid" === input.type || _report(_exceptionable, {
2556
+ path: _path + ".type",
2557
+ expected: "\"uuid\"",
2558
+ value: input.type
2559
+ }), "string" === typeof input.description || _report(_exceptionable, {
2560
+ path: _path + ".description",
2561
+ expected: "string",
2562
+ value: input.description
2563
+ })].every(flag => flag); const _vo5 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-z0-9_]*$").test(input.name) || _report(_exceptionable, {
2564
+ path: _path + ".name",
2565
+ expected: "string & SnakeCasePattern",
2566
+ value: input.name
2567
+ })) || _report(_exceptionable, {
2568
+ path: _path + ".name",
2569
+ expected: "(string & SnakeCasePattern)",
2570
+ value: input.name
2571
+ }), "uuid" === input.type || _report(_exceptionable, {
2572
+ path: _path + ".type",
2573
+ expected: "\"uuid\"",
2574
+ value: input.type
2575
+ }), "string" === typeof input.description || _report(_exceptionable, {
2576
+ path: _path + ".description",
2577
+ expected: "string",
2578
+ value: input.description
2579
+ }), ("object" === typeof input.relation && null !== input.relation || _report(_exceptionable, {
2580
+ path: _path + ".relation",
2581
+ expected: "AutoBePrisma.IRelation",
2582
+ value: input.relation
2583
+ })) && _vo6(input.relation, _path + ".relation", true && _exceptionable) || _report(_exceptionable, {
2584
+ path: _path + ".relation",
2585
+ expected: "AutoBePrisma.IRelation",
2586
+ value: input.relation
2587
+ }), "boolean" === typeof input.unique || _report(_exceptionable, {
2588
+ path: _path + ".unique",
2589
+ expected: "boolean",
2590
+ value: input.unique
2591
+ }), "boolean" === typeof input.nullable || _report(_exceptionable, {
2592
+ path: _path + ".nullable",
2593
+ expected: "boolean",
2594
+ value: input.nullable
2595
+ })].every(flag => flag); const _vo6 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name) || _report(_exceptionable, {
2596
+ path: _path + ".name",
2597
+ expected: "string & CamelCasePattern",
2598
+ value: input.name
2599
+ })) || _report(_exceptionable, {
2600
+ path: _path + ".name",
2601
+ expected: "(string & CamelCasePattern)",
2602
+ value: input.name
2603
+ }), "string" === typeof input.targetModel || _report(_exceptionable, {
2604
+ path: _path + ".targetModel",
2605
+ expected: "string",
2606
+ value: input.targetModel
2607
+ })].every(flag => flag); const _vo7 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-z0-9_]*$").test(input.name) || _report(_exceptionable, {
2608
+ path: _path + ".name",
2609
+ expected: "string & SnakeCasePattern",
2610
+ value: input.name
2611
+ })) || _report(_exceptionable, {
2612
+ path: _path + ".name",
2613
+ expected: "(string & SnakeCasePattern)",
2614
+ value: input.name
2615
+ }), "string" === input.type || "boolean" === input.type || "uuid" === input.type || "uri" === input.type || "int" === input.type || "double" === input.type || "datetime" === input.type || _report(_exceptionable, {
2616
+ path: _path + ".type",
2617
+ expected: "(\"boolean\" | \"datetime\" | \"double\" | \"int\" | \"string\" | \"uri\" | \"uuid\")",
2618
+ value: input.type
2619
+ }), "string" === typeof input.description || _report(_exceptionable, {
2620
+ path: _path + ".description",
2621
+ expected: "string",
2622
+ value: input.description
2623
+ }), "boolean" === typeof input.nullable || _report(_exceptionable, {
2624
+ path: _path + ".nullable",
2625
+ expected: "boolean",
2626
+ value: input.nullable
2627
+ })].every(flag => flag); const _vo8 = (input, _path, _exceptionable = true) => [(Array.isArray(input.fieldNames) || _report(_exceptionable, {
2628
+ path: _path + ".fieldNames",
2629
+ expected: "(Array<string> & MinItems<1> & UniqueItems<true>)",
2630
+ value: input.fieldNames
2631
+ })) && ((1 <= input.fieldNames.length || _report(_exceptionable, {
2632
+ path: _path + ".fieldNames",
2633
+ expected: "Array<> & MinItems<1>",
2634
+ value: input.fieldNames
2635
+ })) && (__typia_transform__isUniqueItems._isUniqueItems(input.fieldNames) || _report(_exceptionable, {
2636
+ path: _path + ".fieldNames",
2637
+ expected: "Array<> & UniqueItems<true>",
2638
+ value: input.fieldNames
2639
+ })) && input.fieldNames.map((elem, _index17) => "string" === typeof elem || _report(_exceptionable, {
2640
+ path: _path + ".fieldNames[" + _index17 + "]",
2641
+ expected: "string",
2642
+ value: elem
2643
+ })).every(flag => flag)) || _report(_exceptionable, {
2644
+ path: _path + ".fieldNames",
2645
+ expected: "(Array<string> & MinItems<1> & UniqueItems<true>)",
2646
+ value: input.fieldNames
2647
+ }), true === input.unique || _report(_exceptionable, {
2648
+ path: _path + ".unique",
2649
+ expected: "true",
2650
+ value: input.unique
2651
+ })].every(flag => flag); const _vo9 = (input, _path, _exceptionable = true) => [(Array.isArray(input.fieldNames) || _report(_exceptionable, {
2652
+ path: _path + ".fieldNames",
2653
+ expected: "(Array<string> & MinItems<1> & UniqueItems<true>)",
2654
+ value: input.fieldNames
2655
+ })) && ((1 <= input.fieldNames.length || _report(_exceptionable, {
2656
+ path: _path + ".fieldNames",
2657
+ expected: "Array<> & MinItems<1>",
2658
+ value: input.fieldNames
2659
+ })) && (__typia_transform__isUniqueItems._isUniqueItems(input.fieldNames) || _report(_exceptionable, {
2660
+ path: _path + ".fieldNames",
2661
+ expected: "Array<> & UniqueItems<true>",
2662
+ value: input.fieldNames
2663
+ })) && input.fieldNames.map((elem, _index18) => "string" === typeof elem || _report(_exceptionable, {
2664
+ path: _path + ".fieldNames[" + _index18 + "]",
2665
+ expected: "string",
2666
+ value: elem
2667
+ })).every(flag => flag)) || _report(_exceptionable, {
2668
+ path: _path + ".fieldNames",
2669
+ expected: "(Array<string> & MinItems<1> & UniqueItems<true>)",
2670
+ value: input.fieldNames
2671
+ })].every(flag => flag); const _vo10 = (input, _path, _exceptionable = true) => ["string" === typeof input.fieldName || _report(_exceptionable, {
2672
+ path: _path + ".fieldName",
2673
+ expected: "string",
2674
+ value: input.fieldName
2675
+ })].every(flag => flag); const _vu0 = (input, _path, _exceptionable = true) => (() => {
2676
+ if ("getAnalysisFiles" === input.type)
2677
+ return _vo1(input, _path, true && _exceptionable);
2678
+ else if ("complete" === input.type)
2679
+ return _vo2(input, _path, true && _exceptionable);
2680
+ else
2681
+ return _report(_exceptionable, {
2682
+ path: _path,
2683
+ expected: "(IAutoBePreliminaryGetAnalysisFiles | IAutoBePrismaSchemaApplication.IComplete)",
2684
+ value: input
2685
+ });
2686
+ })(); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return input => {
2687
+ if (false === __is(input)) {
2688
+ errors = [];
2689
+ _report = __typia_transform__validateReport._validateReport(errors);
2690
+ ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
2691
+ path: _path + "",
2692
+ expected: "IAutoBePrismaSchemaApplication.IProps",
2693
+ value: input
2694
+ })) && _vo0(input, _path + "", true) || _report(true, {
2695
+ path: _path + "",
2696
+ expected: "IAutoBePrismaSchemaApplication.IProps",
2697
+ value: input
2698
+ }))(input, "$input", true);
2699
+ const success = 0 === errors.length;
2700
+ return success ? {
2701
+ success,
2702
+ data: input
2703
+ } : {
2704
+ success,
2705
+ errors,
2706
+ data: input
2707
+ };
2708
+ }
2709
+ return {
2710
+ success: true,
2711
+ data: input
2712
+ };
2713
+ }; })()
2714
+ }
2715
+ ]
2716
+ };
2717
+ __typia_transform__llmApplicationFinalize._llmApplicationFinalize(application, Object.assign(Object.assign({}, {
2718
+ validate: {
2719
+ process: validate,
2720
+ },
2721
+ }), { equals: false }));
2722
+ return application;
2723
+ })(),
2724
+ };
2725
+ const defaultValidate = (() => { const _io0 = input => "string" === typeof input.thinking && ("object" === typeof input.request && null !== input.request && _iu0(input.request)); const _io1 = input => "getAnalysisFiles" === input.type && (Array.isArray(input.fileNames) && (1 <= input.fileNames.length && input.fileNames.every(elem => "string" === typeof elem))); const _io2 = input => "complete" === input.type && "string" === typeof input.plan && (Array.isArray(input.models) && (1 <= input.models.length && input.models.every(elem => "object" === typeof elem && null !== elem && _io3(elem)))); const _io3 = input => "string" === typeof input.name && RegExp("^[a-z][a-z0-9_]*$").test(input.name) && "string" === typeof input.description && "boolean" === typeof input.material && ("primary" === input.stance || "subsidiary" === input.stance || "snapshot" === input.stance) && ("object" === typeof input.primaryField && null !== input.primaryField && _io4(input.primaryField)) && (Array.isArray(input.foreignFields) && input.foreignFields.every(elem => "object" === typeof elem && null !== elem && _io5(elem))) && (Array.isArray(input.plainFields) && input.plainFields.every(elem => "object" === typeof elem && null !== elem && _io7(elem))) && (Array.isArray(input.uniqueIndexes) && input.uniqueIndexes.every(elem => "object" === typeof elem && null !== elem && _io8(elem))) && (Array.isArray(input.plainIndexes) && input.plainIndexes.every(elem => "object" === typeof elem && null !== elem && _io9(elem))) && (Array.isArray(input.ginIndexes) && input.ginIndexes.every(elem => "object" === typeof elem && null !== elem && _io10(elem))); const _io4 = input => "string" === typeof input.name && RegExp("^[a-z][a-z0-9_]*$").test(input.name) && "uuid" === input.type && "string" === typeof input.description; const _io5 = input => "string" === typeof input.name && RegExp("^[a-z][a-z0-9_]*$").test(input.name) && "uuid" === input.type && "string" === typeof input.description && ("object" === typeof input.relation && null !== input.relation && _io6(input.relation)) && "boolean" === typeof input.unique && "boolean" === typeof input.nullable; const _io6 = input => "string" === typeof input.name && RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name) && "string" === typeof input.targetModel; const _io7 = input => "string" === typeof input.name && RegExp("^[a-z][a-z0-9_]*$").test(input.name) && ("string" === input.type || "boolean" === input.type || "uuid" === input.type || "uri" === input.type || "int" === input.type || "double" === input.type || "datetime" === input.type) && "string" === typeof input.description && "boolean" === typeof input.nullable; const _io8 = input => Array.isArray(input.fieldNames) && (1 <= input.fieldNames.length && __typia_transform__isUniqueItems._isUniqueItems(input.fieldNames) && input.fieldNames.every(elem => "string" === typeof elem)) && true === input.unique; const _io9 = input => Array.isArray(input.fieldNames) && (1 <= input.fieldNames.length && __typia_transform__isUniqueItems._isUniqueItems(input.fieldNames) && input.fieldNames.every(elem => "string" === typeof elem)); const _io10 = input => "string" === typeof input.fieldName; const _iu0 = input => (() => {
2726
+ if ("getAnalysisFiles" === input.type)
2727
+ return _io1(input);
2728
+ else if ("complete" === input.type)
2729
+ return _io2(input);
2730
+ else
2731
+ return false;
2732
+ })(); const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.thinking || _report(_exceptionable, {
2733
+ path: _path + ".thinking",
2734
+ expected: "string",
2735
+ value: input.thinking
2736
+ }), ("object" === typeof input.request && null !== input.request || _report(_exceptionable, {
2737
+ path: _path + ".request",
2738
+ expected: "(IAutoBePreliminaryGetAnalysisFiles | IAutoBePrismaSchemaApplication.IComplete)",
2739
+ value: input.request
2740
+ })) && _vu0(input.request, _path + ".request", true && _exceptionable) || _report(_exceptionable, {
2741
+ path: _path + ".request",
2742
+ expected: "(IAutoBePreliminaryGetAnalysisFiles | IAutoBePrismaSchemaApplication.IComplete)",
2743
+ value: input.request
2744
+ })].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => ["getAnalysisFiles" === input.type || _report(_exceptionable, {
2745
+ path: _path + ".type",
2746
+ expected: "\"getAnalysisFiles\"",
2747
+ value: input.type
2748
+ }), (Array.isArray(input.fileNames) || _report(_exceptionable, {
2749
+ path: _path + ".fileNames",
2750
+ expected: "(Array<string> & MinItems<1>)",
2751
+ value: input.fileNames
2752
+ })) && ((1 <= input.fileNames.length || _report(_exceptionable, {
2753
+ path: _path + ".fileNames",
2754
+ expected: "Array<> & MinItems<1>",
2755
+ value: input.fileNames
2756
+ })) && input.fileNames.map((elem, _index10) => "string" === typeof elem || _report(_exceptionable, {
2757
+ path: _path + ".fileNames[" + _index10 + "]",
2758
+ expected: "string",
2759
+ value: elem
2760
+ })).every(flag => flag)) || _report(_exceptionable, {
2761
+ path: _path + ".fileNames",
2762
+ expected: "(Array<string> & MinItems<1>)",
2763
+ value: input.fileNames
2764
+ })].every(flag => flag); const _vo2 = (input, _path, _exceptionable = true) => ["complete" === input.type || _report(_exceptionable, {
2765
+ path: _path + ".type",
2766
+ expected: "\"complete\"",
2767
+ value: input.type
2768
+ }), "string" === typeof input.plan || _report(_exceptionable, {
2769
+ path: _path + ".plan",
2770
+ expected: "string",
2771
+ value: input.plan
2772
+ }), (Array.isArray(input.models) || _report(_exceptionable, {
2773
+ path: _path + ".models",
2774
+ expected: "(Array<AutoBePrisma.IModel> & MinItems<1>)",
2775
+ value: input.models
2776
+ })) && ((1 <= input.models.length || _report(_exceptionable, {
2777
+ path: _path + ".models",
2778
+ expected: "Array<> & MinItems<1>",
2779
+ value: input.models
2780
+ })) && input.models.map((elem, _index11) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
2781
+ path: _path + ".models[" + _index11 + "]",
2782
+ expected: "AutoBePrisma.IModel",
2783
+ value: elem
2784
+ })) && _vo3(elem, _path + ".models[" + _index11 + "]", true && _exceptionable) || _report(_exceptionable, {
2785
+ path: _path + ".models[" + _index11 + "]",
2786
+ expected: "AutoBePrisma.IModel",
2787
+ value: elem
2788
+ })).every(flag => flag)) || _report(_exceptionable, {
2789
+ path: _path + ".models",
2790
+ expected: "(Array<AutoBePrisma.IModel> & MinItems<1>)",
2791
+ value: input.models
2792
+ })].every(flag => flag); const _vo3 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-z0-9_]*$").test(input.name) || _report(_exceptionable, {
2793
+ path: _path + ".name",
2794
+ expected: "string & SnakeCasePattern",
2795
+ value: input.name
2796
+ })) || _report(_exceptionable, {
2797
+ path: _path + ".name",
2798
+ expected: "(string & SnakeCasePattern)",
2799
+ value: input.name
2800
+ }), "string" === typeof input.description || _report(_exceptionable, {
2801
+ path: _path + ".description",
2802
+ expected: "string",
2803
+ value: input.description
2804
+ }), "boolean" === typeof input.material || _report(_exceptionable, {
2805
+ path: _path + ".material",
2806
+ expected: "boolean",
2807
+ value: input.material
2808
+ }), "primary" === input.stance || "subsidiary" === input.stance || "snapshot" === input.stance || _report(_exceptionable, {
2809
+ path: _path + ".stance",
2810
+ expected: "(\"primary\" | \"snapshot\" | \"subsidiary\")",
2811
+ value: input.stance
2812
+ }), ("object" === typeof input.primaryField && null !== input.primaryField || _report(_exceptionable, {
2813
+ path: _path + ".primaryField",
2814
+ expected: "AutoBePrisma.IPrimaryField",
2815
+ value: input.primaryField
2816
+ })) && _vo4(input.primaryField, _path + ".primaryField", true && _exceptionable) || _report(_exceptionable, {
2817
+ path: _path + ".primaryField",
2818
+ expected: "AutoBePrisma.IPrimaryField",
2819
+ value: input.primaryField
2820
+ }), (Array.isArray(input.foreignFields) || _report(_exceptionable, {
2821
+ path: _path + ".foreignFields",
2822
+ expected: "Array<AutoBePrisma.IForeignField>",
2823
+ value: input.foreignFields
2824
+ })) && input.foreignFields.map((elem, _index12) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
2825
+ path: _path + ".foreignFields[" + _index12 + "]",
2826
+ expected: "AutoBePrisma.IForeignField",
2827
+ value: elem
2828
+ })) && _vo5(elem, _path + ".foreignFields[" + _index12 + "]", true && _exceptionable) || _report(_exceptionable, {
2829
+ path: _path + ".foreignFields[" + _index12 + "]",
2830
+ expected: "AutoBePrisma.IForeignField",
2831
+ value: elem
2832
+ })).every(flag => flag) || _report(_exceptionable, {
2833
+ path: _path + ".foreignFields",
2834
+ expected: "Array<AutoBePrisma.IForeignField>",
2835
+ value: input.foreignFields
2836
+ }), (Array.isArray(input.plainFields) || _report(_exceptionable, {
2837
+ path: _path + ".plainFields",
2838
+ expected: "Array<AutoBePrisma.IPlainField>",
2839
+ value: input.plainFields
2840
+ })) && input.plainFields.map((elem, _index13) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
2841
+ path: _path + ".plainFields[" + _index13 + "]",
2842
+ expected: "AutoBePrisma.IPlainField",
2843
+ value: elem
2844
+ })) && _vo7(elem, _path + ".plainFields[" + _index13 + "]", true && _exceptionable) || _report(_exceptionable, {
2845
+ path: _path + ".plainFields[" + _index13 + "]",
2846
+ expected: "AutoBePrisma.IPlainField",
2847
+ value: elem
2848
+ })).every(flag => flag) || _report(_exceptionable, {
2849
+ path: _path + ".plainFields",
2850
+ expected: "Array<AutoBePrisma.IPlainField>",
2851
+ value: input.plainFields
2852
+ }), (Array.isArray(input.uniqueIndexes) || _report(_exceptionable, {
2853
+ path: _path + ".uniqueIndexes",
2854
+ expected: "Array<AutoBePrisma.IUniqueIndex>",
2855
+ value: input.uniqueIndexes
2856
+ })) && input.uniqueIndexes.map((elem, _index14) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
2857
+ path: _path + ".uniqueIndexes[" + _index14 + "]",
2858
+ expected: "AutoBePrisma.IUniqueIndex",
2859
+ value: elem
2860
+ })) && _vo8(elem, _path + ".uniqueIndexes[" + _index14 + "]", true && _exceptionable) || _report(_exceptionable, {
2861
+ path: _path + ".uniqueIndexes[" + _index14 + "]",
2862
+ expected: "AutoBePrisma.IUniqueIndex",
2863
+ value: elem
2864
+ })).every(flag => flag) || _report(_exceptionable, {
2865
+ path: _path + ".uniqueIndexes",
2866
+ expected: "Array<AutoBePrisma.IUniqueIndex>",
2867
+ value: input.uniqueIndexes
2868
+ }), (Array.isArray(input.plainIndexes) || _report(_exceptionable, {
2869
+ path: _path + ".plainIndexes",
2870
+ expected: "Array<AutoBePrisma.IPlainIndex>",
2871
+ value: input.plainIndexes
2872
+ })) && input.plainIndexes.map((elem, _index15) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
2873
+ path: _path + ".plainIndexes[" + _index15 + "]",
2874
+ expected: "AutoBePrisma.IPlainIndex",
2875
+ value: elem
2876
+ })) && _vo9(elem, _path + ".plainIndexes[" + _index15 + "]", true && _exceptionable) || _report(_exceptionable, {
2877
+ path: _path + ".plainIndexes[" + _index15 + "]",
2878
+ expected: "AutoBePrisma.IPlainIndex",
2879
+ value: elem
2880
+ })).every(flag => flag) || _report(_exceptionable, {
2881
+ path: _path + ".plainIndexes",
2882
+ expected: "Array<AutoBePrisma.IPlainIndex>",
2883
+ value: input.plainIndexes
2884
+ }), (Array.isArray(input.ginIndexes) || _report(_exceptionable, {
2885
+ path: _path + ".ginIndexes",
2886
+ expected: "Array<AutoBePrisma.IGinIndex>",
2887
+ value: input.ginIndexes
2888
+ })) && input.ginIndexes.map((elem, _index16) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
2889
+ path: _path + ".ginIndexes[" + _index16 + "]",
2890
+ expected: "AutoBePrisma.IGinIndex",
2891
+ value: elem
2892
+ })) && _vo10(elem, _path + ".ginIndexes[" + _index16 + "]", true && _exceptionable) || _report(_exceptionable, {
2893
+ path: _path + ".ginIndexes[" + _index16 + "]",
2894
+ expected: "AutoBePrisma.IGinIndex",
2895
+ value: elem
2896
+ })).every(flag => flag) || _report(_exceptionable, {
2897
+ path: _path + ".ginIndexes",
2898
+ expected: "Array<AutoBePrisma.IGinIndex>",
2899
+ value: input.ginIndexes
2900
+ })].every(flag => flag); const _vo4 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-z0-9_]*$").test(input.name) || _report(_exceptionable, {
2901
+ path: _path + ".name",
2902
+ expected: "string & SnakeCasePattern",
2903
+ value: input.name
2904
+ })) || _report(_exceptionable, {
2905
+ path: _path + ".name",
2906
+ expected: "(string & SnakeCasePattern)",
2907
+ value: input.name
2908
+ }), "uuid" === input.type || _report(_exceptionable, {
2909
+ path: _path + ".type",
2910
+ expected: "\"uuid\"",
2911
+ value: input.type
2912
+ }), "string" === typeof input.description || _report(_exceptionable, {
2913
+ path: _path + ".description",
2914
+ expected: "string",
2915
+ value: input.description
2916
+ })].every(flag => flag); const _vo5 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-z0-9_]*$").test(input.name) || _report(_exceptionable, {
2917
+ path: _path + ".name",
2918
+ expected: "string & SnakeCasePattern",
2919
+ value: input.name
2920
+ })) || _report(_exceptionable, {
2921
+ path: _path + ".name",
2922
+ expected: "(string & SnakeCasePattern)",
2923
+ value: input.name
2924
+ }), "uuid" === input.type || _report(_exceptionable, {
2925
+ path: _path + ".type",
2926
+ expected: "\"uuid\"",
2927
+ value: input.type
2928
+ }), "string" === typeof input.description || _report(_exceptionable, {
2929
+ path: _path + ".description",
2930
+ expected: "string",
2931
+ value: input.description
2932
+ }), ("object" === typeof input.relation && null !== input.relation || _report(_exceptionable, {
2933
+ path: _path + ".relation",
2934
+ expected: "AutoBePrisma.IRelation",
2935
+ value: input.relation
2936
+ })) && _vo6(input.relation, _path + ".relation", true && _exceptionable) || _report(_exceptionable, {
2937
+ path: _path + ".relation",
2938
+ expected: "AutoBePrisma.IRelation",
2939
+ value: input.relation
2940
+ }), "boolean" === typeof input.unique || _report(_exceptionable, {
2941
+ path: _path + ".unique",
2942
+ expected: "boolean",
2943
+ value: input.unique
2944
+ }), "boolean" === typeof input.nullable || _report(_exceptionable, {
2945
+ path: _path + ".nullable",
2946
+ expected: "boolean",
2947
+ value: input.nullable
2948
+ })].every(flag => flag); const _vo6 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-zA-Z0-9]*$").test(input.name) || _report(_exceptionable, {
2949
+ path: _path + ".name",
2950
+ expected: "string & CamelCasePattern",
2951
+ value: input.name
2952
+ })) || _report(_exceptionable, {
2953
+ path: _path + ".name",
2954
+ expected: "(string & CamelCasePattern)",
2955
+ value: input.name
2956
+ }), "string" === typeof input.targetModel || _report(_exceptionable, {
2957
+ path: _path + ".targetModel",
2958
+ expected: "string",
2959
+ value: input.targetModel
2960
+ })].every(flag => flag); const _vo7 = (input, _path, _exceptionable = true) => ["string" === typeof input.name && (RegExp("^[a-z][a-z0-9_]*$").test(input.name) || _report(_exceptionable, {
2961
+ path: _path + ".name",
2962
+ expected: "string & SnakeCasePattern",
2963
+ value: input.name
2964
+ })) || _report(_exceptionable, {
2965
+ path: _path + ".name",
2966
+ expected: "(string & SnakeCasePattern)",
2967
+ value: input.name
2968
+ }), "string" === input.type || "boolean" === input.type || "uuid" === input.type || "uri" === input.type || "int" === input.type || "double" === input.type || "datetime" === input.type || _report(_exceptionable, {
2969
+ path: _path + ".type",
2970
+ expected: "(\"boolean\" | \"datetime\" | \"double\" | \"int\" | \"string\" | \"uri\" | \"uuid\")",
2971
+ value: input.type
2972
+ }), "string" === typeof input.description || _report(_exceptionable, {
2973
+ path: _path + ".description",
2974
+ expected: "string",
2975
+ value: input.description
2976
+ }), "boolean" === typeof input.nullable || _report(_exceptionable, {
2977
+ path: _path + ".nullable",
2978
+ expected: "boolean",
2979
+ value: input.nullable
2980
+ })].every(flag => flag); const _vo8 = (input, _path, _exceptionable = true) => [(Array.isArray(input.fieldNames) || _report(_exceptionable, {
2981
+ path: _path + ".fieldNames",
2982
+ expected: "(Array<string> & MinItems<1> & UniqueItems<true>)",
2983
+ value: input.fieldNames
2984
+ })) && ((1 <= input.fieldNames.length || _report(_exceptionable, {
2985
+ path: _path + ".fieldNames",
2986
+ expected: "Array<> & MinItems<1>",
2987
+ value: input.fieldNames
2988
+ })) && (__typia_transform__isUniqueItems._isUniqueItems(input.fieldNames) || _report(_exceptionable, {
2989
+ path: _path + ".fieldNames",
2990
+ expected: "Array<> & UniqueItems<true>",
2991
+ value: input.fieldNames
2992
+ })) && input.fieldNames.map((elem, _index17) => "string" === typeof elem || _report(_exceptionable, {
2993
+ path: _path + ".fieldNames[" + _index17 + "]",
2994
+ expected: "string",
2995
+ value: elem
2996
+ })).every(flag => flag)) || _report(_exceptionable, {
2997
+ path: _path + ".fieldNames",
2998
+ expected: "(Array<string> & MinItems<1> & UniqueItems<true>)",
2999
+ value: input.fieldNames
3000
+ }), true === input.unique || _report(_exceptionable, {
3001
+ path: _path + ".unique",
3002
+ expected: "true",
3003
+ value: input.unique
3004
+ })].every(flag => flag); const _vo9 = (input, _path, _exceptionable = true) => [(Array.isArray(input.fieldNames) || _report(_exceptionable, {
3005
+ path: _path + ".fieldNames",
3006
+ expected: "(Array<string> & MinItems<1> & UniqueItems<true>)",
3007
+ value: input.fieldNames
3008
+ })) && ((1 <= input.fieldNames.length || _report(_exceptionable, {
3009
+ path: _path + ".fieldNames",
3010
+ expected: "Array<> & MinItems<1>",
3011
+ value: input.fieldNames
3012
+ })) && (__typia_transform__isUniqueItems._isUniqueItems(input.fieldNames) || _report(_exceptionable, {
3013
+ path: _path + ".fieldNames",
3014
+ expected: "Array<> & UniqueItems<true>",
3015
+ value: input.fieldNames
3016
+ })) && input.fieldNames.map((elem, _index18) => "string" === typeof elem || _report(_exceptionable, {
3017
+ path: _path + ".fieldNames[" + _index18 + "]",
3018
+ expected: "string",
3019
+ value: elem
3020
+ })).every(flag => flag)) || _report(_exceptionable, {
3021
+ path: _path + ".fieldNames",
3022
+ expected: "(Array<string> & MinItems<1> & UniqueItems<true>)",
3023
+ value: input.fieldNames
3024
+ })].every(flag => flag); const _vo10 = (input, _path, _exceptionable = true) => ["string" === typeof input.fieldName || _report(_exceptionable, {
3025
+ path: _path + ".fieldName",
3026
+ expected: "string",
3027
+ value: input.fieldName
3028
+ })].every(flag => flag); const _vu0 = (input, _path, _exceptionable = true) => (() => {
3029
+ if ("getAnalysisFiles" === input.type)
3030
+ return _vo1(input, _path, true && _exceptionable);
3031
+ else if ("complete" === input.type)
3032
+ return _vo2(input, _path, true && _exceptionable);
3033
+ else
3034
+ return _report(_exceptionable, {
3035
+ path: _path,
3036
+ expected: "(IAutoBePreliminaryGetAnalysisFiles | IAutoBePrismaSchemaApplication.IComplete)",
3037
+ value: input
3038
+ });
3039
+ })(); const __is = input => "object" === typeof input && null !== input && _io0(input); let errors; let _report; return __typia_transform__createStandardSchema._createStandardSchema(input => {
3040
+ if (false === __is(input)) {
3041
+ errors = [];
3042
+ _report = __typia_transform__validateReport._validateReport(errors);
3043
+ ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
3044
+ path: _path + "",
3045
+ expected: "IAutoBePrismaSchemaApplication.IProps",
3046
+ value: input
3047
+ })) && _vo0(input, _path + "", true) || _report(true, {
3048
+ path: _path + "",
3049
+ expected: "IAutoBePrismaSchemaApplication.IProps",
3050
+ value: input
3051
+ }))(input, "$input", true);
3052
+ const success = 0 === errors.length;
3053
+ return success ? {
3054
+ success,
3055
+ data: input
3056
+ } : {
3057
+ success,
3058
+ errors,
3059
+ data: input
3060
+ };
3061
+ }
3062
+ return {
3063
+ success: true,
3064
+ data: input
3065
+ };
3066
+ }); })();
3067
+ const SOURCE = "prismaSchema";
3068
+ //# sourceMappingURL=orchestratePrismaSchema.js.map