@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,4 +1,4 @@
|
|
|
1
|
-
import type { SensitiveFilterConfig, SpanAttributeValue } from "./types/index.
|
|
1
|
+
import type { SensitiveFilterConfig, SpanAttributeValue } from "./types/index.ts";
|
|
2
2
|
export declare const REDACTED = "[REDACTED]";
|
|
3
3
|
export declare const DEFAULT_SENSITIVE_CONFIG: SensitiveFilterConfig;
|
|
4
4
|
export declare function mergeSensitiveConfig(override: Partial<SensitiveFilterConfig> | undefined): SensitiveFilterConfig;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Meter, MetricDefinition } from "./types/index.
|
|
1
|
+
import type { Meter, MetricDefinition } from "./types/index.ts";
|
|
2
2
|
export declare const STANDARD_METRIC_DEFS: readonly MetricDefinition[];
|
|
3
3
|
export declare function registerStandardMetrics(meter: Meter): void;
|
|
4
4
|
export declare function emitHttpRequest(meter: Meter, labels: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { type PrincipalStatusPlugin, type TenantLifecycleStatusPlugin } from "../engine/active-membership.
|
|
2
|
-
import type { TenantId } from "../engine/types/identifiers.
|
|
3
|
-
import type { ActiveMembershipResult, Registry } from "../engine/types/index.
|
|
4
|
-
import { type DispatchContext } from "./dispatch-shared.
|
|
1
|
+
import { type PrincipalStatusPlugin, type TenantLifecycleStatusPlugin } from "../engine/active-membership.ts";
|
|
2
|
+
import type { TenantId } from "../engine/types/identifiers.ts";
|
|
3
|
+
import type { ActiveMembershipResult, Registry } from "../engine/types/index.ts";
|
|
4
|
+
import { type DispatchContext } from "./dispatch-shared.ts";
|
|
5
5
|
export type ActiveMembershipPolicy = {
|
|
6
6
|
readonly allowPendingDestruction: boolean;
|
|
7
7
|
readonly allowUnknownPrincipal: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { DbRunner } from "../db/connection.
|
|
2
|
-
import type { AppendEventArgs, Registry, TenantId } from "../engine/types/index.
|
|
3
|
-
import { type StoredEvent } from "../event-store/event-store.
|
|
1
|
+
import type { DbRunner } from "../db/connection.ts";
|
|
2
|
+
import type { AppendEventArgs, Registry, TenantId } from "../engine/types/index.ts";
|
|
3
|
+
import { type StoredEvent } from "../event-store/event-store.ts";
|
|
4
4
|
export type AppendDomainEventCoreDeps = {
|
|
5
5
|
readonly registry: Registry;
|
|
6
6
|
readonly db: DbRunner;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { AuthClaimsContext, AuthClaimsHookDef, SessionUser } from "../engine/types/index.
|
|
2
|
-
import type { Logger } from "../logging/types.
|
|
1
|
+
import type { AuthClaimsContext, AuthClaimsHookDef, SessionUser } from "../engine/types/index.ts";
|
|
2
|
+
import type { Logger } from "../logging/types.ts";
|
|
3
3
|
export type ResolveAuthClaimsArgs = {
|
|
4
4
|
readonly user: SessionUser;
|
|
5
5
|
readonly hooks: readonly AuthClaimsHookDef[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { TableColumns } from "../db/dialect.
|
|
2
|
-
import type { PreDeleteHookFn, Registry } from "../engine/types/index.
|
|
3
|
-
import type { SystemHookDef } from "./lifecycle-pipeline.
|
|
1
|
+
import type { TableColumns } from "../db/dialect.ts";
|
|
2
|
+
import type { PreDeleteHookFn, Registry } from "../engine/types/index.ts";
|
|
3
|
+
import type { SystemHookDef } from "./lifecycle-pipeline.ts";
|
|
4
4
|
type TableMap = ReadonlyMap<string, TableColumns<any>>;
|
|
5
5
|
export declare function createCascadeDeleteHook(registry: Registry, tables: TableMap): SystemHookDef<PreDeleteHookFn>;
|
|
6
6
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { WriteOrigin } from "@cosmicdrift/kumiko-types/event-store-types";
|
|
2
|
-
import type { SessionUser, WriteResult } from "../engine/types/index.
|
|
3
|
-
import type { BatchCommand, BatchResult, DispatchContext } from "./dispatch-shared.
|
|
2
|
+
import type { SessionUser, WriteResult } from "../engine/types/index.ts";
|
|
3
|
+
import type { BatchCommand, BatchResult, DispatchContext } from "./dispatch-shared.ts";
|
|
4
4
|
export declare function runBatch(ctx: DispatchContext, commands: readonly BatchCommand[], user: SessionUser, requestId?: string, inheritedOrigin?: WriteOrigin): Promise<BatchResult>;
|
|
5
5
|
export declare function unwrapSingle(batchResult: BatchResult): WriteResult;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { DbTx } from "../db/connection.
|
|
2
|
-
import type { SessionUser } from "../engine/types/index.
|
|
3
|
-
import { type DispatchContext, type WriteOrigin } from "./dispatch-shared.
|
|
4
|
-
import type { AfterCommitHook } from "./dispatcher-utils.
|
|
1
|
+
import type { DbTx } from "../db/connection.ts";
|
|
2
|
+
import type { SessionUser } from "../engine/types/index.ts";
|
|
3
|
+
import { type DispatchContext, type WriteOrigin } from "./dispatch-shared.ts";
|
|
4
|
+
import type { AfterCommitHook } from "./dispatcher-utils.ts";
|
|
5
5
|
export declare function executeQuery(ctx: DispatchContext, type: string, payload: unknown, user: SessionUser, origin: WriteOrigin, tx?: DbTx, outerNotifySink?: AfterCommitHook[]): Promise<unknown>;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import type { CacheSyncBus } from "@cosmicdrift/kumiko-types/cache-sync-types";
|
|
2
|
-
import type { SseBroker } from "../api/sse-broker.
|
|
3
|
-
import type { DbConnection, DbTx } from "../db/connection.
|
|
4
|
-
import type { buildEntityTable } from "../db/table-builder.
|
|
5
|
-
import type { defineTransitions } from "../engine/state-machine.
|
|
6
|
-
import type { EffectiveFeaturesResolver } from "../engine/tier-resolver-extension.
|
|
7
|
-
import type { TenantId } from "../engine/types/identifiers.
|
|
8
|
-
import type { AppContext, HandlerContext, JobRunnerRef, PayloadRateLimitOption, RateLimitDeclaration, Registry, SessionUser, WriteResult } from "../engine/types/index.
|
|
9
|
-
import { InternalError, type WriteErrorInfo } from "../errors/index.
|
|
10
|
-
import { type EscapeHatchReportWindow, type getFallbackMeter, getFallbackTracer } from "../observability/index.
|
|
11
|
-
import { type AfterCommitHook } from "./dispatcher-utils.
|
|
12
|
-
import type { IdempotencyGuard } from "./idempotency.
|
|
13
|
-
import type { LifecycleHooks } from "./lifecycle-pipeline.
|
|
14
|
-
import type { TenantTimezoneCache } from "./tenant-timezone-cache.
|
|
15
|
-
import { TENANT_TIMEZONE_CONFIG_KEY } from "./tenant-timezone-config-key.
|
|
16
|
-
import { type WriteOrigin } from "./write-origin.
|
|
17
|
-
export type { WriteOrigin } from "./write-origin.
|
|
2
|
+
import type { SseBroker } from "../api/sse-broker.ts";
|
|
3
|
+
import type { DbConnection, DbTx } from "../db/connection.ts";
|
|
4
|
+
import type { buildEntityTable } from "../db/table-builder.ts";
|
|
5
|
+
import type { defineTransitions } from "../engine/state-machine.ts";
|
|
6
|
+
import type { EffectiveFeaturesResolver } from "../engine/tier-resolver-extension.ts";
|
|
7
|
+
import type { TenantId } from "../engine/types/identifiers.ts";
|
|
8
|
+
import type { AppContext, HandlerContext, JobRunnerRef, PayloadRateLimitOption, RateLimitDeclaration, Registry, SessionUser, WriteResult } from "../engine/types/index.ts";
|
|
9
|
+
import { InternalError, type WriteErrorInfo } from "../errors/index.ts";
|
|
10
|
+
import { type EscapeHatchReportWindow, type getFallbackMeter, getFallbackTracer } from "../observability/index.ts";
|
|
11
|
+
import { type AfterCommitHook } from "./dispatcher-utils.ts";
|
|
12
|
+
import type { IdempotencyGuard } from "./idempotency.ts";
|
|
13
|
+
import type { LifecycleHooks } from "./lifecycle-pipeline.ts";
|
|
14
|
+
import type { TenantTimezoneCache } from "./tenant-timezone-cache.ts";
|
|
15
|
+
import { TENANT_TIMEZONE_CONFIG_KEY } from "./tenant-timezone-config-key.ts";
|
|
16
|
+
import { type WriteOrigin } from "./write-origin.ts";
|
|
17
|
+
export type { WriteOrigin } from "./write-origin.ts";
|
|
18
18
|
export { TENANT_TIMEZONE_CONFIG_KEY };
|
|
19
19
|
export declare const CONFIG_WRITE_SET_TYPE = "config:write:set";
|
|
20
20
|
export declare const CONFIG_WRITE_RESET_TYPE = "config:write:reset";
|
|
@@ -62,7 +62,7 @@ export declare function buildHandlerContext(ctx: DispatchContext, type: string,
|
|
|
62
62
|
export declare function createHandlerBoundDigest(digest: (value: string) => string, handlerName: string): (value: string) => string;
|
|
63
63
|
export declare function runHandlerInstrumented<T>(ctx: DispatchContext, type: string, operation: "query" | "write" | "stream", user: SessionUser, inner: () => Promise<T>): Promise<T>;
|
|
64
64
|
export declare function runStreamInstrumented<T>(ctx: DispatchContext, type: string, user: SessionUser, inner: () => AsyncGenerator<T>): AsyncGenerator<T>;
|
|
65
|
-
export declare function checkFeatureEnabled(ctx: DispatchContext, qualifiedHandler: string, tenantId: TenantId): Promise<import("../errors/index.
|
|
65
|
+
export declare function checkFeatureEnabled(ctx: DispatchContext, qualifiedHandler: string, tenantId: TenantId): Promise<import("../errors/index.ts").FeatureDisabledError | undefined>;
|
|
66
66
|
export declare function ensureFeatureEnabled(ctx: DispatchContext, qualifiedHandler: string, tenantId: TenantId): Promise<void>;
|
|
67
67
|
export declare function enforceRateLimit(ctx: DispatchContext, rateLimit: RateLimitDeclaration | undefined, handlerName: string, user: SessionUser, isSystemScope: boolean): Promise<void>;
|
|
68
68
|
export declare function enforcePayloadRateLimits(ctx: DispatchContext, limits: readonly PayloadRateLimitOption[] | undefined, handlerName: string, user: SessionUser, data: unknown): Promise<void>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { SessionUser } from "../engine/types/index.
|
|
2
|
-
import { type DispatchContext, type WriteOrigin } from "./dispatch-shared.
|
|
1
|
+
import type { SessionUser } from "../engine/types/index.ts";
|
|
2
|
+
import { type DispatchContext, type WriteOrigin } from "./dispatch-shared.ts";
|
|
3
3
|
export type StreamOptions = {
|
|
4
4
|
/** JWT exp (epoch seconds) the stream was opened with; the stream ends when it passes. */
|
|
5
5
|
readonly tokenExpiresAtSec?: number | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { DbTx } from "../db/connection.
|
|
2
|
-
import type { SessionUser, WriteResult } from "../engine/types/index.
|
|
3
|
-
import type { DispatchContext, WriteOrigin } from "./dispatch-shared.
|
|
4
|
-
import { type AfterCommitHook } from "./dispatcher-utils.
|
|
1
|
+
import type { DbTx } from "../db/connection.ts";
|
|
2
|
+
import type { SessionUser, WriteResult } from "../engine/types/index.ts";
|
|
3
|
+
import type { DispatchContext, WriteOrigin } from "./dispatch-shared.ts";
|
|
4
|
+
import { type AfterCommitHook } from "./dispatcher-utils.ts";
|
|
5
5
|
export declare function executeWrite(ctx: DispatchContext, type: string, payload: unknown, user: SessionUser, origin: WriteOrigin, tx: DbTx | undefined, afterCommitHooks: AfterCommitHook[]): Promise<WriteResult>;
|
|
6
6
|
export declare function executeNestedWrite(ctx: DispatchContext, type: string, payload: unknown, user: SessionUser, origin: WriteOrigin, tx: DbTx | undefined, afterCommitHooks: AfterCommitHook[]): Promise<WriteResult>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { HandlerRef, LifecycleResult, Registry, SessionUser, WriteResult } from "../engine/types/index.
|
|
2
|
-
import { type KumikoError, type WriteErrorInfo } from "../errors/index.
|
|
1
|
+
import type { HandlerRef, LifecycleResult, Registry, SessionUser, WriteResult } from "../engine/types/index.ts";
|
|
2
|
+
import { type KumikoError, type WriteErrorInfo } from "../errors/index.ts";
|
|
3
3
|
export type FailedWriteResult = Extract<WriteResult, {
|
|
4
4
|
isSuccess: false;
|
|
5
5
|
}>;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import type { CacheSyncBus } from "@cosmicdrift/kumiko-types/cache-sync-types";
|
|
2
|
-
import type { SseBroker } from "../api/sse-broker.
|
|
3
|
-
import type { DbConnection } from "../db/connection.
|
|
4
|
-
import type { EffectiveFeaturesResolver } from "../engine/tier-resolver-extension.
|
|
5
|
-
import type { TenantId } from "../engine/types/identifiers.
|
|
6
|
-
import type { ActiveMembershipResult, AppContext, DispatchWriteRef, JobRunnerRef, MemberReader, Registry, SessionUser, WriteResult } from "../engine/types/index.
|
|
7
|
-
import type { BatchCommand, BatchResult } from "./dispatch-shared.
|
|
8
|
-
import { type StreamOptions } from "./dispatch-stream.
|
|
9
|
-
import { type HandlerType } from "./dispatcher-utils.
|
|
10
|
-
import type { IdempotencyGuard } from "./idempotency.
|
|
11
|
-
import type { LifecycleHooks } from "./lifecycle-pipeline.
|
|
12
|
-
export type { WriteResult } from "../engine/types/index.
|
|
13
|
-
export type { BatchCommand, BatchResult } from "./dispatch-shared.
|
|
2
|
+
import type { SseBroker } from "../api/sse-broker.ts";
|
|
3
|
+
import type { DbConnection } from "../db/connection.ts";
|
|
4
|
+
import type { EffectiveFeaturesResolver } from "../engine/tier-resolver-extension.ts";
|
|
5
|
+
import type { TenantId } from "../engine/types/identifiers.ts";
|
|
6
|
+
import type { ActiveMembershipResult, AppContext, DispatchWriteRef, JobRunnerRef, MemberReader, Registry, SessionUser, WriteResult } from "../engine/types/index.ts";
|
|
7
|
+
import type { BatchCommand, BatchResult } from "./dispatch-shared.ts";
|
|
8
|
+
import { type StreamOptions } from "./dispatch-stream.ts";
|
|
9
|
+
import { type HandlerType } from "./dispatcher-utils.ts";
|
|
10
|
+
import type { IdempotencyGuard } from "./idempotency.ts";
|
|
11
|
+
import type { LifecycleHooks } from "./lifecycle-pipeline.ts";
|
|
12
|
+
export type { WriteResult } from "../engine/types/index.ts";
|
|
13
|
+
export type { BatchCommand, BatchResult } from "./dispatch-shared.ts";
|
|
14
14
|
export type DispatcherOptions = {
|
|
15
15
|
idempotency?: IdempotencyGuard;
|
|
16
16
|
lifecycle?: LifecycleHooks;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="temporal-polyfill/global" preserve="true" />
|
|
2
|
-
import type { DbConnection } from "../db/connection.
|
|
2
|
+
import type { DbConnection } from "../db/connection.ts";
|
|
3
3
|
export type ConsumerRecoveryState = {
|
|
4
4
|
readonly name: string;
|
|
5
5
|
readonly instanceId: string;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/// <reference types="temporal-polyfill/global" preserve="true" />
|
|
2
2
|
import { Temporal } from "@cosmicdrift/kumiko-types/temporal";
|
|
3
|
-
import type { DbConnection, DbRunner, DbTx } from "../db/connection.
|
|
4
|
-
import { type PendingIdRange } from "../db/queries/event-store.
|
|
5
|
-
import type { AppContext } from "../engine/types/index.
|
|
6
|
-
import { type Meter } from "../observability/index.
|
|
7
|
-
import { type PendingGapEntry } from "./event-consumer-state.
|
|
8
|
-
import type { EventConsumer } from "./event-dispatcher.
|
|
3
|
+
import type { DbConnection, DbRunner, DbTx } from "../db/connection.ts";
|
|
4
|
+
import { type PendingIdRange } from "../db/queries/event-store.ts";
|
|
5
|
+
import type { AppContext } from "../engine/types/index.ts";
|
|
6
|
+
import { type Meter } from "../observability/index.ts";
|
|
7
|
+
import { type PendingGapEntry } from "./event-consumer-state.ts";
|
|
8
|
+
import type { EventConsumer } from "./event-dispatcher.ts";
|
|
9
9
|
export type ConsumerStateRowShape = {
|
|
10
10
|
readonly name: string;
|
|
11
11
|
readonly instanceId: string;
|
|
@@ -28,7 +28,7 @@ export type StoredEventRow = {
|
|
|
28
28
|
readonly type: string;
|
|
29
29
|
readonly eventVersion: number;
|
|
30
30
|
readonly payload: Record<string, unknown>;
|
|
31
|
-
readonly metadata: import("../event-store/event-store.
|
|
31
|
+
readonly metadata: import("../event-store/event-store.ts").EventMetadata;
|
|
32
32
|
readonly createdAt: Temporal.Instant;
|
|
33
33
|
readonly createdBy: string;
|
|
34
34
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { PgListenClient } from "../db/connection.
|
|
2
|
-
import type { AppContext } from "../engine/types/index.
|
|
3
|
-
import { type StoredEvent } from "../event-store/index.
|
|
4
|
-
import { type Meter, type Tracer } from "../observability/index.
|
|
1
|
+
import type { PgListenClient } from "../db/connection.ts";
|
|
2
|
+
import type { AppContext } from "../engine/types/index.ts";
|
|
3
|
+
import { type StoredEvent } from "../event-store/index.ts";
|
|
4
|
+
import { type Meter, type Tracer } from "../observability/index.ts";
|
|
5
5
|
export type EventConsumerHandler = (event: StoredEvent, ctx: AppContext) => Promise<void>;
|
|
6
6
|
export type EventConsumerBatchHandler = (events: readonly StoredEvent[], ctx: AppContext) => Promise<void>;
|
|
7
7
|
export type EventConsumerErrorPolicy = {
|
|
@@ -35,7 +35,7 @@ export type EventDispatcher = {
|
|
|
35
35
|
readonly consumers: readonly EventConsumer[];
|
|
36
36
|
};
|
|
37
37
|
export type EventDispatcherOptions = {
|
|
38
|
-
readonly db: import("../db/connection.
|
|
38
|
+
readonly db: import("../db/connection.ts").DbConnection;
|
|
39
39
|
readonly consumers: readonly EventConsumer[];
|
|
40
40
|
readonly context: AppContext;
|
|
41
41
|
readonly batchSize?: number;
|
|
@@ -49,5 +49,5 @@ export type EventDispatcherOptions = {
|
|
|
49
49
|
readonly pgClient?: PgListenClient;
|
|
50
50
|
};
|
|
51
51
|
export declare function createEventDispatcher(options: EventDispatcherOptions): EventDispatcher;
|
|
52
|
-
export type { ConsumerProgress, ConsumerRecoveryState } from "./event-dispatcher-admin.
|
|
53
|
-
export { disableConsumer, enableConsumer, getAllConsumerProgress, getConsumerState, listConsumersWithState, restartConsumer, skipPoisonEvent, } from "./event-dispatcher-admin.
|
|
52
|
+
export type { ConsumerProgress, ConsumerRecoveryState } from "./event-dispatcher-admin.ts";
|
|
53
|
+
export { disableConsumer, enableConsumer, getAllConsumerProgress, getConsumerState, listConsumersWithState, restartConsumer, skipPoisonEvent, } from "./event-dispatcher-admin.ts";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="temporal-polyfill/global" preserve="true" />
|
|
2
|
-
import type { DbConnection } from "../db/connection.
|
|
2
|
+
import type { DbConnection } from "../db/connection.ts";
|
|
3
3
|
export type PruneEventsOptions = {
|
|
4
4
|
readonly olderThan?: Temporal.Instant;
|
|
5
5
|
readonly olderThanDays?: number;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { SessionUser } from "../engine/types/index.
|
|
2
|
-
import { type KumikoError } from "../errors/index.
|
|
1
|
+
import type { SessionUser } from "../engine/types/index.ts";
|
|
2
|
+
import { type KumikoError } from "../errors/index.ts";
|
|
3
3
|
export declare function handlerAccessError(user: Pick<SessionUser, "roles">, type: string): KumikoError;
|
package/dist/pipeline/index.d.ts
CHANGED
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
export type { EscapeHatchReportWindow } from "../observability/escape-hatch-report.
|
|
2
|
-
export { createEscapeHatchReporter, createEscapeHatchReportWindow, ESCAPE_HATCH_USED_SIGNAL, fallbackEscapeHatchReporter, flushEscapeHatchAudits, reportEscapeHatchUse, UNATTRIBUTED_ACTOR, withEscapeHatchAuditScope, } from "../observability/escape-hatch-report.
|
|
3
|
-
export { normalizePayloadBucketValue } from "../rate-limit/bucket.
|
|
4
|
-
export type { AppendDomainEventCoreDeps } from "./append-event-core.
|
|
5
|
-
export { appendDomainEventCore } from "./append-event-core.
|
|
6
|
-
export type { ResolveAuthClaimsArgs } from "./auth-claims-resolver.
|
|
7
|
-
export { resolveAuthClaims } from "./auth-claims-resolver.
|
|
8
|
-
export { createCascadeDeleteHook } from "./cascade-handler.
|
|
9
|
-
export type { Dispatcher } from "./dispatcher.
|
|
10
|
-
export { createDispatcher, dispatcherToWriteRef } from "./dispatcher.
|
|
11
|
-
export type { FailedWriteResult } from "./dispatcher-utils.
|
|
12
|
-
export { isFailedWriteResult } from "./dispatcher-utils.
|
|
13
|
-
export type { DistributedLock } from "./distributed-lock.
|
|
14
|
-
export { createDistributedLock } from "./distributed-lock.
|
|
15
|
-
export type { EntityCache, EntityCacheOptions } from "./entity-cache.
|
|
16
|
-
export { createEntityCache } from "./entity-cache.
|
|
17
|
-
export type { ConsumerStatus, PendingGapEntry } from "./event-consumer-state.
|
|
18
|
-
export { ConsumerStatuses, createEventConsumerStateTable, eventConsumerStateTable, SHARED_INSTANCE_SENTINEL, } from "./event-consumer-state.
|
|
19
|
-
export type { EventDedup } from "./event-dedup.
|
|
20
|
-
export { createEventDedup } from "./event-dedup.
|
|
21
|
-
export type { ConsumerProgress, ConsumerRecoveryState, DispatcherPassResult, EventConsumer, EventConsumerBatchHandler, EventConsumerHandler, EventDispatcher, EventDispatcherOptions, } from "./event-dispatcher.
|
|
22
|
-
export { createEventDispatcher, disableConsumer, enableConsumer, getAllConsumerProgress, getConsumerState, listConsumersWithState, restartConsumer, skipPoisonEvent, } from "./event-dispatcher.
|
|
23
|
-
export type { ConsumerCursor } from "./event-dispatcher-delivery.
|
|
24
|
-
export { selectConsumerCursorForUpdate } from "./event-dispatcher-delivery.
|
|
25
|
-
export type { PruneEventsOptions, PruneEventsResult } from "./event-retention.
|
|
26
|
-
export { ConsumerLagError, pruneEvents } from "./event-retention.
|
|
27
|
-
export type { IdempotencyGuard } from "./idempotency.
|
|
28
|
-
export { createIdempotencyGuard } from "./idempotency.
|
|
29
|
-
export { assertInstructionFieldWriteAllowed, assertIrreversibleOperationAllowed, isIrreversibleEntityVerb, } from "./irreversible-operation-gate.
|
|
30
|
-
export type { LifecycleHooks, SystemHookDef, SystemHooks } from "./lifecycle-pipeline.
|
|
31
|
-
export { createLifecycleHooks } from "./lifecycle-pipeline.
|
|
32
|
-
export type { MspRebuildDeps } from "./msp-rebuild.
|
|
33
|
-
export { rebuildMultiStreamProjection } from "./msp-rebuild.
|
|
34
|
-
export type { MultiStreamApplyContext, MultiStreamApplyContextDeps, } from "./multi-stream-apply-context.
|
|
35
|
-
export { createMultiStreamApplyContext } from "./multi-stream-apply-context.
|
|
36
|
-
export { assertNotifyTargetsOwnTenant, createDeferringNotify } from "./notify-scope.
|
|
37
|
-
export type { ProjectionProgress, RebuildResult } from "./projection-rebuild.
|
|
38
|
-
export { getAllProjectionProgress, getProjectionState, listProjectionsWithState, rebuildProjection, } from "./projection-rebuild.
|
|
39
|
-
export type { ProjectionStatus } from "./projection-state.
|
|
40
|
-
export { createProjectionStateTable, ProjectionStatuses, projectionStateTable, } from "./projection-state.
|
|
41
|
-
export { runProjectionsForEvent } from "./projections-runner.
|
|
42
|
-
export { ACCESS_INVALIDATION_CONSUMER_NAME, createAccessInvalidationEventConsumer, createSearchEventConsumer, createSseBroadcastEventConsumer, SEARCH_CONSUMER_NAME, SSE_BROADCAST_CONSUMER_NAME, } from "./system-hooks.
|
|
1
|
+
export type { EscapeHatchReportWindow } from "../observability/escape-hatch-report.ts";
|
|
2
|
+
export { createEscapeHatchReporter, createEscapeHatchReportWindow, ESCAPE_HATCH_USED_SIGNAL, fallbackEscapeHatchReporter, flushEscapeHatchAudits, reportEscapeHatchUse, UNATTRIBUTED_ACTOR, withEscapeHatchAuditScope, } from "../observability/escape-hatch-report.ts";
|
|
3
|
+
export { normalizePayloadBucketValue } from "../rate-limit/bucket.ts";
|
|
4
|
+
export type { AppendDomainEventCoreDeps } from "./append-event-core.ts";
|
|
5
|
+
export { appendDomainEventCore } from "./append-event-core.ts";
|
|
6
|
+
export type { ResolveAuthClaimsArgs } from "./auth-claims-resolver.ts";
|
|
7
|
+
export { resolveAuthClaims } from "./auth-claims-resolver.ts";
|
|
8
|
+
export { createCascadeDeleteHook } from "./cascade-handler.ts";
|
|
9
|
+
export type { Dispatcher } from "./dispatcher.ts";
|
|
10
|
+
export { createDispatcher, dispatcherToWriteRef } from "./dispatcher.ts";
|
|
11
|
+
export type { FailedWriteResult } from "./dispatcher-utils.ts";
|
|
12
|
+
export { isFailedWriteResult } from "./dispatcher-utils.ts";
|
|
13
|
+
export type { DistributedLock } from "./distributed-lock.ts";
|
|
14
|
+
export { createDistributedLock } from "./distributed-lock.ts";
|
|
15
|
+
export type { EntityCache, EntityCacheOptions } from "./entity-cache.ts";
|
|
16
|
+
export { createEntityCache } from "./entity-cache.ts";
|
|
17
|
+
export type { ConsumerStatus, PendingGapEntry } from "./event-consumer-state.ts";
|
|
18
|
+
export { ConsumerStatuses, createEventConsumerStateTable, eventConsumerStateTable, SHARED_INSTANCE_SENTINEL, } from "./event-consumer-state.ts";
|
|
19
|
+
export type { EventDedup } from "./event-dedup.ts";
|
|
20
|
+
export { createEventDedup } from "./event-dedup.ts";
|
|
21
|
+
export type { ConsumerProgress, ConsumerRecoveryState, DispatcherPassResult, EventConsumer, EventConsumerBatchHandler, EventConsumerHandler, EventDispatcher, EventDispatcherOptions, } from "./event-dispatcher.ts";
|
|
22
|
+
export { createEventDispatcher, disableConsumer, enableConsumer, getAllConsumerProgress, getConsumerState, listConsumersWithState, restartConsumer, skipPoisonEvent, } from "./event-dispatcher.ts";
|
|
23
|
+
export type { ConsumerCursor } from "./event-dispatcher-delivery.ts";
|
|
24
|
+
export { selectConsumerCursorForUpdate } from "./event-dispatcher-delivery.ts";
|
|
25
|
+
export type { PruneEventsOptions, PruneEventsResult } from "./event-retention.ts";
|
|
26
|
+
export { ConsumerLagError, pruneEvents } from "./event-retention.ts";
|
|
27
|
+
export type { IdempotencyGuard } from "./idempotency.ts";
|
|
28
|
+
export { createIdempotencyGuard } from "./idempotency.ts";
|
|
29
|
+
export { assertInstructionFieldWriteAllowed, assertIrreversibleOperationAllowed, isIrreversibleEntityVerb, } from "./irreversible-operation-gate.ts";
|
|
30
|
+
export type { LifecycleHooks, SystemHookDef, SystemHooks } from "./lifecycle-pipeline.ts";
|
|
31
|
+
export { createLifecycleHooks } from "./lifecycle-pipeline.ts";
|
|
32
|
+
export type { MspRebuildDeps } from "./msp-rebuild.ts";
|
|
33
|
+
export { rebuildMultiStreamProjection } from "./msp-rebuild.ts";
|
|
34
|
+
export type { MultiStreamApplyContext, MultiStreamApplyContextDeps, } from "./multi-stream-apply-context.ts";
|
|
35
|
+
export { createMultiStreamApplyContext } from "./multi-stream-apply-context.ts";
|
|
36
|
+
export { assertNotifyTargetsOwnTenant, createDeferringNotify } from "./notify-scope.ts";
|
|
37
|
+
export type { ProjectionProgress, RebuildResult } from "./projection-rebuild.ts";
|
|
38
|
+
export { getAllProjectionProgress, getProjectionState, listProjectionsWithState, rebuildProjection, } from "./projection-rebuild.ts";
|
|
39
|
+
export type { ProjectionStatus } from "./projection-state.ts";
|
|
40
|
+
export { createProjectionStateTable, ProjectionStatuses, projectionStateTable, } from "./projection-state.ts";
|
|
41
|
+
export { runProjectionsForEvent } from "./projections-runner.ts";
|
|
42
|
+
export { ACCESS_INVALIDATION_CONSUMER_NAME, createAccessInvalidationEventConsumer, createSearchEventConsumer, createSseBroadcastEventConsumer, SEARCH_CONSUMER_NAME, SSE_BROADCAST_CONSUMER_NAME, } from "./system-hooks.ts";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { EntityDefinition } from "../engine/types/index.
|
|
1
|
+
import type { EntityDefinition } from "../engine/types/index.ts";
|
|
2
2
|
export declare function isIrreversibleEntityVerb(verb: "delete" | "forget", entity: EntityDefinition): boolean;
|
|
3
3
|
export declare function assertIrreversibleOperationAllowed(operation: string): void;
|
|
4
4
|
export declare function assertInstructionFieldWriteAllowed(entityName: string, verb: "create" | "update", writtenFieldNames: readonly string[], instructionFieldNames: readonly string[]): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { AppContext, DeleteContext, HookPhase, PostDeleteBatchHookFn, PostDeleteHookFn, PostSaveBatchHookFn, PostSaveHookFn, PreDeleteHookFn, PreSaveHookFn, Registry, SaveContext } from "../engine/types/index.
|
|
2
|
-
import type { EventDedup } from "./event-dedup.
|
|
1
|
+
import type { AppContext, DeleteContext, HookPhase, PostDeleteBatchHookFn, PostDeleteHookFn, PostSaveBatchHookFn, PostSaveHookFn, PreDeleteHookFn, PreSaveHookFn, Registry, SaveContext } from "../engine/types/index.ts";
|
|
2
|
+
import type { EventDedup } from "./event-dedup.ts";
|
|
3
3
|
export type SystemHookDef<TFn> = {
|
|
4
4
|
readonly name: string;
|
|
5
5
|
readonly priority: number;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { DbTx } from "../db/connection.
|
|
2
|
-
import { type DispatchContext } from "./dispatch-shared.
|
|
1
|
+
import type { DbTx } from "../db/connection.ts";
|
|
2
|
+
import { type DispatchContext } from "./dispatch-shared.ts";
|
|
3
3
|
export declare function runInMemberReadOnlyTransaction<T>(ctx: DispatchContext, tx: DbTx | undefined, fn: (readOnlyTx: DbTx) => Promise<T>): Promise<T>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { DbTx } from "../db/connection.
|
|
2
|
-
import type { TenantId } from "../engine/types/identifiers.
|
|
3
|
-
import type { MemberReader } from "../engine/types/index.
|
|
4
|
-
import { type ActiveMembershipPolicy } from "./active-membership.
|
|
5
|
-
import { type DispatchContext } from "./dispatch-shared.
|
|
1
|
+
import type { DbTx } from "../db/connection.ts";
|
|
2
|
+
import type { TenantId } from "../engine/types/identifiers.ts";
|
|
3
|
+
import type { MemberReader } from "../engine/types/index.ts";
|
|
4
|
+
import { type ActiveMembershipPolicy } from "./active-membership.ts";
|
|
5
|
+
import { type DispatchContext } from "./dispatch-shared.ts";
|
|
6
6
|
export declare const BACKGROUND_READ_POLICY: ActiveMembershipPolicy;
|
|
7
7
|
export declare function createMemberReaderFn(ctx: DispatchContext, tenantId: TenantId, tx?: DbTx): MemberReader;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { DbConnection } from "../db/connection.
|
|
2
|
-
import type { Registry } from "../engine/types/index.
|
|
3
|
-
import type { Meter } from "../observability/types/metric.
|
|
4
|
-
import type { RebuildResult } from "./projection-rebuild.
|
|
1
|
+
import type { DbConnection } from "../db/connection.ts";
|
|
2
|
+
import type { Registry } from "../engine/types/index.ts";
|
|
3
|
+
import type { Meter } from "../observability/types/metric.ts";
|
|
4
|
+
import type { RebuildResult } from "./projection-rebuild.ts";
|
|
5
5
|
export type MspRebuildDeps = {
|
|
6
6
|
readonly db: DbConnection;
|
|
7
7
|
readonly registry: Registry;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { DerivativesContext } from "@cosmicdrift/kumiko-types/derivatives-types";
|
|
2
2
|
import type { MultiStreamApplyContext } from "@cosmicdrift/kumiko-types/multi-stream-apply-context-types";
|
|
3
3
|
import type { SecretsContext } from "@cosmicdrift/kumiko-types/secrets-types";
|
|
4
|
-
import type { DbRunner } from "../db/connection.
|
|
5
|
-
import type { Registry, TenantId } from "../engine/types/index.
|
|
6
|
-
import type { FileContext } from "../files/file-handle.
|
|
4
|
+
import type { DbRunner } from "../db/connection.ts";
|
|
5
|
+
import type { Registry, TenantId } from "../engine/types/index.ts";
|
|
6
|
+
import type { FileContext } from "../files/file-handle.ts";
|
|
7
7
|
export type { MultiStreamApplyContext } from "@cosmicdrift/kumiko-types/multi-stream-apply-context-types";
|
|
8
8
|
export type MultiStreamApplyContextDeps = {
|
|
9
9
|
readonly registry: Registry;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { TenantId } from "../engine/types/identifiers.
|
|
2
|
-
import type { NotifyFn, NotifyOptions, Registry } from "../engine/types/index.
|
|
3
|
-
import type { AfterCommitHook } from "./dispatcher-utils.
|
|
1
|
+
import type { TenantId } from "../engine/types/identifiers.ts";
|
|
2
|
+
import type { NotifyFn, NotifyOptions, Registry } from "../engine/types/index.ts";
|
|
3
|
+
import type { AfterCommitHook } from "./dispatcher-utils.ts";
|
|
4
4
|
export declare function assertNotifyTargetsOwnTenant(options: NotifyOptions, tenantId: TenantId): void;
|
|
5
5
|
type DeferringNotifyDeps = {
|
|
6
6
|
readonly registry: Pick<Registry, "getAllNotifications"> | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { PendingIdRange } from "../db/queries/event-store.
|
|
2
|
-
import type { PendingGapEntry } from "./event-consumer-state.
|
|
1
|
+
import type { PendingIdRange } from "../db/queries/event-store.ts";
|
|
2
|
+
import type { PendingGapEntry } from "./event-consumer-state.ts";
|
|
3
3
|
export declare function toIdRanges(gaps: readonly PendingGapEntry[]): PendingIdRange[];
|
|
4
4
|
export declare function rangeContainsId(range: PendingGapEntry, id: bigint): boolean;
|
|
5
5
|
export declare function isRangeFullyCoveredByFetch(range: PendingGapEntry, truncated: boolean, maxFetchedId: bigint | null): boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { SessionUser, WriteHandlerDef } from "../engine/types/index.
|
|
2
|
-
import { type WriteFailure } from "../errors/index.
|
|
3
|
-
import type { DispatchContext } from "./dispatch-shared.
|
|
1
|
+
import type { SessionUser, WriteHandlerDef } from "../engine/types/index.ts";
|
|
2
|
+
import { type WriteFailure } from "../errors/index.ts";
|
|
3
|
+
import type { DispatchContext } from "./dispatch-shared.ts";
|
|
4
4
|
export type PreHandlerGateMode = "charge" | "recheck";
|
|
5
5
|
export type PreHandlerGateResult = {
|
|
6
6
|
readonly isSuccess: true;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { ReservationHandle } from "@cosmicdrift/kumiko-types/handlers";
|
|
2
|
-
import type { SessionUser, WriteHandlerDef } from "../engine/types/index.
|
|
3
|
-
import { type WriteErrorInfo } from "../errors/index.
|
|
4
|
-
import type { BatchCommand, DispatchContext } from "./dispatch-shared.
|
|
5
|
-
import type { WriteOrigin } from "./write-origin.
|
|
2
|
+
import type { SessionUser, WriteHandlerDef } from "../engine/types/index.ts";
|
|
3
|
+
import { type WriteErrorInfo } from "../errors/index.ts";
|
|
4
|
+
import type { BatchCommand, DispatchContext } from "./dispatch-shared.ts";
|
|
5
|
+
import type { WriteOrigin } from "./write-origin.ts";
|
|
6
6
|
type ReservationConfirm = ReservationHandle["confirmInTransaction"];
|
|
7
7
|
export type ConsumedReservation = {
|
|
8
8
|
readonly confirmInTransaction: ReservationConfirm | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="temporal-polyfill/global" preserve="true" />
|
|
2
|
-
import type { DbConnection } from "../db/connection.
|
|
3
|
-
import type { Registry } from "../engine/types/index.
|
|
4
|
-
import type { Meter } from "../observability/types/metric.
|
|
2
|
+
import type { DbConnection } from "../db/connection.ts";
|
|
3
|
+
import type { Registry } from "../engine/types/index.ts";
|
|
4
|
+
import type { Meter } from "../observability/types/metric.ts";
|
|
5
5
|
export declare const REBUILD_BATCH_SIZE = 1000;
|
|
6
6
|
export type RebuildResult = {
|
|
7
7
|
readonly projection: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DbConnection } from "../db/connection.
|
|
1
|
+
import type { DbConnection } from "../db/connection.ts";
|
|
2
2
|
export declare const projectionStateTable: import("@cosmicdrift/kumiko-types/schema-table-types").SchemaTable;
|
|
3
3
|
export declare const ProjectionStatuses: {
|
|
4
4
|
readonly idle: "idle";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { DbRunner } from "../db/index.
|
|
2
|
-
import type { LifecycleResult, Registry } from "../engine/types/index.
|
|
3
|
-
import type { StoredEvent } from "../event-store/index.
|
|
1
|
+
import type { DbRunner } from "../db/index.ts";
|
|
2
|
+
import type { LifecycleResult, Registry } from "../engine/types/index.ts";
|
|
3
|
+
import type { StoredEvent } from "../event-store/index.ts";
|
|
4
4
|
export declare function runProjections(result: LifecycleResult, registry: Registry, runner: DbRunner | undefined): Promise<void>;
|
|
5
5
|
export declare function hasLiveProjectionsForEvent(event: StoredEvent, registry: Registry): boolean;
|
|
6
6
|
export declare function runProjectionsForEvent(event: StoredEvent, registry: Registry, tx: DbRunner): Promise<void>;
|
|
@@ -12,16 +12,15 @@ import { InternalError } from "../errors/index.js";
|
|
|
12
12
|
// through the dispatcher gets its projections, no opt-in needed.
|
|
13
13
|
//
|
|
14
14
|
// Contracts:
|
|
15
|
-
// - Projections receive the exact StoredEvent from the executor.
|
|
16
|
-
// hand-craft a SaveContext (tests, non-executor writes), just don't set
|
|
17
|
-
// `event` and the runner no-ops.
|
|
15
|
+
// - Projections receive the exact StoredEvent from the executor.
|
|
18
16
|
// - `runner` is the caller's already-resolved DbRunner — projections-runner
|
|
19
17
|
// has no TenantDb access of its own to derive one from.
|
|
20
18
|
// - Apply-function throws bubble up unchanged. The dispatcher wraps the
|
|
21
19
|
// whole lifecycle in a try/catch that rolls the tx back; the event is
|
|
22
20
|
// gone from the events table just like a rolled-back state change.
|
|
23
21
|
export async function runProjections(result, registry, runner) {
|
|
24
|
-
// skip:
|
|
22
|
+
// skip: isLifecycleResult only checks `kind`, so an untyped handler result
|
|
23
|
+
// shaped like a lifecycle result can still arrive without its event
|
|
25
24
|
if (!result.event)
|
|
26
25
|
return;
|
|
27
26
|
if (!runner) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { type SseBroker } from "../api/sse-broker.
|
|
2
|
-
import type { EntityId, JobRunnerRef, Registry, TenantId } from "../engine/types/index.
|
|
3
|
-
import type { SearchAdapter, SearchDocument } from "../search/types.
|
|
4
|
-
import type { EventConsumer } from "./event-dispatcher.
|
|
1
|
+
import { type SseBroker } from "../api/sse-broker.ts";
|
|
2
|
+
import type { EntityId, JobRunnerRef, Registry, TenantId } from "../engine/types/index.ts";
|
|
3
|
+
import type { SearchAdapter, SearchDocument } from "../search/types.ts";
|
|
4
|
+
import type { EventConsumer } from "./event-dispatcher.ts";
|
|
5
5
|
export declare const SEARCH_CONSUMER_NAME = "system:consumer:search";
|
|
6
6
|
export type SearchOperation = {
|
|
7
7
|
readonly kind: "index";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { TenantId } from "../engine/types/identifiers.
|
|
2
|
-
import type { ActiveMembershipResult, EscapeHatchDeclaration, EscapeHatchReporter, HandlerContext, LifecycleHookFn, MemberReader, SessionUser, WriteResult } from "../engine/types/index.
|
|
3
|
-
import { AccessDeniedError } from "../errors/index.
|
|
1
|
+
import type { TenantId } from "../engine/types/identifiers.ts";
|
|
2
|
+
import type { ActiveMembershipResult, EscapeHatchDeclaration, EscapeHatchReporter, HandlerContext, LifecycleHookFn, MemberReader, SessionUser, WriteResult } from "../engine/types/index.ts";
|
|
3
|
+
import { AccessDeniedError } from "../errors/index.ts";
|
|
4
4
|
export type QueryAsFn = (user: SessionUser, qn: string, payload: unknown) => Promise<unknown>;
|
|
5
5
|
export type WriteAsFn = (user: SessionUser, qn: string, payload: unknown) => Promise<WriteResult>;
|
|
6
6
|
export type ResolveActiveMembershipFn = (userId: string, tenantId: TenantId) => Promise<ActiveMembershipResult>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isPersonalDataGated, type WriteOrigin } from "@cosmicdrift/kumiko-types/event-store-types";
|
|
2
|
-
import { type PersonalDataGate } from "../db/tenant-db.
|
|
3
|
-
import type { Registry, SessionUser } from "../engine/types/index.
|
|
4
|
-
import { AccessDeniedError } from "../errors/index.
|
|
2
|
+
import { type PersonalDataGate } from "../db/tenant-db.ts";
|
|
3
|
+
import type { Registry, SessionUser } from "../engine/types/index.ts";
|
|
4
|
+
import { AccessDeniedError } from "../errors/index.ts";
|
|
5
5
|
export { isPersonalDataGated, type WriteOrigin };
|
|
6
6
|
export declare function effectiveWriteOrigin(root: WriteOrigin, inherited?: WriteOrigin): WriteOrigin;
|
|
7
7
|
export declare function parseWriteOrigin(value: unknown): WriteOrigin | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { WriteResult } from "../engine/types/index.
|
|
2
|
-
import type { BatchCommand, BatchResult, DispatchContext } from "./dispatch-shared.
|
|
1
|
+
import type { WriteResult } from "../engine/types/index.ts";
|
|
2
|
+
import type { BatchCommand, BatchResult, DispatchContext } from "./dispatch-shared.ts";
|
|
3
3
|
type EntityLookup = Pick<DispatchContext["registry"], "getHandlerEntity" | "getEntity">;
|
|
4
4
|
export declare function maskWriteResultForClient(registry: EntityLookup, handlerType: string, result: WriteResult): WriteResult;
|
|
5
5
|
export declare function maskBatchResultForClient(registry: EntityLookup, commands: readonly BatchCommand[], batch: BatchResult): BatchResult;
|