velocious 1.0.428 → 1.0.430

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