velocious 1.0.146 → 1.0.148

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 (448) hide show
  1. package/README.md +15 -0
  2. package/build/src/application.d.ts +25 -16
  3. package/build/src/application.d.ts.map +1 -1
  4. package/build/src/application.js +17 -17
  5. package/build/src/cli/base-command.d.ts +26 -14
  6. package/build/src/cli/base-command.d.ts.map +1 -1
  7. package/build/src/cli/base-command.js +13 -13
  8. package/build/src/cli/browser-cli.d.ts +5 -5
  9. package/build/src/cli/browser-cli.js +6 -6
  10. package/build/src/cli/commands/db/create.d.ts +4 -4
  11. package/build/src/cli/commands/db/create.js +5 -5
  12. package/build/src/cli/commands/destroy/migration.d.ts +0 -1
  13. package/build/src/cli/commands/destroy/migration.d.ts.map +1 -1
  14. package/build/src/cli/commands/generate/base-models.d.ts +0 -1
  15. package/build/src/cli/commands/generate/base-models.d.ts.map +1 -1
  16. package/build/src/cli/commands/generate/migration.d.ts +0 -1
  17. package/build/src/cli/commands/generate/migration.d.ts.map +1 -1
  18. package/build/src/cli/commands/generate/model.d.ts +0 -1
  19. package/build/src/cli/commands/generate/model.d.ts.map +1 -1
  20. package/build/src/cli/commands/init.d.ts +0 -1
  21. package/build/src/cli/commands/init.d.ts.map +1 -1
  22. package/build/src/cli/commands/routes.d.ts +0 -1
  23. package/build/src/cli/commands/routes.d.ts.map +1 -1
  24. package/build/src/cli/commands/server.d.ts +0 -1
  25. package/build/src/cli/commands/server.d.ts.map +1 -1
  26. package/build/src/cli/commands/test.d.ts +0 -1
  27. package/build/src/cli/commands/test.d.ts.map +1 -1
  28. package/build/src/cli/index.d.ts +11 -11
  29. package/build/src/cli/index.d.ts.map +1 -1
  30. package/build/src/cli/index.js +9 -9
  31. package/build/src/cli/use-browser-cli.d.ts +2 -2
  32. package/build/src/cli/use-browser-cli.js +3 -3
  33. package/build/src/configuration-resolver.d.ts +2 -2
  34. package/build/src/configuration-resolver.js +3 -3
  35. package/build/src/configuration-types.d.ts +149 -44
  36. package/build/src/configuration-types.d.ts.map +1 -1
  37. package/build/src/configuration-types.js +43 -43
  38. package/build/src/configuration.d.ts +75 -59
  39. package/build/src/configuration.d.ts.map +1 -1
  40. package/build/src/configuration.js +68 -56
  41. package/build/src/controller.d.ts +29 -29
  42. package/build/src/controller.d.ts.map +1 -1
  43. package/build/src/controller.js +28 -28
  44. package/build/src/database/drivers/base-column.d.ts +15 -15
  45. package/build/src/database/drivers/base-column.d.ts.map +1 -1
  46. package/build/src/database/drivers/base-column.js +15 -15
  47. package/build/src/database/drivers/base-columns-index.d.ts +10 -10
  48. package/build/src/database/drivers/base-columns-index.js +11 -11
  49. package/build/src/database/drivers/base-foreign-key.d.ts +12 -12
  50. package/build/src/database/drivers/base-foreign-key.d.ts.map +1 -1
  51. package/build/src/database/drivers/base-foreign-key.js +11 -11
  52. package/build/src/database/drivers/base-table.d.ts +15 -15
  53. package/build/src/database/drivers/base-table.d.ts.map +1 -1
  54. package/build/src/database/drivers/base-table.js +16 -15
  55. package/build/src/database/drivers/base.d.ts +189 -131
  56. package/build/src/database/drivers/base.d.ts.map +1 -1
  57. package/build/src/database/drivers/base.js +159 -142
  58. package/build/src/database/drivers/mssql/column.d.ts +5 -4
  59. package/build/src/database/drivers/mssql/column.d.ts.map +1 -1
  60. package/build/src/database/drivers/mssql/column.js +3 -3
  61. package/build/src/database/drivers/mssql/connect-connection.d.ts +6 -1
  62. package/build/src/database/drivers/mssql/connect-connection.d.ts.map +1 -1
  63. package/build/src/database/drivers/mssql/connect-connection.js +6 -2
  64. package/build/src/database/drivers/mssql/index.d.ts +5 -15
  65. package/build/src/database/drivers/mssql/index.d.ts.map +1 -1
  66. package/build/src/database/drivers/mssql/index.js +57 -56
  67. package/build/src/database/drivers/mssql/options.d.ts +2 -2
  68. package/build/src/database/drivers/mssql/options.js +13 -13
  69. package/build/src/database/drivers/mssql/sql/create-database.js +5 -5
  70. package/build/src/database/drivers/mssql/structure-sql.d.ts +6 -6
  71. package/build/src/database/drivers/mssql/structure-sql.d.ts.map +1 -1
  72. package/build/src/database/drivers/mssql/structure-sql.js +23 -15
  73. package/build/src/database/drivers/mssql/table.d.ts +4 -5
  74. package/build/src/database/drivers/mssql/table.d.ts.map +1 -1
  75. package/build/src/database/drivers/mssql/table.js +8 -6
  76. package/build/src/database/drivers/mysql/column.d.ts +5 -4
  77. package/build/src/database/drivers/mysql/column.d.ts.map +1 -1
  78. package/build/src/database/drivers/mysql/column.js +3 -3
  79. package/build/src/database/drivers/mysql/index.d.ts +8 -8
  80. package/build/src/database/drivers/mysql/index.d.ts.map +1 -1
  81. package/build/src/database/drivers/mysql/index.js +45 -45
  82. package/build/src/database/drivers/mysql/options.d.ts +2 -2
  83. package/build/src/database/drivers/mysql/options.js +5 -5
  84. package/build/src/database/drivers/mysql/query.d.ts +4 -3
  85. package/build/src/database/drivers/mysql/query.d.ts.map +1 -1
  86. package/build/src/database/drivers/mysql/query.js +5 -4
  87. package/build/src/database/drivers/mysql/structure-sql.d.ts +7 -7
  88. package/build/src/database/drivers/mysql/structure-sql.d.ts.map +1 -1
  89. package/build/src/database/drivers/mysql/structure-sql.js +12 -10
  90. package/build/src/database/drivers/mysql/table.d.ts +4 -5
  91. package/build/src/database/drivers/mysql/table.d.ts.map +1 -1
  92. package/build/src/database/drivers/mysql/table.js +5 -4
  93. package/build/src/database/drivers/pgsql/column.d.ts +5 -4
  94. package/build/src/database/drivers/pgsql/column.d.ts.map +1 -1
  95. package/build/src/database/drivers/pgsql/column.js +3 -3
  96. package/build/src/database/drivers/pgsql/index.d.ts +1 -6
  97. package/build/src/database/drivers/pgsql/index.d.ts.map +1 -1
  98. package/build/src/database/drivers/pgsql/index.js +31 -31
  99. package/build/src/database/drivers/pgsql/options.d.ts +3 -3
  100. package/build/src/database/drivers/pgsql/options.js +4 -4
  101. package/build/src/database/drivers/pgsql/structure-sql.d.ts +6 -6
  102. package/build/src/database/drivers/pgsql/structure-sql.d.ts.map +1 -1
  103. package/build/src/database/drivers/pgsql/structure-sql.js +21 -14
  104. package/build/src/database/drivers/pgsql/table.d.ts +4 -5
  105. package/build/src/database/drivers/pgsql/table.d.ts.map +1 -1
  106. package/build/src/database/drivers/pgsql/table.js +4 -3
  107. package/build/src/database/drivers/sqlite/base.d.ts +22 -20
  108. package/build/src/database/drivers/sqlite/base.d.ts.map +1 -1
  109. package/build/src/database/drivers/sqlite/base.js +58 -55
  110. package/build/src/database/drivers/sqlite/column.d.ts +7 -6
  111. package/build/src/database/drivers/sqlite/column.d.ts.map +1 -1
  112. package/build/src/database/drivers/sqlite/column.js +5 -5
  113. package/build/src/database/drivers/sqlite/connection-sql-js.d.ts +5 -5
  114. package/build/src/database/drivers/sqlite/connection-sql-js.d.ts.map +1 -1
  115. package/build/src/database/drivers/sqlite/connection-sql-js.js +5 -5
  116. package/build/src/database/drivers/sqlite/foreign-key.d.ts +4 -4
  117. package/build/src/database/drivers/sqlite/foreign-key.d.ts.map +1 -1
  118. package/build/src/database/drivers/sqlite/foreign-key.js +4 -4
  119. package/build/src/database/drivers/sqlite/index.js +3 -3
  120. package/build/src/database/drivers/sqlite/index.web.d.ts +9 -2
  121. package/build/src/database/drivers/sqlite/index.web.d.ts.map +1 -1
  122. package/build/src/database/drivers/sqlite/index.web.js +8 -5
  123. package/build/src/database/drivers/sqlite/options.d.ts +3 -3
  124. package/build/src/database/drivers/sqlite/options.js +4 -4
  125. package/build/src/database/drivers/sqlite/query.d.ts +4 -4
  126. package/build/src/database/drivers/sqlite/query.d.ts.map +1 -1
  127. package/build/src/database/drivers/sqlite/query.js +5 -5
  128. package/build/src/database/drivers/sqlite/query.native.d.ts +9 -1
  129. package/build/src/database/drivers/sqlite/query.native.d.ts.map +1 -1
  130. package/build/src/database/drivers/sqlite/query.native.js +7 -1
  131. package/build/src/database/drivers/sqlite/query.web.d.ts +4 -4
  132. package/build/src/database/drivers/sqlite/query.web.d.ts.map +1 -1
  133. package/build/src/database/drivers/sqlite/query.web.js +5 -5
  134. package/build/src/database/drivers/sqlite/sql/alter-table.js +5 -5
  135. package/build/src/database/drivers/sqlite/structure-sql.d.ts +3 -3
  136. package/build/src/database/drivers/sqlite/structure-sql.js +5 -5
  137. package/build/src/database/drivers/sqlite/table.d.ts +9 -7
  138. package/build/src/database/drivers/sqlite/table.d.ts.map +1 -1
  139. package/build/src/database/drivers/sqlite/table.js +12 -8
  140. package/build/src/database/drivers/structure-sql/utils.d.ts +8 -8
  141. package/build/src/database/drivers/structure-sql/utils.js +9 -9
  142. package/build/src/database/handler.d.ts +1 -1
  143. package/build/src/database/handler.js +2 -2
  144. package/build/src/database/initializer-from-require-context.d.ts +5 -5
  145. package/build/src/database/initializer-from-require-context.js +6 -6
  146. package/build/src/database/migration/index.d.ts +98 -62
  147. package/build/src/database/migration/index.d.ts.map +1 -1
  148. package/build/src/database/migration/index.js +74 -74
  149. package/build/src/database/migrator/files-finder.d.ts +3 -3
  150. package/build/src/database/migrator/files-finder.js +4 -4
  151. package/build/src/database/migrator/types.d.ts +12 -0
  152. package/build/src/database/migrator/types.d.ts.map +1 -1
  153. package/build/src/database/migrator/types.js +1 -1
  154. package/build/src/database/migrator.d.ts +24 -24
  155. package/build/src/database/migrator.d.ts.map +1 -1
  156. package/build/src/database/migrator.js +25 -25
  157. package/build/src/database/pool/async-tracked-multi-connection.d.ts +8 -8
  158. package/build/src/database/pool/async-tracked-multi-connection.js +18 -18
  159. package/build/src/database/pool/base-methods-forward.d.ts +2 -2
  160. package/build/src/database/pool/base-methods-forward.js +3 -3
  161. package/build/src/database/pool/base.d.ts +19 -19
  162. package/build/src/database/pool/base.js +20 -20
  163. package/build/src/database/pool/single-multi-use.js +6 -6
  164. package/build/src/database/query/alter-table-base.d.ts +3 -3
  165. package/build/src/database/query/alter-table-base.js +5 -5
  166. package/build/src/database/query/base.d.ts +5 -5
  167. package/build/src/database/query/base.d.ts.map +1 -1
  168. package/build/src/database/query/base.js +6 -6
  169. package/build/src/database/query/create-database-base.d.ts +11 -2
  170. package/build/src/database/query/create-database-base.d.ts.map +1 -1
  171. package/build/src/database/query/create-database-base.js +6 -6
  172. package/build/src/database/query/create-index-base.d.ts +25 -7
  173. package/build/src/database/query/create-index-base.d.ts.map +1 -1
  174. package/build/src/database/query/create-index-base.js +9 -9
  175. package/build/src/database/query/create-table-base.d.ts +6 -6
  176. package/build/src/database/query/create-table-base.js +7 -7
  177. package/build/src/database/query/delete-base.d.ts +6 -6
  178. package/build/src/database/query/delete-base.d.ts.map +1 -1
  179. package/build/src/database/query/delete-base.js +5 -5
  180. package/build/src/database/query/drop-table-base.d.ts +5 -5
  181. package/build/src/database/query/drop-table-base.js +7 -7
  182. package/build/src/database/query/from-base.d.ts +4 -4
  183. package/build/src/database/query/from-base.js +5 -5
  184. package/build/src/database/query/from-plain.d.ts +1 -1
  185. package/build/src/database/query/from-plain.js +2 -2
  186. package/build/src/database/query/from-table.d.ts +1 -1
  187. package/build/src/database/query/from-table.js +2 -2
  188. package/build/src/database/query/index.d.ts +88 -48
  189. package/build/src/database/query/index.d.ts.map +1 -1
  190. package/build/src/database/query/index.js +46 -46
  191. package/build/src/database/query/insert-base.d.ts +16 -15
  192. package/build/src/database/query/insert-base.d.ts.map +1 -1
  193. package/build/src/database/query/insert-base.js +12 -11
  194. package/build/src/database/query/join-base.d.ts +4 -4
  195. package/build/src/database/query/join-base.js +5 -5
  196. package/build/src/database/query/join-object.d.ts +6 -6
  197. package/build/src/database/query/join-object.js +7 -7
  198. package/build/src/database/query/join-plain.d.ts +1 -1
  199. package/build/src/database/query/join-plain.js +2 -2
  200. package/build/src/database/query/model-class-query.d.ts +28 -28
  201. package/build/src/database/query/model-class-query.d.ts.map +1 -1
  202. package/build/src/database/query/model-class-query.js +25 -25
  203. package/build/src/database/query/order-base.d.ts +4 -4
  204. package/build/src/database/query/order-base.js +5 -5
  205. package/build/src/database/query/order-plain.d.ts +2 -2
  206. package/build/src/database/query/order-plain.js +3 -3
  207. package/build/src/database/query/preloader/belongs-to.d.ts +3 -3
  208. package/build/src/database/query/preloader/belongs-to.d.ts.map +1 -1
  209. package/build/src/database/query/preloader/belongs-to.js +15 -13
  210. package/build/src/database/query/preloader/has-many.d.ts +3 -3
  211. package/build/src/database/query/preloader/has-many.js +7 -7
  212. package/build/src/database/query/preloader/has-one.d.ts +3 -3
  213. package/build/src/database/query/preloader/has-one.js +7 -7
  214. package/build/src/database/query/preloader.d.ts +6 -6
  215. package/build/src/database/query/preloader.d.ts.map +1 -1
  216. package/build/src/database/query/preloader.js +5 -5
  217. package/build/src/database/query/select-base.d.ts +3 -3
  218. package/build/src/database/query/select-base.js +4 -4
  219. package/build/src/database/query/select-plain.d.ts +1 -1
  220. package/build/src/database/query/select-plain.js +2 -2
  221. package/build/src/database/query/select-table-and-column.d.ts +2 -2
  222. package/build/src/database/query/select-table-and-column.js +3 -3
  223. package/build/src/database/query/update-base.d.ts +10 -10
  224. package/build/src/database/query/update-base.d.ts.map +1 -1
  225. package/build/src/database/query/update-base.js +7 -7
  226. package/build/src/database/query/where-base.d.ts +4 -4
  227. package/build/src/database/query/where-base.js +5 -5
  228. package/build/src/database/query/where-hash.d.ts +8 -7
  229. package/build/src/database/query/where-hash.d.ts.map +1 -1
  230. package/build/src/database/query/where-hash.js +11 -7
  231. package/build/src/database/query/where-plain.d.ts +2 -2
  232. package/build/src/database/query/where-plain.js +3 -3
  233. package/build/src/database/query-parser/base-query-parser.d.ts +3 -3
  234. package/build/src/database/query-parser/base-query-parser.js +4 -4
  235. package/build/src/database/query-parser/from-parser.d.ts +4 -4
  236. package/build/src/database/query-parser/from-parser.d.ts.map +1 -1
  237. package/build/src/database/query-parser/from-parser.js +5 -5
  238. package/build/src/database/query-parser/group-parser.d.ts +4 -4
  239. package/build/src/database/query-parser/group-parser.js +5 -5
  240. package/build/src/database/query-parser/joins-parser.d.ts +3 -3
  241. package/build/src/database/query-parser/joins-parser.js +4 -4
  242. package/build/src/database/query-parser/limit-parser.d.ts +3 -3
  243. package/build/src/database/query-parser/limit-parser.js +4 -4
  244. package/build/src/database/query-parser/options.d.ts +35 -20
  245. package/build/src/database/query-parser/options.d.ts.map +1 -1
  246. package/build/src/database/query-parser/options.js +19 -19
  247. package/build/src/database/query-parser/order-parser.d.ts +3 -3
  248. package/build/src/database/query-parser/order-parser.js +4 -4
  249. package/build/src/database/query-parser/select-parser.d.ts +3 -3
  250. package/build/src/database/query-parser/select-parser.js +4 -4
  251. package/build/src/database/query-parser/where-parser.d.ts +3 -3
  252. package/build/src/database/query-parser/where-parser.js +4 -4
  253. package/build/src/database/record/index.d.ts +200 -184
  254. package/build/src/database/record/index.d.ts.map +1 -1
  255. package/build/src/database/record/index.js +193 -167
  256. package/build/src/database/record/instance-relationships/base.d.ts +21 -15
  257. package/build/src/database/record/instance-relationships/base.d.ts.map +1 -1
  258. package/build/src/database/record/instance-relationships/base.js +15 -15
  259. package/build/src/database/record/instance-relationships/belongs-to.d.ts +3 -3
  260. package/build/src/database/record/instance-relationships/belongs-to.d.ts.map +1 -1
  261. package/build/src/database/record/instance-relationships/belongs-to.js +4 -4
  262. package/build/src/database/record/instance-relationships/has-many.d.ts +21 -15
  263. package/build/src/database/record/instance-relationships/has-many.d.ts.map +1 -1
  264. package/build/src/database/record/instance-relationships/has-many.js +23 -17
  265. package/build/src/database/record/instance-relationships/has-one.d.ts +4 -4
  266. package/build/src/database/record/instance-relationships/has-one.d.ts.map +1 -1
  267. package/build/src/database/record/instance-relationships/has-one.js +7 -7
  268. package/build/src/database/record/relationships/base.d.ts +48 -15
  269. package/build/src/database/record/relationships/base.d.ts.map +1 -1
  270. package/build/src/database/record/relationships/base.js +16 -16
  271. package/build/src/database/record/relationships/belongs-to.js +3 -3
  272. package/build/src/database/record/relationships/has-many.js +3 -3
  273. package/build/src/database/record/relationships/has-one.js +3 -3
  274. package/build/src/database/record/user-module.d.ts +3 -3
  275. package/build/src/database/record/user-module.js +4 -4
  276. package/build/src/database/record/validators/base.d.ts +9 -9
  277. package/build/src/database/record/validators/base.d.ts.map +1 -1
  278. package/build/src/database/record/validators/base.js +8 -8
  279. package/build/src/database/record/validators/presence.d.ts.map +1 -1
  280. package/build/src/database/record/validators/presence.js +6 -5
  281. package/build/src/database/record/validators/uniqueness.js +7 -7
  282. package/build/src/database/table-data/index.d.ts +53 -50
  283. package/build/src/database/table-data/index.d.ts.map +1 -1
  284. package/build/src/database/table-data/index.js +51 -51
  285. package/build/src/database/table-data/table-column.d.ts +84 -51
  286. package/build/src/database/table-data/table-column.d.ts.map +1 -1
  287. package/build/src/database/table-data/table-column.js +57 -56
  288. package/build/src/database/table-data/table-foreign-key.d.ts +15 -15
  289. package/build/src/database/table-data/table-foreign-key.js +16 -16
  290. package/build/src/database/table-data/table-index.d.ts +13 -7
  291. package/build/src/database/table-data/table-index.d.ts.map +1 -1
  292. package/build/src/database/table-data/table-index.js +8 -8
  293. package/build/src/database/table-data/table-reference.d.ts +2 -2
  294. package/build/src/database/table-data/table-reference.js +3 -3
  295. package/build/src/database/use-database.d.ts +3 -3
  296. package/build/src/database/use-database.js +4 -4
  297. package/build/src/environment-handlers/base.d.ts +84 -66
  298. package/build/src/environment-handlers/base.d.ts.map +1 -1
  299. package/build/src/environment-handlers/base.js +58 -58
  300. package/build/src/environment-handlers/browser.d.ts +9 -9
  301. package/build/src/environment-handlers/browser.d.ts.map +1 -1
  302. package/build/src/environment-handlers/browser.js +18 -18
  303. package/build/src/environment-handlers/node/cli/commands/destroy/migration.d.ts +1 -1
  304. package/build/src/environment-handlers/node/cli/commands/destroy/migration.js +2 -2
  305. package/build/src/environment-handlers/node/cli/commands/generate/base-models.d.ts +4 -4
  306. package/build/src/environment-handlers/node/cli/commands/generate/base-models.js +11 -11
  307. package/build/src/environment-handlers/node/cli/commands/generate/migration.d.ts +1 -1
  308. package/build/src/environment-handlers/node/cli/commands/generate/migration.js +2 -2
  309. package/build/src/environment-handlers/node/cli/commands/generate/model.d.ts +1 -1
  310. package/build/src/environment-handlers/node/cli/commands/generate/model.js +2 -2
  311. package/build/src/environment-handlers/node/cli/commands/init.d.ts +1 -1
  312. package/build/src/environment-handlers/node/cli/commands/init.js +2 -2
  313. package/build/src/environment-handlers/node/cli/commands/routes.d.ts +5 -5
  314. package/build/src/environment-handlers/node/cli/commands/routes.js +6 -6
  315. package/build/src/environment-handlers/node/cli/commands/server.js +3 -3
  316. package/build/src/environment-handlers/node.d.ts +5 -40
  317. package/build/src/environment-handlers/node.d.ts.map +1 -1
  318. package/build/src/environment-handlers/node.js +46 -46
  319. package/build/src/error-logger.d.ts +3 -2
  320. package/build/src/error-logger.d.ts.map +1 -1
  321. package/build/src/error-logger.js +5 -4
  322. package/build/src/http-client/header.d.ts +2 -2
  323. package/build/src/http-client/header.js +3 -3
  324. package/build/src/http-client/index.d.ts +10 -10
  325. package/build/src/http-client/index.d.ts.map +1 -1
  326. package/build/src/http-client/index.js +11 -11
  327. package/build/src/http-client/request.d.ts +16 -10
  328. package/build/src/http-client/request.d.ts.map +1 -1
  329. package/build/src/http-client/request.js +17 -11
  330. package/build/src/http-client/response.d.ts +7 -7
  331. package/build/src/http-client/response.d.ts.map +1 -1
  332. package/build/src/http-client/response.js +8 -8
  333. package/build/src/http-client/websocket-client.d.ts +28 -28
  334. package/build/src/http-client/websocket-client.d.ts.map +1 -1
  335. package/build/src/http-client/websocket-client.js +26 -26
  336. package/build/src/http-server/client/index.d.ts +13 -13
  337. package/build/src/http-server/client/index.d.ts.map +1 -1
  338. package/build/src/http-server/client/index.js +14 -14
  339. package/build/src/http-server/client/params-to-object.d.ts +15 -15
  340. package/build/src/http-server/client/params-to-object.d.ts.map +1 -1
  341. package/build/src/http-server/client/params-to-object.js +17 -13
  342. package/build/src/http-server/client/request-buffer/form-data-part.d.ts +7 -7
  343. package/build/src/http-server/client/request-buffer/form-data-part.js +8 -8
  344. package/build/src/http-server/client/request-buffer/header.d.ts +2 -2
  345. package/build/src/http-server/client/request-buffer/header.js +3 -3
  346. package/build/src/http-server/client/request-buffer/index.d.ts +20 -20
  347. package/build/src/http-server/client/request-buffer/index.js +22 -22
  348. package/build/src/http-server/client/request-parser.d.ts +21 -20
  349. package/build/src/http-server/client/request-parser.d.ts.map +1 -1
  350. package/build/src/http-server/client/request-parser.js +22 -21
  351. package/build/src/http-server/client/request-runner.d.ts +6 -6
  352. package/build/src/http-server/client/request-runner.d.ts.map +1 -1
  353. package/build/src/http-server/client/request-runner.js +17 -4
  354. package/build/src/http-server/client/request.d.ts +9 -8
  355. package/build/src/http-server/client/request.d.ts.map +1 -1
  356. package/build/src/http-server/client/request.js +9 -8
  357. package/build/src/http-server/client/response.d.ts +17 -17
  358. package/build/src/http-server/client/response.js +18 -18
  359. package/build/src/http-server/client/uploaded-file/memory-uploaded-file.d.ts +6 -6
  360. package/build/src/http-server/client/uploaded-file/memory-uploaded-file.js +9 -9
  361. package/build/src/http-server/client/uploaded-file/temporary-uploaded-file.d.ts +6 -6
  362. package/build/src/http-server/client/uploaded-file/temporary-uploaded-file.js +9 -9
  363. package/build/src/http-server/client/uploaded-file/uploaded-file.d.ts +7 -7
  364. package/build/src/http-server/client/uploaded-file/uploaded-file.js +8 -8
  365. package/build/src/http-server/client/websocket-request.d.ts +17 -13
  366. package/build/src/http-server/client/websocket-request.d.ts.map +1 -1
  367. package/build/src/http-server/client/websocket-request.js +10 -10
  368. package/build/src/http-server/client/websocket-session.d.ts +26 -26
  369. package/build/src/http-server/client/websocket-session.d.ts.map +1 -1
  370. package/build/src/http-server/client/websocket-session.js +27 -27
  371. package/build/src/http-server/index.d.ts +19 -19
  372. package/build/src/http-server/index.d.ts.map +1 -1
  373. package/build/src/http-server/index.js +20 -20
  374. package/build/src/http-server/server-client.d.ts +13 -13
  375. package/build/src/http-server/server-client.d.ts.map +1 -1
  376. package/build/src/http-server/server-client.js +14 -14
  377. package/build/src/http-server/websocket-events-host.d.ts +7 -7
  378. package/build/src/http-server/websocket-events-host.d.ts.map +1 -1
  379. package/build/src/http-server/websocket-events-host.js +7 -7
  380. package/build/src/http-server/websocket-events.d.ts +7 -7
  381. package/build/src/http-server/websocket-events.d.ts.map +1 -1
  382. package/build/src/http-server/websocket-events.js +7 -7
  383. package/build/src/http-server/worker-handler/index.d.ts +22 -22
  384. package/build/src/http-server/worker-handler/index.d.ts.map +1 -1
  385. package/build/src/http-server/worker-handler/index.js +20 -20
  386. package/build/src/http-server/worker-handler/worker-thread.d.ts +17 -17
  387. package/build/src/http-server/worker-handler/worker-thread.d.ts.map +1 -1
  388. package/build/src/http-server/worker-handler/worker-thread.js +16 -16
  389. package/build/src/initializer.d.ts +6 -6
  390. package/build/src/initializer.js +7 -7
  391. package/build/src/logger.d.ts +38 -34
  392. package/build/src/logger.d.ts.map +1 -1
  393. package/build/src/logger.js +53 -47
  394. package/build/src/routes/app-routes.d.ts +2 -2
  395. package/build/src/routes/app-routes.js +3 -3
  396. package/build/src/routes/base-route.d.ts +22 -22
  397. package/build/src/routes/base-route.d.ts.map +1 -1
  398. package/build/src/routes/base-route.js +21 -21
  399. package/build/src/routes/basic-route.d.ts +3 -3
  400. package/build/src/routes/basic-route.js +15 -15
  401. package/build/src/routes/get-route.d.ts +2 -2
  402. package/build/src/routes/get-route.js +8 -8
  403. package/build/src/routes/index.d.ts +2 -2
  404. package/build/src/routes/index.js +3 -3
  405. package/build/src/routes/namespace-route.d.ts +2 -2
  406. package/build/src/routes/namespace-route.js +8 -8
  407. package/build/src/routes/post-route.d.ts +2 -2
  408. package/build/src/routes/post-route.js +8 -8
  409. package/build/src/routes/resolver.d.ts +21 -19
  410. package/build/src/routes/resolver.d.ts.map +1 -1
  411. package/build/src/routes/resolver.js +50 -25
  412. package/build/src/routes/resource-route.d.ts +6 -6
  413. package/build/src/routes/resource-route.js +12 -12
  414. package/build/src/testing/format-value.d.ts +6 -6
  415. package/build/src/testing/format-value.d.ts.map +1 -1
  416. package/build/src/testing/format-value.js +11 -11
  417. package/build/src/testing/request-client.d.ts +10 -10
  418. package/build/src/testing/request-client.d.ts.map +1 -1
  419. package/build/src/testing/request-client.js +11 -11
  420. package/build/src/testing/test-files-finder.d.ts +17 -16
  421. package/build/src/testing/test-files-finder.d.ts.map +1 -1
  422. package/build/src/testing/test-files-finder.js +17 -16
  423. package/build/src/testing/test-runner.d.ts +78 -39
  424. package/build/src/testing/test-runner.d.ts.map +1 -1
  425. package/build/src/testing/test-runner.js +40 -40
  426. package/build/src/testing/test.d.ts +61 -61
  427. package/build/src/testing/test.d.ts.map +1 -1
  428. package/build/src/testing/test.js +77 -56
  429. package/build/src/utils/backtrace-cleaner.d.ts +4 -4
  430. package/build/src/utils/backtrace-cleaner.js +5 -5
  431. package/build/src/utils/ensure-error.d.ts +3 -3
  432. package/build/src/utils/ensure-error.d.ts.map +1 -1
  433. package/build/src/utils/ensure-error.js +3 -3
  434. package/build/src/utils/file-exists.d.ts +2 -2
  435. package/build/src/utils/file-exists.js +3 -3
  436. package/build/src/utils/nest-callbacks.d.ts +3 -3
  437. package/build/src/utils/nest-callbacks.js +4 -4
  438. package/build/src/utils/rest-args-error.d.ts +2 -2
  439. package/build/src/utils/rest-args-error.js +3 -3
  440. package/build/src/utils/singularize-model-name.d.ts +2 -2
  441. package/build/src/utils/singularize-model-name.js +3 -3
  442. package/build/src/utils/with-tracked-stack-async-hooks.d.ts +4 -4
  443. package/build/src/utils/with-tracked-stack-async-hooks.d.ts.map +1 -1
  444. package/build/src/utils/with-tracked-stack-async-hooks.js +5 -5
  445. package/build/src/utils/with-tracked-stack.d.ts +5 -4
  446. package/build/src/utils/with-tracked-stack.d.ts.map +1 -1
  447. package/build/src/utils/with-tracked-stack.js +12 -18
  448. package/package.json +1 -1
@@ -5,18 +5,18 @@ export type ValidationErrorObjectType = {
5
5
  };
6
6
  export class ValidationError extends Error {
7
7
  /**
8
- * @returns {VelociousDatabaseRecord}
8
+ * @returns {VelociousDatabaseRecord} - The model.
9
9
  */
10
10
  getModel(): VelociousDatabaseRecord;
11
11
  /**
12
- * @param {VelociousDatabaseRecord} model
13
- * @returns {void}
12
+ * @param {VelociousDatabaseRecord} model - Model instance.
13
+ * @returns {void} - No return value.
14
14
  */
15
15
  setModel(model: VelociousDatabaseRecord): void;
16
16
  _model: VelociousDatabaseRecord;
17
- /** @returns {Record<string, ValidationErrorObjectType[]>} */
17
+ /** @returns {Record<string, ValidationErrorObjectType[]>} - The validation errors. */
18
18
  getValidationErrors(): Record<string, ValidationErrorObjectType[]>;
19
- /** @param {Record<string, ValidationErrorObjectType[]>} validationErrors */
19
+ /** @param {Record<string, ValidationErrorObjectType[]>} validationErrors - Validation errors to assign. */
20
20
  setValidationErrors(validationErrors: Record<string, ValidationErrorObjectType[]>): void;
21
21
  _validationErrors: Record<string, ValidationErrorObjectType[]>;
22
22
  }
@@ -28,47 +28,56 @@ declare class VelociousDatabaseRecord {
28
28
  static getValidatorTypesMap(): Record<string, typeof import("./validators/base.js").default>;
29
29
  static validatorTypes(): Record<string, typeof import("./validators/base.js").default>;
30
30
  /**
31
- * @param {string} name
32
- * @param {typeof import("./validators/base.js").default} validatorClass
31
+ * @param {string} name - Name.
32
+ * @param {typeof import("./validators/base.js").default} validatorClass - Validator class.
33
33
  */
34
34
  static registerValidatorType(name: string, validatorClass: typeof import("./validators/base.js").default): void;
35
35
  /**
36
- * @param {string} validatorName
37
- * @returns {typeof import("./validators/base.js").default}
36
+ * @param {string} validatorName - Validator name.
37
+ * @returns {typeof import("./validators/base.js").default} - The validator type.
38
38
  */
39
39
  static getValidatorType(validatorName: string): typeof import("./validators/base.js").default;
40
40
  /**
41
- * @param {string} relationshipName
42
- * @returns {boolean}
41
+ * @param {string} relationshipName - Relationship name.
42
+ * @returns {boolean} - Whether relationship exists.
43
43
  */
44
44
  static _relationshipExists(relationshipName: string): boolean;
45
45
  /**
46
46
  * @typedef {object} RelationshipDataArgumentType
47
- * @property {string} [className]
48
- * @property {typeof VelociousDatabaseRecord} [klass]
49
- * @property {string} [type]
47
+ * @property {string} [className] - Model class name for the related record.
48
+ * @property {typeof VelociousDatabaseRecord} [klass] - Model class for the related record.
49
+ * @property {string} [type] - Relationship type (e.g. "hasMany", "belongsTo").
50
50
  */
51
51
  /**
52
- * @param {string} relationshipName
53
- * @param {RelationshipDataArgumentType} data
52
+ * @param {string} relationshipName - Relationship name.
53
+ * @param {RelationshipDataArgumentType} data - Data payload.
54
54
  */
55
55
  static _defineRelationship(relationshipName: string, data: {
56
+ /**
57
+ * - Model class name for the related record.
58
+ */
56
59
  className?: string;
60
+ /**
61
+ * - Model class for the related record.
62
+ */
57
63
  klass?: typeof VelociousDatabaseRecord;
64
+ /**
65
+ * - Relationship type (e.g. "hasMany", "belongsTo").
66
+ */
58
67
  type?: string;
59
68
  }): void;
60
69
  /**
61
- * @param {string} relationshipName
62
- * @returns {import("./relationships/base.js").default}
70
+ * @param {string} relationshipName - Relationship name.
71
+ * @returns {import("./relationships/base.js").default} - The relationship by name.
63
72
  */
64
73
  static getRelationshipByName(relationshipName: string): import("./relationships/base.js").default;
65
74
  /**
66
- * @returns {Array<import("./relationships/base.js").default>}
75
+ * @returns {Array<import("./relationships/base.js").default>} - The relationships.
67
76
  */
68
77
  static getRelationships(): Array<import("./relationships/base.js").default>;
69
78
  static getRelationshipsMap(): Record<string, import("./relationships/base.js").default>;
70
79
  /**
71
- * @returns {Array<string>}
80
+ * @returns {Array<string>} - The relationship names.
72
81
  */
73
82
  static getRelationshipNames(): Array<string>;
74
83
  /**
@@ -78,295 +87,298 @@ declare class VelociousDatabaseRecord {
78
87
  */
79
88
  static belongsTo(relationshipName: string, options?: object): void;
80
89
  /**
81
- * @returns {import("../drivers/base.js").default}
90
+ * @returns {import("../drivers/base.js").default} - The connection.
82
91
  */
83
92
  static connection(): import("../drivers/base.js").default;
84
93
  /**
85
94
  * @template {typeof VelociousDatabaseRecord} MC
86
95
  * @this {MC}
87
- * @param {Record<string, any>} [attributes]
88
- * @returns {Promise<InstanceType<MC>>}
96
+ * @param {Record<string, unknown>} [attributes] - Attributes.
97
+ * @returns {Promise<InstanceType<MC>>} - Resolves with the create.
89
98
  */
90
- static create<MC extends typeof VelociousDatabaseRecord>(this: MC, attributes?: Record<string, any>): Promise<InstanceType<MC>>;
99
+ static create<MC extends typeof VelociousDatabaseRecord>(this: MC, attributes?: Record<string, unknown>): Promise<InstanceType<MC>>;
91
100
  /**
92
- * @returns {import("../../configuration.js").default}
101
+ * @returns {import("../../configuration.js").default} - The configuration.
93
102
  */
94
103
  static _getConfiguration(): import("../../configuration.js").default;
95
104
  /**
96
105
  * Adds a has-many-relationship to the model class.
97
106
  * @param {string} relationshipName The name of the relationship (e.g. "posts")
98
107
  * @param {object} options The options for the relationship (e.g. {className: "Post"})
99
- * @returns {void}
108
+ * @returns {void} - No return value.
100
109
  */
101
110
  static hasMany(relationshipName: string, options?: object): void;
102
111
  /**
103
112
  * Adds a has-one-relationship to the model class.
104
113
  * @param {string} relationshipName The name of the relationship (e.g. "post")
105
114
  * @param {object} options The options for the relationship (e.g. {className: "Post"})
106
- * @returns {void}
115
+ * @returns {void} - No return value.
107
116
  */
108
117
  static hasOne(relationshipName: string, options?: object): void;
109
118
  /**
110
- * @param {string} attributeName
111
- * @returns {string}
119
+ * @param {string} attributeName - Attribute name.
120
+ * @returns {string} - The human attribute name.
112
121
  */
113
122
  static humanAttributeName(attributeName: string): string;
114
123
  /**
115
- * @returns {string}
124
+ * @returns {string} - The database type.
116
125
  */
117
126
  static getDatabaseType(): string;
118
127
  /**
119
- * @param {object} args
120
- * @param {import("../../configuration.js").default} args.configuration
121
- * @returns {Promise<void>}
128
+ * @param {object} args - Options object.
129
+ * @param {import("../../configuration.js").default} args.configuration - Configuration instance.
130
+ * @returns {Promise<void>} - Resolves when complete.
122
131
  */
123
132
  static initializeRecord({ configuration, ...restArgs }: {
124
133
  configuration: import("../../configuration.js").default;
125
134
  }): Promise<void>;
126
135
  /**
127
- * @returns {boolean}
136
+ * @returns {boolean} - Whether initialized.
128
137
  */
129
138
  static isInitialized(): boolean;
139
+ /**
140
+ * @returns {void} - No return value.
141
+ */
142
+ static _assertHasBeenInitialized(): void;
130
143
  static _defineTranslationMethods(): Promise<void>;
131
144
  /**
132
- * @returns {string}
145
+ * @returns {string} - The database identifier.
133
146
  */
134
147
  static getDatabaseIdentifier(): string;
135
148
  /**
136
- * @param {string} databaseIdentifier
137
- * @returns {void}
149
+ * @param {string} databaseIdentifier - Database identifier.
150
+ * @returns {void} - No return value.
138
151
  */
139
152
  static setDatabaseIdentifier(databaseIdentifier: string): void;
140
153
  /**
141
- * @returns {import("../drivers/base-column.js").default[]}
154
+ * @returns {import("../drivers/base-column.js").default[]} - The columns.
142
155
  */
143
156
  static getColumns(): import("../drivers/base-column.js").default[];
144
- /** @returns {Record<string, import("../drivers/base-column.js").default>} */
157
+ /** @returns {Record<string, import("../drivers/base-column.js").default>} - The columns hash. */
145
158
  static getColumnsHash(): Record<string, import("../drivers/base-column.js").default>;
146
159
  /**
147
- * @param {string} name
148
- * @returns {string | undefined}
160
+ * @param {string} name - Name.
161
+ * @returns {string | undefined} - The column type by name.
149
162
  */
150
163
  static getColumnTypeByName(name: string): string | undefined;
151
164
  /**
152
- * @param {string} type
153
- * @returns {boolean}
165
+ * @param {string} type - Type identifier.
166
+ * @returns {boolean} - Whether date like type.
154
167
  */
155
168
  static _isDateLikeType(type: string): boolean;
156
169
  /**
157
- * @returns {Array<string>}
170
+ * @returns {Array<string>} - The column names.
158
171
  */
159
172
  static getColumnNames(): Array<string>;
160
173
  /**
161
- * @returns {import("../drivers/base-table.js").default}
174
+ * @returns {import("../drivers/base-table.js").default} - The table.
162
175
  */
163
176
  static _getTable(): import("../drivers/base-table.js").default;
164
177
  /**
165
- * @param {Array<string>} columns
166
- * @param {Array<Array<string>>} rows
167
- * @returns {Promise<void>}
178
+ * @param {Array<string>} columns - Column names.
179
+ * @param {Array<Array<string>>} rows - Rows to insert.
180
+ * @returns {Promise<void>} - Resolves when complete.
168
181
  */
169
182
  static insertMultiple(columns: Array<string>, rows: Array<Array<string>>): Promise<void>;
170
183
  /**
171
- * @returns {Promise<number>}
184
+ * @returns {Promise<number>} - Resolves with the next primary key.
172
185
  */
173
186
  static nextPrimaryKey(): Promise<number>;
174
187
  /**
175
- * @param {string} primaryKey
176
- * @returns {void}
188
+ * @param {string} primaryKey - Primary key.
189
+ * @returns {void} - No return value.
177
190
  */
178
191
  static setPrimaryKey(primaryKey: string): void;
179
192
  /**
180
- * @returns {string}
193
+ * @returns {string} - The primary key.
181
194
  */
182
195
  static primaryKey(): string;
183
196
  /**
184
- * @returns {string}
197
+ * @returns {string} - The table name.
185
198
  */
186
199
  static tableName(): string;
187
200
  /**
188
- * @param {string} tableName
189
- * @returns {void}
201
+ * @param {string} tableName - Table name.
202
+ * @returns {void} - No return value.
190
203
  */
191
204
  static setTableName(tableName: string): void;
192
205
  /**
193
- * @param {function() : Promise<void>} callback
194
- * @returns {Promise<*>}
206
+ * @param {function() : Promise<void>} callback - Callback function.
207
+ * @returns {Promise<unknown>} - Resolves with the transaction.
195
208
  */
196
- static transaction(callback: () => Promise<void>): Promise<any>;
209
+ static transaction(callback: () => Promise<void>): Promise<unknown>;
197
210
  /**
198
- * @param {...string} names
199
- * @returns {void}
211
+ * @param {...string} names - Names.
212
+ * @returns {void} - No return value.
200
213
  */
201
214
  static translates(...names: string[]): void;
202
215
  /**
203
- * @returns {typeof VelociousDatabaseRecord}
216
+ * @returns {typeof VelociousDatabaseRecord} - The translation class.
204
217
  */
205
218
  static getTranslationClass(): typeof VelociousDatabaseRecord;
206
219
  /**
207
- * @returns {string}
220
+ * @returns {string} - The translations table name.
208
221
  */
209
222
  static getTranslationsTableName(): string;
210
223
  /**
211
- * @returns {Promise<boolean>}
224
+ * @returns {Promise<boolean>} - Resolves with Whether it has translations table.
212
225
  */
213
226
  static hasTranslationsTable(): Promise<boolean>;
214
227
  /**
215
228
  * Adds a validation to an attribute.
216
229
  * @param {string} attributeName The name of the attribute to validate.
217
- * @param {Record<string, boolean | Record<string, any>>} validators The validators to add. Key is the validator name, value is the validator arguments.
230
+ * @param {Record<string, boolean | Record<string, unknown>>} validators The validators to add. Key is the validator name, value is the validator arguments.
218
231
  */
219
- static validates(attributeName: string, validators: Record<string, boolean | Record<string, any>>): Promise<void>;
232
+ static validates(attributeName: string, validators: Record<string, boolean | Record<string, unknown>>): Promise<void>;
220
233
  /**
221
234
  * @template {typeof VelociousDatabaseRecord} MC
222
235
  * @this {MC}
223
- * @returns {ModelClassQuery<MC>}
236
+ * @returns {ModelClassQuery<MC>} - The new query.
224
237
  */
225
238
  static _newQuery<MC extends typeof VelociousDatabaseRecord>(this: MC): ModelClassQuery<MC>;
226
- /** @returns {string} */
239
+ /** @returns {string} - The orderable column. */
227
240
  static orderableColumn(): string;
228
241
  /**
229
242
  * @template {typeof VelociousDatabaseRecord} MC
230
243
  * @this {MC}
231
- * @returns {ModelClassQuery<MC>}
244
+ * @returns {ModelClassQuery<MC>} - The all.
232
245
  */
233
246
  static all<MC extends typeof VelociousDatabaseRecord>(this: MC): ModelClassQuery<MC>;
234
- /** @returns {Promise<number>} */
247
+ /** @returns {Promise<number>} - Resolves with the count. */
235
248
  static count(): Promise<number>;
236
249
  /**
237
250
  * @template {typeof VelociousDatabaseRecord} MC
238
251
  * @this {MC}
239
- * @param {string} group
240
- * @returns {ModelClassQuery<MC>}
252
+ * @param {string} group - Group.
253
+ * @returns {ModelClassQuery<MC>} - The group.
241
254
  */
242
255
  static group<MC extends typeof VelociousDatabaseRecord>(this: MC, group: string): ModelClassQuery<MC>;
243
256
  static destroyAll(): Promise<void>;
244
257
  /**
245
258
  * @template {typeof VelociousDatabaseRecord} MC
246
259
  * @this {MC}
247
- * @param {...string|string[]} columns
248
- * @returns {Promise<any[]>}
260
+ * @param {...string|string[]} columns - Column names.
261
+ * @returns {Promise<unknown[]>} - Resolves with the pluck.
249
262
  */
250
- static pluck<MC extends typeof VelociousDatabaseRecord>(this: MC, ...columns: (string | string[])[]): Promise<any[]>;
263
+ static pluck<MC extends typeof VelociousDatabaseRecord>(this: MC, ...columns: (string | string[])[]): Promise<unknown[]>;
251
264
  /**
252
265
  * @template {typeof VelociousDatabaseRecord} MC
253
266
  * @this {MC}
254
- * @param {number|string} recordId
255
- * @returns {Promise<InstanceType<MC>>}
267
+ * @param {number|string} recordId - Record id.
268
+ * @returns {Promise<InstanceType<MC>>} - Resolves with the find.
256
269
  */
257
270
  static find<MC extends typeof VelociousDatabaseRecord>(this: MC, recordId: number | string): Promise<InstanceType<MC>>;
258
271
  /**
259
272
  * @template {typeof VelociousDatabaseRecord} MC
260
273
  * @this {MC}
261
- * @param {{[key: string]: any}} conditions
262
- * @returns {Promise<InstanceType<MC> | null>}
274
+ * @param {{[key: string]: string | number}} conditions - Conditions hash keyed by attribute name.
275
+ * @returns {Promise<InstanceType<MC> | null>} - Resolves with the by.
263
276
  */
264
277
  static findBy<MC extends typeof VelociousDatabaseRecord>(this: MC, conditions: {
265
- [key: string]: any;
278
+ [key: string]: string | number;
266
279
  }): Promise<InstanceType<MC> | null>;
267
280
  /**
268
281
  * @template {typeof VelociousDatabaseRecord} MC
269
282
  * @this {MC}
270
- * @param {{[key: string]: any}} conditions
271
- * @returns {Promise<InstanceType<MC>>}
283
+ * @param {{[key: string]: string | number}} conditions - Conditions hash keyed by attribute name.
284
+ * @returns {Promise<InstanceType<MC>>} - Resolves with the by or fail.
272
285
  */
273
286
  static findByOrFail<MC extends typeof VelociousDatabaseRecord>(this: MC, conditions: {
274
- [key: string]: any;
287
+ [key: string]: string | number;
275
288
  }): Promise<InstanceType<MC>>;
276
289
  /**
277
290
  * @template {typeof VelociousDatabaseRecord} MC
278
291
  * @this {MC}
279
- * @param {{[key: string]: any}} conditions
280
- * @param {function() : void} [callback]
281
- * @returns {Promise<InstanceType<MC>>}
292
+ * @param {{[key: string]: string | number}} conditions - Conditions hash keyed by attribute name.
293
+ * @param {function() : void} [callback] - Callback function.
294
+ * @returns {Promise<InstanceType<MC>>} - Resolves with the or create by.
282
295
  */
283
296
  static findOrCreateBy<MC extends typeof VelociousDatabaseRecord>(this: MC, conditions: {
284
- [key: string]: any;
297
+ [key: string]: string | number;
285
298
  }, callback?: () => void): Promise<InstanceType<MC>>;
286
299
  /**
287
300
  * @template {typeof VelociousDatabaseRecord} MC
288
301
  * @this {MC}
289
- * @param {Record<string, any>} conditions
290
- * @param {function(InstanceType<MC>) : void} [callback]
291
- * @returns {Promise<InstanceType<MC>>}
302
+ * @param {Record<string, string | number>} conditions - Conditions.
303
+ * @param {function(InstanceType<MC>) : void} [callback] - Callback function.
304
+ * @returns {Promise<InstanceType<MC>>} - Resolves with the or initialize by.
292
305
  */
293
- static findOrInitializeBy<MC extends typeof VelociousDatabaseRecord>(this: MC, conditions: Record<string, any>, callback?: (arg0: InstanceType<MC>) => void): Promise<InstanceType<MC>>;
306
+ static findOrInitializeBy<MC extends typeof VelociousDatabaseRecord>(this: MC, conditions: Record<string, string | number>, callback?: (arg0: InstanceType<MC>) => void): Promise<InstanceType<MC>>;
294
307
  /**
295
308
  * @template {typeof VelociousDatabaseRecord} MC
296
309
  * @this {MC}
297
- * @returns {Promise<InstanceType<MC>>}
310
+ * @returns {Promise<InstanceType<MC>>} - Resolves with the first.
298
311
  */
299
312
  static first<MC extends typeof VelociousDatabaseRecord>(this: MC): Promise<InstanceType<MC>>;
300
313
  /**
301
314
  * @template {typeof VelociousDatabaseRecord} MC
302
315
  * @this {MC}
303
- * @param {string|{[key: string]: any}} join
304
- * @returns {ModelClassQuery<MC>}
316
+ * @param {string | import("../query/join-object.js").JoinObject} join - Join clause or join descriptor.
317
+ * @returns {ModelClassQuery<MC>} - The joins.
305
318
  */
306
- static joins<MC extends typeof VelociousDatabaseRecord>(this: MC, join: string | {
307
- [key: string]: any;
308
- }): ModelClassQuery<MC>;
319
+ static joins<MC extends typeof VelociousDatabaseRecord>(this: MC, join: string | import("../query/join-object.js").JoinObject): ModelClassQuery<MC>;
309
320
  /**
310
321
  * @template {typeof VelociousDatabaseRecord} MC
311
322
  * @this {MC}
312
- * @returns {Promise<InstanceType<MC>>}
323
+ * @returns {Promise<InstanceType<MC>>} - Resolves with the last.
313
324
  */
314
325
  static last<MC extends typeof VelociousDatabaseRecord>(this: MC): Promise<InstanceType<MC>>;
315
326
  /**
316
327
  * @template {typeof VelociousDatabaseRecord} MC
317
328
  * @this {MC}
318
- * @param {number} value
319
- * @returns {ModelClassQuery<MC>}
329
+ * @param {number} value - Value to use.
330
+ * @returns {ModelClassQuery<MC>} - The limit.
320
331
  */
321
332
  static limit<MC extends typeof VelociousDatabaseRecord>(this: MC, value: number): ModelClassQuery<MC>;
322
333
  /**
323
334
  * @template {typeof VelociousDatabaseRecord} MC
324
335
  * @this {MC}
325
- * @param {string | number} order
326
- * @returns {ModelClassQuery<MC>}
336
+ * @param {string | number} order - Order.
337
+ * @returns {ModelClassQuery<MC>} - The order.
327
338
  */
328
339
  static order<MC extends typeof VelociousDatabaseRecord>(this: MC, order: string | number): ModelClassQuery<MC>;
329
340
  /**
330
341
  * @template {typeof VelociousDatabaseRecord} MC
331
342
  * @this {MC}
332
- * @param {boolean} [value]
333
- * @returns {ModelClassQuery<MC>}
343
+ * @param {boolean} [value] - Value to use.
344
+ * @returns {ModelClassQuery<MC>} - The distinct.
334
345
  */
335
346
  static distinct<MC extends typeof VelociousDatabaseRecord>(this: MC, value?: boolean): ModelClassQuery<MC>;
336
347
  /**
337
348
  * @template {typeof VelociousDatabaseRecord} MC
338
349
  * @this {MC}
339
- * @param {import("../query/index.js").NestedPreloadRecord} preload
350
+ * @param {import("../query/index.js").NestedPreloadRecord} preload - Preload.
351
+ * @returns {ModelClassQuery<MC>} - The preload.
340
352
  */
341
353
  static preload<MC extends typeof VelociousDatabaseRecord>(this: MC, preload: import("../query/index.js").NestedPreloadRecord): ModelClassQuery<MC>;
342
354
  /**
343
355
  * @template {typeof VelociousDatabaseRecord} MC
344
356
  * @this {MC}
345
- * @param {import("../query/index.js").SelectArgumentType} select
346
- * @returns {ModelClassQuery<MC>}
357
+ * @param {import("../query/index.js").SelectArgumentType} select - Select.
358
+ * @returns {ModelClassQuery<MC>} - The select.
347
359
  */
348
360
  static select<MC extends typeof VelociousDatabaseRecord>(this: MC, select: import("../query/index.js").SelectArgumentType): ModelClassQuery<MC>;
349
361
  /**
350
362
  * @template {typeof VelociousDatabaseRecord} MC
351
363
  * @this {MC}
352
- * @returns {Promise<InstanceType<MC>[]>}
364
+ * @returns {Promise<InstanceType<MC>[]>} - Resolves with the array.
353
365
  */
354
366
  static toArray<MC extends typeof VelociousDatabaseRecord>(this: MC): Promise<InstanceType<MC>[]>;
355
367
  /**
356
368
  * @template {typeof VelociousDatabaseRecord} MC
357
369
  * @this {MC}
358
- * @param {import("../query/index.js").WhereArgumentType} where
359
- * @returns {ModelClassQuery<MC>}
370
+ * @param {import("../query/index.js").WhereArgumentType} where - Where.
371
+ * @returns {ModelClassQuery<MC>} - The where.
360
372
  */
361
373
  static where<MC extends typeof VelociousDatabaseRecord>(this: MC, where: import("../query/index.js").WhereArgumentType): ModelClassQuery<MC>;
362
374
  /**
363
- * @param {Record<string, any>} changes
375
+ * @param {Record<string, unknown>} changes - Changes.
364
376
  */
365
- constructor(changes?: Record<string, any>);
366
- /** @type {Record<string, any>} */
367
- _attributes: Record<string, any>;
368
- /** @type {Record<string, any>} */
369
- _changes: Record<string, any>;
377
+ constructor(changes?: Record<string, unknown>);
378
+ /** @type {Record<string, unknown>} */
379
+ _attributes: Record<string, unknown>;
380
+ /** @type {Record<string, unknown>} */
381
+ _changes: Record<string, unknown>;
370
382
  /** @type {Record<string, import("../drivers/base-column.js").default>} */
371
383
  _columnsAsHash: Record<string, import("../drivers/base-column.js").default>;
372
384
  /** @type {import("../drivers/base.js").default | undefined} */
@@ -378,47 +390,47 @@ declare class VelociousDatabaseRecord {
378
390
  /** @type {Record<string, ValidationErrorObjectType[]>} */
379
391
  _validationErrors: Record<string, ValidationErrorObjectType[]>;
380
392
  /**
381
- * @param {string} relationshipName
382
- * @returns {import("./instance-relationships/base.js").default}
393
+ * @param {string} relationshipName - Relationship name.
394
+ * @returns {import("./instance-relationships/base.js").default} - The relationship by name.
383
395
  */
384
396
  getRelationshipByName(relationshipName: string): import("./instance-relationships/base.js").default<any, any>;
385
397
  /**
386
- * @returns {import("../../configuration.js").default}
398
+ * @returns {import("../../configuration.js").default} - The configuration.
387
399
  */
388
400
  _getConfiguration(): import("../../configuration.js").default;
389
401
  /**
390
- * @param {any} value
391
- * @returns {boolean}
402
+ * @param {unknown} value - Value to use.
403
+ * @returns {boolean} - Whether attribute.
392
404
  */
393
- _hasAttribute(value: any): boolean;
405
+ _hasAttribute(value: unknown): boolean;
394
406
  /**
395
- * @param {string} name
396
- * @returns {*}
407
+ * @param {string} name - Name.
408
+ * @returns {unknown} - The attribute.
397
409
  */
398
- getAttribute(name: string): any;
410
+ getAttribute(name: string): unknown;
399
411
  /**
400
412
  * @abstract
401
- * @returns {typeof VelociousDatabaseRecord}
413
+ * @returns {typeof VelociousDatabaseRecord} - The model class.
402
414
  */
403
415
  getModelClass(): typeof VelociousDatabaseRecord;
404
416
  /**
405
- * @param {string} name
406
- * @param {*} newValue
407
- * @returns {void}
417
+ * @param {string} name - Name.
418
+ * @param {unknown} newValue - New value.
419
+ * @returns {void} - No return value.
408
420
  */
409
- setAttribute(name: string, newValue: any): void;
421
+ setAttribute(name: string, newValue: unknown): void;
410
422
  /**
411
- * @param {string} name
412
- * @param {any} newValue
423
+ * @param {string} name - Name.
424
+ * @param {unknown} newValue - New value.
413
425
  */
414
- _setColumnAttribute(name: string, newValue: any): void;
426
+ _setColumnAttribute(name: string, newValue: unknown): void;
415
427
  /**
416
- * @param {any} value
417
- * @returns {any}
428
+ * @param {unknown} value - Value to use.
429
+ * @returns {unknown} - The date value.
418
430
  */
419
- _normalizeDateValue(value: any): any;
431
+ _normalizeDateValue(value: unknown): unknown;
420
432
  /**
421
- * @returns {Promise<void>}
433
+ * @returns {Promise<void>} - Resolves when complete.
422
434
  */
423
435
  save(): Promise<void>;
424
436
  _autoSaveBelongsToRelationships(): Promise<{
@@ -426,119 +438,123 @@ declare class VelociousDatabaseRecord {
426
438
  }>;
427
439
  _autoSaveHasManyAndHasOneRelationshipsToSave(): import("./instance-relationships/base.js").default<any, any>[];
428
440
  /**
429
- * @param {object} args
430
- * @param {boolean} args.isNewRecord
441
+ * @param {object} args - Options object.
442
+ * @param {boolean} args.isNewRecord - Whether is new record.
431
443
  */
432
444
  _autoSaveHasManyAndHasOneRelationships({ isNewRecord }: {
433
445
  isNewRecord: boolean;
434
446
  }): Promise<void>;
435
447
  /**
436
448
  * @abstract
437
- * @returns {TranslationBase[]}
449
+ * @returns {TranslationBase[]} - The translations loaded.
438
450
  */
439
451
  translationsLoaded(): TranslationBase[];
440
452
  /**
441
- * @param {string} name
442
- * @param {string} locale
443
- * @returns {*}
453
+ * @param {string} name - Name.
454
+ * @param {string} locale - Locale.
455
+ * @returns {string | undefined} - The translated attribute, if found.
444
456
  */
445
- _getTranslatedAttribute(name: string, locale: string): any;
457
+ _getTranslatedAttribute(name: string, locale: string): string | undefined;
446
458
  /**
447
- * @param {string} name
448
- * @param {string} locale
449
- * @returns {*}
459
+ * @param {string} name - Name.
460
+ * @param {string} locale - Locale.
461
+ * @returns {string | undefined} - The translated attribute with fallback, if found.
450
462
  */
451
- _getTranslatedAttributeWithFallback(name: string, locale: string): any;
463
+ _getTranslatedAttributeWithFallback(name: string, locale: string): string | undefined;
452
464
  /**
453
- * @param {string} name
454
- * @param {string} locale
455
- * @param {*} newValue
456
- * @returns {void}
465
+ * @param {string} name - Name.
466
+ * @param {string} locale - Locale.
467
+ * @param {unknown} newValue - New value.
468
+ * @returns {void} - No return value.
457
469
  */
458
- _setTranslatedAttribute(name: string, locale: string, newValue: any): void;
470
+ _setTranslatedAttribute(name: string, locale: string, newValue: unknown): void;
459
471
  _isNewRecord: boolean;
460
472
  /**
461
- * @param {object} attributes
462
- * @returns {void}
473
+ * @param {object} attributes - Attributes.
474
+ * @returns {void} - No return value.
463
475
  */
464
476
  loadExistingRecord(attributes: object): void;
465
477
  /**
466
478
  * Assigns the given attributes to the record.
467
- * @param {Record<string, any>} attributesToAssign
468
- * @returns {void}
479
+ * @param {Record<string, unknown>} attributesToAssign - Attributes to assign.
480
+ * @returns {void} - No return value.
469
481
  */
470
- assign(attributesToAssign: Record<string, any>): void;
482
+ assign(attributesToAssign: Record<string, unknown>): void;
471
483
  /**
472
484
  * Returns a the current attributes of the record (original attributes from database plus changes)
473
- * @returns {Record<string, any>}
485
+ * @returns {Record<string, unknown>} - The attributes.
474
486
  */
475
- attributes(): Record<string, any>;
487
+ attributes(): Record<string, unknown>;
476
488
  /**
477
489
  * Returns column-name keyed data (original attributes from database plus changes)
478
- * @returns {Record<string, any>}
490
+ * @returns {Record<string, unknown>} - The raw attributes.
479
491
  */
480
- rawAttributes(): Record<string, any>;
492
+ rawAttributes(): Record<string, unknown>;
481
493
  /**
482
- * @returns {import("../drivers/base.js").default}
494
+ * @returns {import("../drivers/base.js").default} - The connection.
483
495
  */
484
496
  _connection(): import("../drivers/base.js").default;
485
497
  /**
486
498
  * Destroys the record in the database and all of its dependent records.
487
- * @returns {Promise<void>}
499
+ * @returns {Promise<void>} - Resolves when complete.
488
500
  */
489
501
  destroy(): Promise<void>;
490
- /** @returns {boolean} */
502
+ /** @returns {boolean} - Whether changes. */
491
503
  _hasChanges(): boolean;
492
504
  /**
493
505
  * Returns true if the model has been changed since it was loaded from the database.
494
- * @returns {boolean}
506
+ * @returns {boolean} - Whether changed.
495
507
  */
496
508
  isChanged(): boolean;
497
- /** Returns the changes that have been made to this record since it was loaded from the database. */
498
- changes(): Record<string, any[]>;
499
509
  /**
500
- * @returns {string}
510
+ * Returns the changes that have been made to this record since it was loaded from the database.
511
+ * @returns {Record<string, unknown[]>} - The changes.
512
+ */
513
+ changes(): Record<string, unknown[]>;
514
+ /**
515
+ * @returns {string} - The table name.
501
516
  */
502
517
  _tableName(): string;
503
518
  /**
504
519
  * Reads an attribute value from the record.
505
520
  * @param {string} attributeName The name of the attribute to read. This is the attribute name, not the column name.
506
- * @returns {any}
521
+ * @returns {unknown} - The attribute.
507
522
  */
508
- readAttribute(attributeName: string): any;
523
+ readAttribute(attributeName: string): unknown;
509
524
  /**
510
525
  * Reads a column value from the record.
511
526
  * @param {string} attributeName The name of the column to read. This is the column name, not the attribute name.
527
+ * @returns {unknown} - The column.
512
528
  */
513
- readColumn(attributeName: string): any;
514
- _belongsToChanges(): Record<string, any>;
515
- /** @returns {Promise<void>} */
529
+ readColumn(attributeName: string): unknown;
530
+ _belongsToChanges(): Record<string, unknown>;
531
+ /** @returns {Promise<void>} - Resolves when complete. */
516
532
  _createNewRecord(): Promise<void>;
517
- /** @returns {Promise<void>} */
533
+ /** @returns {Promise<void>} - Resolves when complete. */
518
534
  _updateRecordWithChanges(): Promise<void>;
519
- /** @returns {number|string} */
535
+ /** @returns {number|string} - The id. */
520
536
  id(): number | string;
521
- /** @returns {boolean} */
537
+ /** @returns {boolean} - Whether persisted. */
522
538
  isPersisted(): boolean;
523
- /** @returns {boolean} */
539
+ /** @returns {boolean} - Whether new record. */
524
540
  isNewRecord(): boolean;
525
541
  /**
526
- * @param {boolean} newIsNewRecord
527
- * @returns {void}
542
+ * @param {boolean} newIsNewRecord - New is new record.
543
+ * @returns {void} - No return value.
528
544
  */
529
545
  setIsNewRecord(newIsNewRecord: boolean): void;
530
546
  /**
531
547
  * @template {typeof VelociousDatabaseRecord} MC
532
- * @param {string | number} id
533
- * @returns {Promise<void>}
548
+ * @param {string | number} id - Record identifier.
549
+ * @returns {Promise<void>} - Resolves when complete.
534
550
  */
535
551
  _reloadWithId<MC extends typeof VelociousDatabaseRecord>(id: string | number): Promise<void>;
536
552
  /**
537
- * @returns {Promise<void>}
553
+ * @returns {Promise<void>} - Resolves when complete.
538
554
  */
539
555
  reload(): Promise<void>;
540
556
  _runValidations(): Promise<void>;
541
- /** @returns {string[]} */
557
+ /** @returns {string[]} - The full error messages. */
542
558
  fullErrorMessages(): string[];
543
559
  /**
544
560
  * Assigns the attributes to the record and saves it.
@@ -549,7 +565,7 @@ declare class VelociousDatabaseRecord {
549
565
  declare class TranslationBase extends VelociousDatabaseRecord {
550
566
  /**
551
567
  * @abstract
552
- * @returns {string}
568
+ * @returns {string} - The locale.
553
569
  */
554
570
  locale(): string;
555
571
  }