sonamu 0.4.14 → 0.5.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 (348) hide show
  1. package/.swcrc +15 -0
  2. package/dist/api/base-frame.d.ts +8 -0
  3. package/dist/api/base-frame.d.ts.map +1 -0
  4. package/dist/api/base-frame.js +2 -0
  5. package/dist/api/base-frame.js.map +1 -0
  6. package/dist/api/caster.d.ts +5 -0
  7. package/dist/api/caster.d.ts.map +1 -0
  8. package/dist/api/caster.js +2 -0
  9. package/dist/api/caster.js.map +1 -0
  10. package/dist/api/code-converters.d.ts +23 -0
  11. package/dist/api/code-converters.d.ts.map +1 -0
  12. package/dist/api/code-converters.js +2 -0
  13. package/dist/api/code-converters.js.map +1 -0
  14. package/dist/api/context.d.ts +16 -0
  15. package/dist/api/context.d.ts.map +1 -0
  16. package/dist/api/context.js +2 -0
  17. package/dist/api/context.js.map +1 -0
  18. package/dist/api/decorators.d.ts +50 -0
  19. package/dist/api/decorators.d.ts.map +1 -0
  20. package/dist/api/decorators.js +2 -0
  21. package/dist/api/decorators.js.map +1 -0
  22. package/dist/api/index.d.ts +8 -0
  23. package/dist/api/index.d.ts.map +1 -0
  24. package/dist/api/index.js +2 -0
  25. package/dist/api/index.js.map +1 -0
  26. package/dist/api/sonamu.d.ts +83 -0
  27. package/dist/api/sonamu.d.ts.map +1 -0
  28. package/dist/api/sonamu.js +2 -0
  29. package/dist/api/sonamu.js.map +1 -0
  30. package/dist/api/sonamu.types.d.ts +30 -0
  31. package/dist/api/sonamu.types.d.ts.map +1 -0
  32. package/dist/api/sonamu.types.js +2 -0
  33. package/dist/api/sonamu.types.js.map +1 -0
  34. package/dist/bin/build-config.d.ts +5 -0
  35. package/dist/bin/build-config.d.ts.map +1 -0
  36. package/dist/bin/build-config.js +2 -0
  37. package/dist/bin/build-config.js.map +1 -0
  38. package/dist/bin/cli-wrapper.d.ts +2 -0
  39. package/dist/bin/cli-wrapper.d.ts.map +1 -0
  40. package/dist/bin/cli-wrapper.js +1 -38
  41. package/dist/bin/cli-wrapper.js.map +1 -1
  42. package/dist/bin/cli.d.ts +2 -2
  43. package/dist/bin/cli.d.ts.map +1 -0
  44. package/dist/bin/cli.js +1 -903
  45. package/dist/bin/cli.js.map +1 -1
  46. package/dist/database/_batch_update.d.ts +15 -0
  47. package/dist/database/_batch_update.d.ts.map +1 -0
  48. package/dist/database/_batch_update.js +2 -0
  49. package/dist/database/_batch_update.js.map +1 -0
  50. package/dist/database/base-model.d.ts +41 -0
  51. package/dist/database/base-model.d.ts.map +1 -0
  52. package/dist/database/base-model.js +2 -0
  53. package/dist/database/base-model.js.map +1 -0
  54. package/dist/database/code-generator.d.ts +13 -0
  55. package/dist/database/code-generator.d.ts.map +1 -0
  56. package/dist/database/code-generator.js +2 -0
  57. package/dist/database/code-generator.js.map +1 -0
  58. package/dist/database/db.d.ts +40 -0
  59. package/dist/database/db.d.ts.map +1 -0
  60. package/dist/database/db.js +2 -0
  61. package/dist/database/db.js.map +1 -0
  62. package/dist/database/knex-plugins/knex-on-duplicate-update.d.ts +2 -0
  63. package/dist/database/knex-plugins/knex-on-duplicate-update.d.ts.map +1 -0
  64. package/dist/database/knex-plugins/knex-on-duplicate-update.js +2 -0
  65. package/dist/database/knex-plugins/knex-on-duplicate-update.js.map +1 -0
  66. package/dist/database/puri-wrapper.d.ts +34 -0
  67. package/dist/database/puri-wrapper.d.ts.map +1 -0
  68. package/dist/database/puri-wrapper.js +2 -0
  69. package/dist/database/puri-wrapper.js.map +1 -0
  70. package/dist/database/puri.d.ts +83 -0
  71. package/dist/database/puri.d.ts.map +1 -0
  72. package/dist/database/puri.js +2 -0
  73. package/dist/database/puri.js.map +1 -0
  74. package/dist/database/puri.types.d.ts +60 -0
  75. package/dist/database/puri.types.d.ts.map +1 -0
  76. package/dist/database/puri.types.js +2 -0
  77. package/dist/database/puri.types.js.map +1 -0
  78. package/dist/database/transaction-context.d.ts +9 -0
  79. package/dist/database/transaction-context.d.ts.map +1 -0
  80. package/dist/database/transaction-context.js +2 -0
  81. package/dist/database/transaction-context.js.map +1 -0
  82. package/dist/database/types.d.ts +39 -0
  83. package/dist/database/types.d.ts.map +1 -0
  84. package/dist/database/types.js +2 -0
  85. package/dist/database/types.js.map +1 -0
  86. package/dist/database/upsert-builder.d.ts +34 -0
  87. package/dist/database/upsert-builder.d.ts.map +1 -0
  88. package/dist/database/upsert-builder.js +2 -0
  89. package/dist/database/upsert-builder.js.map +1 -0
  90. package/dist/entity/entity-manager.d.ts +32 -0
  91. package/dist/entity/entity-manager.d.ts.map +1 -0
  92. package/dist/entity/entity-manager.js +2 -0
  93. package/dist/entity/entity-manager.js.map +1 -0
  94. package/dist/entity/entity-utils.d.ts +61 -0
  95. package/dist/entity/entity-utils.d.ts.map +1 -0
  96. package/dist/entity/entity-utils.js +2 -0
  97. package/dist/entity/entity-utils.js.map +1 -0
  98. package/dist/entity/entity.d.ts +62 -0
  99. package/dist/entity/entity.d.ts.map +1 -0
  100. package/dist/entity/entity.js +2 -0
  101. package/dist/entity/entity.js.map +1 -0
  102. package/dist/entity/migrator.d.ts +135 -0
  103. package/dist/entity/migrator.d.ts.map +1 -0
  104. package/dist/entity/migrator.js +2 -0
  105. package/dist/entity/migrator.js.map +1 -0
  106. package/dist/exceptions/error-handler.d.ts +3 -0
  107. package/dist/exceptions/error-handler.d.ts.map +1 -0
  108. package/dist/exceptions/error-handler.js +2 -0
  109. package/dist/exceptions/error-handler.js.map +1 -0
  110. package/dist/exceptions/so-exceptions.d.ts +48 -0
  111. package/dist/exceptions/so-exceptions.d.ts.map +1 -0
  112. package/dist/exceptions/so-exceptions.js +2 -0
  113. package/dist/exceptions/so-exceptions.js.map +1 -0
  114. package/dist/file-storage/driver.d.ts +45 -0
  115. package/dist/file-storage/driver.d.ts.map +1 -0
  116. package/dist/file-storage/driver.js +2 -0
  117. package/dist/file-storage/driver.js.map +1 -0
  118. package/dist/file-storage/file-storage.d.ts +50 -0
  119. package/dist/file-storage/file-storage.d.ts.map +1 -0
  120. package/dist/file-storage/file-storage.js +2 -0
  121. package/dist/file-storage/file-storage.js.map +1 -0
  122. package/dist/index.d.ts +22 -813
  123. package/dist/index.d.ts.map +1 -0
  124. package/dist/index.js +1 -433
  125. package/dist/index.js.map +1 -1
  126. package/dist/migration/code-generation.d.ts +15 -0
  127. package/dist/migration/code-generation.d.ts.map +1 -0
  128. package/dist/migration/code-generation.js +2 -0
  129. package/dist/migration/code-generation.js.map +1 -0
  130. package/dist/migration/migration-set.d.ts +17 -0
  131. package/dist/migration/migration-set.d.ts.map +1 -0
  132. package/dist/migration/migration-set.js +2 -0
  133. package/dist/migration/migration-set.js.map +1 -0
  134. package/dist/migration/migrator.d.ts +130 -0
  135. package/dist/migration/migrator.d.ts.map +1 -0
  136. package/dist/migration/migrator.js +2 -0
  137. package/dist/migration/migrator.js.map +1 -0
  138. package/dist/migration/types.d.ts +52 -0
  139. package/dist/migration/types.d.ts.map +1 -0
  140. package/dist/migration/types.js +2 -0
  141. package/dist/migration/types.js.map +1 -0
  142. package/dist/smd/smd-manager.d.ts +28 -0
  143. package/dist/smd/smd-manager.d.ts.map +1 -0
  144. package/dist/smd/smd-manager.js +2 -0
  145. package/dist/smd/smd-manager.js.map +1 -0
  146. package/dist/smd/smd.d.ts +40 -0
  147. package/dist/smd/smd.d.ts.map +1 -0
  148. package/dist/smd/smd.js +2 -0
  149. package/dist/smd/smd.js.map +1 -0
  150. package/dist/syncer/index.d.ts +2 -0
  151. package/dist/syncer/index.d.ts.map +1 -0
  152. package/dist/syncer/index.js +2 -0
  153. package/dist/syncer/index.js.map +1 -0
  154. package/dist/syncer/syncer.d.ts +127 -0
  155. package/dist/syncer/syncer.d.ts.map +1 -0
  156. package/dist/syncer/syncer.js +2 -0
  157. package/dist/syncer/syncer.js.map +1 -0
  158. package/dist/templates/base-template.d.ts +13 -0
  159. package/dist/templates/base-template.d.ts.map +1 -0
  160. package/dist/templates/base-template.js +2 -0
  161. package/dist/templates/base-template.js.map +1 -0
  162. package/dist/templates/entity.template.d.ts +17 -0
  163. package/dist/templates/entity.template.d.ts.map +1 -0
  164. package/dist/templates/entity.template.js +2 -0
  165. package/dist/templates/entity.template.js.map +1 -0
  166. package/dist/templates/generated.template.d.ts +27 -0
  167. package/dist/templates/generated.template.d.ts.map +1 -0
  168. package/dist/templates/generated.template.js +2 -0
  169. package/dist/templates/generated.template.js.map +1 -0
  170. package/dist/templates/generated_http.template.d.ts +24 -0
  171. package/dist/templates/generated_http.template.d.ts.map +1 -0
  172. package/dist/templates/generated_http.template.js +2 -0
  173. package/dist/templates/generated_http.template.js.map +1 -0
  174. package/dist/templates/generated_sso.template.d.ts +20 -0
  175. package/dist/templates/generated_sso.template.d.ts.map +1 -0
  176. package/dist/templates/generated_sso.template.js +2 -0
  177. package/dist/templates/generated_sso.template.js.map +1 -0
  178. package/dist/templates/index.d.ts +2 -0
  179. package/dist/templates/index.d.ts.map +1 -0
  180. package/dist/templates/index.js +2 -0
  181. package/dist/templates/index.js.map +1 -0
  182. package/dist/templates/init_types.template.d.ts +17 -0
  183. package/dist/templates/init_types.template.d.ts.map +1 -0
  184. package/dist/templates/init_types.template.js +2 -0
  185. package/dist/templates/init_types.template.js.map +1 -0
  186. package/dist/templates/model.template.d.ts +17 -0
  187. package/dist/templates/model.template.d.ts.map +1 -0
  188. package/dist/templates/model.template.js +2 -0
  189. package/dist/templates/model.template.js.map +1 -0
  190. package/dist/templates/model_test.template.d.ts +17 -0
  191. package/dist/templates/model_test.template.d.ts.map +1 -0
  192. package/dist/templates/model_test.template.js +2 -0
  193. package/dist/templates/model_test.template.js.map +1 -0
  194. package/dist/templates/service.template.d.ts +29 -0
  195. package/dist/templates/service.template.d.ts.map +1 -0
  196. package/dist/templates/service.template.js +2 -0
  197. package/dist/templates/service.template.js.map +1 -0
  198. package/dist/templates/view_enums_buttonset.template.d.ts +17 -0
  199. package/dist/templates/view_enums_buttonset.template.d.ts.map +1 -0
  200. package/dist/templates/view_enums_buttonset.template.js +2 -0
  201. package/dist/templates/view_enums_buttonset.template.js.map +1 -0
  202. package/dist/templates/view_enums_dropdown.template.d.ts +18 -0
  203. package/dist/templates/view_enums_dropdown.template.d.ts.map +1 -0
  204. package/dist/templates/view_enums_dropdown.template.js +2 -0
  205. package/dist/templates/view_enums_dropdown.template.js.map +1 -0
  206. package/dist/templates/view_enums_select.template.d.ts +17 -0
  207. package/dist/templates/view_enums_select.template.d.ts.map +1 -0
  208. package/dist/templates/view_enums_select.template.js +2 -0
  209. package/dist/templates/view_enums_select.template.js.map +1 -0
  210. package/dist/templates/view_form.template.d.ts +26 -0
  211. package/dist/templates/view_form.template.d.ts.map +1 -0
  212. package/dist/templates/view_form.template.js +2 -0
  213. package/dist/templates/view_form.template.js.map +1 -0
  214. package/dist/templates/view_id_all_select.template.d.ts +17 -0
  215. package/dist/templates/view_id_all_select.template.d.ts.map +1 -0
  216. package/dist/templates/view_id_all_select.template.js +2 -0
  217. package/dist/templates/view_id_all_select.template.js.map +1 -0
  218. package/dist/templates/view_id_async_select.template.d.ts +17 -0
  219. package/dist/templates/view_id_async_select.template.d.ts.map +1 -0
  220. package/dist/templates/view_id_async_select.template.js +2 -0
  221. package/dist/templates/view_id_async_select.template.js.map +1 -0
  222. package/dist/templates/view_list.template.d.ts +38 -0
  223. package/dist/templates/view_list.template.d.ts.map +1 -0
  224. package/dist/templates/view_list.template.js +2 -0
  225. package/dist/templates/view_list.template.js.map +1 -0
  226. package/dist/templates/view_list_columns.template.d.ts +17 -0
  227. package/dist/templates/view_list_columns.template.d.ts.map +1 -0
  228. package/dist/templates/view_list_columns.template.js +2 -0
  229. package/dist/templates/view_list_columns.template.js.map +1 -0
  230. package/dist/templates/view_search_input.template.d.ts +17 -0
  231. package/dist/templates/view_search_input.template.d.ts.map +1 -0
  232. package/dist/templates/view_search_input.template.js +2 -0
  233. package/dist/templates/view_search_input.template.js.map +1 -0
  234. package/dist/testing/_relation-graph.d.ts +7 -0
  235. package/dist/testing/_relation-graph.d.ts.map +1 -0
  236. package/dist/testing/_relation-graph.js +2 -0
  237. package/dist/testing/_relation-graph.js.map +1 -0
  238. package/dist/testing/fixture-manager.d.ts +35 -0
  239. package/dist/testing/fixture-manager.d.ts.map +1 -0
  240. package/dist/testing/fixture-manager.js +2 -0
  241. package/dist/testing/fixture-manager.js.map +1 -0
  242. package/dist/types/types.d.ts +609 -0
  243. package/dist/types/types.d.ts.map +1 -0
  244. package/dist/types/types.js +2 -0
  245. package/dist/types/types.js.map +1 -0
  246. package/dist/typings/knex.d.js +2 -0
  247. package/dist/typings/knex.d.js.map +1 -0
  248. package/dist/utils/async-utils.d.ts +25 -0
  249. package/dist/utils/async-utils.d.ts.map +1 -0
  250. package/dist/utils/async-utils.js +2 -0
  251. package/dist/utils/async-utils.js.map +1 -0
  252. package/dist/utils/controller.d.ts +9 -0
  253. package/dist/utils/controller.d.ts.map +1 -0
  254. package/dist/utils/controller.js +2 -0
  255. package/dist/utils/controller.js.map +1 -0
  256. package/dist/utils/fs-utils.d.ts +9 -0
  257. package/dist/utils/fs-utils.d.ts.map +1 -0
  258. package/dist/utils/fs-utils.js +2 -0
  259. package/dist/utils/fs-utils.js.map +1 -0
  260. package/dist/utils/lodash-able.d.ts +2 -0
  261. package/dist/utils/lodash-able.d.ts.map +1 -0
  262. package/dist/utils/lodash-able.js +2 -0
  263. package/dist/utils/lodash-able.js.map +1 -0
  264. package/dist/utils/model.d.ts +17 -0
  265. package/dist/utils/model.d.ts.map +1 -0
  266. package/dist/utils/model.js +2 -0
  267. package/dist/utils/model.js.map +1 -0
  268. package/dist/utils/sql-parser.d.ts +4 -0
  269. package/dist/utils/sql-parser.d.ts.map +1 -0
  270. package/dist/utils/sql-parser.js +2 -0
  271. package/dist/utils/sql-parser.js.map +1 -0
  272. package/dist/utils/utils.d.ts +9 -0
  273. package/dist/utils/utils.d.ts.map +1 -0
  274. package/dist/utils/utils.js +2 -0
  275. package/dist/utils/utils.js.map +1 -0
  276. package/dist/utils/zod-error.d.ts +8 -0
  277. package/dist/utils/zod-error.d.ts.map +1 -0
  278. package/dist/utils/zod-error.js +2 -0
  279. package/dist/utils/zod-error.js.map +1 -0
  280. package/nodemon.json +6 -0
  281. package/package.json +29 -44
  282. package/src/api/base-frame.ts +3 -4
  283. package/src/api/caster.ts +22 -23
  284. package/src/api/code-converters.ts +170 -134
  285. package/src/api/context.ts +13 -6
  286. package/src/api/decorators.ts +146 -20
  287. package/src/api/index.ts +2 -0
  288. package/src/api/sonamu.ts +374 -165
  289. package/src/bin/build-config.ts +5 -0
  290. package/src/bin/cli-wrapper.ts +29 -40
  291. package/src/bin/cli.ts +132 -190
  292. package/src/database/_batch_update.ts +10 -15
  293. package/src/database/base-model.ts +300 -216
  294. package/src/database/db.ts +191 -21
  295. package/src/database/{drivers/knex/plugins → knex-plugins}/knex-on-duplicate-update.ts +1 -1
  296. package/src/database/puri-wrapper.ts +129 -0
  297. package/src/database/puri.ts +808 -0
  298. package/src/database/puri.types.ts +222 -0
  299. package/src/database/transaction-context.ts +18 -0
  300. package/src/database/upsert-builder.ts +32 -35
  301. package/src/entity/entity-manager.ts +7 -15
  302. package/src/entity/entity.ts +9 -31
  303. package/src/entity/migrator-/354/235/264/354/202/254/352/260/224/354/226/264/354/232/224.md +1 -0
  304. package/src/file-storage/driver.ts +121 -0
  305. package/src/file-storage/file-storage.ts +100 -0
  306. package/src/index.ts +14 -11
  307. package/src/migration/code-generation.ts +777 -0
  308. package/src/migration/migration-set.ts +453 -0
  309. package/src/migration/migrator.ts +823 -0
  310. package/src/migration/types.ts +53 -0
  311. package/src/shared/web.shared.ts.txt +33 -2
  312. package/src/syncer/syncer.ts +294 -127
  313. package/src/templates/generated.template.ts +13 -1
  314. package/src/templates/generated_http.template.ts +15 -12
  315. package/src/templates/generated_sso.template.ts +50 -2
  316. package/src/templates/model.template.ts +138 -2
  317. package/src/templates/service.template.ts +0 -1
  318. package/src/templates/view_form.template.ts +11 -7
  319. package/src/templates/view_list.template.ts +12 -4
  320. package/src/testing/fixture-manager.ts +229 -174
  321. package/src/types/types.ts +102 -14
  322. package/src/utils/async-utils.ts +64 -0
  323. package/src/utils/fs-utils.ts +17 -0
  324. package/src/utils/model.ts +0 -2
  325. package/src/utils/utils.ts +14 -58
  326. package/src/utils/zod-error.ts +12 -176
  327. package/tsconfig.json +2 -0
  328. package/tsup.config.js +4 -2
  329. package/.pnp.cjs +0 -14363
  330. package/.pnp.loader.mjs +0 -2047
  331. package/.vscode/extensions.json +0 -6
  332. package/.vscode/settings.json +0 -9
  333. package/.yarnrc.yml +0 -5
  334. package/src/database/base-model.abstract.ts +0 -97
  335. package/src/database/db.abstract.ts +0 -75
  336. package/src/database/drivers/knex/base-model.ts +0 -55
  337. package/src/database/drivers/knex/client.ts +0 -209
  338. package/src/database/drivers/knex/db.ts +0 -232
  339. package/src/database/drivers/knex/generator.ts +0 -659
  340. package/src/database/drivers/kysely/base-model.ts +0 -89
  341. package/src/database/drivers/kysely/client.ts +0 -309
  342. package/src/database/drivers/kysely/db.ts +0 -238
  343. package/src/database/drivers/kysely/generator.ts +0 -714
  344. package/src/database/types.ts +0 -118
  345. package/src/entity/migrator.ts +0 -1400
  346. package/src/smd/smd-manager.ts +0 -139
  347. package/src/smd/smd.ts +0 -571
  348. package/src/templates/kysely_types.template.ts +0 -205
@@ -0,0 +1,609 @@
1
+ import type { GuardKey } from "./../api/decorators";
2
+ import type { FastifyCorsOptions } from "@fastify/cors";
3
+ import type { FastifyFormbodyOptions } from "@fastify/formbody";
4
+ import type { FastifyInstance, FastifyReply, FastifyRequest, FastifyServerOptions } from "fastify";
5
+ import type { QsPluginOptions } from "fastify-qs";
6
+ import { z } from "zod";
7
+ import type { Context, ApiDecoratorOptions } from "../api";
8
+ import type { FastifyMultipartOptions } from "@fastify/multipart";
9
+ import type { Driver } from "../file-storage/driver";
10
+ export type EnumsLabel<T extends string, L extends "ko" | "en"> = {
11
+ [key in T]: {
12
+ [lang in L]: string;
13
+ };
14
+ };
15
+ export type EnumsLabelKo<T extends string> = EnumsLabel<T, "ko">;
16
+ export declare const SQLDateTimeString: z.ZodString;
17
+ export type SQLDateTimeString = z.infer<typeof SQLDateTimeString>;
18
+ export declare function zArrayable<T extends z.ZodTypeAny>(shape: T): z.ZodUnion<[T, z.ZodArray<T>]>;
19
+ export type DistributiveOmit<T, K extends keyof any> = T extends any ? Omit<T, K> : never;
20
+ export type CommonProp = {
21
+ name: string;
22
+ nullable?: boolean;
23
+ toFilter?: true;
24
+ desc?: string;
25
+ dbDefault?: string;
26
+ };
27
+ export type IntegerProp = CommonProp & {
28
+ type: "integer";
29
+ unsigned?: true;
30
+ };
31
+ export type BigIntegerProp = CommonProp & {
32
+ type: "bigInteger";
33
+ unsigned?: true;
34
+ };
35
+ export type TextProp = CommonProp & {
36
+ type: "text";
37
+ textType: "text" | "mediumtext" | "longtext";
38
+ };
39
+ export type StringProp = CommonProp & {
40
+ type: "string";
41
+ length: number;
42
+ };
43
+ export type EnumProp = CommonProp & {
44
+ type: "enum";
45
+ length: number;
46
+ id: string;
47
+ };
48
+ export type FloatProp = CommonProp & {
49
+ type: "float";
50
+ unsigned?: true;
51
+ precision: number;
52
+ scale: number;
53
+ };
54
+ export type DoubleProp = CommonProp & {
55
+ type: "double";
56
+ unsigned?: true;
57
+ precision: number;
58
+ scale: number;
59
+ };
60
+ export type DecimalProp = CommonProp & {
61
+ type: "decimal";
62
+ unsigned?: true;
63
+ precision: number;
64
+ scale: number;
65
+ };
66
+ export type BooleanProp = CommonProp & {
67
+ type: "boolean";
68
+ };
69
+ export type DateProp = CommonProp & {
70
+ type: "date";
71
+ };
72
+ export type DateTimeProp = CommonProp & {
73
+ type: "datetime";
74
+ };
75
+ export type TimeProp = CommonProp & {
76
+ type: "time";
77
+ };
78
+ export type TimestampProp = CommonProp & {
79
+ type: "timestamp";
80
+ };
81
+ export type JsonProp = CommonProp & {
82
+ type: "json";
83
+ id: string;
84
+ };
85
+ export type UuidProp = CommonProp & {
86
+ type: "uuid";
87
+ };
88
+ export type VirtualProp = CommonProp & {
89
+ type: "virtual";
90
+ id: string;
91
+ };
92
+ export type RelationType = "HasMany" | "BelongsToOne" | "ManyToMany" | "OneToOne";
93
+ export type RelationOn = "CASCADE" | "SET NULL" | "NO ACTION" | "SET DEFAULT" | "RESTRICT";
94
+ type _RelationProp = {
95
+ type: "relation";
96
+ name: string;
97
+ with: string;
98
+ nullable?: boolean;
99
+ toFilter?: true;
100
+ desc?: string;
101
+ };
102
+ export type OneToOneRelationProp = _RelationProp & {
103
+ relationType: "OneToOne";
104
+ customJoinClause?: string;
105
+ } & ({
106
+ hasJoinColumn: true;
107
+ useConstraint?: boolean;
108
+ onUpdate?: RelationOn;
109
+ onDelete?: RelationOn;
110
+ } | {
111
+ hasJoinColumn: false;
112
+ });
113
+ export type BelongsToOneRelationProp = _RelationProp & {
114
+ relationType: "BelongsToOne";
115
+ customJoinClause?: string;
116
+ useConstraint?: boolean;
117
+ onUpdate?: RelationOn;
118
+ onDelete?: RelationOn;
119
+ };
120
+ export type HasManyRelationProp = _RelationProp & {
121
+ relationType: "HasMany";
122
+ joinColumn: string;
123
+ fromColumn?: string;
124
+ };
125
+ export type ManyToManyRelationProp = _RelationProp & {
126
+ relationType: "ManyToMany";
127
+ joinTable: `${string}__${string}`;
128
+ onUpdate: RelationOn;
129
+ onDelete: RelationOn;
130
+ };
131
+ export type RelationProp = OneToOneRelationProp | BelongsToOneRelationProp | HasManyRelationProp | ManyToManyRelationProp;
132
+ export type EntityProp = IntegerProp | BigIntegerProp | TextProp | StringProp | FloatProp | DoubleProp | DecimalProp | BooleanProp | DateProp | DateTimeProp | TimeProp | TimestampProp | JsonProp | UuidProp | EnumProp | VirtualProp | RelationProp;
133
+ export type EntityIndex = {
134
+ type: "index" | "unique" | "fulltext";
135
+ columns: string[];
136
+ name?: string;
137
+ parser?: "built-in" | "ngram";
138
+ };
139
+ export type EntityJson = {
140
+ id: string;
141
+ parentId?: string;
142
+ table: string;
143
+ title?: string;
144
+ props: EntityProp[];
145
+ indexes: EntityIndex[];
146
+ subsets: {
147
+ [subset: string]: string[];
148
+ };
149
+ enums: {
150
+ [enumId: string]: {
151
+ [key: string]: string;
152
+ };
153
+ };
154
+ };
155
+ export type EntitySubsetRow = {
156
+ field: string;
157
+ has: {
158
+ [key: string]: boolean;
159
+ };
160
+ children: EntitySubsetRow[];
161
+ prefixes: string[];
162
+ relationEntity?: string;
163
+ isOpen?: boolean;
164
+ };
165
+ export type FlattenSubsetRow = Omit<EntitySubsetRow, "children">;
166
+ export type SMDInput<T extends string> = {
167
+ id: string;
168
+ parentId?: string;
169
+ table?: string;
170
+ title?: string;
171
+ props?: EntityProp[];
172
+ indexes?: EntityIndex[];
173
+ subsets?: {
174
+ [subset: string]: T[];
175
+ };
176
+ };
177
+ export type EntityPropNode = {
178
+ nodeType: "plain";
179
+ prop: EntityProp;
180
+ } | {
181
+ nodeType: "object" | "array";
182
+ prop?: EntityProp;
183
+ children: EntityPropNode[];
184
+ };
185
+ export declare function isIntegerProp(p: any): p is IntegerProp;
186
+ export declare function isBigIntegerProp(p: any): p is BigIntegerProp;
187
+ export declare function isTextProp(p: any): p is TextProp;
188
+ export declare function isStringProp(p: any): p is StringProp;
189
+ export declare function isEnumProp(p: any): p is EnumProp;
190
+ export declare function isFloatProp(p: any): p is FloatProp;
191
+ export declare function isDoubleProp(p: any): p is DoubleProp;
192
+ export declare function isDecimalProp(p: any): p is DecimalProp;
193
+ export declare function isBooleanProp(p: any): p is BooleanProp;
194
+ export declare function isDateProp(p: any): p is DateProp;
195
+ export declare function isDateTimeProp(p: any): p is DateTimeProp;
196
+ export declare function isTimeProp(p: any): p is TimeProp;
197
+ export declare function isTimestampProp(p: any): p is TimestampProp;
198
+ export declare function isJsonProp(p: any): p is JsonProp;
199
+ export declare function isUuidProp(p: any): p is UuidProp;
200
+ export declare function isVirtualProp(p: any): p is VirtualProp;
201
+ export declare function isRelationProp(p: any): p is RelationProp;
202
+ export declare function isOneToOneRelationProp(p: any): p is OneToOneRelationProp;
203
+ export declare function isBelongsToOneRelationProp(p: any): p is BelongsToOneRelationProp;
204
+ export declare function isHasManyRelationProp(p: any): p is HasManyRelationProp;
205
+ export declare function isManyToManyRelationProp(p: any): p is ManyToManyRelationProp;
206
+ type JoinClause = {
207
+ from: string;
208
+ to: string;
209
+ } | {
210
+ custom: string;
211
+ };
212
+ export declare function isCustomJoinClause(p: any): p is {
213
+ custom: string;
214
+ };
215
+ type SubsetLoader = {
216
+ as: string;
217
+ table: string;
218
+ manyJoin: {
219
+ fromTable: string;
220
+ fromCol: string;
221
+ idField: string;
222
+ toTable: string;
223
+ toCol: string;
224
+ through?: {
225
+ table: string;
226
+ fromCol: string;
227
+ toCol: string;
228
+ };
229
+ };
230
+ oneJoins: ({
231
+ as: string;
232
+ join: "inner" | "outer";
233
+ table: string;
234
+ } & JoinClause)[];
235
+ select: string[];
236
+ loaders?: SubsetLoader[];
237
+ };
238
+ export type SubsetQuery = {
239
+ select: string[];
240
+ virtual: string[];
241
+ joins: ({
242
+ as: string;
243
+ join: "inner" | "outer";
244
+ table: string;
245
+ } & JoinClause)[];
246
+ loaders: SubsetLoader[];
247
+ };
248
+ export declare const SonamuQueryMode: z.ZodEnum<{
249
+ count: "count";
250
+ both: "both";
251
+ list: "list";
252
+ }>;
253
+ export type SonamuQueryMode = z.infer<typeof SonamuQueryMode>;
254
+ export type KnexError = {
255
+ code: string;
256
+ errno: number;
257
+ sql: string;
258
+ sqlMessage: string;
259
+ sqlState: string;
260
+ };
261
+ export declare function isKnexError(e: any): e is KnexError;
262
+ export type KnexColumnType = "string" | "text" | "smalltext" | "mediumtext" | "longtext" | "integer" | "bigInteger" | "decimal" | "timestamp" | "boolean" | "foreign" | "uuid" | "json" | "float" | "date" | "time" | "datetime";
263
+ export type MigrationColumn = {
264
+ name: string;
265
+ type: KnexColumnType;
266
+ nullable: boolean;
267
+ unsigned?: boolean;
268
+ length?: number;
269
+ defaultTo?: string;
270
+ precision?: number;
271
+ scale?: number;
272
+ };
273
+ export type MigrationIndex = {
274
+ columns: string[];
275
+ type: "unique" | "index" | "fulltext";
276
+ parser?: "built-in" | "ngram";
277
+ };
278
+ export type MigrationForeign = {
279
+ columns: string[];
280
+ to: string;
281
+ onUpdate: RelationOn;
282
+ onDelete: RelationOn;
283
+ };
284
+ export type MigrationJoinTable = {
285
+ table: string;
286
+ indexes: MigrationIndex[];
287
+ columns: MigrationColumn[];
288
+ foreigns: MigrationForeign[];
289
+ };
290
+ export type MigrationSet = {
291
+ table: string;
292
+ columns: MigrationColumn[];
293
+ indexes: MigrationIndex[];
294
+ foreigns: MigrationForeign[];
295
+ };
296
+ export type MigrationSetAndJoinTable = MigrationSet & {
297
+ joinTables: MigrationJoinTable[];
298
+ };
299
+ export type GenMigrationCode = {
300
+ title: string;
301
+ table: string;
302
+ type: "normal" | "foreign";
303
+ formatted: string | null;
304
+ };
305
+ export type ApiParam = {
306
+ name: string;
307
+ type: ApiParamType;
308
+ optional: boolean;
309
+ defaultDef?: string;
310
+ };
311
+ export declare namespace ApiParamType {
312
+ type Object = {
313
+ t: "object";
314
+ props: ApiParam[];
315
+ };
316
+ type Union = {
317
+ t: "union";
318
+ types: ApiParamType[];
319
+ };
320
+ type Intersection = {
321
+ t: "intersection";
322
+ types: ApiParamType[];
323
+ };
324
+ type StringLiteral = {
325
+ t: "string-literal";
326
+ value: string;
327
+ };
328
+ type NumericLiteral = {
329
+ t: "numeric-literal";
330
+ value: number;
331
+ };
332
+ type Array = {
333
+ t: "array";
334
+ elementsType: ApiParamType;
335
+ };
336
+ type Ref = {
337
+ t: "ref";
338
+ id: string;
339
+ args?: ApiParamType[];
340
+ };
341
+ type IndexedAccess = {
342
+ t: "indexed-access";
343
+ object: ApiParamType;
344
+ index: ApiParamType;
345
+ };
346
+ type TupleType = {
347
+ t: "tuple-type";
348
+ elements: ApiParamType[];
349
+ };
350
+ type Pick = Ref & {
351
+ t: "ref";
352
+ id: "Pick";
353
+ };
354
+ type Omit = Ref & {
355
+ t: "ref";
356
+ id: "Omit";
357
+ };
358
+ type Partial = Ref & {
359
+ t: "ref";
360
+ id: "Partial";
361
+ };
362
+ type Promise = Ref & {
363
+ t: "ref";
364
+ id: "Promise";
365
+ };
366
+ type Context = Ref & {
367
+ t: "ref";
368
+ id: "Context";
369
+ };
370
+ type TypeParam = {
371
+ t: "type-param";
372
+ id: string;
373
+ constraint?: ApiParamType;
374
+ };
375
+ function isObject(v: any): v is ApiParamType.Object;
376
+ function isUnion(v: any): v is ApiParamType.Union;
377
+ function isIntersection(v: any): v is ApiParamType.Intersection;
378
+ function isStringLiteral(v: any): v is ApiParamType.StringLiteral;
379
+ function isNumericLiteral(v: any): v is ApiParamType.NumericLiteral;
380
+ function isArray(v: any): v is ApiParamType.Array;
381
+ function isRef(v: any): v is ApiParamType.Ref;
382
+ function isIndexedAccess(v: any): v is ApiParamType.IndexedAccess;
383
+ function isTupleType(v: any): v is ApiParamType.TupleType;
384
+ function isPick(v: any): v is ApiParamType.Pick;
385
+ function isOmit(v: any): v is ApiParamType.Omit;
386
+ function isPartial(v: any): v is ApiParamType.Partial;
387
+ function isPromise(v: any): v is ApiParamType.Promise;
388
+ function isContext(v: any): v is ApiParamType.Context;
389
+ function isRefKnex(v: any): v is ApiParamType.Ref;
390
+ function isTypeParam(v: any): v is ApiParamType.TypeParam;
391
+ }
392
+ 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;
393
+ export declare const RenderingNode: z.ZodAny;
394
+ export type RenderingNode = {
395
+ name: string;
396
+ label: string;
397
+ renderType: "string-plain" | "string-image" | "string-datetime" | "string-date" | "datetime" | "number-plain" | "number-id" | "number-fk_id" | "boolean" | "enums" | "array" | "array-images" | "object" | "object-pick" | "record";
398
+ zodType: z.ZodTypeAny;
399
+ element?: RenderingNode;
400
+ children?: RenderingNode[];
401
+ config?: {
402
+ picked: string;
403
+ };
404
+ optional?: boolean;
405
+ nullable?: boolean;
406
+ };
407
+ export declare const TemplateOptions: z.ZodObject<{
408
+ entity: z.ZodObject<{
409
+ entityId: z.ZodString;
410
+ parentId: z.ZodOptional<z.ZodString>;
411
+ title: z.ZodString;
412
+ table: z.ZodOptional<z.ZodString>;
413
+ props: z.ZodOptional<z.ZodArray<z.ZodObject<{}, z.core.$strip>>>;
414
+ indexes: z.ZodOptional<z.ZodArray<z.ZodObject<{}, z.core.$strip>>>;
415
+ subsets: z.ZodOptional<z.ZodObject<{}, z.core.$strip>>;
416
+ enums: z.ZodOptional<z.ZodObject<{}, z.core.$strip>>;
417
+ }, z.core.$strip>;
418
+ init_types: z.ZodObject<{
419
+ entityId: z.ZodString;
420
+ }, z.core.$strip>;
421
+ generated: z.ZodObject<{}, z.core.$strip>;
422
+ generated_sso: z.ZodObject<{}, z.core.$strip>;
423
+ generated_http: z.ZodObject<{
424
+ entityId: z.ZodString;
425
+ }, z.core.$strip>;
426
+ model: z.ZodObject<{
427
+ entityId: z.ZodString;
428
+ defaultSearchField: z.ZodString;
429
+ defaultOrderBy: z.ZodString;
430
+ }, z.core.$strip>;
431
+ model_test: z.ZodObject<{
432
+ entityId: z.ZodString;
433
+ }, z.core.$strip>;
434
+ bridge: z.ZodObject<{
435
+ entityId: z.ZodString;
436
+ }, z.core.$strip>;
437
+ service: z.ZodObject<{
438
+ namesRecord: z.ZodObject<{
439
+ fs: z.ZodString;
440
+ fsPlural: z.ZodString;
441
+ camel: z.ZodString;
442
+ camelPlural: z.ZodString;
443
+ capital: z.ZodString;
444
+ capitalPlural: z.ZodString;
445
+ upper: z.ZodString;
446
+ constant: z.ZodString;
447
+ }, z.core.$strip>;
448
+ modelTsPath: z.ZodString;
449
+ }, z.core.$strip>;
450
+ view_list: z.ZodObject<{
451
+ entityId: z.ZodString;
452
+ extra: z.ZodUnknown;
453
+ }, z.core.$strip>;
454
+ view_list_columns: z.ZodObject<{
455
+ entityId: z.ZodString;
456
+ columns: z.ZodArray<z.ZodObject<{
457
+ name: z.ZodString;
458
+ label: z.ZodString;
459
+ tc: z.ZodString;
460
+ }, z.core.$strip>>;
461
+ columnImports: z.ZodString;
462
+ }, z.core.$strip>;
463
+ view_search_input: z.ZodObject<{
464
+ entityId: z.ZodString;
465
+ }, z.core.$strip>;
466
+ view_form: z.ZodObject<{
467
+ entityId: z.ZodString;
468
+ }, z.core.$strip>;
469
+ view_id_all_select: z.ZodObject<{
470
+ entityId: z.ZodString;
471
+ }, z.core.$strip>;
472
+ view_id_async_select: z.ZodObject<{
473
+ entityId: z.ZodString;
474
+ textField: z.ZodString;
475
+ }, z.core.$strip>;
476
+ view_enums_select: z.ZodObject<{
477
+ entityId: z.ZodString;
478
+ enumId: z.ZodString;
479
+ }, z.core.$strip>;
480
+ view_enums_dropdown: z.ZodObject<{
481
+ entityId: z.ZodString;
482
+ enumId: z.ZodString;
483
+ }, z.core.$strip>;
484
+ view_enums_buttonset: z.ZodObject<{
485
+ entityId: z.ZodString;
486
+ enumId: z.ZodString;
487
+ }, z.core.$strip>;
488
+ }, z.core.$strip>;
489
+ export type TemplateOptions = z.infer<typeof TemplateOptions>;
490
+ export declare const TemplateKey: z.ZodEnum<{
491
+ entity: "entity";
492
+ init_types: "init_types";
493
+ generated: "generated";
494
+ generated_sso: "generated_sso";
495
+ generated_http: "generated_http";
496
+ model: "model";
497
+ model_test: "model_test";
498
+ bridge: "bridge";
499
+ service: "service";
500
+ view_list: "view_list";
501
+ view_list_columns: "view_list_columns";
502
+ view_search_input: "view_search_input";
503
+ view_form: "view_form";
504
+ view_id_all_select: "view_id_all_select";
505
+ view_id_async_select: "view_id_async_select";
506
+ view_enums_select: "view_enums_select";
507
+ view_enums_dropdown: "view_enums_dropdown";
508
+ view_enums_buttonset: "view_enums_buttonset";
509
+ }>;
510
+ export type TemplateKey = z.infer<typeof TemplateKey>;
511
+ export declare const GenerateOptions: z.ZodObject<{
512
+ overwrite: z.ZodOptional<z.ZodBoolean>;
513
+ }, z.core.$strip>;
514
+ export type GenerateOptions = z.infer<typeof GenerateOptions>;
515
+ export declare const PathAndCode: z.ZodObject<{
516
+ path: z.ZodString;
517
+ code: z.ZodString;
518
+ }, z.core.$strip>;
519
+ export type PathAndCode = z.infer<typeof PathAndCode>;
520
+ export type FixtureSearchOptions = {
521
+ entityId: string;
522
+ field: string;
523
+ value: string;
524
+ searchType: "equals" | "like";
525
+ };
526
+ export type FixtureRecord = {
527
+ fixtureId: string;
528
+ entityId: string;
529
+ id: number;
530
+ columns: {
531
+ [key: string]: {
532
+ prop: EntityProp;
533
+ value: any;
534
+ };
535
+ };
536
+ fetchedRecords: string[];
537
+ belongsRecords: string[];
538
+ target?: FixtureRecord;
539
+ unique?: FixtureRecord;
540
+ override?: boolean;
541
+ };
542
+ export type FixtureImportResult = {
543
+ entityId: string;
544
+ data: {
545
+ [key: string]: any;
546
+ };
547
+ };
548
+ export type RelationNode = {
549
+ fixtureId: string;
550
+ entityId: string;
551
+ related: Set<string>;
552
+ };
553
+ export interface DatabaseSchemaExtend {
554
+ }
555
+ export type ManyToManyBaseSchema<FromIdKey extends string, ToIdKey extends string> = {
556
+ id: number;
557
+ } & {
558
+ [K in `${FromIdKey}_id`]: number;
559
+ } & {
560
+ [K in `${ToIdKey}_id`]: number;
561
+ };
562
+ export type SonamuFastifyConfig = {
563
+ contextProvider: (defaultContext: Pick<Context, "request" | "reply" | "headers">, request: FastifyRequest, reply: FastifyReply) => Context;
564
+ guardHandler: (guard: GuardKey, request: FastifyRequest, api: {
565
+ typeParameters: ApiParamType.TypeParam[];
566
+ parameters: ApiParam[];
567
+ returnType: ApiParamType;
568
+ modelName: string;
569
+ methodName: string;
570
+ path: string;
571
+ options: ApiDecoratorOptions;
572
+ }) => void;
573
+ cache?: {
574
+ get: (key: string) => Promise<unknown | null>;
575
+ put: (key: string, value: unknown, ttl?: number) => Promise<void>;
576
+ resolveKey: (path: string, reqBody: {
577
+ [key: string]: unknown;
578
+ }) => {
579
+ cache: false;
580
+ } | {
581
+ cache: true;
582
+ key: string;
583
+ ttl?: number;
584
+ };
585
+ };
586
+ };
587
+ export type SonamuServerOptions = {
588
+ fastify?: FastifyServerOptions;
589
+ listen?: {
590
+ port: number;
591
+ host?: string;
592
+ };
593
+ plugins?: {
594
+ formbody?: boolean | FastifyFormbodyOptions;
595
+ qs?: boolean | QsPluginOptions;
596
+ cors?: boolean | FastifyCorsOptions;
597
+ multipart?: boolean | FastifyMultipartOptions;
598
+ custom?: (server: FastifyInstance) => void;
599
+ };
600
+ apiConfig: SonamuFastifyConfig;
601
+ storage?: Driver;
602
+ lifecycle?: {
603
+ onStart?: (server: FastifyInstance) => Promise<void> | void;
604
+ onShutdown?: (server: FastifyInstance) => Promise<void> | void;
605
+ onError?: (error: Error, request: FastifyRequest, reply: FastifyReply) => Promise<void> | void;
606
+ };
607
+ };
608
+ export {};
609
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAChE,OAAO,KAAK,EACV,eAAe,EACf,YAAY,EACZ,cAAc,EACd,oBAAoB,EACrB,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAClD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,OAAO,EAAE,mBAAmB,EAAE,MAAM,QAAQ,CAAC;AAC3D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,C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O,CAAC,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;QAC5D,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;QAC/D,OAAO,CAAC,EAAE,CACR,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,cAAc,EACvB,KAAK,EAAE,YAAY,KAChB,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;KAC3B,CAAC;CACH,CAAC"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:true});function _export(target,all){for(var name in all)Object.defineProperty(target,name,{enumerable:true,get:Object.getOwnPropertyDescriptor(all,name).get})}_export(exports,{get ApiParamType(){return ApiParamType},get GenerateOptions(){return GenerateOptions},get PathAndCode(){return PathAndCode},get RenderingNode(){return RenderingNode},get SQLDateTimeString(){return SQLDateTimeString},get SonamuQueryMode(){return SonamuQueryMode},get TemplateKey(){return TemplateKey},get TemplateOptions(){return TemplateOptions},get isBelongsToOneRelationProp(){return isBelongsToOneRelationProp},get isBigIntegerProp(){return isBigIntegerProp},get isBooleanProp(){return isBooleanProp},get isCustomJoinClause(){return isCustomJoinClause},get isDateProp(){return isDateProp},get isDateTimeProp(){return isDateTimeProp},get isDecimalProp(){return isDecimalProp},get isDoubleProp(){return isDoubleProp},get isEnumProp(){return isEnumProp},get isFloatProp(){return isFloatProp},get isHasManyRelationProp(){return isHasManyRelationProp},get isIntegerProp(){return isIntegerProp},get isJsonProp(){return isJsonProp},get isKnexError(){return isKnexError},get isManyToManyRelationProp(){return isManyToManyRelationProp},get isOneToOneRelationProp(){return isOneToOneRelationProp},get isRelationProp(){return isRelationProp},get isStringProp(){return isStringProp},get isTextProp(){return isTextProp},get isTimeProp(){return isTimeProp},get isTimestampProp(){return isTimestampProp},get isUuidProp(){return isUuidProp},get isVirtualProp(){return isVirtualProp},get zArrayable(){return zArrayable}});var _zod=require("zod");var SQLDateTimeString=_zod.z.string().regex(/([0-9]{4}-[0-9]{2}-[0-9]{2}( [0-9]{2}:[0-9]{2}:[0-9]{2})*)$/,{message:"잘못된 SQLDate 타입"}).min(10).max(19).describe("SQLDateTimeString");function zArrayable(shape){return _zod.z.union([shape,shape.array()])}function isIntegerProp(p){return(p===null||p===void 0?void 0:p.type)==="integer"}function isBigIntegerProp(p){return(p===null||p===void 0?void 0:p.type)==="bigInteger"}function isTextProp(p){return(p===null||p===void 0?void 0:p.type)==="text"}function isStringProp(p){return(p===null||p===void 0?void 0:p.type)==="string"}function isEnumProp(p){return(p===null||p===void 0?void 0:p.type)==="enum"}function isFloatProp(p){return(p===null||p===void 0?void 0:p.type)==="float"}function isDoubleProp(p){return(p===null||p===void 0?void 0:p.type)==="double"}function isDecimalProp(p){return(p===null||p===void 0?void 0:p.type)==="decimal"}function isBooleanProp(p){return(p===null||p===void 0?void 0:p.type)==="boolean"}function isDateProp(p){return(p===null||p===void 0?void 0:p.type)==="date"}function isDateTimeProp(p){return(p===null||p===void 0?void 0:p.type)==="datetime"}function isTimeProp(p){return(p===null||p===void 0?void 0:p.type)==="time"}function isTimestampProp(p){return(p===null||p===void 0?void 0:p.type)==="timestamp"}function isJsonProp(p){return(p===null||p===void 0?void 0:p.type)==="json"}function isUuidProp(p){return(p===null||p===void 0?void 0:p.type)==="uuid"}function isVirtualProp(p){return(p===null||p===void 0?void 0:p.type)==="virtual"}function isRelationProp(p){return(p===null||p===void 0?void 0:p.type)==="relation"}function isOneToOneRelationProp(p){return(p===null||p===void 0?void 0:p.relationType)==="OneToOne"}function isBelongsToOneRelationProp(p){return(p===null||p===void 0?void 0:p.relationType)==="BelongsToOne"}function isHasManyRelationProp(p){return(p===null||p===void 0?void 0:p.relationType)==="HasMany"}function isManyToManyRelationProp(p){return(p===null||p===void 0?void 0:p.relationType)==="ManyToMany"}function isCustomJoinClause(p){return p===null||p===void 0?void 0:p.custom}var SonamuQueryMode=_zod.z.enum(["both","list","count"]);function isKnexError(e){return e.code&&e.sqlMessage&&e.sqlState}(function(ApiParamType){function isObject(v){return(v===null||v===void 0?void 0:v.t)==="object"}ApiParamType.isObject=isObject;function isUnion(v){return(v===null||v===void 0?void 0:v.t)==="union"}ApiParamType.isUnion=isUnion;function isIntersection(v){return(v===null||v===void 0?void 0:v.t)==="intersection"}ApiParamType.isIntersection=isIntersection;function isStringLiteral(v){return(v===null||v===void 0?void 0:v.t)==="string-literal"}ApiParamType.isStringLiteral=isStringLiteral;function isNumericLiteral(v){return(v===null||v===void 0?void 0:v.t)==="numeric-literal"}ApiParamType.isNumericLiteral=isNumericLiteral;function isArray(v){return(v===null||v===void 0?void 0:v.t)==="array"}ApiParamType.isArray=isArray;function isRef(v){return(v===null||v===void 0?void 0:v.t)==="ref"}ApiParamType.isRef=isRef;function isIndexedAccess(v){return(v===null||v===void 0?void 0:v.t)==="indexed-access"}ApiParamType.isIndexedAccess=isIndexedAccess;function isTupleType(v){return(v===null||v===void 0?void 0:v.t)==="tuple-type"}ApiParamType.isTupleType=isTupleType;function isPick(v){return(v===null||v===void 0?void 0:v.t)==="ref"&&v.id==="Pick"}ApiParamType.isPick=isPick;function isOmit(v){return(v===null||v===void 0?void 0:v.t)==="ref"&&v.id==="Omit"}ApiParamType.isOmit=isOmit;function isPartial(v){return(v===null||v===void 0?void 0:v.t)==="ref"&&v.id==="Partial"}ApiParamType.isPartial=isPartial;function isPromise(v){return(v===null||v===void 0?void 0:v.t)==="ref"&&v.id==="Promise"}ApiParamType.isPromise=isPromise;function isContext(v){return(v===null||v===void 0?void 0:v.t)==="ref"&&v.id==="Context"}ApiParamType.isContext=isContext;function isRefKnex(v){return(v===null||v===void 0?void 0:v.t)==="ref"&&v.id==="Knex"}ApiParamType.isRefKnex=isRefKnex;function isTypeParam(v){return(v===null||v===void 0?void 0:v.t)==="type-param"}ApiParamType.isTypeParam=isTypeParam})(ApiParamType||(ApiParamType={}));var RenderingNode=_zod.z.any();var TemplateOptions=_zod.z.object({entity:_zod.z.object({entityId:_zod.z.string(),parentId:_zod.z.string().optional(),title:_zod.z.string(),table:_zod.z.string().optional(),props:_zod.z.array(_zod.z.object({})).optional(),indexes:_zod.z.array(_zod.z.object({})).optional(),subsets:_zod.z.object({}).optional(),enums:_zod.z.object({}).optional()}),init_types:_zod.z.object({entityId:_zod.z.string()}),generated:_zod.z.object({}),generated_sso:_zod.z.object({}),generated_http:_zod.z.object({entityId:_zod.z.string()}),model:_zod.z.object({entityId:_zod.z.string(),defaultSearchField:_zod.z.string(),defaultOrderBy:_zod.z.string()}),model_test:_zod.z.object({entityId:_zod.z.string()}),bridge:_zod.z.object({entityId:_zod.z.string()}),service:_zod.z.object({namesRecord:_zod.z.object({fs:_zod.z.string(),fsPlural:_zod.z.string(),camel:_zod.z.string(),camelPlural:_zod.z.string(),capital:_zod.z.string(),capitalPlural:_zod.z.string(),upper:_zod.z.string(),constant:_zod.z.string()}),modelTsPath:_zod.z.string()}),view_list:_zod.z.object({entityId:_zod.z.string(),extra:_zod.z.unknown()}),view_list_columns:_zod.z.object({entityId:_zod.z.string(),columns:_zod.z.object({name:_zod.z.string(),label:_zod.z.string(),tc:_zod.z.string()}).array(),columnImports:_zod.z.string()}),view_search_input:_zod.z.object({entityId:_zod.z.string()}),view_form:_zod.z.object({entityId:_zod.z.string()}),view_id_all_select:_zod.z.object({entityId:_zod.z.string()}),view_id_async_select:_zod.z.object({entityId:_zod.z.string(),textField:_zod.z.string()}),view_enums_select:_zod.z.object({entityId:_zod.z.string(),enumId:_zod.z.string()}),view_enums_dropdown:_zod.z.object({entityId:_zod.z.string(),enumId:_zod.z.string()}),view_enums_buttonset:_zod.z.object({entityId:_zod.z.string(),enumId:_zod.z.string()})});var TemplateKey=_zod.z.enum(["entity","init_types","generated","generated_sso","generated_http","model","model_test","bridge","service","view_list","view_list_columns","view_search_input","view_form","view_id_all_select","view_id_async_select","view_enums_select","view_enums_dropdown","view_enums_buttonset"]);var GenerateOptions=_zod.z.object({overwrite:_zod.z.boolean().optional()});var PathAndCode=_zod.z.object({path:_zod.z.string(),code:_zod.z.string()});var ApiParamType;
2
+ //# sourceMappingURL=types.js.map