velocious 1.0.428 → 1.0.429

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 (933) hide show
  1. package/README.md +2 -0
  2. package/build/src/application.d.ts +96 -9
  3. package/build/src/application.d.ts.map +1 -1
  4. package/build/src/application.js +127 -28
  5. package/build/src/authorization/ability.d.ts +72 -31
  6. package/build/src/authorization/ability.d.ts.map +1 -1
  7. package/build/src/authorization/ability.js +59 -22
  8. package/build/src/authorization/base-resource.d.ts +47 -20
  9. package/build/src/authorization/base-resource.d.ts.map +1 -1
  10. package/build/src/authorization/base-resource.js +43 -14
  11. package/build/src/background-jobs/client.d.ts +4 -2
  12. package/build/src/background-jobs/client.d.ts.map +1 -1
  13. package/build/src/background-jobs/client.js +4 -2
  14. package/build/src/background-jobs/cron-expression.d.ts +9 -5
  15. package/build/src/background-jobs/cron-expression.d.ts.map +1 -1
  16. package/build/src/background-jobs/cron-expression.js +16 -6
  17. package/build/src/background-jobs/forked-runner-child.js +12 -5
  18. package/build/src/background-jobs/job-registry.d.ts +7 -1
  19. package/build/src/background-jobs/job-registry.d.ts.map +1 -1
  20. package/build/src/background-jobs/job-registry.js +8 -2
  21. package/build/src/background-jobs/job-runner.d.ts +1 -0
  22. package/build/src/background-jobs/job-runner.d.ts.map +1 -1
  23. package/build/src/background-jobs/job-runner.js +8 -3
  24. package/build/src/background-jobs/job.d.ts +12 -8
  25. package/build/src/background-jobs/job.d.ts.map +1 -1
  26. package/build/src/background-jobs/job.js +12 -6
  27. package/build/src/background-jobs/json-socket.d.ts +17 -5
  28. package/build/src/background-jobs/json-socket.d.ts.map +1 -1
  29. package/build/src/background-jobs/json-socket.js +18 -6
  30. package/build/src/background-jobs/main.d.ts +118 -32
  31. package/build/src/background-jobs/main.d.ts.map +1 -1
  32. package/build/src/background-jobs/main.js +123 -35
  33. package/build/src/background-jobs/normalize-error.d.ts +2 -1
  34. package/build/src/background-jobs/normalize-error.d.ts.map +1 -1
  35. package/build/src/background-jobs/normalize-error.js +5 -3
  36. package/build/src/background-jobs/scheduler.d.ts +31 -10
  37. package/build/src/background-jobs/scheduler.d.ts.map +1 -1
  38. package/build/src/background-jobs/scheduler.js +33 -11
  39. package/build/src/background-jobs/socket-request.d.ts +2 -0
  40. package/build/src/background-jobs/socket-request.d.ts.map +1 -1
  41. package/build/src/background-jobs/socket-request.js +11 -3
  42. package/build/src/background-jobs/status-reporter.d.ts +5 -2
  43. package/build/src/background-jobs/status-reporter.d.ts.map +1 -1
  44. package/build/src/background-jobs/status-reporter.js +6 -3
  45. package/build/src/background-jobs/store.d.ts +57 -19
  46. package/build/src/background-jobs/store.d.ts.map +1 -1
  47. package/build/src/background-jobs/store.js +70 -20
  48. package/build/src/background-jobs/types.d.ts +7 -7
  49. package/build/src/background-jobs/types.d.ts.map +1 -1
  50. package/build/src/background-jobs/types.js +6 -6
  51. package/build/src/background-jobs/web/authorization.d.ts.map +1 -1
  52. package/build/src/background-jobs/web/authorization.js +3 -1
  53. package/build/src/background-jobs/web/controller.d.ts +40 -14
  54. package/build/src/background-jobs/web/controller.d.ts.map +1 -1
  55. package/build/src/background-jobs/web/controller.js +46 -15
  56. package/build/src/background-jobs/web/registry.d.ts +5 -0
  57. package/build/src/background-jobs/web/registry.d.ts.map +1 -1
  58. package/build/src/background-jobs/web/registry.js +4 -1
  59. package/build/src/background-jobs/worker.d.ts +41 -8
  60. package/build/src/background-jobs/worker.d.ts.map +1 -1
  61. package/build/src/background-jobs/worker.js +64 -16
  62. package/build/src/beacon/client.d.ts +39 -12
  63. package/build/src/beacon/client.d.ts.map +1 -1
  64. package/build/src/beacon/client.js +45 -15
  65. package/build/src/beacon/in-process-broker.d.ts +4 -0
  66. package/build/src/beacon/in-process-broker.d.ts.map +1 -1
  67. package/build/src/beacon/in-process-broker.js +8 -3
  68. package/build/src/beacon/in-process-client.d.ts +28 -9
  69. package/build/src/beacon/in-process-client.d.ts.map +1 -1
  70. package/build/src/beacon/in-process-client.js +27 -9
  71. package/build/src/beacon/server.d.ts +13 -2
  72. package/build/src/beacon/server.d.ts.map +1 -1
  73. package/build/src/beacon/server.js +21 -5
  74. package/build/src/beacon/types.d.ts +3 -3
  75. package/build/src/beacon/types.d.ts.map +1 -1
  76. package/build/src/beacon/types.js +2 -2
  77. package/build/src/cli/base-command.d.ts +18 -4
  78. package/build/src/cli/base-command.d.ts.map +1 -1
  79. package/build/src/cli/base-command.js +15 -4
  80. package/build/src/cli/browser-cli.d.ts +3 -0
  81. package/build/src/cli/browser-cli.d.ts.map +1 -1
  82. package/build/src/cli/browser-cli.js +7 -2
  83. package/build/src/cli/commands/background-jobs-main.d.ts +0 -1
  84. package/build/src/cli/commands/background-jobs-main.d.ts.map +1 -1
  85. package/build/src/cli/commands/background-jobs-runner.d.ts +0 -1
  86. package/build/src/cli/commands/background-jobs-runner.d.ts.map +1 -1
  87. package/build/src/cli/commands/background-jobs-worker.d.ts +0 -1
  88. package/build/src/cli/commands/background-jobs-worker.d.ts.map +1 -1
  89. package/build/src/cli/commands/beacon.d.ts +0 -1
  90. package/build/src/cli/commands/beacon.d.ts.map +1 -1
  91. package/build/src/cli/commands/console.d.ts +0 -2
  92. package/build/src/cli/commands/console.d.ts.map +1 -1
  93. package/build/src/cli/commands/console.js +5 -2
  94. package/build/src/cli/commands/db/base-command.d.ts +11 -2
  95. package/build/src/cli/commands/db/base-command.d.ts.map +1 -1
  96. package/build/src/cli/commands/db/base-command.js +12 -3
  97. package/build/src/cli/commands/db/create.d.ts +3 -0
  98. package/build/src/cli/commands/db/create.d.ts.map +1 -1
  99. package/build/src/cli/commands/db/create.js +4 -1
  100. package/build/src/cli/commands/db/drop.d.ts +3 -0
  101. package/build/src/cli/commands/db/drop.d.ts.map +1 -1
  102. package/build/src/cli/commands/db/drop.js +4 -1
  103. package/build/src/cli/commands/db/schema/dump.d.ts +0 -2
  104. package/build/src/cli/commands/db/schema/dump.d.ts.map +1 -1
  105. package/build/src/cli/commands/db/schema/dump.js +5 -2
  106. package/build/src/cli/commands/db/schema/load.d.ts +0 -2
  107. package/build/src/cli/commands/db/schema/load.d.ts.map +1 -1
  108. package/build/src/cli/commands/db/schema/load.js +5 -2
  109. package/build/src/cli/commands/db/seed.d.ts +0 -2
  110. package/build/src/cli/commands/db/seed.d.ts.map +1 -1
  111. package/build/src/cli/commands/db/seed.js +5 -2
  112. package/build/src/cli/commands/db/tenants/check.d.ts +4 -1
  113. package/build/src/cli/commands/db/tenants/check.d.ts.map +1 -1
  114. package/build/src/cli/commands/db/tenants/check.js +5 -2
  115. package/build/src/cli/commands/db/tenants/create.d.ts +4 -1
  116. package/build/src/cli/commands/db/tenants/create.d.ts.map +1 -1
  117. package/build/src/cli/commands/db/tenants/create.js +5 -2
  118. package/build/src/cli/commands/db/tenants/migrate.d.ts +4 -1
  119. package/build/src/cli/commands/db/tenants/migrate.d.ts.map +1 -1
  120. package/build/src/cli/commands/db/tenants/migrate.js +5 -2
  121. package/build/src/cli/commands/destroy/migration.d.ts +0 -1
  122. package/build/src/cli/commands/destroy/migration.d.ts.map +1 -1
  123. package/build/src/cli/commands/generate/base-models.d.ts +0 -1
  124. package/build/src/cli/commands/generate/base-models.d.ts.map +1 -1
  125. package/build/src/cli/commands/generate/frontend-models.d.ts +0 -2
  126. package/build/src/cli/commands/generate/frontend-models.d.ts.map +1 -1
  127. package/build/src/cli/commands/generate/frontend-models.js +5 -2
  128. package/build/src/cli/commands/generate/migration.d.ts +0 -1
  129. package/build/src/cli/commands/generate/migration.d.ts.map +1 -1
  130. package/build/src/cli/commands/generate/model.d.ts +0 -1
  131. package/build/src/cli/commands/generate/model.d.ts.map +1 -1
  132. package/build/src/cli/commands/init.d.ts +0 -1
  133. package/build/src/cli/commands/init.d.ts.map +1 -1
  134. package/build/src/cli/commands/routes.d.ts +0 -1
  135. package/build/src/cli/commands/routes.d.ts.map +1 -1
  136. package/build/src/cli/commands/run-script.d.ts +0 -2
  137. package/build/src/cli/commands/run-script.d.ts.map +1 -1
  138. package/build/src/cli/commands/run-script.js +5 -2
  139. package/build/src/cli/commands/runner.d.ts +0 -2
  140. package/build/src/cli/commands/runner.d.ts.map +1 -1
  141. package/build/src/cli/commands/runner.js +5 -2
  142. package/build/src/cli/commands/server.d.ts +0 -1
  143. package/build/src/cli/commands/server.d.ts.map +1 -1
  144. package/build/src/cli/commands/test.d.ts +0 -1
  145. package/build/src/cli/commands/test.d.ts.map +1 -1
  146. package/build/src/cli/index.d.ts +18 -5
  147. package/build/src/cli/index.d.ts.map +1 -1
  148. package/build/src/cli/index.js +25 -8
  149. package/build/src/cli/tenant-database-command-helper.d.ts +24 -9
  150. package/build/src/cli/tenant-database-command-helper.d.ts.map +1 -1
  151. package/build/src/cli/tenant-database-command-helper.js +30 -11
  152. package/build/src/cli/use-browser-cli.d.ts +1 -0
  153. package/build/src/cli/use-browser-cli.d.ts.map +1 -1
  154. package/build/src/cli/use-browser-cli.js +5 -2
  155. package/build/src/configuration-resolver.d.ts +1 -0
  156. package/build/src/configuration-resolver.d.ts.map +1 -1
  157. package/build/src/configuration-resolver.js +2 -1
  158. package/build/src/configuration-types.d.ts +44 -44
  159. package/build/src/configuration-types.d.ts.map +1 -1
  160. package/build/src/configuration-types.js +27 -27
  161. package/build/src/configuration.d.ts +350 -114
  162. package/build/src/configuration.d.ts.map +1 -1
  163. package/build/src/configuration.js +416 -128
  164. package/build/src/controller.d.ts +67 -18
  165. package/build/src/controller.d.ts.map +1 -1
  166. package/build/src/controller.js +88 -23
  167. package/build/src/current-configuration.d.ts +2 -0
  168. package/build/src/current-configuration.d.ts.map +1 -1
  169. package/build/src/current-configuration.js +6 -2
  170. package/build/src/current.d.ts +16 -9
  171. package/build/src/current.d.ts.map +1 -1
  172. package/build/src/current.js +15 -8
  173. package/build/src/database/annotations-async-hooks.js +13 -6
  174. package/build/src/database/annotations.d.ts +7 -1
  175. package/build/src/database/annotations.d.ts.map +1 -1
  176. package/build/src/database/annotations.js +12 -5
  177. package/build/src/database/drivers/base-column.d.ts +21 -3
  178. package/build/src/database/drivers/base-column.d.ts.map +1 -1
  179. package/build/src/database/drivers/base-column.js +21 -3
  180. package/build/src/database/drivers/base-columns-index.d.ts +9 -0
  181. package/build/src/database/drivers/base-columns-index.d.ts.map +1 -1
  182. package/build/src/database/drivers/base-columns-index.js +10 -1
  183. package/build/src/database/drivers/base-foreign-key.d.ts +15 -3
  184. package/build/src/database/drivers/base-foreign-key.d.ts.map +1 -1
  185. package/build/src/database/drivers/base-foreign-key.js +15 -3
  186. package/build/src/database/drivers/base-table.d.ts +16 -3
  187. package/build/src/database/drivers/base-table.d.ts.map +1 -1
  188. package/build/src/database/drivers/base-table.js +16 -3
  189. package/build/src/database/drivers/base.d.ts +174 -37
  190. package/build/src/database/drivers/base.d.ts.map +1 -1
  191. package/build/src/database/drivers/base.js +156 -40
  192. package/build/src/database/drivers/mssql/column.d.ts +3 -2
  193. package/build/src/database/drivers/mssql/column.d.ts.map +1 -1
  194. package/build/src/database/drivers/mssql/column.js +3 -2
  195. package/build/src/database/drivers/mssql/index.d.ts +5 -6
  196. package/build/src/database/drivers/mssql/index.d.ts.map +1 -1
  197. package/build/src/database/drivers/mssql/index.js +38 -7
  198. package/build/src/database/drivers/mssql/options.d.ts +1 -0
  199. package/build/src/database/drivers/mssql/options.d.ts.map +1 -1
  200. package/build/src/database/drivers/mssql/options.js +8 -2
  201. package/build/src/database/drivers/mssql/sql/create-database.d.ts +1 -0
  202. package/build/src/database/drivers/mssql/sql/create-database.d.ts.map +1 -1
  203. package/build/src/database/drivers/mssql/sql/create-database.js +2 -1
  204. package/build/src/database/drivers/mssql/sql/drop-database.d.ts.map +1 -1
  205. package/build/src/database/drivers/mssql/sql/drop-database.js +2 -1
  206. package/build/src/database/drivers/mssql/structure-sql.d.ts +5 -2
  207. package/build/src/database/drivers/mssql/structure-sql.d.ts.map +1 -1
  208. package/build/src/database/drivers/mssql/structure-sql.js +5 -2
  209. package/build/src/database/drivers/mssql/table.d.ts +1 -0
  210. package/build/src/database/drivers/mssql/table.d.ts.map +1 -1
  211. package/build/src/database/drivers/mssql/table.js +9 -4
  212. package/build/src/database/drivers/mysql/column.d.ts +3 -2
  213. package/build/src/database/drivers/mysql/column.d.ts.map +1 -1
  214. package/build/src/database/drivers/mysql/column.js +4 -3
  215. package/build/src/database/drivers/mysql/index.d.ts +11 -3
  216. package/build/src/database/drivers/mysql/index.d.ts.map +1 -1
  217. package/build/src/database/drivers/mysql/index.js +54 -10
  218. package/build/src/database/drivers/mysql/options.d.ts +1 -0
  219. package/build/src/database/drivers/mysql/options.d.ts.map +1 -1
  220. package/build/src/database/drivers/mysql/options.js +4 -2
  221. package/build/src/database/drivers/mysql/query.d.ts +3 -2
  222. package/build/src/database/drivers/mysql/query.d.ts.map +1 -1
  223. package/build/src/database/drivers/mysql/query.js +6 -3
  224. package/build/src/database/drivers/mysql/sql/create-database.d.ts.map +1 -1
  225. package/build/src/database/drivers/mysql/sql/create-database.js +3 -1
  226. package/build/src/database/drivers/mysql/structure-sql.d.ts +7 -2
  227. package/build/src/database/drivers/mysql/structure-sql.d.ts.map +1 -1
  228. package/build/src/database/drivers/mysql/structure-sql.js +7 -2
  229. package/build/src/database/drivers/mysql/table.d.ts +1 -0
  230. package/build/src/database/drivers/mysql/table.d.ts.map +1 -1
  231. package/build/src/database/drivers/mysql/table.js +7 -3
  232. package/build/src/database/drivers/pgsql/column.d.ts +3 -2
  233. package/build/src/database/drivers/pgsql/column.d.ts.map +1 -1
  234. package/build/src/database/drivers/pgsql/column.js +3 -2
  235. package/build/src/database/drivers/pgsql/index.d.ts +1 -1
  236. package/build/src/database/drivers/pgsql/index.d.ts.map +1 -1
  237. package/build/src/database/drivers/pgsql/index.js +36 -11
  238. package/build/src/database/drivers/pgsql/options.d.ts +2 -0
  239. package/build/src/database/drivers/pgsql/options.d.ts.map +1 -1
  240. package/build/src/database/drivers/pgsql/options.js +3 -1
  241. package/build/src/database/drivers/pgsql/structure-sql.d.ts +5 -2
  242. package/build/src/database/drivers/pgsql/structure-sql.d.ts.map +1 -1
  243. package/build/src/database/drivers/pgsql/structure-sql.js +5 -2
  244. package/build/src/database/drivers/pgsql/table.d.ts +1 -0
  245. package/build/src/database/drivers/pgsql/table.d.ts.map +1 -1
  246. package/build/src/database/drivers/pgsql/table.js +6 -2
  247. package/build/src/database/drivers/sqlite/base.d.ts +15 -5
  248. package/build/src/database/drivers/sqlite/base.d.ts.map +1 -1
  249. package/build/src/database/drivers/sqlite/base.js +79 -27
  250. package/build/src/database/drivers/sqlite/column.d.ts +3 -2
  251. package/build/src/database/drivers/sqlite/column.d.ts.map +1 -1
  252. package/build/src/database/drivers/sqlite/column.js +3 -2
  253. package/build/src/database/drivers/sqlite/connection-sql-js.d.ts +4 -2
  254. package/build/src/database/drivers/sqlite/connection-sql-js.d.ts.map +1 -1
  255. package/build/src/database/drivers/sqlite/connection-sql-js.js +4 -2
  256. package/build/src/database/drivers/sqlite/foreign-key.d.ts +3 -2
  257. package/build/src/database/drivers/sqlite/foreign-key.d.ts.map +1 -1
  258. package/build/src/database/drivers/sqlite/foreign-key.js +3 -2
  259. package/build/src/database/drivers/sqlite/index.d.ts +18 -5
  260. package/build/src/database/drivers/sqlite/index.d.ts.map +1 -1
  261. package/build/src/database/drivers/sqlite/index.js +40 -16
  262. package/build/src/database/drivers/sqlite/index.native.d.ts +1 -1
  263. package/build/src/database/drivers/sqlite/index.native.d.ts.map +1 -1
  264. package/build/src/database/drivers/sqlite/index.native.js +6 -3
  265. package/build/src/database/drivers/sqlite/index.web.d.ts +16 -4
  266. package/build/src/database/drivers/sqlite/index.web.d.ts.map +1 -1
  267. package/build/src/database/drivers/sqlite/index.web.js +17 -7
  268. package/build/src/database/drivers/sqlite/options.d.ts +2 -0
  269. package/build/src/database/drivers/sqlite/options.d.ts.map +1 -1
  270. package/build/src/database/drivers/sqlite/options.js +3 -1
  271. package/build/src/database/drivers/sqlite/query.d.ts +3 -2
  272. package/build/src/database/drivers/sqlite/query.d.ts.map +1 -1
  273. package/build/src/database/drivers/sqlite/query.js +6 -3
  274. package/build/src/database/drivers/sqlite/query.native.d.ts +2 -2
  275. package/build/src/database/drivers/sqlite/query.native.d.ts.map +1 -1
  276. package/build/src/database/drivers/sqlite/query.native.js +3 -3
  277. package/build/src/database/drivers/sqlite/query.web.d.ts +3 -2
  278. package/build/src/database/drivers/sqlite/query.web.d.ts.map +1 -1
  279. package/build/src/database/drivers/sqlite/query.web.js +6 -3
  280. package/build/src/database/drivers/sqlite/sql/alter-table.d.ts.map +1 -1
  281. package/build/src/database/drivers/sqlite/sql/alter-table.js +9 -3
  282. package/build/src/database/drivers/sqlite/structure-sql.d.ts +2 -0
  283. package/build/src/database/drivers/sqlite/structure-sql.d.ts.map +1 -1
  284. package/build/src/database/drivers/sqlite/structure-sql.js +3 -1
  285. package/build/src/database/drivers/sqlite/table-rebuilder.d.ts +2 -0
  286. package/build/src/database/drivers/sqlite/table-rebuilder.d.ts.map +1 -1
  287. package/build/src/database/drivers/sqlite/table-rebuilder.js +3 -1
  288. package/build/src/database/drivers/sqlite/table.d.ts +2 -0
  289. package/build/src/database/drivers/sqlite/table.d.ts.map +1 -1
  290. package/build/src/database/drivers/sqlite/table.js +14 -4
  291. package/build/src/database/drivers/structure-sql/utils.d.ts +2 -0
  292. package/build/src/database/drivers/structure-sql/utils.d.ts.map +1 -1
  293. package/build/src/database/drivers/structure-sql/utils.js +3 -1
  294. package/build/src/database/handler.d.ts +1 -0
  295. package/build/src/database/handler.d.ts.map +1 -1
  296. package/build/src/database/handler.js +2 -1
  297. package/build/src/database/initializer-from-require-context.d.ts +8 -0
  298. package/build/src/database/initializer-from-require-context.d.ts.map +1 -1
  299. package/build/src/database/initializer-from-require-context.js +4 -1
  300. package/build/src/database/migration/index.d.ts +40 -5
  301. package/build/src/database/migration/index.d.ts.map +1 -1
  302. package/build/src/database/migration/index.js +34 -6
  303. package/build/src/database/migrator/files-finder.d.ts +2 -0
  304. package/build/src/database/migrator/files-finder.d.ts.map +1 -1
  305. package/build/src/database/migrator/files-finder.js +6 -2
  306. package/build/src/database/migrator.d.ts +29 -4
  307. package/build/src/database/migrator.d.ts.map +1 -1
  308. package/build/src/database/migrator.js +45 -10
  309. package/build/src/database/pool/async-tracked-multi-connection.d.ts +125 -31
  310. package/build/src/database/pool/async-tracked-multi-connection.d.ts.map +1 -1
  311. package/build/src/database/pool/async-tracked-multi-connection.js +189 -52
  312. package/build/src/database/pool/base-methods-forward.d.ts +1 -0
  313. package/build/src/database/pool/base-methods-forward.d.ts.map +1 -1
  314. package/build/src/database/pool/base-methods-forward.js +12 -3
  315. package/build/src/database/pool/base.d.ts +39 -7
  316. package/build/src/database/pool/base.d.ts.map +1 -1
  317. package/build/src/database/pool/base.js +59 -18
  318. package/build/src/database/pool/single-multi-use.d.ts +1 -0
  319. package/build/src/database/pool/single-multi-use.d.ts.map +1 -1
  320. package/build/src/database/pool/single-multi-use.js +16 -4
  321. package/build/src/database/query/alter-table-base.d.ts +1 -0
  322. package/build/src/database/query/alter-table-base.d.ts.map +1 -1
  323. package/build/src/database/query/alter-table-base.js +3 -1
  324. package/build/src/database/query/base.d.ts +3 -0
  325. package/build/src/database/query/base.d.ts.map +1 -1
  326. package/build/src/database/query/base.js +4 -1
  327. package/build/src/database/query/create-database-base.d.ts +5 -0
  328. package/build/src/database/query/create-database-base.d.ts.map +1 -1
  329. package/build/src/database/query/create-database-base.js +4 -1
  330. package/build/src/database/query/create-index-base.d.ts +5 -0
  331. package/build/src/database/query/create-index-base.d.ts.map +1 -1
  332. package/build/src/database/query/create-index-base.js +4 -1
  333. package/build/src/database/query/create-table-base.d.ts +2 -0
  334. package/build/src/database/query/create-table-base.d.ts.map +1 -1
  335. package/build/src/database/query/create-table-base.js +3 -1
  336. package/build/src/database/query/delete-base.d.ts +3 -2
  337. package/build/src/database/query/delete-base.d.ts.map +1 -1
  338. package/build/src/database/query/delete-base.js +3 -2
  339. package/build/src/database/query/drop-database-base.d.ts +5 -0
  340. package/build/src/database/query/drop-database-base.d.ts.map +1 -1
  341. package/build/src/database/query/drop-database-base.js +4 -1
  342. package/build/src/database/query/drop-table-base.d.ts +1 -0
  343. package/build/src/database/query/drop-table-base.d.ts.map +1 -1
  344. package/build/src/database/query/drop-table-base.js +3 -1
  345. package/build/src/database/query/from-base.d.ts +6 -1
  346. package/build/src/database/query/from-base.d.ts.map +1 -1
  347. package/build/src/database/query/from-base.js +7 -2
  348. package/build/src/database/query/from-plain.d.ts +1 -0
  349. package/build/src/database/query/from-plain.d.ts.map +1 -1
  350. package/build/src/database/query/from-plain.js +2 -1
  351. package/build/src/database/query/from-table.d.ts +1 -0
  352. package/build/src/database/query/from-table.d.ts.map +1 -1
  353. package/build/src/database/query/from-table.js +2 -1
  354. package/build/src/database/query/index.d.ts +72 -12
  355. package/build/src/database/query/index.d.ts.map +1 -1
  356. package/build/src/database/query/index.js +79 -19
  357. package/build/src/database/query/insert-base.d.ts +13 -8
  358. package/build/src/database/query/insert-base.d.ts.map +1 -1
  359. package/build/src/database/query/insert-base.js +10 -5
  360. package/build/src/database/query/join-base.d.ts +4 -0
  361. package/build/src/database/query/join-base.d.ts.map +1 -1
  362. package/build/src/database/query/join-base.js +5 -1
  363. package/build/src/database/query/join-object.d.ts +11 -0
  364. package/build/src/database/query/join-object.d.ts.map +1 -1
  365. package/build/src/database/query/join-object.js +15 -4
  366. package/build/src/database/query/join-plain.d.ts +1 -0
  367. package/build/src/database/query/join-plain.d.ts.map +1 -1
  368. package/build/src/database/query/join-plain.js +2 -1
  369. package/build/src/database/query/join-tracker.d.ts +7 -0
  370. package/build/src/database/query/join-tracker.d.ts.map +1 -1
  371. package/build/src/database/query/join-tracker.js +8 -1
  372. package/build/src/database/query/model-class-query.d.ts +92 -26
  373. package/build/src/database/query/model-class-query.d.ts.map +1 -1
  374. package/build/src/database/query/model-class-query.js +230 -76
  375. package/build/src/database/query/order-base.d.ts +3 -0
  376. package/build/src/database/query/order-base.d.ts.map +1 -1
  377. package/build/src/database/query/order-base.js +4 -1
  378. package/build/src/database/query/order-column.d.ts +9 -1
  379. package/build/src/database/query/order-column.d.ts.map +1 -1
  380. package/build/src/database/query/order-column.js +10 -2
  381. package/build/src/database/query/order-plain.d.ts +1 -0
  382. package/build/src/database/query/order-plain.d.ts.map +1 -1
  383. package/build/src/database/query/order-plain.js +2 -1
  384. package/build/src/database/query/preloader/belongs-to.d.ts +1 -0
  385. package/build/src/database/query/preloader/belongs-to.d.ts.map +1 -1
  386. package/build/src/database/query/preloader/belongs-to.js +68 -23
  387. package/build/src/database/query/preloader/ensure-model-class-initialized.d.ts +1 -0
  388. package/build/src/database/query/preloader/ensure-model-class-initialized.d.ts.map +1 -1
  389. package/build/src/database/query/preloader/ensure-model-class-initialized.js +2 -1
  390. package/build/src/database/query/preloader/has-many.d.ts +5 -3
  391. package/build/src/database/query/preloader/has-many.d.ts.map +1 -1
  392. package/build/src/database/query/preloader/has-many.js +66 -24
  393. package/build/src/database/query/preloader/has-one.d.ts +1 -0
  394. package/build/src/database/query/preloader/has-one.d.ts.map +1 -1
  395. package/build/src/database/query/preloader/has-one.js +26 -9
  396. package/build/src/database/query/preloader/selection.d.ts +7 -1
  397. package/build/src/database/query/preloader/selection.d.ts.map +1 -1
  398. package/build/src/database/query/preloader/selection.js +13 -5
  399. package/build/src/database/query/preloader.d.ts +1 -0
  400. package/build/src/database/query/preloader.d.ts.map +1 -1
  401. package/build/src/database/query/preloader.js +28 -9
  402. package/build/src/database/query/query-data.d.ts +21 -7
  403. package/build/src/database/query/query-data.d.ts.map +1 -1
  404. package/build/src/database/query/query-data.js +37 -18
  405. package/build/src/database/query/select-base.d.ts +3 -0
  406. package/build/src/database/query/select-base.d.ts.map +1 -1
  407. package/build/src/database/query/select-base.js +4 -1
  408. package/build/src/database/query/select-plain.d.ts +1 -0
  409. package/build/src/database/query/select-plain.d.ts.map +1 -1
  410. package/build/src/database/query/select-plain.js +2 -1
  411. package/build/src/database/query/select-table-and-column.d.ts +1 -0
  412. package/build/src/database/query/select-table-and-column.d.ts.map +1 -1
  413. package/build/src/database/query/select-table-and-column.js +2 -1
  414. package/build/src/database/query/update-base.d.ts +9 -6
  415. package/build/src/database/query/update-base.d.ts.map +1 -1
  416. package/build/src/database/query/update-base.js +7 -4
  417. package/build/src/database/query/upsert-base.d.ts +13 -4
  418. package/build/src/database/query/upsert-base.d.ts.map +1 -1
  419. package/build/src/database/query/upsert-base.js +12 -3
  420. package/build/src/database/query/where-base.d.ts +4 -0
  421. package/build/src/database/query/where-base.d.ts.map +1 -1
  422. package/build/src/database/query/where-base.js +5 -1
  423. package/build/src/database/query/where-combinator.d.ts +1 -0
  424. package/build/src/database/query/where-combinator.d.ts.map +1 -1
  425. package/build/src/database/query/where-combinator.js +6 -2
  426. package/build/src/database/query/where-hash.d.ts +6 -0
  427. package/build/src/database/query/where-hash.d.ts.map +1 -1
  428. package/build/src/database/query/where-hash.js +5 -1
  429. package/build/src/database/query/where-model-class-hash.d.ts +30 -16
  430. package/build/src/database/query/where-model-class-hash.d.ts.map +1 -1
  431. package/build/src/database/query/where-model-class-hash.js +55 -20
  432. package/build/src/database/query/where-not.d.ts +1 -0
  433. package/build/src/database/query/where-not.d.ts.map +1 -1
  434. package/build/src/database/query/where-not.js +3 -1
  435. package/build/src/database/query/where-plain.d.ts +1 -0
  436. package/build/src/database/query/where-plain.d.ts.map +1 -1
  437. package/build/src/database/query/where-plain.js +2 -1
  438. package/build/src/database/query/with-count.d.ts +11 -5
  439. package/build/src/database/query/with-count.d.ts.map +1 -1
  440. package/build/src/database/query/with-count.js +36 -15
  441. package/build/src/database/query-parser/base-query-parser.d.ts +1 -0
  442. package/build/src/database/query-parser/base-query-parser.d.ts.map +1 -1
  443. package/build/src/database/query-parser/base-query-parser.js +2 -1
  444. package/build/src/database/query-parser/from-parser.d.ts +5 -1
  445. package/build/src/database/query-parser/from-parser.d.ts.map +1 -1
  446. package/build/src/database/query-parser/from-parser.js +6 -2
  447. package/build/src/database/query-parser/group-parser.d.ts +2 -0
  448. package/build/src/database/query-parser/group-parser.d.ts.map +1 -1
  449. package/build/src/database/query-parser/group-parser.js +3 -1
  450. package/build/src/database/query-parser/joins-parser.d.ts +1 -0
  451. package/build/src/database/query-parser/joins-parser.d.ts.map +1 -1
  452. package/build/src/database/query-parser/joins-parser.js +2 -1
  453. package/build/src/database/query-parser/limit-parser.d.ts +1 -0
  454. package/build/src/database/query-parser/limit-parser.d.ts.map +1 -1
  455. package/build/src/database/query-parser/limit-parser.js +2 -1
  456. package/build/src/database/query-parser/options.d.ts +15 -4
  457. package/build/src/database/query-parser/options.d.ts.map +1 -1
  458. package/build/src/database/query-parser/options.js +11 -3
  459. package/build/src/database/query-parser/order-parser.d.ts +1 -0
  460. package/build/src/database/query-parser/order-parser.d.ts.map +1 -1
  461. package/build/src/database/query-parser/order-parser.js +2 -1
  462. package/build/src/database/query-parser/select-parser.d.ts +1 -0
  463. package/build/src/database/query-parser/select-parser.d.ts.map +1 -1
  464. package/build/src/database/query-parser/select-parser.js +2 -1
  465. package/build/src/database/query-parser/where-parser.d.ts +1 -0
  466. package/build/src/database/query-parser/where-parser.d.ts.map +1 -1
  467. package/build/src/database/query-parser/where-parser.js +2 -1
  468. package/build/src/database/record/acts-as-list.d.ts +0 -1
  469. package/build/src/database/record/acts-as-list.d.ts.map +1 -1
  470. package/build/src/database/record/acts-as-list.js +61 -23
  471. package/build/src/database/record/attachments/download.d.ts +34 -15
  472. package/build/src/database/record/attachments/download.d.ts.map +1 -1
  473. package/build/src/database/record/attachments/download.js +34 -22
  474. package/build/src/database/record/attachments/handle.d.ts +17 -5
  475. package/build/src/database/record/attachments/handle.d.ts.map +1 -1
  476. package/build/src/database/record/attachments/handle.js +25 -9
  477. package/build/src/database/record/attachments/normalize-input.d.ts +6 -1
  478. package/build/src/database/record/attachments/normalize-input.d.ts.map +1 -1
  479. package/build/src/database/record/attachments/normalize-input.js +54 -17
  480. package/build/src/database/record/attachments/storage-drivers/filesystem.d.ts +7 -1
  481. package/build/src/database/record/attachments/storage-drivers/filesystem.d.ts.map +1 -1
  482. package/build/src/database/record/attachments/storage-drivers/filesystem.js +10 -2
  483. package/build/src/database/record/attachments/storage-drivers/native.d.ts +12 -7
  484. package/build/src/database/record/attachments/storage-drivers/native.d.ts.map +1 -1
  485. package/build/src/database/record/attachments/storage-drivers/native.js +13 -6
  486. package/build/src/database/record/attachments/storage-drivers/s3.d.ts +18 -9
  487. package/build/src/database/record/attachments/storage-drivers/s3.d.ts.map +1 -1
  488. package/build/src/database/record/attachments/storage-drivers/s3.js +38 -13
  489. package/build/src/database/record/attachments/store.d.ts +48 -25
  490. package/build/src/database/record/attachments/store.d.ts.map +1 -1
  491. package/build/src/database/record/attachments/store.js +63 -25
  492. package/build/src/database/record/index.d.ts +388 -146
  493. package/build/src/database/record/index.d.ts.map +1 -1
  494. package/build/src/database/record/index.js +686 -248
  495. package/build/src/database/record/instance-relationships/base.d.ts +78 -19
  496. package/build/src/database/record/instance-relationships/base.d.ts.map +1 -1
  497. package/build/src/database/record/instance-relationships/base.js +98 -26
  498. package/build/src/database/record/instance-relationships/belongs-to.d.ts +1 -0
  499. package/build/src/database/record/instance-relationships/belongs-to.d.ts.map +1 -1
  500. package/build/src/database/record/instance-relationships/belongs-to.js +13 -5
  501. package/build/src/database/record/instance-relationships/has-many.d.ts +27 -7
  502. package/build/src/database/record/instance-relationships/has-many.d.ts.map +1 -1
  503. package/build/src/database/record/instance-relationships/has-many.js +50 -16
  504. package/build/src/database/record/instance-relationships/has-one.d.ts +4 -1
  505. package/build/src/database/record/instance-relationships/has-one.d.ts.map +1 -1
  506. package/build/src/database/record/instance-relationships/has-one.js +28 -10
  507. package/build/src/database/record/relationships/base.d.ts +61 -14
  508. package/build/src/database/record/relationships/base.d.ts.map +1 -1
  509. package/build/src/database/record/relationships/base.js +60 -15
  510. package/build/src/database/record/relationships/belongs-to.d.ts.map +1 -1
  511. package/build/src/database/record/relationships/belongs-to.js +9 -3
  512. package/build/src/database/record/relationships/has-many.d.ts.map +1 -1
  513. package/build/src/database/record/relationships/has-many.js +9 -3
  514. package/build/src/database/record/relationships/has-one.d.ts.map +1 -1
  515. package/build/src/database/record/relationships/has-one.js +9 -3
  516. package/build/src/database/record/state-machine.d.ts +9 -1
  517. package/build/src/database/record/state-machine.d.ts.map +1 -1
  518. package/build/src/database/record/state-machine.js +35 -14
  519. package/build/src/database/record/user-module.d.ts +2 -0
  520. package/build/src/database/record/user-module.d.ts.map +1 -1
  521. package/build/src/database/record/user-module.js +3 -1
  522. package/build/src/database/record/validators/base.d.ts +4 -2
  523. package/build/src/database/record/validators/base.d.ts.map +1 -1
  524. package/build/src/database/record/validators/base.js +4 -2
  525. package/build/src/database/record/validators/format.d.ts.map +1 -1
  526. package/build/src/database/record/validators/format.js +2 -1
  527. package/build/src/database/record/validators/presence.d.ts.map +1 -1
  528. package/build/src/database/record/validators/presence.js +5 -2
  529. package/build/src/database/record/validators/uniqueness.d.ts +0 -2
  530. package/build/src/database/record/validators/uniqueness.d.ts.map +1 -1
  531. package/build/src/database/record/validators/uniqueness.js +18 -8
  532. package/build/src/database/table-data/index.d.ts +40 -4
  533. package/build/src/database/table-data/index.d.ts.map +1 -1
  534. package/build/src/database/table-data/index.js +38 -5
  535. package/build/src/database/table-data/table-column.d.ts +43 -5
  536. package/build/src/database/table-data/table-column.d.ts.map +1 -1
  537. package/build/src/database/table-data/table-column.js +37 -4
  538. package/build/src/database/table-data/table-foreign-key.d.ts +8 -0
  539. package/build/src/database/table-data/table-foreign-key.d.ts.map +1 -1
  540. package/build/src/database/table-data/table-foreign-key.js +9 -1
  541. package/build/src/database/table-data/table-index.d.ts +8 -0
  542. package/build/src/database/table-data/table-index.d.ts.map +1 -1
  543. package/build/src/database/table-data/table-index.js +6 -1
  544. package/build/src/database/table-data/table-reference.d.ts +1 -0
  545. package/build/src/database/table-data/table-reference.d.ts.map +1 -1
  546. package/build/src/database/table-data/table-reference.js +2 -1
  547. package/build/src/database/use-database.d.ts +1 -0
  548. package/build/src/database/use-database.d.ts.map +1 -1
  549. package/build/src/database/use-database.js +2 -1
  550. package/build/src/environment-handlers/base.d.ts +94 -36
  551. package/build/src/environment-handlers/base.d.ts.map +1 -1
  552. package/build/src/environment-handlers/base.js +90 -36
  553. package/build/src/environment-handlers/browser.d.ts +33 -3
  554. package/build/src/environment-handlers/browser.d.ts.map +1 -1
  555. package/build/src/environment-handlers/browser.js +36 -9
  556. package/build/src/environment-handlers/node/cli/commands/cli-command-context.d.ts +5 -0
  557. package/build/src/environment-handlers/node/cli/commands/cli-command-context.d.ts.map +1 -1
  558. package/build/src/environment-handlers/node/cli/commands/cli-command-context.js +6 -2
  559. package/build/src/environment-handlers/node/cli/commands/console.d.ts +3 -2
  560. package/build/src/environment-handlers/node/cli/commands/console.d.ts.map +1 -1
  561. package/build/src/environment-handlers/node/cli/commands/console.js +23 -9
  562. package/build/src/environment-handlers/node/cli/commands/db/schema/dump.d.ts +4 -1
  563. package/build/src/environment-handlers/node/cli/commands/db/schema/dump.d.ts.map +1 -1
  564. package/build/src/environment-handlers/node/cli/commands/db/schema/dump.js +5 -2
  565. package/build/src/environment-handlers/node/cli/commands/db/schema/load.d.ts +6 -2
  566. package/build/src/environment-handlers/node/cli/commands/db/schema/load.d.ts.map +1 -1
  567. package/build/src/environment-handlers/node/cli/commands/db/schema/load.js +11 -5
  568. package/build/src/environment-handlers/node/cli/commands/db/seed.d.ts +15 -5
  569. package/build/src/environment-handlers/node/cli/commands/db/seed.d.ts.map +1 -1
  570. package/build/src/environment-handlers/node/cli/commands/db/seed.js +20 -6
  571. package/build/src/environment-handlers/node/cli/commands/destroy/migration.d.ts +5 -0
  572. package/build/src/environment-handlers/node/cli/commands/destroy/migration.d.ts.map +1 -1
  573. package/build/src/environment-handlers/node/cli/commands/destroy/migration.js +3 -1
  574. package/build/src/environment-handlers/node/cli/commands/generate/base-models.d.ts +2 -0
  575. package/build/src/environment-handlers/node/cli/commands/generate/base-models.d.ts.map +1 -1
  576. package/build/src/environment-handlers/node/cli/commands/generate/base-models.js +6 -4
  577. package/build/src/environment-handlers/node/cli/commands/generate/frontend-models.d.ts +43 -29
  578. package/build/src/environment-handlers/node/cli/commands/generate/frontend-models.d.ts.map +1 -1
  579. package/build/src/environment-handlers/node/cli/commands/generate/frontend-models.js +99 -40
  580. package/build/src/environment-handlers/node/cli/commands/generate/migration.d.ts +5 -0
  581. package/build/src/environment-handlers/node/cli/commands/generate/migration.d.ts.map +1 -1
  582. package/build/src/environment-handlers/node/cli/commands/generate/migration.js +3 -1
  583. package/build/src/environment-handlers/node/cli/commands/generate/model.d.ts +5 -0
  584. package/build/src/environment-handlers/node/cli/commands/generate/model.d.ts.map +1 -1
  585. package/build/src/environment-handlers/node/cli/commands/generate/model.js +3 -1
  586. package/build/src/environment-handlers/node/cli/commands/init.d.ts +5 -0
  587. package/build/src/environment-handlers/node/cli/commands/init.d.ts.map +1 -1
  588. package/build/src/environment-handlers/node/cli/commands/init.js +3 -1
  589. package/build/src/environment-handlers/node/cli/commands/routes.d.ts +3 -0
  590. package/build/src/environment-handlers/node/cli/commands/routes.d.ts.map +1 -1
  591. package/build/src/environment-handlers/node/cli/commands/routes.js +4 -1
  592. package/build/src/environment-handlers/node/cli/commands/run-script.d.ts +15 -5
  593. package/build/src/environment-handlers/node/cli/commands/run-script.d.ts.map +1 -1
  594. package/build/src/environment-handlers/node/cli/commands/run-script.js +20 -6
  595. package/build/src/environment-handlers/node/cli/commands/runner.d.ts +18 -6
  596. package/build/src/environment-handlers/node/cli/commands/runner.d.ts.map +1 -1
  597. package/build/src/environment-handlers/node/cli/commands/runner.js +20 -6
  598. package/build/src/environment-handlers/node/cli/commands/server.d.ts +13 -1
  599. package/build/src/environment-handlers/node/cli/commands/server.d.ts.map +1 -1
  600. package/build/src/environment-handlers/node/cli/commands/server.js +23 -6
  601. package/build/src/environment-handlers/node.d.ts +14 -2
  602. package/build/src/environment-handlers/node.d.ts.map +1 -1
  603. package/build/src/environment-handlers/node.js +107 -39
  604. package/build/src/error-logger.d.ts +4 -3
  605. package/build/src/error-logger.d.ts.map +1 -1
  606. package/build/src/error-logger.js +4 -3
  607. package/build/src/frontend-model-controller.d.ts +239 -90
  608. package/build/src/frontend-model-controller.d.ts.map +1 -1
  609. package/build/src/frontend-model-controller.js +577 -787
  610. package/build/src/frontend-model-resource/base-resource.d.ts +118 -66
  611. package/build/src/frontend-model-resource/base-resource.d.ts.map +1 -1
  612. package/build/src/frontend-model-resource/base-resource.js +205 -82
  613. package/build/src/frontend-models/base.d.ts +319 -163
  614. package/build/src/frontend-models/base.d.ts.map +1 -1
  615. package/build/src/frontend-models/base.js +717 -366
  616. package/build/src/frontend-models/clear-pending-debounced-callback.d.ts +2 -1
  617. package/build/src/frontend-models/clear-pending-debounced-callback.d.ts.map +1 -1
  618. package/build/src/frontend-models/clear-pending-debounced-callback.js +6 -3
  619. package/build/src/frontend-models/event-hook-models.d.ts +5 -0
  620. package/build/src/frontend-models/event-hook-models.d.ts.map +1 -1
  621. package/build/src/frontend-models/event-hook-models.js +10 -3
  622. package/build/src/frontend-models/model-registry.d.ts +5 -5
  623. package/build/src/frontend-models/model-registry.d.ts.map +1 -1
  624. package/build/src/frontend-models/model-registry.js +5 -5
  625. package/build/src/frontend-models/outgoing-event-buffer.d.ts +11 -3
  626. package/build/src/frontend-models/outgoing-event-buffer.d.ts.map +1 -1
  627. package/build/src/frontend-models/outgoing-event-buffer.js +13 -5
  628. package/build/src/frontend-models/preloader.d.ts +9 -6
  629. package/build/src/frontend-models/preloader.d.ts.map +1 -1
  630. package/build/src/frontend-models/preloader.js +21 -9
  631. package/build/src/frontend-models/query.d.ts +283 -73
  632. package/build/src/frontend-models/query.d.ts.map +1 -1
  633. package/build/src/frontend-models/query.js +331 -203
  634. package/build/src/frontend-models/resource-config-validation.d.ts +2 -0
  635. package/build/src/frontend-models/resource-config-validation.d.ts.map +1 -1
  636. package/build/src/frontend-models/resource-config-validation.js +3 -1
  637. package/build/src/frontend-models/resource-definition.d.ts +12 -5
  638. package/build/src/frontend-models/resource-definition.d.ts.map +1 -1
  639. package/build/src/frontend-models/resource-definition.js +39 -13
  640. package/build/src/frontend-models/transport-serialization.d.ts +14 -11
  641. package/build/src/frontend-models/transport-serialization.d.ts.map +1 -1
  642. package/build/src/frontend-models/transport-serialization.js +80 -53
  643. package/build/src/frontend-models/use-destroyed-event.d.ts +21 -0
  644. package/build/src/frontend-models/use-destroyed-event.d.ts.map +1 -1
  645. package/build/src/frontend-models/use-destroyed-event.js +34 -11
  646. package/build/src/frontend-models/use-model-class-event.d.ts +24 -0
  647. package/build/src/frontend-models/use-model-class-event.d.ts.map +1 -1
  648. package/build/src/frontend-models/use-model-class-event.js +39 -12
  649. package/build/src/frontend-models/use-updated-event.d.ts +21 -0
  650. package/build/src/frontend-models/use-updated-event.d.ts.map +1 -1
  651. package/build/src/frontend-models/use-updated-event.js +37 -12
  652. package/build/src/frontend-models/websocket-channel.d.ts +51 -9
  653. package/build/src/frontend-models/websocket-channel.d.ts.map +1 -1
  654. package/build/src/frontend-models/websocket-channel.js +96 -26
  655. package/build/src/frontend-models/websocket-publishers.d.ts +2 -0
  656. package/build/src/frontend-models/websocket-publishers.d.ts.map +1 -1
  657. package/build/src/frontend-models/websocket-publishers.js +33 -11
  658. package/build/src/http-client/header.d.ts +1 -0
  659. package/build/src/http-client/header.d.ts.map +1 -1
  660. package/build/src/http-client/header.js +2 -1
  661. package/build/src/http-client/index.d.ts +4 -0
  662. package/build/src/http-client/index.d.ts.map +1 -1
  663. package/build/src/http-client/index.js +5 -1
  664. package/build/src/http-client/request.d.ts +5 -0
  665. package/build/src/http-client/request.d.ts.map +1 -1
  666. package/build/src/http-client/request.js +6 -1
  667. package/build/src/http-client/response.d.ts +14 -4
  668. package/build/src/http-client/response.d.ts.map +1 -1
  669. package/build/src/http-client/response.js +14 -4
  670. package/build/src/http-client/websocket-client.d.ts +1 -0
  671. package/build/src/http-client/websocket-client.d.ts.map +1 -1
  672. package/build/src/http-client/websocket-client.js +2 -1
  673. package/build/src/http-server/client/index.d.ts +16 -2
  674. package/build/src/http-server/client/index.d.ts.map +1 -1
  675. package/build/src/http-server/client/index.js +44 -13
  676. package/build/src/http-server/client/params-to-object.d.ts +16 -10
  677. package/build/src/http-server/client/params-to-object.d.ts.map +1 -1
  678. package/build/src/http-server/client/params-to-object.js +46 -17
  679. package/build/src/http-server/client/request-buffer/form-data-part.d.ts +10 -6
  680. package/build/src/http-server/client/request-buffer/form-data-part.d.ts.map +1 -1
  681. package/build/src/http-server/client/request-buffer/form-data-part.js +11 -7
  682. package/build/src/http-server/client/request-buffer/header.d.ts +1 -0
  683. package/build/src/http-server/client/request-buffer/header.d.ts.map +1 -1
  684. package/build/src/http-server/client/request-buffer/header.js +2 -1
  685. package/build/src/http-server/client/request-buffer/index.d.ts +29 -4
  686. package/build/src/http-server/client/request-buffer/index.d.ts.map +1 -1
  687. package/build/src/http-server/client/request-buffer/index.js +43 -9
  688. package/build/src/http-server/client/request-parser.d.ts +52 -13
  689. package/build/src/http-server/client/request-parser.d.ts.map +1 -1
  690. package/build/src/http-server/client/request-parser.js +58 -15
  691. package/build/src/http-server/client/request-runner.d.ts +5 -1
  692. package/build/src/http-server/client/request-runner.d.ts.map +1 -1
  693. package/build/src/http-server/client/request-runner.js +32 -8
  694. package/build/src/http-server/client/request-timing.d.ts +37 -7
  695. package/build/src/http-server/client/request-timing.d.ts.map +1 -1
  696. package/build/src/http-server/client/request-timing.js +32 -8
  697. package/build/src/http-server/client/request.d.ts +15 -5
  698. package/build/src/http-server/client/request.d.ts.map +1 -1
  699. package/build/src/http-server/client/request.js +17 -5
  700. package/build/src/http-server/client/response.d.ts +22 -4
  701. package/build/src/http-server/client/response.d.ts.map +1 -1
  702. package/build/src/http-server/client/response.js +29 -7
  703. package/build/src/http-server/client/uploaded-file/memory-uploaded-file.d.ts +1 -0
  704. package/build/src/http-server/client/uploaded-file/memory-uploaded-file.d.ts.map +1 -1
  705. package/build/src/http-server/client/uploaded-file/memory-uploaded-file.js +3 -1
  706. package/build/src/http-server/client/uploaded-file/temporary-uploaded-file.d.ts +1 -0
  707. package/build/src/http-server/client/uploaded-file/temporary-uploaded-file.d.ts.map +1 -1
  708. package/build/src/http-server/client/uploaded-file/temporary-uploaded-file.js +3 -1
  709. package/build/src/http-server/client/uploaded-file/uploaded-file.d.ts +2 -0
  710. package/build/src/http-server/client/uploaded-file/uploaded-file.d.ts.map +1 -1
  711. package/build/src/http-server/client/uploaded-file/uploaded-file.js +3 -1
  712. package/build/src/http-server/client/websocket-request.d.ts +24 -12
  713. package/build/src/http-server/client/websocket-request.d.ts.map +1 -1
  714. package/build/src/http-server/client/websocket-request.js +24 -10
  715. package/build/src/http-server/client/websocket-session.d.ts +101 -62
  716. package/build/src/http-server/client/websocket-session.d.ts.map +1 -1
  717. package/build/src/http-server/client/websocket-session.js +118 -61
  718. package/build/src/http-server/cookie.d.ts +36 -8
  719. package/build/src/http-server/cookie.d.ts.map +1 -1
  720. package/build/src/http-server/cookie.js +37 -9
  721. package/build/src/http-server/development-reloader.d.ts +32 -7
  722. package/build/src/http-server/development-reloader.d.ts.map +1 -1
  723. package/build/src/http-server/development-reloader.js +39 -10
  724. package/build/src/http-server/index.d.ts +102 -25
  725. package/build/src/http-server/index.d.ts.map +1 -1
  726. package/build/src/http-server/index.js +117 -32
  727. package/build/src/http-server/remote-address.d.ts +1 -0
  728. package/build/src/http-server/remote-address.d.ts.map +1 -1
  729. package/build/src/http-server/remote-address.js +15 -4
  730. package/build/src/http-server/server-client.d.ts +37 -8
  731. package/build/src/http-server/server-client.d.ts.map +1 -1
  732. package/build/src/http-server/server-client.js +48 -12
  733. package/build/src/http-server/server-lock.d.ts +76 -0
  734. package/build/src/http-server/server-lock.d.ts.map +1 -0
  735. package/build/src/http-server/server-lock.js +164 -0
  736. package/build/src/http-server/websocket-channel-subscribers.d.ts +13 -8
  737. package/build/src/http-server/websocket-channel-subscribers.d.ts.map +1 -1
  738. package/build/src/http-server/websocket-channel-subscribers.js +16 -7
  739. package/build/src/http-server/websocket-channel.d.ts +13 -11
  740. package/build/src/http-server/websocket-channel.d.ts.map +1 -1
  741. package/build/src/http-server/websocket-channel.js +8 -12
  742. package/build/src/http-server/websocket-connection.d.ts +10 -14
  743. package/build/src/http-server/websocket-connection.d.ts.map +1 -1
  744. package/build/src/http-server/websocket-connection.js +8 -12
  745. package/build/src/http-server/websocket-event-log-store.d.ts +48 -10
  746. package/build/src/http-server/websocket-event-log-store.d.ts.map +1 -1
  747. package/build/src/http-server/websocket-event-log-store.js +76 -34
  748. package/build/src/http-server/websocket-events-host.d.ts +21 -15
  749. package/build/src/http-server/websocket-events-host.d.ts.map +1 -1
  750. package/build/src/http-server/websocket-events-host.js +20 -11
  751. package/build/src/http-server/websocket-events.d.ts +8 -7
  752. package/build/src/http-server/websocket-events.d.ts.map +1 -1
  753. package/build/src/http-server/websocket-events.js +6 -5
  754. package/build/src/http-server/worker-handler/channel-subscriber-dispatch.d.ts +3 -2
  755. package/build/src/http-server/worker-handler/channel-subscriber-dispatch.d.ts.map +1 -1
  756. package/build/src/http-server/worker-handler/channel-subscriber-dispatch.js +3 -2
  757. package/build/src/http-server/worker-handler/in-process.d.ts +18 -18
  758. package/build/src/http-server/worker-handler/in-process.d.ts.map +1 -1
  759. package/build/src/http-server/worker-handler/in-process.js +28 -20
  760. package/build/src/http-server/worker-handler/index.d.ts +39 -20
  761. package/build/src/http-server/worker-handler/index.d.ts.map +1 -1
  762. package/build/src/http-server/worker-handler/index.js +34 -14
  763. package/build/src/http-server/worker-handler/worker-thread.d.ts +31 -15
  764. package/build/src/http-server/worker-handler/worker-thread.d.ts.map +1 -1
  765. package/build/src/http-server/worker-handler/worker-thread.js +31 -12
  766. package/build/src/initializer.d.ts +4 -0
  767. package/build/src/initializer.d.ts.map +1 -1
  768. package/build/src/initializer.js +5 -1
  769. package/build/src/jobs/mail-delivery.d.ts +1 -0
  770. package/build/src/jobs/mail-delivery.d.ts.map +1 -1
  771. package/build/src/jobs/mail-delivery.js +2 -1
  772. package/build/src/logger/base-logger.js +2 -2
  773. package/build/src/logger/console-logger.d.ts +2 -0
  774. package/build/src/logger/console-logger.d.ts.map +1 -1
  775. package/build/src/logger/console-logger.js +3 -1
  776. package/build/src/logger/file-logger.d.ts +2 -0
  777. package/build/src/logger/file-logger.d.ts.map +1 -1
  778. package/build/src/logger/file-logger.js +3 -1
  779. package/build/src/logger/outputs/array-output.d.ts +21 -5
  780. package/build/src/logger/outputs/array-output.d.ts.map +1 -1
  781. package/build/src/logger/outputs/array-output.js +19 -6
  782. package/build/src/logger/outputs/console-output.d.ts +10 -2
  783. package/build/src/logger/outputs/console-output.d.ts.map +1 -1
  784. package/build/src/logger/outputs/console-output.js +8 -3
  785. package/build/src/logger/outputs/file-output.d.ts +20 -5
  786. package/build/src/logger/outputs/file-output.d.ts.map +1 -1
  787. package/build/src/logger/outputs/file-output.js +18 -6
  788. package/build/src/logger/outputs/stdout-output.d.ts +7 -1
  789. package/build/src/logger/outputs/stdout-output.d.ts.map +1 -1
  790. package/build/src/logger/outputs/stdout-output.js +9 -3
  791. package/build/src/logger.d.ts +28 -13
  792. package/build/src/logger.d.ts.map +1 -1
  793. package/build/src/logger.js +60 -23
  794. package/build/src/mailer/backends/smtp.d.ts +5 -0
  795. package/build/src/mailer/backends/smtp.d.ts.map +1 -1
  796. package/build/src/mailer/backends/smtp.js +17 -4
  797. package/build/src/mailer/base.d.ts +33 -17
  798. package/build/src/mailer/base.d.ts.map +1 -1
  799. package/build/src/mailer/base.js +54 -18
  800. package/build/src/mailer/delivery.d.ts +16 -5
  801. package/build/src/mailer/delivery.d.ts.map +1 -1
  802. package/build/src/mailer/delivery.js +18 -7
  803. package/build/src/mailer/index.d.ts +5 -5
  804. package/build/src/mailer/index.d.ts.map +1 -1
  805. package/build/src/mailer/index.js +2 -2
  806. package/build/src/mailer.d.ts +5 -5
  807. package/build/src/mailer.d.ts.map +1 -1
  808. package/build/src/mailer.js +2 -2
  809. package/build/src/plugins/sqljs-wasm-route-controller.d.ts +4 -1
  810. package/build/src/plugins/sqljs-wasm-route-controller.d.ts.map +1 -1
  811. package/build/src/plugins/sqljs-wasm-route-controller.js +11 -4
  812. package/build/src/plugins/sqljs-wasm-route.d.ts +6 -0
  813. package/build/src/plugins/sqljs-wasm-route.d.ts.map +1 -1
  814. package/build/src/plugins/sqljs-wasm-route.js +4 -1
  815. package/build/src/record-payload-values.d.ts +54 -0
  816. package/build/src/record-payload-values.d.ts.map +1 -0
  817. package/build/src/record-payload-values.js +80 -0
  818. package/build/src/routes/app-routes.d.ts +1 -0
  819. package/build/src/routes/app-routes.d.ts.map +1 -1
  820. package/build/src/routes/app-routes.js +2 -1
  821. package/build/src/routes/base-route.d.ts +52 -16
  822. package/build/src/routes/base-route.d.ts.map +1 -1
  823. package/build/src/routes/base-route.js +50 -14
  824. package/build/src/routes/basic-route.d.ts +1 -0
  825. package/build/src/routes/basic-route.d.ts.map +1 -1
  826. package/build/src/routes/basic-route.js +13 -4
  827. package/build/src/routes/built-in/debug/controller.d.ts +4 -1
  828. package/build/src/routes/built-in/debug/controller.d.ts.map +1 -1
  829. package/build/src/routes/built-in/debug/controller.js +5 -2
  830. package/build/src/routes/get-route.d.ts +1 -0
  831. package/build/src/routes/get-route.d.ts.map +1 -1
  832. package/build/src/routes/get-route.js +7 -4
  833. package/build/src/routes/hooks/frontend-model-command-route-hook.d.ts +1 -0
  834. package/build/src/routes/hooks/frontend-model-command-route-hook.d.ts.map +1 -1
  835. package/build/src/routes/hooks/frontend-model-command-route-hook.js +6 -2
  836. package/build/src/routes/index.d.ts +3 -2
  837. package/build/src/routes/index.d.ts.map +1 -1
  838. package/build/src/routes/index.js +10 -4
  839. package/build/src/routes/namespace-route.d.ts +1 -0
  840. package/build/src/routes/namespace-route.d.ts.map +1 -1
  841. package/build/src/routes/namespace-route.js +5 -3
  842. package/build/src/routes/plugin-routes.d.ts +10 -1
  843. package/build/src/routes/plugin-routes.d.ts.map +1 -1
  844. package/build/src/routes/plugin-routes.js +11 -3
  845. package/build/src/routes/post-route.d.ts +1 -0
  846. package/build/src/routes/post-route.d.ts.map +1 -1
  847. package/build/src/routes/post-route.js +7 -4
  848. package/build/src/routes/resolver.d.ts +20 -5
  849. package/build/src/routes/resolver.d.ts.map +1 -1
  850. package/build/src/routes/resolver.js +47 -14
  851. package/build/src/routes/resource-route.d.ts +6 -1
  852. package/build/src/routes/resource-route.d.ts.map +1 -1
  853. package/build/src/routes/resource-route.js +10 -4
  854. package/build/src/testing/base-expect.d.ts +2 -0
  855. package/build/src/testing/base-expect.d.ts.map +1 -1
  856. package/build/src/testing/base-expect.js +3 -1
  857. package/build/src/testing/browser-frontend-model-event-hook-scenarios.d.ts +33 -5
  858. package/build/src/testing/browser-frontend-model-event-hook-scenarios.d.ts.map +1 -1
  859. package/build/src/testing/browser-frontend-model-event-hook-scenarios.js +95 -23
  860. package/build/src/testing/expect-to-change.d.ts +3 -0
  861. package/build/src/testing/expect-to-change.d.ts.map +1 -1
  862. package/build/src/testing/expect-to-change.js +4 -1
  863. package/build/src/testing/expect-utils.d.ts +22 -16
  864. package/build/src/testing/expect-utils.d.ts.map +1 -1
  865. package/build/src/testing/expect-utils.js +62 -30
  866. package/build/src/testing/expect.d.ts +50 -21
  867. package/build/src/testing/expect.d.ts.map +1 -1
  868. package/build/src/testing/expect.js +58 -17
  869. package/build/src/testing/request-client.d.ts +16 -3
  870. package/build/src/testing/request-client.d.ts.map +1 -1
  871. package/build/src/testing/request-client.js +17 -4
  872. package/build/src/testing/test-files-finder.d.ts +41 -9
  873. package/build/src/testing/test-files-finder.d.ts.map +1 -1
  874. package/build/src/testing/test-files-finder.js +42 -10
  875. package/build/src/testing/test-filter-parser.d.ts +6 -0
  876. package/build/src/testing/test-filter-parser.d.ts.map +1 -1
  877. package/build/src/testing/test-filter-parser.js +12 -3
  878. package/build/src/testing/test-runner.d.ts +102 -6
  879. package/build/src/testing/test-runner.d.ts.map +1 -1
  880. package/build/src/testing/test-runner.js +115 -23
  881. package/build/src/testing/test-suite-splitter.d.ts +7 -0
  882. package/build/src/testing/test-suite-splitter.d.ts.map +1 -1
  883. package/build/src/testing/test-suite-splitter.js +7 -2
  884. package/build/src/testing/test.d.ts +20 -4
  885. package/build/src/testing/test.d.ts.map +1 -1
  886. package/build/src/testing/test.js +67 -20
  887. package/build/src/utils/backtrace-cleaner-node.d.ts.map +1 -1
  888. package/build/src/utils/backtrace-cleaner-node.js +6 -1
  889. package/build/src/utils/backtrace-cleaner.d.ts +16 -1
  890. package/build/src/utils/backtrace-cleaner.d.ts.map +1 -1
  891. package/build/src/utils/backtrace-cleaner.js +20 -2
  892. package/build/src/utils/ensure-error.d.ts +3 -2
  893. package/build/src/utils/ensure-error.d.ts.map +1 -1
  894. package/build/src/utils/ensure-error.js +3 -2
  895. package/build/src/utils/event-emitter.d.ts.map +1 -1
  896. package/build/src/utils/event-emitter.js +2 -2
  897. package/build/src/utils/file-exists.d.ts +1 -0
  898. package/build/src/utils/file-exists.d.ts.map +1 -1
  899. package/build/src/utils/file-exists.js +2 -1
  900. package/build/src/utils/format-value.d.ts +5 -4
  901. package/build/src/utils/format-value.d.ts.map +1 -1
  902. package/build/src/utils/format-value.js +12 -7
  903. package/build/src/utils/model-scope.d.ts +18 -12
  904. package/build/src/utils/model-scope.d.ts.map +1 -1
  905. package/build/src/utils/model-scope.js +19 -11
  906. package/build/src/utils/nest-callbacks.d.ts +1 -0
  907. package/build/src/utils/nest-callbacks.d.ts.map +1 -1
  908. package/build/src/utils/nest-callbacks.js +2 -1
  909. package/build/src/utils/plain-object.d.ts +7 -0
  910. package/build/src/utils/plain-object.d.ts.map +1 -0
  911. package/build/src/utils/plain-object.js +13 -0
  912. package/build/src/utils/ransack.d.ts +29 -5
  913. package/build/src/utils/ransack.d.ts.map +1 -1
  914. package/build/src/utils/ransack.js +136 -49
  915. package/build/src/utils/rest-args-error.d.ts +1 -0
  916. package/build/src/utils/rest-args-error.d.ts.map +1 -1
  917. package/build/src/utils/rest-args-error.js +2 -1
  918. package/build/src/utils/singularize-model-name.d.ts +1 -0
  919. package/build/src/utils/singularize-model-name.d.ts.map +1 -1
  920. package/build/src/utils/singularize-model-name.js +2 -1
  921. package/build/src/utils/to-import-specifier.d.ts.map +1 -1
  922. package/build/src/utils/to-import-specifier.js +3 -1
  923. package/build/src/utils/with-tracked-stack-async-hooks.d.ts +8 -5
  924. package/build/src/utils/with-tracked-stack-async-hooks.d.ts.map +1 -1
  925. package/build/src/utils/with-tracked-stack-async-hooks.js +32 -13
  926. package/build/src/utils/with-tracked-stack.d.ts +9 -5
  927. package/build/src/utils/with-tracked-stack.d.ts.map +1 -1
  928. package/build/src/utils/with-tracked-stack.js +19 -8
  929. package/build/src/velocious-error.d.ts +4 -2
  930. package/build/src/velocious-error.d.ts.map +1 -1
  931. package/build/src/velocious-error.js +5 -3
  932. package/build/tsconfig.tsbuildinfo +1 -1
  933. package/package.json +1 -1
@@ -1,16 +1,26 @@
1
1
  export default VelociousDatabaseRecord;
2
+ /**
3
+ * Defines this typedef.
4
+ */
2
5
  export type ValidationErrorObjectType = {
3
6
  type: string;
4
7
  message: string;
5
8
  };
9
+ /**
10
+ * LifecycleCallbackType type.
11
+ */
6
12
  export type LifecycleCallbackType = ((model: VelociousDatabaseRecord) => void | Promise<void>) | string;
7
- export type AttachmentDriverConstructor = new (...args: any[]) => Record<string, any>;
13
+ /**
14
+ * AttachmentDriverConstructor type.
15
+ */
16
+ export type AttachmentDriverConstructor = new (...args: Array<unknown>) => Record<string, unknown>;
8
17
  /**
9
18
  * Thrown by `Record.withAdvisoryLockOrFail` when the lock is already held
10
19
  * by another session at the moment of the call.
11
20
  */
12
21
  export class AdvisoryLockBusyError extends Error {
13
22
  /**
23
+ * Runs constructor.
14
24
  * @param {string} message - Error message.
15
25
  * @param {{name: string}} args - The advisory lock name that was already held.
16
26
  */
@@ -28,6 +38,7 @@ export class AdvisoryLockBusyError extends Error {
28
38
  */
29
39
  export class AdvisoryLockHoldTimeoutError extends Error {
30
40
  /**
41
+ * Runs constructor.
31
42
  * @param {string} message - Error message.
32
43
  * @param {{name: string}} args - The advisory lock name whose hold timed out.
33
44
  */
@@ -42,6 +53,7 @@ export class AdvisoryLockHoldTimeoutError extends Error {
42
53
  */
43
54
  export class AdvisoryLockTimeoutError extends Error {
44
55
  /**
56
+ * Runs constructor.
45
57
  * @param {string} message - Error message.
46
58
  * @param {{name: string}} args - The advisory lock name that timed out.
47
59
  */
@@ -52,6 +64,7 @@ export class AdvisoryLockTimeoutError extends Error {
52
64
  }
53
65
  export class TenantDatabaseScopeError extends Error {
54
66
  /**
67
+ * Runs constructor.
55
68
  * @param {string} message - Error message.
56
69
  * @param {{modelName: string}} args - Context for the failed tenant-scoped model.
57
70
  */
@@ -61,33 +74,51 @@ export class TenantDatabaseScopeError extends Error {
61
74
  modelName: string;
62
75
  }
63
76
  /**
64
- * @typedef {new (...args: any[]) => Record<string, any>} AttachmentDriverConstructor
77
+ * AttachmentDriverConstructor type.
78
+ * @typedef {new (...args: Array<?>) => Record<string, ?>} AttachmentDriverConstructor
65
79
  */
66
80
  export class ValidationError extends Error {
67
- /** @type {Record<string, any> | undefined} - Velocious metadata for frontend-model error reporting. */
68
- velocious: Record<string, any> | undefined;
69
81
  /**
82
+ * Narrows the runtime value to the documented type.
83
+ * @type {Record<string, ?> | undefined} - Velocious metadata for frontend-model error reporting.
84
+ */
85
+ velocious: Record<string, unknown> | undefined;
86
+ /**
87
+ * Runs get model.
70
88
  * @returns {VelociousDatabaseRecord} - The model.
71
89
  */
72
90
  getModel(): VelociousDatabaseRecord;
73
91
  /**
92
+ * Runs set model.
74
93
  * @param {VelociousDatabaseRecord} model - Model instance.
75
94
  * @returns {void} - No return value.
76
95
  */
77
96
  setModel(model: VelociousDatabaseRecord): void;
78
97
  _model: VelociousDatabaseRecord | undefined;
79
- /** @returns {Record<string, ValidationErrorObjectType[]>} - The validation errors. */
98
+ /**
99
+ * Runs get validation errors.
100
+ * @returns {Record<string, ValidationErrorObjectType[]>} - The validation errors.
101
+ */
80
102
  getValidationErrors(): Record<string, ValidationErrorObjectType[]>;
81
- /** @param {Record<string, ValidationErrorObjectType[]>} validationErrors - Validation errors to assign. */
103
+ /**
104
+ * Runs set validation errors.
105
+ * @param {Record<string, ValidationErrorObjectType[]>} validationErrors - Validation errors to assign.
106
+ */
82
107
  setValidationErrors(validationErrors: Record<string, ValidationErrorObjectType[]>): void;
83
108
  _validationErrors: Record<string, ValidationErrorObjectType[]> | undefined;
84
109
  }
85
110
  declare class VelociousDatabaseRecord {
86
- /** @type {string | undefined} */
111
+ /**
112
+ * Narrows the runtime value to the documented type.
113
+ @type {string | undefined} */
87
114
  static modelName: string | undefined;
88
- /** @type {Promise<void> | null | undefined} */
115
+ /**
116
+ * Narrows the runtime value to the documented type.
117
+ @type {Promise<void> | null | undefined} */
89
118
  static _initializeRecordPromise: Promise<void> | null | undefined;
90
- /** @type {boolean | undefined} */
119
+ /**
120
+ * Narrows the runtime value to the documented type.
121
+ @type {boolean | undefined} */
91
122
  static _eagerLoadRecordMetadata: boolean | undefined;
92
123
  /**
93
124
  * Returns the model name, preferring an explicit `static modelName` declaration
@@ -98,96 +129,116 @@ declare class VelociousDatabaseRecord {
98
129
  static getModelName(): string;
99
130
  static getAttributeNameToColumnNameMap(): Record<string, string>;
100
131
  /**
101
- * @param {(...args: any[]) => any} callback - Scope callback.
102
- * @returns {((...args: any[]) => import("../query/model-class-query.js").default<any>) & {scope: (...args: any[]) => import("../../utils/model-scope.js").ModelScopeDescriptor}} - Scope helper.
132
+ * Runs define scope.
133
+ * @param {(...args: Array<?>) => ?} callback - Scope callback.
134
+ * @returns {((...args: Array<?>) => import("../query/model-class-query.js").default<?>) & {scope: (...args: Array<?>) => import("../../utils/model-scope.js").ModelScopeDescriptor}} - Scope helper.
103
135
  */
104
- static defineScope(callback: (...args: any[]) => any): ((...args: any[]) => import("../query/model-class-query.js").default<any>) & {
105
- scope: (...args: any[]) => import("../../utils/model-scope.js").ModelScopeDescriptor;
136
+ static defineScope(callback: (...args: Array<unknown>) => unknown): ((...args: Array<unknown>) => import("../query/model-class-query.js").default<unknown>) & {
137
+ scope: (...args: Array<unknown>) => import("../../utils/model-scope.js").ModelScopeDescriptor;
106
138
  };
107
139
  static getColumnNameToAttributeNameMap(): Record<string, string>;
108
140
  static getTranslationsMap(): Record<string, object>;
109
141
  static getValidatorsMap(): Record<string, import("./validators/base.js").default[]>;
110
- /** @returns {Record<string, LifecycleCallbackType[]>} - Lifecycle callbacks keyed by name. */
142
+ /**
143
+ * Runs get lifecycle callbacks map.
144
+ * @returns {Record<string, LifecycleCallbackType[]>} - Lifecycle callbacks keyed by name.
145
+ */
111
146
  static getLifecycleCallbacksMap(): Record<string, LifecycleCallbackType[]>;
112
147
  static getValidatorTypesMap(): Record<string, typeof import("./validators/base.js").default>;
113
148
  /**
114
- * @returns {Record<string, {driver?: string | AttachmentDriverConstructor | Record<string, any>, type: "hasOne" | "hasMany"}>} - Attachment definitions keyed by name.
149
+ * Runs get attachments map.
150
+ * @returns {Record<string, {driver?: string | AttachmentDriverConstructor | Record<string, ?>, type: "hasOne" | "hasMany"}>} - Attachment definitions keyed by name.
115
151
  */
116
152
  static getAttachmentsMap(): Record<string, {
117
- driver?: string | AttachmentDriverConstructor | Record<string, any>;
153
+ driver?: string | AttachmentDriverConstructor | Record<string, unknown>;
118
154
  type: "hasOne" | "hasMany";
119
155
  }>;
120
156
  static validatorTypes(): Record<string, typeof import("./validators/base.js").default>;
121
157
  /**
158
+ * Runs register validator type.
122
159
  * @param {string} name - Name.
123
160
  * @param {typeof import("./validators/base.js").default} validatorClass - Validator class.
124
161
  */
125
162
  static registerValidatorType(name: string, validatorClass: typeof import("./validators/base.js").default): void;
126
163
  /**
164
+ * Runs register lifecycle callback.
127
165
  * @param {"afterCreate" | "afterDestroy" | "afterSave" | "afterUpdate" | "beforeCreate" | "beforeDestroy" | "beforeSave" | "beforeUpdate" | "beforeValidation"} callbackName - Callback type.
128
166
  * @param {LifecycleCallbackType} callback - Callback function or instance method name.
129
167
  * @returns {void}
130
168
  */
131
169
  static registerLifecycleCallback(callbackName: "afterCreate" | "afterDestroy" | "afterSave" | "afterUpdate" | "beforeCreate" | "beforeDestroy" | "beforeSave" | "beforeUpdate" | "beforeValidation", callback: LifecycleCallbackType): void;
132
170
  /**
171
+ * Runs before validation.
133
172
  * @param {LifecycleCallbackType} callback - Callback function or instance method name.
134
173
  * @returns {void}
135
174
  */
136
175
  static beforeValidation(callback: LifecycleCallbackType): void;
137
176
  /**
177
+ * Runs before save.
138
178
  * @param {LifecycleCallbackType} callback - Callback function or instance method name.
139
179
  * @returns {void}
140
180
  */
141
181
  static beforeSave(callback: LifecycleCallbackType): void;
142
182
  /**
183
+ * Runs before create.
143
184
  * @param {LifecycleCallbackType} callback - Callback function or instance method name.
144
185
  * @returns {void}
145
186
  */
146
187
  static beforeCreate(callback: LifecycleCallbackType): void;
147
188
  /**
189
+ * Runs before update.
148
190
  * @param {LifecycleCallbackType} callback - Callback function or instance method name.
149
191
  * @returns {void}
150
192
  */
151
193
  static beforeUpdate(callback: LifecycleCallbackType): void;
152
194
  /**
195
+ * Runs before destroy.
153
196
  * @param {LifecycleCallbackType} callback - Callback function or instance method name.
154
197
  * @returns {void}
155
198
  */
156
199
  static beforeDestroy(callback: LifecycleCallbackType): void;
157
200
  /**
201
+ * Runs after save.
158
202
  * @param {LifecycleCallbackType} callback - Callback function or instance method name.
159
203
  * @returns {void}
160
204
  */
161
205
  static afterSave(callback: LifecycleCallbackType): void;
162
206
  /**
207
+ * Runs after create.
163
208
  * @param {LifecycleCallbackType} callback - Callback function or instance method name.
164
209
  * @returns {void}
165
210
  */
166
211
  static afterCreate(callback: LifecycleCallbackType): void;
167
212
  /**
213
+ * Runs after update.
168
214
  * @param {LifecycleCallbackType} callback - Callback function or instance method name.
169
215
  * @returns {void}
170
216
  */
171
217
  static afterUpdate(callback: LifecycleCallbackType): void;
172
218
  /**
219
+ * Runs after destroy.
173
220
  * @param {LifecycleCallbackType} callback - Callback function or instance method name.
174
221
  * @returns {void}
175
222
  */
176
223
  static afterDestroy(callback: LifecycleCallbackType): void;
177
224
  /**
225
+ * Runs get validator type.
178
226
  * @param {string} validatorName - Validator name.
179
227
  * @returns {typeof import("./validators/base.js").default} - The validator type.
180
228
  */
181
229
  static getValidatorType(validatorName: string): typeof import("./validators/base.js").default;
182
230
  /**
231
+ * Runs relationship exists.
183
232
  * @param {string} relationshipName - Relationship name.
184
233
  * @returns {boolean} - Whether relationship exists.
185
234
  */
186
235
  static _relationshipExists(relationshipName: string): boolean;
187
236
  /**
237
+ * RelationshipScopeCallback type.
188
238
  * @typedef {(query: import("../query/model-class-query.js").default) => (import("../query/model-class-query.js").default | void)} RelationshipScopeCallback
189
239
  */
190
240
  /**
241
+ * RelationshipDataArgumentType type.
191
242
  * @typedef {object} RelationshipDataArgumentType
192
243
  * @property {boolean} [autoload] - Disable auto-batch-preload for this relationship by passing false. Default true.
193
244
  * @property {string} [className] - Model class name for the related record.
@@ -197,6 +248,7 @@ declare class VelociousDatabaseRecord {
197
248
  * @property {string} [type] - Relationship type (e.g. "hasMany", "belongsTo").
198
249
  */
199
250
  /**
251
+ * Runs define relationship.
200
252
  * @param {string} relationshipName - Relationship name.
201
253
  * @param {RelationshipDataArgumentType} data - Data payload.
202
254
  */
@@ -227,6 +279,7 @@ declare class VelociousDatabaseRecord {
227
279
  type?: string | undefined;
228
280
  }): void;
229
281
  /**
282
+ * Runs normalize relationship args.
230
283
  * @param {RelationshipScopeCallback | object | undefined} scopeOrOptions - Scope callback or options.
231
284
  * @param {object | undefined} options - Options.
232
285
  * @returns {{scope: (RelationshipScopeCallback | undefined), relationshipOptions: object}} - Normalized arguments.
@@ -243,17 +296,23 @@ declare class VelociousDatabaseRecord {
243
296
  */
244
297
  static _registerCounterCacheCallbacks(relationshipName: string): void;
245
298
  /**
299
+ * Runs get relationship by name.
246
300
  * @param {string} relationshipName - Relationship name.
247
301
  * @returns {import("./relationships/base.js").default} - The relationship by name.
248
302
  */
249
303
  static getRelationshipByName(relationshipName: string): import("./relationships/base.js").default;
250
304
  /**
305
+ * Runs get relationships.
251
306
  * @returns {Array<import("./relationships/base.js").default>} - The relationships.
252
307
  */
253
308
  static getRelationships(): Array<import("./relationships/base.js").default>;
254
- /** @returns {Record<string, import("./relationships/base.js").default>} - Relationship definitions keyed by name. */
309
+ /**
310
+ * Runs get relationships map.
311
+ * @returns {Record<string, import("./relationships/base.js").default>} - Relationship definitions keyed by name.
312
+ */
255
313
  static getRelationshipsMap(): Record<string, import("./relationships/base.js").default>;
256
314
  /**
315
+ * Runs get relationship names.
257
316
  * @returns {Array<string>} - The relationship names.
258
317
  */
259
318
  static getRelationshipNames(): Array<string>;
@@ -274,32 +333,37 @@ declare class VelociousDatabaseRecord {
274
333
  * never finds it. Use `driver.quoteColumn("manualTasksCount")` for the
275
334
  * alias to preserve the case on every supported driver:
276
335
  * query.select(`COUNT(...) AS ${driver.quoteColumn("manualTasksCount")}`)
277
- *
278
336
  * @param {string} name - Identifier used in the `.queryData(...)` spec.
279
337
  * @param {import("../query/query-data.js").QueryDataFn} fn - Callback that mutates the query.
280
338
  * @returns {void}
281
339
  */
282
340
  static queryData(name: string, fn: import("../query/query-data.js").QueryDataFn): void;
283
- /** @returns {Record<string, import("../query/query-data.js").QueryDataFn>} - queryData registrations keyed by name. */
341
+ /**
342
+ * Runs get query data map.
343
+ * @returns {Record<string, import("../query/query-data.js").QueryDataFn>} - queryData registrations keyed by name.
344
+ */
284
345
  static getQueryDataMap(): Record<string, import("../query/query-data.js").QueryDataFn>;
285
346
  /**
347
+ * Runs get query data by name.
286
348
  * @param {string} name - queryData name.
287
349
  * @returns {import("../query/query-data.js").QueryDataFn | null} - Registered fn or null when not found.
288
350
  */
289
351
  static getQueryDataByName(name: string): import("../query/query-data.js").QueryDataFn | null;
290
352
  /**
291
- * @returns {Record<string, {driver?: string | AttachmentDriverConstructor | Record<string, any>, type: "hasOne" | "hasMany"}>} - Attachment definitions.
353
+ * Runs get attachments.
354
+ * @returns {Record<string, {driver?: string | AttachmentDriverConstructor | Record<string, ?>, type: "hasOne" | "hasMany"}>} - Attachment definitions.
292
355
  */
293
356
  static getAttachments(): Record<string, {
294
- driver?: string | AttachmentDriverConstructor | Record<string, any>;
357
+ driver?: string | AttachmentDriverConstructor | Record<string, unknown>;
295
358
  type: "hasOne" | "hasMany";
296
359
  }>;
297
360
  /**
361
+ * Runs get attachment by name.
298
362
  * @param {string} attachmentName - Attachment name.
299
- * @returns {{driver?: string | AttachmentDriverConstructor | Record<string, any>, type: "hasOne" | "hasMany"}} - Attachment definition.
363
+ * @returns {{driver?: string | AttachmentDriverConstructor | Record<string, ?>, type: "hasOne" | "hasMany"}} - Attachment definition.
300
364
  */
301
365
  static getAttachmentByName(attachmentName: string): {
302
- driver?: string | AttachmentDriverConstructor | Record<string, any>;
366
+ driver?: string | AttachmentDriverConstructor | Record<string, unknown>;
303
367
  type: "hasOne" | "hasMany";
304
368
  };
305
369
  /**
@@ -310,6 +374,7 @@ declare class VelociousDatabaseRecord {
310
374
  */
311
375
  static belongsTo(relationshipName: string, scopeOrOptions?: ((query: import("../query/model-class-query.js").default) => (import("../query/model-class-query.js").default | void)) | object, options?: object): void;
312
376
  /**
377
+ * Runs connection.
313
378
  * @param {object} [args] - Options.
314
379
  * @param {boolean} [args.enforceTenantDatabaseScope] - Whether tenant-switched models must resolve a tenant database identifier.
315
380
  * @returns {import("../drivers/base.js").default} - The connection.
@@ -318,13 +383,15 @@ declare class VelociousDatabaseRecord {
318
383
  enforceTenantDatabaseScope?: boolean | undefined;
319
384
  }): import("../drivers/base.js").default;
320
385
  /**
386
+ * Runs create.
321
387
  * @template {typeof VelociousDatabaseRecord} MC
322
388
  * @this {MC}
323
- * @param {Record<string, any>} [attributes] - Attributes.
389
+ * @param {Record<string, ?>} [attributes] - Attributes.
324
390
  * @returns {Promise<InstanceType<MC>>} - Resolves with the create.
325
391
  */
326
- static create<MC extends typeof VelociousDatabaseRecord>(this: MC, attributes?: Record<string, any>): Promise<InstanceType<MC>>;
392
+ static create<MC extends typeof VelociousDatabaseRecord>(this: MC, attributes?: Record<string, unknown>): Promise<InstanceType<MC>>;
327
393
  /**
394
+ * Runs get configuration.
328
395
  * @returns {import("../../configuration.js").default} - The configuration.
329
396
  */
330
397
  static _getConfiguration(): import("../../configuration.js").default;
@@ -352,22 +419,23 @@ declare class VelociousDatabaseRecord {
352
419
  * Project.hasMany("tasks")
353
420
  * Project.acceptsNestedAttributesFor("tasks", {allowDestroy: true})
354
421
  * @param {string} relationshipName - Relationship name on this model.
355
- * @param {{allowDestroy?: boolean, limit?: number, rejectIf?: (attributes: Record<string, any>) => boolean}} [options] - Policy options.
422
+ * @param {{allowDestroy?: boolean, limit?: number, rejectIf?: (attributes: Record<string, ?>) => boolean}} [options] - Policy options.
356
423
  * @returns {void}
357
424
  */
358
425
  static acceptsNestedAttributesFor(relationshipName: string, options?: {
359
426
  allowDestroy?: boolean;
360
427
  limit?: number;
361
- rejectIf?: (attributes: Record<string, any>) => boolean;
428
+ rejectIf?: (attributes: Record<string, unknown>) => boolean;
362
429
  }): void;
363
430
  /**
431
+ * Runs accepted nested attributes for.
364
432
  * @param {string} relationshipName - Relationship name.
365
- * @returns {{allowDestroy?: boolean, limit?: number, rejectIf?: (attributes: Record<string, any>) => boolean} | null} - Policy declared via `acceptsNestedAttributesFor`, or null when not accepted.
433
+ * @returns {{allowDestroy?: boolean, limit?: number, rejectIf?: (attributes: Record<string, ?>) => boolean} | null} - Policy declared via `acceptsNestedAttributesFor`, or null when not accepted.
366
434
  */
367
435
  static acceptedNestedAttributesFor(relationshipName: string): {
368
436
  allowDestroy?: boolean;
369
437
  limit?: number;
370
- rejectIf?: (attributes: Record<string, any>) => boolean;
438
+ rejectIf?: (attributes: Record<string, unknown>) => boolean;
371
439
  } | null;
372
440
  /**
373
441
  * Adds a has-one-relationship to the model class.
@@ -378,9 +446,10 @@ declare class VelociousDatabaseRecord {
378
446
  */
379
447
  static hasOne(relationshipName: string, scopeOrOptions?: ((query: import("../query/model-class-query.js").default) => (import("../query/model-class-query.js").default | void)) | object, options?: object): void;
380
448
  /**
449
+ * Runs define attachment.
381
450
  * @param {string} attachmentName - Attachment name.
382
451
  * @param {object} args - Attachment args.
383
- * @param {string | AttachmentDriverConstructor | Record<string, any>} [args.driver] - Attachment driver name, class, or instance.
452
+ * @param {string | AttachmentDriverConstructor | Record<string, ?>} [args.driver] - Attachment driver name, class, or instance.
384
453
  * @param {"hasOne" | "hasMany"} args.type - Attachment type.
385
454
  * @returns {void} - No return value.
386
455
  */
@@ -391,38 +460,47 @@ declare class VelociousDatabaseRecord {
391
460
  /**
392
461
  * Adds a single attachment helper to the model.
393
462
  * @param {string} attachmentName - Attachment name.
394
- * @param {{driver?: string | AttachmentDriverConstructor | Record<string, any>}} [args] - Attachment options.
463
+ * @param {{driver?: string | AttachmentDriverConstructor | Record<string, ?>}} [args] - Attachment options.
395
464
  * @returns {void} - No return value.
396
465
  */
397
466
  static hasOneAttachment(attachmentName: string, args?: {
398
- driver?: string | AttachmentDriverConstructor | Record<string, any>;
467
+ driver?: string | AttachmentDriverConstructor | Record<string, unknown>;
399
468
  }): void;
400
469
  /**
401
470
  * Adds a collection attachment helper to the model.
402
471
  * @param {string} attachmentName - Attachment name.
403
- * @param {{driver?: string | AttachmentDriverConstructor | Record<string, any>}} [args] - Attachment options.
472
+ * @param {{driver?: string | AttachmentDriverConstructor | Record<string, ?>}} [args] - Attachment options.
404
473
  * @returns {void} - No return value.
405
474
  */
406
475
  static hasManyAttachments(attachmentName: string, args?: {
407
- driver?: string | AttachmentDriverConstructor | Record<string, any>;
476
+ driver?: string | AttachmentDriverConstructor | Record<string, unknown>;
408
477
  }): void;
409
478
  /**
479
+ * Runs human attribute name.
410
480
  * @param {string} attributeName - Attribute name.
411
481
  * @returns {string} - The human attribute name.
412
482
  */
413
483
  static humanAttributeName(attributeName: string): string;
414
484
  /**
485
+ * Runs get database type.
415
486
  * @returns {string} - The database type.
416
487
  */
417
488
  static getDatabaseType(): string;
418
489
  /**
490
+ * Runs set eager load record metadata.
419
491
  * @param {boolean} eagerLoadRecordMetadata - Whether require-context initialization should load table metadata for this model.
420
492
  * @returns {void} - No return value.
421
493
  */
422
494
  static setEagerLoadRecordMetadata(eagerLoadRecordMetadata: boolean): void;
423
- /** @returns {boolean} - Whether require-context initialization should load table metadata for this model. */
495
+ /**
496
+ * Runs get eager load record metadata.
497
+ * @returns {boolean} - Whether require-context initialization should load table metadata for this model.
498
+ */
424
499
  static getEagerLoadRecordMetadata(): boolean;
425
- /** @returns {void} - No return value. */
500
+ /**
501
+ * Runs reset record metadata.
502
+ * @returns {void} - No return value.
503
+ */
426
504
  static resetRecordMetadata(): void;
427
505
  /**
428
506
  * Registers the model class with a configuration without loading table metadata.
@@ -434,6 +512,7 @@ declare class VelociousDatabaseRecord {
434
512
  configuration: import("../../configuration.js").default;
435
513
  }): void;
436
514
  /**
515
+ * Runs initialize record.
437
516
  * @param {object} args - Options object.
438
517
  * @param {import("../../configuration.js").default} args.configuration - Configuration instance.
439
518
  * @returns {Promise<void>} - Resolves when complete.
@@ -452,17 +531,23 @@ declare class VelociousDatabaseRecord {
452
531
  configuration?: import("../../configuration.js").default;
453
532
  }): Promise<void>;
454
533
  /**
534
+ * Runs is initialized.
455
535
  * @returns {boolean} - Whether initialized.
456
536
  */
457
537
  static isInitialized(): boolean;
458
538
  /**
539
+ * Runs assert has been initialized.
459
540
  * @returns {void} - No return value.
460
541
  */
461
542
  static _assertHasBeenInitialized(): void;
462
543
  static _defineTranslationMethods(): Promise<void>;
463
- /** @returns {string} - The configured non-tenant database identifier. */
544
+ /**
545
+ * Runs get configured database identifier.
546
+ * @returns {string} - The configured non-tenant database identifier.
547
+ */
464
548
  static getConfiguredDatabaseIdentifier(): string;
465
549
  /**
550
+ * Runs get database identifier.
466
551
  * @param {object} [args] - Options.
467
552
  * @param {boolean} [args.enforceTenantDatabaseScope] - Whether tenant-switched models must resolve a tenant database identifier.
468
553
  * @returns {string} - The database identifier.
@@ -471,13 +556,14 @@ declare class VelociousDatabaseRecord {
471
556
  enforceTenantDatabaseScope?: boolean | undefined;
472
557
  }): string;
473
558
  /**
559
+ * Runs set database identifier.
474
560
  * @param {string} databaseIdentifier - Database identifier.
475
561
  * @returns {void} - No return value.
476
562
  */
477
563
  static setDatabaseIdentifier(databaseIdentifier: string): void;
478
564
  /**
479
565
  * Declares a tenant-aware database identifier resolver for this model class.
480
- * @param {string | ((args: {modelClass: typeof VelociousDatabaseRecord, tenant: unknown}) => string | undefined)} databaseIdentifierOrResolver - Static identifier or resolver.
566
+ * @param {string | ((args: {modelClass: typeof VelociousDatabaseRecord, tenant: ?}) => string | undefined)} databaseIdentifierOrResolver - Static identifier or resolver.
481
567
  * @returns {void} - No return value.
482
568
  */
483
569
  static switchesTenantDatabase(databaseIdentifierOrResolver: string | ((args: {
@@ -485,42 +571,52 @@ declare class VelociousDatabaseRecord {
485
571
  tenant: unknown;
486
572
  }) => string | undefined)): void;
487
573
  /**
488
- * @param {unknown} [tenant] - Tenant override.
574
+ * Runs get tenant database identifier.
575
+ * @param {?} [tenant] - Tenant override.
489
576
  * @returns {string | undefined} - Tenant-scoped database identifier when configured.
490
577
  */
491
578
  static getTenantDatabaseIdentifier(tenant?: unknown): string | undefined;
492
579
  /**
580
+ * Runs get columns.
493
581
  * @returns {import("../drivers/base-column.js").default[]} - The columns.
494
582
  */
495
583
  static getColumns(): import("../drivers/base-column.js").default[];
496
- /** @returns {Record<string, import("../drivers/base-column.js").default>} - The columns hash. */
584
+ /**
585
+ * Runs get columns hash.
586
+ * @returns {Record<string, import("../drivers/base-column.js").default>} - The columns hash.
587
+ */
497
588
  static getColumnsHash(): Record<string, import("../drivers/base-column.js").default>;
498
589
  /**
590
+ * Runs get column type by name.
499
591
  * @param {string} name - Name.
500
592
  * @returns {string | undefined} - The column type by name.
501
593
  */
502
594
  static getColumnTypeByName(name: string): string | undefined;
503
595
  /**
596
+ * Runs is date like type.
504
597
  * @param {string} type - Type identifier.
505
598
  * @returns {boolean} - Whether date like type.
506
599
  */
507
600
  static _isDateLikeType(type: string): boolean;
508
601
  /**
602
+ * Runs get column names.
509
603
  * @returns {Array<string>} - The column names.
510
604
  */
511
605
  static getColumnNames(): Array<string>;
512
606
  /**
607
+ * Runs get table.
513
608
  * @returns {import("../drivers/base-table.js").default} - The table.
514
609
  */
515
610
  static _getTable(): import("../drivers/base-table.js").default;
516
611
  /**
612
+ * Runs insert multiple.
517
613
  * @param {Array<string>} columns - Column names.
518
- * @param {Array<Array<unknown>>} rows - Rows to insert.
614
+ * @param {Array<Array<?>>} rows - Rows to insert.
519
615
  * @param {object} [args] - Options object.
520
616
  * @param {boolean} [args.cast] - Whether to cast values based on column types.
521
617
  * @param {boolean} [args.retryIndividuallyOnFailure] - Retry rows individually if a batch insert fails.
522
618
  * @param {boolean} [args.returnResults] - Return succeeded/failed rows instead of throwing when retries fail.
523
- * @returns {Promise<void | {succeededRows: Array<Array<unknown>>, failedRows: Array<Array<unknown>>, errors: Array<{row: Array<unknown>, error: unknown}>}>} - Resolves when complete.
619
+ * @returns {Promise<void | {succeededRows: Array<Array<?>>, failedRows: Array<Array<?>>, errors: Array<{row: Array<?>, error: ?}>}>} - Resolves when complete.
524
620
  */
525
621
  static insertMultiple(columns: Array<string>, rows: Array<Array<unknown>>, args?: {
526
622
  cast?: boolean | undefined;
@@ -535,95 +631,110 @@ declare class VelociousDatabaseRecord {
535
631
  }>;
536
632
  }>;
537
633
  /**
634
+ * Runs normalize insert multiple rows.
538
635
  * @param {object} args - Options object.
539
636
  * @param {Array<string>} args.columns - Column names.
540
- * @param {Array<Array<unknown>>} args.rows - Rows to insert.
541
- * @returns {Array<Array<unknown>>} - Normalized rows.
637
+ * @param {Array<Array<?>>} args.rows - Rows to insert.
638
+ * @returns {Array<Array<?>>} - Normalized rows.
542
639
  */
543
640
  static _normalizeInsertMultipleRows({ columns, rows }: {
544
641
  columns: Array<string>;
545
642
  rows: Array<Array<unknown>>;
546
643
  }): Array<Array<unknown>>;
547
644
  /**
548
- * @param {Array<unknown>} row - Row to serialize.
645
+ * Runs safe serialize insert row.
646
+ * @param {Array<?>} row - Row to serialize.
549
647
  * @returns {string} - Safe row representation.
550
648
  */
551
649
  static _safeSerializeInsertRow(row: Array<unknown>): string;
552
650
  /**
651
+ * Runs normalize insert value for column.
553
652
  * @param {object} args - Options object.
554
653
  * @param {string} args.columnName - Column name.
555
- * @param {unknown} args.value - Column value.
556
- * @returns {unknown} - Normalized value.
654
+ * @param {?} args.value - Column value.
655
+ * @returns {?} - Normalized value.
557
656
  */
558
657
  static _normalizeInsertValueForColumn({ columnName, value }: {
559
658
  columnName: string;
560
659
  value: unknown;
561
660
  }): unknown;
562
661
  /**
662
+ * Runs is string type.
563
663
  * @param {string | undefined} columnType - Column type.
564
664
  * @returns {boolean} - Whether string-like type.
565
665
  */
566
666
  static _isStringType(columnType: string | undefined): boolean;
567
667
  /**
668
+ * Runs is numeric type.
568
669
  * @param {string} columnType - Column type.
569
670
  * @returns {boolean} - Whether numeric-like type.
570
671
  */
571
672
  static _isNumericType(columnType: string): boolean;
572
673
  /**
674
+ * Runs normalize numeric value.
573
675
  * @param {object} args - Options object.
574
676
  * @param {string} args.columnType - Column type.
575
- * @param {unknown} args.value - Value to normalize.
576
- * @returns {unknown} - Normalized value.
677
+ * @param {?} args.value - Value to normalize.
678
+ * @returns {?} - Normalized value.
577
679
  */
578
680
  static _normalizeNumericValue({ columnType, value }: {
579
681
  columnType: string;
580
682
  value: unknown;
581
683
  }): unknown;
582
684
  /**
583
- * @param {any} value - Value to normalize.
584
- * @returns {any} - Normalized value.
685
+ * Runs normalize date value for insert.
686
+ * @param {?} value - Value to normalize.
687
+ * @returns {?} - Normalized value.
585
688
  */
586
- static _normalizeDateValueForInsert(value: any): any;
689
+ static _normalizeDateValueForInsert(value: unknown): unknown;
587
690
  /**
691
+ * Runs normalize date string for insert.
588
692
  * @param {string} value - Date string value.
589
693
  * @returns {string | Date} - Parsed date or original string.
590
694
  */
591
695
  static _normalizeDateStringForInsert(value: string): string | Date;
592
696
  /**
697
+ * Runs normalize sqlite boolean value for insert.
593
698
  * @param {object} args - Options object.
594
699
  * @param {string | undefined} args.columnType - Column type.
595
- * @param {any} args.value - Value to normalize.
596
- * @returns {any} - Normalized value.
700
+ * @param {?} args.value - Value to normalize.
701
+ * @returns {?} - Normalized value.
597
702
  */
598
703
  static _normalizeSqliteBooleanValueForInsert({ columnType, value }: {
599
704
  columnType: string | undefined;
600
- value: any;
601
- }): any;
705
+ value: unknown;
706
+ }): unknown;
602
707
  /**
708
+ * Runs next primary key.
603
709
  * @returns {Promise<number>} - Resolves with the next primary key.
604
710
  */
605
711
  static nextPrimaryKey(): Promise<number>;
606
712
  /**
713
+ * Runs set primary key.
607
714
  * @param {string} primaryKey - Primary key.
608
715
  * @returns {void} - No return value.
609
716
  */
610
717
  static setPrimaryKey(primaryKey: string): void;
611
718
  /**
719
+ * Runs primary key.
612
720
  * @returns {string} - The primary key.
613
721
  */
614
722
  static primaryKey(): string;
615
723
  /**
724
+ * Runs table name.
616
725
  * @returns {string} - The table name.
617
726
  */
618
727
  static tableName(): string;
619
728
  /**
729
+ * Runs set table name.
620
730
  * @param {string} tableName - Table name.
621
731
  * @returns {void} - No return value.
622
732
  */
623
733
  static setTableName(tableName: string): void;
624
734
  /**
735
+ * Runs transaction.
625
736
  * @param {function() : Promise<void>} callback - Callback function.
626
- * @returns {Promise<unknown>} - Resolves with the transaction.
737
+ * @returns {Promise<?>} - Resolves with the transaction.
627
738
  */
628
739
  static transaction(callback: () => Promise<void>): Promise<unknown>;
629
740
  /**
@@ -692,33 +803,38 @@ declare class VelociousDatabaseRecord {
692
803
  */
693
804
  static hasAdvisoryLock(name: string): Promise<boolean>;
694
805
  /**
806
+ * Runs translates.
695
807
  * @param {...string} names - Names.
696
808
  * @returns {void} - No return value.
697
809
  */
698
810
  static translates(...names: string[]): void;
699
811
  /**
812
+ * Runs current translation scope.
700
813
  * @param {ModelClassQuery} query - Translation query.
701
814
  * @returns {ModelClassQuery} - Scoped query.
702
815
  */
703
816
  static currentTranslationScope(query: ModelClassQuery): ModelClassQuery;
704
817
  /**
818
+ * Runs get translation class.
705
819
  * @returns {typeof VelociousDatabaseRecord} - The translation class.
706
820
  */
707
821
  static getTranslationClass(): typeof VelociousDatabaseRecord;
708
822
  /**
823
+ * Runs get translations table name.
709
824
  * @returns {string} - The translations table name.
710
825
  */
711
826
  static getTranslationsTableName(): string;
712
827
  /**
828
+ * Runs has translations table.
713
829
  * @returns {Promise<boolean>} - Resolves with Whether it has translations table.
714
830
  */
715
831
  static hasTranslationsTable(): Promise<boolean>;
716
832
  /**
717
833
  * Adds a validation to an attribute.
718
834
  * @param {string} attributeName The name of the attribute to validate.
719
- * @param {Record<string, boolean | Record<string, any>>} validators The validators to add. Key is the validator name, value is the validator arguments.
835
+ * @param {Record<string, boolean | Record<string, ?>>} validators The validators to add. Key is the validator name, value is the validator arguments.
720
836
  */
721
- static validates(attributeName: string, validators: Record<string, boolean | Record<string, any>>): Promise<void>;
837
+ static validates(attributeName: string, validators: Record<string, boolean | Record<string, unknown>>): Promise<void>;
722
838
  /**
723
839
  * Registers gap-less positional list callbacks for a column scoped by
724
840
  * another column. Inserts and moves shift surrounding positions so the
@@ -727,7 +843,6 @@ declare class VelociousDatabaseRecord {
727
843
  * Callers must ensure a UNIQUE index on (scopeColumn, positionColumn)
728
844
  * exists in the database — use `Migration.addActsAsList()` for the
729
845
  * schema half.
730
- *
731
846
  * @param {string} positionColumn - camelCase position attribute (e.g. "rowNumber").
732
847
  * @param {object} options - Options with a required scope attribute.
733
848
  * @param {string} options.scope - camelCase scope attribute (e.g. "boardColumnId").
@@ -736,20 +851,26 @@ declare class VelociousDatabaseRecord {
736
851
  scope: string;
737
852
  }): void;
738
853
  /**
854
+ * Runs new query.
739
855
  * @template {typeof VelociousDatabaseRecord} MC
740
856
  * @this {MC}
741
857
  * @returns {ModelClassQuery<MC>} - The new query.
742
858
  */
743
859
  static _newQuery<MC extends typeof VelociousDatabaseRecord>(this: MC): ModelClassQuery<MC>;
744
- /** @returns {string} - The orderable column. */
860
+ /**
861
+ * Runs orderable column.
862
+ * @returns {string} - The orderable column.
863
+ */
745
864
  static orderableColumn(): string;
746
865
  /**
866
+ * Runs all.
747
867
  * @template {typeof VelociousDatabaseRecord} MC
748
868
  * @this {MC}
749
869
  * @returns {ModelClassQuery<MC>} - The all.
750
870
  */
751
871
  static all<MC extends typeof VelociousDatabaseRecord>(this: MC): ModelClassQuery<MC>;
752
872
  /**
873
+ * Runs accessible for.
753
874
  * @template {typeof VelociousDatabaseRecord} MC
754
875
  * @this {MC}
755
876
  * @param {string} action - Ability action to scope by.
@@ -758,6 +879,7 @@ declare class VelociousDatabaseRecord {
758
879
  */
759
880
  static accessibleFor<MC extends typeof VelociousDatabaseRecord>(this: MC, action: string, ability?: import("../../authorization/ability.js").default | undefined): ModelClassQuery<MC>;
760
881
  /**
882
+ * Runs accessible.
761
883
  * @template {typeof VelociousDatabaseRecord} MC
762
884
  * @this {MC}
763
885
  * @param {import("../../authorization/ability.js").default | undefined} [ability] - Ability instance.
@@ -765,15 +887,20 @@ declare class VelociousDatabaseRecord {
765
887
  */
766
888
  static accessible<MC extends typeof VelociousDatabaseRecord>(this: MC, ability?: import("../../authorization/ability.js").default | undefined): ModelClassQuery<MC>;
767
889
  /**
890
+ * Runs accessible by.
768
891
  * @template {typeof VelociousDatabaseRecord} MC
769
892
  * @this {MC}
770
893
  * @param {import("../../authorization/ability.js").default} ability - Ability instance.
771
894
  * @returns {ModelClassQuery<MC>} - Authorized query.
772
895
  */
773
896
  static accessibleBy<MC extends typeof VelociousDatabaseRecord>(this: MC, ability: import("../../authorization/ability.js").default): ModelClassQuery<MC>;
774
- /** @returns {Promise<number>} - Resolves with the count. */
897
+ /**
898
+ * Runs count.
899
+ * @returns {Promise<number>} - Resolves with the count.
900
+ */
775
901
  static count(): Promise<number>;
776
902
  /**
903
+ * Runs group.
777
904
  * @template {typeof VelociousDatabaseRecord} MC
778
905
  * @this {MC}
779
906
  * @param {string} group - Group.
@@ -782,13 +909,15 @@ declare class VelociousDatabaseRecord {
782
909
  static group<MC extends typeof VelociousDatabaseRecord>(this: MC, group: string): ModelClassQuery<MC>;
783
910
  static destroyAll(): Promise<void>;
784
911
  /**
912
+ * Runs pluck.
785
913
  * @template {typeof VelociousDatabaseRecord} MC
786
914
  * @this {MC}
787
915
  * @param {...string|string[]} columns - Column names.
788
- * @returns {Promise<any[]>} - Resolves with the pluck.
916
+ * @returns {Promise<Array<?>>} - Resolves with the pluck.
789
917
  */
790
- static pluck<MC extends typeof VelociousDatabaseRecord>(this: MC, ...columns: (string | string[])[]): Promise<any[]>;
918
+ static pluck<MC extends typeof VelociousDatabaseRecord>(this: MC, ...columns: (string | string[])[]): Promise<Array<unknown>>;
791
919
  /**
920
+ * Runs find.
792
921
  * @template {typeof VelociousDatabaseRecord} MC
793
922
  * @this {MC}
794
923
  * @param {number|string} recordId - Record id.
@@ -796,6 +925,7 @@ declare class VelociousDatabaseRecord {
796
925
  */
797
926
  static find<MC extends typeof VelociousDatabaseRecord>(this: MC, recordId: number | string): Promise<InstanceType<MC>>;
798
927
  /**
928
+ * Runs find by.
799
929
  * @template {typeof VelociousDatabaseRecord} MC
800
930
  * @this {MC}
801
931
  * @param {{[key: string]: string | number}} conditions - Conditions hash keyed by attribute name.
@@ -805,6 +935,7 @@ declare class VelociousDatabaseRecord {
805
935
  [key: string]: string | number;
806
936
  }): Promise<InstanceType<MC> | null>;
807
937
  /**
938
+ * Runs find by or fail.
808
939
  * @template {typeof VelociousDatabaseRecord} MC
809
940
  * @this {MC}
810
941
  * @param {{[key: string]: string | number}} conditions - Conditions hash keyed by attribute name.
@@ -814,6 +945,7 @@ declare class VelociousDatabaseRecord {
814
945
  [key: string]: string | number;
815
946
  }): Promise<InstanceType<MC>>;
816
947
  /**
948
+ * Runs find or create by.
817
949
  * @template {typeof VelociousDatabaseRecord} MC
818
950
  * @this {MC}
819
951
  * @param {{[key: string]: string | number}} conditions - Conditions hash keyed by attribute name.
@@ -824,6 +956,7 @@ declare class VelociousDatabaseRecord {
824
956
  [key: string]: string | number;
825
957
  }, callback?: () => void): Promise<InstanceType<MC>>;
826
958
  /**
959
+ * Runs find or initialize by.
827
960
  * @template {typeof VelociousDatabaseRecord} MC
828
961
  * @this {MC}
829
962
  * @param {Record<string, string | number>} conditions - Conditions.
@@ -832,12 +965,14 @@ declare class VelociousDatabaseRecord {
832
965
  */
833
966
  static findOrInitializeBy<MC extends typeof VelociousDatabaseRecord>(this: MC, conditions: Record<string, string | number>, callback?: (arg0: InstanceType<MC>) => void): Promise<InstanceType<MC>>;
834
967
  /**
968
+ * Runs first.
835
969
  * @template {typeof VelociousDatabaseRecord} MC
836
970
  * @this {MC}
837
971
  * @returns {Promise<InstanceType<MC>>} - Resolves with the first.
838
972
  */
839
973
  static first<MC extends typeof VelociousDatabaseRecord>(this: MC): Promise<InstanceType<MC>>;
840
974
  /**
975
+ * Runs joins.
841
976
  * @template {typeof VelociousDatabaseRecord} MC
842
977
  * @this {MC}
843
978
  * @param {string | import("../query/join-object.js").JoinObject} join - Join clause or join descriptor.
@@ -845,12 +980,14 @@ declare class VelociousDatabaseRecord {
845
980
  */
846
981
  static joins<MC extends typeof VelociousDatabaseRecord>(this: MC, join: string | import("../query/join-object.js").JoinObject): ModelClassQuery<MC>;
847
982
  /**
983
+ * Runs last.
848
984
  * @template {typeof VelociousDatabaseRecord} MC
849
985
  * @this {MC}
850
986
  * @returns {Promise<InstanceType<MC>>} - Resolves with the last.
851
987
  */
852
988
  static last<MC extends typeof VelociousDatabaseRecord>(this: MC): Promise<InstanceType<MC>>;
853
989
  /**
990
+ * Runs limit.
854
991
  * @template {typeof VelociousDatabaseRecord} MC
855
992
  * @this {MC}
856
993
  * @param {number} value - Value to use.
@@ -858,6 +995,7 @@ declare class VelociousDatabaseRecord {
858
995
  */
859
996
  static limit<MC extends typeof VelociousDatabaseRecord>(this: MC, value: number): ModelClassQuery<MC>;
860
997
  /**
998
+ * Runs order.
861
999
  * @template {typeof VelociousDatabaseRecord} MC
862
1000
  * @this {MC}
863
1001
  * @param {import("../query/index.js").OrderArgumentType} order - Order.
@@ -865,6 +1003,7 @@ declare class VelociousDatabaseRecord {
865
1003
  */
866
1004
  static order<MC extends typeof VelociousDatabaseRecord>(this: MC, order: import("../query/index.js").OrderArgumentType): ModelClassQuery<MC>;
867
1005
  /**
1006
+ * Runs distinct.
868
1007
  * @template {typeof VelociousDatabaseRecord} MC
869
1008
  * @this {MC}
870
1009
  * @param {boolean} [value] - Value to use.
@@ -872,6 +1011,7 @@ declare class VelociousDatabaseRecord {
872
1011
  */
873
1012
  static distinct<MC extends typeof VelociousDatabaseRecord>(this: MC, value?: boolean): ModelClassQuery<MC>;
874
1013
  /**
1014
+ * Runs preload.
875
1015
  * @template {typeof VelociousDatabaseRecord} MC
876
1016
  * @this {MC}
877
1017
  * @param {import("../query/index.js").NestedPreloadRecord | string | Array<string | import("../query/index.js").NestedPreloadRecord>} preload - Preload.
@@ -879,6 +1019,7 @@ declare class VelociousDatabaseRecord {
879
1019
  */
880
1020
  static preload<MC extends typeof VelociousDatabaseRecord>(this: MC, preload: import("../query/index.js").NestedPreloadRecord | string | Array<string | import("../query/index.js").NestedPreloadRecord>): ModelClassQuery<MC>;
881
1021
  /**
1022
+ * Runs select.
882
1023
  * @template {typeof VelociousDatabaseRecord} MC
883
1024
  * @this {MC}
884
1025
  * @param {import("../query/index.js").SelectArgumentType} select - Select.
@@ -886,18 +1027,21 @@ declare class VelociousDatabaseRecord {
886
1027
  */
887
1028
  static select<MC extends typeof VelociousDatabaseRecord>(this: MC, select: import("../query/index.js").SelectArgumentType): ModelClassQuery<MC>;
888
1029
  /**
1030
+ * Runs to array.
889
1031
  * @template {typeof VelociousDatabaseRecord} MC
890
1032
  * @this {MC}
891
1033
  * @returns {Promise<InstanceType<MC>[]>} - Resolves with the array.
892
1034
  */
893
1035
  static toArray<MC extends typeof VelociousDatabaseRecord>(this: MC): Promise<InstanceType<MC>[]>;
894
1036
  /**
1037
+ * Runs load.
895
1038
  * @template {typeof VelociousDatabaseRecord} MC
896
1039
  * @this {MC}
897
1040
  * @returns {Promise<InstanceType<MC>[]>} - Resolves with the array.
898
1041
  */
899
1042
  static load<MC extends typeof VelociousDatabaseRecord>(this: MC): Promise<InstanceType<MC>[]>;
900
1043
  /**
1044
+ * Runs where.
901
1045
  * @template {typeof VelociousDatabaseRecord} MC
902
1046
  * @this {MC}
903
1047
  * @param {import("../query/index.js").WhereArgumentType} where - Where.
@@ -905,35 +1049,57 @@ declare class VelociousDatabaseRecord {
905
1049
  */
906
1050
  static where<MC extends typeof VelociousDatabaseRecord>(this: MC, where: import("../query/index.js").WhereArgumentType): ModelClassQuery<MC>;
907
1051
  /**
1052
+ * Runs ransack.
908
1053
  * @template {typeof VelociousDatabaseRecord} MC
909
1054
  * @this {MC}
910
- * @param {Record<string, any>} params - Ransack-style params hash.
1055
+ * @param {Record<string, ?>} params - Ransack-style params hash.
911
1056
  * @returns {ModelClassQuery<MC>} - Query with Ransack filters applied.
912
1057
  */
913
- static ransack<MC extends typeof VelociousDatabaseRecord>(this: MC, params: Record<string, any>): ModelClassQuery<MC>;
1058
+ static ransack<MC extends typeof VelociousDatabaseRecord>(this: MC, params: Record<string, unknown>): ModelClassQuery<MC>;
914
1059
  /**
915
- * @param {Record<string, any>} changes - Changes.
1060
+ * Runs constructor.
1061
+ * @param {Record<string, ?>} changes - Changes.
916
1062
  */
917
- constructor(changes?: Record<string, any>);
918
- /** @type {Record<string, any>} */
919
- _attributes: Record<string, any>;
920
- /** @type {Record<string, any>} */
921
- _changes: Record<string, any>;
922
- /** @type {Record<string, import("../drivers/base-column.js").default>} */
1063
+ constructor(changes?: Record<string, unknown>);
1064
+ /**
1065
+ * Attributes.
1066
+ @type {Record<string, ?>} */
1067
+ _attributes: Record<string, unknown>;
1068
+ /**
1069
+ * Changes.
1070
+ @type {Record<string, ?>} */
1071
+ _changes: Record<string, unknown>;
1072
+ /**
1073
+ * Columns as hash.
1074
+ @type {Record<string, import("../drivers/base-column.js").default>} */
923
1075
  _columnsAsHash: Record<string, import("../drivers/base-column.js").default>;
924
- /** @type {import("../drivers/base.js").default | undefined} */
1076
+ /**
1077
+ * Connection.
1078
+ @type {import("../drivers/base.js").default | undefined} */
925
1079
  __connection: import("../drivers/base.js").default | undefined;
926
- /** @type {Record<string, import("./instance-relationships/base.js").default>} */
1080
+ /**
1081
+ * Instance relationships.
1082
+ @type {Record<string, import("./instance-relationships/base.js").default>} */
927
1083
  _instanceRelationships: Record<string, import("./instance-relationships/base.js").default>;
928
- /** @type {Record<string, RecordAttachmentHandle>} */
1084
+ /**
1085
+ * Attachments.
1086
+ @type {Record<string, RecordAttachmentHandle>} */
929
1087
  _attachments: Record<string, RecordAttachmentHandle>;
930
- /** @type {Array<VelociousDatabaseRecord> | undefined} - Shared reference to sibling records loaded in the same batch. Used by auto-preload. */
1088
+ /**
1089
+ * Load cohort.
1090
+ * @type {Array<VelociousDatabaseRecord> | undefined} - Shared reference to sibling records loaded in the same batch. Used by auto-preload.
1091
+ */
931
1092
  _loadCohort: Array<VelociousDatabaseRecord> | undefined;
932
- /** @type {string | undefined} */
1093
+ /**
1094
+ * Table name.
1095
+ @type {string | undefined} */
933
1096
  __tableName: string | undefined;
934
- /** @type {Record<string, ValidationErrorObjectType[]>} */
1097
+ /**
1098
+ * Validation errors.
1099
+ @type {Record<string, ValidationErrorObjectType[]>} */
935
1100
  _validationErrors: Record<string, ValidationErrorObjectType[]>;
936
1101
  /**
1102
+ * Runs get relationship by name.
937
1103
  * @param {string} relationshipName - Relationship name.
938
1104
  * @returns {import("./instance-relationships/base.js").default} - The relationship by name.
939
1105
  */
@@ -953,66 +1119,119 @@ declare class VelociousDatabaseRecord {
953
1119
  force?: boolean;
954
1120
  }): Promise<void>;
955
1121
  /**
1122
+ * Runs load relationship.
956
1123
  * @param {string} relationshipName - Relationship name.
957
- * @returns {Promise<any>} - Loaded relationship value.
1124
+ * @returns {Promise<?>} - Loaded relationship value.
958
1125
  */
959
- loadRelationship(relationshipName: string): Promise<any>;
1126
+ loadRelationship(relationshipName: string): Promise<unknown>;
960
1127
  /**
1128
+ * Runs relationship or load.
961
1129
  * @param {string} relationshipName - Relationship name.
962
- * @returns {Promise<any>} - Loaded relationship value.
1130
+ * @returns {Promise<?>} - Loaded relationship value.
963
1131
  */
964
- relationshipOrLoad(relationshipName: string): Promise<any>;
1132
+ relationshipOrLoad(relationshipName: string): Promise<unknown>;
965
1133
  /**
1134
+ * Runs get attachment by name.
966
1135
  * @param {string} attachmentName - Attachment name.
967
1136
  * @returns {RecordAttachmentHandle} - Attachment handle.
968
1137
  */
969
1138
  getAttachmentByName(attachmentName: string): RecordAttachmentHandle;
970
1139
  /**
1140
+ * Runs get configuration.
971
1141
  * @returns {import("../../configuration.js").default} - The configuration.
972
1142
  */
973
1143
  _getConfiguration(): import("../../configuration.js").default;
974
1144
  /**
975
- * @param {any} value - Value to use.
1145
+ * Runs has attribute.
1146
+ * @param {?} value - Value to use.
976
1147
  * @returns {boolean} - Whether attribute.
977
1148
  */
978
- _hasAttribute(value: any): boolean;
1149
+ _hasAttribute(value: unknown): boolean;
979
1150
  /**
1151
+ * Runs get attribute.
980
1152
  * @param {string} name - Name.
981
- * @returns {any} - The attribute.
1153
+ * @returns {?} - The attribute.
982
1154
  */
983
- getAttribute(name: string): any;
1155
+ getAttribute(name: string): unknown;
984
1156
  /**
1157
+ * Runs get model class.
985
1158
  * @abstract
986
1159
  * @returns {typeof VelociousDatabaseRecord} - The model class.
987
1160
  */
988
1161
  getModelClass(): typeof VelociousDatabaseRecord;
989
1162
  /**
1163
+ * Runs set attribute.
990
1164
  * @param {string} name - Name.
991
- * @param {any} newValue - New value.
1165
+ * @param {?} newValue - New value.
992
1166
  * @returns {void} - No return value.
993
1167
  */
994
- setAttribute(name: string, newValue: any): void;
1168
+ setAttribute(name: string, newValue: unknown): void;
995
1169
  /**
1170
+ * Runs set column attribute.
996
1171
  * @param {string} name - Name.
997
- * @param {any} newValue - New value.
1172
+ * @param {?} newValue - New value.
1173
+ */
1174
+ _setColumnAttribute(name: string, newValue: unknown): void;
1175
+ /**
1176
+ * Clears loaded belongs-to caches when callers assign the foreign key directly.
1177
+ * @param {string} columnName - Changed database column name.
1178
+ * @param {?} normalizedValue - New normalized column value.
1179
+ * @returns {void} - No return value.
1180
+ */
1181
+ _clearBelongsToRelationshipForChangedForeignKey(columnName: string, normalizedValue: unknown): void;
1182
+ /**
1183
+ * Runs belongs to relationships for foreign key.
1184
+ * @param {string} columnName - Changed database column name.
1185
+ * @returns {Array<?>} - Loaded relationship instances that use the changed foreign key.
1186
+ */
1187
+ _belongsToRelationshipsForForeignKey(columnName: string): Array<unknown>;
1188
+ /**
1189
+ * Runs belongs to relationship uses foreign key.
1190
+ * @param {object} args - Relationship match arguments.
1191
+ * @param {string} args.columnName - Changed database column name.
1192
+ * @param {?} args.relationship - Relationship instance.
1193
+ * @returns {boolean} - Whether the relationship is a belongs-to using the changed foreign key.
998
1194
  */
999
- _setColumnAttribute(name: string, newValue: any): void;
1195
+ _belongsToRelationshipUsesForeignKey({ columnName, relationship }: {
1196
+ columnName: string;
1197
+ relationship: unknown;
1198
+ }): boolean;
1199
+ /**
1200
+ * Runs belongs to relationship matches foreign key value.
1201
+ * @param {object} args - Relationship cache arguments.
1202
+ * @param {?} args.normalizedValue - New normalized column value.
1203
+ * @param {?} args.relationship - Relationship instance.
1204
+ * @returns {boolean} - Whether the loaded related record still matches the changed foreign key.
1205
+ */
1206
+ _belongsToRelationshipMatchesForeignKeyValue({ normalizedValue, relationship }: {
1207
+ normalizedValue: unknown;
1208
+ relationship: unknown;
1209
+ }): boolean;
1210
+ /**
1211
+ * Runs clear loaded belongs to relationship.
1212
+ * @param {?} relationship - Relationship instance.
1213
+ * @returns {void} - No return value.
1214
+ */
1215
+ _clearLoadedBelongsToRelationship(relationship: unknown): void;
1000
1216
  /**
1001
- * @param {any} value - Value to use.
1002
- * @returns {any} - The date value.
1217
+ * Runs normalize date value.
1218
+ * @param {?} value - Value to use.
1219
+ * @returns {?} - The date value.
1003
1220
  */
1004
- _normalizeDateValue(value: any): any;
1221
+ _normalizeDateValue(value: unknown): unknown;
1005
1222
  /**
1223
+ * Runs normalize sqlite boolean value.
1006
1224
  * @param {object} args - Options object.
1007
1225
  * @param {string | undefined} args.columnType - Column type.
1008
- * @param {any} args.value - Value to normalize.
1009
- * @returns {any} - Normalized value.
1226
+ * @param {?} args.value - Value to normalize.
1227
+ * @returns {?} - Normalized value.
1010
1228
  */
1011
1229
  _normalizeSqliteBooleanValue({ columnType, value }: {
1012
1230
  columnType: string | undefined;
1013
- value: any;
1014
- }): any;
1231
+ value: unknown;
1232
+ }): unknown;
1015
1233
  /**
1234
+ * Runs save.
1016
1235
  * @returns {Promise<void>} - Resolves when complete.
1017
1236
  */
1018
1237
  save(): Promise<void>;
@@ -1021,6 +1240,7 @@ declare class VelociousDatabaseRecord {
1021
1240
  }>;
1022
1241
  _autoSaveHasManyAndHasOneRelationshipsToSave(): import("./instance-relationships/base.js").default<typeof VelociousDatabaseRecord, typeof VelociousDatabaseRecord>[];
1023
1242
  /**
1243
+ * Runs auto save has many and has one relationships.
1024
1244
  * @param {object} args - Options object.
1025
1245
  * @param {boolean} args.isNewRecord - Whether is new record.
1026
1246
  */
@@ -1028,56 +1248,63 @@ declare class VelociousDatabaseRecord {
1028
1248
  isNewRecord: boolean;
1029
1249
  }): Promise<void>;
1030
1250
  /**
1251
+ * Runs auto save attachments.
1031
1252
  * @returns {Promise<void>} - Resolves when pending attachments have been saved.
1032
1253
  */
1033
1254
  _autoSaveAttachments(): Promise<void>;
1034
1255
  /**
1256
+ * Runs translations loaded.
1035
1257
  * @abstract
1036
1258
  * @returns {TranslationBase[]} - The translations loaded.
1037
1259
  */
1038
1260
  translationsLoaded(): TranslationBase[];
1039
1261
  /**
1262
+ * Runs get translated attribute.
1040
1263
  * @param {string} name - Name.
1041
1264
  * @param {string} locale - Locale.
1042
1265
  * @returns {string | undefined} - The translated attribute, if found.
1043
1266
  */
1044
1267
  _getTranslatedAttribute(name: string, locale: string): string | undefined;
1045
1268
  /**
1269
+ * Runs get translated attribute with fallback.
1046
1270
  * @param {string} name - Name.
1047
1271
  * @param {string} locale - Locale.
1048
1272
  * @returns {string | undefined} - The translated attribute with fallback, if found.
1049
1273
  */
1050
1274
  _getTranslatedAttributeWithFallback(name: string, locale: string): string | undefined;
1051
1275
  /**
1276
+ * Runs set translated attribute.
1052
1277
  * @param {string} name - Name.
1053
1278
  * @param {string} locale - Locale.
1054
- * @param {any} newValue - New value.
1279
+ * @param {?} newValue - New value.
1055
1280
  * @returns {void} - No return value.
1056
1281
  */
1057
- _setTranslatedAttribute(name: string, locale: string, newValue: any): void;
1282
+ _setTranslatedAttribute(name: string, locale: string, newValue: unknown): void;
1058
1283
  _isNewRecord: boolean;
1059
1284
  /**
1285
+ * Runs load existing record.
1060
1286
  * @param {object} attributes - Attributes.
1061
1287
  * @returns {void} - No return value.
1062
1288
  */
1063
1289
  loadExistingRecord(attributes: object): void;
1064
1290
  /**
1065
1291
  * Assigns the given attributes to the record.
1066
- * @param {Record<string, any>} attributesToAssign - Attributes to assign.
1292
+ * @param {Record<string, ?>} attributesToAssign - Attributes to assign.
1067
1293
  * @returns {void} - No return value.
1068
1294
  */
1069
- assign(attributesToAssign: Record<string, any>): void;
1295
+ assign(attributesToAssign: Record<string, unknown>): void;
1070
1296
  /**
1071
1297
  * Returns a the current attributes of the record (original attributes from database plus changes)
1072
- * @returns {Record<string, any>} - The attributes.
1298
+ * @returns {Record<string, ?>} - The attributes.
1073
1299
  */
1074
- attributes(): Record<string, any>;
1300
+ attributes(): Record<string, unknown>;
1075
1301
  /**
1076
1302
  * Returns column-name keyed data (original attributes from database plus changes)
1077
- * @returns {Record<string, any>} - The raw attributes.
1303
+ * @returns {Record<string, ?>} - The raw attributes.
1078
1304
  */
1079
- rawAttributes(): Record<string, any>;
1305
+ rawAttributes(): Record<string, unknown>;
1080
1306
  /**
1307
+ * Runs connection.
1081
1308
  * @returns {import("../drivers/base.js").default} - The connection.
1082
1309
  */
1083
1310
  _connection(): import("../drivers/base.js").default;
@@ -1087,11 +1314,15 @@ declare class VelociousDatabaseRecord {
1087
1314
  */
1088
1315
  destroy(): Promise<void>;
1089
1316
  /**
1317
+ * Runs run lifecycle callbacks.
1090
1318
  * @param {"afterCreate" | "afterDestroy" | "afterSave" | "afterUpdate" | "beforeCreate" | "beforeDestroy" | "beforeSave" | "beforeUpdate" | "beforeValidation"} callbackName - Callback type.
1091
1319
  * @returns {Promise<void>}
1092
1320
  */
1093
1321
  _runLifecycleCallbacks(callbackName: "afterCreate" | "afterDestroy" | "afterSave" | "afterUpdate" | "beforeCreate" | "beforeDestroy" | "beforeSave" | "beforeUpdate" | "beforeValidation"): Promise<void>;
1094
- /** @returns {boolean} - Whether changes. */
1322
+ /**
1323
+ * Runs has changes.
1324
+ * @returns {boolean} - Whether changes.
1325
+ */
1095
1326
  _hasChanges(): boolean;
1096
1327
  /**
1097
1328
  * Returns true if the model has been changed since it was loaded from the database.
@@ -1100,26 +1331,26 @@ declare class VelociousDatabaseRecord {
1100
1331
  isChanged(): boolean;
1101
1332
  /**
1102
1333
  * Returns the changes that have been made to this record since it was loaded from the database.
1103
- * @returns {Record<string, any[]>} - The changes.
1334
+ * @returns {Record<string, Array<?>>} - The changes.
1104
1335
  */
1105
- changes(): Record<string, any[]>;
1336
+ changes(): Record<string, Array<unknown>>;
1106
1337
  /**
1338
+ * Runs table name.
1107
1339
  * @returns {string} - The table name.
1108
1340
  */
1109
1341
  _tableName(): string;
1110
1342
  /**
1111
1343
  * Reads an attribute value from the record.
1112
1344
  * @param {string} attributeName The name of the attribute to read. This is the attribute name, not the column name.
1113
- * @returns {any} - The attribute.
1345
+ * @returns {?} - The attribute.
1114
1346
  */
1115
- readAttribute(attributeName: string): any;
1347
+ readAttribute(attributeName: string): unknown;
1116
1348
  /**
1117
1349
  * Read an association count attached by `.withCount(...)`. Counts are
1118
1350
  * stored on a separate map from the record's `_attributes` so a
1119
1351
  * virtual count like `tasksCount` cannot silently shadow a real
1120
1352
  * column of the same name. Returns the attached number, or 0 when
1121
1353
  * `.withCount(...)` wasn't requested for this attribute.
1122
- *
1123
1354
  * @param {string} attributeName - Attribute name, e.g. `"tasksCount"` or a custom `"activeMembersCount"` from `.withCount({activeMembersCount: {...}})`.
1124
1355
  * @returns {number}
1125
1356
  */
@@ -1127,19 +1358,15 @@ declare class VelociousDatabaseRecord {
1127
1358
  /**
1128
1359
  * Attach an association count to this record. Internal helper used by
1129
1360
  * the `withCount` runner; outside code should not call this directly.
1130
- *
1131
1361
  * @param {string} attributeName - Attribute name.
1132
1362
  * @param {number} value - Count value.
1133
1363
  * @returns {void}
1134
1364
  */
1135
1365
  _setAssociationCount(attributeName: string, value: number): void;
1136
- /** @type {Map<string, number>} */
1137
- _associationCounts: Map<string, number> | undefined;
1138
1366
  /**
1139
1367
  * All attached association counts as a plain object. Used by the
1140
1368
  * frontend-model serializer to ship counts alongside the record
1141
1369
  * attributes on the wire.
1142
- *
1143
1370
  * @returns {Record<string, number>}
1144
1371
  */
1145
1372
  associationCounts(): Record<string, number>;
@@ -1150,29 +1377,24 @@ declare class VelociousDatabaseRecord {
1150
1377
  * same name. Returns `null` when the key wasn't produced by any
1151
1378
  * registered fn for this record (e.g. no child rows matched the
1152
1379
  * aggregate).
1153
- *
1154
1380
  * @param {string} name - queryData attribute name (matches a SELECT alias from the registered fn).
1155
- * @returns {unknown}
1381
+ * @returns {?}
1156
1382
  */
1157
1383
  queryData(name: string): unknown;
1158
1384
  /**
1159
1385
  * Attach a queryData value to this record. Internal helper used by
1160
1386
  * the `queryData` runner and by frontend-model hydration; outside
1161
1387
  * code should not call this directly.
1162
- *
1163
1388
  * @param {string} name - queryData attribute name.
1164
- * @param {unknown} value - Value to attach.
1389
+ * @param {?} value - Value to attach.
1165
1390
  * @returns {void}
1166
1391
  */
1167
1392
  _setQueryData(name: string, value: unknown): void;
1168
- /** @type {Map<string, unknown>} */
1169
- _queryDataValues: Map<string, unknown> | undefined;
1170
1393
  /**
1171
1394
  * All attached queryData values as a plain object. Used by the
1172
1395
  * frontend-model serializer to ship queryData alongside the record
1173
1396
  * attributes on the wire.
1174
- *
1175
- * @returns {Record<string, unknown>}
1397
+ * @returns {Record<string, ?>}
1176
1398
  */
1177
1399
  queryDataValues(): Record<string, unknown>;
1178
1400
  /**
@@ -1183,7 +1405,6 @@ declare class VelociousDatabaseRecord {
1183
1405
  * requested for this record — so UI code can safely branch on
1184
1406
  * `record.can("update")` without first checking whether the ability
1185
1407
  * was loaded.
1186
- *
1187
1408
  * @param {string} action - Ability action name, e.g. `"update"`.
1188
1409
  * @returns {boolean}
1189
1410
  */
@@ -1192,28 +1413,24 @@ declare class VelociousDatabaseRecord {
1192
1413
  * Attach a per-record ability result to this record. Internal helper
1193
1414
  * used by the `abilities` runner and by frontend-model hydration;
1194
1415
  * outside code should not call this directly.
1195
- *
1196
1416
  * @param {string} action - Ability action name.
1197
1417
  * @param {boolean} value - Whether the current ability permits the action on this record.
1198
1418
  * @returns {void}
1199
1419
  */
1200
1420
  _setComputedAbility(action: string, value: boolean): void;
1201
- /** @type {Map<string, boolean>} */
1202
- _computedAbilities: Map<string, boolean> | undefined;
1203
1421
  /**
1204
1422
  * All attached per-record ability results as a plain object. Used
1205
1423
  * by the frontend-model serializer to ship results alongside the
1206
1424
  * record attributes on the wire.
1207
- *
1208
1425
  * @returns {Record<string, boolean>}
1209
1426
  */
1210
1427
  computedAbilities(): Record<string, boolean>;
1211
1428
  /**
1212
1429
  * Reads a column value from the record.
1213
1430
  * @param {string} attributeName The name of the column to read. This is the column name, not the attribute name.
1214
- * @returns {any} - The column.
1431
+ * @returns {?} - The column.
1215
1432
  */
1216
- readColumn(attributeName: string): any;
1433
+ readColumn(attributeName: string): unknown;
1217
1434
  /**
1218
1435
  * Whether a column value is currently loaded on this record (either as a
1219
1436
  * persisted attribute or a pending change). Used to decide whether a preload
@@ -1223,53 +1440,77 @@ declare class VelociousDatabaseRecord {
1223
1440
  */
1224
1441
  hasLoadedColumn(columnName: string): boolean;
1225
1442
  /**
1443
+ * Runs normalize boolean value for read.
1226
1444
  * @param {object} args - Options object.
1227
1445
  * @param {string | undefined} args.columnType - Column type.
1228
- * @param {any} args.value - Value to normalize.
1229
- * @returns {any} - Normalized value.
1446
+ * @param {?} args.value - Value to normalize.
1447
+ * @returns {?} - Normalized value.
1230
1448
  */
1231
1449
  _normalizeBooleanValueForRead({ columnType, value }: {
1232
1450
  columnType: string | undefined;
1233
- value: any;
1234
- }): any;
1451
+ value: unknown;
1452
+ }): unknown;
1235
1453
  /**
1236
- * @param {any} value - Value from database.
1237
- * @returns {any} - Normalized value.
1454
+ * Runs normalize date value for read.
1455
+ * @param {?} value - Value from database.
1456
+ * @returns {?} - Normalized value.
1238
1457
  */
1239
- _normalizeDateValueForRead(value: any): any;
1458
+ _normalizeDateValueForRead(value: unknown): unknown;
1240
1459
  _belongsToChanges(): Record<string, any>;
1241
- /** @returns {Promise<void>} - Resolves when complete. */
1460
+ /**
1461
+ * Runs create new record.
1462
+ * @returns {Promise<void>} - Resolves when complete.
1463
+ */
1242
1464
  _createNewRecord(): Promise<void>;
1243
1465
  /**
1244
- * @param {Record<string, any>} data - Column-keyed data.
1466
+ * Runs normalize date values for write.
1467
+ * @param {Record<string, ?>} data - Column-keyed data.
1245
1468
  * @returns {void} - No return value.
1246
1469
  */
1247
- _normalizeDateValuesForWrite(data: Record<string, any>): void;
1248
- /** @returns {Promise<void>} - Resolves when complete. */
1470
+ _normalizeDateValuesForWrite(data: Record<string, unknown>): void;
1471
+ /**
1472
+ * Runs update record with changes.
1473
+ * @returns {Promise<void>} - Resolves when complete.
1474
+ */
1249
1475
  _updateRecordWithChanges(): Promise<void>;
1250
- /** @returns {number|string} - The id. */
1476
+ /**
1477
+ * Runs id.
1478
+ * @returns {number|string} - The id.
1479
+ */
1251
1480
  id(): number | string;
1252
- /** @returns {boolean} - Whether persisted. */
1481
+ /**
1482
+ * Runs is persisted.
1483
+ * @returns {boolean} - Whether persisted.
1484
+ */
1253
1485
  isPersisted(): boolean;
1254
- /** @returns {boolean} - Whether new record. */
1486
+ /**
1487
+ * Runs is new record.
1488
+ * @returns {boolean} - Whether new record.
1489
+ */
1255
1490
  isNewRecord(): boolean;
1256
1491
  /**
1492
+ * Runs set is new record.
1257
1493
  * @param {boolean} newIsNewRecord - New is new record.
1258
1494
  * @returns {void} - No return value.
1259
1495
  */
1260
1496
  setIsNewRecord(newIsNewRecord: boolean): void;
1261
1497
  /**
1498
+ * Runs reload with id.
1262
1499
  * @template {typeof VelociousDatabaseRecord} MC
1263
1500
  * @param {string | number} id - Record identifier.
1264
1501
  * @returns {Promise<void>} - Resolves when complete.
1265
1502
  */
1266
1503
  _reloadWithId<MC extends typeof VelociousDatabaseRecord>(id: string | number): Promise<void>;
1267
1504
  /**
1505
+ * Runs reload.
1268
1506
  * @returns {Promise<void>} - Resolves when complete.
1269
1507
  */
1270
1508
  reload(): Promise<void>;
1271
1509
  _runValidations(): Promise<void>;
1272
- /** @returns {string[]} - The full error messages. */
1510
+ /**
1511
+ * Runs full error messages.
1512
+ * @returns {string[]} - The full error messages.
1513
+ */
1273
1514
  fullErrorMessages(): string[];
1274
1515
  /**
1275
1516
  * Assigns the attributes to the record and saves it.
@@ -1280,6 +1521,7 @@ declare class VelociousDatabaseRecord {
1280
1521
  import RecordAttachmentHandle from "./attachments/handle.js";
1281
1522
  declare class TranslationBase extends VelociousDatabaseRecord {
1282
1523
  /**
1524
+ * Runs locale.
1283
1525
  * @abstract
1284
1526
  * @returns {string} - The locale.
1285
1527
  */