velocious 1.0.147 → 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 (446) 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 +15 -15
  55. package/build/src/database/drivers/base.d.ts +186 -132
  56. package/build/src/database/drivers/base.d.ts.map +1 -1
  57. package/build/src/database/drivers/base.js +143 -143
  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 -57
  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 +7 -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 -4
  85. package/build/src/database/drivers/mysql/query.d.ts.map +1 -1
  86. package/build/src/database/drivers/mysql/query.js +5 -5
  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 +55 -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 +7 -8
  138. package/build/src/database/drivers/sqlite/table.d.ts.map +1 -1
  139. package/build/src/database/drivers/sqlite/table.js +10 -9
  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 -16
  192. package/build/src/database/query/insert-base.d.ts.map +1 -1
  193. package/build/src/database/query/insert-base.js +12 -12
  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 -8
  229. package/build/src/database/query/where-hash.d.ts.map +1 -1
  230. package/build/src/database/query/where-hash.js +9 -9
  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 +197 -186
  254. package/build/src/database/record/index.d.ts.map +1 -1
  255. package/build/src/database/record/index.js +190 -169
  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 -3
  320. package/build/src/error-logger.d.ts.map +1 -1
  321. package/build/src/error-logger.js +5 -5
  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 +14 -14
  328. package/build/src/http-client/request.js +15 -15
  329. package/build/src/http-client/response.d.ts +7 -7
  330. package/build/src/http-client/response.d.ts.map +1 -1
  331. package/build/src/http-client/response.js +8 -8
  332. package/build/src/http-client/websocket-client.d.ts +28 -28
  333. package/build/src/http-client/websocket-client.d.ts.map +1 -1
  334. package/build/src/http-client/websocket-client.js +26 -26
  335. package/build/src/http-server/client/index.d.ts +13 -13
  336. package/build/src/http-server/client/index.d.ts.map +1 -1
  337. package/build/src/http-server/client/index.js +14 -14
  338. package/build/src/http-server/client/params-to-object.d.ts +15 -15
  339. package/build/src/http-server/client/params-to-object.d.ts.map +1 -1
  340. package/build/src/http-server/client/params-to-object.js +17 -13
  341. package/build/src/http-server/client/request-buffer/form-data-part.d.ts +7 -7
  342. package/build/src/http-server/client/request-buffer/form-data-part.js +8 -8
  343. package/build/src/http-server/client/request-buffer/header.d.ts +2 -2
  344. package/build/src/http-server/client/request-buffer/header.js +3 -3
  345. package/build/src/http-server/client/request-buffer/index.d.ts +20 -20
  346. package/build/src/http-server/client/request-buffer/index.js +22 -22
  347. package/build/src/http-server/client/request-parser.d.ts +21 -20
  348. package/build/src/http-server/client/request-parser.d.ts.map +1 -1
  349. package/build/src/http-server/client/request-parser.js +22 -21
  350. package/build/src/http-server/client/request-runner.d.ts +6 -6
  351. package/build/src/http-server/client/request-runner.d.ts.map +1 -1
  352. package/build/src/http-server/client/request-runner.js +17 -4
  353. package/build/src/http-server/client/request.d.ts +9 -8
  354. package/build/src/http-server/client/request.d.ts.map +1 -1
  355. package/build/src/http-server/client/request.js +9 -8
  356. package/build/src/http-server/client/response.d.ts +17 -17
  357. package/build/src/http-server/client/response.js +18 -18
  358. package/build/src/http-server/client/uploaded-file/memory-uploaded-file.d.ts +6 -6
  359. package/build/src/http-server/client/uploaded-file/memory-uploaded-file.js +9 -9
  360. package/build/src/http-server/client/uploaded-file/temporary-uploaded-file.d.ts +6 -6
  361. package/build/src/http-server/client/uploaded-file/temporary-uploaded-file.js +9 -9
  362. package/build/src/http-server/client/uploaded-file/uploaded-file.d.ts +7 -7
  363. package/build/src/http-server/client/uploaded-file/uploaded-file.js +8 -8
  364. package/build/src/http-server/client/websocket-request.d.ts +17 -13
  365. package/build/src/http-server/client/websocket-request.d.ts.map +1 -1
  366. package/build/src/http-server/client/websocket-request.js +10 -10
  367. package/build/src/http-server/client/websocket-session.d.ts +26 -26
  368. package/build/src/http-server/client/websocket-session.d.ts.map +1 -1
  369. package/build/src/http-server/client/websocket-session.js +27 -27
  370. package/build/src/http-server/index.d.ts +19 -19
  371. package/build/src/http-server/index.d.ts.map +1 -1
  372. package/build/src/http-server/index.js +20 -20
  373. package/build/src/http-server/server-client.d.ts +13 -13
  374. package/build/src/http-server/server-client.d.ts.map +1 -1
  375. package/build/src/http-server/server-client.js +14 -14
  376. package/build/src/http-server/websocket-events-host.d.ts +7 -7
  377. package/build/src/http-server/websocket-events-host.d.ts.map +1 -1
  378. package/build/src/http-server/websocket-events-host.js +7 -7
  379. package/build/src/http-server/websocket-events.d.ts +7 -7
  380. package/build/src/http-server/websocket-events.d.ts.map +1 -1
  381. package/build/src/http-server/websocket-events.js +7 -7
  382. package/build/src/http-server/worker-handler/index.d.ts +22 -22
  383. package/build/src/http-server/worker-handler/index.d.ts.map +1 -1
  384. package/build/src/http-server/worker-handler/index.js +20 -20
  385. package/build/src/http-server/worker-handler/worker-thread.d.ts +17 -17
  386. package/build/src/http-server/worker-handler/worker-thread.d.ts.map +1 -1
  387. package/build/src/http-server/worker-handler/worker-thread.js +16 -16
  388. package/build/src/initializer.d.ts +6 -6
  389. package/build/src/initializer.js +7 -7
  390. package/build/src/logger.d.ts +38 -34
  391. package/build/src/logger.d.ts.map +1 -1
  392. package/build/src/logger.js +53 -47
  393. package/build/src/routes/app-routes.d.ts +2 -2
  394. package/build/src/routes/app-routes.js +3 -3
  395. package/build/src/routes/base-route.d.ts +22 -22
  396. package/build/src/routes/base-route.d.ts.map +1 -1
  397. package/build/src/routes/base-route.js +21 -21
  398. package/build/src/routes/basic-route.d.ts +3 -3
  399. package/build/src/routes/basic-route.js +15 -15
  400. package/build/src/routes/get-route.d.ts +2 -2
  401. package/build/src/routes/get-route.js +8 -8
  402. package/build/src/routes/index.d.ts +2 -2
  403. package/build/src/routes/index.js +3 -3
  404. package/build/src/routes/namespace-route.d.ts +2 -2
  405. package/build/src/routes/namespace-route.js +8 -8
  406. package/build/src/routes/post-route.d.ts +2 -2
  407. package/build/src/routes/post-route.js +8 -8
  408. package/build/src/routes/resolver.d.ts +21 -19
  409. package/build/src/routes/resolver.d.ts.map +1 -1
  410. package/build/src/routes/resolver.js +48 -26
  411. package/build/src/routes/resource-route.d.ts +6 -6
  412. package/build/src/routes/resource-route.js +12 -12
  413. package/build/src/testing/format-value.d.ts +6 -6
  414. package/build/src/testing/format-value.d.ts.map +1 -1
  415. package/build/src/testing/format-value.js +11 -11
  416. package/build/src/testing/request-client.d.ts +10 -10
  417. package/build/src/testing/request-client.d.ts.map +1 -1
  418. package/build/src/testing/request-client.js +11 -11
  419. package/build/src/testing/test-files-finder.d.ts +16 -16
  420. package/build/src/testing/test-files-finder.js +17 -17
  421. package/build/src/testing/test-runner.d.ts +78 -39
  422. package/build/src/testing/test-runner.d.ts.map +1 -1
  423. package/build/src/testing/test-runner.js +40 -40
  424. package/build/src/testing/test.d.ts +61 -61
  425. package/build/src/testing/test.d.ts.map +1 -1
  426. package/build/src/testing/test.js +77 -56
  427. package/build/src/utils/backtrace-cleaner.d.ts +4 -4
  428. package/build/src/utils/backtrace-cleaner.js +5 -5
  429. package/build/src/utils/ensure-error.d.ts +3 -3
  430. package/build/src/utils/ensure-error.d.ts.map +1 -1
  431. package/build/src/utils/ensure-error.js +3 -3
  432. package/build/src/utils/file-exists.d.ts +2 -2
  433. package/build/src/utils/file-exists.js +3 -3
  434. package/build/src/utils/nest-callbacks.d.ts +3 -3
  435. package/build/src/utils/nest-callbacks.js +4 -4
  436. package/build/src/utils/rest-args-error.d.ts +2 -2
  437. package/build/src/utils/rest-args-error.js +3 -3
  438. package/build/src/utils/singularize-model-name.d.ts +2 -2
  439. package/build/src/utils/singularize-model-name.js +3 -3
  440. package/build/src/utils/with-tracked-stack-async-hooks.d.ts +4 -4
  441. package/build/src/utils/with-tracked-stack-async-hooks.d.ts.map +1 -1
  442. package/build/src/utils/with-tracked-stack-async-hooks.js +5 -5
  443. package/build/src/utils/with-tracked-stack.d.ts +5 -4
  444. package/build/src/utils/with-tracked-stack.d.ts.map +1 -1
  445. package/build/src/utils/with-tracked-stack.js +12 -18
  446. 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} - Result.
8
+ * @returns {VelociousDatabaseRecord} - The model.
9
9
  */
10
10
  getModel(): VelociousDatabaseRecord;
11
11
  /**
12
- * @param {VelociousDatabaseRecord} model
13
- * @returns {void} - Result.
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[]>} - Result. */
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} - Result.
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} - Result.
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} - Result.
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>} - Result.
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>} - Result.
80
+ * @returns {Array<string>} - The relationship names.
72
81
  */
73
82
  static getRelationshipNames(): Array<string>;
74
83
  /**
@@ -78,296 +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} - Result.
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>>} - Result.
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} - Result.
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} - Result.
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} - Result.
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} - Result.
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} - Result.
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>} - Result.
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} - Result.
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} - Result.
145
+ * @returns {string} - The database identifier.
133
146
  */
134
147
  static getDatabaseIdentifier(): string;
135
148
  /**
136
- * @param {string} databaseIdentifier
137
- * @returns {void} - Result.
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[]} - Result.
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>} - Result. */
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} - Result.
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} - Result.
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>} - Result.
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} - Result.
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>} - Result.
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>} - Result.
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} - Result.
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} - Result.
193
+ * @returns {string} - The primary key.
181
194
  */
182
195
  static primaryKey(): string;
183
196
  /**
184
- * @returns {string} - Result.
197
+ * @returns {string} - The table name.
185
198
  */
186
199
  static tableName(): string;
187
200
  /**
188
- * @param {string} tableName
189
- * @returns {void} - Result.
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<*>} - Result.
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} - Result.
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} - Result.
216
+ * @returns {typeof VelociousDatabaseRecord} - The translation class.
204
217
  */
205
218
  static getTranslationClass(): typeof VelociousDatabaseRecord;
206
219
  /**
207
- * @returns {string} - Result.
220
+ * @returns {string} - The translations table name.
208
221
  */
209
222
  static getTranslationsTableName(): string;
210
223
  /**
211
- * @returns {Promise<boolean>} - Result.
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>} - Result.
236
+ * @returns {ModelClassQuery<MC>} - The new query.
224
237
  */
225
238
  static _newQuery<MC extends typeof VelociousDatabaseRecord>(this: MC): ModelClassQuery<MC>;
226
- /** @returns {string} - Result. */
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>} - Result.
244
+ * @returns {ModelClassQuery<MC>} - The all.
232
245
  */
233
246
  static all<MC extends typeof VelociousDatabaseRecord>(this: MC): ModelClassQuery<MC>;
234
- /** @returns {Promise<number>} - Result. */
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>} - Result.
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[]>} - Result.
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>>} - Result.
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>} - Result.
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>>} - Result.
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>>} - Result.
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>>} - Result.
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>>} - Result.
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>} - Result.
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>>} - Result.
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>} - Result.
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>} - Result.
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>} - Result.
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
340
- * @returns {ModelClassQuery<MC>} - Result.
350
+ * @param {import("../query/index.js").NestedPreloadRecord} preload - Preload.
351
+ * @returns {ModelClassQuery<MC>} - The preload.
341
352
  */
342
353
  static preload<MC extends typeof VelociousDatabaseRecord>(this: MC, preload: import("../query/index.js").NestedPreloadRecord): ModelClassQuery<MC>;
343
354
  /**
344
355
  * @template {typeof VelociousDatabaseRecord} MC
345
356
  * @this {MC}
346
- * @param {import("../query/index.js").SelectArgumentType} select
347
- * @returns {ModelClassQuery<MC>} - Result.
357
+ * @param {import("../query/index.js").SelectArgumentType} select - Select.
358
+ * @returns {ModelClassQuery<MC>} - The select.
348
359
  */
349
360
  static select<MC extends typeof VelociousDatabaseRecord>(this: MC, select: import("../query/index.js").SelectArgumentType): ModelClassQuery<MC>;
350
361
  /**
351
362
  * @template {typeof VelociousDatabaseRecord} MC
352
363
  * @this {MC}
353
- * @returns {Promise<InstanceType<MC>[]>} - Result.
364
+ * @returns {Promise<InstanceType<MC>[]>} - Resolves with the array.
354
365
  */
355
366
  static toArray<MC extends typeof VelociousDatabaseRecord>(this: MC): Promise<InstanceType<MC>[]>;
356
367
  /**
357
368
  * @template {typeof VelociousDatabaseRecord} MC
358
369
  * @this {MC}
359
- * @param {import("../query/index.js").WhereArgumentType} where
360
- * @returns {ModelClassQuery<MC>} - Result.
370
+ * @param {import("../query/index.js").WhereArgumentType} where - Where.
371
+ * @returns {ModelClassQuery<MC>} - The where.
361
372
  */
362
373
  static where<MC extends typeof VelociousDatabaseRecord>(this: MC, where: import("../query/index.js").WhereArgumentType): ModelClassQuery<MC>;
363
374
  /**
364
- * @param {Record<string, any>} changes
375
+ * @param {Record<string, unknown>} changes - Changes.
365
376
  */
366
- constructor(changes?: Record<string, any>);
367
- /** @type {Record<string, any>} */
368
- _attributes: Record<string, any>;
369
- /** @type {Record<string, any>} */
370
- _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>;
371
382
  /** @type {Record<string, import("../drivers/base-column.js").default>} */
372
383
  _columnsAsHash: Record<string, import("../drivers/base-column.js").default>;
373
384
  /** @type {import("../drivers/base.js").default | undefined} */
@@ -379,47 +390,47 @@ declare class VelociousDatabaseRecord {
379
390
  /** @type {Record<string, ValidationErrorObjectType[]>} */
380
391
  _validationErrors: Record<string, ValidationErrorObjectType[]>;
381
392
  /**
382
- * @param {string} relationshipName
383
- * @returns {import("./instance-relationships/base.js").default} - Result.
393
+ * @param {string} relationshipName - Relationship name.
394
+ * @returns {import("./instance-relationships/base.js").default} - The relationship by name.
384
395
  */
385
396
  getRelationshipByName(relationshipName: string): import("./instance-relationships/base.js").default<any, any>;
386
397
  /**
387
- * @returns {import("../../configuration.js").default} - Result.
398
+ * @returns {import("../../configuration.js").default} - The configuration.
388
399
  */
389
400
  _getConfiguration(): import("../../configuration.js").default;
390
401
  /**
391
- * @param {any} value
392
- * @returns {boolean} - Result.
402
+ * @param {unknown} value - Value to use.
403
+ * @returns {boolean} - Whether attribute.
393
404
  */
394
- _hasAttribute(value: any): boolean;
405
+ _hasAttribute(value: unknown): boolean;
395
406
  /**
396
- * @param {string} name
397
- * @returns {*} - Result.
407
+ * @param {string} name - Name.
408
+ * @returns {unknown} - The attribute.
398
409
  */
399
- getAttribute(name: string): any;
410
+ getAttribute(name: string): unknown;
400
411
  /**
401
412
  * @abstract
402
- * @returns {typeof VelociousDatabaseRecord} - Result.
413
+ * @returns {typeof VelociousDatabaseRecord} - The model class.
403
414
  */
404
415
  getModelClass(): typeof VelociousDatabaseRecord;
405
416
  /**
406
- * @param {string} name
407
- * @param {*} newValue
408
- * @returns {void} - Result.
417
+ * @param {string} name - Name.
418
+ * @param {unknown} newValue - New value.
419
+ * @returns {void} - No return value.
409
420
  */
410
- setAttribute(name: string, newValue: any): void;
421
+ setAttribute(name: string, newValue: unknown): void;
411
422
  /**
412
- * @param {string} name
413
- * @param {any} newValue
423
+ * @param {string} name - Name.
424
+ * @param {unknown} newValue - New value.
414
425
  */
415
- _setColumnAttribute(name: string, newValue: any): void;
426
+ _setColumnAttribute(name: string, newValue: unknown): void;
416
427
  /**
417
- * @param {any} value
418
- * @returns {any} - Result.
428
+ * @param {unknown} value - Value to use.
429
+ * @returns {unknown} - The date value.
419
430
  */
420
- _normalizeDateValue(value: any): any;
431
+ _normalizeDateValue(value: unknown): unknown;
421
432
  /**
422
- * @returns {Promise<void>} - Result.
433
+ * @returns {Promise<void>} - Resolves when complete.
423
434
  */
424
435
  save(): Promise<void>;
425
436
  _autoSaveBelongsToRelationships(): Promise<{
@@ -427,123 +438,123 @@ declare class VelociousDatabaseRecord {
427
438
  }>;
428
439
  _autoSaveHasManyAndHasOneRelationshipsToSave(): import("./instance-relationships/base.js").default<any, any>[];
429
440
  /**
430
- * @param {object} args
431
- * @param {boolean} args.isNewRecord
441
+ * @param {object} args - Options object.
442
+ * @param {boolean} args.isNewRecord - Whether is new record.
432
443
  */
433
444
  _autoSaveHasManyAndHasOneRelationships({ isNewRecord }: {
434
445
  isNewRecord: boolean;
435
446
  }): Promise<void>;
436
447
  /**
437
448
  * @abstract
438
- * @returns {TranslationBase[]} - Result.
449
+ * @returns {TranslationBase[]} - The translations loaded.
439
450
  */
440
451
  translationsLoaded(): TranslationBase[];
441
452
  /**
442
- * @param {string} name
443
- * @param {string} locale
444
- * @returns {*} - Result.
453
+ * @param {string} name - Name.
454
+ * @param {string} locale - Locale.
455
+ * @returns {string | undefined} - The translated attribute, if found.
445
456
  */
446
- _getTranslatedAttribute(name: string, locale: string): any;
457
+ _getTranslatedAttribute(name: string, locale: string): string | undefined;
447
458
  /**
448
- * @param {string} name
449
- * @param {string} locale
450
- * @returns {*} - Result.
459
+ * @param {string} name - Name.
460
+ * @param {string} locale - Locale.
461
+ * @returns {string | undefined} - The translated attribute with fallback, if found.
451
462
  */
452
- _getTranslatedAttributeWithFallback(name: string, locale: string): any;
463
+ _getTranslatedAttributeWithFallback(name: string, locale: string): string | undefined;
453
464
  /**
454
- * @param {string} name
455
- * @param {string} locale
456
- * @param {*} newValue
457
- * @returns {void} - Result.
465
+ * @param {string} name - Name.
466
+ * @param {string} locale - Locale.
467
+ * @param {unknown} newValue - New value.
468
+ * @returns {void} - No return value.
458
469
  */
459
- _setTranslatedAttribute(name: string, locale: string, newValue: any): void;
470
+ _setTranslatedAttribute(name: string, locale: string, newValue: unknown): void;
460
471
  _isNewRecord: boolean;
461
472
  /**
462
- * @param {object} attributes
463
- * @returns {void} - Result.
473
+ * @param {object} attributes - Attributes.
474
+ * @returns {void} - No return value.
464
475
  */
465
476
  loadExistingRecord(attributes: object): void;
466
477
  /**
467
478
  * Assigns the given attributes to the record.
468
- * @param {Record<string, any>} attributesToAssign
469
- * @returns {void} - Result.
479
+ * @param {Record<string, unknown>} attributesToAssign - Attributes to assign.
480
+ * @returns {void} - No return value.
470
481
  */
471
- assign(attributesToAssign: Record<string, any>): void;
482
+ assign(attributesToAssign: Record<string, unknown>): void;
472
483
  /**
473
484
  * Returns a the current attributes of the record (original attributes from database plus changes)
474
- * @returns {Record<string, any>} - Result.
485
+ * @returns {Record<string, unknown>} - The attributes.
475
486
  */
476
- attributes(): Record<string, any>;
487
+ attributes(): Record<string, unknown>;
477
488
  /**
478
489
  * Returns column-name keyed data (original attributes from database plus changes)
479
- * @returns {Record<string, any>} - Result.
490
+ * @returns {Record<string, unknown>} - The raw attributes.
480
491
  */
481
- rawAttributes(): Record<string, any>;
492
+ rawAttributes(): Record<string, unknown>;
482
493
  /**
483
- * @returns {import("../drivers/base.js").default} - Result.
494
+ * @returns {import("../drivers/base.js").default} - The connection.
484
495
  */
485
496
  _connection(): import("../drivers/base.js").default;
486
497
  /**
487
498
  * Destroys the record in the database and all of its dependent records.
488
- * @returns {Promise<void>} - Result.
499
+ * @returns {Promise<void>} - Resolves when complete.
489
500
  */
490
501
  destroy(): Promise<void>;
491
- /** @returns {boolean} - Result. */
502
+ /** @returns {boolean} - Whether changes. */
492
503
  _hasChanges(): boolean;
493
504
  /**
494
505
  * Returns true if the model has been changed since it was loaded from the database.
495
- * @returns {boolean} - Result.
506
+ * @returns {boolean} - Whether changed.
496
507
  */
497
508
  isChanged(): boolean;
498
509
  /**
499
510
  * Returns the changes that have been made to this record since it was loaded from the database.
500
- * @returns {Record<string, any[]>} - Result.
511
+ * @returns {Record<string, unknown[]>} - The changes.
501
512
  */
502
- changes(): Record<string, any[]>;
513
+ changes(): Record<string, unknown[]>;
503
514
  /**
504
- * @returns {string} - Result.
515
+ * @returns {string} - The table name.
505
516
  */
506
517
  _tableName(): string;
507
518
  /**
508
519
  * Reads an attribute value from the record.
509
520
  * @param {string} attributeName The name of the attribute to read. This is the attribute name, not the column name.
510
- * @returns {any} - Result.
521
+ * @returns {unknown} - The attribute.
511
522
  */
512
- readAttribute(attributeName: string): any;
523
+ readAttribute(attributeName: string): unknown;
513
524
  /**
514
525
  * Reads a column value from the record.
515
526
  * @param {string} attributeName The name of the column to read. This is the column name, not the attribute name.
516
- * @returns {any} - Result.
527
+ * @returns {unknown} - The column.
517
528
  */
518
- readColumn(attributeName: string): any;
519
- _belongsToChanges(): Record<string, any>;
520
- /** @returns {Promise<void>} - Result. */
529
+ readColumn(attributeName: string): unknown;
530
+ _belongsToChanges(): Record<string, unknown>;
531
+ /** @returns {Promise<void>} - Resolves when complete. */
521
532
  _createNewRecord(): Promise<void>;
522
- /** @returns {Promise<void>} - Result. */
533
+ /** @returns {Promise<void>} - Resolves when complete. */
523
534
  _updateRecordWithChanges(): Promise<void>;
524
- /** @returns {number|string} - Result. */
535
+ /** @returns {number|string} - The id. */
525
536
  id(): number | string;
526
- /** @returns {boolean} - Result. */
537
+ /** @returns {boolean} - Whether persisted. */
527
538
  isPersisted(): boolean;
528
- /** @returns {boolean} - Result. */
539
+ /** @returns {boolean} - Whether new record. */
529
540
  isNewRecord(): boolean;
530
541
  /**
531
- * @param {boolean} newIsNewRecord
532
- * @returns {void} - Result.
542
+ * @param {boolean} newIsNewRecord - New is new record.
543
+ * @returns {void} - No return value.
533
544
  */
534
545
  setIsNewRecord(newIsNewRecord: boolean): void;
535
546
  /**
536
547
  * @template {typeof VelociousDatabaseRecord} MC
537
- * @param {string | number} id
538
- * @returns {Promise<void>} - Result.
548
+ * @param {string | number} id - Record identifier.
549
+ * @returns {Promise<void>} - Resolves when complete.
539
550
  */
540
551
  _reloadWithId<MC extends typeof VelociousDatabaseRecord>(id: string | number): Promise<void>;
541
552
  /**
542
- * @returns {Promise<void>} - Result.
553
+ * @returns {Promise<void>} - Resolves when complete.
543
554
  */
544
555
  reload(): Promise<void>;
545
556
  _runValidations(): Promise<void>;
546
- /** @returns {string[]} - Result. */
557
+ /** @returns {string[]} - The full error messages. */
547
558
  fullErrorMessages(): string[];
548
559
  /**
549
560
  * Assigns the attributes to the record and saves it.
@@ -554,7 +565,7 @@ declare class VelociousDatabaseRecord {
554
565
  declare class TranslationBase extends VelociousDatabaseRecord {
555
566
  /**
556
567
  * @abstract
557
- * @returns {string} - Result.
568
+ * @returns {string} - The locale.
558
569
  */
559
570
  locale(): string;
560
571
  }