sonamu 0.6.0 → 0.7.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 (406) hide show
  1. package/.swcrc.project-default +18 -0
  2. package/bin/cli.js +24 -0
  3. package/dist/ai/agents/agent.d.ts +11 -0
  4. package/dist/ai/agents/agent.d.ts.map +1 -0
  5. package/dist/ai/agents/agent.js +65 -0
  6. package/dist/ai/agents/index.d.ts +3 -0
  7. package/dist/ai/agents/index.d.ts.map +1 -0
  8. package/dist/ai/agents/index.js +4 -0
  9. package/dist/ai/agents/types.d.ts +43 -0
  10. package/dist/ai/agents/types.d.ts.map +1 -0
  11. package/dist/ai/agents/types.js +3 -0
  12. package/dist/ai/index.d.ts +2 -0
  13. package/dist/ai/index.d.ts.map +1 -0
  14. package/dist/ai/index.js +3 -0
  15. package/dist/ai/providers/rtzr/api.d.ts +22 -0
  16. package/dist/ai/providers/rtzr/api.d.ts.map +1 -0
  17. package/dist/ai/providers/rtzr/api.js +28 -0
  18. package/dist/ai/providers/rtzr/error.d.ts +18 -0
  19. package/dist/ai/providers/rtzr/error.d.ts.map +1 -0
  20. package/dist/ai/providers/rtzr/error.js +29 -0
  21. package/dist/ai/providers/rtzr/index.d.ts +5 -0
  22. package/dist/ai/providers/rtzr/index.d.ts.map +1 -0
  23. package/dist/ai/providers/rtzr/index.js +6 -0
  24. package/dist/ai/providers/rtzr/model.d.ts +52 -0
  25. package/dist/ai/providers/rtzr/model.d.ts.map +1 -0
  26. package/dist/ai/providers/rtzr/model.js +137 -0
  27. package/dist/ai/providers/rtzr/options.d.ts +7 -0
  28. package/dist/ai/providers/rtzr/options.d.ts.map +1 -0
  29. package/dist/ai/providers/rtzr/options.js +47 -0
  30. package/dist/ai/providers/rtzr/provider.d.ts +18 -0
  31. package/dist/ai/providers/rtzr/provider.d.ts.map +1 -0
  32. package/dist/ai/providers/rtzr/provider.js +54 -0
  33. package/dist/ai/providers/rtzr/utils.d.ts +19 -0
  34. package/dist/ai/providers/rtzr/utils.d.ts.map +1 -0
  35. package/dist/ai/providers/rtzr/utils.js +88 -0
  36. package/dist/api/base-frame.d.ts +2 -2
  37. package/dist/api/base-frame.d.ts.map +1 -1
  38. package/dist/api/base-frame.js +2 -1
  39. package/dist/api/caster.d.ts.map +1 -1
  40. package/dist/api/caster.js +6 -1
  41. package/dist/api/code-converters.d.ts +58 -14
  42. package/dist/api/code-converters.d.ts.map +1 -1
  43. package/dist/api/code-converters.js +178 -409
  44. package/dist/api/config.d.ts +27 -13
  45. package/dist/api/config.d.ts.map +1 -1
  46. package/dist/api/config.js +19 -26
  47. package/dist/api/context.d.ts +4 -3
  48. package/dist/api/context.d.ts.map +1 -1
  49. package/dist/api/context.js +1 -1
  50. package/dist/api/decorators.d.ts +20 -6
  51. package/dist/api/decorators.d.ts.map +1 -1
  52. package/dist/api/decorators.js +111 -18
  53. package/dist/api/index.d.ts +2 -2
  54. package/dist/api/index.d.ts.map +1 -1
  55. package/dist/api/index.js +3 -3
  56. package/dist/api/sonamu.d.ts +7 -7
  57. package/dist/api/sonamu.d.ts.map +1 -1
  58. package/dist/api/sonamu.js +83 -51
  59. package/dist/api/validator.d.ts +6 -0
  60. package/dist/api/validator.d.ts.map +1 -0
  61. package/dist/api/validator.js +81 -0
  62. package/dist/bin/build-config.d.ts +5 -1
  63. package/dist/bin/build-config.d.ts.map +1 -1
  64. package/dist/bin/build-config.js +5 -2
  65. package/dist/bin/cli.js +165 -64
  66. package/dist/bin/loader-register.d.ts +2 -0
  67. package/dist/bin/loader-register.d.ts.map +1 -0
  68. package/dist/bin/loader-register.js +34 -0
  69. package/dist/database/_batch_update.d.ts +5 -3
  70. package/dist/database/_batch_update.d.ts.map +1 -1
  71. package/dist/database/_batch_update.js +30 -13
  72. package/dist/database/base-model.d.ts +96 -10
  73. package/dist/database/base-model.d.ts.map +1 -1
  74. package/dist/database/base-model.js +232 -89
  75. package/dist/database/base-model.types.d.ts +93 -0
  76. package/dist/database/base-model.types.d.ts.map +1 -0
  77. package/dist/database/base-model.types.js +10 -0
  78. package/dist/database/code-generator.d.ts +1 -1
  79. package/dist/database/code-generator.d.ts.map +1 -1
  80. package/dist/database/code-generator.js +11 -10
  81. package/dist/database/db.d.ts +5 -6
  82. package/dist/database/db.d.ts.map +1 -1
  83. package/dist/database/db.js +22 -25
  84. package/dist/database/puri-subset.test-d.js +81 -0
  85. package/dist/database/puri-subset.types.d.ts +123 -0
  86. package/dist/database/puri-subset.types.d.ts.map +1 -0
  87. package/dist/database/puri-subset.types.js +16 -0
  88. package/dist/database/puri-wrapper.d.ts +13 -11
  89. package/dist/database/puri-wrapper.d.ts.map +1 -1
  90. package/dist/database/puri-wrapper.js +2 -2
  91. package/dist/database/puri.d.ts +25 -14
  92. package/dist/database/puri.d.ts.map +1 -1
  93. package/dist/database/puri.js +83 -21
  94. package/dist/database/puri.types.d.ts +21 -7
  95. package/dist/database/puri.types.d.ts.map +1 -1
  96. package/dist/database/puri.types.js +4 -1
  97. package/dist/database/transaction-context.d.ts +1 -1
  98. package/dist/database/transaction-context.d.ts.map +1 -1
  99. package/dist/database/transaction-context.js +1 -1
  100. package/dist/database/upsert-builder.d.ts +9 -3
  101. package/dist/database/upsert-builder.d.ts.map +1 -1
  102. package/dist/database/upsert-builder.js +228 -78
  103. package/dist/entity/entity-manager.d.ts +165 -2
  104. package/dist/entity/entity-manager.d.ts.map +1 -1
  105. package/dist/entity/entity-manager.js +26 -10
  106. package/dist/entity/entity.d.ts +5 -3
  107. package/dist/entity/entity.d.ts.map +1 -1
  108. package/dist/entity/entity.js +153 -54
  109. package/dist/exceptions/error-handler.d.ts +1 -1
  110. package/dist/exceptions/error-handler.d.ts.map +1 -1
  111. package/dist/exceptions/error-handler.js +1 -1
  112. package/dist/exceptions/so-exceptions.d.ts +1 -1
  113. package/dist/exceptions/so-exceptions.d.ts.map +1 -1
  114. package/dist/exceptions/so-exceptions.js +1 -1
  115. package/dist/file-storage/driver.d.ts +1 -1
  116. package/dist/file-storage/driver.d.ts.map +1 -1
  117. package/dist/file-storage/driver.js +1 -1
  118. package/dist/file-storage/file-storage.js +2 -2
  119. package/dist/index.d.ts +18 -11
  120. package/dist/index.d.ts.map +1 -1
  121. package/dist/index.js +19 -13
  122. package/dist/migration/code-generation.d.ts +1 -1
  123. package/dist/migration/code-generation.d.ts.map +1 -1
  124. package/dist/migration/code-generation.js +123 -67
  125. package/dist/migration/migration-set.d.ts +2 -10
  126. package/dist/migration/migration-set.d.ts.map +1 -1
  127. package/dist/migration/migration-set.js +67 -218
  128. package/dist/migration/migrator.d.ts +24 -73
  129. package/dist/migration/migrator.d.ts.map +1 -1
  130. package/dist/migration/migrator.js +121 -301
  131. package/dist/migration/postgresql-schema-reader.d.ts +51 -0
  132. package/dist/migration/postgresql-schema-reader.d.ts.map +1 -0
  133. package/dist/migration/postgresql-schema-reader.js +245 -0
  134. package/dist/migration/types.d.ts +6 -38
  135. package/dist/migration/types.d.ts.map +1 -1
  136. package/dist/migration/types.js +1 -1
  137. package/dist/naite/messaging-types.d.ts +43 -0
  138. package/dist/naite/messaging-types.d.ts.map +1 -0
  139. package/dist/naite/messaging-types.js +7 -0
  140. package/dist/naite/naite-reporter.d.ts +41 -0
  141. package/dist/naite/naite-reporter.d.ts.map +1 -0
  142. package/dist/naite/naite-reporter.js +102 -0
  143. package/dist/naite/naite.d.ts +91 -8
  144. package/dist/naite/naite.d.ts.map +1 -1
  145. package/dist/naite/naite.js +285 -41
  146. package/dist/stream/sse.d.ts +2 -2
  147. package/dist/stream/sse.d.ts.map +1 -1
  148. package/dist/stream/sse.js +1 -1
  149. package/dist/syncer/api-parser.d.ts +3 -13
  150. package/dist/syncer/api-parser.d.ts.map +1 -1
  151. package/dist/syncer/api-parser.js +67 -56
  152. package/dist/syncer/checksum.d.ts +2 -2
  153. package/dist/syncer/checksum.d.ts.map +1 -1
  154. package/dist/syncer/checksum.js +11 -11
  155. package/dist/syncer/code-generator.d.ts +3 -3
  156. package/dist/syncer/code-generator.d.ts.map +1 -1
  157. package/dist/syncer/code-generator.js +37 -17
  158. package/dist/syncer/entity-operations.d.ts +2 -2
  159. package/dist/syncer/entity-operations.d.ts.map +1 -1
  160. package/dist/syncer/entity-operations.js +9 -8
  161. package/dist/syncer/file-patterns.d.ts +1 -1
  162. package/dist/syncer/file-patterns.d.ts.map +1 -1
  163. package/dist/syncer/file-patterns.js +1 -1
  164. package/dist/syncer/index.d.ts +4 -4
  165. package/dist/syncer/index.d.ts.map +1 -1
  166. package/dist/syncer/index.js +5 -5
  167. package/dist/syncer/module-loader.d.ts +4 -4
  168. package/dist/syncer/module-loader.d.ts.map +1 -1
  169. package/dist/syncer/module-loader.js +17 -12
  170. package/dist/syncer/syncer.d.ts +31 -24
  171. package/dist/syncer/syncer.d.ts.map +1 -1
  172. package/dist/syncer/syncer.js +92 -45
  173. package/dist/template/entity-converter.d.ts +1 -1
  174. package/dist/template/entity-converter.d.ts.map +1 -1
  175. package/dist/template/entity-converter.js +15 -8
  176. package/dist/template/helpers.d.ts +2 -2
  177. package/dist/template/helpers.d.ts.map +1 -1
  178. package/dist/template/helpers.js +3 -3
  179. package/dist/template/implementations/entity.template.d.ts +2 -2
  180. package/dist/template/implementations/entity.template.d.ts.map +1 -1
  181. package/dist/template/implementations/entity.template.js +4 -5
  182. package/dist/template/implementations/generated.template.d.ts +2 -3
  183. package/dist/template/implementations/generated.template.d.ts.map +1 -1
  184. package/dist/template/implementations/generated.template.js +46 -29
  185. package/dist/template/implementations/generated_http.template.d.ts +2 -3
  186. package/dist/template/implementations/generated_http.template.d.ts.map +1 -1
  187. package/dist/template/implementations/generated_http.template.js +9 -9
  188. package/dist/template/implementations/generated_sso.template.d.ts +3 -4
  189. package/dist/template/implementations/generated_sso.template.d.ts.map +1 -1
  190. package/dist/template/implementations/generated_sso.template.js +54 -25
  191. package/dist/template/implementations/init_types.template.d.ts +2 -2
  192. package/dist/template/implementations/init_types.template.d.ts.map +1 -1
  193. package/dist/template/implementations/init_types.template.js +2 -2
  194. package/dist/template/implementations/model.template.d.ts +2 -2
  195. package/dist/template/implementations/model.template.d.ts.map +1 -1
  196. package/dist/template/implementations/model.template.js +47 -37
  197. package/dist/template/implementations/model_test.template.d.ts +2 -2
  198. package/dist/template/implementations/model_test.template.d.ts.map +1 -1
  199. package/dist/template/implementations/model_test.template.js +2 -2
  200. package/dist/template/implementations/service.template.d.ts +4 -4
  201. package/dist/template/implementations/service.template.d.ts.map +1 -1
  202. package/dist/template/implementations/service.template.js +24 -16
  203. package/dist/template/implementations/view_enums_buttonset.template.d.ts +2 -2
  204. package/dist/template/implementations/view_enums_buttonset.template.d.ts.map +1 -1
  205. package/dist/template/implementations/view_enums_buttonset.template.js +1 -1
  206. package/dist/template/implementations/view_enums_dropdown.template.d.ts +2 -2
  207. package/dist/template/implementations/view_enums_dropdown.template.d.ts.map +1 -1
  208. package/dist/template/implementations/view_enums_dropdown.template.js +2 -2
  209. package/dist/template/implementations/view_enums_select.template.d.ts +2 -2
  210. package/dist/template/implementations/view_enums_select.template.d.ts.map +1 -1
  211. package/dist/template/implementations/view_enums_select.template.js +2 -2
  212. package/dist/template/implementations/view_form.template.d.ts +2 -2
  213. package/dist/template/implementations/view_form.template.d.ts.map +1 -1
  214. package/dist/template/implementations/view_form.template.js +4 -4
  215. package/dist/template/implementations/view_id_all_select.template.d.ts +2 -2
  216. package/dist/template/implementations/view_id_all_select.template.d.ts.map +1 -1
  217. package/dist/template/implementations/view_id_all_select.template.js +1 -1
  218. package/dist/template/implementations/view_id_async_select.template.d.ts +2 -2
  219. package/dist/template/implementations/view_id_async_select.template.d.ts.map +1 -1
  220. package/dist/template/implementations/view_id_async_select.template.js +1 -1
  221. package/dist/template/implementations/view_list.template.d.ts +2 -2
  222. package/dist/template/implementations/view_list.template.d.ts.map +1 -1
  223. package/dist/template/implementations/view_list.template.js +29 -19
  224. package/dist/template/implementations/view_list_columns.template.d.ts +3 -3
  225. package/dist/template/implementations/view_list_columns.template.d.ts.map +1 -1
  226. package/dist/template/implementations/view_list_columns.template.js +1 -1
  227. package/dist/template/implementations/view_search_input.template.d.ts +2 -2
  228. package/dist/template/implementations/view_search_input.template.d.ts.map +1 -1
  229. package/dist/template/implementations/view_search_input.template.js +1 -1
  230. package/dist/template/index.d.ts +4 -2
  231. package/dist/template/index.d.ts.map +1 -1
  232. package/dist/template/index.js +5 -3
  233. package/dist/template/template-manager.d.ts +56 -0
  234. package/dist/template/template-manager.d.ts.map +1 -0
  235. package/dist/template/template-manager.js +125 -0
  236. package/dist/template/template-types.d.ts +16 -0
  237. package/dist/template/template-types.d.ts.map +1 -0
  238. package/dist/template/template-types.js +7 -0
  239. package/dist/template/template.d.ts +12 -2
  240. package/dist/template/template.d.ts.map +1 -1
  241. package/dist/template/template.js +19 -6
  242. package/dist/template/zod-converter.d.ts +40 -7
  243. package/dist/template/zod-converter.d.ts.map +1 -1
  244. package/dist/template/zod-converter.js +341 -58
  245. package/dist/testing/_relation-graph.d.ts +1 -1
  246. package/dist/testing/_relation-graph.d.ts.map +1 -1
  247. package/dist/testing/_relation-graph.js +12 -3
  248. package/dist/testing/fixture-manager.d.ts +42 -11
  249. package/dist/testing/fixture-manager.d.ts.map +1 -1
  250. package/dist/testing/fixture-manager.js +338 -236
  251. package/dist/types/types.d.ts +709 -104
  252. package/dist/types/types.d.ts.map +1 -1
  253. package/dist/types/types.js +309 -52
  254. package/dist/typings/knex.d.js +2 -2
  255. package/dist/utils/async-utils.d.ts.map +1 -1
  256. package/dist/utils/async-utils.js +3 -3
  257. package/dist/utils/console-util.js +1 -1
  258. package/dist/utils/controller.d.ts +1 -0
  259. package/dist/utils/controller.d.ts.map +1 -1
  260. package/dist/utils/controller.js +4 -1
  261. package/dist/utils/esm-utils.d.ts +0 -6
  262. package/dist/utils/esm-utils.d.ts.map +1 -1
  263. package/dist/utils/esm-utils.js +2 -9
  264. package/dist/utils/formatter.d.ts +3 -0
  265. package/dist/utils/formatter.d.ts.map +1 -0
  266. package/dist/utils/formatter.js +110 -0
  267. package/dist/utils/fs-utils.d.ts +1 -1
  268. package/dist/utils/fs-utils.d.ts.map +1 -1
  269. package/dist/utils/fs-utils.js +1 -1
  270. package/dist/utils/lodash-able.d.ts.map +1 -1
  271. package/dist/utils/lodash-able.js +1 -1
  272. package/dist/utils/object-utils.d.ts +44 -0
  273. package/dist/utils/object-utils.d.ts.map +1 -0
  274. package/dist/utils/object-utils.js +191 -0
  275. package/dist/utils/path-utils.d.ts +1 -1
  276. package/dist/utils/path-utils.d.ts.map +1 -1
  277. package/dist/utils/path-utils.js +3 -3
  278. package/dist/utils/process-utils.js +1 -1
  279. package/dist/utils/sql-parser.d.ts +5 -1
  280. package/dist/utils/sql-parser.d.ts.map +1 -1
  281. package/dist/utils/sql-parser.js +14 -3
  282. package/dist/utils/type-utils.d.ts +23 -0
  283. package/dist/utils/type-utils.d.ts.map +1 -0
  284. package/dist/utils/type-utils.js +45 -0
  285. package/dist/utils/utils.d.ts +7 -1
  286. package/dist/utils/utils.d.ts.map +1 -1
  287. package/dist/utils/utils.js +44 -5
  288. package/dist/utils/zod-error.d.ts +1 -1
  289. package/dist/utils/zod-error.d.ts.map +1 -1
  290. package/dist/utils/zod-error.js +1 -1
  291. package/package.json +54 -29
  292. package/src/ai/agents/agent.ts +87 -0
  293. package/src/ai/agents/index.ts +2 -0
  294. package/src/ai/agents/types.ts +47 -0
  295. package/src/ai/index.ts +1 -0
  296. package/src/ai/providers/rtzr/api.ts +37 -0
  297. package/src/ai/providers/rtzr/error.ts +34 -0
  298. package/src/ai/providers/rtzr/index.ts +4 -0
  299. package/src/ai/providers/rtzr/model.ts +201 -0
  300. package/src/ai/providers/rtzr/options.ts +49 -0
  301. package/src/ai/providers/rtzr/provider.ts +91 -0
  302. package/src/ai/providers/rtzr/utils.ts +127 -0
  303. package/src/api/base-frame.ts +4 -2
  304. package/src/api/caster.ts +17 -23
  305. package/src/api/code-converters.ts +176 -533
  306. package/src/api/config.ts +39 -56
  307. package/src/api/context.ts +7 -18
  308. package/src/api/decorators.ts +175 -46
  309. package/src/api/index.ts +2 -2
  310. package/src/api/sonamu.ts +133 -124
  311. package/src/api/validator.ts +83 -0
  312. package/src/bin/build-config.ts +7 -1
  313. package/src/bin/cli.ts +192 -110
  314. package/src/bin/loader-register.ts +38 -0
  315. package/src/database/_batch_update.ts +46 -31
  316. package/src/database/base-model.ts +390 -182
  317. package/src/database/base-model.types.ts +155 -0
  318. package/src/database/code-generator.ts +13 -32
  319. package/src/database/db.ts +36 -50
  320. package/src/database/puri-subset.test-d.ts +471 -0
  321. package/src/database/puri-subset.types.ts +195 -0
  322. package/src/database/puri-wrapper.ts +58 -67
  323. package/src/database/puri.ts +182 -126
  324. package/src/database/puri.types.ts +64 -31
  325. package/src/database/transaction-context.ts +1 -1
  326. package/src/database/upsert-builder.ts +262 -132
  327. package/src/entity/entity-manager.ts +36 -28
  328. package/src/entity/entity.ts +330 -249
  329. package/src/exceptions/error-handler.ts +3 -3
  330. package/src/exceptions/so-exceptions.ts +11 -11
  331. package/src/file-storage/driver.ts +5 -5
  332. package/src/file-storage/file-storage.ts +2 -2
  333. package/src/index.ts +18 -12
  334. package/src/migration/code-generation.ts +185 -172
  335. package/src/migration/migration-set.ts +80 -293
  336. package/src/migration/migrator.ts +182 -425
  337. package/src/migration/mysql-schema-reader.ts.txt +272 -0
  338. package/src/migration/postgresql-schema-reader.ts +310 -0
  339. package/src/migration/types.ts +6 -39
  340. package/src/naite/messaging-types.ts +51 -0
  341. package/src/naite/naite-reporter.ts +128 -0
  342. package/src/naite/naite.ts +378 -33
  343. package/src/shared/web.shared.ts.txt +20 -24
  344. package/src/stream/sse.ts +5 -5
  345. package/src/syncer/api-parser.ts +52 -69
  346. package/src/syncer/checksum.ts +25 -37
  347. package/src/syncer/code-generator.ts +58 -62
  348. package/src/syncer/entity-operations.ts +12 -15
  349. package/src/syncer/file-patterns.ts +2 -2
  350. package/src/syncer/index.ts +4 -4
  351. package/src/syncer/module-loader.ts +28 -25
  352. package/src/syncer/syncer.ts +155 -162
  353. package/src/template/entity-converter.ts +18 -27
  354. package/src/template/helpers.ts +8 -11
  355. package/src/template/implementations/entity.template.ts +6 -6
  356. package/src/template/implementations/generated.template.ts +99 -99
  357. package/src/template/implementations/generated_http.template.ts +21 -54
  358. package/src/template/implementations/generated_sso.template.ts +78 -65
  359. package/src/template/implementations/init_types.template.ts +4 -6
  360. package/src/template/implementations/model.template.ts +47 -38
  361. package/src/template/implementations/model_test.template.ts +3 -3
  362. package/src/template/implementations/service.template.ts +56 -80
  363. package/src/template/implementations/view_enums_buttonset.template.ts +2 -2
  364. package/src/template/implementations/view_enums_dropdown.template.ts +4 -4
  365. package/src/template/implementations/view_enums_select.template.ts +3 -3
  366. package/src/template/implementations/view_form.template.ts +34 -75
  367. package/src/template/implementations/view_id_all_select.template.ts +2 -2
  368. package/src/template/implementations/view_id_async_select.template.ts +9 -23
  369. package/src/template/implementations/view_list.template.ts +54 -95
  370. package/src/template/implementations/view_list_columns.template.ts +4 -10
  371. package/src/template/implementations/view_search_input.template.ts +2 -2
  372. package/src/template/index.ts +4 -2
  373. package/src/template/template-manager.ts +166 -0
  374. package/src/template/template-types.ts +16 -0
  375. package/src/template/template.ts +29 -10
  376. package/src/template/zod-converter.ts +407 -101
  377. package/src/testing/_relation-graph.ts +18 -11
  378. package/src/testing/fixture-manager.ts +468 -362
  379. package/src/types/types.ts +516 -248
  380. package/src/typings/knex.d.ts +7 -9
  381. package/src/utils/async-utils.ts +8 -12
  382. package/src/utils/console-util.ts +1 -1
  383. package/src/utils/controller.ts +3 -0
  384. package/src/utils/esm-utils.ts +8 -18
  385. package/src/utils/formatter.ts +109 -0
  386. package/src/utils/fs-utils.ts +1 -1
  387. package/src/utils/lodash-able.ts +1 -4
  388. package/src/utils/object-utils.ts +217 -0
  389. package/src/utils/path-utils.ts +3 -6
  390. package/src/utils/process-utils.ts +1 -1
  391. package/src/utils/sql-parser.ts +23 -5
  392. package/src/utils/type-utils.ts +83 -0
  393. package/src/utils/utils.ts +58 -9
  394. package/src/utils/zod-error.ts +3 -3
  395. package/dist/bin/cli-wrapper.d.ts +0 -3
  396. package/dist/bin/cli-wrapper.d.ts.map +0 -1
  397. package/dist/bin/cli-wrapper.js +0 -72
  398. package/dist/database/knex-plugins/knex-on-duplicate-update.d.ts +0 -2
  399. package/dist/database/knex-plugins/knex-on-duplicate-update.d.ts.map +0 -1
  400. package/dist/database/knex-plugins/knex-on-duplicate-update.js +0 -39
  401. package/dist/entity/entity-utils.d.ts +0 -61
  402. package/dist/entity/entity-utils.d.ts.map +0 -1
  403. package/dist/entity/entity-utils.js +0 -210
  404. package/src/bin/cli-wrapper.ts +0 -82
  405. package/src/database/knex-plugins/knex-on-duplicate-update.ts +0 -45
  406. package/src/entity/entity-utils.ts +0 -291
@@ -1,15 +1,7 @@
1
- import type { GuardKey } from "./../api/decorators";
2
1
  import type { FastifyReply, FastifyRequest } from "fastify";
3
2
  import { z } from "zod";
4
3
  import type { ApiDecoratorOptions, AuthContext, Context } from "../api";
5
- export type EnumsLabel<T extends string, L extends "ko" | "en"> = {
6
- [key in T]: {
7
- [lang in L]: string;
8
- };
9
- };
10
- export type EnumsLabelKo<T extends string> = EnumsLabel<T, "ko">;
11
- export declare const SQLDateTimeString: z.ZodString;
12
- export type SQLDateTimeString = z.infer<typeof SQLDateTimeString>;
4
+ import type { GuardKey } from "./../api/decorators";
13
5
  export declare function zArrayable<T extends z.ZodTypeAny>(shape: T): z.ZodUnion<[T, z.ZodArray<T>]>;
14
6
  export type DistributiveOmit<T, K extends keyof any> = T extends any ? Omit<T, K> : never;
15
7
  export type CommonProp = {
@@ -21,57 +13,66 @@ export type CommonProp = {
21
13
  };
22
14
  export type IntegerProp = CommonProp & {
23
15
  type: "integer";
24
- unsigned?: true;
16
+ };
17
+ export type IntegerArrayProp = CommonProp & {
18
+ type: "integer[]";
25
19
  };
26
20
  export type BigIntegerProp = CommonProp & {
27
21
  type: "bigInteger";
28
- unsigned?: true;
29
22
  };
30
- export type TextProp = CommonProp & {
31
- type: "text";
32
- textType: "text" | "mediumtext" | "longtext";
23
+ export type BigIntegerArrayProp = CommonProp & {
24
+ type: "bigInteger[]";
33
25
  };
34
26
  export type StringProp = CommonProp & {
35
27
  type: "string";
36
- length: number;
28
+ length?: number;
29
+ };
30
+ export type StringArrayProp = CommonProp & {
31
+ type: "string[]";
32
+ length?: number;
37
33
  };
38
34
  export type EnumProp = CommonProp & {
39
35
  type: "enum";
40
- length: number;
41
36
  id: string;
37
+ length?: number;
38
+ };
39
+ export type EnumArrayProp = CommonProp & {
40
+ type: "enum[]";
41
+ id: string;
42
+ };
43
+ export type NumberProp = CommonProp & {
44
+ type: "number";
45
+ precision?: number;
46
+ scale?: number;
47
+ numberType?: "real" | "double precision" | "numeric";
42
48
  };
43
- export type FloatProp = CommonProp & {
44
- type: "float";
45
- unsigned?: true;
46
- precision: number;
47
- scale: number;
49
+ export type NumberArrayProp = CommonProp & {
50
+ type: "number[]";
51
+ precision?: number;
52
+ scale?: number;
53
+ numberType?: "real" | "double precision" | "numeric";
48
54
  };
49
- export type DoubleProp = CommonProp & {
50
- type: "double";
51
- unsigned?: true;
52
- precision: number;
53
- scale: number;
55
+ export type NumericProp = CommonProp & {
56
+ type: "numeric";
57
+ precision?: number;
58
+ scale?: number;
54
59
  };
55
- export type DecimalProp = CommonProp & {
56
- type: "decimal";
57
- unsigned?: true;
58
- precision: number;
59
- scale: number;
60
+ export type NumericArrayProp = CommonProp & {
61
+ type: "numeric[]";
62
+ precision?: number;
63
+ scale?: number;
60
64
  };
61
65
  export type BooleanProp = CommonProp & {
62
66
  type: "boolean";
63
67
  };
68
+ export type BooleanArrayProp = CommonProp & {
69
+ type: "boolean[]";
70
+ };
64
71
  export type DateProp = CommonProp & {
65
72
  type: "date";
66
73
  };
67
- export type DateTimeProp = CommonProp & {
68
- type: "datetime";
69
- };
70
- export type TimeProp = CommonProp & {
71
- type: "time";
72
- };
73
- export type TimestampProp = CommonProp & {
74
- type: "timestamp";
74
+ export type DateArrayProp = CommonProp & {
75
+ type: "date[]";
75
76
  };
76
77
  export type JsonProp = CommonProp & {
77
78
  type: "json";
@@ -80,6 +81,9 @@ export type JsonProp = CommonProp & {
80
81
  export type UuidProp = CommonProp & {
81
82
  type: "uuid";
82
83
  };
84
+ export type UuidArrayProp = CommonProp & {
85
+ type: "uuid[]";
86
+ };
83
87
  export type VirtualProp = CommonProp & {
84
88
  type: "virtual";
85
89
  id: string;
@@ -124,7 +128,7 @@ export type ManyToManyRelationProp = _RelationProp & {
124
128
  onDelete: RelationOn;
125
129
  };
126
130
  export type RelationProp = OneToOneRelationProp | BelongsToOneRelationProp | HasManyRelationProp | ManyToManyRelationProp;
127
- export type EntityProp = IntegerProp | BigIntegerProp | TextProp | StringProp | FloatProp | DoubleProp | DecimalProp | BooleanProp | DateProp | DateTimeProp | TimeProp | TimestampProp | JsonProp | UuidProp | EnumProp | VirtualProp | RelationProp;
131
+ export type EntityProp = IntegerProp | IntegerArrayProp | BigIntegerProp | BigIntegerArrayProp | StringProp | StringArrayProp | EnumProp | EnumArrayProp | NumberProp | NumberArrayProp | NumericProp | NumericArrayProp | NumericProp | BooleanProp | BooleanArrayProp | DateProp | DateArrayProp | UuidProp | UuidArrayProp | JsonProp | VirtualProp | RelationProp;
128
132
  export type EntityIndex = {
129
133
  type: "index" | "unique" | "fulltext";
130
134
  columns: string[];
@@ -158,17 +162,6 @@ export type EntitySubsetRow = {
158
162
  isOpen?: boolean;
159
163
  };
160
164
  export type FlattenSubsetRow = Omit<EntitySubsetRow, "children">;
161
- export type SMDInput<T extends string> = {
162
- id: string;
163
- parentId?: string;
164
- table?: string;
165
- title?: string;
166
- props?: EntityProp[];
167
- indexes?: EntityIndex[];
168
- subsets?: {
169
- [subset: string]: T[];
170
- };
171
- };
172
165
  /**
173
166
  * 엔티티의 필드 구조를 트리 형태로 표현하는 중간 노드입니다.
174
167
  *
@@ -193,34 +186,47 @@ export type EntityPropNode = {
193
186
  prop?: EntityProp;
194
187
  children: EntityPropNode[];
195
188
  };
196
- export declare function isIntegerProp(p: any): p is IntegerProp;
197
- export declare function isBigIntegerProp(p: any): p is BigIntegerProp;
198
- export declare function isTextProp(p: any): p is TextProp;
199
- export declare function isStringProp(p: any): p is StringProp;
200
- export declare function isEnumProp(p: any): p is EnumProp;
201
- export declare function isFloatProp(p: any): p is FloatProp;
202
- export declare function isDoubleProp(p: any): p is DoubleProp;
203
- export declare function isDecimalProp(p: any): p is DecimalProp;
204
- export declare function isBooleanProp(p: any): p is BooleanProp;
205
- export declare function isDateProp(p: any): p is DateProp;
206
- export declare function isDateTimeProp(p: any): p is DateTimeProp;
207
- export declare function isTimeProp(p: any): p is TimeProp;
208
- export declare function isTimestampProp(p: any): p is TimestampProp;
209
- export declare function isJsonProp(p: any): p is JsonProp;
210
- export declare function isUuidProp(p: any): p is UuidProp;
211
- export declare function isVirtualProp(p: any): p is VirtualProp;
212
- export declare function isRelationProp(p: any): p is RelationProp;
213
- export declare function isOneToOneRelationProp(p: any): p is OneToOneRelationProp;
214
- export declare function isBelongsToOneRelationProp(p: any): p is BelongsToOneRelationProp;
215
- export declare function isHasManyRelationProp(p: any): p is HasManyRelationProp;
216
- export declare function isManyToManyRelationProp(p: any): p is ManyToManyRelationProp;
189
+ export declare function isIntegerSingleProp(p: unknown): p is IntegerProp;
190
+ export declare function isIntegerArrayProp(p: unknown): p is IntegerArrayProp;
191
+ export declare function isIntegerProp(p: unknown): p is IntegerProp | IntegerArrayProp;
192
+ export declare function isBigIntegerSingleProp(p: unknown): p is BigIntegerProp;
193
+ export declare function isBigIntegerArrayProp(p: unknown): p is BigIntegerArrayProp;
194
+ export declare function isBigIntegerProp(p: unknown): p is BigIntegerProp | BigIntegerArrayProp;
195
+ export declare function isStringSingleProp(p: unknown): p is StringProp;
196
+ export declare function isStringArrayProp(p: unknown): p is StringArrayProp;
197
+ export declare function isStringProp(p: unknown): p is StringProp | StringArrayProp;
198
+ export declare function isEnumSingleProp(p: unknown): p is EnumProp;
199
+ export declare function isEnumArrayProp(p: unknown): p is EnumArrayProp;
200
+ export declare function isEnumProp(p: unknown): p is EnumProp | EnumArrayProp;
201
+ export declare function isNumberSingleProp(p: unknown): p is NumberProp;
202
+ export declare function isNumberArrayProp(p: unknown): p is NumberArrayProp;
203
+ export declare function isNumberProp(p: unknown): p is NumberProp | NumberArrayProp;
204
+ export declare function isNumericSingleProp(p: unknown): p is NumericProp;
205
+ export declare function isNumericArrayProp(p: unknown): p is NumericArrayProp;
206
+ export declare function isNumericProp(p: unknown): p is NumericProp | NumericArrayProp;
207
+ export declare function isBooleanSingleProp(p: unknown): p is BooleanProp;
208
+ export declare function isBooleanArrayProp(p: unknown): p is BooleanArrayProp;
209
+ export declare function isBooleanProp(p: unknown): p is BooleanProp | BooleanArrayProp;
210
+ export declare function isDateSingleProp(p: unknown): p is DateProp;
211
+ export declare function isDateArrayProp(p: unknown): p is DateArrayProp;
212
+ export declare function isDateProp(p: unknown): p is DateProp | DateArrayProp;
213
+ export declare function isUuidSingleProp(p: unknown): p is UuidProp;
214
+ export declare function isUuidArrayProp(p: unknown): p is UuidArrayProp;
215
+ export declare function isUuidProp(p: unknown): p is UuidProp | UuidArrayProp;
216
+ export declare function isJsonProp(p: unknown): p is JsonProp;
217
+ export declare function isVirtualProp(p: unknown): p is VirtualProp;
218
+ export declare function isRelationProp(p: unknown): p is RelationProp;
219
+ export declare function isOneToOneRelationProp(p: unknown): p is OneToOneRelationProp;
220
+ export declare function isBelongsToOneRelationProp(p: unknown): p is BelongsToOneRelationProp;
221
+ export declare function isHasManyRelationProp(p: unknown): p is HasManyRelationProp;
222
+ export declare function isManyToManyRelationProp(p: unknown): p is ManyToManyRelationProp;
217
223
  type JoinClause = {
218
224
  from: string;
219
225
  to: string;
220
226
  } | {
221
227
  custom: string;
222
228
  };
223
- export declare function isCustomJoinClause(p: any): p is {
229
+ export declare function isCustomJoinClause(p: unknown): p is {
224
230
  custom: string;
225
231
  };
226
232
  type SubsetLoader = {
@@ -257,8 +263,8 @@ export type SubsetQuery = {
257
263
  loaders: SubsetLoader[];
258
264
  };
259
265
  export declare const SonamuQueryMode: z.ZodEnum<{
260
- count: "count";
261
266
  list: "list";
267
+ count: "count";
262
268
  both: "both";
263
269
  }>;
264
270
  export type SonamuQueryMode = z.infer<typeof SonamuQueryMode>;
@@ -269,13 +275,14 @@ export type KnexError = {
269
275
  sqlMessage: string;
270
276
  sqlState: string;
271
277
  };
272
- export declare function isKnexError(e: any): e is KnexError;
278
+ export declare function isKnexError(e: unknown): e is KnexError;
273
279
  export type KnexColumnType = "string" | "text" | "smalltext" | "mediumtext" | "longtext" | "integer" | "bigInteger" | "decimal" | "timestamp" | "boolean" | "foreign" | "uuid" | "json" | "float" | "date" | "time" | "datetime";
280
+ export type MigrationColumnType = "string" | "string[]" | "integer" | "integer[]" | "bigInteger" | "bigInteger[]" | "numberOrNumeric" | "numberOrNumeric[]" | "boolean" | "boolean[]" | "date" | "date[]" | "uuid" | "uuid[]" | "json";
274
281
  export type MigrationColumn = {
275
282
  name: string;
276
- type: KnexColumnType;
283
+ type: MigrationColumnType;
277
284
  nullable: boolean;
278
- unsigned?: boolean;
285
+ numberType?: "real" | "double precision" | "numeric";
279
286
  length?: number;
280
287
  defaultTo?: string;
281
288
  precision?: number;
@@ -383,22 +390,22 @@ export declare namespace ApiParamType {
383
390
  id: string;
384
391
  constraint?: ApiParamType;
385
392
  };
386
- function isObject(v: any): v is ApiParamType.Object;
387
- function isUnion(v: any): v is ApiParamType.Union;
388
- function isIntersection(v: any): v is ApiParamType.Intersection;
389
- function isStringLiteral(v: any): v is ApiParamType.StringLiteral;
390
- function isNumericLiteral(v: any): v is ApiParamType.NumericLiteral;
391
- function isArray(v: any): v is ApiParamType.Array;
392
- function isRef(v: any): v is ApiParamType.Ref;
393
- function isIndexedAccess(v: any): v is ApiParamType.IndexedAccess;
394
- function isTupleType(v: any): v is ApiParamType.TupleType;
395
- function isPick(v: any): v is ApiParamType.Pick;
396
- function isOmit(v: any): v is ApiParamType.Omit;
397
- function isPartial(v: any): v is ApiParamType.Partial;
398
- function isPromise(v: any): v is ApiParamType.Promise;
399
- function isContext(v: any): v is ApiParamType.Context;
400
- function isRefKnex(v: any): v is ApiParamType.Ref;
401
- function isTypeParam(v: any): v is ApiParamType.TypeParam;
393
+ function isObject(v: unknown): v is ApiParamType.Object;
394
+ function isUnion(v: unknown): v is ApiParamType.Union;
395
+ function isIntersection(v: unknown): v is ApiParamType.Intersection;
396
+ function isStringLiteral(v: unknown): v is ApiParamType.StringLiteral;
397
+ function isNumericLiteral(v: unknown): v is ApiParamType.NumericLiteral;
398
+ function isArray(v: unknown): v is ApiParamType.Array;
399
+ function isRef(v: unknown): v is ApiParamType.Ref;
400
+ function isIndexedAccess(v: unknown): v is ApiParamType.IndexedAccess;
401
+ function isTupleType(v: unknown): v is ApiParamType.TupleType;
402
+ function isPick(v: unknown): v is ApiParamType.Pick;
403
+ function isOmit(v: unknown): v is ApiParamType.Omit;
404
+ function isPartial(v: unknown): v is ApiParamType.Partial;
405
+ function isPromise(v: unknown): v is ApiParamType.Promise;
406
+ function isContext(v: unknown): v is ApiParamType.Context;
407
+ function isRefKnex(v: unknown): v is ApiParamType.Ref;
408
+ function isTypeParam(v: unknown): v is ApiParamType.TypeParam;
402
409
  }
403
410
  export type ApiParamType = "string" | "number" | "boolean" | "null" | "undefined" | "void" | "any" | "unknown" | "true" | "false" | ApiParamType.StringLiteral | ApiParamType.NumericLiteral | ApiParamType.Object | ApiParamType.Union | ApiParamType.Intersection | ApiParamType.Array | ApiParamType.Ref | ApiParamType.IndexedAccess | ApiParamType.TypeParam | ApiParamType.TupleType;
404
411
  /**
@@ -435,17 +442,614 @@ export type RenderingNode = {
435
442
  optional?: boolean;
436
443
  nullable?: boolean;
437
444
  };
445
+ export declare const RelationPropSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
446
+ relationType: z.ZodLiteral<"BelongsToOne">;
447
+ customJoinClause: z.ZodOptional<z.ZodString>;
448
+ useConstraint: z.ZodOptional<z.ZodBoolean>;
449
+ onUpdate: z.ZodOptional<z.ZodEnum<{
450
+ CASCADE: "CASCADE";
451
+ "SET NULL": "SET NULL";
452
+ "NO ACTION": "NO ACTION";
453
+ "SET DEFAULT": "SET DEFAULT";
454
+ RESTRICT: "RESTRICT";
455
+ }>>;
456
+ onDelete: z.ZodOptional<z.ZodEnum<{
457
+ CASCADE: "CASCADE";
458
+ "SET NULL": "SET NULL";
459
+ "NO ACTION": "NO ACTION";
460
+ "SET DEFAULT": "SET DEFAULT";
461
+ RESTRICT: "RESTRICT";
462
+ }>>;
463
+ type: z.ZodLiteral<"relation">;
464
+ with: z.ZodString;
465
+ name: z.ZodString;
466
+ desc: z.ZodOptional<z.ZodString>;
467
+ nullable: z.ZodOptional<z.ZodBoolean>;
468
+ toFilter: z.ZodOptional<z.ZodLiteral<true>>;
469
+ dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
470
+ }, z.core.$strict>, z.ZodObject<{
471
+ relationType: z.ZodLiteral<"HasMany">;
472
+ joinColumn: z.ZodString;
473
+ fromColumn: z.ZodOptional<z.ZodString>;
474
+ type: z.ZodLiteral<"relation">;
475
+ with: z.ZodString;
476
+ name: z.ZodString;
477
+ desc: z.ZodOptional<z.ZodString>;
478
+ nullable: z.ZodOptional<z.ZodBoolean>;
479
+ toFilter: z.ZodOptional<z.ZodLiteral<true>>;
480
+ dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
481
+ }, z.core.$strict>, z.ZodObject<{
482
+ relationType: z.ZodLiteral<"ManyToMany">;
483
+ joinTable: z.ZodString;
484
+ onUpdate: z.ZodEnum<{
485
+ CASCADE: "CASCADE";
486
+ "SET NULL": "SET NULL";
487
+ "NO ACTION": "NO ACTION";
488
+ "SET DEFAULT": "SET DEFAULT";
489
+ RESTRICT: "RESTRICT";
490
+ }>;
491
+ onDelete: z.ZodEnum<{
492
+ CASCADE: "CASCADE";
493
+ "SET NULL": "SET NULL";
494
+ "NO ACTION": "NO ACTION";
495
+ "SET DEFAULT": "SET DEFAULT";
496
+ RESTRICT: "RESTRICT";
497
+ }>;
498
+ type: z.ZodLiteral<"relation">;
499
+ with: z.ZodString;
500
+ name: z.ZodString;
501
+ desc: z.ZodOptional<z.ZodString>;
502
+ nullable: z.ZodOptional<z.ZodBoolean>;
503
+ toFilter: z.ZodOptional<z.ZodLiteral<true>>;
504
+ dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
505
+ }, z.core.$strict>, z.ZodObject<{
506
+ relationType: z.ZodLiteral<"OneToOne">;
507
+ customJoinClause: z.ZodOptional<z.ZodString>;
508
+ hasJoinColumn: z.ZodOptional<z.ZodBoolean>;
509
+ useConstraint: z.ZodOptional<z.ZodBoolean>;
510
+ onUpdate: z.ZodOptional<z.ZodEnum<{
511
+ CASCADE: "CASCADE";
512
+ "SET NULL": "SET NULL";
513
+ "NO ACTION": "NO ACTION";
514
+ "SET DEFAULT": "SET DEFAULT";
515
+ RESTRICT: "RESTRICT";
516
+ }>>;
517
+ onDelete: z.ZodOptional<z.ZodEnum<{
518
+ CASCADE: "CASCADE";
519
+ "SET NULL": "SET NULL";
520
+ "NO ACTION": "NO ACTION";
521
+ "SET DEFAULT": "SET DEFAULT";
522
+ RESTRICT: "RESTRICT";
523
+ }>>;
524
+ type: z.ZodLiteral<"relation">;
525
+ with: z.ZodString;
526
+ name: z.ZodString;
527
+ desc: z.ZodOptional<z.ZodString>;
528
+ nullable: z.ZodOptional<z.ZodBoolean>;
529
+ toFilter: z.ZodOptional<z.ZodLiteral<true>>;
530
+ dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
531
+ }, z.core.$strict>], "relationType">;
532
+ export declare const NormalPropSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
533
+ type: z.ZodUnion<readonly [z.ZodLiteral<"integer">, z.ZodLiteral<"integer[]">, z.ZodLiteral<"bigInteger">, z.ZodLiteral<"bigInteger[]">, z.ZodLiteral<"boolean">, z.ZodLiteral<"boolean[]">, z.ZodLiteral<"date">, z.ZodLiteral<"date[]">, z.ZodLiteral<"uuid">, z.ZodLiteral<"uuid[]">]>;
534
+ name: z.ZodString;
535
+ desc: z.ZodOptional<z.ZodString>;
536
+ nullable: z.ZodOptional<z.ZodBoolean>;
537
+ toFilter: z.ZodOptional<z.ZodLiteral<true>>;
538
+ dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
539
+ }, z.core.$strict>, z.ZodObject<{
540
+ type: z.ZodLiteral<"string">;
541
+ length: z.ZodOptional<z.ZodNumber>;
542
+ name: z.ZodString;
543
+ desc: z.ZodOptional<z.ZodString>;
544
+ nullable: z.ZodOptional<z.ZodBoolean>;
545
+ toFilter: z.ZodOptional<z.ZodLiteral<true>>;
546
+ dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
547
+ }, z.core.$strict>, z.ZodObject<{
548
+ type: z.ZodLiteral<"string[]">;
549
+ length: z.ZodOptional<z.ZodNumber>;
550
+ name: z.ZodString;
551
+ desc: z.ZodOptional<z.ZodString>;
552
+ nullable: z.ZodOptional<z.ZodBoolean>;
553
+ toFilter: z.ZodOptional<z.ZodLiteral<true>>;
554
+ dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
555
+ }, z.core.$strict>, z.ZodObject<{
556
+ type: z.ZodLiteral<"enum">;
557
+ id: z.ZodString;
558
+ name: z.ZodString;
559
+ desc: z.ZodOptional<z.ZodString>;
560
+ nullable: z.ZodOptional<z.ZodBoolean>;
561
+ toFilter: z.ZodOptional<z.ZodLiteral<true>>;
562
+ dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
563
+ }, z.core.$strict>, z.ZodObject<{
564
+ type: z.ZodLiteral<"enum[]">;
565
+ id: z.ZodString;
566
+ name: z.ZodString;
567
+ desc: z.ZodOptional<z.ZodString>;
568
+ nullable: z.ZodOptional<z.ZodBoolean>;
569
+ toFilter: z.ZodOptional<z.ZodLiteral<true>>;
570
+ dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
571
+ }, z.core.$strict>, z.ZodObject<{
572
+ numberType: z.ZodOptional<z.ZodEnum<{
573
+ numeric: "numeric";
574
+ real: "real";
575
+ "double precision": "double precision";
576
+ }>>;
577
+ precision: z.ZodOptional<z.ZodNumber>;
578
+ scale: z.ZodOptional<z.ZodNumber>;
579
+ type: z.ZodLiteral<"number">;
580
+ name: z.ZodString;
581
+ desc: z.ZodOptional<z.ZodString>;
582
+ nullable: z.ZodOptional<z.ZodBoolean>;
583
+ toFilter: z.ZodOptional<z.ZodLiteral<true>>;
584
+ dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
585
+ }, z.core.$strict>, z.ZodObject<{
586
+ numberType: z.ZodOptional<z.ZodEnum<{
587
+ numeric: "numeric";
588
+ real: "real";
589
+ "double precision": "double precision";
590
+ }>>;
591
+ precision: z.ZodOptional<z.ZodNumber>;
592
+ scale: z.ZodOptional<z.ZodNumber>;
593
+ type: z.ZodLiteral<"number[]">;
594
+ name: z.ZodString;
595
+ desc: z.ZodOptional<z.ZodString>;
596
+ nullable: z.ZodOptional<z.ZodBoolean>;
597
+ toFilter: z.ZodOptional<z.ZodLiteral<true>>;
598
+ dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
599
+ }, z.core.$strict>, z.ZodObject<{
600
+ precision: z.ZodOptional<z.ZodNumber>;
601
+ scale: z.ZodOptional<z.ZodNumber>;
602
+ type: z.ZodLiteral<"numeric">;
603
+ name: z.ZodString;
604
+ desc: z.ZodOptional<z.ZodString>;
605
+ nullable: z.ZodOptional<z.ZodBoolean>;
606
+ toFilter: z.ZodOptional<z.ZodLiteral<true>>;
607
+ dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
608
+ }, z.core.$strict>, z.ZodObject<{
609
+ precision: z.ZodOptional<z.ZodNumber>;
610
+ scale: z.ZodOptional<z.ZodNumber>;
611
+ type: z.ZodLiteral<"numeric[]">;
612
+ name: z.ZodString;
613
+ desc: z.ZodOptional<z.ZodString>;
614
+ nullable: z.ZodOptional<z.ZodBoolean>;
615
+ toFilter: z.ZodOptional<z.ZodLiteral<true>>;
616
+ dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
617
+ }, z.core.$strict>, z.ZodObject<{
618
+ type: z.ZodLiteral<"json">;
619
+ id: z.ZodString;
620
+ name: z.ZodString;
621
+ desc: z.ZodOptional<z.ZodString>;
622
+ nullable: z.ZodOptional<z.ZodBoolean>;
623
+ toFilter: z.ZodOptional<z.ZodLiteral<true>>;
624
+ dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
625
+ }, z.core.$strict>, z.ZodObject<{
626
+ type: z.ZodLiteral<"virtual">;
627
+ id: z.ZodString;
628
+ name: z.ZodString;
629
+ desc: z.ZodOptional<z.ZodString>;
630
+ nullable: z.ZodOptional<z.ZodBoolean>;
631
+ toFilter: z.ZodOptional<z.ZodLiteral<true>>;
632
+ dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
633
+ }, z.core.$strict>], "type">;
634
+ export declare const EntityJsonSchema: z.ZodObject<{
635
+ id: z.ZodString;
636
+ title: z.ZodString;
637
+ table: z.ZodString;
638
+ parentId: z.ZodOptional<z.ZodString>;
639
+ props: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[z.ZodObject<{
640
+ type: z.ZodUnion<readonly [z.ZodLiteral<"integer">, z.ZodLiteral<"integer[]">, z.ZodLiteral<"bigInteger">, z.ZodLiteral<"bigInteger[]">, z.ZodLiteral<"boolean">, z.ZodLiteral<"boolean[]">, z.ZodLiteral<"date">, z.ZodLiteral<"date[]">, z.ZodLiteral<"uuid">, z.ZodLiteral<"uuid[]">]>;
641
+ name: z.ZodString;
642
+ desc: z.ZodOptional<z.ZodString>;
643
+ nullable: z.ZodOptional<z.ZodBoolean>;
644
+ toFilter: z.ZodOptional<z.ZodLiteral<true>>;
645
+ dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
646
+ }, z.core.$strict>, z.ZodObject<{
647
+ type: z.ZodLiteral<"string">;
648
+ length: z.ZodOptional<z.ZodNumber>;
649
+ name: z.ZodString;
650
+ desc: z.ZodOptional<z.ZodString>;
651
+ nullable: z.ZodOptional<z.ZodBoolean>;
652
+ toFilter: z.ZodOptional<z.ZodLiteral<true>>;
653
+ dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
654
+ }, z.core.$strict>, z.ZodObject<{
655
+ type: z.ZodLiteral<"string[]">;
656
+ length: z.ZodOptional<z.ZodNumber>;
657
+ name: z.ZodString;
658
+ desc: z.ZodOptional<z.ZodString>;
659
+ nullable: z.ZodOptional<z.ZodBoolean>;
660
+ toFilter: z.ZodOptional<z.ZodLiteral<true>>;
661
+ dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
662
+ }, z.core.$strict>, z.ZodObject<{
663
+ type: z.ZodLiteral<"enum">;
664
+ id: z.ZodString;
665
+ name: z.ZodString;
666
+ desc: z.ZodOptional<z.ZodString>;
667
+ nullable: z.ZodOptional<z.ZodBoolean>;
668
+ toFilter: z.ZodOptional<z.ZodLiteral<true>>;
669
+ dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
670
+ }, z.core.$strict>, z.ZodObject<{
671
+ type: z.ZodLiteral<"enum[]">;
672
+ id: z.ZodString;
673
+ name: z.ZodString;
674
+ desc: z.ZodOptional<z.ZodString>;
675
+ nullable: z.ZodOptional<z.ZodBoolean>;
676
+ toFilter: z.ZodOptional<z.ZodLiteral<true>>;
677
+ dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
678
+ }, z.core.$strict>, z.ZodObject<{
679
+ numberType: z.ZodOptional<z.ZodEnum<{
680
+ numeric: "numeric";
681
+ real: "real";
682
+ "double precision": "double precision";
683
+ }>>;
684
+ precision: z.ZodOptional<z.ZodNumber>;
685
+ scale: z.ZodOptional<z.ZodNumber>;
686
+ type: z.ZodLiteral<"number">;
687
+ name: z.ZodString;
688
+ desc: z.ZodOptional<z.ZodString>;
689
+ nullable: z.ZodOptional<z.ZodBoolean>;
690
+ toFilter: z.ZodOptional<z.ZodLiteral<true>>;
691
+ dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
692
+ }, z.core.$strict>, z.ZodObject<{
693
+ numberType: z.ZodOptional<z.ZodEnum<{
694
+ numeric: "numeric";
695
+ real: "real";
696
+ "double precision": "double precision";
697
+ }>>;
698
+ precision: z.ZodOptional<z.ZodNumber>;
699
+ scale: z.ZodOptional<z.ZodNumber>;
700
+ type: z.ZodLiteral<"number[]">;
701
+ name: z.ZodString;
702
+ desc: z.ZodOptional<z.ZodString>;
703
+ nullable: z.ZodOptional<z.ZodBoolean>;
704
+ toFilter: z.ZodOptional<z.ZodLiteral<true>>;
705
+ dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
706
+ }, z.core.$strict>, z.ZodObject<{
707
+ precision: z.ZodOptional<z.ZodNumber>;
708
+ scale: z.ZodOptional<z.ZodNumber>;
709
+ type: z.ZodLiteral<"numeric">;
710
+ name: z.ZodString;
711
+ desc: z.ZodOptional<z.ZodString>;
712
+ nullable: z.ZodOptional<z.ZodBoolean>;
713
+ toFilter: z.ZodOptional<z.ZodLiteral<true>>;
714
+ dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
715
+ }, z.core.$strict>, z.ZodObject<{
716
+ precision: z.ZodOptional<z.ZodNumber>;
717
+ scale: z.ZodOptional<z.ZodNumber>;
718
+ type: z.ZodLiteral<"numeric[]">;
719
+ name: z.ZodString;
720
+ desc: z.ZodOptional<z.ZodString>;
721
+ nullable: z.ZodOptional<z.ZodBoolean>;
722
+ toFilter: z.ZodOptional<z.ZodLiteral<true>>;
723
+ dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
724
+ }, z.core.$strict>, z.ZodObject<{
725
+ type: z.ZodLiteral<"json">;
726
+ id: z.ZodString;
727
+ name: z.ZodString;
728
+ desc: z.ZodOptional<z.ZodString>;
729
+ nullable: z.ZodOptional<z.ZodBoolean>;
730
+ toFilter: z.ZodOptional<z.ZodLiteral<true>>;
731
+ dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
732
+ }, z.core.$strict>, z.ZodObject<{
733
+ type: z.ZodLiteral<"virtual">;
734
+ id: z.ZodString;
735
+ name: z.ZodString;
736
+ desc: z.ZodOptional<z.ZodString>;
737
+ nullable: z.ZodOptional<z.ZodBoolean>;
738
+ toFilter: z.ZodOptional<z.ZodLiteral<true>>;
739
+ dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
740
+ }, z.core.$strict>], "type">, z.ZodDiscriminatedUnion<[z.ZodObject<{
741
+ relationType: z.ZodLiteral<"BelongsToOne">;
742
+ customJoinClause: z.ZodOptional<z.ZodString>;
743
+ useConstraint: z.ZodOptional<z.ZodBoolean>;
744
+ onUpdate: z.ZodOptional<z.ZodEnum<{
745
+ CASCADE: "CASCADE";
746
+ "SET NULL": "SET NULL";
747
+ "NO ACTION": "NO ACTION";
748
+ "SET DEFAULT": "SET DEFAULT";
749
+ RESTRICT: "RESTRICT";
750
+ }>>;
751
+ onDelete: z.ZodOptional<z.ZodEnum<{
752
+ CASCADE: "CASCADE";
753
+ "SET NULL": "SET NULL";
754
+ "NO ACTION": "NO ACTION";
755
+ "SET DEFAULT": "SET DEFAULT";
756
+ RESTRICT: "RESTRICT";
757
+ }>>;
758
+ type: z.ZodLiteral<"relation">;
759
+ with: z.ZodString;
760
+ name: z.ZodString;
761
+ desc: z.ZodOptional<z.ZodString>;
762
+ nullable: z.ZodOptional<z.ZodBoolean>;
763
+ toFilter: z.ZodOptional<z.ZodLiteral<true>>;
764
+ dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
765
+ }, z.core.$strict>, z.ZodObject<{
766
+ relationType: z.ZodLiteral<"HasMany">;
767
+ joinColumn: z.ZodString;
768
+ fromColumn: z.ZodOptional<z.ZodString>;
769
+ type: z.ZodLiteral<"relation">;
770
+ with: z.ZodString;
771
+ name: z.ZodString;
772
+ desc: z.ZodOptional<z.ZodString>;
773
+ nullable: z.ZodOptional<z.ZodBoolean>;
774
+ toFilter: z.ZodOptional<z.ZodLiteral<true>>;
775
+ dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
776
+ }, z.core.$strict>, z.ZodObject<{
777
+ relationType: z.ZodLiteral<"ManyToMany">;
778
+ joinTable: z.ZodString;
779
+ onUpdate: z.ZodEnum<{
780
+ CASCADE: "CASCADE";
781
+ "SET NULL": "SET NULL";
782
+ "NO ACTION": "NO ACTION";
783
+ "SET DEFAULT": "SET DEFAULT";
784
+ RESTRICT: "RESTRICT";
785
+ }>;
786
+ onDelete: z.ZodEnum<{
787
+ CASCADE: "CASCADE";
788
+ "SET NULL": "SET NULL";
789
+ "NO ACTION": "NO ACTION";
790
+ "SET DEFAULT": "SET DEFAULT";
791
+ RESTRICT: "RESTRICT";
792
+ }>;
793
+ type: z.ZodLiteral<"relation">;
794
+ with: z.ZodString;
795
+ name: z.ZodString;
796
+ desc: z.ZodOptional<z.ZodString>;
797
+ nullable: z.ZodOptional<z.ZodBoolean>;
798
+ toFilter: z.ZodOptional<z.ZodLiteral<true>>;
799
+ dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
800
+ }, z.core.$strict>, z.ZodObject<{
801
+ relationType: z.ZodLiteral<"OneToOne">;
802
+ customJoinClause: z.ZodOptional<z.ZodString>;
803
+ hasJoinColumn: z.ZodOptional<z.ZodBoolean>;
804
+ useConstraint: z.ZodOptional<z.ZodBoolean>;
805
+ onUpdate: z.ZodOptional<z.ZodEnum<{
806
+ CASCADE: "CASCADE";
807
+ "SET NULL": "SET NULL";
808
+ "NO ACTION": "NO ACTION";
809
+ "SET DEFAULT": "SET DEFAULT";
810
+ RESTRICT: "RESTRICT";
811
+ }>>;
812
+ onDelete: z.ZodOptional<z.ZodEnum<{
813
+ CASCADE: "CASCADE";
814
+ "SET NULL": "SET NULL";
815
+ "NO ACTION": "NO ACTION";
816
+ "SET DEFAULT": "SET DEFAULT";
817
+ RESTRICT: "RESTRICT";
818
+ }>>;
819
+ type: z.ZodLiteral<"relation">;
820
+ with: z.ZodString;
821
+ name: z.ZodString;
822
+ desc: z.ZodOptional<z.ZodString>;
823
+ nullable: z.ZodOptional<z.ZodBoolean>;
824
+ toFilter: z.ZodOptional<z.ZodLiteral<true>>;
825
+ dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
826
+ }, z.core.$strict>], "relationType">], "type">>;
827
+ indexes: z.ZodArray<z.ZodObject<{
828
+ type: z.ZodEnum<{
829
+ index: "index";
830
+ unique: "unique";
831
+ fulltext: "fulltext";
832
+ }>;
833
+ columns: z.ZodArray<z.ZodString>;
834
+ name: z.ZodOptional<z.ZodString>;
835
+ parser: z.ZodOptional<z.ZodEnum<{
836
+ "built-in": "built-in";
837
+ ngram: "ngram";
838
+ }>>;
839
+ }, z.core.$strict>>;
840
+ subsets: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>;
841
+ enums: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>;
842
+ }, z.core.$strict>;
438
843
  export declare const TemplateOptions: z.ZodObject<{
439
844
  entity: z.ZodObject<{
440
- entityId: z.ZodString;
845
+ table: z.ZodOptional<z.ZodString>;
441
846
  parentId: z.ZodOptional<z.ZodString>;
442
847
  title: z.ZodString;
443
- table: z.ZodOptional<z.ZodString>;
444
- props: z.ZodOptional<z.ZodArray<z.ZodObject<{}, z.core.$strip>>>;
445
- indexes: z.ZodOptional<z.ZodArray<z.ZodObject<{}, z.core.$strip>>>;
446
- subsets: z.ZodOptional<z.ZodObject<{}, z.core.$strip>>;
447
- enums: z.ZodOptional<z.ZodObject<{}, z.core.$strip>>;
448
- }, z.core.$strip>;
848
+ props: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[z.ZodObject<{
849
+ type: z.ZodUnion<readonly [z.ZodLiteral<"integer">, z.ZodLiteral<"integer[]">, z.ZodLiteral<"bigInteger">, z.ZodLiteral<"bigInteger[]">, z.ZodLiteral<"boolean">, z.ZodLiteral<"boolean[]">, z.ZodLiteral<"date">, z.ZodLiteral<"date[]">, z.ZodLiteral<"uuid">, z.ZodLiteral<"uuid[]">]>;
850
+ name: z.ZodString;
851
+ desc: z.ZodOptional<z.ZodString>;
852
+ nullable: z.ZodOptional<z.ZodBoolean>;
853
+ toFilter: z.ZodOptional<z.ZodLiteral<true>>;
854
+ dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
855
+ }, z.core.$strict>, z.ZodObject<{
856
+ type: z.ZodLiteral<"string">;
857
+ length: z.ZodOptional<z.ZodNumber>;
858
+ name: z.ZodString;
859
+ desc: z.ZodOptional<z.ZodString>;
860
+ nullable: z.ZodOptional<z.ZodBoolean>;
861
+ toFilter: z.ZodOptional<z.ZodLiteral<true>>;
862
+ dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
863
+ }, z.core.$strict>, z.ZodObject<{
864
+ type: z.ZodLiteral<"string[]">;
865
+ length: z.ZodOptional<z.ZodNumber>;
866
+ name: z.ZodString;
867
+ desc: z.ZodOptional<z.ZodString>;
868
+ nullable: z.ZodOptional<z.ZodBoolean>;
869
+ toFilter: z.ZodOptional<z.ZodLiteral<true>>;
870
+ dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
871
+ }, z.core.$strict>, z.ZodObject<{
872
+ type: z.ZodLiteral<"enum">;
873
+ id: z.ZodString;
874
+ name: z.ZodString;
875
+ desc: z.ZodOptional<z.ZodString>;
876
+ nullable: z.ZodOptional<z.ZodBoolean>;
877
+ toFilter: z.ZodOptional<z.ZodLiteral<true>>;
878
+ dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
879
+ }, z.core.$strict>, z.ZodObject<{
880
+ type: z.ZodLiteral<"enum[]">;
881
+ id: z.ZodString;
882
+ name: z.ZodString;
883
+ desc: z.ZodOptional<z.ZodString>;
884
+ nullable: z.ZodOptional<z.ZodBoolean>;
885
+ toFilter: z.ZodOptional<z.ZodLiteral<true>>;
886
+ dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
887
+ }, z.core.$strict>, z.ZodObject<{
888
+ numberType: z.ZodOptional<z.ZodEnum<{
889
+ numeric: "numeric";
890
+ real: "real";
891
+ "double precision": "double precision";
892
+ }>>;
893
+ precision: z.ZodOptional<z.ZodNumber>;
894
+ scale: z.ZodOptional<z.ZodNumber>;
895
+ type: z.ZodLiteral<"number">;
896
+ name: z.ZodString;
897
+ desc: z.ZodOptional<z.ZodString>;
898
+ nullable: z.ZodOptional<z.ZodBoolean>;
899
+ toFilter: z.ZodOptional<z.ZodLiteral<true>>;
900
+ dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
901
+ }, z.core.$strict>, z.ZodObject<{
902
+ numberType: z.ZodOptional<z.ZodEnum<{
903
+ numeric: "numeric";
904
+ real: "real";
905
+ "double precision": "double precision";
906
+ }>>;
907
+ precision: z.ZodOptional<z.ZodNumber>;
908
+ scale: z.ZodOptional<z.ZodNumber>;
909
+ type: z.ZodLiteral<"number[]">;
910
+ name: z.ZodString;
911
+ desc: z.ZodOptional<z.ZodString>;
912
+ nullable: z.ZodOptional<z.ZodBoolean>;
913
+ toFilter: z.ZodOptional<z.ZodLiteral<true>>;
914
+ dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
915
+ }, z.core.$strict>, z.ZodObject<{
916
+ precision: z.ZodOptional<z.ZodNumber>;
917
+ scale: z.ZodOptional<z.ZodNumber>;
918
+ type: z.ZodLiteral<"numeric">;
919
+ name: z.ZodString;
920
+ desc: z.ZodOptional<z.ZodString>;
921
+ nullable: z.ZodOptional<z.ZodBoolean>;
922
+ toFilter: z.ZodOptional<z.ZodLiteral<true>>;
923
+ dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
924
+ }, z.core.$strict>, z.ZodObject<{
925
+ precision: z.ZodOptional<z.ZodNumber>;
926
+ scale: z.ZodOptional<z.ZodNumber>;
927
+ type: z.ZodLiteral<"numeric[]">;
928
+ name: z.ZodString;
929
+ desc: z.ZodOptional<z.ZodString>;
930
+ nullable: z.ZodOptional<z.ZodBoolean>;
931
+ toFilter: z.ZodOptional<z.ZodLiteral<true>>;
932
+ dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
933
+ }, z.core.$strict>, z.ZodObject<{
934
+ type: z.ZodLiteral<"json">;
935
+ id: z.ZodString;
936
+ name: z.ZodString;
937
+ desc: z.ZodOptional<z.ZodString>;
938
+ nullable: z.ZodOptional<z.ZodBoolean>;
939
+ toFilter: z.ZodOptional<z.ZodLiteral<true>>;
940
+ dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
941
+ }, z.core.$strict>, z.ZodObject<{
942
+ type: z.ZodLiteral<"virtual">;
943
+ id: z.ZodString;
944
+ name: z.ZodString;
945
+ desc: z.ZodOptional<z.ZodString>;
946
+ nullable: z.ZodOptional<z.ZodBoolean>;
947
+ toFilter: z.ZodOptional<z.ZodLiteral<true>>;
948
+ dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
949
+ }, z.core.$strict>], "type">, z.ZodDiscriminatedUnion<[z.ZodObject<{
950
+ relationType: z.ZodLiteral<"BelongsToOne">;
951
+ customJoinClause: z.ZodOptional<z.ZodString>;
952
+ useConstraint: z.ZodOptional<z.ZodBoolean>;
953
+ onUpdate: z.ZodOptional<z.ZodEnum<{
954
+ CASCADE: "CASCADE";
955
+ "SET NULL": "SET NULL";
956
+ "NO ACTION": "NO ACTION";
957
+ "SET DEFAULT": "SET DEFAULT";
958
+ RESTRICT: "RESTRICT";
959
+ }>>;
960
+ onDelete: z.ZodOptional<z.ZodEnum<{
961
+ CASCADE: "CASCADE";
962
+ "SET NULL": "SET NULL";
963
+ "NO ACTION": "NO ACTION";
964
+ "SET DEFAULT": "SET DEFAULT";
965
+ RESTRICT: "RESTRICT";
966
+ }>>;
967
+ type: z.ZodLiteral<"relation">;
968
+ with: z.ZodString;
969
+ name: z.ZodString;
970
+ desc: z.ZodOptional<z.ZodString>;
971
+ nullable: z.ZodOptional<z.ZodBoolean>;
972
+ toFilter: z.ZodOptional<z.ZodLiteral<true>>;
973
+ dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
974
+ }, z.core.$strict>, z.ZodObject<{
975
+ relationType: z.ZodLiteral<"HasMany">;
976
+ joinColumn: z.ZodString;
977
+ fromColumn: z.ZodOptional<z.ZodString>;
978
+ type: z.ZodLiteral<"relation">;
979
+ with: z.ZodString;
980
+ name: z.ZodString;
981
+ desc: z.ZodOptional<z.ZodString>;
982
+ nullable: z.ZodOptional<z.ZodBoolean>;
983
+ toFilter: z.ZodOptional<z.ZodLiteral<true>>;
984
+ dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
985
+ }, z.core.$strict>, z.ZodObject<{
986
+ relationType: z.ZodLiteral<"ManyToMany">;
987
+ joinTable: z.ZodString;
988
+ onUpdate: z.ZodEnum<{
989
+ CASCADE: "CASCADE";
990
+ "SET NULL": "SET NULL";
991
+ "NO ACTION": "NO ACTION";
992
+ "SET DEFAULT": "SET DEFAULT";
993
+ RESTRICT: "RESTRICT";
994
+ }>;
995
+ onDelete: z.ZodEnum<{
996
+ CASCADE: "CASCADE";
997
+ "SET NULL": "SET NULL";
998
+ "NO ACTION": "NO ACTION";
999
+ "SET DEFAULT": "SET DEFAULT";
1000
+ RESTRICT: "RESTRICT";
1001
+ }>;
1002
+ type: z.ZodLiteral<"relation">;
1003
+ with: z.ZodString;
1004
+ name: z.ZodString;
1005
+ desc: z.ZodOptional<z.ZodString>;
1006
+ nullable: z.ZodOptional<z.ZodBoolean>;
1007
+ toFilter: z.ZodOptional<z.ZodLiteral<true>>;
1008
+ dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
1009
+ }, z.core.$strict>, z.ZodObject<{
1010
+ relationType: z.ZodLiteral<"OneToOne">;
1011
+ customJoinClause: z.ZodOptional<z.ZodString>;
1012
+ hasJoinColumn: z.ZodOptional<z.ZodBoolean>;
1013
+ useConstraint: z.ZodOptional<z.ZodBoolean>;
1014
+ onUpdate: z.ZodOptional<z.ZodEnum<{
1015
+ CASCADE: "CASCADE";
1016
+ "SET NULL": "SET NULL";
1017
+ "NO ACTION": "NO ACTION";
1018
+ "SET DEFAULT": "SET DEFAULT";
1019
+ RESTRICT: "RESTRICT";
1020
+ }>>;
1021
+ onDelete: z.ZodOptional<z.ZodEnum<{
1022
+ CASCADE: "CASCADE";
1023
+ "SET NULL": "SET NULL";
1024
+ "NO ACTION": "NO ACTION";
1025
+ "SET DEFAULT": "SET DEFAULT";
1026
+ RESTRICT: "RESTRICT";
1027
+ }>>;
1028
+ type: z.ZodLiteral<"relation">;
1029
+ with: z.ZodString;
1030
+ name: z.ZodString;
1031
+ desc: z.ZodOptional<z.ZodString>;
1032
+ nullable: z.ZodOptional<z.ZodBoolean>;
1033
+ toFilter: z.ZodOptional<z.ZodLiteral<true>>;
1034
+ dbDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
1035
+ }, z.core.$strict>], "relationType">], "type">>>;
1036
+ indexes: z.ZodOptional<z.ZodArray<z.ZodObject<{
1037
+ type: z.ZodEnum<{
1038
+ index: "index";
1039
+ unique: "unique";
1040
+ fulltext: "fulltext";
1041
+ }>;
1042
+ columns: z.ZodArray<z.ZodString>;
1043
+ name: z.ZodOptional<z.ZodString>;
1044
+ parser: z.ZodOptional<z.ZodEnum<{
1045
+ "built-in": "built-in";
1046
+ ngram: "ngram";
1047
+ }>>;
1048
+ }, z.core.$strict>>>;
1049
+ subsets: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
1050
+ enums: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>>;
1051
+ entityId: z.ZodString;
1052
+ }, z.core.$strict>;
449
1053
  init_types: z.ZodObject<{
450
1054
  entityId: z.ZodString;
451
1055
  }, z.core.$strip>;
@@ -456,8 +1060,8 @@ export declare const TemplateOptions: z.ZodObject<{
456
1060
  }, z.core.$strip>;
457
1061
  model: z.ZodObject<{
458
1062
  entityId: z.ZodString;
459
- defaultSearchField: z.ZodString;
460
- defaultOrderBy: z.ZodString;
1063
+ defaultSearchField: z.ZodOptional<z.ZodString>;
1064
+ defaultOrderBy: z.ZodOptional<z.ZodString>;
461
1065
  }, z.core.$strip>;
462
1066
  model_test: z.ZodObject<{
463
1067
  entityId: z.ZodString;
@@ -554,6 +1158,7 @@ export type FixtureSearchOptions = {
554
1158
  value: string;
555
1159
  searchType: "equals" | "like";
556
1160
  };
1161
+ type ColumnValue = string | number | boolean | Date | null;
557
1162
  export type FixtureRecord = {
558
1163
  fixtureId: string;
559
1164
  entityId: string;
@@ -561,7 +1166,7 @@ export type FixtureRecord = {
561
1166
  columns: {
562
1167
  [key: string]: {
563
1168
  prop: EntityProp;
564
- value: any;
1169
+ value: ColumnValue | ColumnValue[];
565
1170
  };
566
1171
  };
567
1172
  fetchedRecords: string[];
@@ -573,7 +1178,7 @@ export type FixtureRecord = {
573
1178
  export type FixtureImportResult = {
574
1179
  entityId: string;
575
1180
  data: {
576
- [key: string]: any;
1181
+ [key: string]: ColumnValue;
577
1182
  };
578
1183
  };
579
1184
  export type RelationNode = {