velocious 1.0.428 → 1.0.429
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/build/src/application.d.ts +96 -9
- package/build/src/application.d.ts.map +1 -1
- package/build/src/application.js +127 -28
- package/build/src/authorization/ability.d.ts +72 -31
- package/build/src/authorization/ability.d.ts.map +1 -1
- package/build/src/authorization/ability.js +59 -22
- package/build/src/authorization/base-resource.d.ts +47 -20
- package/build/src/authorization/base-resource.d.ts.map +1 -1
- package/build/src/authorization/base-resource.js +43 -14
- package/build/src/background-jobs/client.d.ts +4 -2
- package/build/src/background-jobs/client.d.ts.map +1 -1
- package/build/src/background-jobs/client.js +4 -2
- package/build/src/background-jobs/cron-expression.d.ts +9 -5
- package/build/src/background-jobs/cron-expression.d.ts.map +1 -1
- package/build/src/background-jobs/cron-expression.js +16 -6
- package/build/src/background-jobs/forked-runner-child.js +12 -5
- package/build/src/background-jobs/job-registry.d.ts +7 -1
- package/build/src/background-jobs/job-registry.d.ts.map +1 -1
- package/build/src/background-jobs/job-registry.js +8 -2
- package/build/src/background-jobs/job-runner.d.ts +1 -0
- package/build/src/background-jobs/job-runner.d.ts.map +1 -1
- package/build/src/background-jobs/job-runner.js +8 -3
- package/build/src/background-jobs/job.d.ts +12 -8
- package/build/src/background-jobs/job.d.ts.map +1 -1
- package/build/src/background-jobs/job.js +12 -6
- package/build/src/background-jobs/json-socket.d.ts +17 -5
- package/build/src/background-jobs/json-socket.d.ts.map +1 -1
- package/build/src/background-jobs/json-socket.js +18 -6
- package/build/src/background-jobs/main.d.ts +118 -32
- package/build/src/background-jobs/main.d.ts.map +1 -1
- package/build/src/background-jobs/main.js +123 -35
- package/build/src/background-jobs/normalize-error.d.ts +2 -1
- package/build/src/background-jobs/normalize-error.d.ts.map +1 -1
- package/build/src/background-jobs/normalize-error.js +5 -3
- package/build/src/background-jobs/scheduler.d.ts +31 -10
- package/build/src/background-jobs/scheduler.d.ts.map +1 -1
- package/build/src/background-jobs/scheduler.js +33 -11
- package/build/src/background-jobs/socket-request.d.ts +2 -0
- package/build/src/background-jobs/socket-request.d.ts.map +1 -1
- package/build/src/background-jobs/socket-request.js +11 -3
- package/build/src/background-jobs/status-reporter.d.ts +5 -2
- package/build/src/background-jobs/status-reporter.d.ts.map +1 -1
- package/build/src/background-jobs/status-reporter.js +6 -3
- package/build/src/background-jobs/store.d.ts +57 -19
- package/build/src/background-jobs/store.d.ts.map +1 -1
- package/build/src/background-jobs/store.js +70 -20
- package/build/src/background-jobs/types.d.ts +7 -7
- package/build/src/background-jobs/types.d.ts.map +1 -1
- package/build/src/background-jobs/types.js +6 -6
- package/build/src/background-jobs/web/authorization.d.ts.map +1 -1
- package/build/src/background-jobs/web/authorization.js +3 -1
- package/build/src/background-jobs/web/controller.d.ts +40 -14
- package/build/src/background-jobs/web/controller.d.ts.map +1 -1
- package/build/src/background-jobs/web/controller.js +46 -15
- package/build/src/background-jobs/web/registry.d.ts +5 -0
- package/build/src/background-jobs/web/registry.d.ts.map +1 -1
- package/build/src/background-jobs/web/registry.js +4 -1
- package/build/src/background-jobs/worker.d.ts +41 -8
- package/build/src/background-jobs/worker.d.ts.map +1 -1
- package/build/src/background-jobs/worker.js +64 -16
- package/build/src/beacon/client.d.ts +39 -12
- package/build/src/beacon/client.d.ts.map +1 -1
- package/build/src/beacon/client.js +45 -15
- package/build/src/beacon/in-process-broker.d.ts +4 -0
- package/build/src/beacon/in-process-broker.d.ts.map +1 -1
- package/build/src/beacon/in-process-broker.js +8 -3
- package/build/src/beacon/in-process-client.d.ts +28 -9
- package/build/src/beacon/in-process-client.d.ts.map +1 -1
- package/build/src/beacon/in-process-client.js +27 -9
- package/build/src/beacon/server.d.ts +13 -2
- package/build/src/beacon/server.d.ts.map +1 -1
- package/build/src/beacon/server.js +21 -5
- package/build/src/beacon/types.d.ts +3 -3
- package/build/src/beacon/types.d.ts.map +1 -1
- package/build/src/beacon/types.js +2 -2
- package/build/src/cli/base-command.d.ts +18 -4
- package/build/src/cli/base-command.d.ts.map +1 -1
- package/build/src/cli/base-command.js +15 -4
- package/build/src/cli/browser-cli.d.ts +3 -0
- package/build/src/cli/browser-cli.d.ts.map +1 -1
- package/build/src/cli/browser-cli.js +7 -2
- package/build/src/cli/commands/background-jobs-main.d.ts +0 -1
- package/build/src/cli/commands/background-jobs-main.d.ts.map +1 -1
- package/build/src/cli/commands/background-jobs-runner.d.ts +0 -1
- package/build/src/cli/commands/background-jobs-runner.d.ts.map +1 -1
- package/build/src/cli/commands/background-jobs-worker.d.ts +0 -1
- package/build/src/cli/commands/background-jobs-worker.d.ts.map +1 -1
- package/build/src/cli/commands/beacon.d.ts +0 -1
- package/build/src/cli/commands/beacon.d.ts.map +1 -1
- package/build/src/cli/commands/console.d.ts +0 -2
- package/build/src/cli/commands/console.d.ts.map +1 -1
- package/build/src/cli/commands/console.js +5 -2
- package/build/src/cli/commands/db/base-command.d.ts +11 -2
- package/build/src/cli/commands/db/base-command.d.ts.map +1 -1
- package/build/src/cli/commands/db/base-command.js +12 -3
- package/build/src/cli/commands/db/create.d.ts +3 -0
- package/build/src/cli/commands/db/create.d.ts.map +1 -1
- package/build/src/cli/commands/db/create.js +4 -1
- package/build/src/cli/commands/db/drop.d.ts +3 -0
- package/build/src/cli/commands/db/drop.d.ts.map +1 -1
- package/build/src/cli/commands/db/drop.js +4 -1
- package/build/src/cli/commands/db/schema/dump.d.ts +0 -2
- package/build/src/cli/commands/db/schema/dump.d.ts.map +1 -1
- package/build/src/cli/commands/db/schema/dump.js +5 -2
- package/build/src/cli/commands/db/schema/load.d.ts +0 -2
- package/build/src/cli/commands/db/schema/load.d.ts.map +1 -1
- package/build/src/cli/commands/db/schema/load.js +5 -2
- package/build/src/cli/commands/db/seed.d.ts +0 -2
- package/build/src/cli/commands/db/seed.d.ts.map +1 -1
- package/build/src/cli/commands/db/seed.js +5 -2
- package/build/src/cli/commands/db/tenants/check.d.ts +4 -1
- package/build/src/cli/commands/db/tenants/check.d.ts.map +1 -1
- package/build/src/cli/commands/db/tenants/check.js +5 -2
- package/build/src/cli/commands/db/tenants/create.d.ts +4 -1
- package/build/src/cli/commands/db/tenants/create.d.ts.map +1 -1
- package/build/src/cli/commands/db/tenants/create.js +5 -2
- package/build/src/cli/commands/db/tenants/migrate.d.ts +4 -1
- package/build/src/cli/commands/db/tenants/migrate.d.ts.map +1 -1
- package/build/src/cli/commands/db/tenants/migrate.js +5 -2
- package/build/src/cli/commands/destroy/migration.d.ts +0 -1
- package/build/src/cli/commands/destroy/migration.d.ts.map +1 -1
- package/build/src/cli/commands/generate/base-models.d.ts +0 -1
- package/build/src/cli/commands/generate/base-models.d.ts.map +1 -1
- package/build/src/cli/commands/generate/frontend-models.d.ts +0 -2
- package/build/src/cli/commands/generate/frontend-models.d.ts.map +1 -1
- package/build/src/cli/commands/generate/frontend-models.js +5 -2
- package/build/src/cli/commands/generate/migration.d.ts +0 -1
- package/build/src/cli/commands/generate/migration.d.ts.map +1 -1
- package/build/src/cli/commands/generate/model.d.ts +0 -1
- package/build/src/cli/commands/generate/model.d.ts.map +1 -1
- package/build/src/cli/commands/init.d.ts +0 -1
- package/build/src/cli/commands/init.d.ts.map +1 -1
- package/build/src/cli/commands/routes.d.ts +0 -1
- package/build/src/cli/commands/routes.d.ts.map +1 -1
- package/build/src/cli/commands/run-script.d.ts +0 -2
- package/build/src/cli/commands/run-script.d.ts.map +1 -1
- package/build/src/cli/commands/run-script.js +5 -2
- package/build/src/cli/commands/runner.d.ts +0 -2
- package/build/src/cli/commands/runner.d.ts.map +1 -1
- package/build/src/cli/commands/runner.js +5 -2
- package/build/src/cli/commands/server.d.ts +0 -1
- package/build/src/cli/commands/server.d.ts.map +1 -1
- package/build/src/cli/commands/test.d.ts +0 -1
- package/build/src/cli/commands/test.d.ts.map +1 -1
- package/build/src/cli/index.d.ts +18 -5
- package/build/src/cli/index.d.ts.map +1 -1
- package/build/src/cli/index.js +25 -8
- package/build/src/cli/tenant-database-command-helper.d.ts +24 -9
- package/build/src/cli/tenant-database-command-helper.d.ts.map +1 -1
- package/build/src/cli/tenant-database-command-helper.js +30 -11
- package/build/src/cli/use-browser-cli.d.ts +1 -0
- package/build/src/cli/use-browser-cli.d.ts.map +1 -1
- package/build/src/cli/use-browser-cli.js +5 -2
- package/build/src/configuration-resolver.d.ts +1 -0
- package/build/src/configuration-resolver.d.ts.map +1 -1
- package/build/src/configuration-resolver.js +2 -1
- package/build/src/configuration-types.d.ts +44 -44
- package/build/src/configuration-types.d.ts.map +1 -1
- package/build/src/configuration-types.js +27 -27
- package/build/src/configuration.d.ts +350 -114
- package/build/src/configuration.d.ts.map +1 -1
- package/build/src/configuration.js +416 -128
- package/build/src/controller.d.ts +67 -18
- package/build/src/controller.d.ts.map +1 -1
- package/build/src/controller.js +88 -23
- package/build/src/current-configuration.d.ts +2 -0
- package/build/src/current-configuration.d.ts.map +1 -1
- package/build/src/current-configuration.js +6 -2
- package/build/src/current.d.ts +16 -9
- package/build/src/current.d.ts.map +1 -1
- package/build/src/current.js +15 -8
- package/build/src/database/annotations-async-hooks.js +13 -6
- package/build/src/database/annotations.d.ts +7 -1
- package/build/src/database/annotations.d.ts.map +1 -1
- package/build/src/database/annotations.js +12 -5
- package/build/src/database/drivers/base-column.d.ts +21 -3
- package/build/src/database/drivers/base-column.d.ts.map +1 -1
- package/build/src/database/drivers/base-column.js +21 -3
- package/build/src/database/drivers/base-columns-index.d.ts +9 -0
- package/build/src/database/drivers/base-columns-index.d.ts.map +1 -1
- package/build/src/database/drivers/base-columns-index.js +10 -1
- package/build/src/database/drivers/base-foreign-key.d.ts +15 -3
- package/build/src/database/drivers/base-foreign-key.d.ts.map +1 -1
- package/build/src/database/drivers/base-foreign-key.js +15 -3
- package/build/src/database/drivers/base-table.d.ts +16 -3
- package/build/src/database/drivers/base-table.d.ts.map +1 -1
- package/build/src/database/drivers/base-table.js +16 -3
- package/build/src/database/drivers/base.d.ts +174 -37
- package/build/src/database/drivers/base.d.ts.map +1 -1
- package/build/src/database/drivers/base.js +156 -40
- package/build/src/database/drivers/mssql/column.d.ts +3 -2
- package/build/src/database/drivers/mssql/column.d.ts.map +1 -1
- package/build/src/database/drivers/mssql/column.js +3 -2
- package/build/src/database/drivers/mssql/index.d.ts +5 -6
- package/build/src/database/drivers/mssql/index.d.ts.map +1 -1
- package/build/src/database/drivers/mssql/index.js +38 -7
- package/build/src/database/drivers/mssql/options.d.ts +1 -0
- package/build/src/database/drivers/mssql/options.d.ts.map +1 -1
- package/build/src/database/drivers/mssql/options.js +8 -2
- package/build/src/database/drivers/mssql/sql/create-database.d.ts +1 -0
- package/build/src/database/drivers/mssql/sql/create-database.d.ts.map +1 -1
- package/build/src/database/drivers/mssql/sql/create-database.js +2 -1
- package/build/src/database/drivers/mssql/sql/drop-database.d.ts.map +1 -1
- package/build/src/database/drivers/mssql/sql/drop-database.js +2 -1
- package/build/src/database/drivers/mssql/structure-sql.d.ts +5 -2
- package/build/src/database/drivers/mssql/structure-sql.d.ts.map +1 -1
- package/build/src/database/drivers/mssql/structure-sql.js +5 -2
- package/build/src/database/drivers/mssql/table.d.ts +1 -0
- package/build/src/database/drivers/mssql/table.d.ts.map +1 -1
- package/build/src/database/drivers/mssql/table.js +9 -4
- package/build/src/database/drivers/mysql/column.d.ts +3 -2
- package/build/src/database/drivers/mysql/column.d.ts.map +1 -1
- package/build/src/database/drivers/mysql/column.js +4 -3
- package/build/src/database/drivers/mysql/index.d.ts +11 -3
- package/build/src/database/drivers/mysql/index.d.ts.map +1 -1
- package/build/src/database/drivers/mysql/index.js +54 -10
- package/build/src/database/drivers/mysql/options.d.ts +1 -0
- package/build/src/database/drivers/mysql/options.d.ts.map +1 -1
- package/build/src/database/drivers/mysql/options.js +4 -2
- package/build/src/database/drivers/mysql/query.d.ts +3 -2
- package/build/src/database/drivers/mysql/query.d.ts.map +1 -1
- package/build/src/database/drivers/mysql/query.js +6 -3
- package/build/src/database/drivers/mysql/sql/create-database.d.ts.map +1 -1
- package/build/src/database/drivers/mysql/sql/create-database.js +3 -1
- package/build/src/database/drivers/mysql/structure-sql.d.ts +7 -2
- package/build/src/database/drivers/mysql/structure-sql.d.ts.map +1 -1
- package/build/src/database/drivers/mysql/structure-sql.js +7 -2
- package/build/src/database/drivers/mysql/table.d.ts +1 -0
- package/build/src/database/drivers/mysql/table.d.ts.map +1 -1
- package/build/src/database/drivers/mysql/table.js +7 -3
- package/build/src/database/drivers/pgsql/column.d.ts +3 -2
- package/build/src/database/drivers/pgsql/column.d.ts.map +1 -1
- package/build/src/database/drivers/pgsql/column.js +3 -2
- package/build/src/database/drivers/pgsql/index.d.ts +1 -1
- package/build/src/database/drivers/pgsql/index.d.ts.map +1 -1
- package/build/src/database/drivers/pgsql/index.js +36 -11
- package/build/src/database/drivers/pgsql/options.d.ts +2 -0
- package/build/src/database/drivers/pgsql/options.d.ts.map +1 -1
- package/build/src/database/drivers/pgsql/options.js +3 -1
- package/build/src/database/drivers/pgsql/structure-sql.d.ts +5 -2
- package/build/src/database/drivers/pgsql/structure-sql.d.ts.map +1 -1
- package/build/src/database/drivers/pgsql/structure-sql.js +5 -2
- package/build/src/database/drivers/pgsql/table.d.ts +1 -0
- package/build/src/database/drivers/pgsql/table.d.ts.map +1 -1
- package/build/src/database/drivers/pgsql/table.js +6 -2
- package/build/src/database/drivers/sqlite/base.d.ts +15 -5
- package/build/src/database/drivers/sqlite/base.d.ts.map +1 -1
- package/build/src/database/drivers/sqlite/base.js +79 -27
- package/build/src/database/drivers/sqlite/column.d.ts +3 -2
- package/build/src/database/drivers/sqlite/column.d.ts.map +1 -1
- package/build/src/database/drivers/sqlite/column.js +3 -2
- package/build/src/database/drivers/sqlite/connection-sql-js.d.ts +4 -2
- package/build/src/database/drivers/sqlite/connection-sql-js.d.ts.map +1 -1
- package/build/src/database/drivers/sqlite/connection-sql-js.js +4 -2
- package/build/src/database/drivers/sqlite/foreign-key.d.ts +3 -2
- package/build/src/database/drivers/sqlite/foreign-key.d.ts.map +1 -1
- package/build/src/database/drivers/sqlite/foreign-key.js +3 -2
- package/build/src/database/drivers/sqlite/index.d.ts +18 -5
- package/build/src/database/drivers/sqlite/index.d.ts.map +1 -1
- package/build/src/database/drivers/sqlite/index.js +40 -16
- package/build/src/database/drivers/sqlite/index.native.d.ts +1 -1
- package/build/src/database/drivers/sqlite/index.native.d.ts.map +1 -1
- package/build/src/database/drivers/sqlite/index.native.js +6 -3
- package/build/src/database/drivers/sqlite/index.web.d.ts +16 -4
- package/build/src/database/drivers/sqlite/index.web.d.ts.map +1 -1
- package/build/src/database/drivers/sqlite/index.web.js +17 -7
- package/build/src/database/drivers/sqlite/options.d.ts +2 -0
- package/build/src/database/drivers/sqlite/options.d.ts.map +1 -1
- package/build/src/database/drivers/sqlite/options.js +3 -1
- package/build/src/database/drivers/sqlite/query.d.ts +3 -2
- package/build/src/database/drivers/sqlite/query.d.ts.map +1 -1
- package/build/src/database/drivers/sqlite/query.js +6 -3
- package/build/src/database/drivers/sqlite/query.native.d.ts +2 -2
- package/build/src/database/drivers/sqlite/query.native.d.ts.map +1 -1
- package/build/src/database/drivers/sqlite/query.native.js +3 -3
- package/build/src/database/drivers/sqlite/query.web.d.ts +3 -2
- package/build/src/database/drivers/sqlite/query.web.d.ts.map +1 -1
- package/build/src/database/drivers/sqlite/query.web.js +6 -3
- package/build/src/database/drivers/sqlite/sql/alter-table.d.ts.map +1 -1
- package/build/src/database/drivers/sqlite/sql/alter-table.js +9 -3
- package/build/src/database/drivers/sqlite/structure-sql.d.ts +2 -0
- package/build/src/database/drivers/sqlite/structure-sql.d.ts.map +1 -1
- package/build/src/database/drivers/sqlite/structure-sql.js +3 -1
- package/build/src/database/drivers/sqlite/table-rebuilder.d.ts +2 -0
- package/build/src/database/drivers/sqlite/table-rebuilder.d.ts.map +1 -1
- package/build/src/database/drivers/sqlite/table-rebuilder.js +3 -1
- package/build/src/database/drivers/sqlite/table.d.ts +2 -0
- package/build/src/database/drivers/sqlite/table.d.ts.map +1 -1
- package/build/src/database/drivers/sqlite/table.js +14 -4
- package/build/src/database/drivers/structure-sql/utils.d.ts +2 -0
- package/build/src/database/drivers/structure-sql/utils.d.ts.map +1 -1
- package/build/src/database/drivers/structure-sql/utils.js +3 -1
- package/build/src/database/handler.d.ts +1 -0
- package/build/src/database/handler.d.ts.map +1 -1
- package/build/src/database/handler.js +2 -1
- package/build/src/database/initializer-from-require-context.d.ts +8 -0
- package/build/src/database/initializer-from-require-context.d.ts.map +1 -1
- package/build/src/database/initializer-from-require-context.js +4 -1
- package/build/src/database/migration/index.d.ts +40 -5
- package/build/src/database/migration/index.d.ts.map +1 -1
- package/build/src/database/migration/index.js +34 -6
- package/build/src/database/migrator/files-finder.d.ts +2 -0
- package/build/src/database/migrator/files-finder.d.ts.map +1 -1
- package/build/src/database/migrator/files-finder.js +6 -2
- package/build/src/database/migrator.d.ts +29 -4
- package/build/src/database/migrator.d.ts.map +1 -1
- package/build/src/database/migrator.js +45 -10
- package/build/src/database/pool/async-tracked-multi-connection.d.ts +125 -31
- package/build/src/database/pool/async-tracked-multi-connection.d.ts.map +1 -1
- package/build/src/database/pool/async-tracked-multi-connection.js +189 -52
- package/build/src/database/pool/base-methods-forward.d.ts +1 -0
- package/build/src/database/pool/base-methods-forward.d.ts.map +1 -1
- package/build/src/database/pool/base-methods-forward.js +12 -3
- package/build/src/database/pool/base.d.ts +39 -7
- package/build/src/database/pool/base.d.ts.map +1 -1
- package/build/src/database/pool/base.js +59 -18
- package/build/src/database/pool/single-multi-use.d.ts +1 -0
- package/build/src/database/pool/single-multi-use.d.ts.map +1 -1
- package/build/src/database/pool/single-multi-use.js +16 -4
- package/build/src/database/query/alter-table-base.d.ts +1 -0
- package/build/src/database/query/alter-table-base.d.ts.map +1 -1
- package/build/src/database/query/alter-table-base.js +3 -1
- package/build/src/database/query/base.d.ts +3 -0
- package/build/src/database/query/base.d.ts.map +1 -1
- package/build/src/database/query/base.js +4 -1
- package/build/src/database/query/create-database-base.d.ts +5 -0
- package/build/src/database/query/create-database-base.d.ts.map +1 -1
- package/build/src/database/query/create-database-base.js +4 -1
- package/build/src/database/query/create-index-base.d.ts +5 -0
- package/build/src/database/query/create-index-base.d.ts.map +1 -1
- package/build/src/database/query/create-index-base.js +4 -1
- package/build/src/database/query/create-table-base.d.ts +2 -0
- package/build/src/database/query/create-table-base.d.ts.map +1 -1
- package/build/src/database/query/create-table-base.js +3 -1
- package/build/src/database/query/delete-base.d.ts +3 -2
- package/build/src/database/query/delete-base.d.ts.map +1 -1
- package/build/src/database/query/delete-base.js +3 -2
- package/build/src/database/query/drop-database-base.d.ts +5 -0
- package/build/src/database/query/drop-database-base.d.ts.map +1 -1
- package/build/src/database/query/drop-database-base.js +4 -1
- package/build/src/database/query/drop-table-base.d.ts +1 -0
- package/build/src/database/query/drop-table-base.d.ts.map +1 -1
- package/build/src/database/query/drop-table-base.js +3 -1
- package/build/src/database/query/from-base.d.ts +6 -1
- package/build/src/database/query/from-base.d.ts.map +1 -1
- package/build/src/database/query/from-base.js +7 -2
- package/build/src/database/query/from-plain.d.ts +1 -0
- package/build/src/database/query/from-plain.d.ts.map +1 -1
- package/build/src/database/query/from-plain.js +2 -1
- package/build/src/database/query/from-table.d.ts +1 -0
- package/build/src/database/query/from-table.d.ts.map +1 -1
- package/build/src/database/query/from-table.js +2 -1
- package/build/src/database/query/index.d.ts +72 -12
- package/build/src/database/query/index.d.ts.map +1 -1
- package/build/src/database/query/index.js +79 -19
- package/build/src/database/query/insert-base.d.ts +13 -8
- package/build/src/database/query/insert-base.d.ts.map +1 -1
- package/build/src/database/query/insert-base.js +10 -5
- package/build/src/database/query/join-base.d.ts +4 -0
- package/build/src/database/query/join-base.d.ts.map +1 -1
- package/build/src/database/query/join-base.js +5 -1
- package/build/src/database/query/join-object.d.ts +11 -0
- package/build/src/database/query/join-object.d.ts.map +1 -1
- package/build/src/database/query/join-object.js +15 -4
- package/build/src/database/query/join-plain.d.ts +1 -0
- package/build/src/database/query/join-plain.d.ts.map +1 -1
- package/build/src/database/query/join-plain.js +2 -1
- package/build/src/database/query/join-tracker.d.ts +7 -0
- package/build/src/database/query/join-tracker.d.ts.map +1 -1
- package/build/src/database/query/join-tracker.js +8 -1
- package/build/src/database/query/model-class-query.d.ts +92 -26
- package/build/src/database/query/model-class-query.d.ts.map +1 -1
- package/build/src/database/query/model-class-query.js +230 -76
- package/build/src/database/query/order-base.d.ts +3 -0
- package/build/src/database/query/order-base.d.ts.map +1 -1
- package/build/src/database/query/order-base.js +4 -1
- package/build/src/database/query/order-column.d.ts +9 -1
- package/build/src/database/query/order-column.d.ts.map +1 -1
- package/build/src/database/query/order-column.js +10 -2
- package/build/src/database/query/order-plain.d.ts +1 -0
- package/build/src/database/query/order-plain.d.ts.map +1 -1
- package/build/src/database/query/order-plain.js +2 -1
- package/build/src/database/query/preloader/belongs-to.d.ts +1 -0
- package/build/src/database/query/preloader/belongs-to.d.ts.map +1 -1
- package/build/src/database/query/preloader/belongs-to.js +68 -23
- package/build/src/database/query/preloader/ensure-model-class-initialized.d.ts +1 -0
- package/build/src/database/query/preloader/ensure-model-class-initialized.d.ts.map +1 -1
- package/build/src/database/query/preloader/ensure-model-class-initialized.js +2 -1
- package/build/src/database/query/preloader/has-many.d.ts +5 -3
- package/build/src/database/query/preloader/has-many.d.ts.map +1 -1
- package/build/src/database/query/preloader/has-many.js +66 -24
- package/build/src/database/query/preloader/has-one.d.ts +1 -0
- package/build/src/database/query/preloader/has-one.d.ts.map +1 -1
- package/build/src/database/query/preloader/has-one.js +26 -9
- package/build/src/database/query/preloader/selection.d.ts +7 -1
- package/build/src/database/query/preloader/selection.d.ts.map +1 -1
- package/build/src/database/query/preloader/selection.js +13 -5
- package/build/src/database/query/preloader.d.ts +1 -0
- package/build/src/database/query/preloader.d.ts.map +1 -1
- package/build/src/database/query/preloader.js +28 -9
- package/build/src/database/query/query-data.d.ts +21 -7
- package/build/src/database/query/query-data.d.ts.map +1 -1
- package/build/src/database/query/query-data.js +37 -18
- package/build/src/database/query/select-base.d.ts +3 -0
- package/build/src/database/query/select-base.d.ts.map +1 -1
- package/build/src/database/query/select-base.js +4 -1
- package/build/src/database/query/select-plain.d.ts +1 -0
- package/build/src/database/query/select-plain.d.ts.map +1 -1
- package/build/src/database/query/select-plain.js +2 -1
- package/build/src/database/query/select-table-and-column.d.ts +1 -0
- package/build/src/database/query/select-table-and-column.d.ts.map +1 -1
- package/build/src/database/query/select-table-and-column.js +2 -1
- package/build/src/database/query/update-base.d.ts +9 -6
- package/build/src/database/query/update-base.d.ts.map +1 -1
- package/build/src/database/query/update-base.js +7 -4
- package/build/src/database/query/upsert-base.d.ts +13 -4
- package/build/src/database/query/upsert-base.d.ts.map +1 -1
- package/build/src/database/query/upsert-base.js +12 -3
- package/build/src/database/query/where-base.d.ts +4 -0
- package/build/src/database/query/where-base.d.ts.map +1 -1
- package/build/src/database/query/where-base.js +5 -1
- package/build/src/database/query/where-combinator.d.ts +1 -0
- package/build/src/database/query/where-combinator.d.ts.map +1 -1
- package/build/src/database/query/where-combinator.js +6 -2
- package/build/src/database/query/where-hash.d.ts +6 -0
- package/build/src/database/query/where-hash.d.ts.map +1 -1
- package/build/src/database/query/where-hash.js +5 -1
- package/build/src/database/query/where-model-class-hash.d.ts +30 -16
- package/build/src/database/query/where-model-class-hash.d.ts.map +1 -1
- package/build/src/database/query/where-model-class-hash.js +55 -20
- package/build/src/database/query/where-not.d.ts +1 -0
- package/build/src/database/query/where-not.d.ts.map +1 -1
- package/build/src/database/query/where-not.js +3 -1
- package/build/src/database/query/where-plain.d.ts +1 -0
- package/build/src/database/query/where-plain.d.ts.map +1 -1
- package/build/src/database/query/where-plain.js +2 -1
- package/build/src/database/query/with-count.d.ts +11 -5
- package/build/src/database/query/with-count.d.ts.map +1 -1
- package/build/src/database/query/with-count.js +36 -15
- package/build/src/database/query-parser/base-query-parser.d.ts +1 -0
- package/build/src/database/query-parser/base-query-parser.d.ts.map +1 -1
- package/build/src/database/query-parser/base-query-parser.js +2 -1
- package/build/src/database/query-parser/from-parser.d.ts +5 -1
- package/build/src/database/query-parser/from-parser.d.ts.map +1 -1
- package/build/src/database/query-parser/from-parser.js +6 -2
- package/build/src/database/query-parser/group-parser.d.ts +2 -0
- package/build/src/database/query-parser/group-parser.d.ts.map +1 -1
- package/build/src/database/query-parser/group-parser.js +3 -1
- package/build/src/database/query-parser/joins-parser.d.ts +1 -0
- package/build/src/database/query-parser/joins-parser.d.ts.map +1 -1
- package/build/src/database/query-parser/joins-parser.js +2 -1
- package/build/src/database/query-parser/limit-parser.d.ts +1 -0
- package/build/src/database/query-parser/limit-parser.d.ts.map +1 -1
- package/build/src/database/query-parser/limit-parser.js +2 -1
- package/build/src/database/query-parser/options.d.ts +15 -4
- package/build/src/database/query-parser/options.d.ts.map +1 -1
- package/build/src/database/query-parser/options.js +11 -3
- package/build/src/database/query-parser/order-parser.d.ts +1 -0
- package/build/src/database/query-parser/order-parser.d.ts.map +1 -1
- package/build/src/database/query-parser/order-parser.js +2 -1
- package/build/src/database/query-parser/select-parser.d.ts +1 -0
- package/build/src/database/query-parser/select-parser.d.ts.map +1 -1
- package/build/src/database/query-parser/select-parser.js +2 -1
- package/build/src/database/query-parser/where-parser.d.ts +1 -0
- package/build/src/database/query-parser/where-parser.d.ts.map +1 -1
- package/build/src/database/query-parser/where-parser.js +2 -1
- package/build/src/database/record/acts-as-list.d.ts +0 -1
- package/build/src/database/record/acts-as-list.d.ts.map +1 -1
- package/build/src/database/record/acts-as-list.js +61 -23
- package/build/src/database/record/attachments/download.d.ts +34 -15
- package/build/src/database/record/attachments/download.d.ts.map +1 -1
- package/build/src/database/record/attachments/download.js +34 -22
- package/build/src/database/record/attachments/handle.d.ts +17 -5
- package/build/src/database/record/attachments/handle.d.ts.map +1 -1
- package/build/src/database/record/attachments/handle.js +25 -9
- package/build/src/database/record/attachments/normalize-input.d.ts +6 -1
- package/build/src/database/record/attachments/normalize-input.d.ts.map +1 -1
- package/build/src/database/record/attachments/normalize-input.js +54 -17
- package/build/src/database/record/attachments/storage-drivers/filesystem.d.ts +7 -1
- package/build/src/database/record/attachments/storage-drivers/filesystem.d.ts.map +1 -1
- package/build/src/database/record/attachments/storage-drivers/filesystem.js +10 -2
- package/build/src/database/record/attachments/storage-drivers/native.d.ts +12 -7
- package/build/src/database/record/attachments/storage-drivers/native.d.ts.map +1 -1
- package/build/src/database/record/attachments/storage-drivers/native.js +13 -6
- package/build/src/database/record/attachments/storage-drivers/s3.d.ts +18 -9
- package/build/src/database/record/attachments/storage-drivers/s3.d.ts.map +1 -1
- package/build/src/database/record/attachments/storage-drivers/s3.js +38 -13
- package/build/src/database/record/attachments/store.d.ts +48 -25
- package/build/src/database/record/attachments/store.d.ts.map +1 -1
- package/build/src/database/record/attachments/store.js +63 -25
- package/build/src/database/record/index.d.ts +388 -146
- package/build/src/database/record/index.d.ts.map +1 -1
- package/build/src/database/record/index.js +686 -248
- package/build/src/database/record/instance-relationships/base.d.ts +78 -19
- package/build/src/database/record/instance-relationships/base.d.ts.map +1 -1
- package/build/src/database/record/instance-relationships/base.js +98 -26
- package/build/src/database/record/instance-relationships/belongs-to.d.ts +1 -0
- package/build/src/database/record/instance-relationships/belongs-to.d.ts.map +1 -1
- package/build/src/database/record/instance-relationships/belongs-to.js +13 -5
- package/build/src/database/record/instance-relationships/has-many.d.ts +27 -7
- package/build/src/database/record/instance-relationships/has-many.d.ts.map +1 -1
- package/build/src/database/record/instance-relationships/has-many.js +50 -16
- package/build/src/database/record/instance-relationships/has-one.d.ts +4 -1
- package/build/src/database/record/instance-relationships/has-one.d.ts.map +1 -1
- package/build/src/database/record/instance-relationships/has-one.js +28 -10
- package/build/src/database/record/relationships/base.d.ts +61 -14
- package/build/src/database/record/relationships/base.d.ts.map +1 -1
- package/build/src/database/record/relationships/base.js +60 -15
- package/build/src/database/record/relationships/belongs-to.d.ts.map +1 -1
- package/build/src/database/record/relationships/belongs-to.js +9 -3
- package/build/src/database/record/relationships/has-many.d.ts.map +1 -1
- package/build/src/database/record/relationships/has-many.js +9 -3
- package/build/src/database/record/relationships/has-one.d.ts.map +1 -1
- package/build/src/database/record/relationships/has-one.js +9 -3
- package/build/src/database/record/state-machine.d.ts +9 -1
- package/build/src/database/record/state-machine.d.ts.map +1 -1
- package/build/src/database/record/state-machine.js +35 -14
- package/build/src/database/record/user-module.d.ts +2 -0
- package/build/src/database/record/user-module.d.ts.map +1 -1
- package/build/src/database/record/user-module.js +3 -1
- package/build/src/database/record/validators/base.d.ts +4 -2
- package/build/src/database/record/validators/base.d.ts.map +1 -1
- package/build/src/database/record/validators/base.js +4 -2
- package/build/src/database/record/validators/format.d.ts.map +1 -1
- package/build/src/database/record/validators/format.js +2 -1
- package/build/src/database/record/validators/presence.d.ts.map +1 -1
- package/build/src/database/record/validators/presence.js +5 -2
- package/build/src/database/record/validators/uniqueness.d.ts +0 -2
- package/build/src/database/record/validators/uniqueness.d.ts.map +1 -1
- package/build/src/database/record/validators/uniqueness.js +18 -8
- package/build/src/database/table-data/index.d.ts +40 -4
- package/build/src/database/table-data/index.d.ts.map +1 -1
- package/build/src/database/table-data/index.js +38 -5
- package/build/src/database/table-data/table-column.d.ts +43 -5
- package/build/src/database/table-data/table-column.d.ts.map +1 -1
- package/build/src/database/table-data/table-column.js +37 -4
- package/build/src/database/table-data/table-foreign-key.d.ts +8 -0
- package/build/src/database/table-data/table-foreign-key.d.ts.map +1 -1
- package/build/src/database/table-data/table-foreign-key.js +9 -1
- package/build/src/database/table-data/table-index.d.ts +8 -0
- package/build/src/database/table-data/table-index.d.ts.map +1 -1
- package/build/src/database/table-data/table-index.js +6 -1
- package/build/src/database/table-data/table-reference.d.ts +1 -0
- package/build/src/database/table-data/table-reference.d.ts.map +1 -1
- package/build/src/database/table-data/table-reference.js +2 -1
- package/build/src/database/use-database.d.ts +1 -0
- package/build/src/database/use-database.d.ts.map +1 -1
- package/build/src/database/use-database.js +2 -1
- package/build/src/environment-handlers/base.d.ts +94 -36
- package/build/src/environment-handlers/base.d.ts.map +1 -1
- package/build/src/environment-handlers/base.js +90 -36
- package/build/src/environment-handlers/browser.d.ts +33 -3
- package/build/src/environment-handlers/browser.d.ts.map +1 -1
- package/build/src/environment-handlers/browser.js +36 -9
- package/build/src/environment-handlers/node/cli/commands/cli-command-context.d.ts +5 -0
- package/build/src/environment-handlers/node/cli/commands/cli-command-context.d.ts.map +1 -1
- package/build/src/environment-handlers/node/cli/commands/cli-command-context.js +6 -2
- package/build/src/environment-handlers/node/cli/commands/console.d.ts +3 -2
- package/build/src/environment-handlers/node/cli/commands/console.d.ts.map +1 -1
- package/build/src/environment-handlers/node/cli/commands/console.js +23 -9
- package/build/src/environment-handlers/node/cli/commands/db/schema/dump.d.ts +4 -1
- package/build/src/environment-handlers/node/cli/commands/db/schema/dump.d.ts.map +1 -1
- package/build/src/environment-handlers/node/cli/commands/db/schema/dump.js +5 -2
- package/build/src/environment-handlers/node/cli/commands/db/schema/load.d.ts +6 -2
- package/build/src/environment-handlers/node/cli/commands/db/schema/load.d.ts.map +1 -1
- package/build/src/environment-handlers/node/cli/commands/db/schema/load.js +11 -5
- package/build/src/environment-handlers/node/cli/commands/db/seed.d.ts +15 -5
- package/build/src/environment-handlers/node/cli/commands/db/seed.d.ts.map +1 -1
- package/build/src/environment-handlers/node/cli/commands/db/seed.js +20 -6
- package/build/src/environment-handlers/node/cli/commands/destroy/migration.d.ts +5 -0
- package/build/src/environment-handlers/node/cli/commands/destroy/migration.d.ts.map +1 -1
- package/build/src/environment-handlers/node/cli/commands/destroy/migration.js +3 -1
- package/build/src/environment-handlers/node/cli/commands/generate/base-models.d.ts +2 -0
- package/build/src/environment-handlers/node/cli/commands/generate/base-models.d.ts.map +1 -1
- package/build/src/environment-handlers/node/cli/commands/generate/base-models.js +6 -4
- package/build/src/environment-handlers/node/cli/commands/generate/frontend-models.d.ts +43 -29
- package/build/src/environment-handlers/node/cli/commands/generate/frontend-models.d.ts.map +1 -1
- package/build/src/environment-handlers/node/cli/commands/generate/frontend-models.js +99 -40
- package/build/src/environment-handlers/node/cli/commands/generate/migration.d.ts +5 -0
- package/build/src/environment-handlers/node/cli/commands/generate/migration.d.ts.map +1 -1
- package/build/src/environment-handlers/node/cli/commands/generate/migration.js +3 -1
- package/build/src/environment-handlers/node/cli/commands/generate/model.d.ts +5 -0
- package/build/src/environment-handlers/node/cli/commands/generate/model.d.ts.map +1 -1
- package/build/src/environment-handlers/node/cli/commands/generate/model.js +3 -1
- package/build/src/environment-handlers/node/cli/commands/init.d.ts +5 -0
- package/build/src/environment-handlers/node/cli/commands/init.d.ts.map +1 -1
- package/build/src/environment-handlers/node/cli/commands/init.js +3 -1
- package/build/src/environment-handlers/node/cli/commands/routes.d.ts +3 -0
- package/build/src/environment-handlers/node/cli/commands/routes.d.ts.map +1 -1
- package/build/src/environment-handlers/node/cli/commands/routes.js +4 -1
- package/build/src/environment-handlers/node/cli/commands/run-script.d.ts +15 -5
- package/build/src/environment-handlers/node/cli/commands/run-script.d.ts.map +1 -1
- package/build/src/environment-handlers/node/cli/commands/run-script.js +20 -6
- package/build/src/environment-handlers/node/cli/commands/runner.d.ts +18 -6
- package/build/src/environment-handlers/node/cli/commands/runner.d.ts.map +1 -1
- package/build/src/environment-handlers/node/cli/commands/runner.js +20 -6
- package/build/src/environment-handlers/node/cli/commands/server.d.ts +13 -1
- package/build/src/environment-handlers/node/cli/commands/server.d.ts.map +1 -1
- package/build/src/environment-handlers/node/cli/commands/server.js +23 -6
- package/build/src/environment-handlers/node.d.ts +14 -2
- package/build/src/environment-handlers/node.d.ts.map +1 -1
- package/build/src/environment-handlers/node.js +107 -39
- package/build/src/error-logger.d.ts +4 -3
- package/build/src/error-logger.d.ts.map +1 -1
- package/build/src/error-logger.js +4 -3
- package/build/src/frontend-model-controller.d.ts +239 -90
- package/build/src/frontend-model-controller.d.ts.map +1 -1
- package/build/src/frontend-model-controller.js +577 -787
- package/build/src/frontend-model-resource/base-resource.d.ts +118 -66
- package/build/src/frontend-model-resource/base-resource.d.ts.map +1 -1
- package/build/src/frontend-model-resource/base-resource.js +205 -82
- package/build/src/frontend-models/base.d.ts +319 -163
- package/build/src/frontend-models/base.d.ts.map +1 -1
- package/build/src/frontend-models/base.js +717 -366
- package/build/src/frontend-models/clear-pending-debounced-callback.d.ts +2 -1
- package/build/src/frontend-models/clear-pending-debounced-callback.d.ts.map +1 -1
- package/build/src/frontend-models/clear-pending-debounced-callback.js +6 -3
- package/build/src/frontend-models/event-hook-models.d.ts +5 -0
- package/build/src/frontend-models/event-hook-models.d.ts.map +1 -1
- package/build/src/frontend-models/event-hook-models.js +10 -3
- package/build/src/frontend-models/model-registry.d.ts +5 -5
- package/build/src/frontend-models/model-registry.d.ts.map +1 -1
- package/build/src/frontend-models/model-registry.js +5 -5
- package/build/src/frontend-models/outgoing-event-buffer.d.ts +11 -3
- package/build/src/frontend-models/outgoing-event-buffer.d.ts.map +1 -1
- package/build/src/frontend-models/outgoing-event-buffer.js +13 -5
- package/build/src/frontend-models/preloader.d.ts +9 -6
- package/build/src/frontend-models/preloader.d.ts.map +1 -1
- package/build/src/frontend-models/preloader.js +21 -9
- package/build/src/frontend-models/query.d.ts +283 -73
- package/build/src/frontend-models/query.d.ts.map +1 -1
- package/build/src/frontend-models/query.js +331 -203
- package/build/src/frontend-models/resource-config-validation.d.ts +2 -0
- package/build/src/frontend-models/resource-config-validation.d.ts.map +1 -1
- package/build/src/frontend-models/resource-config-validation.js +3 -1
- package/build/src/frontend-models/resource-definition.d.ts +12 -5
- package/build/src/frontend-models/resource-definition.d.ts.map +1 -1
- package/build/src/frontend-models/resource-definition.js +39 -13
- package/build/src/frontend-models/transport-serialization.d.ts +14 -11
- package/build/src/frontend-models/transport-serialization.d.ts.map +1 -1
- package/build/src/frontend-models/transport-serialization.js +80 -53
- package/build/src/frontend-models/use-destroyed-event.d.ts +21 -0
- package/build/src/frontend-models/use-destroyed-event.d.ts.map +1 -1
- package/build/src/frontend-models/use-destroyed-event.js +34 -11
- package/build/src/frontend-models/use-model-class-event.d.ts +24 -0
- package/build/src/frontend-models/use-model-class-event.d.ts.map +1 -1
- package/build/src/frontend-models/use-model-class-event.js +39 -12
- package/build/src/frontend-models/use-updated-event.d.ts +21 -0
- package/build/src/frontend-models/use-updated-event.d.ts.map +1 -1
- package/build/src/frontend-models/use-updated-event.js +37 -12
- package/build/src/frontend-models/websocket-channel.d.ts +51 -9
- package/build/src/frontend-models/websocket-channel.d.ts.map +1 -1
- package/build/src/frontend-models/websocket-channel.js +96 -26
- package/build/src/frontend-models/websocket-publishers.d.ts +2 -0
- package/build/src/frontend-models/websocket-publishers.d.ts.map +1 -1
- package/build/src/frontend-models/websocket-publishers.js +33 -11
- package/build/src/http-client/header.d.ts +1 -0
- package/build/src/http-client/header.d.ts.map +1 -1
- package/build/src/http-client/header.js +2 -1
- package/build/src/http-client/index.d.ts +4 -0
- package/build/src/http-client/index.d.ts.map +1 -1
- package/build/src/http-client/index.js +5 -1
- package/build/src/http-client/request.d.ts +5 -0
- package/build/src/http-client/request.d.ts.map +1 -1
- package/build/src/http-client/request.js +6 -1
- package/build/src/http-client/response.d.ts +14 -4
- package/build/src/http-client/response.d.ts.map +1 -1
- package/build/src/http-client/response.js +14 -4
- package/build/src/http-client/websocket-client.d.ts +1 -0
- package/build/src/http-client/websocket-client.d.ts.map +1 -1
- package/build/src/http-client/websocket-client.js +2 -1
- package/build/src/http-server/client/index.d.ts +16 -2
- package/build/src/http-server/client/index.d.ts.map +1 -1
- package/build/src/http-server/client/index.js +44 -13
- package/build/src/http-server/client/params-to-object.d.ts +16 -10
- package/build/src/http-server/client/params-to-object.d.ts.map +1 -1
- package/build/src/http-server/client/params-to-object.js +46 -17
- package/build/src/http-server/client/request-buffer/form-data-part.d.ts +10 -6
- package/build/src/http-server/client/request-buffer/form-data-part.d.ts.map +1 -1
- package/build/src/http-server/client/request-buffer/form-data-part.js +11 -7
- package/build/src/http-server/client/request-buffer/header.d.ts +1 -0
- package/build/src/http-server/client/request-buffer/header.d.ts.map +1 -1
- package/build/src/http-server/client/request-buffer/header.js +2 -1
- package/build/src/http-server/client/request-buffer/index.d.ts +29 -4
- package/build/src/http-server/client/request-buffer/index.d.ts.map +1 -1
- package/build/src/http-server/client/request-buffer/index.js +43 -9
- package/build/src/http-server/client/request-parser.d.ts +52 -13
- package/build/src/http-server/client/request-parser.d.ts.map +1 -1
- package/build/src/http-server/client/request-parser.js +58 -15
- package/build/src/http-server/client/request-runner.d.ts +5 -1
- package/build/src/http-server/client/request-runner.d.ts.map +1 -1
- package/build/src/http-server/client/request-runner.js +32 -8
- package/build/src/http-server/client/request-timing.d.ts +37 -7
- package/build/src/http-server/client/request-timing.d.ts.map +1 -1
- package/build/src/http-server/client/request-timing.js +32 -8
- package/build/src/http-server/client/request.d.ts +15 -5
- package/build/src/http-server/client/request.d.ts.map +1 -1
- package/build/src/http-server/client/request.js +17 -5
- package/build/src/http-server/client/response.d.ts +22 -4
- package/build/src/http-server/client/response.d.ts.map +1 -1
- package/build/src/http-server/client/response.js +29 -7
- package/build/src/http-server/client/uploaded-file/memory-uploaded-file.d.ts +1 -0
- package/build/src/http-server/client/uploaded-file/memory-uploaded-file.d.ts.map +1 -1
- package/build/src/http-server/client/uploaded-file/memory-uploaded-file.js +3 -1
- package/build/src/http-server/client/uploaded-file/temporary-uploaded-file.d.ts +1 -0
- package/build/src/http-server/client/uploaded-file/temporary-uploaded-file.d.ts.map +1 -1
- package/build/src/http-server/client/uploaded-file/temporary-uploaded-file.js +3 -1
- package/build/src/http-server/client/uploaded-file/uploaded-file.d.ts +2 -0
- package/build/src/http-server/client/uploaded-file/uploaded-file.d.ts.map +1 -1
- package/build/src/http-server/client/uploaded-file/uploaded-file.js +3 -1
- package/build/src/http-server/client/websocket-request.d.ts +24 -12
- package/build/src/http-server/client/websocket-request.d.ts.map +1 -1
- package/build/src/http-server/client/websocket-request.js +24 -10
- package/build/src/http-server/client/websocket-session.d.ts +101 -62
- package/build/src/http-server/client/websocket-session.d.ts.map +1 -1
- package/build/src/http-server/client/websocket-session.js +118 -61
- package/build/src/http-server/cookie.d.ts +36 -8
- package/build/src/http-server/cookie.d.ts.map +1 -1
- package/build/src/http-server/cookie.js +37 -9
- package/build/src/http-server/development-reloader.d.ts +32 -7
- package/build/src/http-server/development-reloader.d.ts.map +1 -1
- package/build/src/http-server/development-reloader.js +39 -10
- package/build/src/http-server/index.d.ts +102 -25
- package/build/src/http-server/index.d.ts.map +1 -1
- package/build/src/http-server/index.js +117 -32
- package/build/src/http-server/remote-address.d.ts +1 -0
- package/build/src/http-server/remote-address.d.ts.map +1 -1
- package/build/src/http-server/remote-address.js +15 -4
- package/build/src/http-server/server-client.d.ts +37 -8
- package/build/src/http-server/server-client.d.ts.map +1 -1
- package/build/src/http-server/server-client.js +48 -12
- package/build/src/http-server/server-lock.d.ts +76 -0
- package/build/src/http-server/server-lock.d.ts.map +1 -0
- package/build/src/http-server/server-lock.js +164 -0
- package/build/src/http-server/websocket-channel-subscribers.d.ts +13 -8
- package/build/src/http-server/websocket-channel-subscribers.d.ts.map +1 -1
- package/build/src/http-server/websocket-channel-subscribers.js +16 -7
- package/build/src/http-server/websocket-channel.d.ts +13 -11
- package/build/src/http-server/websocket-channel.d.ts.map +1 -1
- package/build/src/http-server/websocket-channel.js +8 -12
- package/build/src/http-server/websocket-connection.d.ts +10 -14
- package/build/src/http-server/websocket-connection.d.ts.map +1 -1
- package/build/src/http-server/websocket-connection.js +8 -12
- package/build/src/http-server/websocket-event-log-store.d.ts +48 -10
- package/build/src/http-server/websocket-event-log-store.d.ts.map +1 -1
- package/build/src/http-server/websocket-event-log-store.js +76 -34
- package/build/src/http-server/websocket-events-host.d.ts +21 -15
- package/build/src/http-server/websocket-events-host.d.ts.map +1 -1
- package/build/src/http-server/websocket-events-host.js +20 -11
- package/build/src/http-server/websocket-events.d.ts +8 -7
- package/build/src/http-server/websocket-events.d.ts.map +1 -1
- package/build/src/http-server/websocket-events.js +6 -5
- package/build/src/http-server/worker-handler/channel-subscriber-dispatch.d.ts +3 -2
- package/build/src/http-server/worker-handler/channel-subscriber-dispatch.d.ts.map +1 -1
- package/build/src/http-server/worker-handler/channel-subscriber-dispatch.js +3 -2
- package/build/src/http-server/worker-handler/in-process.d.ts +18 -18
- package/build/src/http-server/worker-handler/in-process.d.ts.map +1 -1
- package/build/src/http-server/worker-handler/in-process.js +28 -20
- package/build/src/http-server/worker-handler/index.d.ts +39 -20
- package/build/src/http-server/worker-handler/index.d.ts.map +1 -1
- package/build/src/http-server/worker-handler/index.js +34 -14
- package/build/src/http-server/worker-handler/worker-thread.d.ts +31 -15
- package/build/src/http-server/worker-handler/worker-thread.d.ts.map +1 -1
- package/build/src/http-server/worker-handler/worker-thread.js +31 -12
- package/build/src/initializer.d.ts +4 -0
- package/build/src/initializer.d.ts.map +1 -1
- package/build/src/initializer.js +5 -1
- package/build/src/jobs/mail-delivery.d.ts +1 -0
- package/build/src/jobs/mail-delivery.d.ts.map +1 -1
- package/build/src/jobs/mail-delivery.js +2 -1
- package/build/src/logger/base-logger.js +2 -2
- package/build/src/logger/console-logger.d.ts +2 -0
- package/build/src/logger/console-logger.d.ts.map +1 -1
- package/build/src/logger/console-logger.js +3 -1
- package/build/src/logger/file-logger.d.ts +2 -0
- package/build/src/logger/file-logger.d.ts.map +1 -1
- package/build/src/logger/file-logger.js +3 -1
- package/build/src/logger/outputs/array-output.d.ts +21 -5
- package/build/src/logger/outputs/array-output.d.ts.map +1 -1
- package/build/src/logger/outputs/array-output.js +19 -6
- package/build/src/logger/outputs/console-output.d.ts +10 -2
- package/build/src/logger/outputs/console-output.d.ts.map +1 -1
- package/build/src/logger/outputs/console-output.js +8 -3
- package/build/src/logger/outputs/file-output.d.ts +20 -5
- package/build/src/logger/outputs/file-output.d.ts.map +1 -1
- package/build/src/logger/outputs/file-output.js +18 -6
- package/build/src/logger/outputs/stdout-output.d.ts +7 -1
- package/build/src/logger/outputs/stdout-output.d.ts.map +1 -1
- package/build/src/logger/outputs/stdout-output.js +9 -3
- package/build/src/logger.d.ts +28 -13
- package/build/src/logger.d.ts.map +1 -1
- package/build/src/logger.js +60 -23
- package/build/src/mailer/backends/smtp.d.ts +5 -0
- package/build/src/mailer/backends/smtp.d.ts.map +1 -1
- package/build/src/mailer/backends/smtp.js +17 -4
- package/build/src/mailer/base.d.ts +33 -17
- package/build/src/mailer/base.d.ts.map +1 -1
- package/build/src/mailer/base.js +54 -18
- package/build/src/mailer/delivery.d.ts +16 -5
- package/build/src/mailer/delivery.d.ts.map +1 -1
- package/build/src/mailer/delivery.js +18 -7
- package/build/src/mailer/index.d.ts +5 -5
- package/build/src/mailer/index.d.ts.map +1 -1
- package/build/src/mailer/index.js +2 -2
- package/build/src/mailer.d.ts +5 -5
- package/build/src/mailer.d.ts.map +1 -1
- package/build/src/mailer.js +2 -2
- package/build/src/plugins/sqljs-wasm-route-controller.d.ts +4 -1
- package/build/src/plugins/sqljs-wasm-route-controller.d.ts.map +1 -1
- package/build/src/plugins/sqljs-wasm-route-controller.js +11 -4
- package/build/src/plugins/sqljs-wasm-route.d.ts +6 -0
- package/build/src/plugins/sqljs-wasm-route.d.ts.map +1 -1
- package/build/src/plugins/sqljs-wasm-route.js +4 -1
- package/build/src/record-payload-values.d.ts +54 -0
- package/build/src/record-payload-values.d.ts.map +1 -0
- package/build/src/record-payload-values.js +80 -0
- package/build/src/routes/app-routes.d.ts +1 -0
- package/build/src/routes/app-routes.d.ts.map +1 -1
- package/build/src/routes/app-routes.js +2 -1
- package/build/src/routes/base-route.d.ts +52 -16
- package/build/src/routes/base-route.d.ts.map +1 -1
- package/build/src/routes/base-route.js +50 -14
- package/build/src/routes/basic-route.d.ts +1 -0
- package/build/src/routes/basic-route.d.ts.map +1 -1
- package/build/src/routes/basic-route.js +13 -4
- package/build/src/routes/built-in/debug/controller.d.ts +4 -1
- package/build/src/routes/built-in/debug/controller.d.ts.map +1 -1
- package/build/src/routes/built-in/debug/controller.js +5 -2
- package/build/src/routes/get-route.d.ts +1 -0
- package/build/src/routes/get-route.d.ts.map +1 -1
- package/build/src/routes/get-route.js +7 -4
- package/build/src/routes/hooks/frontend-model-command-route-hook.d.ts +1 -0
- package/build/src/routes/hooks/frontend-model-command-route-hook.d.ts.map +1 -1
- package/build/src/routes/hooks/frontend-model-command-route-hook.js +6 -2
- package/build/src/routes/index.d.ts +3 -2
- package/build/src/routes/index.d.ts.map +1 -1
- package/build/src/routes/index.js +10 -4
- package/build/src/routes/namespace-route.d.ts +1 -0
- package/build/src/routes/namespace-route.d.ts.map +1 -1
- package/build/src/routes/namespace-route.js +5 -3
- package/build/src/routes/plugin-routes.d.ts +10 -1
- package/build/src/routes/plugin-routes.d.ts.map +1 -1
- package/build/src/routes/plugin-routes.js +11 -3
- package/build/src/routes/post-route.d.ts +1 -0
- package/build/src/routes/post-route.d.ts.map +1 -1
- package/build/src/routes/post-route.js +7 -4
- package/build/src/routes/resolver.d.ts +20 -5
- package/build/src/routes/resolver.d.ts.map +1 -1
- package/build/src/routes/resolver.js +47 -14
- package/build/src/routes/resource-route.d.ts +6 -1
- package/build/src/routes/resource-route.d.ts.map +1 -1
- package/build/src/routes/resource-route.js +10 -4
- package/build/src/testing/base-expect.d.ts +2 -0
- package/build/src/testing/base-expect.d.ts.map +1 -1
- package/build/src/testing/base-expect.js +3 -1
- package/build/src/testing/browser-frontend-model-event-hook-scenarios.d.ts +33 -5
- package/build/src/testing/browser-frontend-model-event-hook-scenarios.d.ts.map +1 -1
- package/build/src/testing/browser-frontend-model-event-hook-scenarios.js +95 -23
- package/build/src/testing/expect-to-change.d.ts +3 -0
- package/build/src/testing/expect-to-change.d.ts.map +1 -1
- package/build/src/testing/expect-to-change.js +4 -1
- package/build/src/testing/expect-utils.d.ts +22 -16
- package/build/src/testing/expect-utils.d.ts.map +1 -1
- package/build/src/testing/expect-utils.js +62 -30
- package/build/src/testing/expect.d.ts +50 -21
- package/build/src/testing/expect.d.ts.map +1 -1
- package/build/src/testing/expect.js +58 -17
- package/build/src/testing/request-client.d.ts +16 -3
- package/build/src/testing/request-client.d.ts.map +1 -1
- package/build/src/testing/request-client.js +17 -4
- package/build/src/testing/test-files-finder.d.ts +41 -9
- package/build/src/testing/test-files-finder.d.ts.map +1 -1
- package/build/src/testing/test-files-finder.js +42 -10
- package/build/src/testing/test-filter-parser.d.ts +6 -0
- package/build/src/testing/test-filter-parser.d.ts.map +1 -1
- package/build/src/testing/test-filter-parser.js +12 -3
- package/build/src/testing/test-runner.d.ts +102 -6
- package/build/src/testing/test-runner.d.ts.map +1 -1
- package/build/src/testing/test-runner.js +115 -23
- package/build/src/testing/test-suite-splitter.d.ts +7 -0
- package/build/src/testing/test-suite-splitter.d.ts.map +1 -1
- package/build/src/testing/test-suite-splitter.js +7 -2
- package/build/src/testing/test.d.ts +20 -4
- package/build/src/testing/test.d.ts.map +1 -1
- package/build/src/testing/test.js +67 -20
- package/build/src/utils/backtrace-cleaner-node.d.ts.map +1 -1
- package/build/src/utils/backtrace-cleaner-node.js +6 -1
- package/build/src/utils/backtrace-cleaner.d.ts +16 -1
- package/build/src/utils/backtrace-cleaner.d.ts.map +1 -1
- package/build/src/utils/backtrace-cleaner.js +20 -2
- package/build/src/utils/ensure-error.d.ts +3 -2
- package/build/src/utils/ensure-error.d.ts.map +1 -1
- package/build/src/utils/ensure-error.js +3 -2
- package/build/src/utils/event-emitter.d.ts.map +1 -1
- package/build/src/utils/event-emitter.js +2 -2
- package/build/src/utils/file-exists.d.ts +1 -0
- package/build/src/utils/file-exists.d.ts.map +1 -1
- package/build/src/utils/file-exists.js +2 -1
- package/build/src/utils/format-value.d.ts +5 -4
- package/build/src/utils/format-value.d.ts.map +1 -1
- package/build/src/utils/format-value.js +12 -7
- package/build/src/utils/model-scope.d.ts +18 -12
- package/build/src/utils/model-scope.d.ts.map +1 -1
- package/build/src/utils/model-scope.js +19 -11
- package/build/src/utils/nest-callbacks.d.ts +1 -0
- package/build/src/utils/nest-callbacks.d.ts.map +1 -1
- package/build/src/utils/nest-callbacks.js +2 -1
- package/build/src/utils/plain-object.d.ts +7 -0
- package/build/src/utils/plain-object.d.ts.map +1 -0
- package/build/src/utils/plain-object.js +13 -0
- package/build/src/utils/ransack.d.ts +29 -5
- package/build/src/utils/ransack.d.ts.map +1 -1
- package/build/src/utils/ransack.js +136 -49
- package/build/src/utils/rest-args-error.d.ts +1 -0
- package/build/src/utils/rest-args-error.d.ts.map +1 -1
- package/build/src/utils/rest-args-error.js +2 -1
- package/build/src/utils/singularize-model-name.d.ts +1 -0
- package/build/src/utils/singularize-model-name.d.ts.map +1 -1
- package/build/src/utils/singularize-model-name.js +2 -1
- package/build/src/utils/to-import-specifier.d.ts.map +1 -1
- package/build/src/utils/to-import-specifier.js +3 -1
- package/build/src/utils/with-tracked-stack-async-hooks.d.ts +8 -5
- package/build/src/utils/with-tracked-stack-async-hooks.d.ts.map +1 -1
- package/build/src/utils/with-tracked-stack-async-hooks.js +32 -13
- package/build/src/utils/with-tracked-stack.d.ts +9 -5
- package/build/src/utils/with-tracked-stack.d.ts.map +1 -1
- package/build/src/utils/with-tracked-stack.js +19 -8
- package/build/src/velocious-error.d.ts +4 -2
- package/build/src/velocious-error.d.ts.map +1 -1
- package/build/src/velocious-error.js +5 -3
- package/build/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -1,35 +1,46 @@
|
|
|
1
1
|
/** Controller with built-in frontend model resource actions. */
|
|
2
2
|
export default class FrontendModelController extends Controller {
|
|
3
|
-
/**
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
/**
|
|
3
|
+
/**
|
|
4
|
+
* Frontend model params.
|
|
5
|
+
@type {Record<string, ?> | undefined} */
|
|
6
|
+
_frontendModelParams: Record<string, unknown> | undefined;
|
|
7
|
+
/**
|
|
8
|
+
* Frontend model params override.
|
|
9
|
+
@type {Record<string, ?> | undefined} */
|
|
10
|
+
_frontendModelParamsOverride: Record<string, unknown> | undefined;
|
|
11
|
+
/**
|
|
12
|
+
* Frontend model ability override.
|
|
13
|
+
@type {import("./authorization/ability.js").default | undefined} */
|
|
8
14
|
_frontendModelAbilityOverride: import("./authorization/ability.js").default | undefined;
|
|
9
15
|
/**
|
|
10
|
-
*
|
|
16
|
+
* Runs frontend model params.
|
|
17
|
+
* @returns {Record<string, ?>} - Decoded request params.
|
|
11
18
|
*/
|
|
12
|
-
frontendModelParams(): Record<string,
|
|
19
|
+
frontendModelParams(): Record<string, unknown>;
|
|
13
20
|
/**
|
|
21
|
+
* Runs with frontend model params.
|
|
14
22
|
* @template T
|
|
15
|
-
* @param {Record<string,
|
|
23
|
+
* @param {Record<string, ?>} params - Temporary frontend model params.
|
|
16
24
|
* @param {() => Promise<T>} callback - Callback executed with temporary params.
|
|
17
25
|
* @returns {Promise<T>} - Callback return value.
|
|
18
26
|
*/
|
|
19
|
-
withFrontendModelParams<T>(params: Record<string,
|
|
27
|
+
withFrontendModelParams<T>(params: Record<string, unknown>, callback: () => Promise<T>): Promise<T>;
|
|
20
28
|
/**
|
|
29
|
+
* Runs with frontend model request context.
|
|
21
30
|
* @template T
|
|
22
|
-
* @param {Record<string,
|
|
31
|
+
* @param {Record<string, ?>} params - Request-scoped params.
|
|
23
32
|
* @param {import("./http-server/client/response.js").default} response - Response instance.
|
|
24
33
|
* @param {() => Promise<T>} callback - Callback executed inside resolved tenant and ability context.
|
|
25
34
|
* @returns {Promise<T>} - Callback return value.
|
|
26
35
|
*/
|
|
27
|
-
withFrontendModelRequestContext<T>(params: Record<string,
|
|
36
|
+
withFrontendModelRequestContext<T>(params: Record<string, unknown>, response: import("./http-server/client/response.js").default, callback: () => Promise<T>): Promise<T>;
|
|
28
37
|
/**
|
|
38
|
+
* Runs frontend model class.
|
|
29
39
|
* @returns {typeof import("./database/record/index.js").default} - Frontend model class for controller resource actions.
|
|
30
40
|
*/
|
|
31
41
|
frontendModelClass(): typeof import("./database/record/index.js").default;
|
|
32
42
|
/**
|
|
43
|
+
* Runs frontend model resource configuration.
|
|
33
44
|
* @returns {{backendProject: import("./configuration-types.js").BackendProjectConfiguration, modelName: string, resourceClass: import("./configuration-types.js").FrontendModelResourceClassType, resourceConfiguration: import("./configuration-types.js").NormalizedFrontendModelResourceConfiguration} | null} - Frontend model resource configuration for current controller.
|
|
34
45
|
*/
|
|
35
46
|
frontendModelResourceConfiguration(): {
|
|
@@ -39,6 +50,7 @@ export default class FrontendModelController extends Controller {
|
|
|
39
50
|
resourceConfiguration: import("./configuration-types.js").NormalizedFrontendModelResourceConfiguration;
|
|
40
51
|
} | null;
|
|
41
52
|
/**
|
|
53
|
+
* Runs frontend model resource configuration for backend project model name.
|
|
42
54
|
* @param {object} args - Arguments.
|
|
43
55
|
* @param {import("./configuration-types.js").BackendProjectConfiguration} args.backendProject - Backend project configuration.
|
|
44
56
|
* @param {string} args.modelName - Model name.
|
|
@@ -54,6 +66,7 @@ export default class FrontendModelController extends Controller {
|
|
|
54
66
|
resourceConfiguration: import("./configuration-types.js").NormalizedFrontendModelResourceConfiguration;
|
|
55
67
|
} | null;
|
|
56
68
|
/**
|
|
69
|
+
* Runs frontend model resource configuration for model class.
|
|
57
70
|
* @param {typeof import("./database/record/index.js").default} modelClass - Model class.
|
|
58
71
|
* @returns {{backendProject: import("./configuration-types.js").BackendProjectConfiguration, modelName: string, resourceClass: import("./configuration-types.js").FrontendModelResourceClassType, resourceConfiguration: import("./configuration-types.js").NormalizedFrontendModelResourceConfiguration} | null} - Frontend model resource configuration for model class.
|
|
59
72
|
*/
|
|
@@ -64,6 +77,7 @@ export default class FrontendModelController extends Controller {
|
|
|
64
77
|
resourceConfiguration: import("./configuration-types.js").NormalizedFrontendModelResourceConfiguration;
|
|
65
78
|
} | null;
|
|
66
79
|
/**
|
|
80
|
+
* Runs frontend model resource model class.
|
|
67
81
|
* @param {{modelName: string, resourceClass: import("./configuration-types.js").FrontendModelResourceClassType}} frontendModelResource - Frontend model resource configuration.
|
|
68
82
|
* @returns {typeof import("./database/record/index.js").default | null} - Backing record class, when available.
|
|
69
83
|
*/
|
|
@@ -72,6 +86,7 @@ export default class FrontendModelController extends Controller {
|
|
|
72
86
|
resourceClass: import("./configuration-types.js").FrontendModelResourceClassType;
|
|
73
87
|
}): typeof import("./database/record/index.js").default | null;
|
|
74
88
|
/**
|
|
89
|
+
* Runs frontend model class from configuration.
|
|
75
90
|
* @returns {typeof import("./database/record/index.js").default | null} - Frontend model class resolved from backend project configuration.
|
|
76
91
|
*/
|
|
77
92
|
frontendModelClassFromConfiguration(): typeof import("./database/record/index.js").default | null;
|
|
@@ -82,11 +97,13 @@ export default class FrontendModelController extends Controller {
|
|
|
82
97
|
*/
|
|
83
98
|
ensureFrontendModelClassInitialized(): Promise<void>;
|
|
84
99
|
/**
|
|
100
|
+
* Runs ensure frontend model record class initialized.
|
|
85
101
|
* @param {typeof import("./database/record/index.js").default} modelClass - Model class to initialize.
|
|
86
102
|
* @returns {Promise<void>} - Resolves when the model class is ready.
|
|
87
103
|
*/
|
|
88
104
|
ensureFrontendModelRecordClassInitialized(modelClass: typeof import("./database/record/index.js").default): Promise<void>;
|
|
89
105
|
/**
|
|
106
|
+
* Runs ensure frontend model preload classes initialized.
|
|
90
107
|
* @param {object} args - Arguments.
|
|
91
108
|
* @param {import("./configuration-types.js").BackendProjectConfiguration} args.backendProject - Backend project configuration.
|
|
92
109
|
* @param {typeof import("./database/record/index.js").default} args.modelClass - Model class whose preload tree is being resolved.
|
|
@@ -99,6 +116,7 @@ export default class FrontendModelController extends Controller {
|
|
|
99
116
|
preload: import("./database/query/index.js").NestedPreloadRecord | null;
|
|
100
117
|
}): Promise<void>;
|
|
101
118
|
/**
|
|
119
|
+
* Runs ensure frontend model relationship target class initialized.
|
|
102
120
|
* @param {object} args - Arguments.
|
|
103
121
|
* @param {import("./configuration-types.js").BackendProjectConfiguration} args.backendProject - Backend project configuration.
|
|
104
122
|
* @param {import("./database/record/relationships/base.js").default} args.relationship - Relationship definition.
|
|
@@ -109,6 +127,7 @@ export default class FrontendModelController extends Controller {
|
|
|
109
127
|
relationship: import("./database/record/relationships/base.js").default;
|
|
110
128
|
}): Promise<typeof import("./database/record/index.js").default | null>;
|
|
111
129
|
/**
|
|
130
|
+
* Runs frontend model relationship target model class.
|
|
112
131
|
* @param {object} args - Arguments.
|
|
113
132
|
* @param {import("./configuration-types.js").BackendProjectConfiguration} args.backendProject - Backend project configuration.
|
|
114
133
|
* @param {import("./database/record/relationships/base.js").default} args.relationship - Relationship definition.
|
|
@@ -119,12 +138,14 @@ export default class FrontendModelController extends Controller {
|
|
|
119
138
|
relationship: import("./database/record/relationships/base.js").default;
|
|
120
139
|
}): typeof import("./database/record/index.js").default | null;
|
|
121
140
|
/**
|
|
141
|
+
* Runs frontend model resource path.
|
|
122
142
|
* @param {string} modelName - Model class name.
|
|
123
|
-
* @param {
|
|
143
|
+
* @param {?} resourceDefinition - Resource definition.
|
|
124
144
|
* @returns {string} - Normalized resource path.
|
|
125
145
|
*/
|
|
126
146
|
frontendModelResourcePath(modelName: string, resourceDefinition: unknown): string;
|
|
127
147
|
/**
|
|
148
|
+
* Runs frontend model resource matches controller.
|
|
128
149
|
* @param {object} args - Arguments.
|
|
129
150
|
* @param {string} args.controllerName - Controller name from params.
|
|
130
151
|
* @param {string} args.resourcePath - Resource path from configuration.
|
|
@@ -135,29 +156,35 @@ export default class FrontendModelController extends Controller {
|
|
|
135
156
|
resourcePath: string;
|
|
136
157
|
}): boolean;
|
|
137
158
|
/**
|
|
159
|
+
* Runs frontend model resource instance.
|
|
138
160
|
* @returns {FrontendModelBaseResource} - Backend resource instance for current frontend-model action.
|
|
139
161
|
*/
|
|
140
162
|
frontendModelResourceInstance(): FrontendModelBaseResource;
|
|
141
163
|
/**
|
|
164
|
+
* Runs frontend model primary key.
|
|
142
165
|
* @returns {string} - Frontend model primary key.
|
|
143
166
|
*/
|
|
144
167
|
frontendModelPrimaryKey(): string;
|
|
145
168
|
/**
|
|
169
|
+
* Runs frontend model ability action.
|
|
146
170
|
* @param {"index" | "find" | "create" | "update" | "destroy" | "attach" | "download" | "url"} action - Frontend action.
|
|
147
171
|
* @returns {string} - Ability action configured for the frontend action.
|
|
148
172
|
*/
|
|
149
173
|
frontendModelAbilityAction(action: "index" | "find" | "create" | "update" | "destroy" | "attach" | "download" | "url"): string;
|
|
150
174
|
/**
|
|
175
|
+
* Runs frontend model authorized query.
|
|
151
176
|
* @param {"index" | "find" | "create" | "update" | "destroy" | "attach" | "download" | "url"} action - Frontend action.
|
|
152
|
-
* @returns {import("./database/query/model-class-query.js").default
|
|
177
|
+
* @returns {import("./database/query/model-class-query.js").default<?>} - Authorized query for the action.
|
|
153
178
|
*/
|
|
154
|
-
frontendModelAuthorizedQuery(action: "index" | "find" | "create" | "update" | "destroy" | "attach" | "download" | "url"): import("./database/query/model-class-query.js").default<
|
|
179
|
+
frontendModelAuthorizedQuery(action: "index" | "find" | "create" | "update" | "destroy" | "attach" | "download" | "url"): import("./database/query/model-class-query.js").default<unknown>;
|
|
155
180
|
/**
|
|
181
|
+
* Runs frontend model primary key value.
|
|
156
182
|
* @param {import("./database/record/index.js").default} model - Model instance.
|
|
157
183
|
* @returns {string} - Primary key value as string.
|
|
158
184
|
*/
|
|
159
185
|
frontendModelPrimaryKeyValue(model: import("./database/record/index.js").default): string;
|
|
160
186
|
/**
|
|
187
|
+
* Runs frontend model filter authorized models.
|
|
161
188
|
* @param {object} args - Arguments.
|
|
162
189
|
* @param {"index" | "find" | "create" | "update" | "destroy" | "attach" | "download" | "url"} args.action - Frontend action.
|
|
163
190
|
* @param {import("./database/record/index.js").default[]} args.models - Candidate models.
|
|
@@ -168,64 +195,98 @@ export default class FrontendModelController extends Controller {
|
|
|
168
195
|
models: import("./database/record/index.js").default[];
|
|
169
196
|
}): Promise<import("./database/record/index.js").default[]>;
|
|
170
197
|
/**
|
|
198
|
+
* Runs run frontend model before action.
|
|
171
199
|
* @param {"index" | "find" | "create" | "update" | "destroy" | "attach" | "download" | "url"} action - Frontend action.
|
|
172
200
|
* @returns {Promise<boolean>} - Whether action should continue.
|
|
173
201
|
*/
|
|
174
202
|
runFrontendModelBeforeAction(action: "index" | "find" | "create" | "update" | "destroy" | "attach" | "download" | "url"): Promise<boolean>;
|
|
175
203
|
/**
|
|
204
|
+
* Runs frontend model find record.
|
|
176
205
|
* @param {"find" | "update" | "destroy" | "attach" | "download" | "url"} action - Frontend action.
|
|
177
206
|
* @param {string | number} id - Record id.
|
|
178
207
|
* @returns {Promise<import("./database/record/index.js").default | null>} - Located model record.
|
|
179
208
|
*/
|
|
180
209
|
frontendModelFindRecord(action: "find" | "update" | "destroy" | "attach" | "download" | "url", id: string | number): Promise<import("./database/record/index.js").default | null>;
|
|
181
210
|
/**
|
|
182
|
-
*
|
|
183
|
-
* @param {Record<string,
|
|
211
|
+
* Runs frontend model create record.
|
|
212
|
+
* @param {Record<string, ?>} attributes - Create attributes.
|
|
213
|
+
* @param {Record<string, ?> | null} [nestedAttributes] - Optional nested-attribute payload for cascading writes.
|
|
184
214
|
* @returns {Promise<import("./database/record/index.js").default | null>} - Created model when authorized.
|
|
185
215
|
*/
|
|
186
|
-
frontendModelCreateRecord(attributes: Record<string,
|
|
216
|
+
frontendModelCreateRecord(attributes: Record<string, unknown>, nestedAttributes?: Record<string, unknown> | null): Promise<import("./database/record/index.js").default | null>;
|
|
187
217
|
/**
|
|
218
|
+
* Runs frontend model records.
|
|
188
219
|
* @returns {Promise<import("./database/record/index.js").default[]>} - Frontend model records.
|
|
189
220
|
*/
|
|
190
221
|
frontendModelRecords(): Promise<import("./database/record/index.js").default[]>;
|
|
191
222
|
/**
|
|
223
|
+
* Runs frontend model preload.
|
|
192
224
|
* @returns {import("./database/query/index.js").NestedPreloadRecord | null} - Frontend preload data.
|
|
193
225
|
*/
|
|
194
226
|
frontendModelPreload(): import("./database/query/index.js").NestedPreloadRecord | null;
|
|
195
227
|
/**
|
|
228
|
+
* Runs frontend model select.
|
|
196
229
|
* @returns {Record<string, string[]> | null} - Frontend select data.
|
|
197
230
|
*/
|
|
198
231
|
frontendModelSelect(): Record<string, string[]> | null;
|
|
199
232
|
/**
|
|
233
|
+
* Runs frontend model selects extra.
|
|
200
234
|
* @returns {Record<string, string[]> | null} - Frontend extra-select data (defaults plus these), keyed by model name.
|
|
201
235
|
*/
|
|
202
236
|
frontendModelSelectsExtra(): Record<string, string[]> | null;
|
|
203
237
|
/**
|
|
238
|
+
* Runs frontend model searches.
|
|
204
239
|
* @returns {FrontendModelSearch[]} - Frontend search filters.
|
|
205
240
|
*/
|
|
206
241
|
frontendModelSearches(): FrontendModelSearch[];
|
|
207
242
|
/**
|
|
208
|
-
*
|
|
243
|
+
* Runs frontend model where.
|
|
244
|
+
* @returns {Record<string, ?> | null} - Frontend where filters.
|
|
245
|
+
*/
|
|
246
|
+
frontendModelWhere(): Record<string, unknown> | null;
|
|
247
|
+
/**
|
|
248
|
+
* Runs frontend model ransack.
|
|
249
|
+
* @returns {Record<string, ?> | null} - Frontend Ransack filters.
|
|
250
|
+
*/
|
|
251
|
+
frontendModelRansack(): Record<string, unknown> | null;
|
|
252
|
+
/**
|
|
253
|
+
* Runs frontend model joins.
|
|
254
|
+
* @returns {Record<string, ?> | null} - Frontend joins descriptors.
|
|
255
|
+
*/
|
|
256
|
+
frontendModelJoins(): Record<string, unknown> | null;
|
|
257
|
+
/**
|
|
258
|
+
* Runs frontend model sort.
|
|
259
|
+
* @returns {FrontendModelSort[]} - Frontend sort definitions.
|
|
209
260
|
*/
|
|
210
|
-
frontendModelWhere(): Record<string, any> | null;
|
|
211
|
-
/** @returns {Record<string, any> | null} - Frontend Ransack filters. */
|
|
212
|
-
frontendModelRansack(): Record<string, any> | null;
|
|
213
|
-
/** @returns {Record<string, any> | null} - Frontend joins descriptors. */
|
|
214
|
-
frontendModelJoins(): Record<string, any> | null;
|
|
215
|
-
/** @returns {FrontendModelSort[]} - Frontend sort definitions. */
|
|
216
261
|
frontendModelSort(): FrontendModelSort[];
|
|
217
|
-
/**
|
|
262
|
+
/**
|
|
263
|
+
* Runs frontend model group.
|
|
264
|
+
* @returns {FrontendModelGroup[]} - Frontend group definitions.
|
|
265
|
+
*/
|
|
218
266
|
frontendModelGroup(): FrontendModelGroup[];
|
|
219
|
-
/**
|
|
267
|
+
/**
|
|
268
|
+
* Runs frontend model pagination.
|
|
269
|
+
* @returns {FrontendModelPagination} - Frontend pagination params.
|
|
270
|
+
*/
|
|
220
271
|
frontendModelPagination(): FrontendModelPagination;
|
|
221
|
-
/**
|
|
272
|
+
/**
|
|
273
|
+
* Runs frontend model distinct.
|
|
274
|
+
* @returns {boolean | null} - Frontend distinct flag when provided.
|
|
275
|
+
*/
|
|
222
276
|
frontendModelDistinct(): boolean | null;
|
|
223
|
-
/**
|
|
277
|
+
/**
|
|
278
|
+
* Runs frontend model pluck.
|
|
279
|
+
* @returns {FrontendModelPluck[]} - Frontend pluck definitions.
|
|
280
|
+
*/
|
|
224
281
|
frontendModelPluck(): FrontendModelPluck[];
|
|
225
|
-
/**
|
|
282
|
+
/**
|
|
283
|
+
* Runs frontend model count requested.
|
|
284
|
+
* @returns {boolean} - Whether the request asks for an aggregate count.
|
|
285
|
+
*/
|
|
226
286
|
frontendModelCountRequested(): boolean;
|
|
227
287
|
/**
|
|
228
|
-
*
|
|
288
|
+
* Runs frontend model with count.
|
|
289
|
+
* @returns {Array<{attributeName: string, relationshipName: string, where?: Record<string, ?>}>}
|
|
229
290
|
* Frontend withCount entries. Empty array when not requested.
|
|
230
291
|
*/
|
|
231
292
|
frontendModelWithCount(): Array<{
|
|
@@ -240,7 +301,6 @@ export default class FrontendModelController extends Controller {
|
|
|
240
301
|
* resource matches — the spec entry is then silently ignored so a
|
|
241
302
|
* caller requesting abilities for a model they cannot resolve does
|
|
242
303
|
* not crash the request.
|
|
243
|
-
*
|
|
244
304
|
* @param {string} modelName
|
|
245
305
|
* @returns {typeof import("./database/record/index.js").default | null}
|
|
246
306
|
*/
|
|
@@ -251,7 +311,6 @@ export default class FrontendModelController extends Controller {
|
|
|
251
311
|
* preloaded relationships at any depth. Used to evaluate per-record
|
|
252
312
|
* abilities against nested preloaded children with a single batched
|
|
253
313
|
* query per (modelClass, action) pair.
|
|
254
|
-
*
|
|
255
314
|
* @param {import("./database/record/index.js").default[]} rootModels
|
|
256
315
|
* @param {string} modelName
|
|
257
316
|
* @returns {import("./database/record/index.js").default[]}
|
|
@@ -264,7 +323,6 @@ export default class FrontendModelController extends Controller {
|
|
|
264
323
|
* `_setComputedAbility`. Runs one batched `authorized query + pluck`
|
|
265
324
|
* per (modelClass, action) pair, regardless of how many records
|
|
266
325
|
* were loaded.
|
|
267
|
-
*
|
|
268
326
|
* @param {import("./database/record/index.js").default[]} rootModels
|
|
269
327
|
* @returns {Promise<void>}
|
|
270
328
|
*/
|
|
@@ -275,7 +333,6 @@ export default class FrontendModelController extends Controller {
|
|
|
275
333
|
* Unknown entries are silently skipped — downstream code resolves
|
|
276
334
|
* model names to classes when applying the check, so unresolved
|
|
277
335
|
* names naturally become no-ops.
|
|
278
|
-
*
|
|
279
336
|
* @returns {Array<{modelName: string, actions: string[]}>}
|
|
280
337
|
*/
|
|
281
338
|
frontendModelAbilities(): Array<{
|
|
@@ -291,11 +348,11 @@ export default class FrontendModelController extends Controller {
|
|
|
291
348
|
*
|
|
292
349
|
* Returns the raw nested-record spec (shape validated by the
|
|
293
350
|
* normalizer inside `Query.queryData`) or `null` when not requested.
|
|
294
|
-
*
|
|
295
351
|
* @returns {import("./database/query/query-data.js").QueryDataSpec | null}
|
|
296
352
|
*/
|
|
297
353
|
frontendModelQueryData(): import("./database/query/query-data.js").QueryDataSpec | null;
|
|
298
354
|
/**
|
|
355
|
+
* Runs frontend model index query.
|
|
299
356
|
* @returns {import("./database/query/model-class-query.js").default} - Frontend index query with normalized params applied.
|
|
300
357
|
*/
|
|
301
358
|
frontendModelIndexQuery(): import("./database/query/model-class-query.js").default;
|
|
@@ -310,16 +367,18 @@ export default class FrontendModelController extends Controller {
|
|
|
310
367
|
query: import("./database/query/model-class-query.js").default;
|
|
311
368
|
}): import("./database/query/model-class-query.js").default;
|
|
312
369
|
/**
|
|
370
|
+
* Runs frontend model pluck values.
|
|
313
371
|
* @param {object} args - Pluck args.
|
|
314
372
|
* @param {import("./database/query/model-class-query.js").default} args.query - Query instance.
|
|
315
373
|
* @param {FrontendModelPluck[]} args.pluck - Pluck descriptors.
|
|
316
|
-
* @returns {Promise<
|
|
374
|
+
* @returns {Promise<Array<?>>} - Plucked values.
|
|
317
375
|
*/
|
|
318
376
|
frontendModelPluckValues({ query, pluck }: {
|
|
319
377
|
query: import("./database/query/model-class-query.js").default;
|
|
320
378
|
pluck: FrontendModelPluck[];
|
|
321
|
-
}): Promise<
|
|
379
|
+
}): Promise<Array<unknown>>;
|
|
322
380
|
/**
|
|
381
|
+
* Runs frontend model search target model class.
|
|
323
382
|
* @param {object} args - Search args.
|
|
324
383
|
* @param {typeof import("./database/record/index.js").default} args.modelClass - Root model class.
|
|
325
384
|
* @param {string[]} args.path - Relationship path.
|
|
@@ -330,6 +389,7 @@ export default class FrontendModelController extends Controller {
|
|
|
330
389
|
path: string[];
|
|
331
390
|
}): typeof import("./database/record/index.js").default;
|
|
332
391
|
/**
|
|
392
|
+
* Runs apply frontend model search.
|
|
333
393
|
* @param {object} args - Search args.
|
|
334
394
|
* @param {import("./database/query/model-class-query.js").default} args.query - Query instance.
|
|
335
395
|
* @param {FrontendModelSearch} args.search - Search filter.
|
|
@@ -340,6 +400,24 @@ export default class FrontendModelController extends Controller {
|
|
|
340
400
|
search: FrontendModelSearch;
|
|
341
401
|
}): void;
|
|
342
402
|
/**
|
|
403
|
+
* Apply array-valued equality search filters.
|
|
404
|
+
* @param {object} args - Search arguments.
|
|
405
|
+
* @param {string} args.columnSql - SQL for the searched column.
|
|
406
|
+
* @param {string} args.emptySql - SQL predicate used when the array is empty.
|
|
407
|
+
* @param {"IN" | "NOT IN"} args.operatorSql - SQL array operator.
|
|
408
|
+
* @param {import("./database/query/model-class-query.js").default} args.query - Query instance.
|
|
409
|
+
* @param {FrontendModelSearch} args.search - Search descriptor.
|
|
410
|
+
* @returns {boolean} - Whether an array predicate was applied.
|
|
411
|
+
*/
|
|
412
|
+
applyFrontendModelArraySearch({ columnSql, emptySql, operatorSql, query, search }: {
|
|
413
|
+
columnSql: string;
|
|
414
|
+
emptySql: string;
|
|
415
|
+
operatorSql: "IN" | "NOT IN";
|
|
416
|
+
query: import("./database/query/model-class-query.js").default;
|
|
417
|
+
search: FrontendModelSearch;
|
|
418
|
+
}): boolean;
|
|
419
|
+
/**
|
|
420
|
+
* Runs apply frontend model pagination.
|
|
343
421
|
* @param {object} args - Pagination args.
|
|
344
422
|
* @param {import("./database/query/model-class-query.js").default} args.query - Query instance.
|
|
345
423
|
* @param {FrontendModelPagination} args.pagination - Pagination values.
|
|
@@ -350,28 +428,31 @@ export default class FrontendModelController extends Controller {
|
|
|
350
428
|
pagination: FrontendModelPagination;
|
|
351
429
|
}): void;
|
|
352
430
|
/**
|
|
431
|
+
* Runs apply frontend model where.
|
|
353
432
|
* @param {object} args - Where args.
|
|
354
433
|
* @param {import("./database/query/model-class-query.js").default} args.query - Query instance.
|
|
355
|
-
* @param {Record<string,
|
|
434
|
+
* @param {Record<string, ?>} args.where - Root-model where conditions.
|
|
356
435
|
* @returns {void}
|
|
357
436
|
*/
|
|
358
437
|
applyFrontendModelWhere({ query, where }: {
|
|
359
438
|
query: import("./database/query/model-class-query.js").default;
|
|
360
|
-
where: Record<string,
|
|
439
|
+
where: Record<string, unknown>;
|
|
361
440
|
}): void;
|
|
362
441
|
/**
|
|
442
|
+
* Runs apply frontend model joins.
|
|
363
443
|
* @param {object} args - Joins args.
|
|
364
|
-
* @param {Record<string,
|
|
444
|
+
* @param {Record<string, ?>} args.joins - Relationship-object joins.
|
|
365
445
|
* @param {import("./database/query/model-class-query.js").default} args.query - Query instance.
|
|
366
446
|
* @returns {void}
|
|
367
447
|
*/
|
|
368
448
|
applyFrontendModelJoins({ joins, query }: {
|
|
369
|
-
joins: Record<string,
|
|
449
|
+
joins: Record<string, unknown>;
|
|
370
450
|
query: import("./database/query/model-class-query.js").default;
|
|
371
451
|
}): void;
|
|
372
452
|
/**
|
|
453
|
+
* Runs apply frontend model joins for path.
|
|
373
454
|
* @param {object} args - Joins args.
|
|
374
|
-
* @param {Record<string,
|
|
455
|
+
* @param {Record<string, ?>} args.joins - Joins for current path.
|
|
375
456
|
* @param {Set<string>} args.joinPathKeys - Joined path keys.
|
|
376
457
|
* @param {typeof import("./database/record/index.js").default} args.modelClass - Model class for current path.
|
|
377
458
|
* @param {string[]} args.path - Relationship path.
|
|
@@ -379,7 +460,7 @@ export default class FrontendModelController extends Controller {
|
|
|
379
460
|
* @returns {void}
|
|
380
461
|
*/
|
|
381
462
|
applyFrontendModelJoinsForPath({ joins, joinPathKeys, modelClass, path, query }: {
|
|
382
|
-
joins: Record<string,
|
|
463
|
+
joins: Record<string, unknown>;
|
|
383
464
|
joinPathKeys: Set<string>;
|
|
384
465
|
modelClass: typeof import("./database/record/index.js").default;
|
|
385
466
|
path: string[];
|
|
@@ -389,32 +470,33 @@ export default class FrontendModelController extends Controller {
|
|
|
389
470
|
* Resolves a key that may be either a camelCase attribute name or a raw DB
|
|
390
471
|
* column name to its canonical column name. Returns `undefined` when the
|
|
391
472
|
* key matches neither map.
|
|
392
|
-
*
|
|
393
473
|
* @param {typeof import("./database/record/index.js").default} modelClass - Model class.
|
|
394
474
|
* @param {string} key - Attribute name or column name to resolve.
|
|
395
475
|
* @returns {string | undefined} - Resolved DB column name, or `undefined`.
|
|
396
476
|
*/
|
|
397
477
|
resolveFrontendModelColumnName(modelClass: typeof import("./database/record/index.js").default, key: string): string | undefined;
|
|
398
478
|
/**
|
|
479
|
+
* Runs apply frontend model where for path.
|
|
399
480
|
* @param {object} args - Where args.
|
|
400
481
|
* @param {typeof import("./database/record/index.js").default} args.modelClass - Model class for current where scope.
|
|
401
482
|
* @param {string[]} args.path - Relationship path from root.
|
|
402
483
|
* @param {import("./database/query/model-class-query.js").default} args.query - Query instance.
|
|
403
|
-
* @param {Record<string,
|
|
484
|
+
* @param {Record<string, ?>} args.where - Where conditions for current scope.
|
|
404
485
|
* @returns {void}
|
|
405
486
|
*/
|
|
406
487
|
applyFrontendModelWhereForPath({ modelClass, path, query, where }: {
|
|
407
488
|
modelClass: typeof import("./database/record/index.js").default;
|
|
408
489
|
path: string[];
|
|
409
490
|
query: import("./database/query/model-class-query.js").default;
|
|
410
|
-
where: Record<string,
|
|
491
|
+
where: Record<string, unknown>;
|
|
411
492
|
}): void;
|
|
412
493
|
/**
|
|
494
|
+
* Runs normalize frontend model where column value.
|
|
413
495
|
* @param {object} args - Args.
|
|
414
496
|
* @param {typeof import("./database/record/index.js").default} args.modelClass - Model class.
|
|
415
497
|
* @param {string} args.columnName - Column name.
|
|
416
|
-
* @param {
|
|
417
|
-
* @returns {
|
|
498
|
+
* @param {?} args.value - Where value.
|
|
499
|
+
* @returns {? | symbol} - SQL-safe where value.
|
|
418
500
|
*/
|
|
419
501
|
normalizeFrontendModelWhereColumnValue({ columnName, modelClass, value }: {
|
|
420
502
|
modelClass: typeof import("./database/record/index.js").default;
|
|
@@ -422,6 +504,7 @@ export default class FrontendModelController extends Controller {
|
|
|
422
504
|
value: unknown;
|
|
423
505
|
}): unknown | symbol;
|
|
424
506
|
/**
|
|
507
|
+
* Runs apply frontend model group.
|
|
425
508
|
* @param {object} args - Group args.
|
|
426
509
|
* @param {import("./database/query/model-class-query.js").default} args.query - Query instance.
|
|
427
510
|
* @param {FrontendModelGroup} args.group - Group definition.
|
|
@@ -452,14 +535,16 @@ export default class FrontendModelController extends Controller {
|
|
|
452
535
|
query: import("./database/query/model-class-query.js").default;
|
|
453
536
|
}): void;
|
|
454
537
|
/**
|
|
538
|
+
* Runs apply frontend model translated attribute preloads.
|
|
455
539
|
* @param {object} args - Args.
|
|
456
|
-
* @param {import("./database/query/model-class-query.js").default
|
|
457
|
-
* @returns {import("./database/query/model-class-query.js").default
|
|
540
|
+
* @param {import("./database/query/model-class-query.js").default<?>} args.query - Query instance.
|
|
541
|
+
* @returns {import("./database/query/model-class-query.js").default<?>} - Query with translations preloaded if needed.
|
|
458
542
|
*/
|
|
459
543
|
applyFrontendModelTranslatedAttributePreloads({ query }: {
|
|
460
|
-
query: import("./database/query/model-class-query.js").default<
|
|
461
|
-
}): import("./database/query/model-class-query.js").default<
|
|
544
|
+
query: import("./database/query/model-class-query.js").default<unknown>;
|
|
545
|
+
}): import("./database/query/model-class-query.js").default<unknown>;
|
|
462
546
|
/**
|
|
547
|
+
* Runs apply frontend model sort.
|
|
463
548
|
* @param {object} args - Sort args.
|
|
464
549
|
* @param {import("./database/query/model-class-query.js").default} args.query - Query instance.
|
|
465
550
|
* @param {FrontendModelSort} args.sort - Sort definition.
|
|
@@ -492,11 +577,13 @@ export default class FrontendModelController extends Controller {
|
|
|
492
577
|
query: import("./database/query/model-class-query.js").default;
|
|
493
578
|
}): void;
|
|
494
579
|
/**
|
|
580
|
+
* Runs frontend model selected attributes for model class.
|
|
495
581
|
* @param {typeof import("./database/record/index.js").default} modelClass - Model class.
|
|
496
582
|
* @returns {string[] | null} - Selected attributes for model class.
|
|
497
583
|
*/
|
|
498
584
|
frontendModelSelectedAttributesForModelClass(modelClass: typeof import("./database/record/index.js").default): string[] | null;
|
|
499
585
|
/**
|
|
586
|
+
* Runs frontend model selects extra for model class.
|
|
500
587
|
* @param {typeof import("./database/record/index.js").default} modelClass - Model class.
|
|
501
588
|
* @returns {string[] | null} - Extra attributes (loaded in addition to the defaults) for the model class.
|
|
502
589
|
*/
|
|
@@ -511,26 +598,31 @@ export default class FrontendModelController extends Controller {
|
|
|
511
598
|
*/
|
|
512
599
|
frontendModelEffectiveSelectedAttributesForModelClass(modelClass: typeof import("./database/record/index.js").default, fallbackAttributeNames: string[]): string[] | null;
|
|
513
600
|
/**
|
|
601
|
+
* Runs frontend model default attributes for model class.
|
|
514
602
|
* @param {typeof import("./database/record/index.js").default} modelClass - Model class.
|
|
515
603
|
* @returns {string[] | null} - Default frontend-model attributes declared on the resource.
|
|
516
604
|
*/
|
|
517
605
|
frontendModelDefaultAttributesForModelClass(modelClass: typeof import("./database/record/index.js").default): string[] | null;
|
|
518
606
|
/**
|
|
607
|
+
* Runs frontend model non default attributes for model class.
|
|
519
608
|
* @param {typeof import("./database/record/index.js").default} modelClass - Model class.
|
|
520
609
|
* @returns {string[]} - Attribute names explicitly marked selectedByDefault: false.
|
|
521
610
|
*/
|
|
522
611
|
frontendModelNonDefaultAttributesForModelClass(modelClass: typeof import("./database/record/index.js").default): string[];
|
|
523
612
|
/**
|
|
613
|
+
* Runs serialize frontend model attributes.
|
|
524
614
|
* @param {import("./database/record/index.js").default} model - Model instance.
|
|
525
|
-
* @returns {Promise<Record<string,
|
|
615
|
+
* @returns {Promise<Record<string, ?>>} - Serialized attributes filtered by select map.
|
|
526
616
|
*/
|
|
527
|
-
serializeFrontendModelAttributes(model: import("./database/record/index.js").default): Promise<Record<string,
|
|
617
|
+
serializeFrontendModelAttributes(model: import("./database/record/index.js").default): Promise<Record<string, unknown>>;
|
|
528
618
|
/**
|
|
619
|
+
* Runs serialization resource instance for model.
|
|
529
620
|
* @param {import("./database/record/index.js").default} model - Model instance.
|
|
530
621
|
* @returns {import("./frontend-model-resource/base-resource.js").default | null} - Resource instance or null.
|
|
531
622
|
*/
|
|
532
623
|
_serializationResourceInstanceForModel(model: import("./database/record/index.js").default): import("./frontend-model-resource/base-resource.js").default | null;
|
|
533
624
|
/**
|
|
625
|
+
* Runs frontend model filter serializable related models.
|
|
534
626
|
* @param {object} args - Arguments.
|
|
535
627
|
* @param {import("./database/record/index.js").default[]} args.models - Frontend model records.
|
|
536
628
|
* @param {boolean} args.relationshipIsCollection - Whether relation is has-many.
|
|
@@ -541,43 +633,51 @@ export default class FrontendModelController extends Controller {
|
|
|
541
633
|
relationshipIsCollection: boolean;
|
|
542
634
|
}): Promise<import("./database/record/index.js").default[]>;
|
|
543
635
|
/**
|
|
544
|
-
*
|
|
636
|
+
* Runs is serializable frontend model.
|
|
637
|
+
* @param {?} value - Candidate preloaded value.
|
|
545
638
|
* @returns {value is import("./database/record/index.js").default} - Whether value behaves like a model.
|
|
546
639
|
*/
|
|
547
640
|
isSerializableFrontendModel(value: unknown): value is import("./database/record/index.js").default;
|
|
548
641
|
/**
|
|
642
|
+
* Runs serialize frontend models.
|
|
549
643
|
* @param {import("./database/record/index.js").default[]} models - Models to serialize.
|
|
550
|
-
* @returns {Promise<Record<string,
|
|
644
|
+
* @returns {Promise<Record<string, ?>[]>} - Serialized model payloads.
|
|
551
645
|
*/
|
|
552
|
-
serializeFrontendModels(models: import("./database/record/index.js").default[]): Promise<Record<string,
|
|
646
|
+
serializeFrontendModels(models: import("./database/record/index.js").default[]): Promise<Record<string, unknown>[]>;
|
|
553
647
|
/**
|
|
648
|
+
* Runs serialize frontend model.
|
|
554
649
|
* @param {import("./database/record/index.js").default} model - Frontend model record.
|
|
555
|
-
* @returns {Promise<Record<string,
|
|
650
|
+
* @returns {Promise<Record<string, ?>>} - Serialized frontend model payload.
|
|
556
651
|
*/
|
|
557
|
-
serializeFrontendModel(model: import("./database/record/index.js").default): Promise<Record<string,
|
|
652
|
+
serializeFrontendModel(model: import("./database/record/index.js").default): Promise<Record<string, unknown>>;
|
|
558
653
|
/**
|
|
654
|
+
* Runs frontend model render error.
|
|
559
655
|
* @param {string} errorMessage - Error message.
|
|
560
656
|
* @returns {Promise<void>} - Resolves when error has been rendered.
|
|
561
657
|
*/
|
|
562
658
|
frontendModelRenderError(errorMessage: string): Promise<void>;
|
|
563
659
|
/**
|
|
660
|
+
* Runs frontend model error payload.
|
|
564
661
|
* @param {string} errorMessage - Error message.
|
|
565
|
-
* @returns {Record<string,
|
|
662
|
+
* @returns {Record<string, ?>} - Error payload.
|
|
566
663
|
*/
|
|
567
|
-
frontendModelErrorPayload(errorMessage: string): Record<string,
|
|
664
|
+
frontendModelErrorPayload(errorMessage: string): Record<string, unknown>;
|
|
568
665
|
/**
|
|
569
|
-
*
|
|
666
|
+
* Runs frontend model client safe error payload.
|
|
667
|
+
* @returns {Record<string, ?>} - Client-safe error payload.
|
|
570
668
|
*/
|
|
571
|
-
frontendModelClientSafeErrorPayload(): Record<string,
|
|
669
|
+
frontendModelClientSafeErrorPayload(): Record<string, unknown>;
|
|
572
670
|
/**
|
|
573
|
-
*
|
|
574
|
-
* @
|
|
671
|
+
* Runs frontend model client error payload for error.
|
|
672
|
+
* @param {?} error - Caught error.
|
|
673
|
+
* @returns {Record<string, ?>} - Client payload for the current environment.
|
|
575
674
|
*/
|
|
576
|
-
frontendModelClientErrorPayloadForError(error: unknown): Record<string,
|
|
675
|
+
frontendModelClientErrorPayloadForError(error: unknown): Record<string, unknown>;
|
|
577
676
|
/**
|
|
677
|
+
* Runs frontend model log endpoint error.
|
|
578
678
|
* @param {object} args - Error log args.
|
|
579
679
|
* @param {string} args.action - Endpoint/action label.
|
|
580
|
-
* @param {
|
|
680
|
+
* @param {?} args.error - Caught error.
|
|
581
681
|
* @param {"index" | "find" | "create" | "update" | "destroy" | "attach" | "download" | "url" | "custom-command"} [args.commandType] - Frontend-model command type.
|
|
582
682
|
* @param {string | undefined} [args.model] - Request model name when available.
|
|
583
683
|
* @param {string | undefined} [args.requestId] - Batch request id when available.
|
|
@@ -591,48 +691,83 @@ export default class FrontendModelController extends Controller {
|
|
|
591
691
|
requestId?: string | undefined;
|
|
592
692
|
}): Promise<void>;
|
|
593
693
|
/**
|
|
694
|
+
* Runs frontend model render command response.
|
|
594
695
|
* @param {"index" | "find" | "create" | "update" | "destroy" | "attach" | "download" | "url"} action - Frontend action.
|
|
595
696
|
* @returns {Promise<void>} - Resolves when response has been rendered.
|
|
596
697
|
*/
|
|
597
698
|
frontendModelRenderCommandResponse(action: "index" | "find" | "create" | "update" | "destroy" | "attach" | "download" | "url"): Promise<void>;
|
|
598
699
|
/**
|
|
700
|
+
* Runs frontend model command payload.
|
|
599
701
|
* @param {"index" | "find" | "create" | "update" | "destroy" | "attach" | "download" | "url"} action - Frontend action.
|
|
600
|
-
* @returns {Promise<Record<string,
|
|
702
|
+
* @returns {Promise<Record<string, ?> | null>} - Response payload.
|
|
703
|
+
*/
|
|
704
|
+
frontendModelCommandPayload(action: "index" | "find" | "create" | "update" | "destroy" | "attach" | "download" | "url"): Promise<Record<string, unknown> | null>;
|
|
705
|
+
/**
|
|
706
|
+
* Runs frontend api.
|
|
707
|
+
* @returns {Promise<void>} - Shared frontend model API action with batch support.
|
|
601
708
|
*/
|
|
602
|
-
frontendModelCommandPayload(action: "index" | "find" | "create" | "update" | "destroy" | "attach" | "download" | "url"): Promise<Record<string, any> | null>;
|
|
603
|
-
/** @returns {Promise<void>} - Shared frontend model API action with batch support. */
|
|
604
709
|
frontendApi(): Promise<void>;
|
|
605
710
|
/**
|
|
606
711
|
* Dispatches a custom frontend-model command through the shared frontend-model API endpoint.
|
|
607
712
|
* @param {object} args - Arguments.
|
|
608
713
|
* @param {string} args.customPath - Custom backend route path.
|
|
609
|
-
* @param {
|
|
610
|
-
* @returns {Promise<Record<string,
|
|
714
|
+
* @param {?} args.payload - Request payload.
|
|
715
|
+
* @returns {Promise<Record<string, ?>>} - Parsed JSON response payload.
|
|
611
716
|
*/
|
|
612
717
|
frontendApiCustomCommandPayload({ customPath, payload }: {
|
|
613
718
|
customPath: string;
|
|
614
719
|
payload: unknown;
|
|
615
|
-
}): Promise<Record<string,
|
|
616
|
-
/**
|
|
720
|
+
}): Promise<Record<string, unknown>>;
|
|
721
|
+
/**
|
|
722
|
+
* Runs frontend index.
|
|
723
|
+
* @returns {Promise<void>} - Collection action for frontend model resources.
|
|
724
|
+
*/
|
|
617
725
|
frontendIndex(): Promise<void>;
|
|
618
|
-
/**
|
|
726
|
+
/**
|
|
727
|
+
* Runs frontend find.
|
|
728
|
+
* @returns {Promise<void>} - Member find action for frontend model resources.
|
|
729
|
+
*/
|
|
619
730
|
frontendFind(): Promise<void>;
|
|
620
|
-
/**
|
|
731
|
+
/**
|
|
732
|
+
* Runs frontend update.
|
|
733
|
+
* @returns {Promise<void>} - Member update action for frontend model resources.
|
|
734
|
+
*/
|
|
621
735
|
frontendUpdate(): Promise<void>;
|
|
622
|
-
/**
|
|
736
|
+
/**
|
|
737
|
+
* Runs frontend attach.
|
|
738
|
+
* @returns {Promise<void>} - Member attach action for frontend model resources.
|
|
739
|
+
*/
|
|
623
740
|
frontendAttach(): Promise<void>;
|
|
624
|
-
/**
|
|
741
|
+
/**
|
|
742
|
+
* Runs frontend download.
|
|
743
|
+
* @returns {Promise<void>} - Member download action for frontend model resources.
|
|
744
|
+
*/
|
|
625
745
|
frontendDownload(): Promise<void>;
|
|
626
|
-
/**
|
|
746
|
+
/**
|
|
747
|
+
* Runs frontend url.
|
|
748
|
+
* @returns {Promise<void>} - Member URL action for frontend model resources.
|
|
749
|
+
*/
|
|
627
750
|
frontendUrl(): Promise<void>;
|
|
628
|
-
/**
|
|
751
|
+
/**
|
|
752
|
+
* Runs frontend create.
|
|
753
|
+
* @returns {Promise<void>} - Member create action for frontend model resources.
|
|
754
|
+
*/
|
|
629
755
|
frontendCreate(): Promise<void>;
|
|
630
|
-
/**
|
|
756
|
+
/**
|
|
757
|
+
* Runs frontend destroy.
|
|
758
|
+
* @returns {Promise<void>} - Member destroy action for frontend model resources.
|
|
759
|
+
*/
|
|
631
760
|
frontendDestroy(): Promise<void>;
|
|
632
|
-
/**
|
|
761
|
+
/**
|
|
762
|
+
* Runs frontend custom command.
|
|
763
|
+
* @returns {Promise<void>} - Custom collection/member command action for frontend-model resources.
|
|
764
|
+
*/
|
|
633
765
|
frontendCustomCommand(): Promise<void>;
|
|
634
|
-
/**
|
|
635
|
-
|
|
766
|
+
/**
|
|
767
|
+
* Runs frontend model custom command payload.
|
|
768
|
+
* @returns {Promise<Record<string, ?>>} - Response payload.
|
|
769
|
+
*/
|
|
770
|
+
frontendModelCustomCommandPayload(): Promise<Record<string, unknown>>;
|
|
636
771
|
/**
|
|
637
772
|
* Walks a custom-command response payload and replaces any backend `Record`
|
|
638
773
|
* instance with the resource's per-action serialized form so handlers can
|
|
@@ -640,17 +775,19 @@ export default class FrontendModelController extends Controller {
|
|
|
640
775
|
* `await this.serialize(record, action)`. Plain objects, arrays, and
|
|
641
776
|
* primitive values pass through and are later encoded by
|
|
642
777
|
* `serializeFrontendModelTransportValue`.
|
|
643
|
-
*
|
|
644
|
-
* @param {
|
|
645
|
-
* @param {{serialize: (model: unknown, action: string) => Promise<Record<string, any>>}} resource - Resource instance providing `serialize`.
|
|
778
|
+
* @param {?} value - Payload value.
|
|
779
|
+
* @param {{serialize: (model: ?, action: string) => Promise<Record<string, ?>>}} resource - Resource instance providing `serialize`.
|
|
646
780
|
* @param {string} action - Custom command method name passed to `resource.serialize` for per-action authorization filtering.
|
|
647
781
|
* @param {WeakSet<object>} [seen] - Recursion stack of plain-object containers currently being walked. Membership is added on entry and removed on exit so a container shared between siblings (i.e. referenced twice but not cyclically) is walked on each reference instead of being short-circuited the second time, which would let backend `Record` instances inside it bypass `resource.serialize`.
|
|
648
|
-
* @returns {Promise
|
|
782
|
+
* @returns {Promise<?>} - Payload with backend `Record` instances replaced by serialized markers.
|
|
649
783
|
*/
|
|
650
784
|
autoSerializeFrontendModelsInPayload(value: unknown, resource: {
|
|
651
|
-
serialize: (model: unknown, action: string) => Promise<Record<string,
|
|
785
|
+
serialize: (model: unknown, action: string) => Promise<Record<string, unknown>>;
|
|
652
786
|
}, action: string, seen?: WeakSet<object>): Promise<unknown>;
|
|
653
787
|
}
|
|
788
|
+
/**
|
|
789
|
+
* FrontendModelSearch type.
|
|
790
|
+
*/
|
|
654
791
|
export type FrontendModelSearch = {
|
|
655
792
|
/**
|
|
656
793
|
* - Relationship path.
|
|
@@ -667,8 +804,11 @@ export type FrontendModelSearch = {
|
|
|
667
804
|
/**
|
|
668
805
|
* - Search value.
|
|
669
806
|
*/
|
|
670
|
-
value:
|
|
807
|
+
value: unknown;
|
|
671
808
|
};
|
|
809
|
+
/**
|
|
810
|
+
* FrontendModelSort type.
|
|
811
|
+
*/
|
|
672
812
|
export type FrontendModelSort = {
|
|
673
813
|
/**
|
|
674
814
|
* - Attribute name to sort by.
|
|
@@ -683,6 +823,9 @@ export type FrontendModelSort = {
|
|
|
683
823
|
*/
|
|
684
824
|
path: string[];
|
|
685
825
|
};
|
|
826
|
+
/**
|
|
827
|
+
* FrontendModelGroup type.
|
|
828
|
+
*/
|
|
686
829
|
export type FrontendModelGroup = {
|
|
687
830
|
/**
|
|
688
831
|
* - Attribute name to group by.
|
|
@@ -693,6 +836,9 @@ export type FrontendModelGroup = {
|
|
|
693
836
|
*/
|
|
694
837
|
path: string[];
|
|
695
838
|
};
|
|
839
|
+
/**
|
|
840
|
+
* FrontendModelPluck type.
|
|
841
|
+
*/
|
|
696
842
|
export type FrontendModelPluck = {
|
|
697
843
|
/**
|
|
698
844
|
* - Attribute name to pluck.
|
|
@@ -703,6 +849,9 @@ export type FrontendModelPluck = {
|
|
|
703
849
|
*/
|
|
704
850
|
path: string[];
|
|
705
851
|
};
|
|
852
|
+
/**
|
|
853
|
+
* FrontendModelPagination type.
|
|
854
|
+
*/
|
|
706
855
|
export type FrontendModelPagination = {
|
|
707
856
|
/**
|
|
708
857
|
* - Maximum number of records.
|