velocious 1.0.577 → 1.0.579

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 (1676) hide show
  1. package/README.md +12 -6
  2. package/build/application.js +3 -3
  3. package/build/authorization/ability.js +6 -6
  4. package/build/authorization/base-resource.js +1 -1
  5. package/build/background-jobs/client.js +2 -2
  6. package/build/background-jobs/forked-runner-child.js +4 -4
  7. package/build/background-jobs/job-runner.js +2 -2
  8. package/build/background-jobs/job.js +6 -6
  9. package/build/background-jobs/json-socket.js +1 -1
  10. package/build/background-jobs/main.js +13 -13
  11. package/build/background-jobs/normalize-error.js +2 -2
  12. package/build/background-jobs/pooled-runner-child.js +3 -3
  13. package/build/background-jobs/scheduler.js +1 -1
  14. package/build/background-jobs/status-reporter.js +2 -2
  15. package/build/background-jobs/store.js +23 -23
  16. package/build/background-jobs/types.js +6 -6
  17. package/build/background-jobs/web/controller.js +6 -6
  18. package/build/background-jobs/web/counts-channel.js +1 -1
  19. package/build/background-jobs/worker.js +8 -8
  20. package/build/beacon/client.js +3 -3
  21. package/build/beacon/in-process-client.js +3 -3
  22. package/build/beacon/types.js +1 -1
  23. package/build/cli/base-command.js +1 -1
  24. package/build/cli/commands/console.js +1 -1
  25. package/build/cli/commands/db/schema/dump.js +1 -1
  26. package/build/cli/commands/db/schema/load.js +1 -1
  27. package/build/cli/commands/db/seed.js +1 -1
  28. package/build/cli/commands/generate/frontend-models.js +1 -1
  29. package/build/cli/commands/lint/relationships.js +1 -1
  30. package/build/cli/commands/run-script.js +1 -1
  31. package/build/cli/commands/runner.js +1 -1
  32. package/build/cli/index.js +2 -2
  33. package/build/cli/tenant-database-command-helper.js +2 -2
  34. package/build/configuration-types.js +48 -47
  35. package/build/configuration.js +150 -65
  36. package/build/controller.js +11 -8
  37. package/build/current.js +2 -2
  38. package/build/database/annotations-async-hooks.js +3 -3
  39. package/build/database/annotations.js +1 -1
  40. package/build/database/drivers/base-column.js +1 -1
  41. package/build/database/drivers/base-foreign-key.js +1 -1
  42. package/build/database/drivers/base-table.js +1 -1
  43. package/build/database/drivers/base.js +18 -18
  44. package/build/database/drivers/mssql/column.js +1 -1
  45. package/build/database/drivers/mssql/index.js +2 -2
  46. package/build/database/drivers/mssql/options.js +1 -1
  47. package/build/database/drivers/mssql/structure-sql.js +1 -1
  48. package/build/database/drivers/mssql/table.js +1 -1
  49. package/build/database/drivers/mysql/column.js +1 -1
  50. package/build/database/drivers/mysql/index.js +4 -4
  51. package/build/database/drivers/mysql/options.js +1 -1
  52. package/build/database/drivers/mysql/query.js +7 -7
  53. package/build/database/drivers/mysql/structure-sql.js +71 -10
  54. package/build/database/drivers/pgsql/column.js +1 -1
  55. package/build/database/drivers/pgsql/index.js +6 -6
  56. package/build/database/drivers/pgsql/structure-sql.js +1 -1
  57. package/build/database/drivers/sqlite/base.js +7 -7
  58. package/build/database/drivers/sqlite/column.js +1 -1
  59. package/build/database/drivers/sqlite/connection-sql-js.js +1 -1
  60. package/build/database/drivers/sqlite/foreign-key.js +1 -1
  61. package/build/database/drivers/sqlite/index.js +1 -1
  62. package/build/database/drivers/sqlite/index.native.js +2 -2
  63. package/build/database/drivers/sqlite/index.web.js +2 -2
  64. package/build/database/drivers/sqlite/query.js +2 -2
  65. package/build/database/drivers/sqlite/query.native.js +2 -2
  66. package/build/database/drivers/sqlite/query.web.js +2 -2
  67. package/build/database/drivers/sqlite/table-rebuilder.js +1 -1
  68. package/build/database/migration/index.js +2 -2
  69. package/build/database/migrator/types.js +2 -2
  70. package/build/database/operation.js +59 -6
  71. package/build/database/pool/async-tracked-multi-connection.js +75 -24
  72. package/build/database/pool/base-methods-forward.js +2 -2
  73. package/build/database/pool/base.js +48 -17
  74. package/build/database/pool/single-multi-use.js +501 -103
  75. package/build/database/query/delete-base.js +1 -1
  76. package/build/database/query/index.js +3 -3
  77. package/build/database/query/insert-base.js +4 -4
  78. package/build/database/query/model-class-query.js +39 -39
  79. package/build/database/query/preloader/belongs-to.js +2 -2
  80. package/build/database/query/preloader/ensure-model-class-initialized.js +3 -2
  81. package/build/database/query/preloader/has-many.js +3 -3
  82. package/build/database/query/preloader/has-one.js +1 -1
  83. package/build/database/query/preloader.js +9 -2
  84. package/build/database/query/query-data.js +7 -7
  85. package/build/database/query/update-base.js +3 -3
  86. package/build/database/query/upsert-base.js +2 -2
  87. package/build/database/query/where-model-class-hash.js +13 -13
  88. package/build/database/query/with-count.js +12 -12
  89. package/build/database/query-parser/options.js +2 -2
  90. package/build/database/query-parser/select-parser.js +1 -1
  91. package/build/database/record/acts-as-list.js +2 -2
  92. package/build/database/record/attachments/handle.js +6 -6
  93. package/build/database/record/attachments/normalize-input.js +11 -11
  94. package/build/database/record/attachments/storage-drivers/filesystem.js +1 -1
  95. package/build/database/record/attachments/storage-drivers/native.js +5 -5
  96. package/build/database/record/attachments/storage-drivers/s3.js +10 -10
  97. package/build/database/record/attachments/store.js +24 -20
  98. package/build/database/record/auditing.js +123 -29
  99. package/build/database/record/counter-cache-magnitude.js +11 -11
  100. package/build/database/record/index.js +227 -174
  101. package/build/database/record/instance-relationships/base.js +4 -4
  102. package/build/database/record/instance-relationships/belongs-to.js +1 -1
  103. package/build/database/record/instance-relationships/has-many.js +3 -3
  104. package/build/database/record/instance-relationships/has-one.js +1 -1
  105. package/build/database/record/record-not-found-error.js +1 -0
  106. package/build/database/record/relationships/base.js +22 -0
  107. package/build/database/record/state-machine.js +6 -6
  108. package/build/database/record/validators/base.js +1 -1
  109. package/build/database/structure-sql-loader.js +3 -3
  110. package/build/database/table-data/table-column.js +3 -3
  111. package/build/database/use-live-query.js +3 -3
  112. package/build/environment-handlers/base.js +56 -37
  113. package/build/environment-handlers/browser.js +1 -1
  114. package/build/environment-handlers/node/cli/commands/console.js +4 -4
  115. package/build/environment-handlers/node/cli/commands/db/seed.js +2 -2
  116. package/build/environment-handlers/node/cli/commands/generate/base-models.js +1 -1
  117. package/build/environment-handlers/node/cli/commands/run-script.js +2 -2
  118. package/build/environment-handlers/node/cli/commands/runner.js +2 -2
  119. package/build/environment-handlers/node/cli/commands/server.js +1 -1
  120. package/build/environment-handlers/node.js +36 -36
  121. package/build/error-logger.js +2 -2
  122. package/build/error-reporting/request-details.js +32 -32
  123. package/build/frontend-model-controller.js +215 -213
  124. package/build/frontend-model-resource/base-resource.js +44 -44
  125. package/build/frontend-model-resource/velocious-attachment-resource.js +1 -1
  126. package/build/frontend-models/base.js +146 -142
  127. package/build/frontend-models/clear-pending-debounced-callback.js +2 -2
  128. package/build/frontend-models/model-registry.js +4 -4
  129. package/build/frontend-models/outgoing-event-buffer.js +1 -1
  130. package/build/frontend-models/preloader.js +1 -1
  131. package/build/frontend-models/query.js +60 -60
  132. package/build/frontend-models/resource-definition.js +9 -9
  133. package/build/frontend-models/transport-serialization.js +27 -27
  134. package/build/frontend-models/websocket-channel.js +4 -4
  135. package/build/frontend-models/websocket-publishers.js +1 -1
  136. package/build/http-client/request.js +1 -1
  137. package/build/http-client/response.js +1 -1
  138. package/build/http-server/client/index.js +4 -4
  139. package/build/http-server/client/params-to-object.js +16 -16
  140. package/build/http-server/client/request-buffer/index.js +5 -2
  141. package/build/http-server/client/request-parser.js +2 -2
  142. package/build/http-server/client/request-runner.js +2 -2
  143. package/build/http-server/client/request.js +2 -2
  144. package/build/http-server/client/websocket-request.js +6 -6
  145. package/build/http-server/client/websocket-session.js +28 -28
  146. package/build/http-server/cookie.js +2 -2
  147. package/build/http-server/development-reloader.js +1 -1
  148. package/build/http-server/index.js +5 -5
  149. package/build/http-server/remote-address.js +1 -1
  150. package/build/http-server/server-lock.js +4 -4
  151. package/build/http-server/websocket-channel-subscribers.js +4 -4
  152. package/build/http-server/websocket-channel.js +1 -1
  153. package/build/http-server/websocket-connection.js +3 -3
  154. package/build/http-server/websocket-event-log-store.js +9 -9
  155. package/build/http-server/websocket-events-host.js +7 -7
  156. package/build/http-server/websocket-events.js +4 -4
  157. package/build/http-server/worker-handler/channel-subscriber-dispatch.js +1 -1
  158. package/build/http-server/worker-handler/in-process.js +5 -5
  159. package/build/http-server/worker-handler/index.js +10 -10
  160. package/build/http-server/worker-handler/worker-thread.js +8 -8
  161. package/build/index.d.ts.map +1 -1
  162. package/build/logger/base-logger.js +1 -1
  163. package/build/logger.js +12 -12
  164. package/build/mailer/backends/smtp.js +3 -3
  165. package/build/mailer/base.js +14 -14
  166. package/build/mailer/delivery.js +3 -3
  167. package/build/mailer/index.js +1 -1
  168. package/build/mailer.js +1 -1
  169. package/build/plugins/sqljs-wasm-route-controller.js +1 -1
  170. package/build/record-payload-values.js +3 -3
  171. package/build/routes/base-route.js +5 -5
  172. package/build/routes/basic-route.js +4 -4
  173. package/build/routes/get-route.js +2 -2
  174. package/build/routes/hooks/frontend-model-command-route-hook.js +1 -1
  175. package/build/routes/index.js +3 -3
  176. package/build/routes/namespace-route.js +1 -1
  177. package/build/routes/plugin-routes.js +1 -1
  178. package/build/routes/post-route.js +2 -2
  179. package/build/routes/resolver.js +5 -5
  180. package/build/routes/resource-route.js +1 -1
  181. package/build/src/application.d.ts +26 -29
  182. package/build/src/application.d.ts.map +1 -1
  183. package/build/src/application.js +4 -4
  184. package/build/src/authorization/ability.d.ts +47 -53
  185. package/build/src/authorization/ability.d.ts.map +1 -1
  186. package/build/src/authorization/ability.js +7 -7
  187. package/build/src/authorization/base-resource.d.ts +13 -13
  188. package/build/src/authorization/base-resource.d.ts.map +1 -1
  189. package/build/src/authorization/base-resource.js +2 -2
  190. package/build/src/background-jobs/client.d.ts +9 -9
  191. package/build/src/background-jobs/client.d.ts.map +1 -1
  192. package/build/src/background-jobs/client.js +3 -3
  193. package/build/src/background-jobs/cron-expression.d.ts +25 -16
  194. package/build/src/background-jobs/cron-expression.d.ts.map +1 -1
  195. package/build/src/background-jobs/forked-runner-child.js +5 -5
  196. package/build/src/background-jobs/job-record.d.ts +4 -3
  197. package/build/src/background-jobs/job-record.d.ts.map +1 -1
  198. package/build/src/background-jobs/job-registry.d.ts +6 -6
  199. package/build/src/background-jobs/job-registry.d.ts.map +1 -1
  200. package/build/src/background-jobs/job-runner.d.ts +9 -9
  201. package/build/src/background-jobs/job-runner.d.ts.map +1 -1
  202. package/build/src/background-jobs/job-runner.js +3 -3
  203. package/build/src/background-jobs/job.d.ts +14 -14
  204. package/build/src/background-jobs/job.d.ts.map +1 -1
  205. package/build/src/background-jobs/job.js +7 -7
  206. package/build/src/background-jobs/json-socket.d.ts +9 -10
  207. package/build/src/background-jobs/json-socket.d.ts.map +1 -1
  208. package/build/src/background-jobs/json-socket.js +2 -2
  209. package/build/src/background-jobs/main.d.ts +56 -59
  210. package/build/src/background-jobs/main.d.ts.map +1 -1
  211. package/build/src/background-jobs/main.js +14 -14
  212. package/build/src/background-jobs/normalize-error.d.ts +2 -2
  213. package/build/src/background-jobs/normalize-error.d.ts.map +1 -1
  214. package/build/src/background-jobs/normalize-error.js +3 -3
  215. package/build/src/background-jobs/pooled-runner-child.js +4 -4
  216. package/build/src/background-jobs/runner-graceful-shutdown.d.ts +7 -12
  217. package/build/src/background-jobs/runner-graceful-shutdown.d.ts.map +1 -1
  218. package/build/src/background-jobs/runner-process-title.d.ts.map +1 -1
  219. package/build/src/background-jobs/scheduler.d.ts +41 -41
  220. package/build/src/background-jobs/scheduler.d.ts.map +1 -1
  221. package/build/src/background-jobs/scheduler.js +2 -2
  222. package/build/src/background-jobs/socket-request.d.ts +14 -14
  223. package/build/src/background-jobs/socket-request.d.ts.map +1 -1
  224. package/build/src/background-jobs/status-reporter.d.ts +28 -28
  225. package/build/src/background-jobs/status-reporter.d.ts.map +1 -1
  226. package/build/src/background-jobs/status-reporter.js +3 -3
  227. package/build/src/background-jobs/store.d.ts +100 -103
  228. package/build/src/background-jobs/store.d.ts.map +1 -1
  229. package/build/src/background-jobs/store.js +24 -24
  230. package/build/src/background-jobs/types.d.ts +124 -124
  231. package/build/src/background-jobs/types.d.ts.map +1 -1
  232. package/build/src/background-jobs/types.js +7 -7
  233. package/build/src/background-jobs/web/authorization.d.ts +2 -2
  234. package/build/src/background-jobs/web/authorization.d.ts.map +1 -1
  235. package/build/src/background-jobs/web/controller.d.ts +13 -13
  236. package/build/src/background-jobs/web/controller.d.ts.map +1 -1
  237. package/build/src/background-jobs/web/controller.js +7 -7
  238. package/build/src/background-jobs/web/counts-channel.d.ts +8 -8
  239. package/build/src/background-jobs/web/counts-channel.d.ts.map +1 -1
  240. package/build/src/background-jobs/web/counts-channel.js +2 -2
  241. package/build/src/background-jobs/web/index.d.ts +4 -4
  242. package/build/src/background-jobs/web/index.d.ts.map +1 -1
  243. package/build/src/background-jobs/web/path-matcher.d.ts +18 -13
  244. package/build/src/background-jobs/web/path-matcher.d.ts.map +1 -1
  245. package/build/src/background-jobs/web/registry.d.ts +21 -24
  246. package/build/src/background-jobs/web/registry.d.ts.map +1 -1
  247. package/build/src/background-jobs/worker.d.ts +74 -77
  248. package/build/src/background-jobs/worker.d.ts.map +1 -1
  249. package/build/src/background-jobs/worker.js +9 -9
  250. package/build/src/beacon/client.d.ts +30 -34
  251. package/build/src/beacon/client.d.ts.map +1 -1
  252. package/build/src/beacon/client.js +4 -4
  253. package/build/src/beacon/in-process-broker.d.ts +6 -9
  254. package/build/src/beacon/in-process-broker.d.ts.map +1 -1
  255. package/build/src/beacon/in-process-client.d.ts +17 -21
  256. package/build/src/beacon/in-process-client.d.ts.map +1 -1
  257. package/build/src/beacon/in-process-client.js +4 -4
  258. package/build/src/beacon/server.d.ts +15 -15
  259. package/build/src/beacon/server.d.ts.map +1 -1
  260. package/build/src/beacon/types.d.ts +21 -46
  261. package/build/src/beacon/types.d.ts.map +1 -1
  262. package/build/src/beacon/types.js +2 -2
  263. package/build/src/cli/base-command.d.ts +25 -28
  264. package/build/src/cli/base-command.d.ts.map +1 -1
  265. package/build/src/cli/base-command.js +2 -2
  266. package/build/src/cli/browser-cli.d.ts +1 -1
  267. package/build/src/cli/browser-cli.d.ts.map +1 -1
  268. package/build/src/cli/commands/background-jobs-main.d.ts +2 -1
  269. package/build/src/cli/commands/background-jobs-main.d.ts.map +1 -1
  270. package/build/src/cli/commands/background-jobs-runner.d.ts +2 -1
  271. package/build/src/cli/commands/background-jobs-runner.d.ts.map +1 -1
  272. package/build/src/cli/commands/background-jobs-worker.d.ts +2 -1
  273. package/build/src/cli/commands/background-jobs-worker.d.ts.map +1 -1
  274. package/build/src/cli/commands/beacon.d.ts +2 -1
  275. package/build/src/cli/commands/beacon.d.ts.map +1 -1
  276. package/build/src/cli/commands/console.d.ts +6 -1
  277. package/build/src/cli/commands/console.d.ts.map +1 -1
  278. package/build/src/cli/commands/console.js +2 -2
  279. package/build/src/cli/commands/db/base-command.d.ts +1 -1
  280. package/build/src/cli/commands/db/base-command.d.ts.map +1 -1
  281. package/build/src/cli/commands/db/create.d.ts +1 -1
  282. package/build/src/cli/commands/db/create.d.ts.map +1 -1
  283. package/build/src/cli/commands/db/drop.d.ts +1 -1
  284. package/build/src/cli/commands/db/drop.d.ts.map +1 -1
  285. package/build/src/cli/commands/db/migrate.d.ts +1 -1
  286. package/build/src/cli/commands/db/migrate.d.ts.map +1 -1
  287. package/build/src/cli/commands/db/reset.d.ts +1 -1
  288. package/build/src/cli/commands/db/reset.d.ts.map +1 -1
  289. package/build/src/cli/commands/db/rollback.d.ts +1 -1
  290. package/build/src/cli/commands/db/rollback.d.ts.map +1 -1
  291. package/build/src/cli/commands/db/schema/dump.d.ts +6 -1
  292. package/build/src/cli/commands/db/schema/dump.d.ts.map +1 -1
  293. package/build/src/cli/commands/db/schema/dump.js +2 -2
  294. package/build/src/cli/commands/db/schema/load.d.ts +6 -1
  295. package/build/src/cli/commands/db/schema/load.d.ts.map +1 -1
  296. package/build/src/cli/commands/db/schema/load.js +2 -2
  297. package/build/src/cli/commands/db/seed.d.ts +6 -1
  298. package/build/src/cli/commands/db/seed.d.ts.map +1 -1
  299. package/build/src/cli/commands/db/seed.js +2 -2
  300. package/build/src/cli/commands/db/tenants/check.d.ts +1 -1
  301. package/build/src/cli/commands/db/tenants/check.d.ts.map +1 -1
  302. package/build/src/cli/commands/db/tenants/create.d.ts +1 -1
  303. package/build/src/cli/commands/db/tenants/create.d.ts.map +1 -1
  304. package/build/src/cli/commands/db/tenants/drop.d.ts +1 -1
  305. package/build/src/cli/commands/db/tenants/drop.d.ts.map +1 -1
  306. package/build/src/cli/commands/db/tenants/migrate.d.ts +1 -1
  307. package/build/src/cli/commands/db/tenants/migrate.d.ts.map +1 -1
  308. package/build/src/cli/commands/destroy/migration.d.ts +2 -1
  309. package/build/src/cli/commands/destroy/migration.d.ts.map +1 -1
  310. package/build/src/cli/commands/generate/base-models.d.ts +2 -1
  311. package/build/src/cli/commands/generate/base-models.d.ts.map +1 -1
  312. package/build/src/cli/commands/generate/frontend-models.d.ts +6 -1
  313. package/build/src/cli/commands/generate/frontend-models.d.ts.map +1 -1
  314. package/build/src/cli/commands/generate/frontend-models.js +2 -2
  315. package/build/src/cli/commands/generate/migration.d.ts +2 -1
  316. package/build/src/cli/commands/generate/migration.d.ts.map +1 -1
  317. package/build/src/cli/commands/generate/model.d.ts +2 -1
  318. package/build/src/cli/commands/generate/model.d.ts.map +1 -1
  319. package/build/src/cli/commands/init.d.ts +4 -2
  320. package/build/src/cli/commands/init.d.ts.map +1 -1
  321. package/build/src/cli/commands/lint/relationships.d.ts +6 -1
  322. package/build/src/cli/commands/lint/relationships.d.ts.map +1 -1
  323. package/build/src/cli/commands/lint/relationships.js +2 -2
  324. package/build/src/cli/commands/routes.d.ts +2 -1
  325. package/build/src/cli/commands/routes.d.ts.map +1 -1
  326. package/build/src/cli/commands/run-script.d.ts +6 -1
  327. package/build/src/cli/commands/run-script.d.ts.map +1 -1
  328. package/build/src/cli/commands/run-script.js +2 -2
  329. package/build/src/cli/commands/runner.d.ts +6 -1
  330. package/build/src/cli/commands/runner.d.ts.map +1 -1
  331. package/build/src/cli/commands/runner.js +2 -2
  332. package/build/src/cli/commands/server.d.ts +2 -1
  333. package/build/src/cli/commands/server.d.ts.map +1 -1
  334. package/build/src/cli/commands/test.d.ts +2 -1
  335. package/build/src/cli/commands/test.d.ts.map +1 -1
  336. package/build/src/cli/index.d.ts +20 -20
  337. package/build/src/cli/index.d.ts.map +1 -1
  338. package/build/src/cli/index.js +3 -3
  339. package/build/src/cli/tenant-database-command-helper.d.ts +13 -13
  340. package/build/src/cli/tenant-database-command-helper.d.ts.map +1 -1
  341. package/build/src/cli/tenant-database-command-helper.js +3 -3
  342. package/build/src/cli/use-browser-cli.d.ts +1 -1
  343. package/build/src/cli/use-browser-cli.d.ts.map +1 -1
  344. package/build/src/configuration-resolver.d.ts +1 -1
  345. package/build/src/configuration-resolver.d.ts.map +1 -1
  346. package/build/src/configuration-types.d.ts +947 -1038
  347. package/build/src/configuration-types.d.ts.map +1 -1
  348. package/build/src/configuration-types.js +49 -48
  349. package/build/src/configuration.d.ts +145 -139
  350. package/build/src/configuration.d.ts.map +1 -1
  351. package/build/src/configuration.js +149 -66
  352. package/build/src/controller.d.ts +37 -35
  353. package/build/src/controller.d.ts.map +1 -1
  354. package/build/src/controller.js +11 -9
  355. package/build/src/current-configuration.d.ts +5 -4
  356. package/build/src/current-configuration.d.ts.map +1 -1
  357. package/build/src/current.d.ts +3 -3
  358. package/build/src/current.d.ts.map +1 -1
  359. package/build/src/current.js +3 -3
  360. package/build/src/database/advisory-lock-runner.d.ts +61 -60
  361. package/build/src/database/advisory-lock-runner.d.ts.map +1 -1
  362. package/build/src/database/annotations-async-hooks.js +4 -4
  363. package/build/src/database/annotations.d.ts +4 -6
  364. package/build/src/database/annotations.d.ts.map +1 -1
  365. package/build/src/database/annotations.js +2 -2
  366. package/build/src/database/column-types.d.ts +1 -1
  367. package/build/src/database/column-types.d.ts.map +1 -1
  368. package/build/src/database/datetime-storage.d.ts +6 -6
  369. package/build/src/database/datetime-storage.d.ts.map +1 -1
  370. package/build/src/database/drivers/base-column.d.ts +3 -3
  371. package/build/src/database/drivers/base-column.d.ts.map +1 -1
  372. package/build/src/database/drivers/base-column.js +2 -2
  373. package/build/src/database/drivers/base-columns-index.d.ts +2 -2
  374. package/build/src/database/drivers/base-columns-index.d.ts.map +1 -1
  375. package/build/src/database/drivers/base-foreign-key.d.ts +7 -7
  376. package/build/src/database/drivers/base-foreign-key.d.ts.map +1 -1
  377. package/build/src/database/drivers/base-foreign-key.js +2 -2
  378. package/build/src/database/drivers/base-table.d.ts +3 -3
  379. package/build/src/database/drivers/base-table.d.ts.map +1 -1
  380. package/build/src/database/drivers/base-table.js +2 -2
  381. package/build/src/database/drivers/base.d.ts +297 -342
  382. package/build/src/database/drivers/base.d.ts.map +1 -1
  383. package/build/src/database/drivers/base.js +19 -19
  384. package/build/src/database/drivers/index-metadata.d.ts +15 -18
  385. package/build/src/database/drivers/index-metadata.d.ts.map +1 -1
  386. package/build/src/database/drivers/mssql/column.d.ts +10 -5
  387. package/build/src/database/drivers/mssql/column.d.ts.map +1 -1
  388. package/build/src/database/drivers/mssql/column.js +2 -2
  389. package/build/src/database/drivers/mssql/columns-index.d.ts +30 -22
  390. package/build/src/database/drivers/mssql/columns-index.d.ts.map +1 -1
  391. package/build/src/database/drivers/mssql/connect-connection.d.ts.map +1 -1
  392. package/build/src/database/drivers/mssql/foreign-key.d.ts +1 -1
  393. package/build/src/database/drivers/mssql/foreign-key.d.ts.map +1 -1
  394. package/build/src/database/drivers/mssql/index.d.ts +250 -9
  395. package/build/src/database/drivers/mssql/index.d.ts.map +1 -1
  396. package/build/src/database/drivers/mssql/index.js +3 -3
  397. package/build/src/database/drivers/mssql/options.d.ts +31 -1
  398. package/build/src/database/drivers/mssql/options.d.ts.map +1 -1
  399. package/build/src/database/drivers/mssql/options.js +2 -2
  400. package/build/src/database/drivers/mssql/query-parser.d.ts +1 -1
  401. package/build/src/database/drivers/mssql/query-parser.d.ts.map +1 -1
  402. package/build/src/database/drivers/mssql/sql/alter-table.d.ts +1 -1
  403. package/build/src/database/drivers/mssql/sql/alter-table.d.ts.map +1 -1
  404. package/build/src/database/drivers/mssql/sql/create-database.d.ts +3 -2
  405. package/build/src/database/drivers/mssql/sql/create-database.d.ts.map +1 -1
  406. package/build/src/database/drivers/mssql/sql/create-index.d.ts +1 -1
  407. package/build/src/database/drivers/mssql/sql/create-index.d.ts.map +1 -1
  408. package/build/src/database/drivers/mssql/sql/create-table.d.ts +1 -1
  409. package/build/src/database/drivers/mssql/sql/create-table.d.ts.map +1 -1
  410. package/build/src/database/drivers/mssql/sql/delete.d.ts +1 -1
  411. package/build/src/database/drivers/mssql/sql/delete.d.ts.map +1 -1
  412. package/build/src/database/drivers/mssql/sql/drop-database.d.ts +14 -1
  413. package/build/src/database/drivers/mssql/sql/drop-database.d.ts.map +1 -1
  414. package/build/src/database/drivers/mssql/sql/drop-table.d.ts +1 -1
  415. package/build/src/database/drivers/mssql/sql/drop-table.d.ts.map +1 -1
  416. package/build/src/database/drivers/mssql/sql/insert.d.ts +1 -1
  417. package/build/src/database/drivers/mssql/sql/insert.d.ts.map +1 -1
  418. package/build/src/database/drivers/mssql/sql/remove-index.d.ts +1 -1
  419. package/build/src/database/drivers/mssql/sql/remove-index.d.ts.map +1 -1
  420. package/build/src/database/drivers/mssql/sql/update.d.ts +1 -1
  421. package/build/src/database/drivers/mssql/sql/update.d.ts.map +1 -1
  422. package/build/src/database/drivers/mssql/sql/upsert.d.ts +1 -1
  423. package/build/src/database/drivers/mssql/sql/upsert.d.ts.map +1 -1
  424. package/build/src/database/drivers/mssql/structure-sql.d.ts +3 -3
  425. package/build/src/database/drivers/mssql/structure-sql.d.ts.map +1 -1
  426. package/build/src/database/drivers/mssql/structure-sql.js +2 -2
  427. package/build/src/database/drivers/mssql/table.d.ts +39 -29
  428. package/build/src/database/drivers/mssql/table.d.ts.map +1 -1
  429. package/build/src/database/drivers/mssql/table.js +2 -2
  430. package/build/src/database/drivers/mysql/column.d.ts +10 -6
  431. package/build/src/database/drivers/mysql/column.d.ts.map +1 -1
  432. package/build/src/database/drivers/mysql/column.js +2 -2
  433. package/build/src/database/drivers/mysql/columns-index.d.ts +3 -1
  434. package/build/src/database/drivers/mysql/columns-index.d.ts.map +1 -1
  435. package/build/src/database/drivers/mysql/foreign-key.d.ts +1 -1
  436. package/build/src/database/drivers/mysql/foreign-key.d.ts.map +1 -1
  437. package/build/src/database/drivers/mysql/index.d.ts +225 -6
  438. package/build/src/database/drivers/mysql/index.d.ts.map +1 -1
  439. package/build/src/database/drivers/mysql/index.js +5 -5
  440. package/build/src/database/drivers/mysql/options.d.ts +7 -1
  441. package/build/src/database/drivers/mysql/options.d.ts.map +1 -1
  442. package/build/src/database/drivers/mysql/options.js +2 -2
  443. package/build/src/database/drivers/mysql/query-parser.d.ts +1 -1
  444. package/build/src/database/drivers/mysql/query-parser.d.ts.map +1 -1
  445. package/build/src/database/drivers/mysql/query-stream.d.ts.map +1 -1
  446. package/build/src/database/drivers/mysql/query.d.ts +2 -2
  447. package/build/src/database/drivers/mysql/query.d.ts.map +1 -1
  448. package/build/src/database/drivers/mysql/query.js +8 -8
  449. package/build/src/database/drivers/mysql/sql/alter-table.d.ts +12 -1
  450. package/build/src/database/drivers/mysql/sql/alter-table.d.ts.map +1 -1
  451. package/build/src/database/drivers/mysql/sql/create-database.d.ts +6 -1
  452. package/build/src/database/drivers/mysql/sql/create-database.d.ts.map +1 -1
  453. package/build/src/database/drivers/mysql/sql/create-index.d.ts +1 -1
  454. package/build/src/database/drivers/mysql/sql/create-index.d.ts.map +1 -1
  455. package/build/src/database/drivers/mysql/sql/create-table.d.ts +1 -1
  456. package/build/src/database/drivers/mysql/sql/create-table.d.ts.map +1 -1
  457. package/build/src/database/drivers/mysql/sql/delete.d.ts +1 -1
  458. package/build/src/database/drivers/mysql/sql/delete.d.ts.map +1 -1
  459. package/build/src/database/drivers/mysql/sql/drop-database.d.ts +1 -1
  460. package/build/src/database/drivers/mysql/sql/drop-database.d.ts.map +1 -1
  461. package/build/src/database/drivers/mysql/sql/drop-table.d.ts +1 -1
  462. package/build/src/database/drivers/mysql/sql/drop-table.d.ts.map +1 -1
  463. package/build/src/database/drivers/mysql/sql/insert.d.ts +1 -1
  464. package/build/src/database/drivers/mysql/sql/insert.d.ts.map +1 -1
  465. package/build/src/database/drivers/mysql/sql/remove-index.d.ts +1 -1
  466. package/build/src/database/drivers/mysql/sql/remove-index.d.ts.map +1 -1
  467. package/build/src/database/drivers/mysql/sql/update.d.ts +1 -1
  468. package/build/src/database/drivers/mysql/sql/update.d.ts.map +1 -1
  469. package/build/src/database/drivers/mysql/sql/upsert.d.ts +1 -1
  470. package/build/src/database/drivers/mysql/sql/upsert.d.ts.map +1 -1
  471. package/build/src/database/drivers/mysql/structure-sql.d.ts +14 -3
  472. package/build/src/database/drivers/mysql/structure-sql.d.ts.map +1 -1
  473. package/build/src/database/drivers/mysql/structure-sql.js +62 -11
  474. package/build/src/database/drivers/mysql/table.d.ts +11 -6
  475. package/build/src/database/drivers/mysql/table.d.ts.map +1 -1
  476. package/build/src/database/drivers/pgsql/column.d.ts +10 -5
  477. package/build/src/database/drivers/pgsql/column.d.ts.map +1 -1
  478. package/build/src/database/drivers/pgsql/column.js +2 -2
  479. package/build/src/database/drivers/pgsql/columns-index.d.ts +30 -22
  480. package/build/src/database/drivers/pgsql/columns-index.d.ts.map +1 -1
  481. package/build/src/database/drivers/pgsql/foreign-key.d.ts +1 -1
  482. package/build/src/database/drivers/pgsql/foreign-key.d.ts.map +1 -1
  483. package/build/src/database/drivers/pgsql/index.d.ts +157 -6
  484. package/build/src/database/drivers/pgsql/index.d.ts.map +1 -1
  485. package/build/src/database/drivers/pgsql/index.js +7 -7
  486. package/build/src/database/drivers/pgsql/options.d.ts +1 -1
  487. package/build/src/database/drivers/pgsql/options.d.ts.map +1 -1
  488. package/build/src/database/drivers/pgsql/query-parser.d.ts +1 -1
  489. package/build/src/database/drivers/pgsql/query-parser.d.ts.map +1 -1
  490. package/build/src/database/drivers/pgsql/sql/alter-table.d.ts +1 -1
  491. package/build/src/database/drivers/pgsql/sql/alter-table.d.ts.map +1 -1
  492. package/build/src/database/drivers/pgsql/sql/create-database.d.ts +2 -1
  493. package/build/src/database/drivers/pgsql/sql/create-database.d.ts.map +1 -1
  494. package/build/src/database/drivers/pgsql/sql/create-index.d.ts +1 -1
  495. package/build/src/database/drivers/pgsql/sql/create-index.d.ts.map +1 -1
  496. package/build/src/database/drivers/pgsql/sql/create-table.d.ts +1 -1
  497. package/build/src/database/drivers/pgsql/sql/create-table.d.ts.map +1 -1
  498. package/build/src/database/drivers/pgsql/sql/delete.d.ts +1 -1
  499. package/build/src/database/drivers/pgsql/sql/delete.d.ts.map +1 -1
  500. package/build/src/database/drivers/pgsql/sql/drop-database.d.ts +1 -1
  501. package/build/src/database/drivers/pgsql/sql/drop-database.d.ts.map +1 -1
  502. package/build/src/database/drivers/pgsql/sql/drop-table.d.ts +1 -1
  503. package/build/src/database/drivers/pgsql/sql/drop-table.d.ts.map +1 -1
  504. package/build/src/database/drivers/pgsql/sql/insert.d.ts +1 -1
  505. package/build/src/database/drivers/pgsql/sql/insert.d.ts.map +1 -1
  506. package/build/src/database/drivers/pgsql/sql/remove-index.d.ts +1 -1
  507. package/build/src/database/drivers/pgsql/sql/remove-index.d.ts.map +1 -1
  508. package/build/src/database/drivers/pgsql/sql/update.d.ts +1 -1
  509. package/build/src/database/drivers/pgsql/sql/update.d.ts.map +1 -1
  510. package/build/src/database/drivers/pgsql/sql/upsert.d.ts +1 -1
  511. package/build/src/database/drivers/pgsql/sql/upsert.d.ts.map +1 -1
  512. package/build/src/database/drivers/pgsql/structure-sql.d.ts +3 -3
  513. package/build/src/database/drivers/pgsql/structure-sql.d.ts.map +1 -1
  514. package/build/src/database/drivers/pgsql/structure-sql.js +2 -2
  515. package/build/src/database/drivers/pgsql/table.d.ts +33 -31
  516. package/build/src/database/drivers/pgsql/table.d.ts.map +1 -1
  517. package/build/src/database/drivers/sqlite/base.d.ts +162 -12
  518. package/build/src/database/drivers/sqlite/base.d.ts.map +1 -1
  519. package/build/src/database/drivers/sqlite/base.js +8 -8
  520. package/build/src/database/drivers/sqlite/column.d.ts +12 -6
  521. package/build/src/database/drivers/sqlite/column.d.ts.map +1 -1
  522. package/build/src/database/drivers/sqlite/column.js +2 -2
  523. package/build/src/database/drivers/sqlite/columns-index.d.ts +5 -1
  524. package/build/src/database/drivers/sqlite/columns-index.d.ts.map +1 -1
  525. package/build/src/database/drivers/sqlite/connection-sql-js.d.ts +9 -9
  526. package/build/src/database/drivers/sqlite/connection-sql-js.d.ts.map +1 -1
  527. package/build/src/database/drivers/sqlite/connection-sql-js.js +2 -2
  528. package/build/src/database/drivers/sqlite/foreign-key.d.ts +5 -4
  529. package/build/src/database/drivers/sqlite/foreign-key.d.ts.map +1 -1
  530. package/build/src/database/drivers/sqlite/foreign-key.js +2 -2
  531. package/build/src/database/drivers/sqlite/index.d.ts +53 -3
  532. package/build/src/database/drivers/sqlite/index.d.ts.map +1 -1
  533. package/build/src/database/drivers/sqlite/index.js +2 -2
  534. package/build/src/database/drivers/sqlite/index.native.d.ts +13 -5
  535. package/build/src/database/drivers/sqlite/index.native.d.ts.map +1 -1
  536. package/build/src/database/drivers/sqlite/index.native.js +3 -3
  537. package/build/src/database/drivers/sqlite/index.web.d.ts +48 -14
  538. package/build/src/database/drivers/sqlite/index.web.d.ts.map +1 -1
  539. package/build/src/database/drivers/sqlite/index.web.js +3 -3
  540. package/build/src/database/drivers/sqlite/options.d.ts +1 -1
  541. package/build/src/database/drivers/sqlite/options.d.ts.map +1 -1
  542. package/build/src/database/drivers/sqlite/query-parser.d.ts +1 -1
  543. package/build/src/database/drivers/sqlite/query-parser.d.ts.map +1 -1
  544. package/build/src/database/drivers/sqlite/query.d.ts +2 -2
  545. package/build/src/database/drivers/sqlite/query.d.ts.map +1 -1
  546. package/build/src/database/drivers/sqlite/query.js +3 -3
  547. package/build/src/database/drivers/sqlite/query.native.d.ts +4 -4
  548. package/build/src/database/drivers/sqlite/query.native.d.ts.map +1 -1
  549. package/build/src/database/drivers/sqlite/query.native.js +3 -3
  550. package/build/src/database/drivers/sqlite/query.web.d.ts +2 -2
  551. package/build/src/database/drivers/sqlite/query.web.d.ts.map +1 -1
  552. package/build/src/database/drivers/sqlite/query.web.js +3 -3
  553. package/build/src/database/drivers/sqlite/sql/alter-table.d.ts +19 -4
  554. package/build/src/database/drivers/sqlite/sql/alter-table.d.ts.map +1 -1
  555. package/build/src/database/drivers/sqlite/sql/create-index.d.ts +1 -1
  556. package/build/src/database/drivers/sqlite/sql/create-index.d.ts.map +1 -1
  557. package/build/src/database/drivers/sqlite/sql/create-table.d.ts +1 -1
  558. package/build/src/database/drivers/sqlite/sql/create-table.d.ts.map +1 -1
  559. package/build/src/database/drivers/sqlite/sql/delete.d.ts +1 -1
  560. package/build/src/database/drivers/sqlite/sql/delete.d.ts.map +1 -1
  561. package/build/src/database/drivers/sqlite/sql/drop-table.d.ts +1 -1
  562. package/build/src/database/drivers/sqlite/sql/drop-table.d.ts.map +1 -1
  563. package/build/src/database/drivers/sqlite/sql/insert.d.ts +1 -1
  564. package/build/src/database/drivers/sqlite/sql/insert.d.ts.map +1 -1
  565. package/build/src/database/drivers/sqlite/sql/remove-index.d.ts +1 -1
  566. package/build/src/database/drivers/sqlite/sql/remove-index.d.ts.map +1 -1
  567. package/build/src/database/drivers/sqlite/sql/update.d.ts +1 -1
  568. package/build/src/database/drivers/sqlite/sql/update.d.ts.map +1 -1
  569. package/build/src/database/drivers/sqlite/sql/upsert.d.ts +1 -1
  570. package/build/src/database/drivers/sqlite/sql/upsert.d.ts.map +1 -1
  571. package/build/src/database/drivers/sqlite/structure-sql.d.ts +1 -1
  572. package/build/src/database/drivers/sqlite/structure-sql.d.ts.map +1 -1
  573. package/build/src/database/drivers/sqlite/table-rebuilder.d.ts +5 -5
  574. package/build/src/database/drivers/sqlite/table-rebuilder.d.ts.map +1 -1
  575. package/build/src/database/drivers/sqlite/table-rebuilder.js +2 -2
  576. package/build/src/database/drivers/sqlite/table.d.ts +15 -5
  577. package/build/src/database/drivers/sqlite/table.d.ts.map +1 -1
  578. package/build/src/database/drivers/sqlite/web-persistence.d.ts +28 -34
  579. package/build/src/database/drivers/sqlite/web-persistence.d.ts.map +1 -1
  580. package/build/src/database/drivers/structure-sql/utils.d.ts +2 -2
  581. package/build/src/database/drivers/structure-sql/utils.d.ts.map +1 -1
  582. package/build/src/database/handler.d.ts.map +1 -1
  583. package/build/src/database/initializer-from-require-context.d.ts +18 -16
  584. package/build/src/database/initializer-from-require-context.d.ts.map +1 -1
  585. package/build/src/database/live-query.d.ts +13 -24
  586. package/build/src/database/live-query.d.ts.map +1 -1
  587. package/build/src/database/migration/index.d.ts +146 -169
  588. package/build/src/database/migration/index.d.ts.map +1 -1
  589. package/build/src/database/migration/index.js +3 -3
  590. package/build/src/database/migrations-ledger.d.ts.map +1 -1
  591. package/build/src/database/migrator/files-finder.d.ts +1 -1
  592. package/build/src/database/migrator/files-finder.d.ts.map +1 -1
  593. package/build/src/database/migrator/types.d.ts +26 -2
  594. package/build/src/database/migrator/types.d.ts.map +1 -1
  595. package/build/src/database/migrator/types.js +24 -1
  596. package/build/src/database/migrator.d.ts +10 -10
  597. package/build/src/database/migrator.d.ts.map +1 -1
  598. package/build/src/database/operation-connection.d.ts +3 -3
  599. package/build/src/database/operation-connection.d.ts.map +1 -1
  600. package/build/src/database/operation-lease.d.ts +4 -4
  601. package/build/src/database/operation-lease.d.ts.map +1 -1
  602. package/build/src/database/operation.d.ts +38 -7
  603. package/build/src/database/operation.d.ts.map +1 -1
  604. package/build/src/database/operation.js +55 -8
  605. package/build/src/database/pool/async-tracked-multi-connection.d.ts +174 -79
  606. package/build/src/database/pool/async-tracked-multi-connection.d.ts.map +1 -1
  607. package/build/src/database/pool/async-tracked-multi-connection.js +70 -25
  608. package/build/src/database/pool/base-methods-forward.d.ts.map +1 -1
  609. package/build/src/database/pool/base-methods-forward.js +3 -3
  610. package/build/src/database/pool/base.d.ts +93 -71
  611. package/build/src/database/pool/base.d.ts.map +1 -1
  612. package/build/src/database/pool/base.js +47 -17
  613. package/build/src/database/pool/single-multi-use.d.ts +243 -10
  614. package/build/src/database/pool/single-multi-use.d.ts.map +1 -1
  615. package/build/src/database/pool/single-multi-use.js +467 -103
  616. package/build/src/database/query/alter-table-base.d.ts +8 -3
  617. package/build/src/database/query/alter-table-base.d.ts.map +1 -1
  618. package/build/src/database/query/base.d.ts +3 -3
  619. package/build/src/database/query/base.d.ts.map +1 -1
  620. package/build/src/database/query/create-database-base.d.ts +28 -22
  621. package/build/src/database/query/create-database-base.d.ts.map +1 -1
  622. package/build/src/database/query/create-index-base.d.ts +32 -30
  623. package/build/src/database/query/create-index-base.d.ts.map +1 -1
  624. package/build/src/database/query/create-table-base.d.ts +7 -7
  625. package/build/src/database/query/create-table-base.d.ts.map +1 -1
  626. package/build/src/database/query/delete-base.d.ts +5 -5
  627. package/build/src/database/query/delete-base.d.ts.map +1 -1
  628. package/build/src/database/query/delete-base.js +2 -2
  629. package/build/src/database/query/drop-database-base.d.ts +22 -18
  630. package/build/src/database/query/drop-database-base.d.ts.map +1 -1
  631. package/build/src/database/query/drop-table-base.d.ts +11 -6
  632. package/build/src/database/query/drop-table-base.d.ts.map +1 -1
  633. package/build/src/database/query/from-base.d.ts.map +1 -1
  634. package/build/src/database/query/from-plain.d.ts +3 -2
  635. package/build/src/database/query/from-plain.d.ts.map +1 -1
  636. package/build/src/database/query/from-table.d.ts +3 -2
  637. package/build/src/database/query/from-table.d.ts.map +1 -1
  638. package/build/src/database/query/index.d.ts +92 -107
  639. package/build/src/database/query/index.d.ts.map +1 -1
  640. package/build/src/database/query/index.js +4 -4
  641. package/build/src/database/query/insert-base.d.ts +18 -18
  642. package/build/src/database/query/insert-base.d.ts.map +1 -1
  643. package/build/src/database/query/insert-base.js +5 -5
  644. package/build/src/database/query/join-base.d.ts +1 -1
  645. package/build/src/database/query/join-base.d.ts.map +1 -1
  646. package/build/src/database/query/join-object.d.ts +9 -15
  647. package/build/src/database/query/join-object.d.ts.map +1 -1
  648. package/build/src/database/query/join-plain.d.ts +2 -2
  649. package/build/src/database/query/join-plain.d.ts.map +1 -1
  650. package/build/src/database/query/join-tracker.d.ts +3 -3
  651. package/build/src/database/query/join-tracker.d.ts.map +1 -1
  652. package/build/src/database/query/model-class-query.d.ts +39 -36
  653. package/build/src/database/query/model-class-query.d.ts.map +1 -1
  654. package/build/src/database/query/model-class-query.js +40 -40
  655. package/build/src/database/query/order-base.d.ts +1 -1
  656. package/build/src/database/query/order-base.d.ts.map +1 -1
  657. package/build/src/database/query/order-column.d.ts +19 -22
  658. package/build/src/database/query/order-column.d.ts.map +1 -1
  659. package/build/src/database/query/order-plain.d.ts +3 -3
  660. package/build/src/database/query/order-plain.d.ts.map +1 -1
  661. package/build/src/database/query/preloader/belongs-to.d.ts +5 -5
  662. package/build/src/database/query/preloader/belongs-to.d.ts.map +1 -1
  663. package/build/src/database/query/preloader/belongs-to.js +3 -3
  664. package/build/src/database/query/preloader/ensure-model-class-initialized.d.ts +2 -1
  665. package/build/src/database/query/preloader/ensure-model-class-initialized.d.ts.map +1 -1
  666. package/build/src/database/query/preloader/ensure-model-class-initialized.js +4 -3
  667. package/build/src/database/query/preloader/has-many.d.ts +6 -6
  668. package/build/src/database/query/preloader/has-many.d.ts.map +1 -1
  669. package/build/src/database/query/preloader/has-many.js +4 -4
  670. package/build/src/database/query/preloader/has-one.d.ts +5 -5
  671. package/build/src/database/query/preloader/has-one.d.ts.map +1 -1
  672. package/build/src/database/query/preloader/has-one.js +2 -2
  673. package/build/src/database/query/preloader/query-for-model.d.ts.map +1 -1
  674. package/build/src/database/query/preloader/selection.d.ts +6 -6
  675. package/build/src/database/query/preloader/selection.d.ts.map +1 -1
  676. package/build/src/database/query/preloader.d.ts +8 -8
  677. package/build/src/database/query/preloader.d.ts.map +1 -1
  678. package/build/src/database/query/preloader.js +9 -3
  679. package/build/src/database/query/query-data.d.ts +43 -55
  680. package/build/src/database/query/query-data.d.ts.map +1 -1
  681. package/build/src/database/query/query-data.js +8 -8
  682. package/build/src/database/query/remove-index-base.d.ts +21 -19
  683. package/build/src/database/query/remove-index-base.d.ts.map +1 -1
  684. package/build/src/database/query/select-base.d.ts +1 -1
  685. package/build/src/database/query/select-base.d.ts.map +1 -1
  686. package/build/src/database/query/select-plain.d.ts +3 -2
  687. package/build/src/database/query/select-plain.d.ts.map +1 -1
  688. package/build/src/database/query/select-table-and-column.d.ts +4 -3
  689. package/build/src/database/query/select-table-and-column.d.ts.map +1 -1
  690. package/build/src/database/query/update-base.d.ts +10 -10
  691. package/build/src/database/query/update-base.d.ts.map +1 -1
  692. package/build/src/database/query/update-base.js +4 -4
  693. package/build/src/database/query/upsert-base.d.ts +9 -9
  694. package/build/src/database/query/upsert-base.d.ts.map +1 -1
  695. package/build/src/database/query/upsert-base.js +3 -3
  696. package/build/src/database/query/where-base.d.ts +1 -1
  697. package/build/src/database/query/where-base.d.ts.map +1 -1
  698. package/build/src/database/query/where-combinator.d.ts +9 -4
  699. package/build/src/database/query/where-combinator.d.ts.map +1 -1
  700. package/build/src/database/query/where-hash.d.ts +11 -9
  701. package/build/src/database/query/where-hash.d.ts.map +1 -1
  702. package/build/src/database/query/where-model-class-hash.d.ts +28 -26
  703. package/build/src/database/query/where-model-class-hash.d.ts.map +1 -1
  704. package/build/src/database/query/where-model-class-hash.js +14 -14
  705. package/build/src/database/query/where-not.d.ts +8 -3
  706. package/build/src/database/query/where-not.d.ts.map +1 -1
  707. package/build/src/database/query/where-plain.d.ts +4 -3
  708. package/build/src/database/query/where-plain.d.ts.map +1 -1
  709. package/build/src/database/query/with-count.d.ts +22 -28
  710. package/build/src/database/query/with-count.d.ts.map +1 -1
  711. package/build/src/database/query/with-count.js +12 -12
  712. package/build/src/database/query-aborted-error.d.ts +5 -5
  713. package/build/src/database/query-aborted-error.d.ts.map +1 -1
  714. package/build/src/database/query-parser/base-query-parser.d.ts +3 -3
  715. package/build/src/database/query-parser/base-query-parser.d.ts.map +1 -1
  716. package/build/src/database/query-parser/from-parser.d.ts +2 -2
  717. package/build/src/database/query-parser/from-parser.d.ts.map +1 -1
  718. package/build/src/database/query-parser/group-parser.d.ts +2 -2
  719. package/build/src/database/query-parser/group-parser.d.ts.map +1 -1
  720. package/build/src/database/query-parser/joins-parser.d.ts +3 -3
  721. package/build/src/database/query-parser/joins-parser.d.ts.map +1 -1
  722. package/build/src/database/query-parser/limit-parser.d.ts +2 -2
  723. package/build/src/database/query-parser/limit-parser.d.ts.map +1 -1
  724. package/build/src/database/query-parser/options.d.ts +31 -34
  725. package/build/src/database/query-parser/options.d.ts.map +1 -1
  726. package/build/src/database/query-parser/options.js +3 -3
  727. package/build/src/database/query-parser/order-parser.d.ts +2 -2
  728. package/build/src/database/query-parser/order-parser.d.ts.map +1 -1
  729. package/build/src/database/query-parser/select-parser.d.ts +2 -2
  730. package/build/src/database/query-parser/select-parser.d.ts.map +1 -1
  731. package/build/src/database/query-parser/select-parser.js +2 -2
  732. package/build/src/database/query-parser/where-parser.d.ts +2 -2
  733. package/build/src/database/query-parser/where-parser.d.ts.map +1 -1
  734. package/build/src/database/record/acts-as-list.d.ts.map +1 -1
  735. package/build/src/database/record/acts-as-list.js +3 -3
  736. package/build/src/database/record/attachments/attachment-record.d.ts +7 -3
  737. package/build/src/database/record/attachments/attachment-record.d.ts.map +1 -1
  738. package/build/src/database/record/attachments/download.d.ts +9 -9
  739. package/build/src/database/record/attachments/download.d.ts.map +1 -1
  740. package/build/src/database/record/attachments/handle.d.ts +12 -12
  741. package/build/src/database/record/attachments/handle.d.ts.map +1 -1
  742. package/build/src/database/record/attachments/handle.js +7 -7
  743. package/build/src/database/record/attachments/normalize-input.d.ts +16 -22
  744. package/build/src/database/record/attachments/normalize-input.d.ts.map +1 -1
  745. package/build/src/database/record/attachments/normalize-input.js +12 -12
  746. package/build/src/database/record/attachments/storage-drivers/filesystem.d.ts +4 -4
  747. package/build/src/database/record/attachments/storage-drivers/filesystem.d.ts.map +1 -1
  748. package/build/src/database/record/attachments/storage-drivers/filesystem.js +2 -2
  749. package/build/src/database/record/attachments/storage-drivers/native.d.ts +12 -12
  750. package/build/src/database/record/attachments/storage-drivers/native.d.ts.map +1 -1
  751. package/build/src/database/record/attachments/storage-drivers/native.js +6 -6
  752. package/build/src/database/record/attachments/storage-drivers/s3.d.ts +17 -17
  753. package/build/src/database/record/attachments/storage-drivers/s3.d.ts.map +1 -1
  754. package/build/src/database/record/attachments/storage-drivers/s3.js +11 -11
  755. package/build/src/database/record/attachments/store.d.ts +38 -41
  756. package/build/src/database/record/attachments/store.d.ts.map +1 -1
  757. package/build/src/database/record/attachments/store.js +24 -21
  758. package/build/src/database/record/auditing.d.ts +67 -87
  759. package/build/src/database/record/auditing.d.ts.map +1 -1
  760. package/build/src/database/record/auditing.js +109 -30
  761. package/build/src/database/record/counter-cache-magnitude.d.ts +15 -35
  762. package/build/src/database/record/counter-cache-magnitude.d.ts.map +1 -1
  763. package/build/src/database/record/counter-cache-magnitude.js +12 -12
  764. package/build/src/database/record/index.d.ts +2390 -488
  765. package/build/src/database/record/index.d.ts.map +1 -1
  766. package/build/src/database/record/index.js +222 -172
  767. package/build/src/database/record/instance-relationships/base.d.ts +20 -23
  768. package/build/src/database/record/instance-relationships/base.d.ts.map +1 -1
  769. package/build/src/database/record/instance-relationships/base.js +5 -5
  770. package/build/src/database/record/instance-relationships/belongs-to.d.ts +9 -1
  771. package/build/src/database/record/instance-relationships/belongs-to.d.ts.map +1 -1
  772. package/build/src/database/record/instance-relationships/belongs-to.js +2 -2
  773. package/build/src/database/record/instance-relationships/has-many.d.ts +15 -3
  774. package/build/src/database/record/instance-relationships/has-many.d.ts.map +1 -1
  775. package/build/src/database/record/instance-relationships/has-many.js +4 -4
  776. package/build/src/database/record/instance-relationships/has-one.d.ts +19 -1
  777. package/build/src/database/record/instance-relationships/has-one.d.ts.map +1 -1
  778. package/build/src/database/record/instance-relationships/has-one.js +2 -2
  779. package/build/src/database/record/record-not-found-error.d.ts +1 -0
  780. package/build/src/database/record/record-not-found-error.d.ts.map +1 -1
  781. package/build/src/database/record/record-not-found-error.js +2 -1
  782. package/build/src/database/record/relationships/base.d.ts +83 -71
  783. package/build/src/database/record/relationships/base.d.ts.map +1 -1
  784. package/build/src/database/record/relationships/base.js +21 -1
  785. package/build/src/database/record/relationships/belongs-to.d.ts +11 -1
  786. package/build/src/database/record/relationships/belongs-to.d.ts.map +1 -1
  787. package/build/src/database/record/relationships/has-many.d.ts +11 -1
  788. package/build/src/database/record/relationships/has-many.d.ts.map +1 -1
  789. package/build/src/database/record/relationships/has-one.d.ts +11 -1
  790. package/build/src/database/record/relationships/has-one.d.ts.map +1 -1
  791. package/build/src/database/record/state-machine.d.ts +20 -29
  792. package/build/src/database/record/state-machine.d.ts.map +1 -1
  793. package/build/src/database/record/state-machine.js +7 -7
  794. package/build/src/database/record/user-module.d.ts +1 -1
  795. package/build/src/database/record/user-module.d.ts.map +1 -1
  796. package/build/src/database/record/validation-messages.d.ts +19 -22
  797. package/build/src/database/record/validation-messages.d.ts.map +1 -1
  798. package/build/src/database/record/validators/base.d.ts +4 -4
  799. package/build/src/database/record/validators/base.d.ts.map +1 -1
  800. package/build/src/database/record/validators/base.js +2 -2
  801. package/build/src/database/record/validators/format.d.ts +12 -1
  802. package/build/src/database/record/validators/format.d.ts.map +1 -1
  803. package/build/src/database/record/validators/length.d.ts +14 -1
  804. package/build/src/database/record/validators/length.d.ts.map +1 -1
  805. package/build/src/database/record/validators/presence.d.ts +11 -1
  806. package/build/src/database/record/validators/presence.d.ts.map +1 -1
  807. package/build/src/database/record/validators/uniqueness.d.ts +12 -1
  808. package/build/src/database/record/validators/uniqueness.d.ts.map +1 -1
  809. package/build/src/database/record-changes.d.ts +7 -18
  810. package/build/src/database/record-changes.d.ts.map +1 -1
  811. package/build/src/database/structure-sql-loader.d.ts +2 -2
  812. package/build/src/database/structure-sql-loader.d.ts.map +1 -1
  813. package/build/src/database/structure-sql-loader.js +4 -4
  814. package/build/src/database/table-data/index.d.ts +21 -24
  815. package/build/src/database/table-data/index.d.ts.map +1 -1
  816. package/build/src/database/table-data/table-column.d.ts +74 -80
  817. package/build/src/database/table-data/table-column.d.ts.map +1 -1
  818. package/build/src/database/table-data/table-column.js +4 -4
  819. package/build/src/database/table-data/table-foreign-key.d.ts +10 -10
  820. package/build/src/database/table-data/table-foreign-key.d.ts.map +1 -1
  821. package/build/src/database/table-data/table-index.d.ts +12 -15
  822. package/build/src/database/table-data/table-index.d.ts.map +1 -1
  823. package/build/src/database/table-data/table-reference.d.ts +2 -2
  824. package/build/src/database/table-data/table-reference.d.ts.map +1 -1
  825. package/build/src/database/tenants/data-copier.d.ts +7 -7
  826. package/build/src/database/tenants/data-copier.d.ts.map +1 -1
  827. package/build/src/database/tenants/schema-cloner.d.ts +3 -3
  828. package/build/src/database/tenants/schema-cloner.d.ts.map +1 -1
  829. package/build/src/database/tenants/tenant-table-plan.d.ts +20 -14
  830. package/build/src/database/tenants/tenant-table-plan.d.ts.map +1 -1
  831. package/build/src/database/tenants/tenant-table-plan.js +17 -1
  832. package/build/src/database/use-database.d.ts.map +1 -1
  833. package/build/src/database/use-live-query.d.ts +17 -29
  834. package/build/src/database/use-live-query.d.ts.map +1 -1
  835. package/build/src/database/use-live-query.js +4 -4
  836. package/build/src/environment-handlers/base.d.ts +112 -103
  837. package/build/src/environment-handlers/base.d.ts.map +1 -1
  838. package/build/src/environment-handlers/base.js +54 -38
  839. package/build/src/environment-handlers/browser.d.ts +63 -56
  840. package/build/src/environment-handlers/browser.d.ts.map +1 -1
  841. package/build/src/environment-handlers/browser.js +2 -2
  842. package/build/src/environment-handlers/node/attachment-path-source.d.ts +9 -9
  843. package/build/src/environment-handlers/node/attachment-path-source.d.ts.map +1 -1
  844. package/build/src/environment-handlers/node/cli/commands/background-jobs-main.d.ts +1 -1
  845. package/build/src/environment-handlers/node/cli/commands/background-jobs-main.d.ts.map +1 -1
  846. package/build/src/environment-handlers/node/cli/commands/background-jobs-runner.d.ts +1 -1
  847. package/build/src/environment-handlers/node/cli/commands/background-jobs-runner.d.ts.map +1 -1
  848. package/build/src/environment-handlers/node/cli/commands/background-jobs-worker.d.ts +1 -1
  849. package/build/src/environment-handlers/node/cli/commands/background-jobs-worker.d.ts.map +1 -1
  850. package/build/src/environment-handlers/node/cli/commands/beacon.d.ts +1 -1
  851. package/build/src/environment-handlers/node/cli/commands/beacon.d.ts.map +1 -1
  852. package/build/src/environment-handlers/node/cli/commands/cli-command-context.d.ts +7 -10
  853. package/build/src/environment-handlers/node/cli/commands/cli-command-context.d.ts.map +1 -1
  854. package/build/src/environment-handlers/node/cli/commands/console.d.ts +9 -7
  855. package/build/src/environment-handlers/node/cli/commands/console.d.ts.map +1 -1
  856. package/build/src/environment-handlers/node/cli/commands/console.js +5 -5
  857. package/build/src/environment-handlers/node/cli/commands/db/schema/dump.d.ts +1 -1
  858. package/build/src/environment-handlers/node/cli/commands/db/schema/dump.d.ts.map +1 -1
  859. package/build/src/environment-handlers/node/cli/commands/db/schema/load.d.ts +1 -1
  860. package/build/src/environment-handlers/node/cli/commands/db/schema/load.d.ts.map +1 -1
  861. package/build/src/environment-handlers/node/cli/commands/db/seed.d.ts +7 -5
  862. package/build/src/environment-handlers/node/cli/commands/db/seed.d.ts.map +1 -1
  863. package/build/src/environment-handlers/node/cli/commands/db/seed.js +3 -3
  864. package/build/src/environment-handlers/node/cli/commands/destroy/migration.d.ts +4 -7
  865. package/build/src/environment-handlers/node/cli/commands/destroy/migration.d.ts.map +1 -1
  866. package/build/src/environment-handlers/node/cli/commands/generate/base-models.d.ts +1 -1
  867. package/build/src/environment-handlers/node/cli/commands/generate/base-models.d.ts.map +1 -1
  868. package/build/src/environment-handlers/node/cli/commands/generate/base-models.js +2 -2
  869. package/build/src/environment-handlers/node/cli/commands/generate/frontend-models.d.ts +93 -108
  870. package/build/src/environment-handlers/node/cli/commands/generate/frontend-models.d.ts.map +1 -1
  871. package/build/src/environment-handlers/node/cli/commands/generate/generated-file-banner.d.ts.map +1 -1
  872. package/build/src/environment-handlers/node/cli/commands/generate/migration.d.ts +9 -12
  873. package/build/src/environment-handlers/node/cli/commands/generate/migration.d.ts.map +1 -1
  874. package/build/src/environment-handlers/node/cli/commands/generate/model.d.ts +8 -11
  875. package/build/src/environment-handlers/node/cli/commands/generate/model.d.ts.map +1 -1
  876. package/build/src/environment-handlers/node/cli/commands/init.d.ts +7 -9
  877. package/build/src/environment-handlers/node/cli/commands/init.d.ts.map +1 -1
  878. package/build/src/environment-handlers/node/cli/commands/lint/relationships.d.ts +7 -7
  879. package/build/src/environment-handlers/node/cli/commands/lint/relationships.d.ts.map +1 -1
  880. package/build/src/environment-handlers/node/cli/commands/routes.d.ts +1 -1
  881. package/build/src/environment-handlers/node/cli/commands/routes.d.ts.map +1 -1
  882. package/build/src/environment-handlers/node/cli/commands/run-script.d.ts +7 -5
  883. package/build/src/environment-handlers/node/cli/commands/run-script.d.ts.map +1 -1
  884. package/build/src/environment-handlers/node/cli/commands/run-script.js +3 -3
  885. package/build/src/environment-handlers/node/cli/commands/runner.d.ts +9 -7
  886. package/build/src/environment-handlers/node/cli/commands/runner.d.ts.map +1 -1
  887. package/build/src/environment-handlers/node/cli/commands/runner.js +3 -3
  888. package/build/src/environment-handlers/node/cli/commands/server.d.ts +24 -30
  889. package/build/src/environment-handlers/node/cli/commands/server.d.ts.map +1 -1
  890. package/build/src/environment-handlers/node/cli/commands/server.js +2 -2
  891. package/build/src/environment-handlers/node/cli/commands/test.d.ts +5 -5
  892. package/build/src/environment-handlers/node/cli/commands/test.d.ts.map +1 -1
  893. package/build/src/environment-handlers/node/source-peer-package.d.ts +5 -7
  894. package/build/src/environment-handlers/node/source-peer-package.d.ts.map +1 -1
  895. package/build/src/environment-handlers/node/source-peer-package.js +1 -1
  896. package/build/src/environment-handlers/node.d.ts +362 -13
  897. package/build/src/environment-handlers/node.d.ts.map +1 -1
  898. package/build/src/environment-handlers/node.js +37 -37
  899. package/build/src/error-logger.d.ts +3 -3
  900. package/build/src/error-logger.d.ts.map +1 -1
  901. package/build/src/error-logger.js +3 -3
  902. package/build/src/error-reporting/request-details.d.ts +1 -1
  903. package/build/src/error-reporting/request-details.d.ts.map +1 -1
  904. package/build/src/error-reporting/request-details.js +33 -33
  905. package/build/src/frontend-model-controller.d.ts +216 -230
  906. package/build/src/frontend-model-controller.d.ts.map +1 -1
  907. package/build/src/frontend-model-controller.js +217 -211
  908. package/build/src/frontend-model-resource/base-resource.d.ts +315 -365
  909. package/build/src/frontend-model-resource/base-resource.d.ts.map +1 -1
  910. package/build/src/frontend-model-resource/base-resource.js +45 -45
  911. package/build/src/frontend-model-resource/velocious-attachment-resource.d.ts +11 -5
  912. package/build/src/frontend-model-resource/velocious-attachment-resource.d.ts.map +1 -1
  913. package/build/src/frontend-model-resource/velocious-attachment-resource.js +2 -2
  914. package/build/src/frontend-models/base.d.ts +632 -726
  915. package/build/src/frontend-models/base.d.ts.map +1 -1
  916. package/build/src/frontend-models/base.js +147 -143
  917. package/build/src/frontend-models/built-in-resources.d.ts +2 -2
  918. package/build/src/frontend-models/built-in-resources.d.ts.map +1 -1
  919. package/build/src/frontend-models/clear-pending-debounced-callback.d.ts +2 -2
  920. package/build/src/frontend-models/clear-pending-debounced-callback.d.ts.map +1 -1
  921. package/build/src/frontend-models/clear-pending-debounced-callback.js +3 -3
  922. package/build/src/frontend-models/event-hook-models.d.ts +3 -6
  923. package/build/src/frontend-models/event-hook-models.d.ts.map +1 -1
  924. package/build/src/frontend-models/model-registry.d.ts +5 -5
  925. package/build/src/frontend-models/model-registry.d.ts.map +1 -1
  926. package/build/src/frontend-models/model-registry.js +5 -5
  927. package/build/src/frontend-models/outgoing-event-buffer.d.ts +20 -17
  928. package/build/src/frontend-models/outgoing-event-buffer.d.ts.map +1 -1
  929. package/build/src/frontend-models/outgoing-event-buffer.js +2 -2
  930. package/build/src/frontend-models/preloader.d.ts.map +1 -1
  931. package/build/src/frontend-models/preloader.js +2 -2
  932. package/build/src/frontend-models/query.d.ts +286 -331
  933. package/build/src/frontend-models/query.d.ts.map +1 -1
  934. package/build/src/frontend-models/query.js +61 -61
  935. package/build/src/frontend-models/resource-config-validation.d.ts +2 -2
  936. package/build/src/frontend-models/resource-config-validation.d.ts.map +1 -1
  937. package/build/src/frontend-models/resource-definition.d.ts +30 -33
  938. package/build/src/frontend-models/resource-definition.d.ts.map +1 -1
  939. package/build/src/frontend-models/resource-definition.js +10 -10
  940. package/build/src/frontend-models/transport-deadline.d.ts.map +1 -1
  941. package/build/src/frontend-models/transport-serialization.d.ts +26 -32
  942. package/build/src/frontend-models/transport-serialization.d.ts.map +1 -1
  943. package/build/src/frontend-models/transport-serialization.js +28 -28
  944. package/build/src/frontend-models/use-created-event.d.ts +4 -4
  945. package/build/src/frontend-models/use-created-event.d.ts.map +1 -1
  946. package/build/src/frontend-models/use-destroyed-event.d.ts +8 -29
  947. package/build/src/frontend-models/use-destroyed-event.d.ts.map +1 -1
  948. package/build/src/frontend-models/use-model-class-event.d.ts +9 -33
  949. package/build/src/frontend-models/use-model-class-event.d.ts.map +1 -1
  950. package/build/src/frontend-models/use-updated-event.d.ts +8 -29
  951. package/build/src/frontend-models/use-updated-event.d.ts.map +1 -1
  952. package/build/src/frontend-models/websocket-channel.d.ts +30 -34
  953. package/build/src/frontend-models/websocket-channel.d.ts.map +1 -1
  954. package/build/src/frontend-models/websocket-channel.js +5 -5
  955. package/build/src/frontend-models/websocket-publishers.d.ts +4 -4
  956. package/build/src/frontend-models/websocket-publishers.d.ts.map +1 -1
  957. package/build/src/frontend-models/websocket-publishers.js +2 -2
  958. package/build/src/http-client/header.d.ts +2 -2
  959. package/build/src/http-client/header.d.ts.map +1 -1
  960. package/build/src/http-client/index.d.ts +23 -23
  961. package/build/src/http-client/index.d.ts.map +1 -1
  962. package/build/src/http-client/request.d.ts +9 -9
  963. package/build/src/http-client/request.d.ts.map +1 -1
  964. package/build/src/http-client/request.js +2 -2
  965. package/build/src/http-client/response.d.ts +12 -12
  966. package/build/src/http-client/response.d.ts.map +1 -1
  967. package/build/src/http-client/response.js +2 -2
  968. package/build/src/http-client/websocket-client.d.ts +20 -4
  969. package/build/src/http-client/websocket-client.d.ts.map +1 -1
  970. package/build/src/http-server/client/index.d.ts +26 -26
  971. package/build/src/http-server/client/index.d.ts.map +1 -1
  972. package/build/src/http-server/client/index.js +5 -5
  973. package/build/src/http-server/client/params-to-object.d.ts +11 -11
  974. package/build/src/http-server/client/params-to-object.d.ts.map +1 -1
  975. package/build/src/http-server/client/params-to-object.js +17 -17
  976. package/build/src/http-server/client/request-buffer/form-data-part.d.ts +9 -9
  977. package/build/src/http-server/client/request-buffer/form-data-part.d.ts.map +1 -1
  978. package/build/src/http-server/client/request-buffer/header.d.ts +3 -3
  979. package/build/src/http-server/client/request-buffer/header.d.ts.map +1 -1
  980. package/build/src/http-server/client/request-buffer/index.d.ts +28 -30
  981. package/build/src/http-server/client/request-buffer/index.d.ts.map +1 -1
  982. package/build/src/http-server/client/request-buffer/index.js +5 -3
  983. package/build/src/http-server/client/request-parser.d.ts +11 -11
  984. package/build/src/http-server/client/request-parser.d.ts.map +1 -1
  985. package/build/src/http-server/client/request-parser.js +3 -3
  986. package/build/src/http-server/client/request-runner.d.ts +11 -11
  987. package/build/src/http-server/client/request-runner.d.ts.map +1 -1
  988. package/build/src/http-server/client/request-runner.js +3 -3
  989. package/build/src/http-server/client/request-timing.d.ts +5 -11
  990. package/build/src/http-server/client/request-timing.d.ts.map +1 -1
  991. package/build/src/http-server/client/request.d.ts +10 -10
  992. package/build/src/http-server/client/request.d.ts.map +1 -1
  993. package/build/src/http-server/client/request.js +3 -3
  994. package/build/src/http-server/client/response-compression.d.ts +5 -5
  995. package/build/src/http-server/client/response-compression.d.ts.map +1 -1
  996. package/build/src/http-server/client/response.d.ts +13 -13
  997. package/build/src/http-server/client/response.d.ts.map +1 -1
  998. package/build/src/http-server/client/uploaded-file/memory-uploaded-file.d.ts +8 -2
  999. package/build/src/http-server/client/uploaded-file/memory-uploaded-file.d.ts.map +1 -1
  1000. package/build/src/http-server/client/uploaded-file/temporary-uploaded-file.d.ts +8 -2
  1001. package/build/src/http-server/client/uploaded-file/temporary-uploaded-file.d.ts.map +1 -1
  1002. package/build/src/http-server/client/uploaded-file/uploaded-file.d.ts +4 -4
  1003. package/build/src/http-server/client/uploaded-file/uploaded-file.d.ts.map +1 -1
  1004. package/build/src/http-server/client/websocket-request.d.ts +26 -26
  1005. package/build/src/http-server/client/websocket-request.d.ts.map +1 -1
  1006. package/build/src/http-server/client/websocket-request.js +7 -7
  1007. package/build/src/http-server/client/websocket-session.d.ts +105 -108
  1008. package/build/src/http-server/client/websocket-session.d.ts.map +1 -1
  1009. package/build/src/http-server/client/websocket-session.js +29 -29
  1010. package/build/src/http-server/client-delivery-queue.d.ts +30 -30
  1011. package/build/src/http-server/client-delivery-queue.d.ts.map +1 -1
  1012. package/build/src/http-server/cookie.d.ts +80 -108
  1013. package/build/src/http-server/cookie.d.ts.map +1 -1
  1014. package/build/src/http-server/cookie.js +3 -3
  1015. package/build/src/http-server/development-reloader.d.ts +24 -24
  1016. package/build/src/http-server/development-reloader.d.ts.map +1 -1
  1017. package/build/src/http-server/development-reloader.js +2 -2
  1018. package/build/src/http-server/index.d.ts +66 -72
  1019. package/build/src/http-server/index.d.ts.map +1 -1
  1020. package/build/src/http-server/index.js +6 -6
  1021. package/build/src/http-server/remote-address.d.ts.map +1 -1
  1022. package/build/src/http-server/remote-address.js +2 -2
  1023. package/build/src/http-server/server-client.d.ts +9 -9
  1024. package/build/src/http-server/server-client.d.ts.map +1 -1
  1025. package/build/src/http-server/server-lock.d.ts +11 -11
  1026. package/build/src/http-server/server-lock.d.ts.map +1 -1
  1027. package/build/src/http-server/server-lock.js +5 -5
  1028. package/build/src/http-server/websocket-channel-subscribers.d.ts +11 -10
  1029. package/build/src/http-server/websocket-channel-subscribers.d.ts.map +1 -1
  1030. package/build/src/http-server/websocket-channel-subscribers.js +6 -6
  1031. package/build/src/http-server/websocket-channel.d.ts +8 -14
  1032. package/build/src/http-server/websocket-channel.d.ts.map +1 -1
  1033. package/build/src/http-server/websocket-channel.js +2 -2
  1034. package/build/src/http-server/websocket-connection.d.ts +10 -10
  1035. package/build/src/http-server/websocket-connection.d.ts.map +1 -1
  1036. package/build/src/http-server/websocket-connection.js +4 -4
  1037. package/build/src/http-server/websocket-event-log-store.d.ts +58 -64
  1038. package/build/src/http-server/websocket-event-log-store.d.ts.map +1 -1
  1039. package/build/src/http-server/websocket-event-log-store.js +10 -10
  1040. package/build/src/http-server/websocket-events-host.d.ts +17 -16
  1041. package/build/src/http-server/websocket-events-host.d.ts.map +1 -1
  1042. package/build/src/http-server/websocket-events-host.js +8 -8
  1043. package/build/src/http-server/websocket-events.d.ts +9 -9
  1044. package/build/src/http-server/websocket-events.d.ts.map +1 -1
  1045. package/build/src/http-server/websocket-events.js +5 -5
  1046. package/build/src/http-server/worker-handler/channel-subscriber-dispatch.d.ts +2 -2
  1047. package/build/src/http-server/worker-handler/channel-subscriber-dispatch.d.ts.map +1 -1
  1048. package/build/src/http-server/worker-handler/channel-subscriber-dispatch.js +2 -2
  1049. package/build/src/http-server/worker-handler/in-process.d.ts +22 -22
  1050. package/build/src/http-server/worker-handler/in-process.d.ts.map +1 -1
  1051. package/build/src/http-server/worker-handler/in-process.js +6 -6
  1052. package/build/src/http-server/worker-handler/index.d.ts +50 -50
  1053. package/build/src/http-server/worker-handler/index.d.ts.map +1 -1
  1054. package/build/src/http-server/worker-handler/index.js +11 -11
  1055. package/build/src/http-server/worker-handler/worker-thread.d.ts +61 -61
  1056. package/build/src/http-server/worker-handler/worker-thread.d.ts.map +1 -1
  1057. package/build/src/http-server/worker-handler/worker-thread.js +9 -9
  1058. package/build/src/initializer.d.ts +2 -2
  1059. package/build/src/initializer.d.ts.map +1 -1
  1060. package/build/src/jobs/mail-delivery.d.ts +7 -2
  1061. package/build/src/jobs/mail-delivery.d.ts.map +1 -1
  1062. package/build/src/jobs/prune-terminal-background-jobs.d.ts +15 -2
  1063. package/build/src/jobs/prune-terminal-background-jobs.d.ts.map +1 -1
  1064. package/build/src/jobs/prune-terminal-background-jobs.js +1 -1
  1065. package/build/src/logger/base-logger.d.ts.map +1 -1
  1066. package/build/src/logger/base-logger.js +2 -2
  1067. package/build/src/logger/console-logger.d.ts +3 -3
  1068. package/build/src/logger/console-logger.d.ts.map +1 -1
  1069. package/build/src/logger/file-logger.d.ts +4 -4
  1070. package/build/src/logger/file-logger.d.ts.map +1 -1
  1071. package/build/src/logger/outputs/array-output.d.ts +9 -12
  1072. package/build/src/logger/outputs/array-output.d.ts.map +1 -1
  1073. package/build/src/logger/outputs/console-output.d.ts +1 -4
  1074. package/build/src/logger/outputs/console-output.d.ts.map +1 -1
  1075. package/build/src/logger/outputs/file-output.d.ts +13 -16
  1076. package/build/src/logger/outputs/file-output.d.ts.map +1 -1
  1077. package/build/src/logger/outputs/stdout-output.d.ts +1 -4
  1078. package/build/src/logger/outputs/stdout-output.d.ts.map +1 -1
  1079. package/build/src/logger.d.ts +30 -29
  1080. package/build/src/logger.d.ts.map +1 -1
  1081. package/build/src/logger.js +13 -13
  1082. package/build/src/mailer/backends/smtp.d.ts +8 -11
  1083. package/build/src/mailer/backends/smtp.d.ts.map +1 -1
  1084. package/build/src/mailer/backends/smtp.js +4 -4
  1085. package/build/src/mailer/base.d.ts +61 -61
  1086. package/build/src/mailer/base.d.ts.map +1 -1
  1087. package/build/src/mailer/base.js +15 -15
  1088. package/build/src/mailer/delivery.d.ts +16 -16
  1089. package/build/src/mailer/delivery.d.ts.map +1 -1
  1090. package/build/src/mailer/delivery.js +4 -4
  1091. package/build/src/mailer/index.d.ts +8 -13
  1092. package/build/src/mailer/index.d.ts.map +1 -1
  1093. package/build/src/mailer/index.js +2 -2
  1094. package/build/src/mailer.d.ts +9 -7
  1095. package/build/src/mailer.d.ts.map +1 -1
  1096. package/build/src/mailer.js +2 -2
  1097. package/build/src/packages/velocious-package.d.ts +5 -5
  1098. package/build/src/packages/velocious-package.d.ts.map +1 -1
  1099. package/build/src/plugins/sqljs-wasm-route-controller.d.ts +1 -1
  1100. package/build/src/plugins/sqljs-wasm-route-controller.d.ts.map +1 -1
  1101. package/build/src/plugins/sqljs-wasm-route-controller.js +2 -2
  1102. package/build/src/plugins/sqljs-wasm-route.d.ts +14 -20
  1103. package/build/src/plugins/sqljs-wasm-route.d.ts.map +1 -1
  1104. package/build/src/plugins/sqljs-wasm-route.js +1 -1
  1105. package/build/src/record-payload-values.d.ts +14 -14
  1106. package/build/src/record-payload-values.d.ts.map +1 -1
  1107. package/build/src/record-payload-values.js +4 -4
  1108. package/build/src/routes/app-routes.d.ts.map +1 -1
  1109. package/build/src/routes/base-route.d.ts +11 -10
  1110. package/build/src/routes/base-route.d.ts.map +1 -1
  1111. package/build/src/routes/base-route.js +6 -6
  1112. package/build/src/routes/basic-route.d.ts +36 -3
  1113. package/build/src/routes/basic-route.d.ts.map +1 -1
  1114. package/build/src/routes/basic-route.js +5 -5
  1115. package/build/src/routes/built-in/api-manifest/controller.d.ts +1 -1
  1116. package/build/src/routes/built-in/api-manifest/controller.d.ts.map +1 -1
  1117. package/build/src/routes/built-in/debug/controller.d.ts +1 -1
  1118. package/build/src/routes/built-in/debug/controller.d.ts.map +1 -1
  1119. package/build/src/routes/built-in/errors/controller.d.ts +1 -1
  1120. package/build/src/routes/built-in/errors/controller.d.ts.map +1 -1
  1121. package/build/src/routes/get-route.d.ts +19 -4
  1122. package/build/src/routes/get-route.d.ts.map +1 -1
  1123. package/build/src/routes/get-route.js +3 -3
  1124. package/build/src/routes/hooks/frontend-model-command-route-hook.d.ts +1 -1
  1125. package/build/src/routes/hooks/frontend-model-command-route-hook.d.ts.map +1 -1
  1126. package/build/src/routes/hooks/frontend-model-command-route-hook.js +2 -2
  1127. package/build/src/routes/index.d.ts +5 -5
  1128. package/build/src/routes/index.d.ts.map +1 -1
  1129. package/build/src/routes/index.js +4 -4
  1130. package/build/src/routes/namespace-route.d.ts +19 -4
  1131. package/build/src/routes/namespace-route.d.ts.map +1 -1
  1132. package/build/src/routes/namespace-route.js +2 -2
  1133. package/build/src/routes/plugin-routes.d.ts +16 -19
  1134. package/build/src/routes/plugin-routes.d.ts.map +1 -1
  1135. package/build/src/routes/plugin-routes.js +2 -2
  1136. package/build/src/routes/post-route.d.ts +19 -4
  1137. package/build/src/routes/post-route.d.ts.map +1 -1
  1138. package/build/src/routes/post-route.js +3 -3
  1139. package/build/src/routes/resolver.d.ts +16 -16
  1140. package/build/src/routes/resolver.d.ts.map +1 -1
  1141. package/build/src/routes/resolver.js +6 -6
  1142. package/build/src/routes/resource-route.d.ts +23 -8
  1143. package/build/src/routes/resource-route.d.ts.map +1 -1
  1144. package/build/src/routes/resource-route.js +2 -2
  1145. package/build/src/routes/root-route.d.ts +1 -1
  1146. package/build/src/routes/root-route.d.ts.map +1 -1
  1147. package/build/src/sync/conflict-strategy.d.ts +50 -35
  1148. package/build/src/sync/conflict-strategy.d.ts.map +1 -1
  1149. package/build/src/sync/conflict-strategy.js +2 -2
  1150. package/build/src/sync/device-identity.d.ts +109 -79
  1151. package/build/src/sync/device-identity.d.ts.map +1 -1
  1152. package/build/src/sync/local-mutation-log.d.ts +115 -92
  1153. package/build/src/sync/local-mutation-log.d.ts.map +1 -1
  1154. package/build/src/sync/offline-grant.d.ts +80 -63
  1155. package/build/src/sync/offline-grant.d.ts.map +1 -1
  1156. package/build/src/sync/peer-mutation-bundle.d.ts +33 -39
  1157. package/build/src/sync/peer-mutation-bundle.d.ts.map +1 -1
  1158. package/build/src/sync/query-scope.d.ts +3 -3
  1159. package/build/src/sync/query-scope.d.ts.map +1 -1
  1160. package/build/src/sync/query-scope.js +8 -8
  1161. package/build/src/sync/server-change-feed.d.ts +129 -129
  1162. package/build/src/sync/server-change-feed.d.ts.map +1 -1
  1163. package/build/src/sync/server-change-feed.js +14 -14
  1164. package/build/src/sync/server-sequence-allocator.d.ts +36 -36
  1165. package/build/src/sync/server-sequence-allocator.d.ts.map +1 -1
  1166. package/build/src/sync/server-sequence-allocator.js +6 -6
  1167. package/build/src/sync/signed-sync-envelope-replay-service.d.ts +60 -48
  1168. package/build/src/sync/signed-sync-envelope-replay-service.d.ts.map +1 -1
  1169. package/build/src/sync/signed-sync-envelope-replay-service.js +21 -21
  1170. package/build/src/sync/stable-json.d.ts +2 -2
  1171. package/build/src/sync/stable-json.d.ts.map +1 -1
  1172. package/build/src/sync/stable-json.js +5 -5
  1173. package/build/src/sync/sync-api-client-types.d.ts +98 -25
  1174. package/build/src/sync/sync-api-client-types.d.ts.map +1 -1
  1175. package/build/src/sync/sync-api-client-types.js +73 -1
  1176. package/build/src/sync/sync-api-client.d.ts +71 -71
  1177. package/build/src/sync/sync-api-client.d.ts.map +1 -1
  1178. package/build/src/sync/sync-api-client.js +30 -30
  1179. package/build/src/sync/sync-api-controller.d.ts +23 -23
  1180. package/build/src/sync/sync-api-controller.d.ts.map +1 -1
  1181. package/build/src/sync/sync-change-fanout.d.ts +32 -38
  1182. package/build/src/sync/sync-change-fanout.d.ts.map +1 -1
  1183. package/build/src/sync/sync-change-fanout.js +7 -7
  1184. package/build/src/sync/sync-channel-name.d.ts +1 -1
  1185. package/build/src/sync/sync-channel-name.d.ts.map +1 -1
  1186. package/build/src/sync/sync-client-registry.d.ts +4 -4
  1187. package/build/src/sync/sync-client-registry.d.ts.map +1 -1
  1188. package/build/src/sync/sync-client-registry.js +4 -4
  1189. package/build/src/sync/sync-client-types.d.ts +130 -82
  1190. package/build/src/sync/sync-client-types.d.ts.map +1 -1
  1191. package/build/src/sync/sync-client-types.js +89 -1
  1192. package/build/src/sync/sync-client.d.ts +76 -76
  1193. package/build/src/sync/sync-client.d.ts.map +1 -1
  1194. package/build/src/sync/sync-client.js +19 -19
  1195. package/build/src/sync/sync-envelope-replay-service.d.ts +266 -298
  1196. package/build/src/sync/sync-envelope-replay-service.d.ts.map +1 -1
  1197. package/build/src/sync/sync-envelope-replay-service.js +77 -77
  1198. package/build/src/sync/sync-model-change-feed-service.d.ts +23 -23
  1199. package/build/src/sync/sync-model-change-feed-service.d.ts.map +1 -1
  1200. package/build/src/sync/sync-model-change-feed-service.js +8 -8
  1201. package/build/src/sync/sync-publish-suppression.d.ts +5 -5
  1202. package/build/src/sync/sync-publish-suppression.d.ts.map +1 -1
  1203. package/build/src/sync/sync-publish-suppression.js +3 -3
  1204. package/build/src/sync/sync-publisher-types.d.ts +98 -55
  1205. package/build/src/sync/sync-publisher-types.d.ts.map +1 -1
  1206. package/build/src/sync/sync-publisher-types.js +75 -1
  1207. package/build/src/sync/sync-publisher.d.ts +43 -43
  1208. package/build/src/sync/sync-publisher.d.ts.map +1 -1
  1209. package/build/src/sync/sync-publisher.js +20 -20
  1210. package/build/src/sync/sync-realtime-bridge.d.ts +23 -23
  1211. package/build/src/sync/sync-realtime-bridge.d.ts.map +1 -1
  1212. package/build/src/sync/sync-realtime-bridge.js +9 -9
  1213. package/build/src/sync/sync-replay-upsert-applier.d.ts +70 -70
  1214. package/build/src/sync/sync-replay-upsert-applier.d.ts.map +1 -1
  1215. package/build/src/sync/sync-replay-upsert-applier.js +17 -17
  1216. package/build/src/sync/sync-resource-base.d.ts +52 -51
  1217. package/build/src/sync/sync-resource-base.d.ts.map +1 -1
  1218. package/build/src/sync/sync-resource-base.js +15 -15
  1219. package/build/src/sync/sync-scope-attributes.d.ts +2 -2
  1220. package/build/src/sync/sync-scope-attributes.d.ts.map +1 -1
  1221. package/build/src/sync/sync-scope-attributes.js +2 -2
  1222. package/build/src/sync/sync-scope-store.d.ts +36 -36
  1223. package/build/src/sync/sync-scope-store.d.ts.map +1 -1
  1224. package/build/src/sync/sync-scope-store.js +6 -6
  1225. package/build/src/sync/sync-websocket-channel.d.ts +11 -6
  1226. package/build/src/sync/sync-websocket-channel.d.ts.map +1 -1
  1227. package/build/src/sync/sync-websocket-channel.js +6 -6
  1228. package/build/src/tenants/default-tenant-database-provisioning.d.ts +4 -4
  1229. package/build/src/tenants/default-tenant-database-provisioning.d.ts.map +1 -1
  1230. package/build/src/tenants/default-tenant-database-provisioning.js +2 -2
  1231. package/build/src/tenants/tenant-aggregator.d.ts +81 -81
  1232. package/build/src/tenants/tenant-aggregator.d.ts.map +1 -1
  1233. package/build/src/tenants/tenant-aggregator.js +13 -13
  1234. package/build/src/tenants/tenant-handle.d.ts +64 -0
  1235. package/build/src/tenants/tenant-handle.d.ts.map +1 -0
  1236. package/build/src/tenants/tenant-handle.js +221 -0
  1237. package/build/src/tenants/tenant-iterator.d.ts +17 -17
  1238. package/build/src/tenants/tenant-iterator.d.ts.map +1 -1
  1239. package/build/src/tenants/tenant-iterator.js +7 -7
  1240. package/build/src/tenants/tenant-model-scope.d.ts +73 -0
  1241. package/build/src/tenants/tenant-model-scope.d.ts.map +1 -0
  1242. package/build/src/tenants/tenant-model-scope.js +115 -0
  1243. package/build/src/tenants/tenant.d.ts +16 -6
  1244. package/build/src/tenants/tenant.d.ts.map +1 -1
  1245. package/build/src/tenants/tenant.js +15 -3
  1246. package/build/src/testing/base-expect.d.ts.map +1 -1
  1247. package/build/src/testing/browser-frontend-model-event-hook-scenarios.d.ts +19 -31
  1248. package/build/src/testing/browser-frontend-model-event-hook-scenarios.d.ts.map +1 -1
  1249. package/build/src/testing/browser-test-app.js +6 -6
  1250. package/build/src/testing/expect-to-change.d.ts +9 -7
  1251. package/build/src/testing/expect-to-change.d.ts.map +1 -1
  1252. package/build/src/testing/expect-to-change.js +2 -2
  1253. package/build/src/testing/expect-utils.d.ts +30 -29
  1254. package/build/src/testing/expect-utils.d.ts.map +1 -1
  1255. package/build/src/testing/expect-utils.js +30 -30
  1256. package/build/src/testing/expect.d.ts +30 -30
  1257. package/build/src/testing/expect.d.ts.map +1 -1
  1258. package/build/src/testing/expect.js +19 -19
  1259. package/build/src/testing/factory/association-declaration.d.ts +16 -16
  1260. package/build/src/testing/factory/association-declaration.d.ts.map +1 -1
  1261. package/build/src/testing/factory/association-declaration.js +3 -3
  1262. package/build/src/testing/factory/declarations.d.ts +90 -115
  1263. package/build/src/testing/factory/declarations.d.ts.map +1 -1
  1264. package/build/src/testing/factory/declarations.js +6 -6
  1265. package/build/src/testing/factory/definition-builder.d.ts +72 -70
  1266. package/build/src/testing/factory/definition-builder.d.ts.map +1 -1
  1267. package/build/src/testing/factory/definition-builder.js +40 -40
  1268. package/build/src/testing/factory/errors.d.ts +30 -29
  1269. package/build/src/testing/factory/errors.d.ts.map +1 -1
  1270. package/build/src/testing/factory/evaluation-context.d.ts +29 -29
  1271. package/build/src/testing/factory/evaluation-context.d.ts.map +1 -1
  1272. package/build/src/testing/factory/evaluation-context.js +17 -17
  1273. package/build/src/testing/factory/events.d.ts +4 -5
  1274. package/build/src/testing/factory/events.d.ts.map +1 -1
  1275. package/build/src/testing/factory/factory-definition.d.ts +14 -14
  1276. package/build/src/testing/factory/factory-definition.d.ts.map +1 -1
  1277. package/build/src/testing/factory/factory-definition.js +3 -3
  1278. package/build/src/testing/factory/factory-registry.d.ts +56 -54
  1279. package/build/src/testing/factory/factory-registry.d.ts.map +1 -1
  1280. package/build/src/testing/factory/factory-registry.js +35 -35
  1281. package/build/src/testing/factory/factory-runner.d.ts +67 -73
  1282. package/build/src/testing/factory/factory-runner.d.ts.map +1 -1
  1283. package/build/src/testing/factory/factory-runner.js +9 -9
  1284. package/build/src/testing/factory/index.d.ts +7 -7
  1285. package/build/src/testing/factory/index.d.ts.map +1 -1
  1286. package/build/src/testing/factory/linter.d.ts +7 -7
  1287. package/build/src/testing/factory/linter.d.ts.map +1 -1
  1288. package/build/src/testing/factory/linter.js +3 -3
  1289. package/build/src/testing/factory/model-contract.d.ts +3 -3
  1290. package/build/src/testing/factory/model-contract.d.ts.map +1 -1
  1291. package/build/src/testing/factory/model-contract.js +4 -4
  1292. package/build/src/testing/factory/node/load-definitions.d.ts +2 -2
  1293. package/build/src/testing/factory/node/load-definitions.d.ts.map +1 -1
  1294. package/build/src/testing/factory/sequence.d.ts +19 -23
  1295. package/build/src/testing/factory/sequence.d.ts.map +1 -1
  1296. package/build/src/testing/factory/sequence.js +3 -3
  1297. package/build/src/testing/factory/strategies/attributes-for.d.ts +3 -3
  1298. package/build/src/testing/factory/strategies/attributes-for.d.ts.map +1 -1
  1299. package/build/src/testing/factory/strategies/attributes-for.js +2 -2
  1300. package/build/src/testing/factory/strategies/base.d.ts +32 -32
  1301. package/build/src/testing/factory/strategies/base.d.ts.map +1 -1
  1302. package/build/src/testing/factory/strategies/base.js +25 -25
  1303. package/build/src/testing/factory/strategies/build.d.ts +3 -3
  1304. package/build/src/testing/factory/strategies/build.d.ts.map +1 -1
  1305. package/build/src/testing/factory/strategies/build.js +3 -3
  1306. package/build/src/testing/factory/strategies/create.d.ts +6 -6
  1307. package/build/src/testing/factory/strategies/create.d.ts.map +1 -1
  1308. package/build/src/testing/factory/strategies/create.js +5 -5
  1309. package/build/src/testing/factory/trait-definition.d.ts +4 -4
  1310. package/build/src/testing/factory/trait-definition.d.ts.map +1 -1
  1311. package/build/src/testing/request-client.d.ts +19 -19
  1312. package/build/src/testing/request-client.d.ts.map +1 -1
  1313. package/build/src/testing/test-files-finder.d.ts +15 -15
  1314. package/build/src/testing/test-files-finder.d.ts.map +1 -1
  1315. package/build/src/testing/test-files-finder.js +2 -2
  1316. package/build/src/testing/test-filter-parser.d.ts +19 -12
  1317. package/build/src/testing/test-filter-parser.d.ts.map +1 -1
  1318. package/build/src/testing/test-runner.d.ts +204 -251
  1319. package/build/src/testing/test-runner.d.ts.map +1 -1
  1320. package/build/src/testing/test-runner.js +15 -15
  1321. package/build/src/testing/test-suite-splitter.d.ts +25 -31
  1322. package/build/src/testing/test-suite-splitter.d.ts.map +1 -1
  1323. package/build/src/testing/test.d.ts +51 -55
  1324. package/build/src/testing/test.d.ts.map +1 -1
  1325. package/build/src/testing/test.js +20 -18
  1326. package/build/src/testing/wait-for-event.d.ts +25 -25
  1327. package/build/src/testing/wait-for-event.d.ts.map +1 -1
  1328. package/build/src/testing/wait-for-event.js +6 -6
  1329. package/build/src/time-zone.d.ts +3 -3
  1330. package/build/src/time-zone.d.ts.map +1 -1
  1331. package/build/src/utils/backtrace-cleaner-node.d.ts +35 -2
  1332. package/build/src/utils/backtrace-cleaner-node.d.ts.map +1 -1
  1333. package/build/src/utils/backtrace-cleaner-node.js +1 -1
  1334. package/build/src/utils/backtrace-cleaner.d.ts +33 -28
  1335. package/build/src/utils/backtrace-cleaner.d.ts.map +1 -1
  1336. package/build/src/utils/bearer-token.d.ts +2 -2
  1337. package/build/src/utils/bearer-token.d.ts.map +1 -1
  1338. package/build/src/utils/deburr-column-name.d.ts.map +1 -1
  1339. package/build/src/utils/event-emitter.d.ts +1 -1
  1340. package/build/src/utils/event-emitter.d.ts.map +1 -1
  1341. package/build/src/utils/event-emitter.js +2 -2
  1342. package/build/src/utils/file-exists.d.ts.map +1 -1
  1343. package/build/src/utils/format-value.d.ts +9 -8
  1344. package/build/src/utils/format-value.d.ts.map +1 -1
  1345. package/build/src/utils/format-value.js +7 -7
  1346. package/build/src/utils/is-date.d.ts +2 -2
  1347. package/build/src/utils/is-date.d.ts.map +1 -1
  1348. package/build/src/utils/is-date.js +2 -2
  1349. package/build/src/utils/model-scope.d.ts +29 -24
  1350. package/build/src/utils/model-scope.d.ts.map +1 -1
  1351. package/build/src/utils/model-scope.js +11 -11
  1352. package/build/src/utils/mount-prefix.d.ts +2 -2
  1353. package/build/src/utils/mount-prefix.d.ts.map +1 -1
  1354. package/build/src/utils/nest-callbacks.d.ts.map +1 -1
  1355. package/build/src/utils/plain-object.d.ts +3 -3
  1356. package/build/src/utils/plain-object.d.ts.map +1 -1
  1357. package/build/src/utils/plain-object.js +3 -3
  1358. package/build/src/utils/ransack.d.ts +69 -90
  1359. package/build/src/utils/ransack.d.ts.map +1 -1
  1360. package/build/src/utils/ransack.js +36 -36
  1361. package/build/src/utils/rest-args-error.d.ts.map +1 -1
  1362. package/build/src/utils/sha256-hex.d.ts.map +1 -1
  1363. package/build/src/utils/shutdown-lifecycle.d.ts +1 -1
  1364. package/build/src/utils/shutdown-lifecycle.d.ts.map +1 -1
  1365. package/build/src/utils/singularize-model-name.d.ts.map +1 -1
  1366. package/build/src/utils/split-sql-statements.d.ts.map +1 -1
  1367. package/build/src/utils/to-import-specifier.d.ts.map +1 -1
  1368. package/build/src/utils/with-tracked-stack-async-hooks.d.ts +6 -5
  1369. package/build/src/utils/with-tracked-stack-async-hooks.d.ts.map +1 -1
  1370. package/build/src/utils/with-tracked-stack-async-hooks.js +9 -9
  1371. package/build/src/utils/with-tracked-stack.d.ts +6 -5
  1372. package/build/src/utils/with-tracked-stack.d.ts.map +1 -1
  1373. package/build/src/utils/with-tracked-stack.js +7 -7
  1374. package/build/src/velocious-error.d.ts +27 -17
  1375. package/build/src/velocious-error.d.ts.map +1 -1
  1376. package/build/src/velocious-error.js +10 -4
  1377. package/build/sync/conflict-strategy.js +1 -1
  1378. package/build/sync/query-scope.js +7 -7
  1379. package/build/sync/server-change-feed.js +13 -13
  1380. package/build/sync/server-sequence-allocator.js +5 -5
  1381. package/build/sync/signed-sync-envelope-replay-service.js +20 -20
  1382. package/build/sync/stable-json.js +4 -4
  1383. package/build/sync/sync-api-client-types.js +7 -7
  1384. package/build/sync/sync-api-client.js +26 -26
  1385. package/build/sync/sync-change-fanout.js +6 -6
  1386. package/build/sync/sync-client-registry.js +3 -3
  1387. package/build/sync/sync-client-types.js +10 -10
  1388. package/build/sync/sync-client.js +18 -18
  1389. package/build/sync/sync-envelope-replay-service.js +76 -76
  1390. package/build/sync/sync-model-change-feed-service.js +7 -7
  1391. package/build/sync/sync-publish-suppression.js +2 -2
  1392. package/build/sync/sync-publisher-types.js +11 -11
  1393. package/build/sync/sync-publisher.js +19 -19
  1394. package/build/sync/sync-realtime-bridge.js +8 -8
  1395. package/build/sync/sync-replay-upsert-applier.js +16 -16
  1396. package/build/sync/sync-resource-base.js +14 -14
  1397. package/build/sync/sync-scope-attributes.js +1 -1
  1398. package/build/sync/sync-scope-store.js +5 -5
  1399. package/build/sync/sync-websocket-channel.js +5 -5
  1400. package/build/tenants/default-tenant-database-provisioning.js +1 -1
  1401. package/build/tenants/tenant-aggregator.js +13 -13
  1402. package/build/tenants/tenant-handle.js +252 -0
  1403. package/build/tenants/tenant-iterator.js +6 -6
  1404. package/build/tenants/tenant-model-scope.js +132 -0
  1405. package/build/tenants/tenant.js +15 -2
  1406. package/build/testing/browser-test-app.js +2 -2
  1407. package/build/testing/expect-to-change.js +1 -1
  1408. package/build/testing/expect-utils.js +29 -29
  1409. package/build/testing/expect.js +18 -18
  1410. package/build/testing/factory/association-declaration.js +2 -2
  1411. package/build/testing/factory/declarations.js +5 -5
  1412. package/build/testing/factory/definition-builder.js +39 -39
  1413. package/build/testing/factory/evaluation-context.js +16 -16
  1414. package/build/testing/factory/factory-definition.js +2 -2
  1415. package/build/testing/factory/factory-registry.js +34 -34
  1416. package/build/testing/factory/factory-runner.js +8 -8
  1417. package/build/testing/factory/linter.js +2 -2
  1418. package/build/testing/factory/model-contract.js +3 -3
  1419. package/build/testing/factory/sequence.js +2 -2
  1420. package/build/testing/factory/strategies/attributes-for.js +1 -1
  1421. package/build/testing/factory/strategies/base.js +24 -24
  1422. package/build/testing/factory/strategies/build.js +2 -2
  1423. package/build/testing/factory/strategies/create.js +4 -4
  1424. package/build/testing/test-files-finder.js +1 -1
  1425. package/build/testing/test-runner.js +14 -14
  1426. package/build/testing/test.js +19 -17
  1427. package/build/testing/wait-for-event.js +5 -5
  1428. package/build/tsconfig.tsbuildinfo +1 -1
  1429. package/build/utils/event-emitter.js +1 -1
  1430. package/build/utils/format-value.js +6 -6
  1431. package/build/utils/is-date.js +1 -1
  1432. package/build/utils/model-scope.js +10 -10
  1433. package/build/utils/plain-object.js +2 -2
  1434. package/build/utils/ransack.js +35 -35
  1435. package/build/utils/with-tracked-stack-async-hooks.js +8 -8
  1436. package/build/utils/with-tracked-stack.js +6 -6
  1437. package/build/velocious-error.js +9 -3
  1438. package/package.json +3 -3
  1439. package/src/application.js +3 -3
  1440. package/src/authorization/ability.js +6 -6
  1441. package/src/authorization/base-resource.js +1 -1
  1442. package/src/background-jobs/client.js +2 -2
  1443. package/src/background-jobs/forked-runner-child.js +4 -4
  1444. package/src/background-jobs/job-runner.js +2 -2
  1445. package/src/background-jobs/job.js +6 -6
  1446. package/src/background-jobs/json-socket.js +1 -1
  1447. package/src/background-jobs/main.js +13 -13
  1448. package/src/background-jobs/normalize-error.js +2 -2
  1449. package/src/background-jobs/pooled-runner-child.js +3 -3
  1450. package/src/background-jobs/scheduler.js +1 -1
  1451. package/src/background-jobs/status-reporter.js +2 -2
  1452. package/src/background-jobs/store.js +23 -23
  1453. package/src/background-jobs/types.js +6 -6
  1454. package/src/background-jobs/web/controller.js +6 -6
  1455. package/src/background-jobs/web/counts-channel.js +1 -1
  1456. package/src/background-jobs/worker.js +8 -8
  1457. package/src/beacon/client.js +3 -3
  1458. package/src/beacon/in-process-client.js +3 -3
  1459. package/src/beacon/types.js +1 -1
  1460. package/src/cli/base-command.js +1 -1
  1461. package/src/cli/commands/console.js +1 -1
  1462. package/src/cli/commands/db/schema/dump.js +1 -1
  1463. package/src/cli/commands/db/schema/load.js +1 -1
  1464. package/src/cli/commands/db/seed.js +1 -1
  1465. package/src/cli/commands/generate/frontend-models.js +1 -1
  1466. package/src/cli/commands/lint/relationships.js +1 -1
  1467. package/src/cli/commands/run-script.js +1 -1
  1468. package/src/cli/commands/runner.js +1 -1
  1469. package/src/cli/index.js +2 -2
  1470. package/src/cli/tenant-database-command-helper.js +2 -2
  1471. package/src/configuration-types.js +48 -47
  1472. package/src/configuration.js +150 -65
  1473. package/src/controller.js +11 -8
  1474. package/src/current.js +2 -2
  1475. package/src/database/annotations-async-hooks.js +3 -3
  1476. package/src/database/annotations.js +1 -1
  1477. package/src/database/drivers/base-column.js +1 -1
  1478. package/src/database/drivers/base-foreign-key.js +1 -1
  1479. package/src/database/drivers/base-table.js +1 -1
  1480. package/src/database/drivers/base.js +18 -18
  1481. package/src/database/drivers/mssql/column.js +1 -1
  1482. package/src/database/drivers/mssql/index.js +2 -2
  1483. package/src/database/drivers/mssql/options.js +1 -1
  1484. package/src/database/drivers/mssql/structure-sql.js +1 -1
  1485. package/src/database/drivers/mssql/table.js +1 -1
  1486. package/src/database/drivers/mysql/column.js +1 -1
  1487. package/src/database/drivers/mysql/index.js +4 -4
  1488. package/src/database/drivers/mysql/options.js +1 -1
  1489. package/src/database/drivers/mysql/query.js +7 -7
  1490. package/src/database/drivers/mysql/structure-sql.js +71 -10
  1491. package/src/database/drivers/pgsql/column.js +1 -1
  1492. package/src/database/drivers/pgsql/index.js +6 -6
  1493. package/src/database/drivers/pgsql/structure-sql.js +1 -1
  1494. package/src/database/drivers/sqlite/base.js +7 -7
  1495. package/src/database/drivers/sqlite/column.js +1 -1
  1496. package/src/database/drivers/sqlite/connection-sql-js.js +1 -1
  1497. package/src/database/drivers/sqlite/foreign-key.js +1 -1
  1498. package/src/database/drivers/sqlite/index.js +1 -1
  1499. package/src/database/drivers/sqlite/index.native.js +2 -2
  1500. package/src/database/drivers/sqlite/index.web.js +2 -2
  1501. package/src/database/drivers/sqlite/query.js +2 -2
  1502. package/src/database/drivers/sqlite/query.native.js +2 -2
  1503. package/src/database/drivers/sqlite/query.web.js +2 -2
  1504. package/src/database/drivers/sqlite/table-rebuilder.js +1 -1
  1505. package/src/database/migration/index.js +2 -2
  1506. package/src/database/migrator/types.js +2 -2
  1507. package/src/database/operation.js +59 -6
  1508. package/src/database/pool/async-tracked-multi-connection.js +75 -24
  1509. package/src/database/pool/base-methods-forward.js +2 -2
  1510. package/src/database/pool/base.js +48 -17
  1511. package/src/database/pool/single-multi-use.js +501 -103
  1512. package/src/database/query/delete-base.js +1 -1
  1513. package/src/database/query/index.js +3 -3
  1514. package/src/database/query/insert-base.js +4 -4
  1515. package/src/database/query/model-class-query.js +39 -39
  1516. package/src/database/query/preloader/belongs-to.js +2 -2
  1517. package/src/database/query/preloader/ensure-model-class-initialized.js +3 -2
  1518. package/src/database/query/preloader/has-many.js +3 -3
  1519. package/src/database/query/preloader/has-one.js +1 -1
  1520. package/src/database/query/preloader.js +9 -2
  1521. package/src/database/query/query-data.js +7 -7
  1522. package/src/database/query/update-base.js +3 -3
  1523. package/src/database/query/upsert-base.js +2 -2
  1524. package/src/database/query/where-model-class-hash.js +13 -13
  1525. package/src/database/query/with-count.js +12 -12
  1526. package/src/database/query-parser/options.js +2 -2
  1527. package/src/database/query-parser/select-parser.js +1 -1
  1528. package/src/database/record/acts-as-list.js +2 -2
  1529. package/src/database/record/attachments/handle.js +6 -6
  1530. package/src/database/record/attachments/normalize-input.js +11 -11
  1531. package/src/database/record/attachments/storage-drivers/filesystem.js +1 -1
  1532. package/src/database/record/attachments/storage-drivers/native.js +5 -5
  1533. package/src/database/record/attachments/storage-drivers/s3.js +10 -10
  1534. package/src/database/record/attachments/store.js +24 -20
  1535. package/src/database/record/auditing.js +123 -29
  1536. package/src/database/record/counter-cache-magnitude.js +11 -11
  1537. package/src/database/record/index.js +227 -174
  1538. package/src/database/record/instance-relationships/base.js +4 -4
  1539. package/src/database/record/instance-relationships/belongs-to.js +1 -1
  1540. package/src/database/record/instance-relationships/has-many.js +3 -3
  1541. package/src/database/record/instance-relationships/has-one.js +1 -1
  1542. package/src/database/record/record-not-found-error.js +1 -0
  1543. package/src/database/record/relationships/base.js +22 -0
  1544. package/src/database/record/state-machine.js +6 -6
  1545. package/src/database/record/validators/base.js +1 -1
  1546. package/src/database/structure-sql-loader.js +3 -3
  1547. package/src/database/table-data/table-column.js +3 -3
  1548. package/src/database/use-live-query.js +3 -3
  1549. package/src/environment-handlers/base.js +56 -37
  1550. package/src/environment-handlers/browser.js +1 -1
  1551. package/src/environment-handlers/node/cli/commands/console.js +4 -4
  1552. package/src/environment-handlers/node/cli/commands/db/seed.js +2 -2
  1553. package/src/environment-handlers/node/cli/commands/generate/base-models.js +1 -1
  1554. package/src/environment-handlers/node/cli/commands/run-script.js +2 -2
  1555. package/src/environment-handlers/node/cli/commands/runner.js +2 -2
  1556. package/src/environment-handlers/node/cli/commands/server.js +1 -1
  1557. package/src/environment-handlers/node.js +36 -36
  1558. package/src/error-logger.js +2 -2
  1559. package/src/error-reporting/request-details.js +32 -32
  1560. package/src/frontend-model-controller.js +215 -213
  1561. package/src/frontend-model-resource/base-resource.js +44 -44
  1562. package/src/frontend-model-resource/velocious-attachment-resource.js +1 -1
  1563. package/src/frontend-models/base.js +146 -142
  1564. package/src/frontend-models/clear-pending-debounced-callback.js +2 -2
  1565. package/src/frontend-models/model-registry.js +4 -4
  1566. package/src/frontend-models/outgoing-event-buffer.js +1 -1
  1567. package/src/frontend-models/preloader.js +1 -1
  1568. package/src/frontend-models/query.js +60 -60
  1569. package/src/frontend-models/resource-definition.js +9 -9
  1570. package/src/frontend-models/transport-serialization.js +27 -27
  1571. package/src/frontend-models/websocket-channel.js +4 -4
  1572. package/src/frontend-models/websocket-publishers.js +1 -1
  1573. package/src/http-client/request.js +1 -1
  1574. package/src/http-client/response.js +1 -1
  1575. package/src/http-server/client/index.js +4 -4
  1576. package/src/http-server/client/params-to-object.js +16 -16
  1577. package/src/http-server/client/request-buffer/index.js +5 -2
  1578. package/src/http-server/client/request-parser.js +2 -2
  1579. package/src/http-server/client/request-runner.js +2 -2
  1580. package/src/http-server/client/request.js +2 -2
  1581. package/src/http-server/client/websocket-request.js +6 -6
  1582. package/src/http-server/client/websocket-session.js +28 -28
  1583. package/src/http-server/cookie.js +2 -2
  1584. package/src/http-server/development-reloader.js +1 -1
  1585. package/src/http-server/index.js +5 -5
  1586. package/src/http-server/remote-address.js +1 -1
  1587. package/src/http-server/server-lock.js +4 -4
  1588. package/src/http-server/websocket-channel-subscribers.js +4 -4
  1589. package/src/http-server/websocket-channel.js +1 -1
  1590. package/src/http-server/websocket-connection.js +3 -3
  1591. package/src/http-server/websocket-event-log-store.js +9 -9
  1592. package/src/http-server/websocket-events-host.js +7 -7
  1593. package/src/http-server/websocket-events.js +4 -4
  1594. package/src/http-server/worker-handler/channel-subscriber-dispatch.js +1 -1
  1595. package/src/http-server/worker-handler/in-process.js +5 -5
  1596. package/src/http-server/worker-handler/index.js +10 -10
  1597. package/src/http-server/worker-handler/worker-thread.js +8 -8
  1598. package/src/logger/base-logger.js +1 -1
  1599. package/src/logger.js +12 -12
  1600. package/src/mailer/backends/smtp.js +3 -3
  1601. package/src/mailer/base.js +14 -14
  1602. package/src/mailer/delivery.js +3 -3
  1603. package/src/mailer/index.js +1 -1
  1604. package/src/mailer.js +1 -1
  1605. package/src/plugins/sqljs-wasm-route-controller.js +1 -1
  1606. package/src/record-payload-values.js +3 -3
  1607. package/src/routes/base-route.js +5 -5
  1608. package/src/routes/basic-route.js +4 -4
  1609. package/src/routes/get-route.js +2 -2
  1610. package/src/routes/hooks/frontend-model-command-route-hook.js +1 -1
  1611. package/src/routes/index.js +3 -3
  1612. package/src/routes/namespace-route.js +1 -1
  1613. package/src/routes/plugin-routes.js +1 -1
  1614. package/src/routes/post-route.js +2 -2
  1615. package/src/routes/resolver.js +5 -5
  1616. package/src/routes/resource-route.js +1 -1
  1617. package/src/sync/conflict-strategy.js +1 -1
  1618. package/src/sync/query-scope.js +7 -7
  1619. package/src/sync/server-change-feed.js +13 -13
  1620. package/src/sync/server-sequence-allocator.js +5 -5
  1621. package/src/sync/signed-sync-envelope-replay-service.js +20 -20
  1622. package/src/sync/stable-json.js +4 -4
  1623. package/src/sync/sync-api-client-types.js +7 -7
  1624. package/src/sync/sync-api-client.js +26 -26
  1625. package/src/sync/sync-change-fanout.js +6 -6
  1626. package/src/sync/sync-client-registry.js +3 -3
  1627. package/src/sync/sync-client-types.js +10 -10
  1628. package/src/sync/sync-client.js +18 -18
  1629. package/src/sync/sync-envelope-replay-service.js +76 -76
  1630. package/src/sync/sync-model-change-feed-service.js +7 -7
  1631. package/src/sync/sync-publish-suppression.js +2 -2
  1632. package/src/sync/sync-publisher-types.js +11 -11
  1633. package/src/sync/sync-publisher.js +19 -19
  1634. package/src/sync/sync-realtime-bridge.js +8 -8
  1635. package/src/sync/sync-replay-upsert-applier.js +16 -16
  1636. package/src/sync/sync-resource-base.js +14 -14
  1637. package/src/sync/sync-scope-attributes.js +1 -1
  1638. package/src/sync/sync-scope-store.js +5 -5
  1639. package/src/sync/sync-websocket-channel.js +5 -5
  1640. package/src/tenants/default-tenant-database-provisioning.js +1 -1
  1641. package/src/tenants/tenant-aggregator.js +13 -13
  1642. package/src/tenants/tenant-handle.js +252 -0
  1643. package/src/tenants/tenant-iterator.js +6 -6
  1644. package/src/tenants/tenant-model-scope.js +132 -0
  1645. package/src/tenants/tenant.js +15 -2
  1646. package/src/testing/browser-test-app.js +2 -2
  1647. package/src/testing/expect-to-change.js +1 -1
  1648. package/src/testing/expect-utils.js +29 -29
  1649. package/src/testing/expect.js +18 -18
  1650. package/src/testing/factory/association-declaration.js +2 -2
  1651. package/src/testing/factory/declarations.js +5 -5
  1652. package/src/testing/factory/definition-builder.js +39 -39
  1653. package/src/testing/factory/evaluation-context.js +16 -16
  1654. package/src/testing/factory/factory-definition.js +2 -2
  1655. package/src/testing/factory/factory-registry.js +34 -34
  1656. package/src/testing/factory/factory-runner.js +8 -8
  1657. package/src/testing/factory/linter.js +2 -2
  1658. package/src/testing/factory/model-contract.js +3 -3
  1659. package/src/testing/factory/sequence.js +2 -2
  1660. package/src/testing/factory/strategies/attributes-for.js +1 -1
  1661. package/src/testing/factory/strategies/base.js +24 -24
  1662. package/src/testing/factory/strategies/build.js +2 -2
  1663. package/src/testing/factory/strategies/create.js +4 -4
  1664. package/src/testing/test-files-finder.js +1 -1
  1665. package/src/testing/test-runner.js +14 -14
  1666. package/src/testing/test.js +19 -17
  1667. package/src/testing/wait-for-event.js +5 -5
  1668. package/src/utils/event-emitter.js +1 -1
  1669. package/src/utils/format-value.js +6 -6
  1670. package/src/utils/is-date.js +1 -1
  1671. package/src/utils/model-scope.js +10 -10
  1672. package/src/utils/plain-object.js +2 -2
  1673. package/src/utils/ransack.js +35 -35
  1674. package/src/utils/with-tracked-stack-async-hooks.js +8 -8
  1675. package/src/utils/with-tracked-stack.js +6 -6
  1676. package/src/velocious-error.js +9 -3
@@ -1,648 +1,12 @@
1
- /**
2
- * @module types
3
- */
4
- /**
5
- * @typedef {function({request: import("./http-server/client/request.js").default | import("./http-server/client/websocket-request.js").default, response: import("./http-server/client/response.js").default}): Promise<void>} CorsType
6
- */
7
- /**
8
- * @typedef {function({request: import("./http-server/client/request.js").default | import("./http-server/client/websocket-request.js").default | undefined, subscription?: {channel: string, params?: Record<string, ?>}, client: import("./http-server/client/index.js").default, websocketSession: import("./http-server/client/websocket-session.js").default, configuration: import("./configuration.js").default}): typeof import("./http-server/websocket-channel.js").default | import("./http-server/websocket-channel.js").default | void | Promise<typeof import("./http-server/websocket-channel.js").default | import("./http-server/websocket-channel.js").default | void>} WebsocketChannelResolverType
9
- */
10
- /**
11
- * @typedef {object} WebsocketMessageHandler
12
- * @property {function({message: ?, session: import("./http-server/client/websocket-session.js").default}) : Promise<void> | void} [onMessage] - Handler for incoming websocket messages.
13
- * @property {function({session: import("./http-server/client/websocket-session.js").default}) : Promise<void> | void} [onOpen] - Handler when the websocket session opens.
14
- * @property {function({session: import("./http-server/client/websocket-session.js").default}) : Promise<void> | void} [onClose] - Handler when the websocket session closes.
15
- * @property {function({error: Error, session: import("./http-server/client/websocket-session.js").default}) : Promise<void> | void} [onError] - Handler when a websocket message errors.
16
- */
17
- /**
18
- * @typedef {function({request: import("./http-server/client/request.js").default | import("./http-server/client/websocket-request.js").default | undefined, client: import("./http-server/client/index.js").default, configuration: import("./configuration.js").default}): WebsocketMessageHandler | void | Promise<WebsocketMessageHandler | void>} WebsocketMessageHandlerResolverType
19
- */
20
- /**
21
- * @typedef {(id: string) => {default: typeof import("./initializer.js").default}} InitializersRequireContextType
22
- * @typedef {InitializersRequireContextType & {
23
- * keys: () => string[],
24
- * id: string
25
- * }} WebpackRequireContext
26
- * @typedef {{requireContext: WebpackRequireContext}} InitializersExportType
27
- * @typedef {function({configuration: import("./configuration.js").default}) : Promise<InitializersExportType>} InitializersType
28
- */
29
- /**
30
- * @typedef {object} SqlConfig
31
- * @property {string} [database] - Database name for the SQL driver.
32
- * @property {object} [options] - Driver-specific connection options.
33
- * @property {boolean} [options.encrypt] - Whether to encrypt the connection (MSSQL).
34
- * @property {string} [options.schema] - Default schema for unqualified table lookups (MSSQL).
35
- * @property {string} [options.serverName] - TLS SNI server name override for MSSQL (empty string disables SNI).
36
- * @property {boolean} [options.trustServerCertificate] - Whether to trust the server certificate (MSSQL).
37
- * @property {string} [password] - Password for the SQL user.
38
- * @property {object} [pool] - Connection pool configuration.
39
- * @property {number | null} [pool.max] - Maximum number of connections. Set null to disable the cap.
40
- * @property {number} [pool.min] - Minimum number of connections.
41
- * @property {number} [pool.idleTimeoutMillis] - Idle timeout before releasing a connection.
42
- * @property {number | null} [pool.checkoutTimeoutMillis] - Timeout while waiting for an available connection after the max connection cap is reached. Set null to wait indefinitely.
43
- * @property {string} [server] - SQL server hostname.
44
- * @property {string} [user] - SQL username.
45
- */
46
- /**
47
- * @typedef {object} DatabasePoolConfiguration
48
- * @property {number | null} [checkoutTimeoutMillis] - Timeout while a checkout waits for an available async-tracked connection after the max live connection cap is reached. Set null to wait indefinitely. Default: 10000.
49
- * @property {number | null} [idleTimeoutMillis] - Idle timeout before closing a checked-in async-tracked connection. Set null to disable idle reaping. Default: 5000.
50
- * @property {number | null} [max] - Maximum live async-tracked connections for this pool. Defaults to 10. Extra checkouts wait until a matching connection is checked in or capacity is freed. Set null to disable the cap.
51
- */
52
- /**
53
- * @typedef {object} DatabaseConfigurationType
54
- * @property {string} [databaseCharset] - Default character set applied by `db:create` via mysql/mariadb `CREATE DATABASE ... CHARACTER SET`. Distinct from `charset`, which is the client connection charset forwarded to the mysql2 driver.
55
- * @property {string} [databaseCollation] - Default collation applied by `db:create` via mysql/mariadb `CREATE DATABASE ... COLLATE`.
56
- * @property {string} [database] - Database name for this connection.
57
- * @property {number} [deadlockMaxRetries] - Maximum attempts for the outermost transaction when it keeps hitting deadlocks. Defaults to 8.
58
- * @property {number} [deadlockBaseWaitMs] - Base delay (ms) for the deadlock retry backoff; the per-attempt ceiling doubles from here. Defaults to 50.
59
- * @property {number} [deadlockMaxWaitMs] - Cap (ms) on the deadlock retry backoff ceiling so the jittered wait stays bounded. Defaults to 1000.
60
- * @property {typeof import("./database/drivers/base.js").default} [driver] - Driver class to use for this database.
61
- * @property {typeof import("./database/pool/base.js").default} [poolType] - Pool class to use for this database.
62
- * @property {function() : ?} [getConnection] - Custom connection factory override.
63
- * @property {string} [host] - Database host.
64
- * @property {boolean} [migrations] - Whether migrations are enabled for this database.
65
- * @property {boolean} [multipleStatements] - (MySQL) Opt in to multi-statement queries so a whole structure SQL dump loads in one round-trip via `StructureSqlLoader`. Off by default; ordinary queries otherwise reject stacked statements.
66
- * @property {string} [password] - Password for the database user.
67
- * @property {number} [port] - Database port.
68
- * @property {string} [primaryKeyType] - Default type for implicit migration primary keys and references. Defaults to `uuid`.
69
- * @property {DatabasePoolConfiguration} [pool] - Velocious database pool lifecycle configuration.
70
- * @property {string} [name] - Friendly name for the configuration.
71
- * @property {(file: string) => string} [locateFile] - Optional sqlite-web sql.js wasm resolver (`initSqlJs({locateFile})`).
72
- * @property {boolean} [readOnly] - Whether writes should be blocked for this database.
73
- * @property {string} [schema] - Default schema for unqualified table lookups (MSSQL).
74
- * @property {boolean} [schemaCache] - Whether schema metadata should be cached on the driver. Defaults to true.
75
- * @property {object} [record] - Record-level configuration.
76
- * @property {boolean} [record.transactions] - Whether record operations should use transactions.
77
- * @property {boolean} [reset] - Whether to reset the database on startup.
78
- * @property {SqlConfig} [sqlConfig] - Driver-specific SQL config.
79
- * @property {boolean} [tenantOnly] - Whether this database identifier is only active inside a resolved tenant context.
80
- * @property {"mssql" | "mysql" | "pgsql" | "sqlite"} [type] - Database type identifier.
81
- * @property {string} [useDatabase] - Database to switch to after connecting.
82
- * @property {string} [username] - Username for database authentication.
83
- */
84
- /**
85
- * @typedef {"debug-low-level" | "debug" | "info" | "warn" | "error"} LogLevel
86
- */
87
- /**
88
- * @typedef {object} LoggingOutputPayload
89
- * @property {LogLevel} level - Log level.
90
- * @property {string} message - Formatted message.
91
- * @property {string} subject - Log subject.
92
- * @property {Date} timestamp - Timestamp.
93
- */
94
- /**
95
- * @typedef {object} LoggingOutput
96
- * @property {function(LoggingOutputPayload): Promise<void> | void} write - Write a log entry.
97
- * @property {LogLevel[]} [levels] - Default levels for this output.
98
- */
99
- /**
100
- * @typedef {object} LoggingOutputConfig
101
- * @property {LoggingOutput} output - Output instance.
102
- * @property {Array<LogLevel>} [levels] - Levels enabled for this output.
103
- */
104
- /**
105
- * @typedef {LoggingOutputConfig | LoggingOutput | import("./logger/base-logger.js").default} LoggerConfig
106
- */
107
- /**
108
- * @typedef {object} LoggingConfiguration
109
- * @property {boolean} [console] - Enable/disable console logging for request logging. Defaults to true outside of "test" and for HTTP server logs.
110
- * @property {boolean} [file] - Enable/disable writing logs to a file. Defaults to true.
111
- * @property {string} [directory] - Directory where log files are stored. Defaults to "<project>/log".
112
- * @property {string} [filePath] - Explicit path for the log file. Defaults to "<directory>/<environment>.log".
113
- * @property {Array<"debug-low-level" | "debug" | "info" | "warn" | "error">} [levels] - Override which log levels are emitted.
114
- * @property {boolean} [debugLowLevel] - Convenience flag to include very low-level debug logs.
115
- * @property {boolean} [queryLogging] - Enable/disable database query logging. Defaults to true outside test and false in test.
116
- * @property {LoggerConfig[]} [loggers] - Logger instances (converted to outputs when configured).
117
- * @property {LoggingOutputConfig[]} [outputs] - Explicit logger outputs (overrides console/file defaults when provided).
118
- */
119
- /**
120
- * @typedef {object} StructureSqlConfiguration
121
- * @property {string[]} [enabledEnvironments] - Environments allowed to write structure sql files during automatic migration dumps.
122
- * @property {string[]} [disabledEnvironments] - Environments that should skip writing structure sql files.
123
- */
124
- /**
125
- * @typedef {"beacon" | "polling"} BackgroundJobsDispatchStrategy
126
- *
127
- * - `"beacon"` (default): event-driven dispatch. The
128
- * `background-jobs-main` process drains the queue on enqueue, on
129
- * worker readiness, on Beacon broadcasts (so cross-process enqueues
130
- * wake it), and arms a `setTimeout` for the soonest future-scheduled
131
- * job. Falls back gracefully to direct in-process triggering when
132
- * Beacon is not configured.
133
- * - `"polling"`: legacy mode, runs a fixed-interval poll over the
134
- * `background_jobs` table (see `pollIntervalMs`).
135
- */
136
- /**
137
- * @typedef {object} BackgroundJobsConfiguration
138
- * @property {string} [host] - Hostname for the background jobs main process.
139
- * @property {number} [port] - Port for the background jobs main process.
140
- * @property {string} [databaseIdentifier] - Database identifier used to store background jobs.
141
- * @property {number} [maxConcurrentInlineJobs] - How many `forked: false` jobs a single
142
- * `background-jobs-worker` process is allowed to run in parallel. Concurrency
143
- * is at the JS event-loop level: every concurrent job shares the worker's
144
- * process and DB connection pool, so this should fit the pool size, not the
145
- * CPU count. Forking remains the right tool for memory isolation across
146
- * long-running jobs and for using more cores. Default: `4`.
147
- * @property {number} [maxConcurrentForkedJobs] - How many out-of-process
148
- * `"forked"` or `"spawned"` jobs a single `background-jobs-worker` is
149
- * allowed to keep in flight. Default: `4`. This is a per-worker safety cap;
150
- * for workload-shaped limits use per-queue caps (`queues`) instead, which are
151
- * enforced cluster-wide and are immune to duplicate worker processes.
152
- * @property {number} [pooledRunnerCount] - Number of warm, reusable child runners owned by each worker. Pooled capacity is separate from inline and forked/spawned capacity. Default: `4`.
153
- * @property {number} [pooledRunnerConcurrency] - Number of jobs each pooled child runs concurrently on its own event loop. Total per-worker pooled capacity is `pooledRunnerCount × pooledRunnerConcurrency`. `1` (default) keeps each child serial; raise it for I/O-bound jobs so a bounded set of isolated processes handles high concurrency (like the inline lane) without one process per concurrent job. Default: `1`.
154
- * @property {number} [pooledRunnerMaxJobs] - Number of sequential jobs a pooled child runs before it is replaced, bounding process-level resource accumulation. Default: `100`.
155
- * @property {number} [pooledRunnerMaxRssBytes] - RSS bytes after an acknowledged job at which a pooled child is replaced. Default: `536870912` (512 MiB).
156
- * @property {number} [pooledRunnerMaxLifetimeMs] - Age after an acknowledged job at which a pooled child is replaced. Default: `3600000` (one hour).
157
- * @property {Record<string, {maxConcurrent?: number, priority?: number}>} [queues] - Per-queue
158
- * concurrency caps and dispatch priorities, Sidekiq-style. A job declares its queue (static
159
- * `queue` on the job class, or the `queue` enqueue option; defaults to `"default"`), and
160
- * `queues[name].maxConcurrent` bounds how many jobs from that queue may be
161
- * in flight across the whole cluster (enforced via durable per-key
162
- * concurrency, so it holds regardless of how many worker processes run).
163
- * Size each queue to its workload: I/O-bound queues (e.g. build runners
164
- * waiting on remote Docker servers) can run far above the core count, while
165
- * CPU-bound queues should stay near it. `queues[name].priority` (default `0`)
166
- * makes the main process dispatch higher-priority queues before lower-priority
167
- * ones regardless of enqueue order, so a small time-critical queue can never be
168
- * starved by a flood of low-priority work sharing a worker pool. Unlike
169
- * Sidekiq's strict queue ordering, priority composes with the per-queue caps:
170
- * a higher-priority queue that is already at its `maxConcurrent` is skipped and
171
- * dispatch falls through to the next eligible lower-priority job, so a busy
172
- * high-priority queue does not block everything else. This fallthrough is a
173
- * property of the queue-derived cap; a job that supplies its own explicit
174
- * `concurrencyKey`/`maxConcurrency` bypasses the queue cap entirely (an
175
- * explicit key always wins — see above) and is bounded only by that key, so it
176
- * is not held back by the queue's cap and priority simply orders it normally.
177
- * Priorities may be any number, including negative to sink a queue below the
178
- * default. Jobs within the same priority keep FIFO (`scheduled_at`, then
179
- * `created_at`) order. Default: `{}` (no queue caps, all queues priority `0`).
180
- * @property {BackgroundJobsDispatchStrategy} [dispatchStrategy] - How the main process
181
- * detects new work. Defaults to `"beacon"` (event-driven). Set to `"polling"`
182
- * to restore the legacy fixed-interval poll.
183
- * @property {number} [pollIntervalMs] - Poll interval in milliseconds. Only used
184
- * when `dispatchStrategy === "polling"`. Default: `1000`.
185
- * @property {number | null} [jobTimeoutMs] - Wall-clock backstop, in ms, for a
186
- * `"forked"` job runner. A forked job still running after this is terminated
187
- * (SIGTERM, then SIGKILL after the reaping grace) and reported failed, so a
188
- * single genuinely-hung runner can't pin a draining worker — and its full-app
189
- * boot and DB connections — indefinitely (e.g. across a deploy where a retired
190
- * worker drains in-flight jobs). This is a coarse safety net, not per-job
191
- * tuning: set it well above the longest legitimate forked job (build runners,
192
- * long imports) so only genuinely-stuck runners are killed. Omit, `null`, or
193
- * `<= 0` to disable (default), which preserves the prior unbounded behavior.
194
- * @property {BackgroundJobsRetentionConfiguration} [retention] - Retention/pruning
195
- * of terminal job rows. Without pruning the jobs table grows unbounded
196
- * (completed rows accumulate forever), which bloats storage and indexes and
197
- * eventually slows dispatch. The main process sweeps terminal rows past their
198
- * window on an interval.
199
- */
200
- /**
201
- * @typedef {object} BackgroundJobsRetentionConfiguration
202
- * @property {number | null} [completedTtlMs] - Delete `completed` jobs whose
203
- * `completed_at_ms` is older than this many ms. `null` or `<= 0` disables
204
- * completed pruning. Default: `604800000` (7 days).
205
- * @property {number | null} [failedTtlMs] - Delete terminal `failed`/`orphaned`
206
- * jobs older than this many ms. `null` or `<= 0` disables (keeps them for
207
- * debugging). Default: `2592000000` (30 days).
208
- * @property {number} [batchSize] - Rows deleted per batch. Default: `1000`.
209
- * @property {number} [sweepIntervalMs] - How often the retention sweep runs.
210
- * Default: `3600000` (1 hour).
211
- */
212
- /**
213
- * Fully-resolved retention config as returned by `getBackgroundJobsConfig()`
214
- * (every field defaulted), as opposed to the partial user-provided input.
215
- * @typedef {object} ResolvedBackgroundJobsRetentionConfiguration
216
- * @property {number | null} completedTtlMs - Resolved completed-job TTL in ms (`null` disables).
217
- * @property {number | null} failedTtlMs - Resolved failed/orphaned TTL in ms (`null` disables).
218
- * @property {number} batchSize - Resolved delete batch size.
219
- * @property {number} sweepIntervalMs - Resolved sweep interval in ms.
220
- */
221
- /**
222
- * @typedef {object} BeaconConfiguration
223
- * @property {boolean} [enabled] - Whether to connect to a Beacon broker. Defaults to false unless `host`/`port` or `inProcess: true` are set, or env vars are present. Explicit `false` disables Beacon even when env vars are set.
224
- * @property {boolean} [inProcess] - When true, use a module-level in-process broker singleton instead of connecting over TCP. Mutually exclusive with `host`/`port`. Useful for tests and single-process deployments.
225
- * @property {string} [host] - Hostname of the Beacon broker daemon.
226
- * @property {number} [port] - Port of the Beacon broker daemon.
227
- * @property {string} [peerType] - Optional human-readable label for this peer (e.g. "server", "background-jobs-worker").
228
- * @property {number} [unreachableReportMs] - Grace window (ms) a beacon connect/disconnect blip must persist before it is reported as a framework-error. Transient outages that recover within this window (e.g. a deploy restarting the broker) are not reported. Defaults to 30000.
229
- */
230
- /**
231
- * @typedef {object} HttpCompressionConfiguration
232
- * @property {boolean} [enabled] - Whether buffered response compression is enabled. Defaults to true; set false to disable globally.
233
- * @property {number} [threshold] - Minimum buffered body size in bytes before compression is applied. Defaults to 1024.
234
- * @property {number} [brotliQuality] - Brotli encoder quality (0-11). Defaults to 4.
235
- * @property {number} [gzipLevel] - Gzip compression level (0-9). Defaults to 6.
236
- */
237
- /**
238
- * @typedef {object} NormalizedHttpCompressionConfiguration
239
- * @property {boolean} enabled - Whether buffered HTTP response compression is enabled.
240
- * @property {number} threshold - Minimum buffered body size in bytes before compression is applied.
241
- * @property {number} brotliQuality - Brotli encoder quality (0-11).
242
- * @property {number} gzipLevel - Gzip compression level (0-9).
243
- */
244
- /**
245
- * @typedef {object} HttpServerConfiguration
246
- * @property {boolean | HttpCompressionConfiguration} [compression] - Buffered response compression. Enabled with documented defaults when absent; false or {enabled: false} disables it globally.
247
- * @property {string} [host] - Hostname to bind the HTTP server to.
248
- * @property {boolean} [inProcess] - Run HTTP handlers in the main thread instead of worker threads.
249
- * @property {number} [maxWorkers] - Backward-compatible alias for workers.
250
- * @property {number} [port] - Port to bind the HTTP server to.
251
- * @property {{maxPendingBytes?: number, maxPendingMessages?: number}} [websocketInboundQueue] - Per-session retained inbound WebSocket message limits.
252
- * @property {{maxPendingBytes?: number, maxPendingFrames?: number}} [websocketOutboundQueue] - Per-client retained outbound WebSocket frame limits.
253
- * @property {number} [workers] - Worker handlers to start for the HTTP server.
254
- */
255
- /**
256
- * @typedef {object} ScheduledBackgroundJobEveryOptions
257
- * @property {number | string} [firstIn] - Delay before the first enqueue.
258
- */
259
- /**
260
- * @typedef {object} ScheduledBackgroundJobConfiguration
261
- * @property {Array<?>} [args] - Arguments passed to the job when enqueued.
262
- * @property {typeof import("./background-jobs/job.js").default} class - Job class to enqueue.
263
- * @property {string} [cron] - Crontab expression (5-field POSIX, plus `@hourly`/`@daily`/`@weekly`/`@monthly`/`@yearly`/`@midnight`). Mutually exclusive with `every`.
264
- * @property {boolean} [enabled] - Whether the schedule is enabled.
265
- * @property {number | string | [number | string, ScheduledBackgroundJobEveryOptions]} [every] - Repeat interval. Either `every` or `cron` must be set.
266
- * @property {import("./background-jobs/types.js").BackgroundJobOptions} [options] - Job options.
267
- */
268
- /**
269
- * @typedef {Record<string, string>} VelociousParams
270
- */
271
- /**
272
- * @typedef {Record<string, import("./frontend-models/query.js").FrontendModelTransportValue>} ClientErrorPayloadReporterPayload
273
- */
274
- /**
275
- * @typedef {object} ErrorRequestDetails
276
- * @property {?} [body] - Sanitized parsed request body, when available.
277
- * @property {string} httpMethod - Request HTTP method.
278
- * @property {string} path - Request path.
279
- */
280
- /**
281
- * @typedef {object} ClientErrorPayloadContext
282
- * @property {string} controller - Controller class name.
283
- * @property {string} [action] - Controller action or endpoint label.
284
- * @property {"index" | "find" | "create" | "update" | "destroy" | "attach" | "attachmentList" | "download" | "url" | "custom-command"} [commandType] - Frontend-model command type.
285
- * @property {boolean} [expectedError] - Whether the error is an expected user-flow failure.
286
- * @property {boolean} [frontendModelEndpoint] - Whether the error came from the frontend-model endpoint.
287
- * @property {string} [model] - Frontend-model name from the failed request.
288
- * @property {string} [requestId] - Shared frontend-model request id.
289
- */
290
- /**
291
- * @typedef {function({
292
- * context: ClientErrorPayloadContext,
293
- * error: Error,
294
- * request: import("./http-server/client/request.js").default | import("./http-server/client/websocket-request.js").default | undefined,
295
- * requestDetails: ErrorRequestDetails | null
296
- * }): Promise<ClientErrorPayloadReporterPayload | void> | ClientErrorPayloadReporterPayload | void} ClientErrorPayloadReporterType
297
- */
298
- /**
299
- * @typedef {Record<string, unknown> & {configuration?: import("./configuration.js").default, currentDevice?: unknown, currentUser?: unknown, modelRegistry?: Record<string, unknown> | {model: (name: string) => unknown}, now?: Date | (() => Date), offlineGrant?: unknown, params?: VelociousParams, request?: import("./http-server/client/request.js").default | import("./http-server/client/websocket-request.js").default, resourceRuntime?: "backend" | "frontend" | "offline"}} VelociousLooseObject
300
- */
301
- /**
302
- * @typedef {new (args: {attachmentName?: string, configuration: import("./configuration.js").default, modelClass?: typeof import("./database/record/index.js").default, name?: string, options?: Record<string, ?>}) => object} AttachmentDriverConstructor
303
- */
304
- /**
305
- * @typedef {object} ScheduledBackgroundJobsConfiguration
306
- * @property {Record<string, ScheduledBackgroundJobConfiguration>} jobs - Scheduled jobs keyed by name.
307
- */
308
- /**
309
- * @typedef {function({configuration: import("./configuration.js").default}) : ScheduledBackgroundJobsConfiguration | Promise<ScheduledBackgroundJobsConfiguration>} ScheduledBackgroundJobsLoaderType
310
- */
311
- /**
312
- * @typedef {object} AttachmentDriverConfiguration
313
- * @property {function({configuration: import("./configuration.js").default, name: string, options: Record<string, ?>}) : Record<string, ?>} [create] - Optional factory for a custom attachment driver instance.
314
- * @property {AttachmentDriverConstructor} [driverClass] - Optional custom attachment driver class.
315
- * @property {Record<string, ?>} [instance] - Optional custom attachment driver instance.
316
- */
317
- /**
318
- * @typedef {object} AttachmentsConfiguration
319
- * @property {string} [defaultDriver] - Default attachment storage driver name.
320
- * @property {Record<string, AttachmentDriverConfiguration & Record<string, ?>>} [drivers] - Named attachment driver configurations.
321
- * @property {boolean} [allowPathInput] - Whether `{path: ...}` attachment input is allowed.
322
- * @property {string[]} [allowedPathPrefixes] - Optional allowlist of directories for `{path: ...}` input.
323
- */
324
- /**
325
- * @typedef {object} MailerBackend
326
- * @property {function({payload: import("./mailer.js").MailerDeliveryPayload, configuration: import("./configuration.js").default}) : Promise<?> | ?} deliver - Deliver a mailer payload.
327
- */
328
- /**
329
- * @typedef {Record<string, string[]>} LocaleFallbacksType
330
- */
331
- /**
332
- * @typedef {object} FrontendModelRelationshipConfiguration
333
- * @property {"belongsTo" | "hasOne" | "hasMany"} type - Relationship type.
334
- * @property {string} [model] - Target model class name.
335
- * @property {string} [className] - Alias of target model class name.
336
- * @property {string} [modelClassName] - Explicit target model class name.
337
- */
338
- /**
339
- * @typedef {object} FrontendModelAttributeConfiguration
340
- * @property {string} [type] - Column type name.
341
- * @property {string} [columnType] - Alias for column type name.
342
- * @property {string} [sqlType] - Alias for column type name.
343
- * @property {string} [dataType] - Alias for column type name.
344
- * @property {string} [jsDocType] - Exact generated JSDoc type for non-column attributes.
345
- * @property {string} [name] - Attribute name when configured as an array entry.
346
- * @property {boolean} [null] - Whether value can be null.
347
- * @property {boolean} [selectedByDefault] - Whether included in default serialization. Defaults to true.
348
- */
349
- /**
350
- * @typedef {object} FrontendModelAttachmentConfiguration
351
- * @property {"hasOne" | "hasMany"} type - Attachment cardinality.
352
- */
353
- /**
354
- * @typedef {object} FrontendModelResourceConfiguration
355
- * @property {Array<string | FrontendModelAttributeConfiguration> | Record<string, FrontendModelAttributeConfiguration | import("./database/drivers/base-column.js").default | boolean>} attributes - Attributes to expose on the frontend model.
356
- * @property {string[]} [abilities] - Additional camelCase ability action names to expose for per-record `record.can(action)` reads. Base CRUD actions (`read`, `create`, `update`, `destroy`) are always included and must not be listed here.
357
- * @property {Record<string, FrontendModelAttachmentConfiguration>} [attachments] - Attachment helpers keyed by attachment name.
358
- * @property {string[]} [commands] - Legacy built-in command names (`index`, `find`, `create`, `update`, `destroy`, `attach`, `download`, `url`).
359
- * @property {Array<FrontendModelResourceCustomCommand>} [collectionCommands] - Custom collection commands. Each entry is a camelCase method name, or a `{name, args?, returnType?}` object declaring typed arguments and/or a response type. The runtime derives the kebab-case command slug from the name.
360
- * @property {Array<FrontendModelResourceCustomCommand>} [memberCommands] - Custom member commands. Each entry is a camelCase method name, or a `{name, args?, returnType?}` object declaring typed arguments and/or a response type. The runtime derives the kebab-case command slug from the name.
361
- * @property {string[]} [builtInCollectionCommands] - Built-in collection command names (`index`, `create`).
362
- * @property {string[]} [builtInMemberCommands] - Built-in member command names (`find`, `update`, `destroy`, `attach`, `download`, `url`).
363
- * @property {string} [modelName] - Frontend model name override.
364
- * @property {string[]} [relationships] - Relationship names to expose in frontend models. Type and target model are inferred from the backend model's registered relationships.
365
- * @property {string} [primaryKey] - Primary key attribute name.
366
- * @property {FrontendModelResourceServerConfiguration} [server] - Optional legacy backend behavior overrides for built-in frontend actions.
367
- * @property {FrontendModelResourceSyncConfiguration | boolean} [sync] - Optional safe local/offline sync policy metadata. `policy` participates in the hash but is not exposed to generated frontend config/manifest.
368
- */
369
- /**
370
- * Object form of a custom command entry, declaring its typed arguments and/or
371
- * response type alongside the command name.
372
- * @typedef {object} FrontendModelResourceCustomCommandObject
373
- * @property {string} name - camelCase command method name.
374
- * @property {Array<{name: string, type: string}>} [args] - Typed command arguments; each generates a named, typed method parameter mapped positionally into the command payload. `type` is a JSDoc type string.
375
- * @property {string} [returnType] - JSDoc type for the command response. When set, the generated method is typed `Promise<returnType>` instead of `Promise<Record<string, ?>>`. Emitted verbatim into the generated frontend model, so it must resolve there.
376
- */
377
- /**
378
- * A custom command entry: a plain camelCase method name, or an object declaring
379
- * typed args and/or a response type.
380
- * @typedef {string | FrontendModelResourceCustomCommandObject} FrontendModelResourceCustomCommand
381
- */
382
- /**
383
- * JSON value accepted by sync policy metadata/hash inputs.
384
- * @typedef {null | string | number | boolean | unknown[] | Record<string, unknown>} FrontendModelSyncJsonValue
385
- */
386
- /**
387
- * Frontend-model local/offline sync policy config. `metadata` is exposed to
388
- * frontends and peers; `policy` is hashed but intentionally omitted from
389
- * frontend-safe manifests.
390
- * @typedef {object} FrontendModelResourceSyncConfiguration
391
- * @property {"optimisticVersion" | "serverWins" | "lastWriterWins" | "fieldThreeWay" | "appendOnly"} [conflictStrategy] - Strategy used when replay detects server/client divergence. Defaults to `optimisticVersion`.
392
- * @property {boolean} [enabled] - Whether the resource is sync-enabled. Defaults to true when `sync` is configured.
393
- * @property {string[]} [operations] - Sync operation names such as `index`, `find`, `create`, `update`, custom domain commands, etc.
394
- * @property {string | number} [policyVersion] - App-controlled policy version used as a stable change signal.
395
- * @property {Record<string, FrontendModelSyncJsonValue>} [metadata] - Safe frontend-visible metadata.
396
- * @property {Record<string, FrontendModelSyncJsonValue>} [policy] - Deterministic non-secret policy inputs included in the policy hash only.
397
- */
398
- /**
399
- * Velocious sync API endpoint configuration.
400
- * @typedef {object} VelociousSyncApiConfiguration
401
- * @property {string} [mountPath] - Mount path for the sync endpoints. Defaults to "/velocious/sync".
402
- * @property {FrontendModelResourceClassType} resourceClass - App sync resource class served by the auto-mounted sync endpoints.
403
- */
404
- /**
405
- * Client-side sync transport owning HTTP POSTs to the framework sync endpoints,
406
- * matching the frontend-model websocket client post contract.
407
- * @typedef {object} VelociousSyncClientTransport
408
- * @property {(path: string, body?: ?, options?: {headers?: Record<string, string>}) => Promise<{json: () => ?}>} post - Posts one request and resolves a response with a json accessor.
409
- */
410
- /**
411
- * Websocket client contract required from `sync.client.realtime.createClient`,
412
- * matching `VelociousWebsocketClient` / snapreq's websocket client.
413
- * @typedef {object} VelociousSyncRealtimeWebsocketClient
414
- * @property {() => Promise<?>} connect - Connects the websocket.
415
- * @property {(channelType: string, options?: {params?: Record<string, ?>, onMessage?: (body: ?) => void, onResume?: () => void, onClose?: (reason: string) => void}) => VelociousSyncRealtimeSubscription} subscribeChannel - Opens one channel subscription.
416
- * @property {() => Promise<void>} disconnectAndStopReconnect - Closes the socket and stops auto-reconnect.
417
- */
418
- /**
419
- * Channel subscription handle returned by `subscribeChannel`.
420
- * @typedef {object} VelociousSyncRealtimeSubscription
421
- * @property {() => void} close - Closes the subscription.
422
- * @property {() => boolean} isReady - Whether the subscription is acknowledged and ready.
423
- * @property {(params?: {timeoutMs?: number}) => Promise<void>} waitForReady - Resolves once the server acknowledges the subscription.
424
- */
425
- /**
426
- * One realtime channel subscription descriptor.
427
- * @typedef {object} VelociousSyncRealtimeChannelDescriptor
428
- * @property {string} channel - Server channel name to subscribe.
429
- * @property {Record<string, ?>} [params] - Subscribe params (runtime scope values). The framework injects `authenticationToken` automatically.
430
- * @property {string} [resourceType] - Default resource/model name for pushed changes that do not carry their own resourceType.
431
- */
432
- /**
433
- * Realtime push configuration for the sync client. Only the genuinely
434
- * app-owned callback lives here: how to build the websocket client.
435
- * Everything else - deriving the framework sync channel subscriptions from
436
- * the declared pull scopes, subscribing, applying pushes through the derived
437
- * resource applier, echo suppression, and pull-on-reconnect - is derived.
438
- * @typedef {object} VelociousSyncClientRealtimeConfiguration
439
- * @property {() => VelociousSyncRealtimeWebsocketClient | Promise<VelociousSyncRealtimeWebsocketClient>} createClient - Builds the (unconnected) websocket client; the framework owns connect/disconnect.
440
- * @property {(context: ?) => Array<VelociousSyncRealtimeChannelDescriptor> | Promise<Array<VelociousSyncRealtimeChannelDescriptor>>} [channels] - Deprecated legacy escape hatch: resolves extra app-channel descriptors from the `subscribeRealtime(context)` context. Declared pull scopes subscribe the framework sync channel automatically.
441
- * @property {() => string | Promise<string>} [localOrigin] - Resolves this device's echo origin; pushed messages with a matching `echoOrigin` are dropped.
442
- * @property {boolean} [pullOnReconnect] - Fire a coalesced `pull()` when subscriptions become ready or resume after a drop, closing offline gaps. Defaults to true.
443
- */
444
- /**
445
- * Client-side sync configuration consumed by `SyncClient.fromConfiguration(...)`.
446
- * The framework owns the `${mountPath}/changes` and `${mountPath}/replay`
447
- * POSTers over the given transport.
448
- * @typedef {object} VelociousSyncClientConfiguration
449
- * @property {() => string | Promise<string>} authenticationToken - Resolves the auth token sent with sync requests.
450
- * @property {number} [batchSize] - Max syncs per request.
451
- * @property {() => boolean | Promise<boolean>} [isOnline] - Connectivity gate for pulls and replays. Defaults to always online.
452
- * @property {string} [mountPath] - Mount path the server serves the sync endpoints under (match the server's `sync.api.mountPath`). Defaults to "/velocious/sync"; normalization strips trailing slashes and always fills in the default.
453
- * @property {(error: Error) => void} [onError] - Reports background replay/pull failures. Defaults to rethrowing.
454
- * @property {VelociousSyncClientRealtimeConfiguration} [realtime] - Realtime push configuration consumed by `subscribeRealtime(...)`.
455
- * @property {VelociousSyncClientTransport} transport - Transport posting to the framework sync endpoints (e.g. the frontend-model websocket client).
456
- * @property {VelociousSyncRealtimeWebsocketClient} [websocketClient] - Shared app-lifetime websocket client (the low-level form) that all sync traffic rides. Provide the same instance the frontend-model transport uses so one connection carries everything. When set, the realtime bridge subscribes channels on it and never owns its lifecycle: unsubscribing closes only channel subscriptions, leaving the socket connected.
457
- * @property {string | (() => string | null | undefined)} [websocketUrl] - Shared app-lifetime websocket URL. When set (and no `websocketClient` is given), the framework builds and owns one reconnecting `VelociousWebsocketClient` for all sync traffic, connected on first use.
458
- */
459
- /**
460
- * Velocious sync configuration.
461
- * @typedef {object} VelociousSyncConfiguration
462
- * @property {VelociousSyncApiConfiguration} [api] - Auto-mounts the Velocious sync changes/replay endpoints for this resource class.
463
- * @property {VelociousSyncClientConfiguration} [client] - Client-side sync configuration consumed by `SyncClient.fromConfiguration(...)`.
464
- * @property {import("./sync/device-identity.js").SyncJsonWebKey | null} [deviceCertificateBackendPublicKey] - Public backend key used to verify offline device certificates for sync replay.
465
- * @property {number} [changeFeedRetentionSize] - Number of accepted server changes retained before clients must refresh from snapshot.
466
- * @property {Array<import("./sync/offline-grant.js").OfflineGrantSigningKey>} offlineGrantSigningKeys - Signing keys used to issue and verify offline grants. Secrets must never be exposed to clients.
467
- * @property {number} [offlineGrantTtlMs] - Default offline grant TTL in milliseconds. Defaults to 24 hours.
468
- */
469
- /**
470
- * Frontend-safe normalized sync metadata.
471
- * @typedef {object} NormalizedFrontendModelResourceSyncConfiguration
472
- * @property {"optimisticVersion" | "serverWins" | "lastWriterWins" | "fieldThreeWay" | "appendOnly"} conflictStrategy - Normalized replay conflict strategy.
473
- * @property {boolean} enabled - Whether the resource is sync-enabled.
474
- * @property {string[]} operations - Sorted, duplicate-free sync operation names.
475
- * @property {string | null} policyVersion - App-controlled policy version, or null.
476
- * @property {string} policyHash - Deterministic sha256 hash of safe policy inputs.
477
- * @property {Record<string, FrontendModelSyncJsonValue>} [metadata] - Safe frontend-visible metadata.
478
- */
479
- /**
480
- * @typedef {Omit<FrontendModelResourceConfiguration, "abilities" | "builtInCollectionCommands" | "builtInMemberCommands" | "collectionCommands" | "commands" | "memberCommands" | "sync"> & {
481
- * abilities: FrontendModelResourceAbilitiesConfiguration
482
- * builtInCollectionCommands: Record<string, string>
483
- * builtInMemberCommands: Record<string, string>
484
- * collectionCommands: Record<string, string>
485
- * commandMetadata: Record<string, {args: Array<{name: string, type: string}>, returnType: string | null}>
486
- * memberCommands: Record<string, string>
487
- * sync?: NormalizedFrontendModelResourceSyncConfiguration
488
- * }} NormalizedFrontendModelResourceConfiguration
489
- */
490
- /**
491
- * @typedef {Omit<typeof import("./frontend-model-resource/base-resource.js").default, never> & {new (args: import("./frontend-model-resource/base-resource.js").FrontendModelResourceAbilityArgs | import("./frontend-model-resource/base-resource.js").FrontendModelResourceControllerArgs): import("./frontend-model-resource/base-resource.js").default<typeof import("./database/record/index.js").default>}} FrontendModelResourceClassType
492
- */
493
- /**
494
- * @typedef {FrontendModelResourceClassType} FrontendModelResourceDefinition
495
- */
496
- /**
497
- * @typedef {object} FrontendModelResourceAbilitiesConfiguration
498
- * @property {string} [index] - Ability action for frontend index.
499
- * @property {string} [find] - Ability action for frontend find.
500
- * @property {string} [create] - Ability action for frontend create.
501
- * @property {string} [update] - Ability action for frontend update.
502
- * @property {string} [destroy] - Ability action for frontend destroy.
503
- */
504
- /**
505
- * @typedef {object} FrontendModelResourceServerConfiguration
506
- * @property {function({action: "index" | "find" | "create" | "update" | "destroy" | "attach" | "attachmentList" | "download" | "url", controller: import("./controller.js").default, params: Record<string, ?>, modelClass: typeof import("./database/record/index.js").default}) : (boolean | void | Promise<boolean | void>)} [beforeAction] - Optional callback run before built-in frontend actions.
507
- * @property {function({action: "index", controller: import("./controller.js").default, params: Record<string, ?>, modelClass: typeof import("./database/record/index.js").default}) : Promise<import("./database/record/index.js").default[]>} [records] - Records loader for frontendIndex.
508
- * @property {function({action: "index" | "find" | "create" | "update", controller: import("./controller.js").default, params: Record<string, ?>, modelClass: typeof import("./database/record/index.js").default, model: import("./database/record/index.js").default}) : Record<string, ?> | Promise<Record<string, ?>>} [serialize] - Record serializer for response payloads.
509
- * @property {function({action: "find" | "update" | "destroy" | "attach" | "attachmentList" | "download" | "url", controller: import("./controller.js").default, params: Record<string, ?>, modelClass: typeof import("./database/record/index.js").default, id: string | number}) : Promise<import("./database/record/index.js").default | null>} [find] - Record loader for find/update/destroy/attach/download/url actions.
510
- * @property {function({action: "create", controller: import("./controller.js").default, params: Record<string, ?>, modelClass: typeof import("./database/record/index.js").default, attributes: Record<string, ?>}) : Promise<import("./database/record/index.js").default>} [create] - Custom create callback.
511
- * @property {function({action: "update", controller: import("./controller.js").default, params: Record<string, ?>, modelClass: typeof import("./database/record/index.js").default, model: import("./database/record/index.js").default, attributes: Record<string, ?>}) : Promise<import("./database/record/index.js").default | void>} [update] - Custom update callback.
512
- * @property {function({action: "destroy", controller: import("./controller.js").default, params: Record<string, ?>, modelClass: typeof import("./database/record/index.js").default, model: import("./database/record/index.js").default}) : Promise<void>} [destroy] - Custom destroy callback.
513
- */
514
- /**
515
- * @typedef {object} BackendProjectConfiguration
516
- * @property {string} path - Path to the backend project. May be an app root or a contributing package root (package entries are appended internally from `packages`).
517
- * @property {string} [frontendModelsOutputPath] - Optional output project path where `src/frontend-models` should be generated.
518
- * @property {string} [resourcesPath] - Optional override for the resources directory to auto-discover; defaults to `<path>/src/resources`. Set internally for package entries.
519
- * @property {Record<string, FrontendModelResourceDefinition>} [frontendModels] - Auto-discovered frontend model definitions keyed by model class name. Set internally by the environment handler — do not set manually.
520
- * @property {AbilityResourceClassType[]} [abilityResources] - Auto-discovered ability resource classes (frontend-model and authorization) from this project's resources directory. Set internally by the environment handler — do not set manually.
521
- */
522
- /**
523
- * A descriptor for an external Velocious package (engine) that contributes models,
524
- * resources and migrations. A package usually exports `new VelociousPackage({name, url: import.meta.url})`.
525
- * @typedef {object} VelociousPackageDescriptor
526
- * @property {string} name - The package name.
527
- * @property {string} [url] - The descriptor module's `import.meta.url`; the package root is derived from it when `path` is omitted.
528
- * @property {string} [path] - The package root directory (the one containing `src`). Derived from `url` when omitted.
529
- * @property {string} [modelsPath] - Override for the package's models directory (default `<path>/src/models`).
530
- * @property {string} [resourcesPath] - Override for the package's frontend-model resources directory (default `<path>/src/resources`).
531
- * @property {string} [migrationsPath] - Override for the package's migrations directory (default `<path>/src/database/migrations`).
532
- */
533
- /**
534
- * @typedef {import("./packages/velocious-package.js").default | VelociousPackageDescriptor} VelociousPackageConfiguration
535
- */
536
- /**
537
- * @typedef {object} RouteResolverHookArgs
538
- * @property {import("./configuration.js").default} configuration - Configuration instance.
539
- * @property {Record<string, ?>} params - Mutable request params object.
540
- * @property {string} currentPath - Request path without query.
541
- * @property {boolean} [hasMatchingCustomRoute] - True when matching a configured custom route.
542
- * @property {import("./http-server/client/request.js").default | import("./http-server/client/websocket-request.js").default} request - Request object.
543
- * @property {import("./http-server/client/response.js").default} response - Response object.
544
- * @property {import("./routes/resolver.js").default} resolver - Resolver instance.
545
- */
546
- /**
547
- * @typedef {object} RouteResolverHookResult
548
- * @property {string} action - Dasherized action name (for example `frontend-index`).
549
- * @property {string} controller - Controller path (for example `accounts`).
550
- * @property {typeof import("./controller.js").default} [controllerClass] - Optional controller class override.
551
- * @property {string} [controllerPath] - Optional absolute/relative controller file path override.
552
- * @property {Record<string, ?>} [params] - Extra params to merge for controller/action.
553
- * @property {boolean} [skipAbilityResolution] - Whether to run the controller action without resolving request ability.
554
- * @property {boolean} [skipControllerConnections] - Whether to run the controller action without the automatic database checkout wrapper.
555
- * @property {boolean} [skipTenantResolution] - Whether to run the controller action without resolving request tenant.
556
- * @property {string} [viewPath] - Optional view path override used by controller render lookups.
557
- */
558
- /**
559
- * @typedef {function(RouteResolverHookArgs) : RouteResolverHookResult | null | Promise<RouteResolverHookResult | null>} RouteResolverHookType
560
- */
561
- /**
562
- * @typedef {typeof import("./authorization/base-resource.js").default} AbilityResourceClassType
563
- */
564
- /**
565
- * @typedef {function({configuration: import("./configuration.js").default, params: Record<string, ?>, request: import("./http-server/client/request.js").default | import("./http-server/client/websocket-request.js").default | undefined, response: import("./http-server/client/response.js").default | undefined}) : import("./authorization/ability.js").default | void | Promise<import("./authorization/ability.js").default | void>} AbilityResolverType
566
- */
567
- /**
568
- * @typedef {function({configuration: import("./configuration.js").default, params: Record<string, ?>, request: import("./http-server/client/request.js").default | import("./http-server/client/websocket-request.js").default | undefined, response: import("./http-server/client/response.js").default | undefined, subscription?: {channel: string, params?: Record<string, ?>}}) : ? | void | Promise<? | void>} TenantResolverType
569
- */
570
- /**
571
- * @typedef {function({configuration: import("./configuration.js").default, databaseConfiguration: DatabaseConfigurationType, identifier: string, tenant: ?}) : DatabaseConfigurationType | Partial<DatabaseConfigurationType> | void} TenantDatabaseResolverType
572
- */
573
- /**
574
- * @typedef {object} ApiManifestConfiguration
575
- * @property {string} [path] - HTTP path for the built-in API manifest endpoint. Defaults to `/api/manifest`.
576
- * @property {string} [token] - Bearer token required in the `Authorization: Bearer <token>` header. When set, requests without a matching token are not routed (404), so the endpoint stays hidden.
577
- */
578
- /**
579
- * @typedef {object} DebugEndpointConfiguration
580
- * @property {string} [path] - HTTP path for the built-in debug endpoint. Defaults to `/velocious/debug`.
581
- * @property {string} [token] - Bearer token required in the `Authorization: Bearer <token>` header. When set, requests without a matching token are not routed (404), so the endpoint stays hidden.
582
- */
583
- /**
584
- * @typedef {object} TenantDatabaseProviderType
585
- * @property {function({configuration: import("./configuration.js").default, identifier: string}) : Array<?> | Promise<Array<?>>} listTenants - Lists tenants that should be created, checked, or migrated for this database identifier.
586
- * @property {function({configuration: import("./configuration.js").default, identifier: string}) : Array<?> | Promise<Array<?>>} [listRestrictTenants] - Lists existing tenants that should be checked for dependent restrict destroys. Defaults to listTenants.
587
- * @property {function({configuration: import("./configuration.js").default, databaseConfiguration: DatabaseConfigurationType, identifier: string, tenant: ?}) : void | Promise<void>} [createDatabase] - Creates the tenant database/schema for one tenant.
588
- * @property {function({configuration: import("./configuration.js").default, databaseConfiguration: DatabaseConfigurationType, identifier: string, tenant: ?}) : void | Promise<void>} [dropDatabase] - Drops the tenant database/schema for one tenant.
589
- * @property {function({configuration: import("./configuration.js").default, databaseConfiguration: DatabaseConfigurationType, identifier: string, tenant: ?}) : void | Promise<void>} [checkTenant] - Checks one tenant database before generic connection validation.
590
- * @property {function({configuration: import("./configuration.js").default, databaseConfiguration: DatabaseConfigurationType, identifier: string, migrationsApplied: number, tenant: ?}) : void | Promise<void>} [afterMigrateTenant] - Runs app-owned tenant work after generic migrations for one tenant. `migrationsApplied` is how many migrations actually ran (0 when the tenant was already up to date), so the app can skip expensive per-tenant work on no-op deploys.
591
- */
592
- /**
593
- * @typedef {object} ConfigurationArgsType
594
- * @property {boolean} [autoload] - Globally enable auto-batch-preload of relationships on lazy access. Default true.
595
- * @property {CorsType} [cors] - CORS configuration for the HTTP server.
596
- * @property {string} [cookieSecret] - Secret for encrypting cookies.
597
- * @property {AbilityResourceClassType[]} [abilityResources] - Resource classes used to define abilities per model.
598
- * @property {AbilityResolverType} [abilityResolver] - Resolver for creating request-scoped ability instances.
599
- * @property {AttachmentsConfiguration} [attachments] - Attachment storage configuration.
600
- * @property {BackendProjectConfiguration[]} [backendProjects] - Backend project definitions used for frontend model generation.
601
- * @property {VelociousPackageConfiguration[]} [packages] - External Velocious packages that contribute models, frontend-model resources and migrations.
602
- * @property {{[key: string]: {[key: string]: DatabaseConfigurationType}}} database - Database configurations keyed by environment and identifier.
603
- * @property {boolean} [debug] - Enable debug logging.
604
- * @property {boolean | DebugEndpointConfiguration} [debugEndpoint] - Enable the built-in debug endpoint. Defaults to false.
605
- * @property {boolean | ApiManifestConfiguration} [apiManifest] - Enable the built-in API manifest endpoint. Defaults to false.
606
- * @property {string} [directory] - Base directory for the project.
607
- * @property {boolean} [enforceTenantDatabaseScopes] - Require tenant-switched model queries to resolve a tenant database identifier. Defaults to true.
608
- * @property {string} [environment] - Current environment name.
609
- * @property {import("./environment-handlers/base.js").default} environmentHandler - Environment handler instance.
610
- * @property {boolean} [exposeInternalErrorsToClients] - Return unexpected internal error details in client API payloads outside production. Defaults to false.
611
- * @property {HttpServerConfiguration} [httpServer] - Default HTTP server configuration for applications started from this configuration.
612
- * @property {LoggingConfiguration} [logging] - Logging configuration.
613
- * @property {BackgroundJobsConfiguration} [backgroundJobs] - Background jobs configuration.
614
- * @property {BeaconConfiguration} [beacon] - Beacon broadcast bus configuration.
615
- * @property {ScheduledBackgroundJobsConfiguration | ScheduledBackgroundJobsLoaderType} [scheduledBackgroundJobs] - Scheduled background jobs configuration.
616
- * @property {MailerBackend} [mailerBackend] - Mail delivery backend.
617
- * @property {function({configuration: import("./configuration.js").default, type: string}) : void} initializeModels - Hook to register models for a given initialization type.
618
- * @property {InitializersType} [initializers] - Initializer loader for environment bootstrapping.
619
- * @property {string | function() : string} locale - Default locale or locale resolver.
620
- * @property {string[]} locales - Supported locales.
621
- * @property {LocaleFallbacksType} localeFallbacks - Locale fallback map.
622
- * @property {StructureSqlConfiguration} [structureSql] - Structure SQL generation configuration.
623
- * @property {VelociousSyncConfiguration} [sync] - Local/offline sync framework configuration.
624
- * @property {TenantResolverType} [tenantResolver] - Resolver for creating request-scoped tenant context objects.
625
- * @property {TenantDatabaseResolverType} [tenantDatabaseResolver] - Resolver for deriving tenant-specific database config overrides.
626
- * @property {Record<string, TenantDatabaseProviderType>} [tenantDatabaseProviders] - Tenant database lifecycle providers keyed by database identifier.
627
- * @property {string} [testing] - Path to the testing configuration file.
628
- * @property {string | (() => string | undefined)} [timeZone] - Default timezone for timezone-less datetime strings.
629
- * @property {number | (() => number)} [timezoneOffsetMinutes] - Default timezone offset in minutes.
630
- * @property {string | string[]} [trustedProxies] - Trusted reverse proxy address ranges used to resolve request remote addresses from forwarding headers.
631
- * @property {number | (() => number)} [requestTimeoutMs] - Timeout in seconds for completing a HTTP request.
632
- * @property {RouteResolverHookType[]} [routeResolverHooks] - Hook callbacks that can hijack unresolved routes.
633
- * @property {WebsocketChannelResolverType} [websocketChannelResolver] - Resolve a websocket channel class/instance for each connection.
634
- * @property {WebsocketMessageHandlerResolverType} [websocketMessageHandlerResolver] - Resolve a raw websocket message handler for each connection.
635
- */
636
- export const nothing: {};
637
- export type CorsType = (arg0: {
1
+ export type CorsType = (args: {
638
2
  request: import("./http-server/client/request.js").default | import("./http-server/client/websocket-request.js").default;
639
3
  response: import("./http-server/client/response.js").default;
640
4
  }) => Promise<void>;
641
- export type WebsocketChannelResolverType = (arg0: {
5
+ export type WebsocketChannelResolverType = (args: {
642
6
  request: import("./http-server/client/request.js").default | import("./http-server/client/websocket-request.js").default | undefined;
643
7
  subscription?: {
644
8
  channel: string;
645
- params?: Record<string, unknown>;
9
+ params?: Record<string, ReturnType<typeof JSON.parse>>;
646
10
  };
647
11
  client: import("./http-server/client/index.js").default;
648
12
  websocketSession: import("./http-server/client/websocket-session.js").default;
@@ -652,31 +16,31 @@ export type WebsocketMessageHandler = {
652
16
  /**
653
17
  * - Handler for incoming websocket messages.
654
18
  */
655
- onMessage?: ((arg0: {
656
- message: unknown;
19
+ onMessage?: (args: {
20
+ message: ReturnType<typeof JSON.parse>;
657
21
  session: import("./http-server/client/websocket-session.js").default;
658
- }) => Promise<void> | void) | undefined;
22
+ }) => Promise<void> | void;
659
23
  /**
660
24
  * - Handler when the websocket session opens.
661
25
  */
662
- onOpen?: ((arg0: {
26
+ onOpen?: (args: {
663
27
  session: import("./http-server/client/websocket-session.js").default;
664
- }) => Promise<void> | void) | undefined;
28
+ }) => Promise<void> | void;
665
29
  /**
666
30
  * - Handler when the websocket session closes.
667
31
  */
668
- onClose?: ((arg0: {
32
+ onClose?: (args: {
669
33
  session: import("./http-server/client/websocket-session.js").default;
670
- }) => Promise<void> | void) | undefined;
34
+ }) => Promise<void> | void;
671
35
  /**
672
36
  * - Handler when a websocket message errors.
673
37
  */
674
- onError?: ((arg0: {
38
+ onError?: (args: {
675
39
  error: Error;
676
40
  session: import("./http-server/client/websocket-session.js").default;
677
- }) => Promise<void> | void) | undefined;
41
+ }) => Promise<void> | void;
678
42
  };
679
- export type WebsocketMessageHandlerResolverType = (arg0: {
43
+ export type WebsocketMessageHandlerResolverType = (args: {
680
44
  request: import("./http-server/client/request.js").default | import("./http-server/client/websocket-request.js").default | undefined;
681
45
  client: import("./http-server/client/index.js").default;
682
46
  configuration: import("./configuration.js").default;
@@ -691,201 +55,174 @@ export type WebpackRequireContext = InitializersRequireContextType & {
691
55
  export type InitializersExportType = {
692
56
  requireContext: WebpackRequireContext;
693
57
  };
694
- export type InitializersType = (arg0: {
58
+ export type InitializersType = (args: {
695
59
  configuration: import("./configuration.js").default;
696
60
  }) => Promise<InitializersExportType>;
697
61
  export type SqlConfig = {
698
62
  /**
699
63
  * - Database name for the SQL driver.
700
64
  */
701
- database?: string | undefined;
65
+ database?: string;
702
66
  /**
703
67
  * - Driver-specific connection options.
704
68
  */
705
69
  options?: {
706
- /**
707
- * - Whether to encrypt the connection (MSSQL).
708
- */
709
- encrypt?: boolean | undefined;
710
- /**
711
- * - Default schema for unqualified table lookups (MSSQL).
712
- */
713
- schema?: string | undefined;
714
- /**
715
- * - TLS SNI server name override for MSSQL (empty string disables SNI).
716
- */
717
- serverName?: string | undefined;
718
- /**
719
- * - Whether to trust the server certificate (MSSQL).
720
- */
721
- trustServerCertificate?: boolean | undefined;
722
- } | undefined;
70
+ encrypt?: boolean;
71
+ schema?: string;
72
+ serverName?: string;
73
+ trustServerCertificate?: boolean;
74
+ };
723
75
  /**
724
76
  * - Password for the SQL user.
725
77
  */
726
- password?: string | undefined;
78
+ password?: string;
727
79
  /**
728
80
  * - Connection pool configuration.
729
81
  */
730
82
  pool?: {
731
- /**
732
- * - Maximum number of connections. Set null to disable the cap.
733
- */
734
- max?: number | null | undefined;
735
- /**
736
- * - Minimum number of connections.
737
- */
738
- min?: number | undefined;
739
- /**
740
- * - Idle timeout before releasing a connection.
741
- */
742
- idleTimeoutMillis?: number | undefined;
743
- /**
744
- * - Timeout while waiting for an available connection after the max connection cap is reached. Set null to wait indefinitely.
745
- */
746
- checkoutTimeoutMillis?: number | null | undefined;
747
- } | undefined;
83
+ max?: number | null;
84
+ min?: number;
85
+ idleTimeoutMillis?: number;
86
+ checkoutTimeoutMillis?: number | null;
87
+ };
748
88
  /**
749
89
  * - SQL server hostname.
750
90
  */
751
- server?: string | undefined;
91
+ server?: string;
752
92
  /**
753
93
  * - SQL username.
754
94
  */
755
- user?: string | undefined;
95
+ user?: string;
756
96
  };
757
97
  export type DatabasePoolConfiguration = {
758
98
  /**
759
99
  * - Timeout while a checkout waits for an available async-tracked connection after the max live connection cap is reached. Set null to wait indefinitely. Default: 10000.
760
100
  */
761
- checkoutTimeoutMillis?: number | null | undefined;
101
+ checkoutTimeoutMillis?: number | null;
762
102
  /**
763
103
  * - Idle timeout before closing a checked-in async-tracked connection. Set null to disable idle reaping. Default: 5000.
764
104
  */
765
- idleTimeoutMillis?: number | null | undefined;
105
+ idleTimeoutMillis?: number | null;
766
106
  /**
767
107
  * - Maximum live async-tracked connections for this pool. Defaults to 10. Extra checkouts wait until a matching connection is checked in or capacity is freed. Set null to disable the cap.
768
108
  */
769
- max?: number | null | undefined;
109
+ max?: number | null;
770
110
  };
771
111
  export type DatabaseConfigurationType = {
772
112
  /**
773
113
  * - Default character set applied by `db:create` via mysql/mariadb `CREATE DATABASE ... CHARACTER SET`. Distinct from `charset`, which is the client connection charset forwarded to the mysql2 driver.
774
114
  */
775
- databaseCharset?: string | undefined;
115
+ databaseCharset?: string;
776
116
  /**
777
117
  * - Default collation applied by `db:create` via mysql/mariadb `CREATE DATABASE ... COLLATE`.
778
118
  */
779
- databaseCollation?: string | undefined;
119
+ databaseCollation?: string;
780
120
  /**
781
121
  * - Database name for this connection.
782
122
  */
783
- database?: string | undefined;
123
+ database?: string;
784
124
  /**
785
125
  * - Maximum attempts for the outermost transaction when it keeps hitting deadlocks. Defaults to 8.
786
126
  */
787
- deadlockMaxRetries?: number | undefined;
127
+ deadlockMaxRetries?: number;
788
128
  /**
789
129
  * - Base delay (ms) for the deadlock retry backoff; the per-attempt ceiling doubles from here. Defaults to 50.
790
130
  */
791
- deadlockBaseWaitMs?: number | undefined;
131
+ deadlockBaseWaitMs?: number;
792
132
  /**
793
133
  * - Cap (ms) on the deadlock retry backoff ceiling so the jittered wait stays bounded. Defaults to 1000.
794
134
  */
795
- deadlockMaxWaitMs?: number | undefined;
135
+ deadlockMaxWaitMs?: number;
796
136
  /**
797
137
  * - Driver class to use for this database.
798
138
  */
799
- driver?: typeof import("./database/drivers/base.js").default | undefined;
139
+ driver?: typeof import("./database/drivers/base.js").default;
800
140
  /**
801
141
  * - Pool class to use for this database.
802
142
  */
803
- poolType?: typeof import("./database/pool/base.js").default | undefined;
143
+ poolType?: typeof import("./database/pool/base.js").default;
804
144
  /**
805
145
  * - Custom connection factory override.
806
146
  */
807
- getConnection?: (() => unknown) | undefined;
147
+ getConnection?: () => ReturnType<typeof JSON.parse>;
808
148
  /**
809
149
  * - Database host.
810
150
  */
811
- host?: string | undefined;
151
+ host?: string;
812
152
  /**
813
153
  * - Whether migrations are enabled for this database.
814
154
  */
815
- migrations?: boolean | undefined;
155
+ migrations?: boolean;
816
156
  /**
817
157
  * - (MySQL) Opt in to multi-statement queries so a whole structure SQL dump loads in one round-trip via `StructureSqlLoader`. Off by default; ordinary queries otherwise reject stacked statements.
818
158
  */
819
- multipleStatements?: boolean | undefined;
159
+ multipleStatements?: boolean;
820
160
  /**
821
161
  * - Password for the database user.
822
162
  */
823
- password?: string | undefined;
163
+ password?: string;
824
164
  /**
825
165
  * - Database port.
826
166
  */
827
- port?: number | undefined;
167
+ port?: number;
828
168
  /**
829
169
  * - Default type for implicit migration primary keys and references. Defaults to `uuid`.
830
170
  */
831
- primaryKeyType?: string | undefined;
171
+ primaryKeyType?: string;
832
172
  /**
833
173
  * - Velocious database pool lifecycle configuration.
834
174
  */
835
- pool?: DatabasePoolConfiguration | undefined;
175
+ pool?: DatabasePoolConfiguration;
836
176
  /**
837
177
  * - Friendly name for the configuration.
838
178
  */
839
- name?: string | undefined;
179
+ name?: string;
840
180
  /**
841
181
  * - Optional sqlite-web sql.js wasm resolver (`initSqlJs({locateFile})`).
842
182
  */
843
- locateFile?: ((file: string) => string) | undefined;
183
+ locateFile?: (file: string) => string;
844
184
  /**
845
185
  * - Whether writes should be blocked for this database.
846
186
  */
847
- readOnly?: boolean | undefined;
187
+ readOnly?: boolean;
848
188
  /**
849
189
  * - Default schema for unqualified table lookups (MSSQL).
850
190
  */
851
- schema?: string | undefined;
191
+ schema?: string;
852
192
  /**
853
193
  * - Whether schema metadata should be cached on the driver. Defaults to true.
854
194
  */
855
- schemaCache?: boolean | undefined;
195
+ schemaCache?: boolean;
856
196
  /**
857
197
  * - Record-level configuration.
858
198
  */
859
199
  record?: {
860
- /**
861
- * - Whether record operations should use transactions.
862
- */
863
- transactions?: boolean | undefined;
864
- } | undefined;
200
+ transactions?: boolean;
201
+ };
865
202
  /**
866
203
  * - Whether to reset the database on startup.
867
204
  */
868
- reset?: boolean | undefined;
205
+ reset?: boolean;
869
206
  /**
870
207
  * - Driver-specific SQL config.
871
208
  */
872
- sqlConfig?: SqlConfig | undefined;
209
+ sqlConfig?: SqlConfig;
873
210
  /**
874
211
  * - Whether this database identifier is only active inside a resolved tenant context.
875
212
  */
876
- tenantOnly?: boolean | undefined;
213
+ tenantOnly?: boolean;
877
214
  /**
878
215
  * - Database type identifier.
879
216
  */
880
- type?: "sqlite" | "mysql" | "pgsql" | "mssql" | undefined;
217
+ type?: "mssql" | "mysql" | "pgsql" | "sqlite";
881
218
  /**
882
219
  * - Database to switch to after connecting.
883
220
  */
884
- useDatabase?: string | undefined;
221
+ useDatabase?: string;
885
222
  /**
886
223
  * - Username for database authentication.
887
224
  */
888
- username?: string | undefined;
225
+ username?: string;
889
226
  };
890
227
  export type LogLevel = "debug-low-level" | "debug" | "info" | "warn" | "error";
891
228
  export type LoggingOutputPayload = {
@@ -910,11 +247,11 @@ export type LoggingOutput = {
910
247
  /**
911
248
  * - Write a log entry.
912
249
  */
913
- write: (arg0: LoggingOutputPayload) => Promise<void> | void;
250
+ write: (arg: LoggingOutputPayload) => Promise<void> | void;
914
251
  /**
915
252
  * - Default levels for this output.
916
253
  */
917
- levels?: LogLevel[] | undefined;
254
+ levels?: LogLevel[];
918
255
  };
919
256
  export type LoggingOutputConfig = {
920
257
  /**
@@ -924,81 +261,71 @@ export type LoggingOutputConfig = {
924
261
  /**
925
262
  * - Levels enabled for this output.
926
263
  */
927
- levels?: LogLevel[] | undefined;
264
+ levels?: Array<LogLevel>;
928
265
  };
929
266
  export type LoggerConfig = LoggingOutputConfig | LoggingOutput | import("./logger/base-logger.js").default;
930
267
  export type LoggingConfiguration = {
931
268
  /**
932
269
  * - Enable/disable console logging for request logging. Defaults to true outside of "test" and for HTTP server logs.
933
270
  */
934
- console?: boolean | undefined;
271
+ console?: boolean;
935
272
  /**
936
273
  * - Enable/disable writing logs to a file. Defaults to true.
937
274
  */
938
- file?: boolean | undefined;
275
+ file?: boolean;
939
276
  /**
940
277
  * - Directory where log files are stored. Defaults to "<project>/log".
941
278
  */
942
- directory?: string | undefined;
279
+ directory?: string;
943
280
  /**
944
281
  * - Explicit path for the log file. Defaults to "<directory>/<environment>.log".
945
282
  */
946
- filePath?: string | undefined;
283
+ filePath?: string;
947
284
  /**
948
285
  * - Override which log levels are emitted.
949
286
  */
950
- levels?: ("debug" | "error" | "info" | "warn" | "debug-low-level")[] | undefined;
287
+ levels?: Array<"debug-low-level" | "debug" | "info" | "warn" | "error">;
951
288
  /**
952
289
  * - Convenience flag to include very low-level debug logs.
953
290
  */
954
- debugLowLevel?: boolean | undefined;
291
+ debugLowLevel?: boolean;
955
292
  /**
956
293
  * - Enable/disable database query logging. Defaults to true outside test and false in test.
957
294
  */
958
- queryLogging?: boolean | undefined;
295
+ queryLogging?: boolean;
959
296
  /**
960
297
  * - Logger instances (converted to outputs when configured).
961
298
  */
962
- loggers?: LoggerConfig[] | undefined;
299
+ loggers?: LoggerConfig[];
963
300
  /**
964
301
  * - Explicit logger outputs (overrides console/file defaults when provided).
965
302
  */
966
- outputs?: LoggingOutputConfig[] | undefined;
303
+ outputs?: LoggingOutputConfig[];
967
304
  };
968
305
  export type StructureSqlConfiguration = {
969
306
  /**
970
307
  * - Environments allowed to write structure sql files during automatic migration dumps.
971
308
  */
972
- enabledEnvironments?: string[] | undefined;
309
+ enabledEnvironments?: string[];
973
310
  /**
974
311
  * - Environments that should skip writing structure sql files.
975
312
  */
976
- disabledEnvironments?: string[] | undefined;
313
+ disabledEnvironments?: string[];
977
314
  };
978
- /**
979
- * - `"beacon"` (default): event-driven dispatch. The
980
- * `background-jobs-main` process drains the queue on enqueue, on
981
- * worker readiness, on Beacon broadcasts (so cross-process enqueues
982
- * wake it), and arms a `setTimeout` for the soonest future-scheduled
983
- * job. Falls back gracefully to direct in-process triggering when
984
- * Beacon is not configured.
985
- * - `"polling"`: legacy mode, runs a fixed-interval poll over the
986
- * `background_jobs` table (see `pollIntervalMs`).
987
- */
988
315
  export type BackgroundJobsDispatchStrategy = "beacon" | "polling";
989
316
  export type BackgroundJobsConfiguration = {
990
317
  /**
991
318
  * - Hostname for the background jobs main process.
992
319
  */
993
- host?: string | undefined;
320
+ host?: string;
994
321
  /**
995
322
  * - Port for the background jobs main process.
996
323
  */
997
- port?: number | undefined;
324
+ port?: number;
998
325
  /**
999
326
  * - Database identifier used to store background jobs.
1000
327
  */
1001
- databaseIdentifier?: string | undefined;
328
+ databaseIdentifier?: string;
1002
329
  /**
1003
330
  * - How many `forked: false` jobs a single
1004
331
  * `background-jobs-worker` process is allowed to run in parallel. Concurrency
@@ -1007,7 +334,7 @@ export type BackgroundJobsConfiguration = {
1007
334
  * CPU count. Forking remains the right tool for memory isolation across
1008
335
  * long-running jobs and for using more cores. Default: `4`.
1009
336
  */
1010
- maxConcurrentInlineJobs?: number | undefined;
337
+ maxConcurrentInlineJobs?: number;
1011
338
  /**
1012
339
  * - How many out-of-process
1013
340
  * `"forked"` or `"spawned"` jobs a single `background-jobs-worker` is
@@ -1015,27 +342,27 @@ export type BackgroundJobsConfiguration = {
1015
342
  * for workload-shaped limits use per-queue caps (`queues`) instead, which are
1016
343
  * enforced cluster-wide and are immune to duplicate worker processes.
1017
344
  */
1018
- maxConcurrentForkedJobs?: number | undefined;
345
+ maxConcurrentForkedJobs?: number;
1019
346
  /**
1020
347
  * - Number of warm, reusable child runners owned by each worker. Pooled capacity is separate from inline and forked/spawned capacity. Default: `4`.
1021
348
  */
1022
- pooledRunnerCount?: number | undefined;
349
+ pooledRunnerCount?: number;
1023
350
  /**
1024
351
  * - Number of jobs each pooled child runs concurrently on its own event loop. Total per-worker pooled capacity is `pooledRunnerCount × pooledRunnerConcurrency`. `1` (default) keeps each child serial; raise it for I/O-bound jobs so a bounded set of isolated processes handles high concurrency (like the inline lane) without one process per concurrent job. Default: `1`.
1025
352
  */
1026
- pooledRunnerConcurrency?: number | undefined;
353
+ pooledRunnerConcurrency?: number;
1027
354
  /**
1028
355
  * - Number of sequential jobs a pooled child runs before it is replaced, bounding process-level resource accumulation. Default: `100`.
1029
356
  */
1030
- pooledRunnerMaxJobs?: number | undefined;
357
+ pooledRunnerMaxJobs?: number;
1031
358
  /**
1032
359
  * - RSS bytes after an acknowledged job at which a pooled child is replaced. Default: `536870912` (512 MiB).
1033
360
  */
1034
- pooledRunnerMaxRssBytes?: number | undefined;
361
+ pooledRunnerMaxRssBytes?: number;
1035
362
  /**
1036
363
  * - Age after an acknowledged job at which a pooled child is replaced. Default: `3600000` (one hour).
1037
364
  */
1038
- pooledRunnerMaxLifetimeMs?: number | undefined;
365
+ pooledRunnerMaxLifetimeMs?: number;
1039
366
  /**
1040
367
  * - Per-queue
1041
368
  * concurrency caps and dispatch priorities, Sidekiq-style. A job declares its queue (static
@@ -1064,18 +391,18 @@ export type BackgroundJobsConfiguration = {
1064
391
  queues?: Record<string, {
1065
392
  maxConcurrent?: number;
1066
393
  priority?: number;
1067
- }> | undefined;
394
+ }>;
1068
395
  /**
1069
396
  * - How the main process
1070
397
  * detects new work. Defaults to `"beacon"` (event-driven). Set to `"polling"`
1071
398
  * to restore the legacy fixed-interval poll.
1072
399
  */
1073
- dispatchStrategy?: BackgroundJobsDispatchStrategy | undefined;
400
+ dispatchStrategy?: BackgroundJobsDispatchStrategy;
1074
401
  /**
1075
402
  * - Poll interval in milliseconds. Only used
1076
403
  * when `dispatchStrategy === "polling"`. Default: `1000`.
1077
404
  */
1078
- pollIntervalMs?: number | undefined;
405
+ pollIntervalMs?: number;
1079
406
  /**
1080
407
  * - Wall-clock backstop, in ms, for a
1081
408
  * `"forked"` job runner. A forked job still running after this is terminated
@@ -1087,7 +414,7 @@ export type BackgroundJobsConfiguration = {
1087
414
  * long imports) so only genuinely-stuck runners are killed. Omit, `null`, or
1088
415
  * `<= 0` to disable (default), which preserves the prior unbounded behavior.
1089
416
  */
1090
- jobTimeoutMs?: number | null | undefined;
417
+ jobTimeoutMs?: number | null;
1091
418
  /**
1092
419
  * - Retention/pruning
1093
420
  * of terminal job rows. Without pruning the jobs table grows unbounded
@@ -1095,7 +422,7 @@ export type BackgroundJobsConfiguration = {
1095
422
  * eventually slows dispatch. The main process sweeps terminal rows past their
1096
423
  * window on an interval.
1097
424
  */
1098
- retention?: BackgroundJobsRetentionConfiguration | undefined;
425
+ retention?: BackgroundJobsRetentionConfiguration;
1099
426
  };
1100
427
  export type BackgroundJobsRetentionConfiguration = {
1101
428
  /**
@@ -1103,27 +430,23 @@ export type BackgroundJobsRetentionConfiguration = {
1103
430
  * `completed_at_ms` is older than this many ms. `null` or `<= 0` disables
1104
431
  * completed pruning. Default: `604800000` (7 days).
1105
432
  */
1106
- completedTtlMs?: number | null | undefined;
433
+ completedTtlMs?: number | null;
1107
434
  /**
1108
435
  * - Delete terminal `failed`/`orphaned`
1109
436
  * jobs older than this many ms. `null` or `<= 0` disables (keeps them for
1110
437
  * debugging). Default: `2592000000` (30 days).
1111
438
  */
1112
- failedTtlMs?: number | null | undefined;
439
+ failedTtlMs?: number | null;
1113
440
  /**
1114
441
  * - Rows deleted per batch. Default: `1000`.
1115
442
  */
1116
- batchSize?: number | undefined;
443
+ batchSize?: number;
1117
444
  /**
1118
445
  * - How often the retention sweep runs.
1119
446
  * Default: `3600000` (1 hour).
1120
447
  */
1121
- sweepIntervalMs?: number | undefined;
448
+ sweepIntervalMs?: number;
1122
449
  };
1123
- /**
1124
- * Fully-resolved retention config as returned by `getBackgroundJobsConfig()`
1125
- * (every field defaulted), as opposed to the partial user-provided input.
1126
- */
1127
450
  export type ResolvedBackgroundJobsRetentionConfiguration = {
1128
451
  /**
1129
452
  * - Resolved completed-job TTL in ms (`null` disables).
@@ -1146,45 +469,45 @@ export type BeaconConfiguration = {
1146
469
  /**
1147
470
  * - Whether to connect to a Beacon broker. Defaults to false unless `host`/`port` or `inProcess: true` are set, or env vars are present. Explicit `false` disables Beacon even when env vars are set.
1148
471
  */
1149
- enabled?: boolean | undefined;
472
+ enabled?: boolean;
1150
473
  /**
1151
474
  * - When true, use a module-level in-process broker singleton instead of connecting over TCP. Mutually exclusive with `host`/`port`. Useful for tests and single-process deployments.
1152
475
  */
1153
- inProcess?: boolean | undefined;
476
+ inProcess?: boolean;
1154
477
  /**
1155
478
  * - Hostname of the Beacon broker daemon.
1156
479
  */
1157
- host?: string | undefined;
480
+ host?: string;
1158
481
  /**
1159
482
  * - Port of the Beacon broker daemon.
1160
483
  */
1161
- port?: number | undefined;
484
+ port?: number;
1162
485
  /**
1163
486
  * - Optional human-readable label for this peer (e.g. "server", "background-jobs-worker").
1164
487
  */
1165
- peerType?: string | undefined;
488
+ peerType?: string;
1166
489
  /**
1167
490
  * - Grace window (ms) a beacon connect/disconnect blip must persist before it is reported as a framework-error. Transient outages that recover within this window (e.g. a deploy restarting the broker) are not reported. Defaults to 30000.
1168
491
  */
1169
- unreachableReportMs?: number | undefined;
492
+ unreachableReportMs?: number;
1170
493
  };
1171
494
  export type HttpCompressionConfiguration = {
1172
495
  /**
1173
496
  * - Whether buffered response compression is enabled. Defaults to true; set false to disable globally.
1174
497
  */
1175
- enabled?: boolean | undefined;
498
+ enabled?: boolean;
1176
499
  /**
1177
500
  * - Minimum buffered body size in bytes before compression is applied. Defaults to 1024.
1178
501
  */
1179
- threshold?: number | undefined;
502
+ threshold?: number;
1180
503
  /**
1181
504
  * - Brotli encoder quality (0-11). Defaults to 4.
1182
505
  */
1183
- brotliQuality?: number | undefined;
506
+ brotliQuality?: number;
1184
507
  /**
1185
508
  * - Gzip compression level (0-9). Defaults to 6.
1186
509
  */
1187
- gzipLevel?: number | undefined;
510
+ gzipLevel?: number;
1188
511
  };
1189
512
  export type NormalizedHttpCompressionConfiguration = {
1190
513
  /**
@@ -1208,53 +531,53 @@ export type HttpServerConfiguration = {
1208
531
  /**
1209
532
  * - Buffered response compression. Enabled with documented defaults when absent; false or {enabled: false} disables it globally.
1210
533
  */
1211
- compression?: boolean | HttpCompressionConfiguration | undefined;
534
+ compression?: boolean | HttpCompressionConfiguration;
1212
535
  /**
1213
536
  * - Hostname to bind the HTTP server to.
1214
537
  */
1215
- host?: string | undefined;
538
+ host?: string;
1216
539
  /**
1217
540
  * - Run HTTP handlers in the main thread instead of worker threads.
1218
541
  */
1219
- inProcess?: boolean | undefined;
542
+ inProcess?: boolean;
1220
543
  /**
1221
544
  * - Backward-compatible alias for workers.
1222
545
  */
1223
- maxWorkers?: number | undefined;
546
+ maxWorkers?: number;
1224
547
  /**
1225
548
  * - Port to bind the HTTP server to.
1226
549
  */
1227
- port?: number | undefined;
550
+ port?: number;
1228
551
  /**
1229
552
  * - Per-session retained inbound WebSocket message limits.
1230
553
  */
1231
554
  websocketInboundQueue?: {
1232
555
  maxPendingBytes?: number;
1233
556
  maxPendingMessages?: number;
1234
- } | undefined;
557
+ };
1235
558
  /**
1236
559
  * - Per-client retained outbound WebSocket frame limits.
1237
560
  */
1238
561
  websocketOutboundQueue?: {
1239
562
  maxPendingBytes?: number;
1240
563
  maxPendingFrames?: number;
1241
- } | undefined;
564
+ };
1242
565
  /**
1243
566
  * - Worker handlers to start for the HTTP server.
1244
567
  */
1245
- workers?: number | undefined;
568
+ workers?: number;
1246
569
  };
1247
570
  export type ScheduledBackgroundJobEveryOptions = {
1248
571
  /**
1249
572
  * - Delay before the first enqueue.
1250
573
  */
1251
- firstIn?: string | number | undefined;
574
+ firstIn?: number | string;
1252
575
  };
1253
576
  export type ScheduledBackgroundJobConfiguration = {
1254
577
  /**
1255
578
  * - Arguments passed to the job when enqueued.
1256
579
  */
1257
- args?: any[] | undefined;
580
+ args?: Array<ReturnType<typeof JSON.parse>>;
1258
581
  /**
1259
582
  * - Job class to enqueue.
1260
583
  */
@@ -1262,19 +585,19 @@ export type ScheduledBackgroundJobConfiguration = {
1262
585
  /**
1263
586
  * - Crontab expression (5-field POSIX, plus `@hourly`/`@daily`/`@weekly`/`@monthly`/`@yearly`/`@midnight`). Mutually exclusive with `every`.
1264
587
  */
1265
- cron?: string | undefined;
588
+ cron?: string;
1266
589
  /**
1267
590
  * - Whether the schedule is enabled.
1268
591
  */
1269
- enabled?: boolean | undefined;
592
+ enabled?: boolean;
1270
593
  /**
1271
594
  * - Repeat interval. Either `every` or `cron` must be set.
1272
595
  */
1273
- every?: string | number | [string | number, ScheduledBackgroundJobEveryOptions] | undefined;
596
+ every?: number | string | [number | string, ScheduledBackgroundJobEveryOptions];
1274
597
  /**
1275
598
  * - Job options.
1276
599
  */
1277
- options?: import("./background-jobs/types.js").BackgroundJobOptions | undefined;
600
+ options?: import("./background-jobs/types.js").BackgroundJobOptions;
1278
601
  };
1279
602
  export type VelociousParams = Record<string, string>;
1280
603
  export type ClientErrorPayloadReporterPayload = Record<string, import("./frontend-models/query.js").FrontendModelTransportValue>;
@@ -1282,7 +605,7 @@ export type ErrorRequestDetails = {
1282
605
  /**
1283
606
  * - Sanitized parsed request body, when available.
1284
607
  */
1285
- body?: unknown;
608
+ body?: ReturnType<typeof JSON.parse>;
1286
609
  /**
1287
610
  * - Request HTTP method.
1288
611
  */
@@ -1300,29 +623,33 @@ export type ClientErrorPayloadContext = {
1300
623
  /**
1301
624
  * - Controller action or endpoint label.
1302
625
  */
1303
- action?: string | undefined;
626
+ action?: string;
1304
627
  /**
1305
628
  * - Frontend-model command type.
1306
629
  */
1307
- commandType?: "find" | "update" | "destroy" | "url" | "index" | "create" | "attach" | "attachmentList" | "download" | "custom-command" | undefined;
630
+ commandType?: "index" | "find" | "create" | "update" | "destroy" | "attach" | "attachmentList" | "download" | "url" | "custom-command";
631
+ /**
632
+ * - Server-generated identifier shared by an unexpected client error and framework reports.
633
+ */
634
+ correlationId?: string;
1308
635
  /**
1309
636
  * - Whether the error is an expected user-flow failure.
1310
637
  */
1311
- expectedError?: boolean | undefined;
638
+ expectedError?: boolean;
1312
639
  /**
1313
640
  * - Whether the error came from the frontend-model endpoint.
1314
641
  */
1315
- frontendModelEndpoint?: boolean | undefined;
642
+ frontendModelEndpoint?: boolean;
1316
643
  /**
1317
644
  * - Frontend-model name from the failed request.
1318
645
  */
1319
- model?: string | undefined;
646
+ model?: string;
1320
647
  /**
1321
648
  * - Shared frontend-model request id.
1322
649
  */
1323
- requestId?: string | undefined;
650
+ requestId?: string;
1324
651
  };
1325
- export type ClientErrorPayloadReporterType = (arg0: {
652
+ export type ClientErrorPayloadReporterType = (args: {
1326
653
  context: ClientErrorPayloadContext;
1327
654
  error: Error;
1328
655
  request: import("./http-server/client/request.js").default | import("./http-server/client/websocket-request.js").default | undefined;
@@ -1346,7 +673,7 @@ export type AttachmentDriverConstructor = new (args: {
1346
673
  configuration: import("./configuration.js").default;
1347
674
  modelClass?: typeof import("./database/record/index.js").default;
1348
675
  name?: string;
1349
- options?: Record<string, unknown>;
676
+ options?: Record<string, ReturnType<typeof JSON.parse>>;
1350
677
  }) => object;
1351
678
  export type ScheduledBackgroundJobsConfiguration = {
1352
679
  /**
@@ -1354,53 +681,53 @@ export type ScheduledBackgroundJobsConfiguration = {
1354
681
  */
1355
682
  jobs: Record<string, ScheduledBackgroundJobConfiguration>;
1356
683
  };
1357
- export type ScheduledBackgroundJobsLoaderType = (arg0: {
684
+ export type ScheduledBackgroundJobsLoaderType = (args: {
1358
685
  configuration: import("./configuration.js").default;
1359
686
  }) => ScheduledBackgroundJobsConfiguration | Promise<ScheduledBackgroundJobsConfiguration>;
1360
687
  export type AttachmentDriverConfiguration = {
1361
688
  /**
1362
689
  * - Optional factory for a custom attachment driver instance.
1363
690
  */
1364
- create?: ((arg0: {
691
+ create?: (args: {
1365
692
  configuration: import("./configuration.js").default;
1366
693
  name: string;
1367
- options: Record<string, unknown>;
1368
- }) => Record<string, unknown>) | undefined;
694
+ options: Record<string, ReturnType<typeof JSON.parse>>;
695
+ }) => Record<string, ReturnType<typeof JSON.parse>>;
1369
696
  /**
1370
697
  * - Optional custom attachment driver class.
1371
698
  */
1372
- driverClass?: AttachmentDriverConstructor | undefined;
699
+ driverClass?: AttachmentDriverConstructor;
1373
700
  /**
1374
701
  * - Optional custom attachment driver instance.
1375
702
  */
1376
- instance?: Record<string, any> | undefined;
703
+ instance?: Record<string, ReturnType<typeof JSON.parse>>;
1377
704
  };
1378
705
  export type AttachmentsConfiguration = {
1379
706
  /**
1380
707
  * - Default attachment storage driver name.
1381
708
  */
1382
- defaultDriver?: string | undefined;
709
+ defaultDriver?: string;
1383
710
  /**
1384
711
  * - Named attachment driver configurations.
1385
712
  */
1386
- drivers?: Record<string, AttachmentDriverConfiguration & Record<string, any>> | undefined;
713
+ drivers?: Record<string, AttachmentDriverConfiguration & Record<string, ReturnType<typeof JSON.parse>>>;
1387
714
  /**
1388
715
  * - Whether `{path: ...}` attachment input is allowed.
1389
716
  */
1390
- allowPathInput?: boolean | undefined;
717
+ allowPathInput?: boolean;
1391
718
  /**
1392
719
  * - Optional allowlist of directories for `{path: ...}` input.
1393
720
  */
1394
- allowedPathPrefixes?: string[] | undefined;
721
+ allowedPathPrefixes?: string[];
1395
722
  };
1396
723
  export type MailerBackend = {
1397
724
  /**
1398
725
  * - Deliver a mailer payload.
1399
726
  */
1400
- deliver: (arg0: {
727
+ deliver: (args: {
1401
728
  payload: import("./mailer.js").MailerDeliveryPayload;
1402
729
  configuration: import("./configuration.js").default;
1403
- }) => Promise<unknown> | unknown;
730
+ }) => Promise<ReturnType<typeof JSON.parse>> | ReturnType<typeof JSON.parse>;
1404
731
  };
1405
732
  export type LocaleFallbacksType = Record<string, string[]>;
1406
733
  export type FrontendModelRelationshipConfiguration = {
@@ -1411,49 +738,49 @@ export type FrontendModelRelationshipConfiguration = {
1411
738
  /**
1412
739
  * - Target model class name.
1413
740
  */
1414
- model?: string | undefined;
741
+ model?: string;
1415
742
  /**
1416
743
  * - Alias of target model class name.
1417
744
  */
1418
- className?: string | undefined;
745
+ className?: string;
1419
746
  /**
1420
747
  * - Explicit target model class name.
1421
748
  */
1422
- modelClassName?: string | undefined;
749
+ modelClassName?: string;
1423
750
  };
1424
751
  export type FrontendModelAttributeConfiguration = {
1425
752
  /**
1426
753
  * - Column type name.
1427
754
  */
1428
- type?: string | undefined;
755
+ type?: string;
1429
756
  /**
1430
757
  * - Alias for column type name.
1431
758
  */
1432
- columnType?: string | undefined;
759
+ columnType?: string;
1433
760
  /**
1434
761
  * - Alias for column type name.
1435
762
  */
1436
- sqlType?: string | undefined;
763
+ sqlType?: string;
1437
764
  /**
1438
765
  * - Alias for column type name.
1439
766
  */
1440
- dataType?: string | undefined;
767
+ dataType?: string;
1441
768
  /**
1442
769
  * - Exact generated JSDoc type for non-column attributes.
1443
770
  */
1444
- jsDocType?: string | undefined;
771
+ jsDocType?: string;
1445
772
  /**
1446
773
  * - Attribute name when configured as an array entry.
1447
774
  */
1448
- name?: string | undefined;
775
+ name?: string;
1449
776
  /**
1450
777
  * - Whether value can be null.
1451
778
  */
1452
- null?: boolean | undefined;
779
+ null?: boolean;
1453
780
  /**
1454
781
  * - Whether included in default serialization. Defaults to true.
1455
782
  */
1456
- selectedByDefault?: boolean | undefined;
783
+ selectedByDefault?: boolean;
1457
784
  };
1458
785
  export type FrontendModelAttachmentConfiguration = {
1459
786
  /**
@@ -1469,56 +796,52 @@ export type FrontendModelResourceConfiguration = {
1469
796
  /**
1470
797
  * - Additional camelCase ability action names to expose for per-record `record.can(action)` reads. Base CRUD actions (`read`, `create`, `update`, `destroy`) are always included and must not be listed here.
1471
798
  */
1472
- abilities?: string[] | undefined;
799
+ abilities?: string[];
1473
800
  /**
1474
801
  * - Attachment helpers keyed by attachment name.
1475
802
  */
1476
- attachments?: Record<string, FrontendModelAttachmentConfiguration> | undefined;
803
+ attachments?: Record<string, FrontendModelAttachmentConfiguration>;
1477
804
  /**
1478
805
  * - Legacy built-in command names (`index`, `find`, `create`, `update`, `destroy`, `attach`, `download`, `url`).
1479
806
  */
1480
- commands?: string[] | undefined;
807
+ commands?: string[];
1481
808
  /**
1482
809
  * - Custom collection commands. Each entry is a camelCase method name, or a `{name, args?, returnType?}` object declaring typed arguments and/or a response type. The runtime derives the kebab-case command slug from the name.
1483
810
  */
1484
- collectionCommands?: FrontendModelResourceCustomCommand[] | undefined;
811
+ collectionCommands?: Array<FrontendModelResourceCustomCommand>;
1485
812
  /**
1486
813
  * - Custom member commands. Each entry is a camelCase method name, or a `{name, args?, returnType?}` object declaring typed arguments and/or a response type. The runtime derives the kebab-case command slug from the name.
1487
814
  */
1488
- memberCommands?: FrontendModelResourceCustomCommand[] | undefined;
815
+ memberCommands?: Array<FrontendModelResourceCustomCommand>;
1489
816
  /**
1490
817
  * - Built-in collection command names (`index`, `create`).
1491
818
  */
1492
- builtInCollectionCommands?: string[] | undefined;
819
+ builtInCollectionCommands?: string[];
1493
820
  /**
1494
821
  * - Built-in member command names (`find`, `update`, `destroy`, `attach`, `download`, `url`).
1495
822
  */
1496
- builtInMemberCommands?: string[] | undefined;
823
+ builtInMemberCommands?: string[];
1497
824
  /**
1498
825
  * - Frontend model name override.
1499
826
  */
1500
- modelName?: string | undefined;
827
+ modelName?: string;
1501
828
  /**
1502
829
  * - Relationship names to expose in frontend models. Type and target model are inferred from the backend model's registered relationships.
1503
830
  */
1504
- relationships?: string[] | undefined;
831
+ relationships?: string[];
1505
832
  /**
1506
833
  * - Primary key attribute name.
1507
834
  */
1508
- primaryKey?: string | undefined;
835
+ primaryKey?: string;
1509
836
  /**
1510
837
  * - Optional legacy backend behavior overrides for built-in frontend actions.
1511
838
  */
1512
- server?: FrontendModelResourceServerConfiguration | undefined;
839
+ server?: FrontendModelResourceServerConfiguration;
1513
840
  /**
1514
841
  * - Optional safe local/offline sync policy metadata. `policy` participates in the hash but is not exposed to generated frontend config/manifest.
1515
842
  */
1516
- sync?: boolean | FrontendModelResourceSyncConfiguration | undefined;
843
+ sync?: FrontendModelResourceSyncConfiguration | boolean;
1517
844
  };
1518
- /**
1519
- * Object form of a custom command entry, declaring its typed arguments and/or
1520
- * response type alongside the command name.
1521
- */
1522
845
  export type FrontendModelResourceCustomCommandObject = {
1523
846
  /**
1524
847
  * - camelCase command method name.
@@ -1527,97 +850,74 @@ export type FrontendModelResourceCustomCommandObject = {
1527
850
  /**
1528
851
  * - Typed command arguments; each generates a named, typed method parameter mapped positionally into the command payload. `type` is a JSDoc type string.
1529
852
  */
1530
- args?: {
853
+ args?: Array<{
1531
854
  name: string;
1532
855
  type: string;
1533
- }[] | undefined;
856
+ }>;
1534
857
  /**
1535
- * - JSDoc type for the command response. When set, the generated method is typed `Promise<returnType>` instead of `Promise<Record<string, ?>>`. Emitted verbatim into the generated frontend model, so it must resolve there.
858
+ * - JSDoc type for the command response. When set, the generated method is typed `Promise<returnType>` instead of `Promise<Record<string, ReturnType<typeof JSON.parse>>>`. Emitted verbatim into the generated frontend model, so it must resolve there.
1536
859
  */
1537
- returnType?: string | undefined;
860
+ returnType?: string;
1538
861
  };
1539
- /**
1540
- * A custom command entry: a plain camelCase method name, or an object declaring
1541
- * typed args and/or a response type.
1542
- */
1543
862
  export type FrontendModelResourceCustomCommand = string | FrontendModelResourceCustomCommandObject;
1544
- /**
1545
- * JSON value accepted by sync policy metadata/hash inputs.
1546
- */
1547
863
  export type FrontendModelSyncJsonValue = null | string | number | boolean | unknown[] | Record<string, unknown>;
1548
- /**
1549
- * Frontend-model local/offline sync policy config. `metadata` is exposed to
1550
- * frontends and peers; `policy` is hashed but intentionally omitted from
1551
- * frontend-safe manifests.
1552
- */
1553
864
  export type FrontendModelResourceSyncConfiguration = {
1554
865
  /**
1555
866
  * - Strategy used when replay detects server/client divergence. Defaults to `optimisticVersion`.
1556
867
  */
1557
- conflictStrategy?: "optimisticVersion" | "serverWins" | "lastWriterWins" | "fieldThreeWay" | "appendOnly" | undefined;
868
+ conflictStrategy?: "optimisticVersion" | "serverWins" | "lastWriterWins" | "fieldThreeWay" | "appendOnly";
1558
869
  /**
1559
870
  * - Whether the resource is sync-enabled. Defaults to true when `sync` is configured.
1560
871
  */
1561
- enabled?: boolean | undefined;
872
+ enabled?: boolean;
1562
873
  /**
1563
874
  * - Sync operation names such as `index`, `find`, `create`, `update`, custom domain commands, etc.
1564
875
  */
1565
- operations?: string[] | undefined;
876
+ operations?: string[];
1566
877
  /**
1567
878
  * - App-controlled policy version used as a stable change signal.
1568
879
  */
1569
- policyVersion?: string | number | undefined;
880
+ policyVersion?: string | number;
1570
881
  /**
1571
882
  * - Safe frontend-visible metadata.
1572
883
  */
1573
- metadata?: Record<string, FrontendModelSyncJsonValue> | undefined;
884
+ metadata?: Record<string, FrontendModelSyncJsonValue>;
1574
885
  /**
1575
886
  * - Deterministic non-secret policy inputs included in the policy hash only.
1576
887
  */
1577
- policy?: Record<string, FrontendModelSyncJsonValue> | undefined;
888
+ policy?: Record<string, FrontendModelSyncJsonValue>;
1578
889
  };
1579
- /**
1580
- * Velocious sync API endpoint configuration.
1581
- */
1582
890
  export type VelociousSyncApiConfiguration = {
1583
891
  /**
1584
892
  * - Mount path for the sync endpoints. Defaults to "/velocious/sync".
1585
893
  */
1586
- mountPath?: string | undefined;
894
+ mountPath?: string;
1587
895
  /**
1588
896
  * - App sync resource class served by the auto-mounted sync endpoints.
1589
897
  */
1590
898
  resourceClass: FrontendModelResourceClassType;
1591
899
  };
1592
- /**
1593
- * Client-side sync transport owning HTTP POSTs to the framework sync endpoints,
1594
- * matching the frontend-model websocket client post contract.
1595
- */
1596
900
  export type VelociousSyncClientTransport = {
1597
901
  /**
1598
902
  * - Posts one request and resolves a response with a json accessor.
1599
903
  */
1600
- post: (path: string, body?: unknown, options?: {
904
+ post: (path: string, body?: ReturnType<typeof JSON.parse>, options?: {
1601
905
  headers?: Record<string, string>;
1602
906
  }) => Promise<{
1603
- json: () => unknown;
907
+ json: () => ReturnType<typeof JSON.parse>;
1604
908
  }>;
1605
909
  };
1606
- /**
1607
- * Websocket client contract required from `sync.client.realtime.createClient`,
1608
- * matching `VelociousWebsocketClient` / snapreq's websocket client.
1609
- */
1610
910
  export type VelociousSyncRealtimeWebsocketClient = {
1611
911
  /**
1612
912
  * - Connects the websocket.
1613
913
  */
1614
- connect: () => Promise<unknown>;
914
+ connect: () => Promise<ReturnType<typeof JSON.parse>>;
1615
915
  /**
1616
916
  * - Opens one channel subscription.
1617
917
  */
1618
918
  subscribeChannel: (channelType: string, options?: {
1619
- params?: Record<string, unknown>;
1620
- onMessage?: (body: unknown) => void;
919
+ params?: Record<string, ReturnType<typeof JSON.parse>>;
920
+ onMessage?: (body: ReturnType<typeof JSON.parse>) => void;
1621
921
  onResume?: () => void;
1622
922
  onClose?: (reason: string) => void;
1623
923
  }) => VelociousSyncRealtimeSubscription;
@@ -1626,9 +926,6 @@ export type VelociousSyncRealtimeWebsocketClient = {
1626
926
  */
1627
927
  disconnectAndStopReconnect: () => Promise<void>;
1628
928
  };
1629
- /**
1630
- * Channel subscription handle returned by `subscribeChannel`.
1631
- */
1632
929
  export type VelociousSyncRealtimeSubscription = {
1633
930
  /**
1634
931
  * - Closes the subscription.
@@ -1645,9 +942,6 @@ export type VelociousSyncRealtimeSubscription = {
1645
942
  timeoutMs?: number;
1646
943
  }) => Promise<void>;
1647
944
  };
1648
- /**
1649
- * One realtime channel subscription descriptor.
1650
- */
1651
945
  export type VelociousSyncRealtimeChannelDescriptor = {
1652
946
  /**
1653
947
  * - Server channel name to subscribe.
@@ -1656,19 +950,12 @@ export type VelociousSyncRealtimeChannelDescriptor = {
1656
950
  /**
1657
951
  * - Subscribe params (runtime scope values). The framework injects `authenticationToken` automatically.
1658
952
  */
1659
- params?: Record<string, any> | undefined;
953
+ params?: Record<string, ReturnType<typeof JSON.parse>>;
1660
954
  /**
1661
955
  * - Default resource/model name for pushed changes that do not carry their own resourceType.
1662
956
  */
1663
- resourceType?: string | undefined;
957
+ resourceType?: string;
1664
958
  };
1665
- /**
1666
- * Realtime push configuration for the sync client. Only the genuinely
1667
- * app-owned callback lives here: how to build the websocket client.
1668
- * Everything else - deriving the framework sync channel subscriptions from
1669
- * the declared pull scopes, subscribing, applying pushes through the derived
1670
- * resource applier, echo suppression, and pull-on-reconnect - is derived.
1671
- */
1672
959
  export type VelociousSyncClientRealtimeConfiguration = {
1673
960
  /**
1674
961
  * - Builds the (unconnected) websocket client; the framework owns connect/disconnect.
@@ -1677,21 +964,16 @@ export type VelociousSyncClientRealtimeConfiguration = {
1677
964
  /**
1678
965
  * - Deprecated legacy escape hatch: resolves extra app-channel descriptors from the `subscribeRealtime(context)` context. Declared pull scopes subscribe the framework sync channel automatically.
1679
966
  */
1680
- channels?: ((context: unknown) => Array<VelociousSyncRealtimeChannelDescriptor> | Promise<Array<VelociousSyncRealtimeChannelDescriptor>>) | undefined;
967
+ channels?: (context: ReturnType<typeof JSON.parse>) => Array<VelociousSyncRealtimeChannelDescriptor> | Promise<Array<VelociousSyncRealtimeChannelDescriptor>>;
1681
968
  /**
1682
969
  * - Resolves this device's echo origin; pushed messages with a matching `echoOrigin` are dropped.
1683
970
  */
1684
- localOrigin?: (() => string | Promise<string>) | undefined;
971
+ localOrigin?: () => string | Promise<string>;
1685
972
  /**
1686
973
  * - Fire a coalesced `pull()` when subscriptions become ready or resume after a drop, closing offline gaps. Defaults to true.
1687
974
  */
1688
- pullOnReconnect?: boolean | undefined;
975
+ pullOnReconnect?: boolean;
1689
976
  };
1690
- /**
1691
- * Client-side sync configuration consumed by `SyncClient.fromConfiguration(...)`.
1692
- * The framework owns the `${mountPath}/changes` and `${mountPath}/replay`
1693
- * POSTers over the given transport.
1694
- */
1695
977
  export type VelociousSyncClientConfiguration = {
1696
978
  /**
1697
979
  * - Resolves the auth token sent with sync requests.
@@ -1700,23 +982,23 @@ export type VelociousSyncClientConfiguration = {
1700
982
  /**
1701
983
  * - Max syncs per request.
1702
984
  */
1703
- batchSize?: number | undefined;
985
+ batchSize?: number;
1704
986
  /**
1705
987
  * - Connectivity gate for pulls and replays. Defaults to always online.
1706
988
  */
1707
- isOnline?: (() => boolean | Promise<boolean>) | undefined;
989
+ isOnline?: () => boolean | Promise<boolean>;
1708
990
  /**
1709
991
  * - Mount path the server serves the sync endpoints under (match the server's `sync.api.mountPath`). Defaults to "/velocious/sync"; normalization strips trailing slashes and always fills in the default.
1710
992
  */
1711
- mountPath?: string | undefined;
993
+ mountPath?: string;
1712
994
  /**
1713
995
  * - Reports background replay/pull failures. Defaults to rethrowing.
1714
996
  */
1715
- onError?: ((error: Error) => void) | undefined;
997
+ onError?: (error: Error) => void;
1716
998
  /**
1717
999
  * - Realtime push configuration consumed by `subscribeRealtime(...)`.
1718
1000
  */
1719
- realtime?: VelociousSyncClientRealtimeConfiguration | undefined;
1001
+ realtime?: VelociousSyncClientRealtimeConfiguration;
1720
1002
  /**
1721
1003
  * - Transport posting to the framework sync endpoints (e.g. the frontend-model websocket client).
1722
1004
  */
@@ -1724,32 +1006,29 @@ export type VelociousSyncClientConfiguration = {
1724
1006
  /**
1725
1007
  * - Shared app-lifetime websocket client (the low-level form) that all sync traffic rides. Provide the same instance the frontend-model transport uses so one connection carries everything. When set, the realtime bridge subscribes channels on it and never owns its lifecycle: unsubscribing closes only channel subscriptions, leaving the socket connected.
1726
1008
  */
1727
- websocketClient?: VelociousSyncRealtimeWebsocketClient | undefined;
1009
+ websocketClient?: VelociousSyncRealtimeWebsocketClient;
1728
1010
  /**
1729
1011
  * - Shared app-lifetime websocket URL. When set (and no `websocketClient` is given), the framework builds and owns one reconnecting `VelociousWebsocketClient` for all sync traffic, connected on first use.
1730
1012
  */
1731
- websocketUrl?: string | (() => string | null | undefined) | undefined;
1013
+ websocketUrl?: string | (() => string | null | undefined);
1732
1014
  };
1733
- /**
1734
- * Velocious sync configuration.
1735
- */
1736
1015
  export type VelociousSyncConfiguration = {
1737
1016
  /**
1738
1017
  * - Auto-mounts the Velocious sync changes/replay endpoints for this resource class.
1739
1018
  */
1740
- api?: VelociousSyncApiConfiguration | undefined;
1019
+ api?: VelociousSyncApiConfiguration;
1741
1020
  /**
1742
1021
  * - Client-side sync configuration consumed by `SyncClient.fromConfiguration(...)`.
1743
1022
  */
1744
- client?: VelociousSyncClientConfiguration | undefined;
1023
+ client?: VelociousSyncClientConfiguration;
1745
1024
  /**
1746
1025
  * - Public backend key used to verify offline device certificates for sync replay.
1747
1026
  */
1748
- deviceCertificateBackendPublicKey?: import("node:crypto").webcrypto.JsonWebKey | null | undefined;
1027
+ deviceCertificateBackendPublicKey?: import("./sync/device-identity.js").SyncJsonWebKey | null;
1749
1028
  /**
1750
1029
  * - Number of accepted server changes retained before clients must refresh from snapshot.
1751
1030
  */
1752
- changeFeedRetentionSize?: number | undefined;
1031
+ changeFeedRetentionSize?: number;
1753
1032
  /**
1754
1033
  * - Signing keys used to issue and verify offline grants. Secrets must never be exposed to clients.
1755
1034
  */
@@ -1757,11 +1036,8 @@ export type VelociousSyncConfiguration = {
1757
1036
  /**
1758
1037
  * - Default offline grant TTL in milliseconds. Defaults to 24 hours.
1759
1038
  */
1760
- offlineGrantTtlMs?: number | undefined;
1039
+ offlineGrantTtlMs?: number;
1761
1040
  };
1762
- /**
1763
- * Frontend-safe normalized sync metadata.
1764
- */
1765
1041
  export type NormalizedFrontendModelResourceSyncConfiguration = {
1766
1042
  /**
1767
1043
  * - Normalized replay conflict strategy.
@@ -1786,7 +1062,7 @@ export type NormalizedFrontendModelResourceSyncConfiguration = {
1786
1062
  /**
1787
1063
  * - Safe frontend-visible metadata.
1788
1064
  */
1789
- metadata?: Record<string, FrontendModelSyncJsonValue> | undefined;
1065
+ metadata?: Record<string, FrontendModelSyncJsonValue>;
1790
1066
  };
1791
1067
  export type NormalizedFrontendModelResourceConfiguration = Omit<FrontendModelResourceConfiguration, "abilities" | "builtInCollectionCommands" | "builtInMemberCommands" | "collectionCommands" | "commands" | "memberCommands" | "sync"> & {
1792
1068
  abilities: FrontendModelResourceAbilitiesConfiguration;
@@ -1811,94 +1087,94 @@ export type FrontendModelResourceAbilitiesConfiguration = {
1811
1087
  /**
1812
1088
  * - Ability action for frontend index.
1813
1089
  */
1814
- index?: string | undefined;
1090
+ index?: string;
1815
1091
  /**
1816
1092
  * - Ability action for frontend find.
1817
1093
  */
1818
- find?: string | undefined;
1094
+ find?: string;
1819
1095
  /**
1820
1096
  * - Ability action for frontend create.
1821
1097
  */
1822
- create?: string | undefined;
1098
+ create?: string;
1823
1099
  /**
1824
1100
  * - Ability action for frontend update.
1825
1101
  */
1826
- update?: string | undefined;
1102
+ update?: string;
1827
1103
  /**
1828
1104
  * - Ability action for frontend destroy.
1829
1105
  */
1830
- destroy?: string | undefined;
1106
+ destroy?: string;
1831
1107
  };
1832
1108
  export type FrontendModelResourceServerConfiguration = {
1833
1109
  /**
1834
1110
  * - Optional callback run before built-in frontend actions.
1835
1111
  */
1836
- beforeAction?: ((arg0: {
1112
+ beforeAction?: (args: {
1837
1113
  action: "index" | "find" | "create" | "update" | "destroy" | "attach" | "attachmentList" | "download" | "url";
1838
1114
  controller: import("./controller.js").default;
1839
- params: Record<string, unknown>;
1115
+ params: Record<string, ReturnType<typeof JSON.parse>>;
1840
1116
  modelClass: typeof import("./database/record/index.js").default;
1841
- }) => (boolean | void | Promise<boolean | void>)) | undefined;
1117
+ }) => (boolean | void | Promise<boolean | void>);
1842
1118
  /**
1843
1119
  * - Records loader for frontendIndex.
1844
1120
  */
1845
- records?: ((arg0: {
1121
+ records?: (args: {
1846
1122
  action: "index";
1847
1123
  controller: import("./controller.js").default;
1848
- params: Record<string, unknown>;
1124
+ params: Record<string, ReturnType<typeof JSON.parse>>;
1849
1125
  modelClass: typeof import("./database/record/index.js").default;
1850
- }) => Promise<import("./database/record/index.js").default[]>) | undefined;
1126
+ }) => Promise<import("./database/record/index.js").default[]>;
1851
1127
  /**
1852
1128
  * - Record serializer for response payloads.
1853
1129
  */
1854
- serialize?: ((arg0: {
1130
+ serialize?: (args: {
1855
1131
  action: "index" | "find" | "create" | "update";
1856
1132
  controller: import("./controller.js").default;
1857
- params: Record<string, unknown>;
1133
+ params: Record<string, ReturnType<typeof JSON.parse>>;
1858
1134
  modelClass: typeof import("./database/record/index.js").default;
1859
1135
  model: import("./database/record/index.js").default;
1860
- }) => Record<string, unknown> | Promise<Record<string, unknown>>) | undefined;
1136
+ }) => Record<string, ReturnType<typeof JSON.parse>> | Promise<Record<string, ReturnType<typeof JSON.parse>>>;
1861
1137
  /**
1862
1138
  * - Record loader for find/update/destroy/attach/download/url actions.
1863
1139
  */
1864
- find?: ((arg0: {
1140
+ find?: (args: {
1865
1141
  action: "find" | "update" | "destroy" | "attach" | "attachmentList" | "download" | "url";
1866
1142
  controller: import("./controller.js").default;
1867
- params: Record<string, unknown>;
1143
+ params: Record<string, ReturnType<typeof JSON.parse>>;
1868
1144
  modelClass: typeof import("./database/record/index.js").default;
1869
1145
  id: string | number;
1870
- }) => Promise<import("./database/record/index.js").default | null>) | undefined;
1146
+ }) => Promise<import("./database/record/index.js").default | null>;
1871
1147
  /**
1872
1148
  * - Custom create callback.
1873
1149
  */
1874
- create?: ((arg0: {
1150
+ create?: (args: {
1875
1151
  action: "create";
1876
1152
  controller: import("./controller.js").default;
1877
- params: Record<string, unknown>;
1153
+ params: Record<string, ReturnType<typeof JSON.parse>>;
1878
1154
  modelClass: typeof import("./database/record/index.js").default;
1879
- attributes: Record<string, unknown>;
1880
- }) => Promise<import("./database/record/index.js").default>) | undefined;
1155
+ attributes: Record<string, ReturnType<typeof JSON.parse>>;
1156
+ }) => Promise<import("./database/record/index.js").default>;
1881
1157
  /**
1882
1158
  * - Custom update callback.
1883
1159
  */
1884
- update?: ((arg0: {
1160
+ update?: (args: {
1885
1161
  action: "update";
1886
1162
  controller: import("./controller.js").default;
1887
- params: Record<string, unknown>;
1163
+ params: Record<string, ReturnType<typeof JSON.parse>>;
1888
1164
  modelClass: typeof import("./database/record/index.js").default;
1889
1165
  model: import("./database/record/index.js").default;
1890
- attributes: Record<string, unknown>;
1891
- }) => Promise<import("./database/record/index.js").default | void>) | undefined;
1166
+ attributes: Record<string, ReturnType<typeof JSON.parse>>;
1167
+ }) => Promise<import("./database/record/index.js").default | void>;
1892
1168
  /**
1893
1169
  * - Custom destroy callback.
1894
1170
  */
1895
- destroy?: ((arg0: {
1171
+ destroy?: (args: {
1896
1172
  action: "destroy";
1897
1173
  controller: import("./controller.js").default;
1898
- params: Record<string, unknown>;
1174
+ params: Record<string, ReturnType<typeof JSON.parse>>;
1899
1175
  modelClass: typeof import("./database/record/index.js").default;
1900
1176
  model: import("./database/record/index.js").default;
1901
- }) => Promise<void>) | undefined;
1177
+ }) => Promise<void>;
1902
1178
  };
1903
1179
  export type BackendProjectConfiguration = {
1904
1180
  /**
@@ -1908,24 +1184,20 @@ export type BackendProjectConfiguration = {
1908
1184
  /**
1909
1185
  * - Optional output project path where `src/frontend-models` should be generated.
1910
1186
  */
1911
- frontendModelsOutputPath?: string | undefined;
1187
+ frontendModelsOutputPath?: string;
1912
1188
  /**
1913
1189
  * - Optional override for the resources directory to auto-discover; defaults to `<path>/src/resources`. Set internally for package entries.
1914
1190
  */
1915
- resourcesPath?: string | undefined;
1191
+ resourcesPath?: string;
1916
1192
  /**
1917
1193
  * - Auto-discovered frontend model definitions keyed by model class name. Set internally by the environment handler — do not set manually.
1918
1194
  */
1919
- frontendModels?: Record<string, FrontendModelResourceClassType> | undefined;
1195
+ frontendModels?: Record<string, FrontendModelResourceDefinition>;
1920
1196
  /**
1921
1197
  * - Auto-discovered ability resource classes (frontend-model and authorization) from this project's resources directory. Set internally by the environment handler — do not set manually.
1922
1198
  */
1923
- abilityResources?: typeof import("./authorization/base-resource.js").default[] | undefined;
1199
+ abilityResources?: AbilityResourceClassType[];
1924
1200
  };
1925
- /**
1926
- * A descriptor for an external Velocious package (engine) that contributes models,
1927
- * resources and migrations. A package usually exports `new VelociousPackage({name, url: import.meta.url})`.
1928
- */
1929
1201
  export type VelociousPackageDescriptor = {
1930
1202
  /**
1931
1203
  * - The package name.
@@ -1934,23 +1206,23 @@ export type VelociousPackageDescriptor = {
1934
1206
  /**
1935
1207
  * - The descriptor module's `import.meta.url`; the package root is derived from it when `path` is omitted.
1936
1208
  */
1937
- url?: string | undefined;
1209
+ url?: string;
1938
1210
  /**
1939
1211
  * - The package root directory (the one containing `src`). Derived from `url` when omitted.
1940
1212
  */
1941
- path?: string | undefined;
1213
+ path?: string;
1942
1214
  /**
1943
1215
  * - Override for the package's models directory (default `<path>/src/models`).
1944
1216
  */
1945
- modelsPath?: string | undefined;
1217
+ modelsPath?: string;
1946
1218
  /**
1947
1219
  * - Override for the package's frontend-model resources directory (default `<path>/src/resources`).
1948
1220
  */
1949
- resourcesPath?: string | undefined;
1221
+ resourcesPath?: string;
1950
1222
  /**
1951
1223
  * - Override for the package's migrations directory (default `<path>/src/database/migrations`).
1952
1224
  */
1953
- migrationsPath?: string | undefined;
1225
+ migrationsPath?: string;
1954
1226
  };
1955
1227
  export type VelociousPackageConfiguration = import("./packages/velocious-package.js").default | VelociousPackageDescriptor;
1956
1228
  export type RouteResolverHookArgs = {
@@ -1961,7 +1233,7 @@ export type RouteResolverHookArgs = {
1961
1233
  /**
1962
1234
  * - Mutable request params object.
1963
1235
  */
1964
- params: Record<string, unknown>;
1236
+ params: Record<string, ReturnType<typeof JSON.parse>>;
1965
1237
  /**
1966
1238
  * - Request path without query.
1967
1239
  */
@@ -1969,7 +1241,7 @@ export type RouteResolverHookArgs = {
1969
1241
  /**
1970
1242
  * - True when matching a configured custom route.
1971
1243
  */
1972
- hasMatchingCustomRoute?: boolean | undefined;
1244
+ hasMatchingCustomRoute?: boolean;
1973
1245
  /**
1974
1246
  * - Request object.
1975
1247
  */
@@ -1995,162 +1267,162 @@ export type RouteResolverHookResult = {
1995
1267
  /**
1996
1268
  * - Optional controller class override.
1997
1269
  */
1998
- controllerClass?: typeof import("./controller.js").default | undefined;
1270
+ controllerClass?: typeof import("./controller.js").default;
1999
1271
  /**
2000
1272
  * - Optional absolute/relative controller file path override.
2001
1273
  */
2002
- controllerPath?: string | undefined;
1274
+ controllerPath?: string;
2003
1275
  /**
2004
1276
  * - Extra params to merge for controller/action.
2005
1277
  */
2006
- params?: Record<string, any> | undefined;
1278
+ params?: Record<string, ReturnType<typeof JSON.parse>>;
2007
1279
  /**
2008
1280
  * - Whether to run the controller action without resolving request ability.
2009
1281
  */
2010
- skipAbilityResolution?: boolean | undefined;
1282
+ skipAbilityResolution?: boolean;
2011
1283
  /**
2012
1284
  * - Whether to run the controller action without the automatic database checkout wrapper.
2013
1285
  */
2014
- skipControllerConnections?: boolean | undefined;
1286
+ skipControllerConnections?: boolean;
2015
1287
  /**
2016
1288
  * - Whether to run the controller action without resolving request tenant.
2017
1289
  */
2018
- skipTenantResolution?: boolean | undefined;
1290
+ skipTenantResolution?: boolean;
2019
1291
  /**
2020
1292
  * - Optional view path override used by controller render lookups.
2021
1293
  */
2022
- viewPath?: string | undefined;
1294
+ viewPath?: string;
2023
1295
  };
2024
- export type RouteResolverHookType = (arg0: RouteResolverHookArgs) => RouteResolverHookResult | null | Promise<RouteResolverHookResult | null>;
1296
+ export type RouteResolverHookType = (arg: RouteResolverHookArgs) => RouteResolverHookResult | null | Promise<RouteResolverHookResult | null>;
2025
1297
  export type AbilityResourceClassType = typeof import("./authorization/base-resource.js").default;
2026
- export type AbilityResolverType = (arg0: {
1298
+ export type AbilityResolverType = (args: {
2027
1299
  configuration: import("./configuration.js").default;
2028
- params: Record<string, unknown>;
1300
+ params: Record<string, ReturnType<typeof JSON.parse>>;
2029
1301
  request: import("./http-server/client/request.js").default | import("./http-server/client/websocket-request.js").default | undefined;
2030
1302
  response: import("./http-server/client/response.js").default | undefined;
2031
1303
  }) => import("./authorization/ability.js").default | void | Promise<import("./authorization/ability.js").default | void>;
2032
- export type TenantResolverType = (arg0: {
1304
+ export type TenantResolverType = (args: {
2033
1305
  configuration: import("./configuration.js").default;
2034
- params: Record<string, unknown>;
1306
+ params: Record<string, ReturnType<typeof JSON.parse>>;
2035
1307
  request: import("./http-server/client/request.js").default | import("./http-server/client/websocket-request.js").default | undefined;
2036
1308
  response: import("./http-server/client/response.js").default | undefined;
2037
1309
  subscription?: {
2038
1310
  channel: string;
2039
- params?: Record<string, unknown>;
1311
+ params?: Record<string, ReturnType<typeof JSON.parse>>;
2040
1312
  };
2041
- }) => unknown | void | Promise<unknown | void>;
2042
- export type TenantDatabaseResolverType = (arg0: {
1313
+ }) => ReturnType<typeof JSON.parse> | void | Promise<ReturnType<typeof JSON.parse> | void>;
1314
+ export type TenantDatabaseResolverType = (args: {
2043
1315
  configuration: import("./configuration.js").default;
2044
1316
  databaseConfiguration: DatabaseConfigurationType;
2045
1317
  identifier: string;
2046
- tenant: unknown;
1318
+ tenant: ReturnType<typeof JSON.parse>;
2047
1319
  }) => DatabaseConfigurationType | Partial<DatabaseConfigurationType> | void;
2048
1320
  export type ApiManifestConfiguration = {
2049
1321
  /**
2050
1322
  * - HTTP path for the built-in API manifest endpoint. Defaults to `/api/manifest`.
2051
1323
  */
2052
- path?: string | undefined;
1324
+ path?: string;
2053
1325
  /**
2054
1326
  * - Bearer token required in the `Authorization: Bearer <token>` header. When set, requests without a matching token are not routed (404), so the endpoint stays hidden.
2055
1327
  */
2056
- token?: string | undefined;
1328
+ token?: string;
2057
1329
  };
2058
1330
  export type DebugEndpointConfiguration = {
2059
1331
  /**
2060
1332
  * - HTTP path for the built-in debug endpoint. Defaults to `/velocious/debug`.
2061
1333
  */
2062
- path?: string | undefined;
1334
+ path?: string;
2063
1335
  /**
2064
1336
  * - Bearer token required in the `Authorization: Bearer <token>` header. When set, requests without a matching token are not routed (404), so the endpoint stays hidden.
2065
1337
  */
2066
- token?: string | undefined;
1338
+ token?: string;
2067
1339
  };
2068
1340
  export type TenantDatabaseProviderType = {
2069
1341
  /**
2070
1342
  * - Lists tenants that should be created, checked, or migrated for this database identifier.
2071
1343
  */
2072
- listTenants: (arg0: {
1344
+ listTenants: (args: {
2073
1345
  configuration: import("./configuration.js").default;
2074
1346
  identifier: string;
2075
- }) => Array<unknown> | Promise<Array<unknown>>;
1347
+ }) => Array<ReturnType<typeof JSON.parse>> | Promise<Array<ReturnType<typeof JSON.parse>>>;
2076
1348
  /**
2077
1349
  * - Lists existing tenants that should be checked for dependent restrict destroys. Defaults to listTenants.
2078
1350
  */
2079
- listRestrictTenants?: ((arg0: {
1351
+ listRestrictTenants?: (args: {
2080
1352
  configuration: import("./configuration.js").default;
2081
1353
  identifier: string;
2082
- }) => Array<unknown> | Promise<Array<unknown>>) | undefined;
1354
+ }) => Array<ReturnType<typeof JSON.parse>> | Promise<Array<ReturnType<typeof JSON.parse>>>;
2083
1355
  /**
2084
1356
  * - Creates the tenant database/schema for one tenant.
2085
1357
  */
2086
- createDatabase?: ((arg0: {
1358
+ createDatabase?: (args: {
2087
1359
  configuration: import("./configuration.js").default;
2088
1360
  databaseConfiguration: DatabaseConfigurationType;
2089
1361
  identifier: string;
2090
- tenant: unknown;
2091
- }) => void | Promise<void>) | undefined;
1362
+ tenant: ReturnType<typeof JSON.parse>;
1363
+ }) => void | Promise<void>;
2092
1364
  /**
2093
1365
  * - Drops the tenant database/schema for one tenant.
2094
1366
  */
2095
- dropDatabase?: ((arg0: {
1367
+ dropDatabase?: (args: {
2096
1368
  configuration: import("./configuration.js").default;
2097
1369
  databaseConfiguration: DatabaseConfigurationType;
2098
1370
  identifier: string;
2099
- tenant: unknown;
2100
- }) => void | Promise<void>) | undefined;
1371
+ tenant: ReturnType<typeof JSON.parse>;
1372
+ }) => void | Promise<void>;
2101
1373
  /**
2102
1374
  * - Checks one tenant database before generic connection validation.
2103
1375
  */
2104
- checkTenant?: ((arg0: {
1376
+ checkTenant?: (args: {
2105
1377
  configuration: import("./configuration.js").default;
2106
1378
  databaseConfiguration: DatabaseConfigurationType;
2107
1379
  identifier: string;
2108
- tenant: unknown;
2109
- }) => void | Promise<void>) | undefined;
1380
+ tenant: ReturnType<typeof JSON.parse>;
1381
+ }) => void | Promise<void>;
2110
1382
  /**
2111
1383
  * - Runs app-owned tenant work after generic migrations for one tenant. `migrationsApplied` is how many migrations actually ran (0 when the tenant was already up to date), so the app can skip expensive per-tenant work on no-op deploys.
2112
1384
  */
2113
- afterMigrateTenant?: ((arg0: {
1385
+ afterMigrateTenant?: (args: {
2114
1386
  configuration: import("./configuration.js").default;
2115
1387
  databaseConfiguration: DatabaseConfigurationType;
2116
1388
  identifier: string;
2117
1389
  migrationsApplied: number;
2118
- tenant: unknown;
2119
- }) => void | Promise<void>) | undefined;
1390
+ tenant: ReturnType<typeof JSON.parse>;
1391
+ }) => void | Promise<void>;
2120
1392
  };
2121
1393
  export type ConfigurationArgsType = {
2122
1394
  /**
2123
1395
  * - Globally enable auto-batch-preload of relationships on lazy access. Default true.
2124
1396
  */
2125
- autoload?: boolean | undefined;
1397
+ autoload?: boolean;
2126
1398
  /**
2127
1399
  * - CORS configuration for the HTTP server.
2128
1400
  */
2129
- cors?: CorsType | undefined;
1401
+ cors?: CorsType;
2130
1402
  /**
2131
1403
  * - Secret for encrypting cookies.
2132
1404
  */
2133
- cookieSecret?: string | undefined;
1405
+ cookieSecret?: string;
2134
1406
  /**
2135
1407
  * - Resource classes used to define abilities per model.
2136
1408
  */
2137
- abilityResources?: typeof import("./authorization/base-resource.js").default[] | undefined;
1409
+ abilityResources?: AbilityResourceClassType[];
2138
1410
  /**
2139
1411
  * - Resolver for creating request-scoped ability instances.
2140
1412
  */
2141
- abilityResolver?: AbilityResolverType | undefined;
1413
+ abilityResolver?: AbilityResolverType;
2142
1414
  /**
2143
1415
  * - Attachment storage configuration.
2144
1416
  */
2145
- attachments?: AttachmentsConfiguration | undefined;
1417
+ attachments?: AttachmentsConfiguration;
2146
1418
  /**
2147
1419
  * - Backend project definitions used for frontend model generation.
2148
1420
  */
2149
- backendProjects?: BackendProjectConfiguration[] | undefined;
1421
+ backendProjects?: BackendProjectConfiguration[];
2150
1422
  /**
2151
1423
  * - External Velocious packages that contribute models, frontend-model resources and migrations.
2152
1424
  */
2153
- packages?: VelociousPackageConfiguration[] | undefined;
1425
+ packages?: VelociousPackageConfiguration[];
2154
1426
  /**
2155
1427
  * - Database configurations keyed by environment and identifier.
2156
1428
  */
@@ -2162,27 +1434,27 @@ export type ConfigurationArgsType = {
2162
1434
  /**
2163
1435
  * - Enable debug logging.
2164
1436
  */
2165
- debug?: boolean | undefined;
1437
+ debug?: boolean;
2166
1438
  /**
2167
1439
  * - Enable the built-in debug endpoint. Defaults to false.
2168
1440
  */
2169
- debugEndpoint?: boolean | DebugEndpointConfiguration | undefined;
1441
+ debugEndpoint?: boolean | DebugEndpointConfiguration;
2170
1442
  /**
2171
1443
  * - Enable the built-in API manifest endpoint. Defaults to false.
2172
1444
  */
2173
- apiManifest?: boolean | ApiManifestConfiguration | undefined;
1445
+ apiManifest?: boolean | ApiManifestConfiguration;
2174
1446
  /**
2175
1447
  * - Base directory for the project.
2176
1448
  */
2177
- directory?: string | undefined;
1449
+ directory?: string;
2178
1450
  /**
2179
1451
  * - Require tenant-switched model queries to resolve a tenant database identifier. Defaults to true.
2180
1452
  */
2181
- enforceTenantDatabaseScopes?: boolean | undefined;
1453
+ enforceTenantDatabaseScopes?: boolean;
2182
1454
  /**
2183
1455
  * - Current environment name.
2184
1456
  */
2185
- environment?: string | undefined;
1457
+ environment?: string;
2186
1458
  /**
2187
1459
  * - Environment handler instance.
2188
1460
  */
@@ -2190,42 +1462,42 @@ export type ConfigurationArgsType = {
2190
1462
  /**
2191
1463
  * - Return unexpected internal error details in client API payloads outside production. Defaults to false.
2192
1464
  */
2193
- exposeInternalErrorsToClients?: boolean | undefined;
1465
+ exposeInternalErrorsToClients?: boolean;
2194
1466
  /**
2195
1467
  * - Default HTTP server configuration for applications started from this configuration.
2196
1468
  */
2197
- httpServer?: HttpServerConfiguration | undefined;
1469
+ httpServer?: HttpServerConfiguration;
2198
1470
  /**
2199
1471
  * - Logging configuration.
2200
1472
  */
2201
- logging?: LoggingConfiguration | undefined;
1473
+ logging?: LoggingConfiguration;
2202
1474
  /**
2203
1475
  * - Background jobs configuration.
2204
1476
  */
2205
- backgroundJobs?: BackgroundJobsConfiguration | undefined;
1477
+ backgroundJobs?: BackgroundJobsConfiguration;
2206
1478
  /**
2207
1479
  * - Beacon broadcast bus configuration.
2208
1480
  */
2209
- beacon?: BeaconConfiguration | undefined;
1481
+ beacon?: BeaconConfiguration;
2210
1482
  /**
2211
1483
  * - Scheduled background jobs configuration.
2212
1484
  */
2213
- scheduledBackgroundJobs?: ScheduledBackgroundJobsConfiguration | ScheduledBackgroundJobsLoaderType | undefined;
1485
+ scheduledBackgroundJobs?: ScheduledBackgroundJobsConfiguration | ScheduledBackgroundJobsLoaderType;
2214
1486
  /**
2215
1487
  * - Mail delivery backend.
2216
1488
  */
2217
- mailerBackend?: MailerBackend | undefined;
1489
+ mailerBackend?: MailerBackend;
2218
1490
  /**
2219
1491
  * - Hook to register models for a given initialization type.
2220
1492
  */
2221
- initializeModels: (arg0: {
1493
+ initializeModels: (args: {
2222
1494
  configuration: import("./configuration.js").default;
2223
1495
  type: string;
2224
1496
  }) => void;
2225
1497
  /**
2226
1498
  * - Initializer loader for environment bootstrapping.
2227
1499
  */
2228
- initializers?: InitializersType | undefined;
1500
+ initializers?: InitializersType;
2229
1501
  /**
2230
1502
  * - Default locale or locale resolver.
2231
1503
  */
@@ -2241,54 +1513,691 @@ export type ConfigurationArgsType = {
2241
1513
  /**
2242
1514
  * - Structure SQL generation configuration.
2243
1515
  */
2244
- structureSql?: StructureSqlConfiguration | undefined;
1516
+ structureSql?: StructureSqlConfiguration;
2245
1517
  /**
2246
1518
  * - Local/offline sync framework configuration.
2247
1519
  */
2248
- sync?: VelociousSyncConfiguration | undefined;
1520
+ sync?: VelociousSyncConfiguration;
2249
1521
  /**
2250
1522
  * - Resolver for creating request-scoped tenant context objects.
2251
1523
  */
2252
- tenantResolver?: TenantResolverType | undefined;
1524
+ tenantResolver?: TenantResolverType;
2253
1525
  /**
2254
1526
  * - Resolver for deriving tenant-specific database config overrides.
2255
1527
  */
2256
- tenantDatabaseResolver?: TenantDatabaseResolverType | undefined;
1528
+ tenantDatabaseResolver?: TenantDatabaseResolverType;
2257
1529
  /**
2258
1530
  * - Tenant database lifecycle providers keyed by database identifier.
2259
1531
  */
2260
- tenantDatabaseProviders?: Record<string, TenantDatabaseProviderType> | undefined;
1532
+ tenantDatabaseProviders?: Record<string, TenantDatabaseProviderType>;
2261
1533
  /**
2262
1534
  * - Path to the testing configuration file.
2263
1535
  */
2264
- testing?: string | undefined;
1536
+ testing?: string;
2265
1537
  /**
2266
1538
  * - Default timezone for timezone-less datetime strings.
2267
1539
  */
2268
- timeZone?: string | (() => string | undefined) | undefined;
1540
+ timeZone?: string | (() => string | undefined);
2269
1541
  /**
2270
1542
  * - Default timezone offset in minutes.
2271
1543
  */
2272
- timezoneOffsetMinutes?: number | (() => number) | undefined;
1544
+ timezoneOffsetMinutes?: number | (() => number);
2273
1545
  /**
2274
1546
  * - Trusted reverse proxy address ranges used to resolve request remote addresses from forwarding headers.
2275
1547
  */
2276
- trustedProxies?: string | string[] | undefined;
1548
+ trustedProxies?: string | string[];
2277
1549
  /**
2278
1550
  * - Timeout in seconds for completing a HTTP request.
2279
1551
  */
2280
- requestTimeoutMs?: number | (() => number) | undefined;
1552
+ requestTimeoutMs?: number | (() => number);
2281
1553
  /**
2282
1554
  * - Hook callbacks that can hijack unresolved routes.
2283
1555
  */
2284
- routeResolverHooks?: RouteResolverHookType[] | undefined;
1556
+ routeResolverHooks?: RouteResolverHookType[];
2285
1557
  /**
2286
1558
  * - Resolve a websocket channel class/instance for each connection.
2287
1559
  */
2288
- websocketChannelResolver?: WebsocketChannelResolverType | undefined;
1560
+ websocketChannelResolver?: WebsocketChannelResolverType;
2289
1561
  /**
2290
1562
  * - Resolve a raw websocket message handler for each connection.
2291
1563
  */
2292
- websocketMessageHandlerResolver?: WebsocketMessageHandlerResolverType | undefined;
1564
+ websocketMessageHandlerResolver?: WebsocketMessageHandlerResolverType;
2293
1565
  };
1566
+ /**
1567
+ * @module types
1568
+ */
1569
+ /**
1570
+ * @typedef {(args: {request: import("./http-server/client/request.js").default | import("./http-server/client/websocket-request.js").default, response: import("./http-server/client/response.js").default}) => Promise<void>} CorsType
1571
+ */
1572
+ /**
1573
+ * @typedef {(args: {request: import("./http-server/client/request.js").default | import("./http-server/client/websocket-request.js").default | undefined, subscription?: {channel: string, params?: Record<string, ReturnType<typeof JSON.parse>>}, client: import("./http-server/client/index.js").default, websocketSession: import("./http-server/client/websocket-session.js").default, configuration: import("./configuration.js").default}) => typeof import("./http-server/websocket-channel.js").default | import("./http-server/websocket-channel.js").default | void | Promise<typeof import("./http-server/websocket-channel.js").default | import("./http-server/websocket-channel.js").default | void>} WebsocketChannelResolverType
1574
+ */
1575
+ /**
1576
+ * @typedef {object} WebsocketMessageHandler
1577
+ * @property {(args: {message: ReturnType<typeof JSON.parse>, session: import("./http-server/client/websocket-session.js").default}) => Promise<void> | void} [onMessage] - Handler for incoming websocket messages.
1578
+ * @property {(args: {session: import("./http-server/client/websocket-session.js").default}) => Promise<void> | void} [onOpen] - Handler when the websocket session opens.
1579
+ * @property {(args: {session: import("./http-server/client/websocket-session.js").default}) => Promise<void> | void} [onClose] - Handler when the websocket session closes.
1580
+ * @property {(args: {error: Error, session: import("./http-server/client/websocket-session.js").default}) => Promise<void> | void} [onError] - Handler when a websocket message errors.
1581
+ */
1582
+ /**
1583
+ * @typedef {(args: {request: import("./http-server/client/request.js").default | import("./http-server/client/websocket-request.js").default | undefined, client: import("./http-server/client/index.js").default, configuration: import("./configuration.js").default}) => WebsocketMessageHandler | void | Promise<WebsocketMessageHandler | void>} WebsocketMessageHandlerResolverType
1584
+ */
1585
+ /**
1586
+ * @typedef {(id: string) => {default: typeof import("./initializer.js").default}} InitializersRequireContextType
1587
+ * @typedef {InitializersRequireContextType & {
1588
+ * keys: () => string[],
1589
+ * id: string
1590
+ * }} WebpackRequireContext
1591
+ * @typedef {{requireContext: WebpackRequireContext}} InitializersExportType
1592
+ * @typedef {(args: {configuration: import("./configuration.js").default}) => Promise<InitializersExportType>} InitializersType
1593
+ */
1594
+ /**
1595
+ * @typedef {object} SqlConfig
1596
+ * @property {string} [database] - Database name for the SQL driver.
1597
+ * @property {object} [options] - Driver-specific connection options.
1598
+ * @property {boolean} [options.encrypt] - Whether to encrypt the connection (MSSQL).
1599
+ * @property {string} [options.schema] - Default schema for unqualified table lookups (MSSQL).
1600
+ * @property {string} [options.serverName] - TLS SNI server name override for MSSQL (empty string disables SNI).
1601
+ * @property {boolean} [options.trustServerCertificate] - Whether to trust the server certificate (MSSQL).
1602
+ * @property {string} [password] - Password for the SQL user.
1603
+ * @property {object} [pool] - Connection pool configuration.
1604
+ * @property {number | null} [pool.max] - Maximum number of connections. Set null to disable the cap.
1605
+ * @property {number} [pool.min] - Minimum number of connections.
1606
+ * @property {number} [pool.idleTimeoutMillis] - Idle timeout before releasing a connection.
1607
+ * @property {number | null} [pool.checkoutTimeoutMillis] - Timeout while waiting for an available connection after the max connection cap is reached. Set null to wait indefinitely.
1608
+ * @property {string} [server] - SQL server hostname.
1609
+ * @property {string} [user] - SQL username.
1610
+ */
1611
+ /**
1612
+ * @typedef {object} DatabasePoolConfiguration
1613
+ * @property {number | null} [checkoutTimeoutMillis] - Timeout while a checkout waits for an available async-tracked connection after the max live connection cap is reached. Set null to wait indefinitely. Default: 10000.
1614
+ * @property {number | null} [idleTimeoutMillis] - Idle timeout before closing a checked-in async-tracked connection. Set null to disable idle reaping. Default: 5000.
1615
+ * @property {number | null} [max] - Maximum live async-tracked connections for this pool. Defaults to 10. Extra checkouts wait until a matching connection is checked in or capacity is freed. Set null to disable the cap.
1616
+ */
1617
+ /**
1618
+ * @typedef {object} DatabaseConfigurationType
1619
+ * @property {string} [databaseCharset] - Default character set applied by `db:create` via mysql/mariadb `CREATE DATABASE ... CHARACTER SET`. Distinct from `charset`, which is the client connection charset forwarded to the mysql2 driver.
1620
+ * @property {string} [databaseCollation] - Default collation applied by `db:create` via mysql/mariadb `CREATE DATABASE ... COLLATE`.
1621
+ * @property {string} [database] - Database name for this connection.
1622
+ * @property {number} [deadlockMaxRetries] - Maximum attempts for the outermost transaction when it keeps hitting deadlocks. Defaults to 8.
1623
+ * @property {number} [deadlockBaseWaitMs] - Base delay (ms) for the deadlock retry backoff; the per-attempt ceiling doubles from here. Defaults to 50.
1624
+ * @property {number} [deadlockMaxWaitMs] - Cap (ms) on the deadlock retry backoff ceiling so the jittered wait stays bounded. Defaults to 1000.
1625
+ * @property {typeof import("./database/drivers/base.js").default} [driver] - Driver class to use for this database.
1626
+ * @property {typeof import("./database/pool/base.js").default} [poolType] - Pool class to use for this database.
1627
+ * @property {() => ReturnType<typeof JSON.parse>} [getConnection] - Custom connection factory override.
1628
+ * @property {string} [host] - Database host.
1629
+ * @property {boolean} [migrations] - Whether migrations are enabled for this database.
1630
+ * @property {boolean} [multipleStatements] - (MySQL) Opt in to multi-statement queries so a whole structure SQL dump loads in one round-trip via `StructureSqlLoader`. Off by default; ordinary queries otherwise reject stacked statements.
1631
+ * @property {string} [password] - Password for the database user.
1632
+ * @property {number} [port] - Database port.
1633
+ * @property {string} [primaryKeyType] - Default type for implicit migration primary keys and references. Defaults to `uuid`.
1634
+ * @property {DatabasePoolConfiguration} [pool] - Velocious database pool lifecycle configuration.
1635
+ * @property {string} [name] - Friendly name for the configuration.
1636
+ * @property {(file: string) => string} [locateFile] - Optional sqlite-web sql.js wasm resolver (`initSqlJs({locateFile})`).
1637
+ * @property {boolean} [readOnly] - Whether writes should be blocked for this database.
1638
+ * @property {string} [schema] - Default schema for unqualified table lookups (MSSQL).
1639
+ * @property {boolean} [schemaCache] - Whether schema metadata should be cached on the driver. Defaults to true.
1640
+ * @property {object} [record] - Record-level configuration.
1641
+ * @property {boolean} [record.transactions] - Whether record operations should use transactions.
1642
+ * @property {boolean} [reset] - Whether to reset the database on startup.
1643
+ * @property {SqlConfig} [sqlConfig] - Driver-specific SQL config.
1644
+ * @property {boolean} [tenantOnly] - Whether this database identifier is only active inside a resolved tenant context.
1645
+ * @property {"mssql" | "mysql" | "pgsql" | "sqlite"} [type] - Database type identifier.
1646
+ * @property {string} [useDatabase] - Database to switch to after connecting.
1647
+ * @property {string} [username] - Username for database authentication.
1648
+ */
1649
+ /**
1650
+ * @typedef {"debug-low-level" | "debug" | "info" | "warn" | "error"} LogLevel
1651
+ */
1652
+ /**
1653
+ * @typedef {object} LoggingOutputPayload
1654
+ * @property {LogLevel} level - Log level.
1655
+ * @property {string} message - Formatted message.
1656
+ * @property {string} subject - Log subject.
1657
+ * @property {Date} timestamp - Timestamp.
1658
+ */
1659
+ /**
1660
+ * @typedef {object} LoggingOutput
1661
+ * @property {(arg: LoggingOutputPayload) => Promise<void> | void} write - Write a log entry.
1662
+ * @property {LogLevel[]} [levels] - Default levels for this output.
1663
+ */
1664
+ /**
1665
+ * @typedef {object} LoggingOutputConfig
1666
+ * @property {LoggingOutput} output - Output instance.
1667
+ * @property {Array<LogLevel>} [levels] - Levels enabled for this output.
1668
+ */
1669
+ /**
1670
+ * @typedef {LoggingOutputConfig | LoggingOutput | import("./logger/base-logger.js").default} LoggerConfig
1671
+ */
1672
+ /**
1673
+ * @typedef {object} LoggingConfiguration
1674
+ * @property {boolean} [console] - Enable/disable console logging for request logging. Defaults to true outside of "test" and for HTTP server logs.
1675
+ * @property {boolean} [file] - Enable/disable writing logs to a file. Defaults to true.
1676
+ * @property {string} [directory] - Directory where log files are stored. Defaults to "<project>/log".
1677
+ * @property {string} [filePath] - Explicit path for the log file. Defaults to "<directory>/<environment>.log".
1678
+ * @property {Array<"debug-low-level" | "debug" | "info" | "warn" | "error">} [levels] - Override which log levels are emitted.
1679
+ * @property {boolean} [debugLowLevel] - Convenience flag to include very low-level debug logs.
1680
+ * @property {boolean} [queryLogging] - Enable/disable database query logging. Defaults to true outside test and false in test.
1681
+ * @property {LoggerConfig[]} [loggers] - Logger instances (converted to outputs when configured).
1682
+ * @property {LoggingOutputConfig[]} [outputs] - Explicit logger outputs (overrides console/file defaults when provided).
1683
+ */
1684
+ /**
1685
+ * @typedef {object} StructureSqlConfiguration
1686
+ * @property {string[]} [enabledEnvironments] - Environments allowed to write structure sql files during automatic migration dumps.
1687
+ * @property {string[]} [disabledEnvironments] - Environments that should skip writing structure sql files.
1688
+ */
1689
+ /**
1690
+ * @typedef {"beacon" | "polling"} BackgroundJobsDispatchStrategy
1691
+ *
1692
+ * - `"beacon"` (default): event-driven dispatch. The
1693
+ * `background-jobs-main` process drains the queue on enqueue, on
1694
+ * worker readiness, on Beacon broadcasts (so cross-process enqueues
1695
+ * wake it), and arms a `setTimeout` for the soonest future-scheduled
1696
+ * job. Falls back gracefully to direct in-process triggering when
1697
+ * Beacon is not configured.
1698
+ * - `"polling"`: legacy mode, runs a fixed-interval poll over the
1699
+ * `background_jobs` table (see `pollIntervalMs`).
1700
+ */
1701
+ /**
1702
+ * @typedef {object} BackgroundJobsConfiguration
1703
+ * @property {string} [host] - Hostname for the background jobs main process.
1704
+ * @property {number} [port] - Port for the background jobs main process.
1705
+ * @property {string} [databaseIdentifier] - Database identifier used to store background jobs.
1706
+ * @property {number} [maxConcurrentInlineJobs] - How many `forked: false` jobs a single
1707
+ * `background-jobs-worker` process is allowed to run in parallel. Concurrency
1708
+ * is at the JS event-loop level: every concurrent job shares the worker's
1709
+ * process and DB connection pool, so this should fit the pool size, not the
1710
+ * CPU count. Forking remains the right tool for memory isolation across
1711
+ * long-running jobs and for using more cores. Default: `4`.
1712
+ * @property {number} [maxConcurrentForkedJobs] - How many out-of-process
1713
+ * `"forked"` or `"spawned"` jobs a single `background-jobs-worker` is
1714
+ * allowed to keep in flight. Default: `4`. This is a per-worker safety cap;
1715
+ * for workload-shaped limits use per-queue caps (`queues`) instead, which are
1716
+ * enforced cluster-wide and are immune to duplicate worker processes.
1717
+ * @property {number} [pooledRunnerCount] - Number of warm, reusable child runners owned by each worker. Pooled capacity is separate from inline and forked/spawned capacity. Default: `4`.
1718
+ * @property {number} [pooledRunnerConcurrency] - Number of jobs each pooled child runs concurrently on its own event loop. Total per-worker pooled capacity is `pooledRunnerCount × pooledRunnerConcurrency`. `1` (default) keeps each child serial; raise it for I/O-bound jobs so a bounded set of isolated processes handles high concurrency (like the inline lane) without one process per concurrent job. Default: `1`.
1719
+ * @property {number} [pooledRunnerMaxJobs] - Number of sequential jobs a pooled child runs before it is replaced, bounding process-level resource accumulation. Default: `100`.
1720
+ * @property {number} [pooledRunnerMaxRssBytes] - RSS bytes after an acknowledged job at which a pooled child is replaced. Default: `536870912` (512 MiB).
1721
+ * @property {number} [pooledRunnerMaxLifetimeMs] - Age after an acknowledged job at which a pooled child is replaced. Default: `3600000` (one hour).
1722
+ * @property {Record<string, {maxConcurrent?: number, priority?: number}>} [queues] - Per-queue
1723
+ * concurrency caps and dispatch priorities, Sidekiq-style. A job declares its queue (static
1724
+ * `queue` on the job class, or the `queue` enqueue option; defaults to `"default"`), and
1725
+ * `queues[name].maxConcurrent` bounds how many jobs from that queue may be
1726
+ * in flight across the whole cluster (enforced via durable per-key
1727
+ * concurrency, so it holds regardless of how many worker processes run).
1728
+ * Size each queue to its workload: I/O-bound queues (e.g. build runners
1729
+ * waiting on remote Docker servers) can run far above the core count, while
1730
+ * CPU-bound queues should stay near it. `queues[name].priority` (default `0`)
1731
+ * makes the main process dispatch higher-priority queues before lower-priority
1732
+ * ones regardless of enqueue order, so a small time-critical queue can never be
1733
+ * starved by a flood of low-priority work sharing a worker pool. Unlike
1734
+ * Sidekiq's strict queue ordering, priority composes with the per-queue caps:
1735
+ * a higher-priority queue that is already at its `maxConcurrent` is skipped and
1736
+ * dispatch falls through to the next eligible lower-priority job, so a busy
1737
+ * high-priority queue does not block everything else. This fallthrough is a
1738
+ * property of the queue-derived cap; a job that supplies its own explicit
1739
+ * `concurrencyKey`/`maxConcurrency` bypasses the queue cap entirely (an
1740
+ * explicit key always wins — see above) and is bounded only by that key, so it
1741
+ * is not held back by the queue's cap and priority simply orders it normally.
1742
+ * Priorities may be any number, including negative to sink a queue below the
1743
+ * default. Jobs within the same priority keep FIFO (`scheduled_at`, then
1744
+ * `created_at`) order. Default: `{}` (no queue caps, all queues priority `0`).
1745
+ * @property {BackgroundJobsDispatchStrategy} [dispatchStrategy] - How the main process
1746
+ * detects new work. Defaults to `"beacon"` (event-driven). Set to `"polling"`
1747
+ * to restore the legacy fixed-interval poll.
1748
+ * @property {number} [pollIntervalMs] - Poll interval in milliseconds. Only used
1749
+ * when `dispatchStrategy === "polling"`. Default: `1000`.
1750
+ * @property {number | null} [jobTimeoutMs] - Wall-clock backstop, in ms, for a
1751
+ * `"forked"` job runner. A forked job still running after this is terminated
1752
+ * (SIGTERM, then SIGKILL after the reaping grace) and reported failed, so a
1753
+ * single genuinely-hung runner can't pin a draining worker — and its full-app
1754
+ * boot and DB connections — indefinitely (e.g. across a deploy where a retired
1755
+ * worker drains in-flight jobs). This is a coarse safety net, not per-job
1756
+ * tuning: set it well above the longest legitimate forked job (build runners,
1757
+ * long imports) so only genuinely-stuck runners are killed. Omit, `null`, or
1758
+ * `<= 0` to disable (default), which preserves the prior unbounded behavior.
1759
+ * @property {BackgroundJobsRetentionConfiguration} [retention] - Retention/pruning
1760
+ * of terminal job rows. Without pruning the jobs table grows unbounded
1761
+ * (completed rows accumulate forever), which bloats storage and indexes and
1762
+ * eventually slows dispatch. The main process sweeps terminal rows past their
1763
+ * window on an interval.
1764
+ */
1765
+ /**
1766
+ * @typedef {object} BackgroundJobsRetentionConfiguration
1767
+ * @property {number | null} [completedTtlMs] - Delete `completed` jobs whose
1768
+ * `completed_at_ms` is older than this many ms. `null` or `<= 0` disables
1769
+ * completed pruning. Default: `604800000` (7 days).
1770
+ * @property {number | null} [failedTtlMs] - Delete terminal `failed`/`orphaned`
1771
+ * jobs older than this many ms. `null` or `<= 0` disables (keeps them for
1772
+ * debugging). Default: `2592000000` (30 days).
1773
+ * @property {number} [batchSize] - Rows deleted per batch. Default: `1000`.
1774
+ * @property {number} [sweepIntervalMs] - How often the retention sweep runs.
1775
+ * Default: `3600000` (1 hour).
1776
+ */
1777
+ /**
1778
+ * Fully-resolved retention config as returned by `getBackgroundJobsConfig()`
1779
+ * (every field defaulted), as opposed to the partial user-provided input.
1780
+ * @typedef {object} ResolvedBackgroundJobsRetentionConfiguration
1781
+ * @property {number | null} completedTtlMs - Resolved completed-job TTL in ms (`null` disables).
1782
+ * @property {number | null} failedTtlMs - Resolved failed/orphaned TTL in ms (`null` disables).
1783
+ * @property {number} batchSize - Resolved delete batch size.
1784
+ * @property {number} sweepIntervalMs - Resolved sweep interval in ms.
1785
+ */
1786
+ /**
1787
+ * @typedef {object} BeaconConfiguration
1788
+ * @property {boolean} [enabled] - Whether to connect to a Beacon broker. Defaults to false unless `host`/`port` or `inProcess: true` are set, or env vars are present. Explicit `false` disables Beacon even when env vars are set.
1789
+ * @property {boolean} [inProcess] - When true, use a module-level in-process broker singleton instead of connecting over TCP. Mutually exclusive with `host`/`port`. Useful for tests and single-process deployments.
1790
+ * @property {string} [host] - Hostname of the Beacon broker daemon.
1791
+ * @property {number} [port] - Port of the Beacon broker daemon.
1792
+ * @property {string} [peerType] - Optional human-readable label for this peer (e.g. "server", "background-jobs-worker").
1793
+ * @property {number} [unreachableReportMs] - Grace window (ms) a beacon connect/disconnect blip must persist before it is reported as a framework-error. Transient outages that recover within this window (e.g. a deploy restarting the broker) are not reported. Defaults to 30000.
1794
+ */
1795
+ /**
1796
+ * @typedef {object} HttpCompressionConfiguration
1797
+ * @property {boolean} [enabled] - Whether buffered response compression is enabled. Defaults to true; set false to disable globally.
1798
+ * @property {number} [threshold] - Minimum buffered body size in bytes before compression is applied. Defaults to 1024.
1799
+ * @property {number} [brotliQuality] - Brotli encoder quality (0-11). Defaults to 4.
1800
+ * @property {number} [gzipLevel] - Gzip compression level (0-9). Defaults to 6.
1801
+ */
1802
+ /**
1803
+ * @typedef {object} NormalizedHttpCompressionConfiguration
1804
+ * @property {boolean} enabled - Whether buffered HTTP response compression is enabled.
1805
+ * @property {number} threshold - Minimum buffered body size in bytes before compression is applied.
1806
+ * @property {number} brotliQuality - Brotli encoder quality (0-11).
1807
+ * @property {number} gzipLevel - Gzip compression level (0-9).
1808
+ */
1809
+ /**
1810
+ * @typedef {object} HttpServerConfiguration
1811
+ * @property {boolean | HttpCompressionConfiguration} [compression] - Buffered response compression. Enabled with documented defaults when absent; false or {enabled: false} disables it globally.
1812
+ * @property {string} [host] - Hostname to bind the HTTP server to.
1813
+ * @property {boolean} [inProcess] - Run HTTP handlers in the main thread instead of worker threads.
1814
+ * @property {number} [maxWorkers] - Backward-compatible alias for workers.
1815
+ * @property {number} [port] - Port to bind the HTTP server to.
1816
+ * @property {{maxPendingBytes?: number, maxPendingMessages?: number}} [websocketInboundQueue] - Per-session retained inbound WebSocket message limits.
1817
+ * @property {{maxPendingBytes?: number, maxPendingFrames?: number}} [websocketOutboundQueue] - Per-client retained outbound WebSocket frame limits.
1818
+ * @property {number} [workers] - Worker handlers to start for the HTTP server.
1819
+ */
1820
+ /**
1821
+ * @typedef {object} ScheduledBackgroundJobEveryOptions
1822
+ * @property {number | string} [firstIn] - Delay before the first enqueue.
1823
+ */
1824
+ /**
1825
+ * @typedef {object} ScheduledBackgroundJobConfiguration
1826
+ * @property {Array<ReturnType<typeof JSON.parse>>} [args] - Arguments passed to the job when enqueued.
1827
+ * @property {typeof import("./background-jobs/job.js").default} class - Job class to enqueue.
1828
+ * @property {string} [cron] - Crontab expression (5-field POSIX, plus `@hourly`/`@daily`/`@weekly`/`@monthly`/`@yearly`/`@midnight`). Mutually exclusive with `every`.
1829
+ * @property {boolean} [enabled] - Whether the schedule is enabled.
1830
+ * @property {number | string | [number | string, ScheduledBackgroundJobEveryOptions]} [every] - Repeat interval. Either `every` or `cron` must be set.
1831
+ * @property {import("./background-jobs/types.js").BackgroundJobOptions} [options] - Job options.
1832
+ */
1833
+ /**
1834
+ * @typedef {Record<string, string>} VelociousParams
1835
+ */
1836
+ /**
1837
+ * @typedef {Record<string, import("./frontend-models/query.js").FrontendModelTransportValue>} ClientErrorPayloadReporterPayload
1838
+ */
1839
+ /**
1840
+ * @typedef {object} ErrorRequestDetails
1841
+ * @property {ReturnType<typeof JSON.parse>} [body] - Sanitized parsed request body, when available.
1842
+ * @property {string} httpMethod - Request HTTP method.
1843
+ * @property {string} path - Request path.
1844
+ */
1845
+ /**
1846
+ * @typedef {object} ClientErrorPayloadContext
1847
+ * @property {string} controller - Controller class name.
1848
+ * @property {string} [action] - Controller action or endpoint label.
1849
+ * @property {"index" | "find" | "create" | "update" | "destroy" | "attach" | "attachmentList" | "download" | "url" | "custom-command"} [commandType] - Frontend-model command type.
1850
+ * @property {string} [correlationId] - Server-generated identifier shared by an unexpected client error and framework reports.
1851
+ * @property {boolean} [expectedError] - Whether the error is an expected user-flow failure.
1852
+ * @property {boolean} [frontendModelEndpoint] - Whether the error came from the frontend-model endpoint.
1853
+ * @property {string} [model] - Frontend-model name from the failed request.
1854
+ * @property {string} [requestId] - Shared frontend-model request id.
1855
+ */
1856
+ /**
1857
+ * @typedef {(args: {
1858
+ * context: ClientErrorPayloadContext,
1859
+ * error: Error,
1860
+ * request: import("./http-server/client/request.js").default | import("./http-server/client/websocket-request.js").default | undefined,
1861
+ * requestDetails: ErrorRequestDetails | null
1862
+ * }) => Promise<ClientErrorPayloadReporterPayload | void> | ClientErrorPayloadReporterPayload | void} ClientErrorPayloadReporterType
1863
+ */
1864
+ /**
1865
+ * @typedef {Record<string, unknown> & {configuration?: import("./configuration.js").default, currentDevice?: unknown, currentUser?: unknown, modelRegistry?: Record<string, unknown> | {model: (name: string) => unknown}, now?: Date | (() => Date), offlineGrant?: unknown, params?: VelociousParams, request?: import("./http-server/client/request.js").default | import("./http-server/client/websocket-request.js").default, resourceRuntime?: "backend" | "frontend" | "offline"}} VelociousLooseObject
1866
+ */
1867
+ /**
1868
+ * @typedef {new (args: {attachmentName?: string, configuration: import("./configuration.js").default, modelClass?: typeof import("./database/record/index.js").default, name?: string, options?: Record<string, ReturnType<typeof JSON.parse>>}) => object} AttachmentDriverConstructor
1869
+ */
1870
+ /**
1871
+ * @typedef {object} ScheduledBackgroundJobsConfiguration
1872
+ * @property {Record<string, ScheduledBackgroundJobConfiguration>} jobs - Scheduled jobs keyed by name.
1873
+ */
1874
+ /**
1875
+ * @typedef {(args: {configuration: import("./configuration.js").default}) => ScheduledBackgroundJobsConfiguration | Promise<ScheduledBackgroundJobsConfiguration>} ScheduledBackgroundJobsLoaderType
1876
+ */
1877
+ /**
1878
+ * @typedef {object} AttachmentDriverConfiguration
1879
+ * @property {(args: {configuration: import("./configuration.js").default, name: string, options: Record<string, ReturnType<typeof JSON.parse>>}) => Record<string, ReturnType<typeof JSON.parse>>} [create] - Optional factory for a custom attachment driver instance.
1880
+ * @property {AttachmentDriverConstructor} [driverClass] - Optional custom attachment driver class.
1881
+ * @property {Record<string, ReturnType<typeof JSON.parse>>} [instance] - Optional custom attachment driver instance.
1882
+ */
1883
+ /**
1884
+ * @typedef {object} AttachmentsConfiguration
1885
+ * @property {string} [defaultDriver] - Default attachment storage driver name.
1886
+ * @property {Record<string, AttachmentDriverConfiguration & Record<string, ReturnType<typeof JSON.parse>>>} [drivers] - Named attachment driver configurations.
1887
+ * @property {boolean} [allowPathInput] - Whether `{path: ...}` attachment input is allowed.
1888
+ * @property {string[]} [allowedPathPrefixes] - Optional allowlist of directories for `{path: ...}` input.
1889
+ */
1890
+ /**
1891
+ * @typedef {object} MailerBackend
1892
+ * @property {(args: {payload: import("./mailer.js").MailerDeliveryPayload, configuration: import("./configuration.js").default}) => Promise<ReturnType<typeof JSON.parse>> | ReturnType<typeof JSON.parse>} deliver - Deliver a mailer payload.
1893
+ */
1894
+ /**
1895
+ * @typedef {Record<string, string[]>} LocaleFallbacksType
1896
+ */
1897
+ /**
1898
+ * @typedef {object} FrontendModelRelationshipConfiguration
1899
+ * @property {"belongsTo" | "hasOne" | "hasMany"} type - Relationship type.
1900
+ * @property {string} [model] - Target model class name.
1901
+ * @property {string} [className] - Alias of target model class name.
1902
+ * @property {string} [modelClassName] - Explicit target model class name.
1903
+ */
1904
+ /**
1905
+ * @typedef {object} FrontendModelAttributeConfiguration
1906
+ * @property {string} [type] - Column type name.
1907
+ * @property {string} [columnType] - Alias for column type name.
1908
+ * @property {string} [sqlType] - Alias for column type name.
1909
+ * @property {string} [dataType] - Alias for column type name.
1910
+ * @property {string} [jsDocType] - Exact generated JSDoc type for non-column attributes.
1911
+ * @property {string} [name] - Attribute name when configured as an array entry.
1912
+ * @property {boolean} [null] - Whether value can be null.
1913
+ * @property {boolean} [selectedByDefault] - Whether included in default serialization. Defaults to true.
1914
+ */
1915
+ /**
1916
+ * @typedef {object} FrontendModelAttachmentConfiguration
1917
+ * @property {"hasOne" | "hasMany"} type - Attachment cardinality.
1918
+ */
1919
+ /**
1920
+ * @typedef {object} FrontendModelResourceConfiguration
1921
+ * @property {Array<string | FrontendModelAttributeConfiguration> | Record<string, FrontendModelAttributeConfiguration | import("./database/drivers/base-column.js").default | boolean>} attributes - Attributes to expose on the frontend model.
1922
+ * @property {string[]} [abilities] - Additional camelCase ability action names to expose for per-record `record.can(action)` reads. Base CRUD actions (`read`, `create`, `update`, `destroy`) are always included and must not be listed here.
1923
+ * @property {Record<string, FrontendModelAttachmentConfiguration>} [attachments] - Attachment helpers keyed by attachment name.
1924
+ * @property {string[]} [commands] - Legacy built-in command names (`index`, `find`, `create`, `update`, `destroy`, `attach`, `download`, `url`).
1925
+ * @property {Array<FrontendModelResourceCustomCommand>} [collectionCommands] - Custom collection commands. Each entry is a camelCase method name, or a `{name, args?, returnType?}` object declaring typed arguments and/or a response type. The runtime derives the kebab-case command slug from the name.
1926
+ * @property {Array<FrontendModelResourceCustomCommand>} [memberCommands] - Custom member commands. Each entry is a camelCase method name, or a `{name, args?, returnType?}` object declaring typed arguments and/or a response type. The runtime derives the kebab-case command slug from the name.
1927
+ * @property {string[]} [builtInCollectionCommands] - Built-in collection command names (`index`, `create`).
1928
+ * @property {string[]} [builtInMemberCommands] - Built-in member command names (`find`, `update`, `destroy`, `attach`, `download`, `url`).
1929
+ * @property {string} [modelName] - Frontend model name override.
1930
+ * @property {string[]} [relationships] - Relationship names to expose in frontend models. Type and target model are inferred from the backend model's registered relationships.
1931
+ * @property {string} [primaryKey] - Primary key attribute name.
1932
+ * @property {FrontendModelResourceServerConfiguration} [server] - Optional legacy backend behavior overrides for built-in frontend actions.
1933
+ * @property {FrontendModelResourceSyncConfiguration | boolean} [sync] - Optional safe local/offline sync policy metadata. `policy` participates in the hash but is not exposed to generated frontend config/manifest.
1934
+ */
1935
+ /**
1936
+ * Object form of a custom command entry, declaring its typed arguments and/or
1937
+ * response type alongside the command name.
1938
+ * @typedef {object} FrontendModelResourceCustomCommandObject
1939
+ * @property {string} name - camelCase command method name.
1940
+ * @property {Array<{name: string, type: string}>} [args] - Typed command arguments; each generates a named, typed method parameter mapped positionally into the command payload. `type` is a JSDoc type string.
1941
+ * @property {string} [returnType] - JSDoc type for the command response. When set, the generated method is typed `Promise<returnType>` instead of `Promise<Record<string, ReturnType<typeof JSON.parse>>>`. Emitted verbatim into the generated frontend model, so it must resolve there.
1942
+ */
1943
+ /**
1944
+ * A custom command entry: a plain camelCase method name, or an object declaring
1945
+ * typed args and/or a response type.
1946
+ * @typedef {string | FrontendModelResourceCustomCommandObject} FrontendModelResourceCustomCommand
1947
+ */
1948
+ /**
1949
+ * JSON value accepted by sync policy metadata/hash inputs.
1950
+ * @typedef {null | string | number | boolean | unknown[] | Record<string, unknown>} FrontendModelSyncJsonValue
1951
+ */
1952
+ /**
1953
+ * Frontend-model local/offline sync policy config. `metadata` is exposed to
1954
+ * frontends and peers; `policy` is hashed but intentionally omitted from
1955
+ * frontend-safe manifests.
1956
+ * @typedef {object} FrontendModelResourceSyncConfiguration
1957
+ * @property {"optimisticVersion" | "serverWins" | "lastWriterWins" | "fieldThreeWay" | "appendOnly"} [conflictStrategy] - Strategy used when replay detects server/client divergence. Defaults to `optimisticVersion`.
1958
+ * @property {boolean} [enabled] - Whether the resource is sync-enabled. Defaults to true when `sync` is configured.
1959
+ * @property {string[]} [operations] - Sync operation names such as `index`, `find`, `create`, `update`, custom domain commands, etc.
1960
+ * @property {string | number} [policyVersion] - App-controlled policy version used as a stable change signal.
1961
+ * @property {Record<string, FrontendModelSyncJsonValue>} [metadata] - Safe frontend-visible metadata.
1962
+ * @property {Record<string, FrontendModelSyncJsonValue>} [policy] - Deterministic non-secret policy inputs included in the policy hash only.
1963
+ */
1964
+ /**
1965
+ * Velocious sync API endpoint configuration.
1966
+ * @typedef {object} VelociousSyncApiConfiguration
1967
+ * @property {string} [mountPath] - Mount path for the sync endpoints. Defaults to "/velocious/sync".
1968
+ * @property {FrontendModelResourceClassType} resourceClass - App sync resource class served by the auto-mounted sync endpoints.
1969
+ */
1970
+ /**
1971
+ * Client-side sync transport owning HTTP POSTs to the framework sync endpoints,
1972
+ * matching the frontend-model websocket client post contract.
1973
+ * @typedef {object} VelociousSyncClientTransport
1974
+ * @property {(path: string, body?: ReturnType<typeof JSON.parse>, options?: {headers?: Record<string, string>}) => Promise<{json: () => ReturnType<typeof JSON.parse>}>} post - Posts one request and resolves a response with a json accessor.
1975
+ */
1976
+ /**
1977
+ * Websocket client contract required from `sync.client.realtime.createClient`,
1978
+ * matching `VelociousWebsocketClient` / snapreq's websocket client.
1979
+ * @typedef {object} VelociousSyncRealtimeWebsocketClient
1980
+ * @property {() => Promise<ReturnType<typeof JSON.parse>>} connect - Connects the websocket.
1981
+ * @property {(channelType: string, options?: {params?: Record<string, ReturnType<typeof JSON.parse>>, onMessage?: (body: ReturnType<typeof JSON.parse>) => void, onResume?: () => void, onClose?: (reason: string) => void}) => VelociousSyncRealtimeSubscription} subscribeChannel - Opens one channel subscription.
1982
+ * @property {() => Promise<void>} disconnectAndStopReconnect - Closes the socket and stops auto-reconnect.
1983
+ */
1984
+ /**
1985
+ * Channel subscription handle returned by `subscribeChannel`.
1986
+ * @typedef {object} VelociousSyncRealtimeSubscription
1987
+ * @property {() => void} close - Closes the subscription.
1988
+ * @property {() => boolean} isReady - Whether the subscription is acknowledged and ready.
1989
+ * @property {(params?: {timeoutMs?: number}) => Promise<void>} waitForReady - Resolves once the server acknowledges the subscription.
1990
+ */
1991
+ /**
1992
+ * One realtime channel subscription descriptor.
1993
+ * @typedef {object} VelociousSyncRealtimeChannelDescriptor
1994
+ * @property {string} channel - Server channel name to subscribe.
1995
+ * @property {Record<string, ReturnType<typeof JSON.parse>>} [params] - Subscribe params (runtime scope values). The framework injects `authenticationToken` automatically.
1996
+ * @property {string} [resourceType] - Default resource/model name for pushed changes that do not carry their own resourceType.
1997
+ */
1998
+ /**
1999
+ * Realtime push configuration for the sync client. Only the genuinely
2000
+ * app-owned callback lives here: how to build the websocket client.
2001
+ * Everything else - deriving the framework sync channel subscriptions from
2002
+ * the declared pull scopes, subscribing, applying pushes through the derived
2003
+ * resource applier, echo suppression, and pull-on-reconnect - is derived.
2004
+ * @typedef {object} VelociousSyncClientRealtimeConfiguration
2005
+ * @property {() => VelociousSyncRealtimeWebsocketClient | Promise<VelociousSyncRealtimeWebsocketClient>} createClient - Builds the (unconnected) websocket client; the framework owns connect/disconnect.
2006
+ * @property {(context: ReturnType<typeof JSON.parse>) => Array<VelociousSyncRealtimeChannelDescriptor> | Promise<Array<VelociousSyncRealtimeChannelDescriptor>>} [channels] - Deprecated legacy escape hatch: resolves extra app-channel descriptors from the `subscribeRealtime(context)` context. Declared pull scopes subscribe the framework sync channel automatically.
2007
+ * @property {() => string | Promise<string>} [localOrigin] - Resolves this device's echo origin; pushed messages with a matching `echoOrigin` are dropped.
2008
+ * @property {boolean} [pullOnReconnect] - Fire a coalesced `pull()` when subscriptions become ready or resume after a drop, closing offline gaps. Defaults to true.
2009
+ */
2010
+ /**
2011
+ * Client-side sync configuration consumed by `SyncClient.fromConfiguration(...)`.
2012
+ * The framework owns the `${mountPath}/changes` and `${mountPath}/replay`
2013
+ * POSTers over the given transport.
2014
+ * @typedef {object} VelociousSyncClientConfiguration
2015
+ * @property {() => string | Promise<string>} authenticationToken - Resolves the auth token sent with sync requests.
2016
+ * @property {number} [batchSize] - Max syncs per request.
2017
+ * @property {() => boolean | Promise<boolean>} [isOnline] - Connectivity gate for pulls and replays. Defaults to always online.
2018
+ * @property {string} [mountPath] - Mount path the server serves the sync endpoints under (match the server's `sync.api.mountPath`). Defaults to "/velocious/sync"; normalization strips trailing slashes and always fills in the default.
2019
+ * @property {(error: Error) => void} [onError] - Reports background replay/pull failures. Defaults to rethrowing.
2020
+ * @property {VelociousSyncClientRealtimeConfiguration} [realtime] - Realtime push configuration consumed by `subscribeRealtime(...)`.
2021
+ * @property {VelociousSyncClientTransport} transport - Transport posting to the framework sync endpoints (e.g. the frontend-model websocket client).
2022
+ * @property {VelociousSyncRealtimeWebsocketClient} [websocketClient] - Shared app-lifetime websocket client (the low-level form) that all sync traffic rides. Provide the same instance the frontend-model transport uses so one connection carries everything. When set, the realtime bridge subscribes channels on it and never owns its lifecycle: unsubscribing closes only channel subscriptions, leaving the socket connected.
2023
+ * @property {string | (() => string | null | undefined)} [websocketUrl] - Shared app-lifetime websocket URL. When set (and no `websocketClient` is given), the framework builds and owns one reconnecting `VelociousWebsocketClient` for all sync traffic, connected on first use.
2024
+ */
2025
+ /**
2026
+ * Velocious sync configuration.
2027
+ * @typedef {object} VelociousSyncConfiguration
2028
+ * @property {VelociousSyncApiConfiguration} [api] - Auto-mounts the Velocious sync changes/replay endpoints for this resource class.
2029
+ * @property {VelociousSyncClientConfiguration} [client] - Client-side sync configuration consumed by `SyncClient.fromConfiguration(...)`.
2030
+ * @property {import("./sync/device-identity.js").SyncJsonWebKey | null} [deviceCertificateBackendPublicKey] - Public backend key used to verify offline device certificates for sync replay.
2031
+ * @property {number} [changeFeedRetentionSize] - Number of accepted server changes retained before clients must refresh from snapshot.
2032
+ * @property {Array<import("./sync/offline-grant.js").OfflineGrantSigningKey>} offlineGrantSigningKeys - Signing keys used to issue and verify offline grants. Secrets must never be exposed to clients.
2033
+ * @property {number} [offlineGrantTtlMs] - Default offline grant TTL in milliseconds. Defaults to 24 hours.
2034
+ */
2035
+ /**
2036
+ * Frontend-safe normalized sync metadata.
2037
+ * @typedef {object} NormalizedFrontendModelResourceSyncConfiguration
2038
+ * @property {"optimisticVersion" | "serverWins" | "lastWriterWins" | "fieldThreeWay" | "appendOnly"} conflictStrategy - Normalized replay conflict strategy.
2039
+ * @property {boolean} enabled - Whether the resource is sync-enabled.
2040
+ * @property {string[]} operations - Sorted, duplicate-free sync operation names.
2041
+ * @property {string | null} policyVersion - App-controlled policy version, or null.
2042
+ * @property {string} policyHash - Deterministic sha256 hash of safe policy inputs.
2043
+ * @property {Record<string, FrontendModelSyncJsonValue>} [metadata] - Safe frontend-visible metadata.
2044
+ */
2045
+ /**
2046
+ * @typedef {Omit<FrontendModelResourceConfiguration, "abilities" | "builtInCollectionCommands" | "builtInMemberCommands" | "collectionCommands" | "commands" | "memberCommands" | "sync"> & {
2047
+ * abilities: FrontendModelResourceAbilitiesConfiguration
2048
+ * builtInCollectionCommands: Record<string, string>
2049
+ * builtInMemberCommands: Record<string, string>
2050
+ * collectionCommands: Record<string, string>
2051
+ * commandMetadata: Record<string, {args: Array<{name: string, type: string}>, returnType: string | null}>
2052
+ * memberCommands: Record<string, string>
2053
+ * sync?: NormalizedFrontendModelResourceSyncConfiguration
2054
+ * }} NormalizedFrontendModelResourceConfiguration
2055
+ */
2056
+ /**
2057
+ * @typedef {Omit<typeof import("./frontend-model-resource/base-resource.js").default, never> & {new (args: import("./frontend-model-resource/base-resource.js").FrontendModelResourceAbilityArgs | import("./frontend-model-resource/base-resource.js").FrontendModelResourceControllerArgs): import("./frontend-model-resource/base-resource.js").default<typeof import("./database/record/index.js").default>}} FrontendModelResourceClassType
2058
+ */
2059
+ /**
2060
+ * @typedef {FrontendModelResourceClassType} FrontendModelResourceDefinition
2061
+ */
2062
+ /**
2063
+ * @typedef {object} FrontendModelResourceAbilitiesConfiguration
2064
+ * @property {string} [index] - Ability action for frontend index.
2065
+ * @property {string} [find] - Ability action for frontend find.
2066
+ * @property {string} [create] - Ability action for frontend create.
2067
+ * @property {string} [update] - Ability action for frontend update.
2068
+ * @property {string} [destroy] - Ability action for frontend destroy.
2069
+ */
2070
+ /**
2071
+ * @typedef {object} FrontendModelResourceServerConfiguration
2072
+ * @property {(args: {action: "index" | "find" | "create" | "update" | "destroy" | "attach" | "attachmentList" | "download" | "url", controller: import("./controller.js").default, params: Record<string, ReturnType<typeof JSON.parse>>, modelClass: typeof import("./database/record/index.js").default}) => (boolean | void | Promise<boolean | void>)} [beforeAction] - Optional callback run before built-in frontend actions.
2073
+ * @property {(args: {action: "index", controller: import("./controller.js").default, params: Record<string, ReturnType<typeof JSON.parse>>, modelClass: typeof import("./database/record/index.js").default}) => Promise<import("./database/record/index.js").default[]>} [records] - Records loader for frontendIndex.
2074
+ * @property {(args: {action: "index" | "find" | "create" | "update", controller: import("./controller.js").default, params: Record<string, ReturnType<typeof JSON.parse>>, modelClass: typeof import("./database/record/index.js").default, model: import("./database/record/index.js").default}) => Record<string, ReturnType<typeof JSON.parse>> | Promise<Record<string, ReturnType<typeof JSON.parse>>>} [serialize] - Record serializer for response payloads.
2075
+ * @property {(args: {action: "find" | "update" | "destroy" | "attach" | "attachmentList" | "download" | "url", controller: import("./controller.js").default, params: Record<string, ReturnType<typeof JSON.parse>>, modelClass: typeof import("./database/record/index.js").default, id: string | number}) => Promise<import("./database/record/index.js").default | null>} [find] - Record loader for find/update/destroy/attach/download/url actions.
2076
+ * @property {(args: {action: "create", controller: import("./controller.js").default, params: Record<string, ReturnType<typeof JSON.parse>>, modelClass: typeof import("./database/record/index.js").default, attributes: Record<string, ReturnType<typeof JSON.parse>>}) => Promise<import("./database/record/index.js").default>} [create] - Custom create callback.
2077
+ * @property {(args: {action: "update", controller: import("./controller.js").default, params: Record<string, ReturnType<typeof JSON.parse>>, modelClass: typeof import("./database/record/index.js").default, model: import("./database/record/index.js").default, attributes: Record<string, ReturnType<typeof JSON.parse>>}) => Promise<import("./database/record/index.js").default | void>} [update] - Custom update callback.
2078
+ * @property {(args: {action: "destroy", controller: import("./controller.js").default, params: Record<string, ReturnType<typeof JSON.parse>>, modelClass: typeof import("./database/record/index.js").default, model: import("./database/record/index.js").default}) => Promise<void>} [destroy] - Custom destroy callback.
2079
+ */
2080
+ /**
2081
+ * @typedef {object} BackendProjectConfiguration
2082
+ * @property {string} path - Path to the backend project. May be an app root or a contributing package root (package entries are appended internally from `packages`).
2083
+ * @property {string} [frontendModelsOutputPath] - Optional output project path where `src/frontend-models` should be generated.
2084
+ * @property {string} [resourcesPath] - Optional override for the resources directory to auto-discover; defaults to `<path>/src/resources`. Set internally for package entries.
2085
+ * @property {Record<string, FrontendModelResourceDefinition>} [frontendModels] - Auto-discovered frontend model definitions keyed by model class name. Set internally by the environment handler — do not set manually.
2086
+ * @property {AbilityResourceClassType[]} [abilityResources] - Auto-discovered ability resource classes (frontend-model and authorization) from this project's resources directory. Set internally by the environment handler — do not set manually.
2087
+ */
2088
+ /**
2089
+ * A descriptor for an external Velocious package (engine) that contributes models,
2090
+ * resources and migrations. A package usually exports `new VelociousPackage({name, url: import.meta.url})`.
2091
+ * @typedef {object} VelociousPackageDescriptor
2092
+ * @property {string} name - The package name.
2093
+ * @property {string} [url] - The descriptor module's `import.meta.url`; the package root is derived from it when `path` is omitted.
2094
+ * @property {string} [path] - The package root directory (the one containing `src`). Derived from `url` when omitted.
2095
+ * @property {string} [modelsPath] - Override for the package's models directory (default `<path>/src/models`).
2096
+ * @property {string} [resourcesPath] - Override for the package's frontend-model resources directory (default `<path>/src/resources`).
2097
+ * @property {string} [migrationsPath] - Override for the package's migrations directory (default `<path>/src/database/migrations`).
2098
+ */
2099
+ /**
2100
+ * @typedef {import("./packages/velocious-package.js").default | VelociousPackageDescriptor} VelociousPackageConfiguration
2101
+ */
2102
+ /**
2103
+ * @typedef {object} RouteResolverHookArgs
2104
+ * @property {import("./configuration.js").default} configuration - Configuration instance.
2105
+ * @property {Record<string, ReturnType<typeof JSON.parse>>} params - Mutable request params object.
2106
+ * @property {string} currentPath - Request path without query.
2107
+ * @property {boolean} [hasMatchingCustomRoute] - True when matching a configured custom route.
2108
+ * @property {import("./http-server/client/request.js").default | import("./http-server/client/websocket-request.js").default} request - Request object.
2109
+ * @property {import("./http-server/client/response.js").default} response - Response object.
2110
+ * @property {import("./routes/resolver.js").default} resolver - Resolver instance.
2111
+ */
2112
+ /**
2113
+ * @typedef {object} RouteResolverHookResult
2114
+ * @property {string} action - Dasherized action name (for example `frontend-index`).
2115
+ * @property {string} controller - Controller path (for example `accounts`).
2116
+ * @property {typeof import("./controller.js").default} [controllerClass] - Optional controller class override.
2117
+ * @property {string} [controllerPath] - Optional absolute/relative controller file path override.
2118
+ * @property {Record<string, ReturnType<typeof JSON.parse>>} [params] - Extra params to merge for controller/action.
2119
+ * @property {boolean} [skipAbilityResolution] - Whether to run the controller action without resolving request ability.
2120
+ * @property {boolean} [skipControllerConnections] - Whether to run the controller action without the automatic database checkout wrapper.
2121
+ * @property {boolean} [skipTenantResolution] - Whether to run the controller action without resolving request tenant.
2122
+ * @property {string} [viewPath] - Optional view path override used by controller render lookups.
2123
+ */
2124
+ /**
2125
+ * @typedef {(arg: RouteResolverHookArgs) => RouteResolverHookResult | null | Promise<RouteResolverHookResult | null>} RouteResolverHookType
2126
+ */
2127
+ /**
2128
+ * @typedef {typeof import("./authorization/base-resource.js").default} AbilityResourceClassType
2129
+ */
2130
+ /**
2131
+ * @typedef {(args: {configuration: import("./configuration.js").default, params: Record<string, ReturnType<typeof JSON.parse>>, request: import("./http-server/client/request.js").default | import("./http-server/client/websocket-request.js").default | undefined, response: import("./http-server/client/response.js").default | undefined}) => import("./authorization/ability.js").default | void | Promise<import("./authorization/ability.js").default | void>} AbilityResolverType
2132
+ */
2133
+ /**
2134
+ * @typedef {(args: {configuration: import("./configuration.js").default, params: Record<string, ReturnType<typeof JSON.parse>>, request: import("./http-server/client/request.js").default | import("./http-server/client/websocket-request.js").default | undefined, response: import("./http-server/client/response.js").default | undefined, subscription?: {channel: string, params?: Record<string, ReturnType<typeof JSON.parse>>}}) => ReturnType<typeof JSON.parse> | void | Promise<ReturnType<typeof JSON.parse> | void>} TenantResolverType
2135
+ */
2136
+ /**
2137
+ * @typedef {(args: {configuration: import("./configuration.js").default, databaseConfiguration: DatabaseConfigurationType, identifier: string, tenant: ReturnType<typeof JSON.parse>}) => DatabaseConfigurationType | Partial<DatabaseConfigurationType> | void} TenantDatabaseResolverType
2138
+ */
2139
+ /**
2140
+ * @typedef {object} ApiManifestConfiguration
2141
+ * @property {string} [path] - HTTP path for the built-in API manifest endpoint. Defaults to `/api/manifest`.
2142
+ * @property {string} [token] - Bearer token required in the `Authorization: Bearer <token>` header. When set, requests without a matching token are not routed (404), so the endpoint stays hidden.
2143
+ */
2144
+ /**
2145
+ * @typedef {object} DebugEndpointConfiguration
2146
+ * @property {string} [path] - HTTP path for the built-in debug endpoint. Defaults to `/velocious/debug`.
2147
+ * @property {string} [token] - Bearer token required in the `Authorization: Bearer <token>` header. When set, requests without a matching token are not routed (404), so the endpoint stays hidden.
2148
+ */
2149
+ /**
2150
+ * @typedef {object} TenantDatabaseProviderType
2151
+ * @property {(args: {configuration: import("./configuration.js").default, identifier: string}) => Array<ReturnType<typeof JSON.parse>> | Promise<Array<ReturnType<typeof JSON.parse>>>} listTenants - Lists tenants that should be created, checked, or migrated for this database identifier.
2152
+ * @property {(args: {configuration: import("./configuration.js").default, identifier: string}) => Array<ReturnType<typeof JSON.parse>> | Promise<Array<ReturnType<typeof JSON.parse>>>} [listRestrictTenants] - Lists existing tenants that should be checked for dependent restrict destroys. Defaults to listTenants.
2153
+ * @property {(args: {configuration: import("./configuration.js").default, databaseConfiguration: DatabaseConfigurationType, identifier: string, tenant: ReturnType<typeof JSON.parse>}) => void | Promise<void>} [createDatabase] - Creates the tenant database/schema for one tenant.
2154
+ * @property {(args: {configuration: import("./configuration.js").default, databaseConfiguration: DatabaseConfigurationType, identifier: string, tenant: ReturnType<typeof JSON.parse>}) => void | Promise<void>} [dropDatabase] - Drops the tenant database/schema for one tenant.
2155
+ * @property {(args: {configuration: import("./configuration.js").default, databaseConfiguration: DatabaseConfigurationType, identifier: string, tenant: ReturnType<typeof JSON.parse>}) => void | Promise<void>} [checkTenant] - Checks one tenant database before generic connection validation.
2156
+ * @property {(args: {configuration: import("./configuration.js").default, databaseConfiguration: DatabaseConfigurationType, identifier: string, migrationsApplied: number, tenant: ReturnType<typeof JSON.parse>}) => void | Promise<void>} [afterMigrateTenant] - Runs app-owned tenant work after generic migrations for one tenant. `migrationsApplied` is how many migrations actually ran (0 when the tenant was already up to date), so the app can skip expensive per-tenant work on no-op deploys.
2157
+ */
2158
+ /**
2159
+ * @typedef {object} ConfigurationArgsType
2160
+ * @property {boolean} [autoload] - Globally enable auto-batch-preload of relationships on lazy access. Default true.
2161
+ * @property {CorsType} [cors] - CORS configuration for the HTTP server.
2162
+ * @property {string} [cookieSecret] - Secret for encrypting cookies.
2163
+ * @property {AbilityResourceClassType[]} [abilityResources] - Resource classes used to define abilities per model.
2164
+ * @property {AbilityResolverType} [abilityResolver] - Resolver for creating request-scoped ability instances.
2165
+ * @property {AttachmentsConfiguration} [attachments] - Attachment storage configuration.
2166
+ * @property {BackendProjectConfiguration[]} [backendProjects] - Backend project definitions used for frontend model generation.
2167
+ * @property {VelociousPackageConfiguration[]} [packages] - External Velocious packages that contribute models, frontend-model resources and migrations.
2168
+ * @property {{[key: string]: {[key: string]: DatabaseConfigurationType}}} database - Database configurations keyed by environment and identifier.
2169
+ * @property {boolean} [debug] - Enable debug logging.
2170
+ * @property {boolean | DebugEndpointConfiguration} [debugEndpoint] - Enable the built-in debug endpoint. Defaults to false.
2171
+ * @property {boolean | ApiManifestConfiguration} [apiManifest] - Enable the built-in API manifest endpoint. Defaults to false.
2172
+ * @property {string} [directory] - Base directory for the project.
2173
+ * @property {boolean} [enforceTenantDatabaseScopes] - Require tenant-switched model queries to resolve a tenant database identifier. Defaults to true.
2174
+ * @property {string} [environment] - Current environment name.
2175
+ * @property {import("./environment-handlers/base.js").default} environmentHandler - Environment handler instance.
2176
+ * @property {boolean} [exposeInternalErrorsToClients] - Return unexpected internal error details in client API payloads outside production. Defaults to false.
2177
+ * @property {HttpServerConfiguration} [httpServer] - Default HTTP server configuration for applications started from this configuration.
2178
+ * @property {LoggingConfiguration} [logging] - Logging configuration.
2179
+ * @property {BackgroundJobsConfiguration} [backgroundJobs] - Background jobs configuration.
2180
+ * @property {BeaconConfiguration} [beacon] - Beacon broadcast bus configuration.
2181
+ * @property {ScheduledBackgroundJobsConfiguration | ScheduledBackgroundJobsLoaderType} [scheduledBackgroundJobs] - Scheduled background jobs configuration.
2182
+ * @property {MailerBackend} [mailerBackend] - Mail delivery backend.
2183
+ * @property {(args: {configuration: import("./configuration.js").default, type: string}) => void} initializeModels - Hook to register models for a given initialization type.
2184
+ * @property {InitializersType} [initializers] - Initializer loader for environment bootstrapping.
2185
+ * @property {string | (() => string)} locale - Default locale or locale resolver.
2186
+ * @property {string[]} locales - Supported locales.
2187
+ * @property {LocaleFallbacksType} localeFallbacks - Locale fallback map.
2188
+ * @property {StructureSqlConfiguration} [structureSql] - Structure SQL generation configuration.
2189
+ * @property {VelociousSyncConfiguration} [sync] - Local/offline sync framework configuration.
2190
+ * @property {TenantResolverType} [tenantResolver] - Resolver for creating request-scoped tenant context objects.
2191
+ * @property {TenantDatabaseResolverType} [tenantDatabaseResolver] - Resolver for deriving tenant-specific database config overrides.
2192
+ * @property {Record<string, TenantDatabaseProviderType>} [tenantDatabaseProviders] - Tenant database lifecycle providers keyed by database identifier.
2193
+ * @property {string} [testing] - Path to the testing configuration file.
2194
+ * @property {string | (() => string | undefined)} [timeZone] - Default timezone for timezone-less datetime strings.
2195
+ * @property {number | (() => number)} [timezoneOffsetMinutes] - Default timezone offset in minutes.
2196
+ * @property {string | string[]} [trustedProxies] - Trusted reverse proxy address ranges used to resolve request remote addresses from forwarding headers.
2197
+ * @property {number | (() => number)} [requestTimeoutMs] - Timeout in seconds for completing a HTTP request.
2198
+ * @property {RouteResolverHookType[]} [routeResolverHooks] - Hook callbacks that can hijack unresolved routes.
2199
+ * @property {WebsocketChannelResolverType} [websocketChannelResolver] - Resolve a websocket channel class/instance for each connection.
2200
+ * @property {WebsocketMessageHandlerResolverType} [websocketMessageHandlerResolver] - Resolve a raw websocket message handler for each connection.
2201
+ */
2202
+ export declare const nothing: {};
2294
2203
  //# sourceMappingURL=configuration-types.d.ts.map