@cosmicdrift/kumiko-framework 0.368.0 → 0.370.0
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/AGENTS.md +14 -1
- package/agents/examples/apex-surface-auth.md +2 -1
- package/agents/examples/app-config.md +98 -0
- package/agents/examples/auth-mfa.md +72 -0
- package/agents/examples/compose-stacks.md +188 -0
- package/agents/examples/env-composition.md +268 -0
- package/agents/examples/host-routing.md +181 -0
- package/agents/examples/legal-pages.md +52 -3
- package/agents/examples/managed-config.md +1 -0
- package/agents/examples/managed-pages.md +1 -0
- package/agents/examples/prod-boot-options.md +180 -0
- package/agents/examples/relations.md +4 -0
- package/agents/examples/secrets-demo.md +4 -2
- package/agents/examples/security-baseline.md +20 -17
- package/agents/examples.md +6 -1
- package/agents/features.md +17 -5
- package/dist/api/anonymous-cookie.d.ts +1 -1
- package/dist/api/anonymous-live-entities.d.ts +1 -1
- package/dist/api/auth-middleware.d.ts +2 -2
- package/dist/api/auth-routes.d.ts +7 -7
- package/dist/api/extra-route.d.ts +2 -2
- package/dist/api/index.d.ts +37 -37
- package/dist/api/jwt.d.ts +1 -1
- package/dist/api/observability-middleware.d.ts +1 -1
- package/dist/api/readiness.d.ts +1 -1
- package/dist/api/redis-sse-broker.d.ts +2 -2
- package/dist/api/request-context.d.ts +1 -1
- package/dist/api/request-id-middleware.d.ts +3 -3
- package/dist/api/route-registrars.d.ts +4 -4
- package/dist/api/routes.d.ts +1 -1
- package/dist/api/server.d.ts +16 -16
- package/dist/api/sse-broker.d.ts +1 -1
- package/dist/api/sse-route.d.ts +1 -1
- package/dist/api/websocket-route.d.ts +3 -3
- package/dist/auth/index.d.ts +2 -2
- package/dist/compliance/duration-spec.d.ts +2 -2
- package/dist/compliance/index.d.ts +6 -6
- package/dist/compliance/profiles.d.ts +1 -1
- package/dist/config/index.d.ts +44 -0
- package/dist/config/index.js +61 -0
- package/dist/crypto/blind-index.d.ts +1 -1
- package/dist/crypto/event-pii.d.ts +1 -1
- package/dist/crypto/in-memory-kms-adapter.d.ts +1 -1
- package/dist/crypto/index.d.ts +11 -11
- package/dist/crypto/is-self-pii-field.d.ts +1 -1
- package/dist/crypto/kms-wiring.d.ts +2 -2
- package/dist/crypto/owner-transition-rekey.d.ts +1 -1
- package/dist/crypto/pg-kms-adapter.d.ts +1 -1
- package/dist/crypto/pii-field-encryption.d.ts +4 -4
- package/dist/crypto/request-kms-cache.d.ts +1 -1
- package/dist/crypto/subject-resolver.d.ts +3 -3
- package/dist/db/apply-entity-event.d.ts +4 -4
- package/dist/db/assert-exists-in.d.ts +4 -4
- package/dist/db/blind-index-cleanup.d.ts +2 -2
- package/dist/db/collect-table-metas.d.ts +2 -2
- package/dist/db/compound-types.d.ts +1 -1
- package/dist/db/config-seed.d.ts +5 -5
- package/dist/db/connection.d.ts +1 -6
- package/dist/db/connection.js +15 -4
- package/dist/db/dialect.d.ts +1 -1
- package/dist/db/eagerload.d.ts +3 -3
- package/dist/db/entity-field-encryption.d.ts +3 -3
- package/dist/db/entity-field-encryption.js +3 -1
- package/dist/db/entity-table-from-registry.d.ts +3 -3
- package/dist/db/entity-table-meta.d.ts +3 -3
- package/dist/db/event-store-executor-context.d.ts +9 -9
- package/dist/db/event-store-executor-read.d.ts +2 -2
- package/dist/db/event-store-executor-write.d.ts +2 -2
- package/dist/db/event-store-executor.d.ts +8 -8
- package/dist/db/feature-table-sources.d.ts +1 -1
- package/dist/db/index.d.ts +39 -39
- package/dist/db/located-timestamp.d.ts +1 -1
- package/dist/db/lock-guard.d.ts +2 -2
- package/dist/db/migrate-generator.d.ts +2 -2
- package/dist/db/migrate-runner.d.ts +1 -1
- package/dist/db/money.d.ts +1 -1
- package/dist/db/parent-ref-clause.d.ts +4 -4
- package/dist/db/projection-registry-binding.d.ts +1 -1
- package/dist/db/queries/advisory-lock.d.ts +1 -1
- package/dist/db/queries/backfill-pii.d.ts +2 -2
- package/dist/db/queries/ddl.d.ts +1 -1
- package/dist/db/queries/entity-read.d.ts +1 -1
- package/dist/db/queries/es-ops.d.ts +1 -1
- package/dist/db/queries/event-consumer.d.ts +2 -2
- package/dist/db/queries/event-store-admin.d.ts +1 -1
- package/dist/db/queries/event-store-transfer.d.ts +1 -1
- package/dist/db/queries/event-store.d.ts +1 -1
- package/dist/db/queries/pii-backfill-state.d.ts +1 -1
- package/dist/db/queries/projection-rebuild.d.ts +1 -1
- package/dist/db/queries/raw-sql.d.ts +1 -1
- package/dist/db/queries/seed-context.d.ts +2 -2
- package/dist/db/queries/shadow-swap.d.ts +3 -3
- package/dist/db/queries/table-ops.d.ts +1 -1
- package/dist/db/queries/test-stack.d.ts +2 -2
- package/dist/db/query.d.ts +3 -3
- package/dist/db/rebuild-marker.d.ts +1 -1
- package/dist/db/reference-data.d.ts +3 -3
- package/dist/db/render-ddl.d.ts +1 -1
- package/dist/db/replay-migration-sql.d.ts +1 -1
- package/dist/db/retired-framework-tables.d.ts +1 -1
- package/dist/db/schema-inspection.d.ts +1 -1
- package/dist/db/table-builder.d.ts +4 -4
- package/dist/db/table-push.d.ts +3 -3
- package/dist/db/tenant-db-runner.d.ts +2 -2
- package/dist/db/tenant-db.d.ts +7 -9
- package/dist/db/tenant-db.js +2 -12
- package/dist/derivatives/derivatives-context.d.ts +3 -3
- package/dist/derivatives/field-variants.d.ts +1 -1
- package/dist/derivatives/index.d.ts +6 -6
- package/dist/engine/access.d.ts +1 -1
- package/dist/engine/active-membership.d.ts +2 -2
- package/dist/engine/boot-validator/access-declarations.d.ts +1 -1
- package/dist/engine/boot-validator/access-roles.d.ts +1 -1
- package/dist/engine/boot-validator/action-wiring.d.ts +1 -1
- package/dist/engine/boot-validator/api-ext.d.ts +1 -1
- package/dist/engine/boot-validator/boot-check.d.ts +1 -1
- package/dist/engine/boot-validator/card-meta-overflow.d.ts +1 -1
- package/dist/engine/boot-validator/config-deps.d.ts +1 -1
- package/dist/engine/boot-validator/detail-screens.d.ts +2 -2
- package/dist/engine/boot-validator/entity-handler.d.ts +1 -1
- package/dist/engine/boot-validator/entity-list-screens.d.ts +1 -1
- package/dist/engine/boot-validator/gdpr-storage.d.ts +1 -1
- package/dist/engine/boot-validator/global-tenancy.d.ts +1 -1
- package/dist/engine/boot-validator/handler-field-references.d.ts +1 -1
- package/dist/engine/boot-validator/i18n-keys.d.ts +1 -1
- package/dist/engine/boot-validator/index.d.ts +7 -7
- package/dist/engine/boot-validator/nav.d.ts +1 -1
- package/dist/engine/boot-validator/ownership.d.ts +2 -2
- package/dist/engine/boot-validator/parent-ref.d.ts +1 -1
- package/dist/engine/boot-validator/pii-retention.d.ts +2 -2
- package/dist/engine/boot-validator/projection-list-screens.d.ts +1 -1
- package/dist/engine/boot-validator/query-output-columns.d.ts +1 -1
- package/dist/engine/boot-validator/query-refs.d.ts +1 -1
- package/dist/engine/boot-validator/record-owned.d.ts +1 -1
- package/dist/engine/boot-validator/screens.d.ts +2 -2
- package/dist/engine/boot-validator/screens.js +29 -0
- package/dist/engine/boot-validator/security-baseline.d.ts +1 -1
- package/dist/engine/boot-validator/selector-owner-panels.d.ts +1 -1
- package/dist/engine/boot-validator/transfer-graph.d.ts +2 -2
- package/dist/engine/boot-validator/url-prefill-fields.d.ts +1 -1
- package/dist/engine/boot-validator/workspaces.d.ts +1 -1
- package/dist/engine/boot-validator.d.ts +1 -1
- package/dist/engine/bridge-stub.d.ts +1 -1
- package/dist/engine/build-app-schema.d.ts +2 -2
- package/dist/engine/build-config-feature-schema.d.ts +5 -5
- package/dist/engine/build-config-feature-schema.js +197 -65
- package/dist/engine/build-target.d.ts +2 -2
- package/dist/engine/changeset-changes.d.ts +1 -1
- package/dist/engine/codemod/index.d.ts +2 -2
- package/dist/engine/config-helpers.d.ts +1 -1
- package/dist/engine/constants.d.ts +1 -1
- package/dist/engine/create-app.d.ts +2 -2
- package/dist/engine/cross-tenant.d.ts +2 -2
- package/dist/engine/dedupe-features.d.ts +1 -1
- package/dist/engine/define-feature.d.ts +1 -1
- package/dist/engine/define-feature.js +2 -2
- package/dist/engine/define-handler.d.ts +4 -4
- package/dist/engine/define-step.d.ts +1 -1
- package/dist/engine/define-workflow.d.ts +2 -2
- package/dist/engine/effective-features.d.ts +1 -1
- package/dist/engine/embedded-derived.d.ts +1 -1
- package/dist/engine/entity-handlers.d.ts +6 -5
- package/dist/engine/entity-handlers.js +6 -3
- package/dist/engine/event-def.d.ts +15 -0
- package/dist/engine/event-def.js +123 -0
- package/dist/engine/event-helpers.d.ts +1 -1
- package/dist/engine/extension-names.d.ts +8 -8
- package/dist/engine/extension-selector-plugins.d.ts +4 -1
- package/dist/engine/extension-selector-plugins.js +14 -0
- package/dist/engine/extensions/escape-hatch-usage.d.ts +1 -1
- package/dist/engine/extensions/storage-provider.d.ts +1 -1
- package/dist/engine/extensions/tenant-data.d.ts +3 -3
- package/dist/engine/extensions/tenant-resource.d.ts +2 -2
- package/dist/engine/extensions/user-data.d.ts +2 -2
- package/dist/engine/factories.d.ts +1 -1
- package/dist/engine/feature-ast/extractors/ai-steps.d.ts +2 -2
- package/dist/engine/feature-ast/extractors/events.d.ts +2 -2
- package/dist/engine/feature-ast/extractors/handlers.d.ts +4 -4
- package/dist/engine/feature-ast/extractors/hooks.d.ts +5 -5
- package/dist/engine/feature-ast/extractors/index.d.ts +14 -14
- package/dist/engine/feature-ast/extractors/jobs-routes.d.ts +3 -3
- package/dist/engine/feature-ast/extractors/projections-screens.d.ts +3 -3
- package/dist/engine/feature-ast/extractors/round1.d.ts +2 -2
- package/dist/engine/feature-ast/extractors/round2.d.ts +2 -2
- package/dist/engine/feature-ast/extractors/round3.d.ts +4 -4
- package/dist/engine/feature-ast/extractors/round5.d.ts +2 -2
- package/dist/engine/feature-ast/extractors/round6.d.ts +2 -2
- package/dist/engine/feature-ast/extractors/shared.d.ts +2 -2
- package/dist/engine/feature-ast/index.d.ts +16 -16
- package/dist/engine/feature-ast/parse.d.ts +2 -2
- package/dist/engine/feature-ast/patch.d.ts +1 -1
- package/dist/engine/feature-ast/patcher.d.ts +15 -15
- package/dist/engine/feature-ast/pattern-change-schema.d.ts +10 -10
- package/dist/engine/feature-ast/patterns.d.ts +15 -15
- package/dist/engine/feature-ast/render.d.ts +1 -1
- package/dist/engine/feature-builder-state.d.ts +5 -5
- package/dist/engine/feature-config-events-jobs.d.ts +5 -3
- package/dist/engine/feature-config-events-jobs.js +9 -130
- package/dist/engine/feature-entity-handlers.d.ts +4 -4
- package/dist/engine/feature-entity-handlers.js +11 -5
- package/dist/engine/feature-manifest.d.ts +1 -1
- package/dist/engine/feature-ui-extensions.d.ts +7 -7
- package/dist/engine/feature-ui-extensions.js +2 -2
- package/dist/engine/field-access.d.ts +1 -1
- package/dist/engine/field-helpers.d.ts +1 -1
- package/dist/engine/handler-helpers.d.ts +1 -1
- package/dist/engine/index.d.ts +89 -88
- package/dist/engine/index.js +1 -0
- package/dist/engine/instruction-fields.d.ts +1 -1
- package/dist/engine/object-form.d.ts +1 -1
- package/dist/engine/object-form.js +5 -6
- package/dist/engine/ownership.d.ts +3 -3
- package/dist/engine/pattern-library/index.d.ts +2 -2
- package/dist/engine/pattern-library/library.d.ts +2 -2
- package/dist/engine/pattern-library/mixed-schemas.d.ts +1 -1
- package/dist/engine/pattern-library/opaque-schemas.d.ts +1 -1
- package/dist/engine/pattern-library/shared-fields.d.ts +1 -1
- package/dist/engine/pattern-library/static-schemas.d.ts +1 -1
- package/dist/engine/pattern-library/types.d.ts +1 -1
- package/dist/engine/personal-data-fields.d.ts +2 -2
- package/dist/engine/pipeline.d.ts +2 -2
- package/dist/engine/project-app-schema-for-roles.d.ts +1 -1
- package/dist/engine/projection-helpers.d.ts +4 -4
- package/dist/engine/read-claim.d.ts +1 -1
- package/dist/engine/registry-facade.d.ts +2 -2
- package/dist/engine/registry-ingest.d.ts +2 -2
- package/dist/engine/registry-state.d.ts +2 -2
- package/dist/engine/registry-validate.d.ts +3 -3
- package/dist/engine/registry.d.ts +1 -1
- package/dist/engine/resolve-config-or-param.d.ts +2 -2
- package/dist/engine/role-assignment.d.ts +1 -1
- package/dist/engine/run-in.d.ts +1 -1
- package/dist/engine/run-pipeline.d.ts +3 -3
- package/dist/engine/schema-builder.d.ts +1 -1
- package/dist/engine/screen-filter-ops.d.ts +1 -1
- package/dist/engine/screen-helpers.d.ts +2 -2
- package/dist/engine/soft-delete-cleanup.d.ts +2 -2
- package/dist/engine/steps/_event-match.d.ts +1 -1
- package/dist/engine/steps/_no-return-guard.d.ts +1 -1
- package/dist/engine/steps/_read-source.d.ts +4 -4
- package/dist/engine/steps/_resolver-utils.d.ts +1 -1
- package/dist/engine/steps/aggregate-append-event.d.ts +1 -1
- package/dist/engine/steps/aggregate-create.d.ts +2 -2
- package/dist/engine/steps/aggregate-update.d.ts +3 -3
- package/dist/engine/steps/branch.d.ts +1 -1
- package/dist/engine/steps/call-feature.d.ts +2 -2
- package/dist/engine/steps/compute.d.ts +1 -1
- package/dist/engine/steps/for-each.d.ts +1 -1
- package/dist/engine/steps/mail-send.d.ts +1 -1
- package/dist/engine/steps/read-find-many.d.ts +2 -2
- package/dist/engine/steps/read-find-one.d.ts +2 -2
- package/dist/engine/steps/retry.d.ts +1 -1
- package/dist/engine/steps/return.d.ts +2 -2
- package/dist/engine/steps/unsafe-projection-delete.d.ts +2 -2
- package/dist/engine/steps/unsafe-projection-upsert.d.ts +1 -1
- package/dist/engine/steps/wait-for-event.d.ts +1 -1
- package/dist/engine/steps/wait.d.ts +1 -1
- package/dist/engine/steps/webhook-send.d.ts +1 -1
- package/dist/engine/strip-disabled-features-from-app-schema.d.ts +4 -4
- package/dist/engine/system-user.d.ts +2 -2
- package/dist/engine/template-variables.d.ts +1 -1
- package/dist/engine/tier-resolver-extension.d.ts +4 -4
- package/dist/engine/transfer-adjacency.d.ts +1 -1
- package/dist/engine/types/index.d.ts +6 -6
- package/dist/engine/validate-projection-allowlist.d.ts +1 -1
- package/dist/engine/validation.d.ts +1 -1
- package/dist/entrypoint/index.d.ts +12 -12
- package/dist/env/dry-run.d.ts +14 -1
- package/dist/env/dry-run.js +50 -0
- package/dist/env/index.d.ts +54 -16
- package/dist/env/index.js +60 -6
- package/dist/errors/classes.d.ts +3 -3
- package/dist/errors/docs-url.d.ts +1 -1
- package/dist/errors/index.d.ts +18 -18
- package/dist/errors/member-resolution.d.ts +1 -1
- package/dist/errors/serialize.d.ts +2 -2
- package/dist/errors/subject-erased.d.ts +1 -1
- package/dist/errors/to-kumiko-error.d.ts +1 -1
- package/dist/errors/write-error-info.d.ts +1 -1
- package/dist/errors/zod-bridge.d.ts +1 -1
- package/dist/es-ops/context.d.ts +4 -4
- package/dist/es-ops/index.d.ts +4 -4
- package/dist/es-ops/operations-schema.d.ts +1 -1
- package/dist/es-ops/runner.d.ts +3 -3
- package/dist/es-ops/runner.js +9 -1
- package/dist/es-ops/types.d.ts +2 -2
- package/dist/event-store/admin-api.d.ts +3 -3
- package/dist/event-store/archive.d.ts +2 -2
- package/dist/event-store/event-store.d.ts +2 -2
- package/dist/event-store/events-schema.d.ts +1 -1
- package/dist/event-store/index.d.ts +15 -15
- package/dist/event-store/provenance-append.d.ts +3 -3
- package/dist/event-store/rebuild-dead-letter.d.ts +2 -2
- package/dist/event-store/row-to-stored-event.d.ts +2 -2
- package/dist/event-store/snapshot.d.ts +2 -2
- package/dist/event-store/tenant-db-append.d.ts +2 -2
- package/dist/event-store/transfer.d.ts +3 -3
- package/dist/event-store/upcaster-dead-letter.d.ts +2 -2
- package/dist/event-store/upcaster.d.ts +3 -3
- package/dist/files/assert-file-refs-belong-to-tenant.d.ts +2 -2
- package/dist/files/bind-pending-file-refs.d.ts +3 -3
- package/dist/files/create-file-ref-from-bytes.d.ts +4 -4
- package/dist/files/create-file-ref.d.ts +3 -3
- package/dist/files/dispose-removed-file-refs.d.ts +2 -2
- package/dist/files/feature.d.ts +3 -3
- package/dist/files/file-handle.d.ts +1 -1
- package/dist/files/file-ref-entity.d.ts +1 -1
- package/dist/files/file-ref-table.d.ts +1 -1
- package/dist/files/file-routes.d.ts +5 -5
- package/dist/files/in-memory-provider.d.ts +1 -1
- package/dist/files/index.d.ts +20 -20
- package/dist/files/load-save-file-refs.d.ts +2 -2
- package/dist/files/local-provider.d.ts +1 -1
- package/dist/files/provider-resolver.d.ts +5 -5
- package/dist/files/purge-expired-file-ref-bytes.d.ts +2 -2
- package/dist/files/record-read-check.d.ts +1 -1
- package/dist/files/record-write-check.d.ts +3 -3
- package/dist/files/storage-tracking.d.ts +2 -2
- package/dist/files/types.d.ts +1 -1
- package/dist/files/zip-stream.d.ts +1 -1
- package/dist/i18n/index.d.ts +4 -4
- package/dist/i18n/mail-registry.d.ts +1 -1
- package/dist/i18n/required-surface-keys.d.ts +1 -1
- package/dist/i18n/settings-hub-keys.d.ts +1 -1
- package/dist/i18n/settings-hub-keys.js +1 -2
- package/dist/internal/stack-support.d.ts +12 -12
- package/dist/internal/testing.d.ts +4 -4
- package/dist/jobs/index.d.ts +2 -2
- package/dist/jobs/job-runner.d.ts +1 -1
- package/dist/jobs/max-per-tenant.d.ts +1 -1
- package/dist/lifecycle/index.d.ts +2 -2
- package/dist/lifecycle/lifecycle.d.ts +1 -1
- package/dist/lifecycle/signal-handlers.d.ts +1 -1
- package/dist/logging/index.d.ts +4 -4
- package/dist/logging/pino-logger.d.ts +1 -1
- package/dist/logging/utils.d.ts +1 -1
- package/dist/migrations/index.d.ts +4 -4
- package/dist/migrations/kumiko-drift.d.ts +1 -1
- package/dist/migrations/pending-rebuilds.d.ts +5 -5
- package/dist/migrations/pii-event-backfill.d.ts +4 -4
- package/dist/migrations/projection-table-index.d.ts +1 -1
- package/dist/observability/console-provider.d.ts +1 -1
- package/dist/observability/context.d.ts +1 -1
- package/dist/observability/escape-hatch-report.d.ts +3 -3
- package/dist/observability/fallback.d.ts +1 -1
- package/dist/observability/index.d.ts +16 -16
- package/dist/observability/metric-validator.d.ts +1 -1
- package/dist/observability/metrics-handle.d.ts +1 -1
- package/dist/observability/metrics-wiring.d.ts +2 -2
- package/dist/observability/noop-provider.d.ts +1 -1
- package/dist/observability/prometheus-meter.d.ts +1 -1
- package/dist/observability/recording-meter.d.ts +1 -1
- package/dist/observability/recording-tracer.d.ts +1 -1
- package/dist/observability/redis-wrapper.d.ts +1 -1
- package/dist/observability/sensitive-filter.d.ts +1 -1
- package/dist/observability/standard-metrics.d.ts +1 -1
- package/dist/pipeline/active-membership.d.ts +4 -4
- package/dist/pipeline/append-event-core.d.ts +3 -3
- package/dist/pipeline/auth-claims-resolver.d.ts +2 -2
- package/dist/pipeline/cascade-handler.d.ts +3 -3
- package/dist/pipeline/dispatch-batch.d.ts +2 -2
- package/dist/pipeline/dispatch-query.d.ts +4 -4
- package/dist/pipeline/dispatch-shared.d.ts +17 -17
- package/dist/pipeline/dispatch-stream.d.ts +2 -2
- package/dist/pipeline/dispatch-write.d.ts +4 -4
- package/dist/pipeline/dispatcher-utils.d.ts +2 -2
- package/dist/pipeline/dispatcher.d.ts +12 -12
- package/dist/pipeline/event-consumer-state.d.ts +1 -1
- package/dist/pipeline/event-dispatcher-admin.d.ts +1 -1
- package/dist/pipeline/event-dispatcher-delivery.d.ts +7 -7
- package/dist/pipeline/event-dispatcher.d.ts +7 -7
- package/dist/pipeline/event-retention.d.ts +1 -1
- package/dist/pipeline/handler-access-error.d.ts +2 -2
- package/dist/pipeline/index.d.ts +42 -42
- package/dist/pipeline/irreversible-operation-gate.d.ts +1 -1
- package/dist/pipeline/lifecycle-pipeline.d.ts +2 -2
- package/dist/pipeline/member-read-only-transaction.d.ts +2 -2
- package/dist/pipeline/member-reader.d.ts +5 -5
- package/dist/pipeline/msp-rebuild.d.ts +4 -4
- package/dist/pipeline/multi-stream-apply-context.d.ts +3 -3
- package/dist/pipeline/notify-scope.d.ts +3 -3
- package/dist/pipeline/pending-gap-ranges.d.ts +2 -2
- package/dist/pipeline/pre-handler-gates.d.ts +3 -3
- package/dist/pipeline/pre-transaction-reservations.d.ts +4 -4
- package/dist/pipeline/projection-rebuild.d.ts +3 -3
- package/dist/pipeline/projection-state.d.ts +1 -1
- package/dist/pipeline/projections-runner.d.ts +3 -3
- package/dist/pipeline/projections-runner.js +3 -4
- package/dist/pipeline/system-hooks.d.ts +4 -4
- package/dist/pipeline/system-identity-switch.d.ts +3 -3
- package/dist/pipeline/tenant-timezone-cache.d.ts +1 -1
- package/dist/pipeline/write-origin.d.ts +3 -3
- package/dist/pipeline/write-result-masking.d.ts +2 -2
- package/dist/random/index.d.ts +2 -2
- package/dist/rate-limit/bucket.d.ts +1 -1
- package/dist/rate-limit/index.d.ts +3 -3
- package/dist/rate-limit/middleware.d.ts +3 -3
- package/dist/redis/cache-sync-bus.d.ts +2 -2
- package/dist/redis/cache-sync-topics.d.ts +1 -1
- package/dist/redis/index.d.ts +8 -8
- package/dist/redis/pubsub-signal.d.ts +1 -1
- package/dist/schema-cli.d.ts +1 -1
- package/dist/schema-cli.js +9 -1
- package/dist/search/derive-search-adapter-config.d.ts +2 -2
- package/dist/search/in-memory-adapter.d.ts +1 -1
- package/dist/search/index.d.ts +6 -6
- package/dist/search/meilisearch-adapter.d.ts +2 -2
- package/dist/search/purge-subject.d.ts +4 -4
- package/dist/search/reindex-entity.d.ts +3 -3
- package/dist/secrets/dek-cache.d.ts +1 -1
- package/dist/secrets/env-master-key-provider.d.ts +1 -1
- package/dist/secrets/env-master-key-provider.js +26 -11
- package/dist/secrets/envelope-cipher.d.ts +2 -2
- package/dist/secrets/envelope.d.ts +1 -1
- package/dist/secrets/index.d.ts +9 -9
- package/dist/secrets/rotation.d.ts +1 -1
- package/dist/secrets/stored-envelope.d.ts +1 -1
- package/dist/seeding/entity-seed.d.ts +1 -1
- package/dist/seeding/index.d.ts +3 -3
- package/dist/seeding/seed-users.d.ts +1 -1
- package/dist/time/index.d.ts +6 -6
- package/dist/ui-types/app-schema.d.ts +5 -5
- package/dist/ui-types/index.d.ts +23 -23
- package/dist/upgrade-cli.js +18 -6
- package/dist/utils/index.d.ts +9 -9
- package/package.json +19 -66
- package/presets/biome-app.json +80 -0
- package/presets/tsconfig.app.json +19 -0
- package/src/changes.json +84 -2
- package/src/scripts/codemod/README.md +18 -0
- package/src/scripts/codemod/codemod-support.ts +1 -1
- package/src/scripts/codemod/db-factory.ts +1 -1
- package/src/scripts/codemod/feature-factory.ts +1 -1
- package/src/scripts/codemod/import-extensions.ts +118 -0
- package/src/scripts/codemod/migrate-cross-tenant.ts +2 -2
- package/src/scripts/codemod/migrate-db-raw.ts +1 -1
- package/src/scripts/codemod/migrate-open-to-all.ts +1 -1
- package/src/scripts/codemod/object-form.ts +1 -1
- package/src/scripts/codemod/s3-imports.ts +1 -1
- package/src/scripts/codemod/tenant-db-options.ts +1 -1
- package/src/scripts/codemod/testing-move.ts +2 -2
- package/dist/db/bun-db-deprecated.d.ts +0 -10
- package/dist/db/bun-db-deprecated.js +0 -5
- package/dist/stack/index.d.ts +0 -10
- package/dist/stack/index.js +0 -11
- package/dist/testing/e2e-generator.d.ts +0 -5
- package/dist/testing/e2e-generator.js +0 -5
- package/dist/testing/handler-context.d.ts +0 -5
- package/dist/testing/handler-context.js +0 -5
- package/dist/testing/index.d.ts +0 -10
- package/dist/testing/index.js +0 -10
- package/dist/testing/real-providers.d.ts +0 -5
- package/dist/testing/real-providers.js +0 -5
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { WebSocketRouteDefinition } from "@cosmicdrift/kumiko-types/websocket-route";
|
|
2
2
|
import type * as z from "zod";
|
|
3
|
-
import type { HttpRouteDefinition } from "./types/http-route.
|
|
4
|
-
import type { AuthClaimsFn, BootCheckFn, ClaimKeyDefinition, ConfigKeyDefinition, ConfigSeedDef, EntityDefinition, EntityProjectionExtension, EventDef, EventMigrationDef, ExtensionSelectorDef, FeatureMetricDef, JobDefinition, LifecycleHookFn, MultiStreamProjectionDefinition, NotificationDefinition, OwnedFn, PhasedHook, PostDeleteHookFn, PostQueryHookFn, PostSaveHookFn, PreDeleteHookFn, ProjectionDefinition, QueryHandlerDef, ReferenceDataDef, RegistrarExtensionDef, RegistrarExtensionRegistration, RelationDefinition, SearchPayloadContributorFn, SecretKeyDefinition, SecretNamespaceDefinition, StoreTableEntry, StreamHandlerDef, TranslationKeys, TreeActionDef, UiHints, ValidationHookFn, WriteHandlerDef } from "./types/index.
|
|
5
|
-
import type { ContentCollectionDefinition, NavDefinition } from "./types/nav.
|
|
6
|
-
import type { ScreenDefinition } from "./types/screen.
|
|
7
|
-
import type { WorkspaceDefinition } from "./types/workspace.
|
|
3
|
+
import type { HttpRouteDefinition } from "./types/http-route.ts";
|
|
4
|
+
import type { AuthClaimsFn, BootCheckFn, ClaimKeyDefinition, ConfigKeyDefinition, ConfigSeedDef, EntityDefinition, EntityProjectionExtension, EventDef, EventMigrationDef, ExtensionSelectorDef, FeatureMetricDef, JobDefinition, LifecycleHookFn, MultiStreamProjectionDefinition, NotificationDefinition, OwnedFn, PhasedHook, PostDeleteHookFn, PostQueryHookFn, PostSaveHookFn, PreDeleteHookFn, ProjectionDefinition, QueryHandlerDef, ReferenceDataDef, RegistrarExtensionDef, RegistrarExtensionRegistration, RelationDefinition, SearchPayloadContributorFn, SecretKeyDefinition, SecretNamespaceDefinition, StoreTableEntry, StreamHandlerDef, TranslationKeys, TreeActionDef, UiHints, ValidationHookFn, WriteHandlerDef } from "./types/index.ts";
|
|
5
|
+
import type { ContentCollectionDefinition, NavDefinition } from "./types/nav.ts";
|
|
6
|
+
import type { ScreenDefinition } from "./types/screen.ts";
|
|
7
|
+
import type { WorkspaceDefinition } from "./types/workspace.ts";
|
|
8
8
|
export type FeatureBuilderState = {
|
|
9
9
|
requires: string[];
|
|
10
10
|
optionalRequires: string[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type * as z from "zod";
|
|
2
|
-
import {
|
|
3
|
-
import type { FeatureBuilderState } from "./feature-builder-state.
|
|
4
|
-
import type { AuthClaimsFn, ClaimKeyHandle, ClaimKeyType, ConfigKeyDefinition, ConfigKeyHandle, ConfigKeyType, ConfigSeedDef, DeclarativeEventMigration, EventDef, EventPiiStance, EventUpcastFn, JobDefinition, JobHandlerFn, MetricOptions, NameOrRef, NotificationDataFn, NotificationLocalizedTemplate, NotificationRecipientFn, NotificationRecordMapping, NotificationTemplateBody, NotificationTemplateFn, NotificationTemplateMeta, QualifiedEventName, SecretKeyHandle, SecretNamespaceHandle, SecretNamespaceOptions, SecretOptions, TemplateVariables, TranslationsDef } from "./types/index.
|
|
2
|
+
import type { ZodType } from "zod";
|
|
3
|
+
import type { FeatureBuilderState } from "./feature-builder-state.ts";
|
|
4
|
+
import type { AuthClaimsFn, ClaimKeyHandle, ClaimKeyType, ConfigKeyDefinition, ConfigKeyHandle, ConfigKeyType, ConfigSeedDef, DeclarativeEventMigration, EventDef, EventPiiStance, EventUpcastFn, JobDefinition, JobHandlerFn, MetricOptions, NameOrRef, NotificationDataFn, NotificationLocalizedTemplate, NotificationRecipientFn, NotificationRecordMapping, NotificationTemplateBody, NotificationTemplateFn, NotificationTemplateMeta, QualifiedEventName, SecretKeyHandle, SecretNamespaceHandle, SecretNamespaceOptions, SecretOptions, TemplateVariables, TranslationsDef } from "./types/index.ts";
|
|
5
5
|
export declare function buildConfigEventsJobsMethods<TName extends string>(state: FeatureBuilderState, name: TName): {
|
|
6
6
|
config: {
|
|
7
7
|
<T extends ConfigKeyType>(keyName: string, def: ConfigKeyDefinition<T>): ConfigKeyHandle<T>;
|
|
@@ -28,6 +28,7 @@ export declare function buildConfigEventsJobsMethods<TName extends string>(state
|
|
|
28
28
|
readonly renamedFrom?: readonly string[];
|
|
29
29
|
readonly systemOnly?: boolean;
|
|
30
30
|
readonly unsubscribe?: boolean;
|
|
31
|
+
readonly tenantTransport?: boolean;
|
|
31
32
|
}), definition?: {
|
|
32
33
|
readonly trigger?: {
|
|
33
34
|
readonly on: NameOrRef;
|
|
@@ -43,6 +44,7 @@ export declare function buildConfigEventsJobsMethods<TName extends string>(state
|
|
|
43
44
|
readonly renamedFrom?: readonly string[];
|
|
44
45
|
readonly systemOnly?: boolean;
|
|
45
46
|
readonly unsubscribe?: boolean;
|
|
47
|
+
readonly tenantTransport?: boolean;
|
|
46
48
|
}): void;
|
|
47
49
|
translations(def: TranslationsDef): void;
|
|
48
50
|
defineEvent: <const TInner extends string, TPayload>(eventName: TInner, schema: ZodType<TPayload>, options: {
|
|
@@ -1,53 +1,10 @@
|
|
|
1
|
-
import { escapeHatchGrantsProblem
|
|
1
|
+
import { escapeHatchGrantsProblem } from "@cosmicdrift/kumiko-types/handlers";
|
|
2
2
|
import { isPlainObject } from "@cosmicdrift/kumiko-types/type-guards";
|
|
3
|
-
import { ZodObject } from "zod";
|
|
4
3
|
import { isValidIanaTimeZone } from "../time/iana.js";
|
|
4
|
+
import { createEventDef } from "./event-def.js";
|
|
5
5
|
import { resolveName } from "./handler-helpers.js";
|
|
6
6
|
import { splitNamedDefinition, unwrapArrayForm } from "./object-form.js";
|
|
7
7
|
import { QnTypes, qn, toKebab } from "./qualified-name.js";
|
|
8
|
-
// A payload field that still holds null/undefined after parsing — the case
|
|
9
|
-
// where an event-PII owner field yields no subject at append time (fw#2776).
|
|
10
|
-
// A `.default(...)` accepts undefined but parses to a value, so it is not
|
|
11
|
-
// absentable.
|
|
12
|
-
function isAbsentable(field) {
|
|
13
|
-
return [null, undefined].some((candidate) => {
|
|
14
|
-
const parsed = field.safeParse(candidate);
|
|
15
|
-
return parsed.success && (parsed.data === null || parsed.data === undefined);
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
const NON_STRING_SCHEMA_TYPES = new Set([
|
|
19
|
-
"number",
|
|
20
|
-
"int",
|
|
21
|
-
"boolean",
|
|
22
|
-
"bigint",
|
|
23
|
-
"date",
|
|
24
|
-
"object",
|
|
25
|
-
"array",
|
|
26
|
-
]);
|
|
27
|
-
// An owner id is resolved through "non-empty string or absent" at append time,
|
|
28
|
-
// so a schema that can never yield a string would make every append throw in
|
|
29
|
-
// prod. Wrappers (optional/nullable/default/...) are looked through.
|
|
30
|
-
function neverYieldsString(field) {
|
|
31
|
-
let current = field;
|
|
32
|
-
for (;;) {
|
|
33
|
-
const def = current._zod.def;
|
|
34
|
-
if (def.innerType === undefined)
|
|
35
|
-
return NON_STRING_SCHEMA_TYPES.has(def.type);
|
|
36
|
-
current = def.innerType;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
function assertOwnerFieldYieldsPresentString(args) {
|
|
40
|
-
const { featureName, eventName, field, ownerField, owner } = args;
|
|
41
|
-
if (neverYieldsString(owner)) {
|
|
42
|
-
throw new Error(`[Feature ${featureName}] defineEvent("${eventName}"): piiFields."${field}" is owned by "${ownerField}", whose payload schema is not a string — the subject id must be a non-empty string, so every append would fail. ` +
|
|
43
|
-
`Use a string owner field, or declare whenAbsent ("tenant" | "self" | "plaintext").`);
|
|
44
|
-
}
|
|
45
|
-
if (isAbsentable(owner)) {
|
|
46
|
-
throw new Error(`[Feature ${featureName}] defineEvent("${eventName}"): piiFields."${field}" is owned by "${ownerField}", which the payload schema allows to be null/undefined. ` +
|
|
47
|
-
`Declare what happens then: { personal: { of: "${ownerField}", whenAbsent: "tenant" } } encrypts under the envelope tenant key, ` +
|
|
48
|
-
`whenAbsent: "self" under the event's own record key, whenAbsent: "plaintext" acknowledges that the value ships unencrypted and cannot be crypto-shredded (fw#2776).`);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
8
|
// Builds config/secrets/claims/events/jobs/notifications registrar methods.
|
|
52
9
|
export function buildConfigEventsJobsMethods(state, name) {
|
|
53
10
|
function config(arg1, arg2) {
|
|
@@ -89,45 +46,6 @@ export function buildConfigEventsJobsMethods(state, name) {
|
|
|
89
46
|
// Single-key call unwraps its own handle; multi-key returns the record.
|
|
90
47
|
return typeof arg1 === "string" ? handles[arg1] : handles;
|
|
91
48
|
}
|
|
92
|
-
// piiFields misconfiguration is a boot-time error, not a silent
|
|
93
|
-
// plaintext leak: both the pii field and its owner field must exist
|
|
94
|
-
// on the payload schema (checkable when the schema is a ZodObject).
|
|
95
|
-
function validateEventPiiFields(eventName, schema, piiFields) {
|
|
96
|
-
const shape = schema instanceof ZodObject ? schema.shape : undefined;
|
|
97
|
-
for (const [field, spec] of Object.entries(piiFields)) {
|
|
98
|
-
const normalized = normalizeEventPiiSubject(spec);
|
|
99
|
-
// Only the user form names an owner field — tenant/self subjects come
|
|
100
|
-
// from the write-time envelope (tenantId / aggregateType+aggregateId),
|
|
101
|
-
// so there is no owner-field existence or self-reference check for them.
|
|
102
|
-
if (normalized.kind !== "user") {
|
|
103
|
-
if (shape && !(field in shape)) {
|
|
104
|
-
throw new Error(`[Feature ${name}] defineEvent("${eventName}"): piiFields references "${field}" which is not a field of the payload schema.`);
|
|
105
|
-
}
|
|
106
|
-
continue;
|
|
107
|
-
}
|
|
108
|
-
if (field === normalized.ownerField) {
|
|
109
|
-
throw new Error(`[Feature ${name}] defineEvent("${eventName}"): piiFields."${field}" cannot use itself as the owner field — the subject id is a plaintext pseudonymous fk, the pii field is the value it owns.`);
|
|
110
|
-
}
|
|
111
|
-
if (normalized.ownerField === "id") {
|
|
112
|
-
throw new Error(`[Feature ${name}] defineEvent("${eventName}"): piiFields."${field}" uses owner field "id" — on entities \`of: "id"\` means record-owned, but on events it would encrypt under a phantom user key that a forget never reaches. Use \`personal: "self"\` for a record-owned event field.`);
|
|
113
|
-
}
|
|
114
|
-
for (const required of [field, normalized.ownerField]) {
|
|
115
|
-
if (shape && !(required in shape)) {
|
|
116
|
-
throw new Error(`[Feature ${name}] defineEvent("${eventName}"): piiFields references "${required}" which is not a field of the payload schema.`);
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
const owner = shape?.[normalized.ownerField];
|
|
120
|
-
if (normalized.whenAbsent === undefined && owner !== undefined) {
|
|
121
|
-
assertOwnerFieldYieldsPresentString({
|
|
122
|
-
featureName: name,
|
|
123
|
-
eventName,
|
|
124
|
-
field,
|
|
125
|
-
ownerField: normalized.ownerField,
|
|
126
|
-
owner,
|
|
127
|
-
});
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
49
|
// Shared by defineEvent's `migrations` option — each entry registers a
|
|
132
50
|
// single upcast step, same validation/dedup as the old standalone
|
|
133
51
|
// r.eventMigration() call (folded into defineEvent, #1082 step 8).
|
|
@@ -222,59 +140,20 @@ export function buildConfigEventsJobsMethods(state, name) {
|
|
|
222
140
|
: {}),
|
|
223
141
|
...(resolvedDefinition.systemOnly === true ? { systemOnly: true } : {}),
|
|
224
142
|
...(resolvedDefinition.unsubscribe === true ? { unsubscribe: true } : {}),
|
|
143
|
+
...(resolvedDefinition.tenantTransport === true ? { tenantTransport: true } : {}),
|
|
225
144
|
};
|
|
226
145
|
},
|
|
227
146
|
translations(def) {
|
|
228
147
|
state.translations = { ...state.translations, ...def.keys };
|
|
229
148
|
},
|
|
230
149
|
defineEvent: (eventName, schema, options) => {
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
const missingStanceError = () => new Error(`[Feature ${name}] defineEvent("${eventName}") must declare an explicit PII stance. Pass { piiFields: { <payloadField>: { personal: { of: "<userIdField>" } } } } for payload fields owned by a user (or { personal: "tenant" } / { personal: "self" } for tenant- or record-scoped subjects), or { piiFields: "none" } when the payload holds none.`);
|
|
235
|
-
if (options === undefined || options.piiFields === undefined) {
|
|
236
|
-
throw missingStanceError();
|
|
237
|
-
}
|
|
238
|
-
const piiFields = options.piiFields;
|
|
239
|
-
// @cast-boundary runtime-guard — an untyped JS caller can hand
|
|
240
|
-
// anything through `piiFields` (including null), so re-check the
|
|
241
|
-
// shape before trusting it as EventPiiStance: `typeof null === "object"`
|
|
242
|
-
// would otherwise pass through to Object.keys(null) below and throw a
|
|
243
|
-
// raw TypeError instead of this guidance message.
|
|
244
|
-
if (piiFields !== "none" && (typeof piiFields !== "object" || piiFields === null)) {
|
|
245
|
-
throw missingStanceError();
|
|
246
|
-
}
|
|
247
|
-
if (piiFields !== "none" && Object.keys(piiFields).length === 0) {
|
|
248
|
-
throw new Error(`[Feature ${name}] defineEvent("${eventName}"): piiFields: {} is not a stance — use piiFields: "none" to declare the payload holds no personal data.`);
|
|
249
|
-
}
|
|
250
|
-
if (piiFields !== "none") {
|
|
251
|
-
validateEventPiiFields(eventName, schema, piiFields);
|
|
252
|
-
}
|
|
253
|
-
// Return the fully-qualified event name so callers can pass it
|
|
254
|
-
// straight to ctx.appendEvent without hand-building the
|
|
255
|
-
// "<feature>:event:<name>" shape. Registry keeps events keyed by
|
|
256
|
-
// short name — qualification is the framework's job, not the feature
|
|
257
|
-
// author's.
|
|
258
|
-
//
|
|
259
|
-
// The runtime kebab-step (`qn(toKebab(feature), …)`) is mirrored at
|
|
260
|
-
// the type-level by `QualifiedEventName<TName, TInner>` so the
|
|
261
|
-
// returned `name` carries the literal qualified shape that the
|
|
262
|
-
// augmented `KumikoEventTypeMap` keys against.
|
|
263
|
-
const qualified = qn(toKebab(name), "event", toKebab(eventName));
|
|
264
|
-
const version = options.version ?? 1;
|
|
265
|
-
if (!Number.isInteger(version) || version < 1) {
|
|
266
|
-
throw new Error(`[Feature ${name}] defineEvent("${eventName}"): version must be a positive integer, got ${String(version)}`);
|
|
267
|
-
}
|
|
268
|
-
// @cast-boundary engine-bridge — runtime-string mirrors the
|
|
269
|
-
// template-literal-type via QualifiedEventName + toKebab. Both
|
|
270
|
-
// sides are tested (CamelToKebab type-tests + scan-events kebab
|
|
271
|
-
// tests), so the cast is a contract, not a typing-loss.
|
|
272
|
-
const def = {
|
|
273
|
-
name: qualified,
|
|
150
|
+
const def = createEventDef({
|
|
151
|
+
feature: name,
|
|
152
|
+
name: eventName,
|
|
274
153
|
schema,
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
};
|
|
154
|
+
piiFields: options?.piiFields,
|
|
155
|
+
...(options?.version !== undefined ? { version: options.version } : {}),
|
|
156
|
+
});
|
|
278
157
|
state.events[eventName] = def;
|
|
279
158
|
for (const m of options.migrations ?? []) {
|
|
280
159
|
registerEventMigration(eventName, m.fromVersion, m.toVersion, m.transform);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type * as z from "zod";
|
|
2
2
|
import type { ZodType } from "zod";
|
|
3
|
-
import { type QueryHandlerDefinition, type StreamHandlerDefinition, type WriteHandlerDefinition } from "./define-handler.
|
|
4
|
-
import type { RegisterEntityCrudOptions } from "./entity-handlers.
|
|
5
|
-
import type { FeatureBuilderState } from "./feature-builder-state.
|
|
6
|
-
import type { AccessRule, EntityDefinition, EntityObjectDefinition, EntityRef, EscapeHatchDeclaration, HandlerRef, KumikoEventTypeMap, NameOrRef, RateLimitDeclaration, RelationDefinition, StreamHandlerFn } from "./types/index.
|
|
3
|
+
import { type QueryHandlerDefinition, type StreamHandlerDefinition, type WriteHandlerDefinition } from "./define-handler.ts";
|
|
4
|
+
import type { RegisterEntityCrudOptions } from "./entity-handlers.ts";
|
|
5
|
+
import type { FeatureBuilderState } from "./feature-builder-state.ts";
|
|
6
|
+
import type { AccessRule, EntityDefinition, EntityObjectDefinition, EntityRef, EscapeHatchDeclaration, HandlerRef, KumikoEventTypeMap, NameOrRef, RateLimitDeclaration, RelationDefinition, StreamHandlerFn } from "./types/index.ts";
|
|
7
7
|
export declare function buildEntityHandlerMethods<TName extends string>(state: FeatureBuilderState, name: TName): {
|
|
8
8
|
entity(definition: EntityObjectDefinition): EntityRef;
|
|
9
9
|
relation(entityRefOrDefinition: NameOrRef | ({
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ENTITY_CONVENTION_QUERY_BRAND } from "@cosmicdrift/kumiko-types/handlers";
|
|
2
2
|
import { toTableName } from "../db/table-builder.js";
|
|
3
3
|
import { isEntityConventionQueryHandler, isPagedQueryHandler, PAGED_QUERY_HANDLER_BRAND, } from "./define-handler.js";
|
|
4
|
-
import { registerCrudHandlers } from "./entity-handlers.js";
|
|
4
|
+
import { assertEscapeHatchAccessIsSystemAdminOnly, registerCrudHandlers, } from "./entity-handlers.js";
|
|
5
5
|
import { resolveName } from "./handler-helpers.js";
|
|
6
|
-
import { isObjectArgument,
|
|
6
|
+
import { isObjectArgument, throwObjectArgumentRequired } from "./object-form.js";
|
|
7
7
|
const CRUD_VERBS = new Set(["create", "update", "delete"]);
|
|
8
8
|
const CRUD_REGISTERED_VERBS = new Set([...CRUD_VERBS, "restore", "list", "detail"]);
|
|
9
9
|
// A silent overwrite would drop framework behaviour that rides on the r.crud
|
|
@@ -84,7 +84,7 @@ export function buildEntityHandlerMethods(state, name) {
|
|
|
84
84
|
const methods = {
|
|
85
85
|
entity(definition) {
|
|
86
86
|
if (!isObjectArgument(definition))
|
|
87
|
-
|
|
87
|
+
throwObjectArgumentRequired(name, "entity");
|
|
88
88
|
const { name: entityName, backingTable, ...entityDefinition } = definition;
|
|
89
89
|
state.entities[entityName] = entityDefinition;
|
|
90
90
|
if (backingTable !== undefined)
|
|
@@ -105,7 +105,7 @@ export function buildEntityHandlerMethods(state, name) {
|
|
|
105
105
|
},
|
|
106
106
|
writeHandler(def) {
|
|
107
107
|
if (!isObjectArgument(def))
|
|
108
|
-
|
|
108
|
+
throwObjectArgumentRequired(name, "writeHandler");
|
|
109
109
|
assertHandlerHasAccess(name, "writeHandler", def.name, def.access);
|
|
110
110
|
assertHandlerNameFree(state, name, "write", def.name);
|
|
111
111
|
state.writeHandlers[def.name] = {
|
|
@@ -144,9 +144,15 @@ export function buildEntityHandlerMethods(state, name) {
|
|
|
144
144
|
},
|
|
145
145
|
queryHandler(def) {
|
|
146
146
|
if (!isObjectArgument(def))
|
|
147
|
-
|
|
147
|
+
throwObjectArgumentRequired(name, "queryHandler");
|
|
148
148
|
assertHandlerHasAccess(name, "queryHandler", def.name, def.access);
|
|
149
149
|
assertHandlerNameFree(state, name, "query", def.name);
|
|
150
|
+
// A generated entity handler checks its escapeHatch when it is built, but a
|
|
151
|
+
// spread of it can add escapeHatch afterwards; the registered object is
|
|
152
|
+
// what the dispatcher trusts, so the check runs on it again.
|
|
153
|
+
if (def.escapeHatch !== undefined && isEntityConventionQueryHandler(def)) {
|
|
154
|
+
assertEscapeHatchAccessIsSystemAdminOnly(def.name, "query", def.access);
|
|
155
|
+
}
|
|
150
156
|
state.queryHandlers[def.name] = {
|
|
151
157
|
name: def.name,
|
|
152
158
|
schema: def.schema,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { type WebSocketRouteDefinition } from "@cosmicdrift/kumiko-types/websocket-route";
|
|
2
|
-
import type { EntityTableMeta } from "../db/entity-table-meta.
|
|
3
|
-
import type { FeatureBuilderState } from "./feature-builder-state.
|
|
4
|
-
import type { HttpRouteDefinition } from "./types/http-route.
|
|
5
|
-
import type { BootCheckFn, EntityProjectionExtension, ExtensionSelectorPanel, HookDefinition, MultiStreamProjectionDefinition, NameOrRef, ProjectionDefinition, RegistrarExtensionDef, SearchPayloadContributorFn, StoreTableOptions, TreeActionDef, TreeActionsHandle } from "./types/index.
|
|
6
|
-
import type { ContentCollectionDefinition, NavDefinition } from "./types/nav.
|
|
7
|
-
import type { ScreenDefinition } from "./types/screen.
|
|
8
|
-
import type { WorkspaceDefinition } from "./types/workspace.
|
|
2
|
+
import type { EntityTableMeta } from "../db/entity-table-meta.ts";
|
|
3
|
+
import type { FeatureBuilderState } from "./feature-builder-state.ts";
|
|
4
|
+
import type { HttpRouteDefinition } from "./types/http-route.ts";
|
|
5
|
+
import type { BootCheckFn, EntityProjectionExtension, ExtensionSelectorPanel, HookDefinition, MultiStreamProjectionDefinition, NameOrRef, ProjectionDefinition, RegistrarExtensionDef, SearchPayloadContributorFn, StoreTableOptions, TreeActionDef, TreeActionsHandle } from "./types/index.ts";
|
|
6
|
+
import type { ContentCollectionDefinition, NavDefinition } from "./types/nav.ts";
|
|
7
|
+
import type { ScreenDefinition } from "./types/screen.ts";
|
|
8
|
+
import type { WorkspaceDefinition } from "./types/workspace.ts";
|
|
9
9
|
export declare function buildUiExtensionsMethods<TName extends string>(state: FeatureBuilderState, name: TName): {
|
|
10
10
|
hook(definition: HookDefinition): void;
|
|
11
11
|
searchPayloadExtension(entityRef: NameOrRef, fn: SearchPayloadContributorFn): void;
|
|
@@ -4,7 +4,7 @@ import { WEBSOCKET_MAX_CONNECTIONS_PER_USER_LIMIT, WEBSOCKET_MAX_PAYLOAD_BYTES,
|
|
|
4
4
|
import { bindHookEscapeHatchGrant } from "../pipeline/system-identity-switch.js";
|
|
5
5
|
import { LifecycleHookTypes } from "./constants.js";
|
|
6
6
|
import { resolveName } from "./handler-helpers.js";
|
|
7
|
-
import { isObjectArgument,
|
|
7
|
+
import { isObjectArgument, throwObjectArgumentRequired } from "./object-form.js";
|
|
8
8
|
import { isKebabSegment, isValidQn, qualifyEntityName, toKebab } from "./qualified-name.js";
|
|
9
9
|
import { HookPhases } from "./types/index.js";
|
|
10
10
|
// Builds hooks/extensions/projections/screens/nav/workspace/tables/tree-actions
|
|
@@ -110,7 +110,7 @@ export function buildUiExtensionsMethods(state, name) {
|
|
|
110
110
|
return {
|
|
111
111
|
hook(definition) {
|
|
112
112
|
if (!isObjectArgument(definition))
|
|
113
|
-
|
|
113
|
+
throwObjectArgumentRequired(name, "hook");
|
|
114
114
|
const { type, target, handler: fn } = definition;
|
|
115
115
|
const options = {
|
|
116
116
|
...(definition.phase !== undefined && { phase: definition.phase }),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { EntityDefinition, SessionUser } from "./types/index.
|
|
1
|
+
import type { EntityDefinition, SessionUser } from "./types/index.ts";
|
|
2
2
|
export declare function maskWriteOnlyFields<T extends Readonly<Record<string, unknown>>>(entity: EntityDefinition, row: T): T;
|
|
3
3
|
export declare function dropEmptyWriteOnlyValues<T extends Readonly<Record<string, unknown>>>(entity: EntityDefinition, values: T): T;
|
|
4
4
|
export declare function filterReadFields(entity: EntityDefinition, data: Readonly<Record<string, unknown>>, user: SessionUser): Record<string, unknown>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AnyFileFieldDef, FieldDefinition } from "./types/fields.
|
|
1
|
+
import type { AnyFileFieldDef, FieldDefinition } from "./types/fields.ts";
|
|
2
2
|
export declare const DEFAULT_CURRENCIES: readonly ["EUR", "USD", "GBP", "CHF", "JPY", "SEK", "NOK", "DKK", "PLN", "CZK", "CAD", "AUD", "NZD", "CNY", "INR"];
|
|
3
3
|
export declare const DEFAULT_LOCALES: readonly ["de", "en", "es"];
|
|
4
4
|
export declare function isFileField(field: FieldDefinition | undefined): field is AnyFileFieldDef;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { NameOrRef, WriteResult } from "./types/handlers.
|
|
1
|
+
import type { NameOrRef, WriteResult } from "./types/handlers.ts";
|
|
2
2
|
/**
|
|
3
3
|
* Override the success-side `data` of a WriteResult while forwarding the
|
|
4
4
|
* failure half untouched. Useful for handlers that delegate to the
|
package/dist/engine/index.d.ts
CHANGED
|
@@ -1,88 +1,89 @@
|
|
|
1
|
-
export { handlerFieldLabelKey, handlerTitleKey } from "../i18n/required-surface-keys.
|
|
2
|
-
export { hasAccess } from "./access.
|
|
3
|
-
export { isPrincipalStatusPlugin, isTenantLifecycleStatusPlugin, type PrincipalProfile, type PrincipalStatus, type PrincipalStatusPlugin, TENANT_TEARDOWN_STATUSES, type TenantLifecycleStatusPlugin, } from "./active-membership.
|
|
4
|
-
export { PII_DIRECT_NAME_HINTS, PII_USER_OWNED_NAME_HINTS, PII_USER_REFERENCE_NAME_HINTS, } from "./boot-validator/entity-handler.
|
|
5
|
-
export { entityHasAnonymizableSubjectField } from "./boot-validator/pii-retention.
|
|
6
|
-
export { type CardMetaOverflow, collectCardMetaOverflow, collectWriteHandlerQns, MAX_TRANSFER_DEPTH, SECURITY_BASELINE_FEATURE_NAMES, type ValidateBootOptions, validateAppCustomScreenWriteQns, validateBoot, } from "./boot-validator.
|
|
7
|
-
export { bridgeStub } from "./bridge-stub.
|
|
8
|
-
export { type BuildAppSchemaOptions, buildAppSchema } from "./build-app-schema.
|
|
9
|
-
export type { ConfigFeatureSchema } from "./build-config-feature-schema.
|
|
10
|
-
export { buildConfigFeatureSchema, SETTINGS_HUB_FEATURE, SETTINGS_HUB_WORKSPACE, } from "./build-config-feature-schema.
|
|
11
|
-
export { buildTarget } from "./build-target.
|
|
12
|
-
export { type PendingChange, parseChangesetChanges } from "./changeset-changes.
|
|
13
|
-
export { access, createSeed, createSystemConfig, createSystemSeed, createTenantConfig, createTenantSeed, createUserConfig, createUserSeed, isEncryptedAtRest, } from "./config-helpers.
|
|
14
|
-
export type { SystemHookName } from "./constants.
|
|
15
|
-
export { ConcurrencyModes, ConfigScopes, LifecycleHookTypes, MessageKind, OnDeleteStrategies, SystemHookNames, SystemHookPriorities, TENANT_CURRENCY_CONFIG_KEY, tenantChannel, } from "./constants.
|
|
16
|
-
export type { App, AppConfig } from "./create-app.
|
|
17
|
-
export { createApp } from "./create-app.
|
|
18
|
-
export { mayOverrideTenant, tenantOverrideDenied } from "./cross-tenant.
|
|
19
|
-
export { dedupeFeatures } from "./dedupe-features.
|
|
20
|
-
export { defineFeature } from "./define-feature.
|
|
21
|
-
export type { PagedQueryHandlerDefinition, QueryHandlerDefinition, StreamHandlerDefinition, WriteHandlerDefinition, WriteHandlerInput, } from "./define-handler.
|
|
22
|
-
export { definePagedQueryHandler, defineQueryHandler, defineWriteHandler, isPagedQueryHandler, } from "./define-handler.
|
|
23
|
-
export { defineRoles } from "./define-roles.
|
|
24
|
-
export { defineStep, getStep, listStepKinds } from "./define-step.
|
|
25
|
-
export type { WorkflowDefinition, WorkflowInput, WorkflowTrigger } from "./define-workflow.
|
|
26
|
-
export { computeDefinitionFingerprint, defineWorkflow } from "./define-workflow.
|
|
27
|
-
export type { ToggleReader } from "./effective-features.
|
|
28
|
-
export { computeEffectiveFeatures, isToggleableFeature } from "./effective-features.
|
|
29
|
-
export { createEntityExecutor, defineEntityCreateHandler, defineEntityDeleteHandler, defineEntityDetailHandler, defineEntityListHandler, defineEntityQueryHandler, defineEntityRestoreHandler, defineEntityUpdateHandler, defineEntityWriteHandler, defineProjectionQueryHandler, type EntityCrudRegistrar, entityListSchema, MAX_LIST_LIMIT, type RegisterEntityCrudOptions, } from "./entity-handlers.
|
|
30
|
-
export { declareEscapeHatch } from "./escape-hatch-declaration.
|
|
31
|
-
export type
|
|
32
|
-
export {
|
|
33
|
-
export
|
|
34
|
-
export {
|
|
35
|
-
export {
|
|
36
|
-
export {
|
|
37
|
-
export
|
|
38
|
-
export {
|
|
39
|
-
export {
|
|
40
|
-
export
|
|
41
|
-
export {
|
|
42
|
-
export
|
|
43
|
-
export {
|
|
44
|
-
export {
|
|
45
|
-
export { type
|
|
46
|
-
export {
|
|
47
|
-
export {
|
|
48
|
-
export {
|
|
49
|
-
export {
|
|
50
|
-
export {
|
|
51
|
-
export
|
|
52
|
-
export {
|
|
53
|
-
export
|
|
54
|
-
export {
|
|
55
|
-
export {
|
|
56
|
-
export {
|
|
57
|
-
export {
|
|
58
|
-
export
|
|
59
|
-
export {
|
|
60
|
-
export {
|
|
61
|
-
export {
|
|
62
|
-
export {
|
|
63
|
-
export
|
|
64
|
-
export {
|
|
65
|
-
export
|
|
66
|
-
export {
|
|
67
|
-
export {
|
|
68
|
-
export
|
|
69
|
-
export {
|
|
70
|
-
export {
|
|
71
|
-
export
|
|
72
|
-
export {
|
|
73
|
-
export
|
|
74
|
-
export {
|
|
75
|
-
export {
|
|
76
|
-
export {
|
|
77
|
-
export {
|
|
78
|
-
export {
|
|
79
|
-
export {
|
|
80
|
-
export {
|
|
81
|
-
export {
|
|
82
|
-
export {
|
|
83
|
-
export {
|
|
84
|
-
export {
|
|
85
|
-
export
|
|
86
|
-
export {
|
|
87
|
-
export
|
|
88
|
-
export {
|
|
1
|
+
export { handlerFieldLabelKey, handlerTitleKey } from "../i18n/required-surface-keys.ts";
|
|
2
|
+
export { hasAccess } from "./access.ts";
|
|
3
|
+
export { isPrincipalStatusPlugin, isTenantLifecycleStatusPlugin, type PrincipalProfile, type PrincipalStatus, type PrincipalStatusPlugin, TENANT_TEARDOWN_STATUSES, type TenantLifecycleStatusPlugin, } from "./active-membership.ts";
|
|
4
|
+
export { PII_DIRECT_NAME_HINTS, PII_USER_OWNED_NAME_HINTS, PII_USER_REFERENCE_NAME_HINTS, } from "./boot-validator/entity-handler.ts";
|
|
5
|
+
export { entityHasAnonymizableSubjectField } from "./boot-validator/pii-retention.ts";
|
|
6
|
+
export { type CardMetaOverflow, collectCardMetaOverflow, collectWriteHandlerQns, MAX_TRANSFER_DEPTH, SECURITY_BASELINE_FEATURE_NAMES, type ValidateBootOptions, validateAppCustomScreenWriteQns, validateBoot, } from "./boot-validator.ts";
|
|
7
|
+
export { bridgeStub } from "./bridge-stub.ts";
|
|
8
|
+
export { type BuildAppSchemaOptions, buildAppSchema } from "./build-app-schema.ts";
|
|
9
|
+
export type { ConfigFeatureSchema } from "./build-config-feature-schema.ts";
|
|
10
|
+
export { buildConfigFeatureSchema, SETTINGS_HUB_FEATURE, SETTINGS_HUB_WORKSPACE, } from "./build-config-feature-schema.ts";
|
|
11
|
+
export { buildTarget } from "./build-target.ts";
|
|
12
|
+
export { type PendingChange, parseChangesetChanges } from "./changeset-changes.ts";
|
|
13
|
+
export { access, createSeed, createSystemConfig, createSystemSeed, createTenantConfig, createTenantSeed, createUserConfig, createUserSeed, isEncryptedAtRest, } from "./config-helpers.ts";
|
|
14
|
+
export type { SystemHookName } from "./constants.ts";
|
|
15
|
+
export { ConcurrencyModes, ConfigScopes, LifecycleHookTypes, MessageKind, OnDeleteStrategies, SystemHookNames, SystemHookPriorities, TENANT_CURRENCY_CONFIG_KEY, tenantChannel, } from "./constants.ts";
|
|
16
|
+
export type { App, AppConfig } from "./create-app.ts";
|
|
17
|
+
export { createApp } from "./create-app.ts";
|
|
18
|
+
export { mayOverrideTenant, tenantOverrideDenied } from "./cross-tenant.ts";
|
|
19
|
+
export { dedupeFeatures } from "./dedupe-features.ts";
|
|
20
|
+
export { defineFeature } from "./define-feature.ts";
|
|
21
|
+
export type { PagedQueryHandlerDefinition, QueryHandlerDefinition, StreamHandlerDefinition, WriteHandlerDefinition, WriteHandlerInput, } from "./define-handler.ts";
|
|
22
|
+
export { definePagedQueryHandler, defineQueryHandler, defineWriteHandler, isPagedQueryHandler, } from "./define-handler.ts";
|
|
23
|
+
export { defineRoles } from "./define-roles.ts";
|
|
24
|
+
export { defineStep, getStep, listStepKinds } from "./define-step.ts";
|
|
25
|
+
export type { WorkflowDefinition, WorkflowInput, WorkflowTrigger } from "./define-workflow.ts";
|
|
26
|
+
export { computeDefinitionFingerprint, defineWorkflow } from "./define-workflow.ts";
|
|
27
|
+
export type { ToggleReader } from "./effective-features.ts";
|
|
28
|
+
export { computeEffectiveFeatures, isToggleableFeature } from "./effective-features.ts";
|
|
29
|
+
export { createEntityExecutor, defineEntityCreateHandler, defineEntityDeleteHandler, defineEntityDetailHandler, defineEntityListHandler, defineEntityQueryHandler, defineEntityRestoreHandler, defineEntityUpdateHandler, defineEntityWriteHandler, defineProjectionQueryHandler, type EntityCrudRegistrar, entityListSchema, MAX_LIST_LIMIT, type RegisterEntityCrudOptions, } from "./entity-handlers.ts";
|
|
30
|
+
export { declareEscapeHatch } from "./escape-hatch-declaration.ts";
|
|
31
|
+
export { type CreateEventDefOptions, createEventDef } from "./event-def.ts";
|
|
32
|
+
export type { EmitCtx } from "./event-helpers.ts";
|
|
33
|
+
export { emitEvent, typedPayload } from "./event-helpers.ts";
|
|
34
|
+
export type { KumikoExtensionName, TenantResourceExtensionName } from "./extension-names.ts";
|
|
35
|
+
export { EXT_ASSIGNABLE_ROLE, EXT_DERIVATIVE_OVERLAY_RESOLVER, EXT_DERIVATIVE_PUBLIC_PREDICATE, EXT_DERIVATIVE_RENDERER, EXT_EXTERNAL_RESOURCE, EXT_FILE_PROVIDER, EXT_INFRA_RESOURCE, EXT_PRINCIPAL_STATUS, EXT_SEARCH_ADAPTER, EXT_STORAGE_PROVIDER, EXT_TENANT_DATA, EXT_TENANT_LIFECYCLE_STATUS, EXT_USER_DATA, EXT_USER_DATA_ORDER, FILE_PROVIDER_CONFIG_KEY, FILE_STORAGE_PROVIDER_BOOT_SENTINEL, FILE_STORAGE_PROVIDER_ENV, TENANT_MEMBERSHIPS_QUERY, } from "./extension-names.ts";
|
|
36
|
+
export { EXTENSION_SELECTOR_HINT_KEY, extensionSelectorTargets, SELECTED_EXTENSIONS_QUERY, selectablePluginIds, } from "./extension-selector-plugins.ts";
|
|
37
|
+
export { extensionUsageEscapeHatchReason } from "./extensions/escape-hatch-usage.ts";
|
|
38
|
+
export type { StorageProviderDestroyTenantHook, StorageProviderExtensionHooks, StorageProviderHookCtx, } from "./extensions/storage-provider.ts";
|
|
39
|
+
export { isTenantDataExtensionHooks, type TenantDataDestroyHook, type TenantDataExtensionHooks, type TenantDataHookCtx, } from "./extensions/tenant-data.ts";
|
|
40
|
+
export { isTenantResourceExtensionHooks, type TenantDestroyHookResult, type TenantResourceDestroyHook, type TenantResourceExtensionHooks, type TenantResourceHookCtx, } from "./extensions/tenant-resource.ts";
|
|
41
|
+
export type { TenantUserModel, UserDataDeleteHook, UserDataDeleteStrategy, UserDataExportHook, UserDataExportSnippet, UserDataExtensionHooks, UserDataExtensionOptions, UserDataHookCtx, UserDataStorageProvider, } from "./extensions/user-data.ts";
|
|
42
|
+
export { createBigIntField, createBooleanField, createDateField, createDecimalField, createDerivedField, createEmbeddedField, createEmbeddedListField, createEntity, createFileField, createFilesField, createImageField, createImagesField, createJsonbField, createLocatedTimestampField, createLongTextField, createMoneyField, createMultiSelectField, createNumberField, createSelectField, createTextField, createTimestampField, createTzField, } from "./factories.ts";
|
|
43
|
+
export type { AddEntityArgs, AddHookArgs, AddRelationArgs, AddWriteHandlerArgs, FeaturePatcher, FeaturePattern, FeaturePatternKind, FormFieldLabel, FormFieldSpec, FormInputType, HandlerHeaderUpdate, ParseError, ParseResult, PatternCategory, PatternChange, PatternChangeIssue, PatternChangesParseResult, PatternFormSchema, PatternId, RenderFeatureFileInput, SourceLocation, } from "./feature-ast/index.ts";
|
|
44
|
+
export { addPattern, applyChanges, createFeaturePatcher, getPatternSchema, groupByCategory, PATTERN_LIBRARY, parseFeatureFile, parsePatternChanges, parseSourceFile, removePattern, renderFeatureFile, renderPattern, replacePattern, updatePattern, VERSION_HEADER, } from "./feature-ast/index.ts";
|
|
45
|
+
export { type ChangelogEntry, type ChangelogType, compareVersions, type FeatureChangelog, filterEntriesAfter, parseFeatureChangelog, sortEntries, validateChangelog, } from "./feature-changelog.ts";
|
|
46
|
+
export { type BuildManifestOptions, buildManifestFromRegistry, type FeatureManifest, type ManifestConfigKey, type ManifestExtension, type ManifestFeature, type ManifestSecret, type ManifestSystemEvent, serializeManifest, } from "./feature-manifest.ts";
|
|
47
|
+
export { checkWriteFieldOwnership, checkWriteFieldRoles, filterReadFields, maskWriteOnlyFields, } from "./field-access.ts";
|
|
48
|
+
export { HANDLER_FIELD_REFERENCES_META_KEY, type HandlerFieldPathSegment, type HandlerFieldReference, type HandlerFieldReferenceAtPath, type HandlerFieldReferenceMeta, handlerFieldReference, handlerFieldReferences, readHandlerFieldReferences, } from "./handler-field-references.ts";
|
|
49
|
+
export { resolveName, withResponseData } from "./handler-helpers.ts";
|
|
50
|
+
export { i18nKey } from "./i18n-key.ts";
|
|
51
|
+
export { buildSessionRoles, findForbiddenMembershipRole, isForbiddenMembershipRole, stripForbiddenMembershipRoles, } from "./membership-roles.ts";
|
|
52
|
+
export type { OwnershipClause, OwnershipMap, OwnershipRef, OwnershipRule } from "./ownership.ts";
|
|
53
|
+
export { buildOwnershipClause, combineClauses, from, normalizeAccessEntry, userCanCreateFieldRow, userCanReadFieldRow, userCanWriteFieldRow, } from "./ownership.ts";
|
|
54
|
+
export type { ParsedRefTarget } from "./parse-ref-target.ts";
|
|
55
|
+
export { parseRefTarget, parseRefTargetEntityName } from "./parse-ref-target.ts";
|
|
56
|
+
export { buildPipelineSteps, stepsPipeline } from "./pipeline.ts";
|
|
57
|
+
export { projectAppSchemaForRoles } from "./project-app-schema-for-roles.ts";
|
|
58
|
+
export { defineApply, defineMspApply, setFields } from "./projection-helpers.ts";
|
|
59
|
+
export type { BuiltinQnType, ParsedQn, QnType } from "./qualified-name.ts";
|
|
60
|
+
export { isValidQn, parseQn, QnTypes, qn, toKebab } from "./qualified-name.ts";
|
|
61
|
+
export { readClaim } from "./read-claim.ts";
|
|
62
|
+
export { createRegistry } from "./registry.ts";
|
|
63
|
+
export { qualifyTranslationKey } from "./registry-ingest.ts";
|
|
64
|
+
export type { ClampInfo, ResolveOptions } from "./resolve-config-or-param.ts";
|
|
65
|
+
export { resolveConfigOrParam } from "./resolve-config-or-param.ts";
|
|
66
|
+
export type { AssignableAppRoles, AssignableFromRole } from "./role-assignment.ts";
|
|
67
|
+
export { assignableAppRolesFromUsages, assignableAppRolesOf, BUILT_IN_MEMBERSHIP_ROLES, canActorAssignRole, findForbiddenRoleAssignment, isAssignableByRole, mergeAssignedRoles, } from "./role-assignment.ts";
|
|
68
|
+
export { runsInLane } from "./run-in.ts";
|
|
69
|
+
export type { StepListOutcome } from "./run-pipeline.ts";
|
|
70
|
+
export { runPipeline, runStepList } from "./run-pipeline.ts";
|
|
71
|
+
export { buildInsertSchema, buildUpdateSchema, fieldToZod, SYSTEM_ONLY_JSON_SCHEMA_KEY, } from "./schema-builder.ts";
|
|
72
|
+
export type { UnavailableSelectOption } from "./screen-helpers.ts";
|
|
73
|
+
export { availableSelectOptions, findUnavailableSelectOptions, isExtensionEditSection, isFieldsEditSection, isWriteFormEditSection, normalizeEditField, normalizeListColumn, sectionFieldSpecs, } from "./screen-helpers.ts";
|
|
74
|
+
export type { TransitionGraph } from "./state-machine.ts";
|
|
75
|
+
export { defineTransitions, guardTransition } from "./state-machine.ts";
|
|
76
|
+
export { evaluateEventMatch } from "./steps/_event-match.ts";
|
|
77
|
+
export { STEP_DISPATCH_AGGREGATE_TYPE, STEP_DISPATCH_FAILED_TYPE, STEP_DISPATCH_REQUESTED_TYPE, STEP_DISPATCHED_TYPE, SUSPEND_SENTINEL, WORKFLOW_AGGREGATE_TYPE, WORKFLOW_RESUMED_TYPE, WORKFLOW_RETRY_SCHEDULED_TYPE, WORKFLOW_RUN_COMPLETED_TYPE, WORKFLOW_RUN_FAILED_TYPE, WORKFLOW_RUN_STARTED_TYPE, WORKFLOW_WAITING_FOR_EVENT_TYPE, WORKFLOW_WAITING_TYPE, } from "./steps/_step-dispatch-constants.ts";
|
|
78
|
+
export { describeWorkflowStepError } from "./steps/describe-workflow-step-error.ts";
|
|
79
|
+
export { unwrapWorkflowStepError, WorkflowStepError } from "./steps/workflow-step-error.ts";
|
|
80
|
+
export { WORKFLOW_SYSTEM_EVENT_DEFS } from "./steps/workflow-system-events.ts";
|
|
81
|
+
export { ANONYMOUS_ROLE, ANONYMOUS_USER_ID, createAnonymousUser, createSystemUser, SYSTEM_ROLE, SYSTEM_USER_ID, } from "./system-user.ts";
|
|
82
|
+
export { assertNotificationVariables, templateVariable, templateVariablesToZod, } from "./template-variables.ts";
|
|
83
|
+
export { type EffectiveFeaturesResolver, findTierResolverUsage, isTierResolverPlugin, requireTierResolverPlugin, TENANT_TIER_RESOLVER_EXT, type TierResolverPlugin, type TrialGate, } from "./tier-resolver-extension.ts";
|
|
84
|
+
export { findOverDeepTransferChain, resolveTransferAdjacency as resolveEntityTransferAdjacency, type TransferAdjacency, type TransferEdge, type TransferEdgeLink, } from "./transfer-adjacency.ts";
|
|
85
|
+
export { isSystemTenant, isUuid, parseTenantId, SYSTEM_TENANT_ID } from "./types/identifiers.ts";
|
|
86
|
+
export type { AccessRule, ActionFormScreenDefinition, ActiveMembership, ActiveMembershipRejection, ActiveMembershipResult, AgentExposure, AgentHandlerHints, AgentRisk, AppContext, AppendEventArgs, AppendEventFn, AuthClaimsContext, AuthClaimsFn, AuthClaimsHookDef, BeforeTransactionPhase, BeforeTransactionResult, BelongsToRelation, BigIntFieldDef, BooleanFieldDef, BootOptionName, CamelToKebab, ChatSendFailureCode, ClaimKeyDefinition, ClaimKeyHandle, ClaimKeyJsType, ClaimKeyType, ConcurrencyMode, ConfigAccessor, ConfigAccessorFactory, ConfigBacking, ConfigCascade, ConfigCascadeLevel, ConfigDefinition, ConfigEditScreenDefinition, ConfigKeyAccess, ConfigKeyDefinition, ConfigKeyHandle, ConfigKeyType, ConfigMask, ConfigResolver, ConfigScope, ConfigSecretsReader, ConfigSeedDef, ConfigStoredRow, ConfigStoredRowWithSource, ConfigValidateContext, ConfigValidateFn, ConfigValue, ConfigValueSource, ConfigValueWithSource, ContentCollectionDefinition, CreateSeedOptions, CreateTenantSeedOptions, CreateUserSeedOptions, CustomScreenDefinition, CustomScreenRoute, DashboardChartPanel, DashboardCustomPanel, DashboardDateParam, DashboardFeedPanel, DashboardFilterDefinition, DashboardI18nText, DashboardListPanel, DashboardMoneyParam, DashboardPanelDefinition, DashboardPanelVisibility, DashboardProgressListPanel, DashboardScreenDefinition, DashboardScreenPanel, DashboardStatGroupPanel, DashboardStatPanel, DashboardText, DashboardTextParam, DashboardValueFormat, DateFieldDef, DecimalFieldDef, DeleteContext, DeliveryErrorCode, DeliveryFailureCode, DeliverySkipReason, DeriveContext, DerivedFieldDef, DerivedFieldsMap, DerivedValueType, EditExtensionSection, EditFieldPrefill, EditFieldSpec, EditFieldsSection, EditLayout, EditRelatedListSection, EditSectionSpec, EmbeddedListEditSpec, EntityDefinition, EntityEditAction, EntityEditActionPlacement, EntityEditScreenDefinition, EntityId, EntityListExpandableRow, EntityListScreenDefinition, EntityObjectDefinition, EntityRef, EntityRelations, EscapeHatchAuditSink, EscapeHatchDeclaration, EscapeHatchKind, EscapeHatchReporter, EscapeHatchTarget, EscapeHatchUseEvent, EventDef, ExtensionOptionsArgs, ExtensionOptionsFor, FeatureDefinition, FeatureRegistrar, FieldAccess, FieldCondition, FieldDefinition, FieldFormatRegistry, FieldIconKey, FieldRenderer, FileFieldDef, FilesFieldDef, Findability, FormatSpec, FormWidth, HandlerContext, HasManyRelation, HookDefinition, HookMap, ImageFieldDef, ImagesFieldDef, JobBackoff, JobBackoffStrategy, JobContext, JobDefinition, JobHandlerFn, JobTrigger, JobTriggerEvent, JsonbFieldDef, KumikoEntityTypeMap, KumikoEventTypeMap, KumikoExtensionOptionsMap, KumikoHandlerPayloadMap, KumikoHandlerResultMap, LifecycleHookType, ListColumnSpec, ListFacetSpec, ListPaginationMode, ListSortDir, ListSortSpec, LongTextFindability, ManyToManyRelation, MaxPerTenantOptions, MemberReader, MetricNavigate, MetricSpec, MspErrorMode, MspErrorPolicy, MultiSelectFieldDef, MultiStreamApplyFn, MultiStreamProjectionDefinition, NameOrRef, NavDefinition, NavIconKey, NotificationDataFn, NotificationDefinition, NotificationLocalizedTemplate, NotificationRecipientFn, NotificationRecordMapping, NotificationTemplateBody, NotificationTemplateFn, NotificationTemplateMeta, NotifyDeferred, NotifyDelivery, NotifyDeliveryStatus, NotifyDispatched, NotifyFactory, NotifyFn, NotifyJobDispatcher, NotifyOptions, NotifyPriority, NotifyResult, NumberFieldDef, OnDeleteStrategy, OpenToAllAccessRule, OpenToAllDeclaration, OpenToAllPersonalData, ParentRefDef, PersonalAnnotations, PersonalAnnotationsLongText, PersonalAnnotationsNoFind, PersonalSubject, PlatformComponent, PluralForms, PostDeleteHookFn, PostSaveHookFn, PreDeleteHookFn, PreparedWriteEvent, PreQueryHookFn, PreSaveHookFn, ProjectionDefinition, ProjectionDetailScreenDefinition, ProjectionListScreenDefinition, ProjectionTable, QualifiedEventName, QueryEvent, QueryHandlerDef, QueryHandlerFn, RateLimitPer, RecordHeaderSpec, RecordHeaderSubtitlePart, ReferenceDataDef, Registry, RelationDefinition, ResolvedPiiFlags, RetentionDef, RoleAccessPersonalData, RoleAccessRule, RowAction, RowActionNavigate, RowActionNavigateBase, RowActionWriteHandler, RowFieldExtractor, SaveContext, ScreenDefinition, ScreenFilter, ScreenFilterOp, ScreenNavSugar, ScreenSlots, SecretKeyDefinition, SecretKeyHandle, SecretMintConfirmStep, SecretMintScreenDefinition, SecretNamespaceDefinition, SecretNamespaceHandle, SecretNamespaceOptions, SecretReveal, SecretRevealField, SecretsEditScreenDefinition, SecretsEditSection, SelectFieldDef, SessionUser, SessionUserOrigin, StackBootRequirement, StreamHandlerDef, StreamHandlerFn, Subscribe, TargetRef, TemplateListVariableDef, TemplateScalarVariableDef, TemplateVariableDef, TemplateVariables, TenantId, TenantWriteTarget, TextFieldDef, ToolbarAction, TranslationEntry, TranslationKeys, TranslationsDef, TranslationValue, TreeAction, TreeActionDef, TreeActionsHandle, TreeChildrenSubscribe, TreeNode, TreeNodeState, UnitKey, UnsafeAppendEventFn, ValidationError, ValidationHookFn, WorkspaceDefinition, WriteEvent, WriteHandlerDef, WriteHandlerFn, WriteResult, } from "./types/index.ts";
|
|
87
|
+
export { DEFAULT_CURRENCIES, DEFAULT_LOCALES, DELIVERY_FAILURE_CODES, DELIVERY_SKIP_REASONS, HookPhases, HTTP_ERROR_CODE_PATTERN, isAgentVisibleScreen, isDeliveryErrorCode, isOpenToAllGranted, resolveAgentExposure, } from "./types/index.ts";
|
|
88
|
+
export type { AwaitedEventType, PipelineBuildCtx, PipelineCtx, PipelineDef, StepBuilder, StepDef, StepFailureStrategy, StepInstance, StepKind, StepNamespace, StepResolver, } from "./types/step.ts";
|
|
89
|
+
export { runValidation } from "./validation.ts";
|
package/dist/engine/index.js
CHANGED
|
@@ -28,6 +28,7 @@ export { createEntityExecutor, defineEntityCreateHandler, defineEntityDeleteHand
|
|
|
28
28
|
// unverändert lauffähig.
|
|
29
29
|
defineEntityQueryHandler, defineEntityRestoreHandler, defineEntityUpdateHandler, defineEntityWriteHandler, defineProjectionQueryHandler, entityListSchema, MAX_LIST_LIMIT, } from "./entity-handlers.js";
|
|
30
30
|
export { declareEscapeHatch } from "./escape-hatch-declaration.js";
|
|
31
|
+
export { createEventDef } from "./event-def.js";
|
|
31
32
|
export { emitEvent, typedPayload } from "./event-helpers.js";
|
|
32
33
|
export { EXT_ASSIGNABLE_ROLE, EXT_DERIVATIVE_OVERLAY_RESOLVER, EXT_DERIVATIVE_PUBLIC_PREDICATE, EXT_DERIVATIVE_RENDERER, EXT_EXTERNAL_RESOURCE, EXT_FILE_PROVIDER, EXT_INFRA_RESOURCE, EXT_PRINCIPAL_STATUS, EXT_SEARCH_ADAPTER, EXT_STORAGE_PROVIDER, EXT_TENANT_DATA, EXT_TENANT_LIFECYCLE_STATUS, EXT_USER_DATA, EXT_USER_DATA_ORDER, FILE_PROVIDER_CONFIG_KEY, FILE_STORAGE_PROVIDER_BOOT_SENTINEL, FILE_STORAGE_PROVIDER_ENV, TENANT_MEMBERSHIPS_QUERY, } from "./extension-names.js";
|
|
33
34
|
export { EXTENSION_SELECTOR_HINT_KEY, extensionSelectorTargets, SELECTED_EXTENSIONS_QUERY, selectablePluginIds, } from "./extension-selector-plugins.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { EntityDefinition } from "./types/index.
|
|
1
|
+
import type { EntityDefinition } from "./types/index.ts";
|
|
2
2
|
export declare function instructionFieldNames(entity: EntityDefinition): readonly string[];
|