@mistriwork/engine 0.0.0-stage → 1.0.0-rc.10
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/LICENSE +21 -0
- package/README.md +17 -2
- package/dist/adapters/adapter.d.ts +693 -0
- package/dist/adapters/adapter.js +444 -0
- package/dist/adapters/cache/cacheStore.d.ts +75 -0
- package/dist/adapters/cache/cacheStore.js +160 -0
- package/dist/adapters/cache/resp.d.ts +52 -0
- package/dist/adapters/cache/resp.js +237 -0
- package/dist/adapters/commands/canonicalJson.d.ts +19 -0
- package/dist/adapters/commands/canonicalJson.js +154 -0
- package/dist/adapters/connect.d.ts +29 -0
- package/dist/adapters/connect.js +40 -0
- package/dist/adapters/connectionBudget.d.ts +101 -0
- package/dist/adapters/connectionBudget.js +128 -0
- package/dist/adapters/dbLatency.d.ts +35 -0
- package/dist/adapters/dbLatency.js +79 -0
- package/dist/adapters/epochCache.d.ts +50 -0
- package/dist/adapters/epochCache.js +85 -0
- package/dist/adapters/http/egress.d.ts +48 -0
- package/dist/adapters/http/egress.js +175 -0
- package/dist/adapters/http/httpAdapter.d.ts +71 -0
- package/dist/adapters/http/httpAdapter.js +512 -0
- package/dist/adapters/http/httpDescription.d.ts +32 -0
- package/dist/adapters/http/httpDescription.js +246 -0
- package/dist/adapters/http/openapi.d.ts +98 -0
- package/dist/adapters/http/openapi.js +487 -0
- package/dist/adapters/layoutRefusal.d.ts +24 -0
- package/dist/adapters/layoutRefusal.js +35 -0
- package/dist/adapters/net/networkPolicy.d.ts +44 -0
- package/dist/adapters/net/networkPolicy.js +123 -0
- package/dist/adapters/net/untrustedDatabase.d.ts +18 -0
- package/dist/adapters/net/untrustedDatabase.js +120 -0
- package/dist/adapters/poolAdmission.d.ts +43 -0
- package/dist/adapters/poolAdmission.js +184 -0
- package/dist/adapters/poolMetrics.d.ts +121 -0
- package/dist/adapters/poolMetrics.js +185 -0
- package/dist/adapters/postgres.d.ts +436 -0
- package/dist/adapters/postgres.js +1890 -0
- package/dist/adapters/postgresCatalog.d.ts +96 -0
- package/dist/adapters/postgresCatalog.js +387 -0
- package/dist/adapters/postgresCatalogDigest.d.ts +30 -0
- package/dist/adapters/postgresCatalogDigest.js +87 -0
- package/dist/adapters/postgresCatalogRows.d.ts +62 -0
- package/dist/adapters/postgresCatalogRows.js +37 -0
- package/dist/adapters/postgresDates.d.ts +1 -0
- package/dist/adapters/postgresDates.js +39 -0
- package/dist/adapters/postgresMaintenance.d.ts +33 -0
- package/dist/adapters/postgresMaintenance.js +179 -0
- package/dist/adapters/postgresPool.d.ts +255 -0
- package/dist/adapters/postgresPool.js +838 -0
- package/dist/adapters/postgresPooler.d.ts +28 -0
- package/dist/adapters/postgresPooler.js +267 -0
- package/dist/adapters/postgresReadCatalog.d.ts +31 -0
- package/dist/adapters/postgresReadCatalog.js +226 -0
- package/dist/adapters/postgresReadSnapshot.d.ts +46 -0
- package/dist/adapters/postgresReadSnapshot.js +133 -0
- package/dist/adapters/postgresSchemaEpoch.d.ts +24 -0
- package/dist/adapters/postgresSchemaEpoch.js +149 -0
- package/dist/adapters/postgresTransactionHandle.d.ts +173 -0
- package/dist/adapters/postgresTransactionHandle.js +524 -0
- package/dist/adapters/postgresValues.d.ts +30 -0
- package/dist/adapters/postgresValues.js +75 -0
- package/dist/adapters/replicas.d.ts +70 -0
- package/dist/adapters/replicas.js +208 -0
- package/dist/adapters/reservedSql.d.ts +38 -0
- package/dist/adapters/reservedSql.js +264 -0
- package/dist/adapters/rolePrivileges.d.ts +17 -0
- package/dist/adapters/rolePrivileges.js +22 -0
- package/dist/adapters/scoped/keyRows.d.ts +65 -0
- package/dist/adapters/scoped/keyRows.js +173 -0
- package/dist/adapters/scoped/postgresScopeCatalog.d.ts +16 -0
- package/dist/adapters/scoped/postgresScopeCatalog.js +117 -0
- package/dist/adapters/scoped/scopedCommandOperations.d.ts +5 -0
- package/dist/adapters/scoped/scopedCommandOperations.js +48 -0
- package/dist/adapters/scoped/scopedReads.d.ts +20 -0
- package/dist/adapters/scoped/scopedReads.js +174 -0
- package/dist/adapters/scoped/scopedTransaction.d.ts +89 -0
- package/dist/adapters/scoped/scopedTransaction.js +303 -0
- package/dist/adapters/scoped/sqliteScopeCatalog.d.ts +16 -0
- package/dist/adapters/scoped/sqliteScopeCatalog.js +241 -0
- package/dist/adapters/scoped/updateGuard.d.ts +3 -0
- package/dist/adapters/scoped/updateGuard.js +40 -0
- package/dist/adapters/serverSettings.d.ts +45 -0
- package/dist/adapters/serverSettings.js +46 -0
- package/dist/adapters/sqlite.d.ts +262 -0
- package/dist/adapters/sqlite.js +1434 -0
- package/dist/adapters/sqliteCostlyReads.d.ts +33 -0
- package/dist/adapters/sqliteCostlyReads.js +49 -0
- package/dist/adapters/sqliteDecimals.d.ts +22 -0
- package/dist/adapters/sqliteDecimals.js +57 -0
- package/dist/adapters/sqliteHandles.d.ts +43 -0
- package/dist/adapters/sqliteHandles.js +143 -0
- package/dist/adapters/sqliteStatementProcess.d.ts +29 -0
- package/dist/adapters/sqliteStatementProcess.js +131 -0
- package/dist/adapters/statementControl.d.ts +34 -0
- package/dist/adapters/statementControl.js +90 -0
- package/dist/adapters/storeHost.d.ts +130 -0
- package/dist/adapters/storeHost.js +13 -0
- package/dist/adapters/telemetry/drivers.d.ts +21 -0
- package/dist/adapters/telemetry/drivers.js +321 -0
- package/dist/adapters/telemetry/metrics.d.ts +63 -0
- package/dist/adapters/telemetry/metrics.js +122 -0
- package/dist/adapters/telemetry/otlp.d.ts +12 -0
- package/dist/adapters/telemetry/otlp.js +320 -0
- package/dist/adapters/telemetry/otlpEncode.d.ts +48 -0
- package/dist/adapters/telemetry/otlpEncode.js +366 -0
- package/dist/adapters/telemetry/otlpEnv.d.ts +1 -0
- package/dist/adapters/telemetry/otlpEnv.js +12 -0
- package/dist/adapters/telemetry/serverTiming.d.ts +83 -0
- package/dist/adapters/telemetry/serverTiming.js +503 -0
- package/dist/adapters/telemetry/start.d.ts +10 -0
- package/dist/adapters/telemetry/start.js +25 -0
- package/dist/adapters/telemetry/statement.d.ts +16 -0
- package/dist/adapters/telemetry/statement.js +134 -0
- package/dist/adapters/telemetry/trace.d.ts +127 -0
- package/dist/adapters/telemetry/trace.js +295 -0
- package/dist/adapters/writeAhead.d.ts +27 -0
- package/dist/adapters/writeAhead.js +46 -0
- package/dist/adapters/writeAttribution.d.ts +18 -0
- package/dist/adapters/writeAttribution.js +23 -0
- package/dist/adapters/writeCapture.d.ts +73 -0
- package/dist/adapters/writeCapture.js +20 -0
- package/dist/adapters/writeLanes.d.ts +94 -0
- package/dist/adapters/writeLanes.js +232 -0
- package/dist/engine.d.ts +15 -0
- package/dist/engine.js +13 -0
- package/dist/server/auth/credentials.d.ts +61 -0
- package/dist/server/auth/credentials.js +260 -0
- package/dist/server/cacheService.d.ts +50 -0
- package/dist/server/cacheService.js +110 -0
- package/dist/server/cli/args.d.ts +176 -0
- package/dist/server/cli/args.js +342 -0
- package/dist/server/cli/bin.d.ts +5 -0
- package/dist/server/cli/bin.js +66 -0
- package/dist/server/cli/browser.d.ts +15 -0
- package/dist/server/cli/browser.js +37 -0
- package/dist/server/cli/config.d.ts +50 -0
- package/dist/server/cli/config.js +206 -0
- package/dist/server/cli/startup.d.ts +36 -0
- package/dist/server/cli/startup.js +128 -0
- package/dist/server/cli/startupOptions.d.ts +63 -0
- package/dist/server/cli/startupOptions.js +143 -0
- package/dist/server/cli/subcommand.d.ts +28 -0
- package/dist/server/cli/subcommand.js +32 -0
- package/dist/server/cli/usage.d.ts +13 -0
- package/dist/server/cli/usage.js +31 -0
- package/dist/server/clientHttp.d.ts +184 -0
- package/dist/server/clientHttp.js +700 -0
- package/dist/server/clientSurface.d.ts +128 -0
- package/dist/server/clientSurface.js +182 -0
- package/dist/server/columnGrants.d.ts +103 -0
- package/dist/server/columnGrants.js +730 -0
- package/dist/server/compileCache.d.ts +1 -0
- package/dist/server/compileCache.js +30 -0
- package/dist/server/config/locations.d.ts +1 -0
- package/dist/server/config/locations.js +15 -0
- package/dist/server/configPaths.d.ts +7 -0
- package/dist/server/configPaths.js +34 -0
- package/dist/server/configSections.d.ts +64 -0
- package/dist/server/configSections.js +72 -0
- package/dist/server/connectionRedaction.d.ts +30 -0
- package/dist/server/connectionRedaction.js +77 -0
- package/dist/server/connections.d.ts +353 -0
- package/dist/server/connections.js +978 -0
- package/dist/server/constraints.d.ts +82 -0
- package/dist/server/constraints.js +169 -0
- package/dist/server/demo.d.ts +9 -0
- package/dist/server/demo.js +554 -0
- package/dist/server/devclient.d.ts +108 -0
- package/dist/server/devclient.js +361 -0
- package/dist/server/evidence.d.ts +55 -0
- package/dist/server/evidence.js +323 -0
- package/dist/server/hiddenColumns.d.ts +32 -0
- package/dist/server/hiddenColumns.js +238 -0
- package/dist/server/http/baselineHeaders.d.ts +24 -0
- package/dist/server/http/baselineHeaders.js +12 -0
- package/dist/server/http/captured.d.ts +35 -0
- package/dist/server/http/captured.js +73 -0
- package/dist/server/http/clock.d.ts +1 -0
- package/dist/server/http/clock.js +14 -0
- package/dist/server/http/connectionSource.d.ts +4 -0
- package/dist/server/http/connectionSource.js +48 -0
- package/dist/server/http/context.d.ts +189 -0
- package/dist/server/http/context.js +11 -0
- package/dist/server/http/crawlerText.d.ts +15 -0
- package/dist/server/http/crawlerText.js +32 -0
- package/dist/server/http/dataRoutes.d.ts +88 -0
- package/dist/server/http/dataRoutes.js +137 -0
- package/dist/server/http/door.d.ts +57 -0
- package/dist/server/http/door.js +39 -0
- package/dist/server/http/exportRoute.d.ts +15 -0
- package/dist/server/http/exportRoute.js +320 -0
- package/dist/server/http/firstPaint.d.ts +108 -0
- package/dist/server/http/firstPaint.js +262 -0
- package/dist/server/http/httpOperationRoutes.d.ts +11 -0
- package/dist/server/http/httpOperationRoutes.js +50 -0
- package/dist/server/http/pageReads.d.ts +20 -0
- package/dist/server/http/pageReads.js +205 -0
- package/dist/server/http/pageRoutes.d.ts +39 -0
- package/dist/server/http/pageRoutes.js +291 -0
- package/dist/server/http/probes.d.ts +22 -0
- package/dist/server/http/probes.js +27 -0
- package/dist/server/http/rateLimit.d.ts +131 -0
- package/dist/server/http/rateLimit.js +351 -0
- package/dist/server/http/readRoutes.d.ts +9 -0
- package/dist/server/http/readRoutes.js +131 -0
- package/dist/server/http/readRouting.d.ts +20 -0
- package/dist/server/http/readRouting.js +80 -0
- package/dist/server/http/recordCompose.d.ts +67 -0
- package/dist/server/http/recordCompose.js +167 -0
- package/dist/server/http/recordWrites.d.ts +89 -0
- package/dist/server/http/recordWrites.js +298 -0
- package/dist/server/http/refusalReport.d.ts +38 -0
- package/dist/server/http/refusalReport.js +63 -0
- package/dist/server/http/reply.d.ts +130 -0
- package/dist/server/http/reply.js +394 -0
- package/dist/server/http/requestOrigin.d.ts +11 -0
- package/dist/server/http/requestOrigin.js +8 -0
- package/dist/server/http/router.d.ts +45 -0
- package/dist/server/http/router.js +22 -0
- package/dist/server/http/serverCore.d.ts +68 -0
- package/dist/server/http/serverCore.js +177 -0
- package/dist/server/http/traceRequest.d.ts +30 -0
- package/dist/server/http/traceRequest.js +224 -0
- package/dist/server/http/trust.d.ts +261 -0
- package/dist/server/http/trust.js +472 -0
- package/dist/server/http/writeRefusal.d.ts +33 -0
- package/dist/server/http/writeRefusal.js +24 -0
- package/dist/server/httpConnection.d.ts +49 -0
- package/dist/server/httpConnection.js +170 -0
- package/dist/server/impact.d.ts +55 -0
- package/dist/server/impact.js +47 -0
- package/dist/server/journal.d.ts +134 -0
- package/dist/server/journal.js +398 -0
- package/dist/server/keysetReadHttp.d.ts +52 -0
- package/dist/server/keysetReadHttp.js +85 -0
- package/dist/server/layouts.d.ts +49 -0
- package/dist/server/layouts.js +192 -0
- package/dist/server/migrate/cli.d.ts +55 -0
- package/dist/server/migrate/cli.js +517 -0
- package/dist/server/migrate/database.d.ts +37 -0
- package/dist/server/migrate/database.js +247 -0
- package/dist/server/migrate/desired.d.ts +76 -0
- package/dist/server/migrate/desired.js +292 -0
- package/dist/server/migrate/files.d.ts +34 -0
- package/dist/server/migrate/files.js +141 -0
- package/dist/server/migrate/flyway.d.ts +7 -0
- package/dist/server/migrate/flyway.js +69 -0
- package/dist/server/migrate/history.d.ts +70 -0
- package/dist/server/migrate/history.js +211 -0
- package/dist/server/migrate/runner.d.ts +100 -0
- package/dist/server/migrate/runner.js +409 -0
- package/dist/server/migrate/snapshot.d.ts +30 -0
- package/dist/server/migrate/snapshot.js +239 -0
- package/dist/server/migrate/target.d.ts +33 -0
- package/dist/server/migrate/target.js +82 -0
- package/dist/server/openapiDraft.d.ts +25 -0
- package/dist/server/openapiDraft.js +171 -0
- package/dist/server/operations/diagnostics.d.ts +101 -0
- package/dist/server/operations/diagnostics.js +284 -0
- package/dist/server/operations/requestMetrics.d.ts +33 -0
- package/dist/server/operations/requestMetrics.js +94 -0
- package/dist/server/packageVersion.d.ts +1 -0
- package/dist/server/packageVersion.js +11 -0
- package/dist/server/poolConfig.d.ts +34 -0
- package/dist/server/poolConfig.js +114 -0
- package/dist/server/product.d.ts +20 -0
- package/dist/server/product.js +12 -0
- package/dist/server/recordHistoryOperations.d.ts +39 -0
- package/dist/server/recordHistoryOperations.js +43 -0
- package/dist/server/recordWriteOperations.d.ts +111 -0
- package/dist/server/recordWriteOperations.js +329 -0
- package/dist/server/resourceReadHttp.d.ts +81 -0
- package/dist/server/resourceReadHttp.js +606 -0
- package/dist/server/resourceReadOperations.d.ts +147 -0
- package/dist/server/resourceReadOperations.js +452 -0
- package/dist/server/scaffoldMachine.d.ts +54 -0
- package/dist/server/scaffoldMachine.js +184 -0
- package/dist/server/seed/cli.d.ts +20 -0
- package/dist/server/seed/cli.js +164 -0
- package/dist/server/seed/lexicon.d.ts +26 -0
- package/dist/server/seed/lexicon.js +585 -0
- package/dist/server/seed/seed.d.ts +70 -0
- package/dist/server/seed/seed.js +779 -0
- package/dist/server/seed/words.d.ts +21 -0
- package/dist/server/seed/words.js +164 -0
- package/dist/server/serverRequests.d.ts +6 -0
- package/dist/server/serverRequests.js +33 -0
- package/dist/server/serverTimeouts.d.ts +33 -0
- package/dist/server/serverTimeouts.js +32 -0
- package/dist/server/shapeonly.d.ts +32 -0
- package/dist/server/shapeonly.js +110 -0
- package/dist/server/startupWarnings.d.ts +32 -0
- package/dist/server/startupWarnings.js +92 -0
- package/dist/shared/addressParams.d.ts +28 -0
- package/dist/shared/addressParams.js +47 -0
- package/dist/shared/appCards.d.ts +123 -0
- package/dist/shared/appCards.js +385 -0
- package/dist/shared/appComponents.d.ts +177 -0
- package/dist/shared/appComponents.js +422 -0
- package/dist/shared/appDocuments.d.ts +43 -0
- package/dist/shared/appDocuments.js +131 -0
- package/dist/shared/appEmbeds.d.ts +21 -0
- package/dist/shared/appEmbeds.js +24 -0
- package/dist/shared/appIcons.d.ts +28 -0
- package/dist/shared/appIcons.js +223 -0
- package/dist/shared/appLinks.d.ts +17 -0
- package/dist/shared/appLinks.js +124 -0
- package/dist/shared/appListColumns.d.ts +3 -0
- package/dist/shared/appListColumns.js +66 -0
- package/dist/shared/appLocale.d.ts +36 -0
- package/dist/shared/appLocale.js +86 -0
- package/dist/shared/appMessages.d.ts +44 -0
- package/dist/shared/appMessages.js +78 -0
- package/dist/shared/appNoun.d.ts +21 -0
- package/dist/shared/appNoun.js +32 -0
- package/dist/shared/autoBucket.d.ts +98 -0
- package/dist/shared/autoBucket.js +305 -0
- package/dist/shared/autoValues.d.ts +25 -0
- package/dist/shared/autoValues.js +25 -0
- package/dist/shared/breakdown.d.ts +228 -0
- package/dist/shared/breakdown.js +557 -0
- package/dist/shared/breakdowntext.d.ts +41 -0
- package/dist/shared/breakdowntext.js +400 -0
- package/dist/shared/builtInThemes.d.ts +2 -0
- package/dist/shared/builtInThemes.js +771 -0
- package/dist/shared/chartSeparation.d.ts +11 -0
- package/dist/shared/chartSeparation.js +58 -0
- package/dist/shared/clauses.d.ts +22 -0
- package/dist/shared/clauses.js +97 -0
- package/dist/shared/columnCaption.d.ts +16 -0
- package/dist/shared/columnCaption.js +90 -0
- package/dist/shared/commandFieldPath.d.ts +2 -0
- package/dist/shared/commandFieldPath.js +7 -0
- package/dist/shared/commandWire.d.ts +26 -0
- package/dist/shared/commandWire.js +41 -0
- package/dist/shared/computed.d.ts +161 -0
- package/dist/shared/computed.js +378 -0
- package/dist/shared/computedParse.d.ts +13 -0
- package/dist/shared/computedParse.js +278 -0
- package/dist/shared/computedValue.d.ts +47 -0
- package/dist/shared/computedValue.js +191 -0
- package/dist/shared/connection.d.ts +30 -0
- package/dist/shared/connection.js +1 -0
- package/dist/shared/csv.d.ts +20 -0
- package/dist/shared/csv.js +63 -0
- package/dist/shared/dashLayout.d.ts +30 -0
- package/dist/shared/dashLayout.js +132 -0
- package/dist/shared/dashboardAsks.d.ts +93 -0
- package/dist/shared/dashboardAsks.js +129 -0
- package/dist/shared/dashboardTrend.d.ts +20 -0
- package/dist/shared/dashboardTrend.js +50 -0
- package/dist/shared/declaredReferences.d.ts +50 -0
- package/dist/shared/declaredReferences.js +202 -0
- package/dist/shared/definedFields.d.ts +63 -0
- package/dist/shared/definedFields.js +103 -0
- package/dist/shared/definedValues.d.ts +63 -0
- package/dist/shared/definedValues.js +184 -0
- package/dist/shared/displayDefaults.d.ts +135 -0
- package/dist/shared/displayDefaults.js +529 -0
- package/dist/shared/dueDate.d.ts +6 -0
- package/dist/shared/dueDate.js +6 -0
- package/dist/shared/duration.d.ts +4 -0
- package/dist/shared/duration.js +23 -0
- package/dist/shared/fileBounds.d.ts +9 -0
- package/dist/shared/fileBounds.js +9 -0
- package/dist/shared/filter.d.ts +217 -0
- package/dist/shared/filter.js +305 -0
- package/dist/shared/firstPaint.d.ts +24 -0
- package/dist/shared/firstPaint.js +33 -0
- package/dist/shared/form.d.ts +21 -0
- package/dist/shared/form.js +25 -0
- package/dist/shared/formValues.d.ts +104 -0
- package/dist/shared/formValues.js +352 -0
- package/dist/shared/funnel.d.ts +45 -0
- package/dist/shared/funnel.js +108 -0
- package/dist/shared/httpOperations.d.ts +48 -0
- package/dist/shared/httpOperations.js +9 -0
- package/dist/shared/iconGlyphs.d.ts +4 -0
- package/dist/shared/iconGlyphs.js +151 -0
- package/dist/shared/iconWeights.d.ts +3 -0
- package/dist/shared/iconWeights.js +162 -0
- package/dist/shared/imageWidths.d.ts +32 -0
- package/dist/shared/imageWidths.js +38 -0
- package/dist/shared/keysetPage.d.ts +64 -0
- package/dist/shared/keysetPage.js +161 -0
- package/dist/shared/like.d.ts +20 -0
- package/dist/shared/like.js +29 -0
- package/dist/shared/listEmpty.d.ts +12 -0
- package/dist/shared/listEmpty.js +36 -0
- package/dist/shared/listFilters.d.ts +28 -0
- package/dist/shared/listFilters.js +84 -0
- package/dist/shared/listPresentations.d.ts +199 -0
- package/dist/shared/listPresentations.js +7 -0
- package/dist/shared/listQuestion.d.ts +52 -0
- package/dist/shared/listQuestion.js +137 -0
- package/dist/shared/lookPalettes.d.ts +62 -0
- package/dist/shared/lookPalettes.js +306 -0
- package/dist/shared/maskQuoted.d.ts +24 -0
- package/dist/shared/maskQuoted.js +48 -0
- package/dist/shared/mentionLabel.d.ts +19 -0
- package/dist/shared/mentionLabel.js +38 -0
- package/dist/shared/mentionLookup.d.ts +17 -0
- package/dist/shared/mentionLookup.js +64 -0
- package/dist/shared/menuCounts.d.ts +16 -0
- package/dist/shared/menuCounts.js +74 -0
- package/dist/shared/model.d.ts +79 -0
- package/dist/shared/model.js +153 -0
- package/dist/shared/money.d.ts +44 -0
- package/dist/shared/money.js +81 -0
- package/dist/shared/moneyEntry.d.ts +7 -0
- package/dist/shared/moneyEntry.js +27 -0
- package/dist/shared/mount.d.ts +118 -0
- package/dist/shared/mount.js +248 -0
- package/dist/shared/niceTicks.d.ts +26 -0
- package/dist/shared/niceTicks.js +50 -0
- package/dist/shared/order.d.ts +59 -0
- package/dist/shared/order.js +133 -0
- package/dist/shared/page.d.ts +135 -0
- package/dist/shared/page.js +1187 -0
- package/dist/shared/pageAnatomy.d.ts +99 -0
- package/dist/shared/pageAnatomy.js +370 -0
- package/dist/shared/pageConfig.d.ts +25 -0
- package/dist/shared/pageConfig.js +1308 -0
- package/dist/shared/pageEmptyActions.d.ts +12 -0
- package/dist/shared/pageEmptyActions.js +20 -0
- package/dist/shared/pageLayouts.d.ts +72 -0
- package/dist/shared/pageLayouts.js +205 -0
- package/dist/shared/pageModel.d.ts +785 -0
- package/dist/shared/pageModel.js +121 -0
- package/dist/shared/pagePaths.d.ts +180 -0
- package/dist/shared/pagePaths.js +869 -0
- package/dist/shared/pagePlans.d.ts +52 -0
- package/dist/shared/pagePlans.js +108 -0
- package/dist/shared/pageRoutes.d.ts +9 -0
- package/dist/shared/pageRoutes.js +9 -0
- package/dist/shared/query.d.ts +166 -0
- package/dist/shared/query.js +1302 -0
- package/dist/shared/queryDates.d.ts +12 -0
- package/dist/shared/queryDates.js +101 -0
- package/dist/shared/queryOperands.d.ts +99 -0
- package/dist/shared/queryOperands.js +131 -0
- package/dist/shared/reads.d.ts +103 -0
- package/dist/shared/reads.js +154 -0
- package/dist/shared/recordLabel.d.ts +51 -0
- package/dist/shared/recordLabel.js +123 -0
- package/dist/shared/recordReadKeys.d.ts +30 -0
- package/dist/shared/recordReadKeys.js +51 -0
- package/dist/shared/recordReads.d.ts +268 -0
- package/dist/shared/recordReads.js +368 -0
- package/dist/shared/recordview.d.ts +198 -0
- package/dist/shared/recordview.js +356 -0
- package/dist/shared/referenceModel.d.ts +58 -0
- package/dist/shared/referenceModel.js +194 -0
- package/dist/shared/refusal.d.ts +64 -0
- package/dist/shared/refusal.js +144 -0
- package/dist/shared/relatedCreate.d.ts +30 -0
- package/dist/shared/relatedCreate.js +162 -0
- package/dist/shared/resourceHttp.d.ts +464 -0
- package/dist/shared/resourceHttp.js +1 -0
- package/dist/shared/richText.d.ts +85 -0
- package/dist/shared/richText.js +305 -0
- package/dist/shared/rollups.d.ts +143 -0
- package/dist/shared/rollups.js +64 -0
- package/dist/shared/rowScope.d.ts +72 -0
- package/dist/shared/rowScope.js +376 -0
- package/dist/shared/runtimeTables.d.ts +44 -0
- package/dist/shared/runtimeTables.js +79 -0
- package/dist/shared/schema.d.ts +523 -0
- package/dist/shared/schema.js +627 -0
- package/dist/shared/schematext.d.ts +38 -0
- package/dist/shared/schematext.js +101 -0
- package/dist/shared/scopeCatalog.d.ts +29 -0
- package/dist/shared/scopeCatalog.js +468 -0
- package/dist/shared/servedApp.d.ts +681 -0
- package/dist/shared/servedApp.js +45 -0
- package/dist/shared/sessionLease.d.ts +34 -0
- package/dist/shared/sessionLease.js +3 -0
- package/dist/shared/shape.d.ts +55 -0
- package/dist/shared/shape.js +168 -0
- package/dist/shared/slug.d.ts +1 -0
- package/dist/shared/slug.js +12 -0
- package/dist/shared/sortText.d.ts +14 -0
- package/dist/shared/sortText.js +26 -0
- package/dist/shared/sqlRelation.d.ts +4 -0
- package/dist/shared/sqlRelation.js +8 -0
- package/dist/shared/sqlsaved.d.ts +44 -0
- package/dist/shared/sqlsaved.js +63 -0
- package/dist/shared/stitchedPaths.d.ts +27 -0
- package/dist/shared/stitchedPaths.js +38 -0
- package/dist/shared/structuredFilter.d.ts +22 -0
- package/dist/shared/structuredFilter.js +1 -0
- package/dist/shared/subtitlePath.d.ts +20 -0
- package/dist/shared/subtitlePath.js +24 -0
- package/dist/shared/suggest.d.ts +18 -0
- package/dist/shared/suggest.js +59 -0
- package/dist/shared/tableSizing.d.ts +4 -0
- package/dist/shared/tableSizing.js +9 -0
- package/dist/shared/tagLists.d.ts +57 -0
- package/dist/shared/tagLists.js +34 -0
- package/dist/shared/textRules.d.ts +54 -0
- package/dist/shared/textRules.js +133 -0
- package/dist/shared/theme.d.ts +94 -0
- package/dist/shared/theme.js +800 -0
- package/dist/shared/themeColor.d.ts +34 -0
- package/dist/shared/themeColor.js +109 -0
- package/dist/shared/themeFaces.d.ts +30 -0
- package/dist/shared/themeFaces.js +42 -0
- package/dist/shared/themeInk.d.ts +20 -0
- package/dist/shared/themeInk.js +52 -0
- package/dist/shared/themeLooks.d.ts +9 -0
- package/dist/shared/themeLooks.js +572 -0
- package/dist/shared/themeParts.d.ts +26 -0
- package/dist/shared/themeParts.js +71 -0
- package/dist/shared/themePartsCheck.d.ts +21 -0
- package/dist/shared/themePartsCheck.js +91 -0
- package/dist/shared/themePresets.d.ts +85 -0
- package/dist/shared/themePresets.js +139 -0
- package/dist/shared/themeRecipeWords.d.ts +156 -0
- package/dist/shared/themeRecipeWords.js +156 -0
- package/dist/shared/themeRecipes.d.ts +213 -0
- package/dist/shared/themeRecipes.js +234 -0
- package/dist/shared/themeResolve.d.ts +55 -0
- package/dist/shared/themeResolve.js +52 -0
- package/dist/shared/themeTokens.d.ts +107 -0
- package/dist/shared/themeTokens.js +116 -0
- package/dist/shared/themeType.d.ts +38 -0
- package/dist/shared/themeType.js +205 -0
- package/dist/shared/unitWord.d.ts +4 -0
- package/dist/shared/unitWord.js +37 -0
- package/dist/shared/view.d.ts +195 -0
- package/dist/shared/view.js +987 -0
- package/dist/shared/viewLabels.d.ts +47 -0
- package/dist/shared/viewLabels.js +459 -0
- package/dist/shared/viewPaths.d.ts +248 -0
- package/dist/shared/viewPaths.js +294 -0
- package/dist/shared/viewtext.d.ts +57 -0
- package/dist/shared/viewtext.js +282 -0
- package/dist/shared/vocabulary.d.ts +71 -0
- package/dist/shared/vocabulary.js +249 -0
- package/dist/shared/weekStart.d.ts +7 -0
- package/dist/shared/weekStart.js +36 -0
- package/mark.svg +1 -0
- package/package.json +261 -4
- package/schema/model.d.ts +298 -0
- package/schema/theme.d.ts +587 -0
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A record's name as a template: `recordLabel: 'PO-{id}'`, `'{product_id.name} × {qty}'`.
|
|
3
|
+
*
|
|
4
|
+
* A record label used to be one column or one path, and a table with no name
|
|
5
|
+
* of its own — a purchase order, an order line — was titled by its key: "3".
|
|
6
|
+
* A template says the name in words around the columns that make it, and
|
|
7
|
+
* the name is computed where every other value is, in the statement: a list,
|
|
8
|
+
* a picker, a breadcrumb and a reference to the record all read the same
|
|
9
|
+
* `$label` path, sort by it and search it, on every engine, with nothing for
|
|
10
|
+
* the browser to assemble from columns it may not have fetched.
|
|
11
|
+
*
|
|
12
|
+
* `$label` is a path's last segment (`purchase_order_id.$label`), legal
|
|
13
|
+
* where a table carries a template (`TableMeta.labelTemplate`, which an App
|
|
14
|
+
* serves), and compiled from the view's `labels` (prefix → template), which
|
|
15
|
+
* the server's read fills from that catalog — never from a request.
|
|
16
|
+
*/
|
|
17
|
+
/** The last segment that names a record's templated label. */
|
|
18
|
+
export const LABEL_SEGMENT = '$label';
|
|
19
|
+
const MASK_MARK = '|masked';
|
|
20
|
+
/* Or its words: `{token|words:…}`, the column's display rule (`values`,
|
|
21
|
+
`humanize`, a vocabulary's words) reaching the name the way it reaches a
|
|
22
|
+
cell, so a visit is "Ada Park · Annual physical", not "… · annual
|
|
23
|
+
physical". The map is URI-encoded JSON, so no brace or bar in a word
|
|
24
|
+
ends the field early. */
|
|
25
|
+
const WORDS_MARK = '|words:';
|
|
26
|
+
/** Whether an authored record label is a template rather than a path. */
|
|
27
|
+
export const isLabelTemplate = (text) => typeof text === 'string' && text.includes('{');
|
|
28
|
+
/** The prefix a `$label` path hangs off ('' for the base's own), or undefined for any other path. */
|
|
29
|
+
export function labelPrefix(path) {
|
|
30
|
+
if (path === LABEL_SEGMENT)
|
|
31
|
+
return '';
|
|
32
|
+
return path.endsWith(`.${LABEL_SEGMENT}`) ? path.slice(0, -LABEL_SEGMENT.length - 1) : undefined;
|
|
33
|
+
}
|
|
34
|
+
/* Literal text is written into the statement as a quoted string, so it is
|
|
35
|
+
held to what every engine reads the same way inside quotes: no backslash
|
|
36
|
+
(some engines' escape), no control characters. A quote is doubled when written. */
|
|
37
|
+
const unsafe = (character) => character === '\\' || character.charCodeAt(0) < 0x20 || character.charCodeAt(0) === 0x7f;
|
|
38
|
+
const FIELD = /^[A-Za-z_$][\w$]*(?:\+[A-Za-z_$][\w$]*)*(?:\.[A-Za-z_$][\w$]*(?:\+[A-Za-z_$][\w$]*)*)*$/;
|
|
39
|
+
/** A template's parts, or why it is not one. */
|
|
40
|
+
export function parseLabelTemplate(template) {
|
|
41
|
+
/* The author's length: the words the server marks a field with are not theirs. */
|
|
42
|
+
if (template.replace(/\|words:[^}]*/g, '').length > 200)
|
|
43
|
+
return { problem: 'a record label template is at most 200 characters.' };
|
|
44
|
+
const parts = [];
|
|
45
|
+
const paths = [];
|
|
46
|
+
let rest = template;
|
|
47
|
+
while (rest) {
|
|
48
|
+
const open = rest.indexOf('{');
|
|
49
|
+
const close = rest.indexOf('}');
|
|
50
|
+
if (close !== -1 && (open === -1 || close < open))
|
|
51
|
+
return { problem: `"${template}" has a "}" with no "{" before it.` };
|
|
52
|
+
if (open === -1) {
|
|
53
|
+
parts.push({ text: rest });
|
|
54
|
+
break;
|
|
55
|
+
}
|
|
56
|
+
if (open > 0)
|
|
57
|
+
parts.push({ text: rest.slice(0, open) });
|
|
58
|
+
const end = rest.indexOf('}', open);
|
|
59
|
+
if (end === -1)
|
|
60
|
+
return { problem: `"${template}" opens a "{" it never closes.` };
|
|
61
|
+
let field = rest.slice(open + 1, end);
|
|
62
|
+
let words;
|
|
63
|
+
const worded = field.indexOf(WORDS_MARK);
|
|
64
|
+
if (worded !== -1) {
|
|
65
|
+
words = readWords(field.slice(worded + WORDS_MARK.length));
|
|
66
|
+
if (!words)
|
|
67
|
+
return { problem: `"{${field}}" in "${template}" is not a column or a reference path, like {id} or {customer_id.name}.` };
|
|
68
|
+
field = field.slice(0, worded);
|
|
69
|
+
}
|
|
70
|
+
const marked = field.indexOf(MASK_MARK);
|
|
71
|
+
const path = (marked === -1 ? field : field.slice(0, marked)).trim();
|
|
72
|
+
const after = marked === -1 ? undefined : field.slice(marked + MASK_MARK.length);
|
|
73
|
+
if (!FIELD.test(path) || path.split('.').includes(LABEL_SEGMENT) || (after !== undefined && after !== '' && !after.startsWith(':'))) {
|
|
74
|
+
return { problem: `"{${field}}" in "${template}" is not a column or a reference path, like {id} or {customer_id.name}.` };
|
|
75
|
+
}
|
|
76
|
+
parts.push({ path, ...(after === undefined ? {} : { mask: after ? { prefix: after.slice(1) } : {} }), ...(words ? { words } : {}) });
|
|
77
|
+
paths.push(path);
|
|
78
|
+
rest = rest.slice(end + 1);
|
|
79
|
+
}
|
|
80
|
+
if (!paths.length)
|
|
81
|
+
return { problem: `"${template}" names no column; put one in braces, like "PO-{id}".` };
|
|
82
|
+
for (const part of parts) {
|
|
83
|
+
if ('text' in part && [...part.text].some(unsafe)) {
|
|
84
|
+
return { problem: `"${template}" holds a backslash or a control character, which a record label cannot.` };
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
return { parts, paths };
|
|
88
|
+
}
|
|
89
|
+
/* A words map as a field carries it, or undefined when it is not one: every
|
|
90
|
+
key and word a string every engine reads alike inside quotes. */
|
|
91
|
+
function readWords(encoded) {
|
|
92
|
+
let map;
|
|
93
|
+
try {
|
|
94
|
+
map = JSON.parse(decodeURIComponent(encoded));
|
|
95
|
+
}
|
|
96
|
+
catch {
|
|
97
|
+
return undefined;
|
|
98
|
+
}
|
|
99
|
+
if (!map || typeof map !== 'object' || Array.isArray(map))
|
|
100
|
+
return undefined;
|
|
101
|
+
const entries = Object.entries(map);
|
|
102
|
+
if (!entries.length || entries.some(([key, word]) => typeof word !== 'string' || [...key, ...word].some(unsafe)))
|
|
103
|
+
return undefined;
|
|
104
|
+
return Object.fromEntries(entries);
|
|
105
|
+
}
|
|
106
|
+
/** A template field for a path whose stored values are said as words, as the server writes it into a served template. */
|
|
107
|
+
export const wordedField = (path, words) => `{${path}${WORDS_MARK}${encodeURIComponent(JSON.stringify(words))}}`;
|
|
108
|
+
/** A template field for a masked path, as the server writes it into a served template. */
|
|
109
|
+
export const maskedField = (path, prefix) => `{${path}${MASK_MARK}${prefix ? `:${prefix}` : ''}}`;
|
|
110
|
+
/** Whether an authored template writes a mask itself: that is the column's display rule's to say. */
|
|
111
|
+
export const writesMask = (template) => template.includes(MASK_MARK) || template.includes(WORDS_MARK);
|
|
112
|
+
/**
|
|
113
|
+
* The name a record with no name of its own is given: its noun and its key,
|
|
114
|
+
* "Purchase order #3", rather than the bare key a title and a breadcrumb
|
|
115
|
+
* used to show. One key column only: a composite key is not one number.
|
|
116
|
+
*/
|
|
117
|
+
export function nounTemplate(noun, key) {
|
|
118
|
+
const word = [...noun]
|
|
119
|
+
.filter((character) => character !== '{' && character !== '}' && !unsafe(character))
|
|
120
|
+
.join('')
|
|
121
|
+
.trim() || 'Record';
|
|
122
|
+
return `${word.charAt(0).toUpperCase()}${word.slice(1)} #{${key}}`;
|
|
123
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How a composed record page's answers are matched to the requests they
|
|
3
|
+
* answer (shared/recordReads.ts, client/composedReads.ts): one text per
|
|
4
|
+
* request, and the record's own row answered a part at a time. Imports
|
|
5
|
+
* nothing, so the client's request path carries no more than this.
|
|
6
|
+
*/
|
|
7
|
+
/** A value as one text, its object keys in order: two requests built alike are one request. */
|
|
8
|
+
export declare function canonicalText(value: unknown): string;
|
|
9
|
+
/** A read of the record's own row, as `rowBody` builds it: its base, its filter and its columns; otherwise undefined. */
|
|
10
|
+
export declare function rowRead(body: Record<string, unknown>): {
|
|
11
|
+
base: string;
|
|
12
|
+
filter: string;
|
|
13
|
+
columns: string[];
|
|
14
|
+
} | undefined;
|
|
15
|
+
interface RowReply {
|
|
16
|
+
view: {
|
|
17
|
+
columns: Array<{
|
|
18
|
+
path: string;
|
|
19
|
+
}>;
|
|
20
|
+
} & Record<string, unknown>;
|
|
21
|
+
columns: string[];
|
|
22
|
+
rows: Array<Record<string, unknown>>;
|
|
23
|
+
resolved?: Array<{
|
|
24
|
+
path: string;
|
|
25
|
+
name?: string;
|
|
26
|
+
}>;
|
|
27
|
+
}
|
|
28
|
+
/** Exactly what a read of some of the row's columns would have been answered alone: its columns, their descriptions, its values. */
|
|
29
|
+
export declare function rowPart<T extends RowReply>(reply: T, columns: readonly string[]): T;
|
|
30
|
+
export {};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How a composed record page's answers are matched to the requests they
|
|
3
|
+
* answer (shared/recordReads.ts, client/composedReads.ts): one text per
|
|
4
|
+
* request, and the record's own row answered a part at a time. Imports
|
|
5
|
+
* nothing, so the client's request path carries no more than this.
|
|
6
|
+
*/
|
|
7
|
+
/** A value as one text, its object keys in order: two requests built alike are one request. */
|
|
8
|
+
export function canonicalText(value) {
|
|
9
|
+
return JSON.stringify(value, (_key, item) => item && typeof item === 'object' && !Array.isArray(item)
|
|
10
|
+
? Object.fromEntries(Object.entries(item).sort(([a], [b]) => (a < b ? -1 : a > b ? 1 : 0)))
|
|
11
|
+
: item);
|
|
12
|
+
}
|
|
13
|
+
/** A read of the record's own row, as `rowBody` builds it: its base, its filter and its columns; otherwise undefined. */
|
|
14
|
+
export function rowRead(body) {
|
|
15
|
+
const keys = Object.keys(body).sort().join(',');
|
|
16
|
+
if (keys !== 'count,view' || body.count !== 'none')
|
|
17
|
+
return undefined;
|
|
18
|
+
const view = body.view;
|
|
19
|
+
if (!view ||
|
|
20
|
+
typeof view !== 'object' ||
|
|
21
|
+
typeof view.id !== 'string' ||
|
|
22
|
+
!view.id.startsWith('page:') ||
|
|
23
|
+
typeof view.base !== 'string' ||
|
|
24
|
+
view.limit !== 1 ||
|
|
25
|
+
!Array.isArray(view.columns) ||
|
|
26
|
+
Object.keys(view).sort().join(',') !== 'base,columns,filter,id,limit,name')
|
|
27
|
+
return undefined;
|
|
28
|
+
const columns = [];
|
|
29
|
+
for (const column of view.columns) {
|
|
30
|
+
if (!column ||
|
|
31
|
+
typeof column !== 'object' ||
|
|
32
|
+
Object.keys(column).join(',') !== 'path' ||
|
|
33
|
+
typeof column.path !== 'string')
|
|
34
|
+
return undefined;
|
|
35
|
+
columns.push(column.path);
|
|
36
|
+
}
|
|
37
|
+
return { base: view.base, filter: canonicalText(view.filter), columns };
|
|
38
|
+
}
|
|
39
|
+
/** Exactly what a read of some of the row's columns would have been answered alone: its columns, their descriptions, its values. */
|
|
40
|
+
export function rowPart(reply, columns) {
|
|
41
|
+
const asked = new Set(columns);
|
|
42
|
+
const resolved = reply.resolved?.filter((column) => asked.has(column.path));
|
|
43
|
+
const named = new Set(columns.map((path) => reply.resolved?.find((column) => column.path === path)?.name ?? path));
|
|
44
|
+
return {
|
|
45
|
+
...reply,
|
|
46
|
+
view: { ...reply.view, columns: reply.view.columns.filter((column) => asked.has(column.path)) },
|
|
47
|
+
columns: reply.columns.filter((name) => named.has(name)),
|
|
48
|
+
rows: reply.rows.map((row) => Object.fromEntries(Object.entries(row).filter(([name]) => named.has(name)))),
|
|
49
|
+
...(resolved ? { resolved } : {}),
|
|
50
|
+
};
|
|
51
|
+
}
|
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What a record page reads, as the requests its sections send.
|
|
3
|
+
*
|
|
4
|
+
* A record page used to reach its reader in three waves of requests — the
|
|
5
|
+
* root and the plan, then a request or two per section, then the history —
|
|
6
|
+
* and at 20 ms to the database each wave was a round of admissions and
|
|
7
|
+
* statements: a lender's loan finished at 0.9 s. The server now answers the
|
|
8
|
+
* whole page in one request (server/http/recordCompose.ts, and the tenant
|
|
9
|
+
* host's own): it plans the page, then asks each section's read on the
|
|
10
|
+
* section's behalf, through the same route and the same grants as the
|
|
11
|
+
* section's own request, and hands every answer back beside the plan. The
|
|
12
|
+
* client keeps them for the requests they answer (client/composedReads.ts),
|
|
13
|
+
* and a section that asks finds its answer waiting.
|
|
14
|
+
*
|
|
15
|
+
* So the one rule is that server and client build each request alike, and
|
|
16
|
+
* the builders live here, used by both: the sections' own modules call them
|
|
17
|
+
* for the request they send, and the server calls them to know what the
|
|
18
|
+
* sections will ask. A request built differently is only asked again — the
|
|
19
|
+
* section sends it, as it always did — so a drift costs a request, never a
|
|
20
|
+
* wrong answer.
|
|
21
|
+
*
|
|
22
|
+
* The record's own row is the one read that is not asked alike: every fields
|
|
23
|
+
* section, the header, the root probe and a custom section's record fields
|
|
24
|
+
* read the one row, each for its columns, and which of them ask together
|
|
25
|
+
* depends on what is drawn (a tab not yet opened asks nothing). The server
|
|
26
|
+
* reads every column any of them names, once, and each is answered with
|
|
27
|
+
* exactly its part (`rowPart`), as the client's own shared read already was
|
|
28
|
+
* (pageFieldsRead.ts).
|
|
29
|
+
*/
|
|
30
|
+
import { type DatabaseSchema, type TableMeta } from './schema.js';
|
|
31
|
+
import { type PageSection } from './pageModel.js';
|
|
32
|
+
import type { HttpBreakdownDefinition, HttpFilter } from './resourceHttp.js';
|
|
33
|
+
import { type AppTarget } from './appLinks.js';
|
|
34
|
+
/** The route a record page is composed on. */
|
|
35
|
+
export declare const RECORD_COMPOSE_PATH = "/api/pages/compose";
|
|
36
|
+
/** Where a table's rows are named, as the reader's App says it (`recordLabel`, false where it is withheld). */
|
|
37
|
+
export interface RecordReadNames {
|
|
38
|
+
readonly schema: DatabaseSchema;
|
|
39
|
+
/** Reads in an App's words: references carry their record's name, lists their keys. */
|
|
40
|
+
readonly app: boolean;
|
|
41
|
+
readonly recordLabel: (tableId: string) => string | false | undefined;
|
|
42
|
+
/** Where a table's rows are named, where the reader already knows (the client's labelPath, which is this rule over the same three). */
|
|
43
|
+
readonly namePath?: (table: TableMeta) => string | undefined;
|
|
44
|
+
/** A table by id, where the reader already holds it (the client's findTable, over the same schema). */
|
|
45
|
+
readonly table?: (id: string) => TableMeta | undefined;
|
|
46
|
+
/** A table's row-defined JSON columns (`resources.<r>.defined`): a section showing one also reads its `per`. */
|
|
47
|
+
readonly defined?: (tableId: string) => Readonly<Record<string, {
|
|
48
|
+
per?: string;
|
|
49
|
+
}>> | undefined;
|
|
50
|
+
}
|
|
51
|
+
/** The parts of a section its reads are built from (client pageModel.ts PageSection, shared page.ts). */
|
|
52
|
+
export interface ReadSection {
|
|
53
|
+
readonly kind: PageSection['kind'];
|
|
54
|
+
readonly hidden?: boolean;
|
|
55
|
+
readonly emptyMode?: 'hide' | 'collapse';
|
|
56
|
+
/** A grouped related list reads its groups, then each group's rows (the rows wait on the groups). */
|
|
57
|
+
readonly group?: unknown;
|
|
58
|
+
readonly presentation?: unknown;
|
|
59
|
+
readonly paths?: readonly string[];
|
|
60
|
+
readonly status?: string;
|
|
61
|
+
readonly subfigure?: string;
|
|
62
|
+
readonly was?: string;
|
|
63
|
+
readonly actions?: ReadonlyArray<{
|
|
64
|
+
readonly prefill?: Readonly<Record<string, string>>;
|
|
65
|
+
readonly to?: AppTarget;
|
|
66
|
+
}>;
|
|
67
|
+
readonly names?: boolean;
|
|
68
|
+
readonly workflow?: {
|
|
69
|
+
readonly field: string;
|
|
70
|
+
};
|
|
71
|
+
readonly from?: string;
|
|
72
|
+
readonly limit?: number;
|
|
73
|
+
readonly record?: readonly string[];
|
|
74
|
+
readonly when?: string;
|
|
75
|
+
readonly region?: string;
|
|
76
|
+
readonly tab?: string;
|
|
77
|
+
readonly title?: string;
|
|
78
|
+
readonly width?: unknown;
|
|
79
|
+
}
|
|
80
|
+
/** A planned view, as the server builds it (ViewDef) or the client reads it off the wire (HttpViewDefinition). */
|
|
81
|
+
interface ReadView {
|
|
82
|
+
readonly base: string;
|
|
83
|
+
readonly columns?: ReadonlyArray<{
|
|
84
|
+
readonly path: string;
|
|
85
|
+
readonly alias?: string;
|
|
86
|
+
}>;
|
|
87
|
+
readonly filter?: unknown;
|
|
88
|
+
readonly limit?: number;
|
|
89
|
+
}
|
|
90
|
+
/** The parts of a section's plan its reads are built from (pagePlans.ts). */
|
|
91
|
+
export interface ReadPlan<V extends ReadView = ReadView> {
|
|
92
|
+
readonly index: number;
|
|
93
|
+
readonly error?: string;
|
|
94
|
+
readonly empty?: boolean;
|
|
95
|
+
readonly view?: V;
|
|
96
|
+
readonly counts?: boolean;
|
|
97
|
+
readonly totals?: HttpBreakdownDefinition;
|
|
98
|
+
readonly groups?: HttpBreakdownDefinition;
|
|
99
|
+
readonly breakdown?: HttpBreakdownDefinition;
|
|
100
|
+
readonly streams?: ReadonlyArray<TimelineReadStream<V>>;
|
|
101
|
+
readonly reads?: Readonly<Record<string, {
|
|
102
|
+
readonly error?: string;
|
|
103
|
+
readonly empty?: boolean;
|
|
104
|
+
readonly view?: V;
|
|
105
|
+
}>>;
|
|
106
|
+
/** A custom section's aggregate reads, each a breakdown. */
|
|
107
|
+
readonly aggregates?: Readonly<Record<string, {
|
|
108
|
+
readonly error?: string;
|
|
109
|
+
readonly empty?: boolean;
|
|
110
|
+
readonly breakdown?: HttpBreakdownDefinition;
|
|
111
|
+
}>>;
|
|
112
|
+
}
|
|
113
|
+
/** A timeline stream's plan, as far as its reads go (pagePlans.ts): its table, its author, its rows and its far side. */
|
|
114
|
+
interface TimelineReadStream<V extends ReadView = ReadView> {
|
|
115
|
+
readonly error?: string;
|
|
116
|
+
readonly empty?: boolean;
|
|
117
|
+
readonly from?: string;
|
|
118
|
+
readonly by?: string;
|
|
119
|
+
readonly view?: V;
|
|
120
|
+
readonly key?: readonly string[];
|
|
121
|
+
readonly side?: {
|
|
122
|
+
readonly error?: string;
|
|
123
|
+
readonly view?: V;
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* A timeline stream's reads, as its section asks them (kit PageTimeline.tsx): its rows, where its author is a
|
|
128
|
+
* reference with the person's name beside it, read through the reference as a list column of it is; and where the
|
|
129
|
+
* stream has a far side, that side's rows. One rule for the section and the page's planned reads (`recordReads`),
|
|
130
|
+
* so a composed page's answer is the very read the section asks: a record page whose timeline was planned without
|
|
131
|
+
* the author's name asked it again, alone, once the page had drawn (a field report: a fifth round on a record).
|
|
132
|
+
*/
|
|
133
|
+
export declare function timelineReads<V extends ReadView>(names: {
|
|
134
|
+
readonly table: (id: string) => TableMeta | undefined;
|
|
135
|
+
readonly namePath: (table: TableMeta) => string | undefined;
|
|
136
|
+
}, stream: TimelineReadStream<V>): {
|
|
137
|
+
view: V;
|
|
138
|
+
side?: V;
|
|
139
|
+
} | undefined;
|
|
140
|
+
/** One request, as a section sends it: its route and its body, without the owner the transport adds. */
|
|
141
|
+
export interface ReadAsk {
|
|
142
|
+
readonly path: string;
|
|
143
|
+
readonly body: Record<string, unknown>;
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* The fields a section shows when it names none. In the Workbench, every
|
|
147
|
+
* column: it is the database as it is. In an App, every column a reader
|
|
148
|
+
* reads — not a key the database handed out (a lone numeric or uuid primary
|
|
149
|
+
* key, which opened a lead on "ID 2") and not a row version, the same two
|
|
150
|
+
* the scaffold leaves out of the fields it writes (server/scaffold.ts).
|
|
151
|
+
*/
|
|
152
|
+
export declare function defaultFieldPaths(base: TableMeta, app: boolean): string[];
|
|
153
|
+
/** A fields section's columns: what it shows, the names of what it references, the record's name, and its workflow's field. */
|
|
154
|
+
export declare function fieldsColumns(names: RecordReadNames, base: TableMeta, section: ReadSection): {
|
|
155
|
+
fetched: string[];
|
|
156
|
+
labels: Map<string, string>;
|
|
157
|
+
};
|
|
158
|
+
/**
|
|
159
|
+
* The row-defined column a fields path ends on (`resources.<r>.defined`):
|
|
160
|
+
* the record's own (`specs`) or one through references
|
|
161
|
+
* (`requested_item_id.answers`), with the table it lives on, the hops before
|
|
162
|
+
* it, and its binding. Undefined for any other path. A record shows the
|
|
163
|
+
* column's fields wherever its path is shown, not only on its own page.
|
|
164
|
+
*/
|
|
165
|
+
export declare function definedThrough<B extends {
|
|
166
|
+
per?: string;
|
|
167
|
+
}>(schema: DatabaseSchema, baseId: string, path: string, defined: (tableId: string) => Readonly<Record<string, B>> | undefined): {
|
|
168
|
+
table: TableMeta;
|
|
169
|
+
column: string;
|
|
170
|
+
prefix: string;
|
|
171
|
+
binding: B;
|
|
172
|
+
} | undefined;
|
|
173
|
+
/** A record header's columns: its status, its facts, the names of what they reference, and the record's name. */
|
|
174
|
+
export declare function headerColumns(names: RecordReadNames, base: TableMeta, section: ReadSection): {
|
|
175
|
+
fetched: string[];
|
|
176
|
+
labels: Map<string, string>;
|
|
177
|
+
};
|
|
178
|
+
/** A read of the record's own row, for columns: the probe (`root`), a fields section (`fields`), the header (`header`), a custom section's record (`<index>:record`). */
|
|
179
|
+
export declare function rowBody(pageId: string, base: TableMeta, key: Readonly<Record<string, unknown>>, columns: readonly string[], part: string): {
|
|
180
|
+
count: 'none';
|
|
181
|
+
view: {
|
|
182
|
+
id: string;
|
|
183
|
+
name: string;
|
|
184
|
+
base: string;
|
|
185
|
+
columns: {
|
|
186
|
+
path: string;
|
|
187
|
+
}[];
|
|
188
|
+
filter: HttpFilter<"path">;
|
|
189
|
+
limit: 1;
|
|
190
|
+
};
|
|
191
|
+
};
|
|
192
|
+
/** A related list's first request: its planned view at the reader's page size, with the names and keys a row needs. */
|
|
193
|
+
export declare function listView<V extends ReadView>(names: RecordReadNames, section: ReadSection, plan: ReadPlan<V>, rows: number): {
|
|
194
|
+
view: (V & {
|
|
195
|
+
columns: {
|
|
196
|
+
path: string;
|
|
197
|
+
alias?: string;
|
|
198
|
+
}[];
|
|
199
|
+
}) | undefined;
|
|
200
|
+
labelColumns: Record<string, string>;
|
|
201
|
+
hidden: string[];
|
|
202
|
+
keyColumns: Array<{
|
|
203
|
+
column: string;
|
|
204
|
+
index: number;
|
|
205
|
+
}>;
|
|
206
|
+
labelColumn: {
|
|
207
|
+
path: string;
|
|
208
|
+
index: number;
|
|
209
|
+
} | undefined;
|
|
210
|
+
};
|
|
211
|
+
/** A grouped list's page of groups, as `/api/breakdown` takes it: the request the page's compose asks and the list asks again. */
|
|
212
|
+
export declare function groupsBody(groups: HttpBreakdownDefinition, offset: number): {
|
|
213
|
+
def: HttpBreakdownDefinition;
|
|
214
|
+
limit: number | undefined;
|
|
215
|
+
offset: number;
|
|
216
|
+
};
|
|
217
|
+
/** A metric's measure: a count asked as a breakdown with no key, or the plan's own breakdown; none for a plain aggregate. */
|
|
218
|
+
export declare function metricMeasure(plan: ReadPlan<ReadView>): HttpBreakdownDefinition | undefined;
|
|
219
|
+
/** Whether the record satisfies a `when`: one bounded query, key and condition composed the way every fold is. */
|
|
220
|
+
export declare function whenBody(base: TableMeta, key: Readonly<Record<string, unknown>>, when: string): {
|
|
221
|
+
q: string;
|
|
222
|
+
limit: number;
|
|
223
|
+
offset: number;
|
|
224
|
+
count: 'none';
|
|
225
|
+
};
|
|
226
|
+
/** The first page of a record's history. */
|
|
227
|
+
export declare function historyBody(base: TableMeta, key: Readonly<Record<string, unknown>>, limit: number): {
|
|
228
|
+
table: string;
|
|
229
|
+
key: Readonly<Record<string, unknown>>;
|
|
230
|
+
limit: number;
|
|
231
|
+
};
|
|
232
|
+
/**
|
|
233
|
+
* The sections a page draws when it opens on `tab`, as PageSections.tsx lays
|
|
234
|
+
* them out: a strip of named tabs draws the one asked for (the first, when
|
|
235
|
+
* none is) and every panel holding the record's own fields; a run of lists
|
|
236
|
+
* made into tabs draws the one asked for; everything else is drawn. The
|
|
237
|
+
* header is drawn in the head. What a closed tab would read is read when it
|
|
238
|
+
* is opened, as ever, and asked for nothing here.
|
|
239
|
+
*/
|
|
240
|
+
export declare function drawnSections(schema: DatabaseSchema, page: {
|
|
241
|
+
sections: readonly ReadSection[];
|
|
242
|
+
listTabs?: boolean;
|
|
243
|
+
}, tab: string | undefined, appPage: boolean): Set<number>;
|
|
244
|
+
/**
|
|
245
|
+
* Every read a record page's sections will ask for when it opens on `tab`,
|
|
246
|
+
* given its plan: the record's row (every column any section drawn reads),
|
|
247
|
+
* and each other request as the section builds it. A hidden section, and
|
|
248
|
+
* one in a closed tab, reads nothing; a section behind a `when` is read
|
|
249
|
+
* too, and its condition asked, since the answer is only kept until it is
|
|
250
|
+
* asked for.
|
|
251
|
+
*/
|
|
252
|
+
export declare function recordPageReads(names: RecordReadNames, page: {
|
|
253
|
+
id: string;
|
|
254
|
+
sections: readonly ReadSection[];
|
|
255
|
+
listTabs?: boolean;
|
|
256
|
+
}, base: TableMeta, plans: readonly ReadPlan[], key: Readonly<Record<string, unknown>>, options: {
|
|
257
|
+
rows: number;
|
|
258
|
+
history: boolean;
|
|
259
|
+
tab?: string;
|
|
260
|
+
}): {
|
|
261
|
+
row: string[];
|
|
262
|
+
parts: Array<{
|
|
263
|
+
part: string;
|
|
264
|
+
columns: string[];
|
|
265
|
+
}>;
|
|
266
|
+
reads: ReadAsk[];
|
|
267
|
+
};
|
|
268
|
+
export {};
|