@wildo-ai/saas-backend-lib 1.1.3 → 1.1.4
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/dist/esm/__tests__/fixture-deep-partial.d.ts.map +1 -1
- package/dist/esm/__tests__/integration/redis-integration-gate.d.ts.map +1 -1
- package/dist/esm/__tests__/setup.d.ts.map +1 -1
- package/dist/esm/__tests__/test-container.d.ts.map +1 -1
- package/dist/esm/applications/models/applications.backend.schemas.d.ts.map +1 -1
- package/dist/esm/applications/seeds/application-metadata-defaults.seeds.d.ts.map +1 -1
- package/dist/esm/applications/services/worker-remote-client-factory.backend.service.d.ts.map +1 -1
- package/dist/esm/applications/services/worker-remote-client-factory.backend.service.js.map +1 -1
- package/dist/esm/base-classes/models/manual-controllers.backend.definition.d.ts.map +1 -1
- package/dist/esm/base-classes/models/manual-controllers.backend.definition.js.map +1 -1
- package/dist/esm/base-classes/models/repositories.backend.schemas.d.ts.map +1 -1
- package/dist/esm/base-classes/services/__tests__/mock-resource-operation-helper.service.d.ts +1 -1
- package/dist/esm/base-classes/services/__tests__/mock-resource-operation-helper.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/batches/batches-cronjobs-custom-execution.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/batches/batches-cronjobs-executor.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/batches/batches-cronjobs-resource-execution.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/batches/child-lifecycle-teardown.batch.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/batches/child-lifecycle-teardown.batch.backend.service.js.map +1 -1
- package/dist/esm/base-classes/services/batches/credential-expiry-sweep.batch.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/batches/credential-expiry-sweep.batch.backend.service.js +12 -1
- package/dist/esm/base-classes/services/batches/credential-expiry-sweep.batch.backend.service.js.map +1 -1
- package/dist/esm/base-classes/services/batches/engine-custom-batch-manifests.d.ts.map +1 -1
- package/dist/esm/base-classes/services/batches/engine-custom-batch-manifests.js.map +1 -1
- package/dist/esm/base-classes/services/batches/resource-retention-sweep.batch.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/batches/suspension-reactivation-sweep.batch.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/controllers/abstract-controller.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/controllers/controller-resource.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/controllers/controller-resource.backend.service.js.map +1 -1
- package/dist/esm/base-classes/services/controllers/controllers-registry-handler.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/controllers/controllers-registry-handler.backend.service.js.map +1 -1
- package/dist/esm/base-classes/services/controllers/utils/audit-access-fields.backend.utils.d.ts.map +1 -1
- package/dist/esm/base-classes/services/controllers/utils/operation-response-serializer.backend.utils.d.ts.map +1 -1
- package/dist/esm/base-classes/services/controllers/validate-field-handler.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/__tests__/method-span-scan.guard-helpers.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/__tests__/mock-repositories-registry-handler.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/field-clearing-partition.backend.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/http-api/http-api-filter-translation.backend.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/http-api/http-api-provider-access.backend.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/http-api/http-api-provider-access.backend.js +13 -4
- package/dist/esm/base-classes/services/repositories/http-api/http-api-provider-access.backend.js.map +1 -1
- package/dist/esm/base-classes/services/repositories/http-api/http-api-query.backend.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/http-api/http-api-read-client.backend.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/http-api/http-api-read-client.backend.js +17 -0
- package/dist/esm/base-classes/services/repositories/http-api/http-api-read-client.backend.js.map +1 -1
- package/dist/esm/base-classes/services/repositories/http-api/http-api-resource-repository.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/http-api/http-api-resource-repository.backend.service.js.map +1 -1
- package/dist/esm/base-classes/services/repositories/http-api/http-api-rest-operation-reference.backend.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/http-api/http-api-rest-operation-reference.backend.js.map +1 -1
- package/dist/esm/base-classes/services/repositories/http-api/http-api-row-projection.backend.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/http-api/http-api-subject-erasure-effect.backend.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/http-api/http-api-transport.backend.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/http-api/http-api-transport.backend.js.map +1 -1
- package/dist/esm/base-classes/services/repositories/http-api/odata-query-compiler.backend.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/http-api/odoo-jsonrpc-compiler.backend.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/http-api/rest-json-query-compiler.backend.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/infrastructure-tier-contract.backend.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/infrastructure-tier-contract.backend.js.map +1 -1
- package/dist/esm/base-classes/services/repositories/introspection/introspection-resource-repository.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/introspection/introspection-resource-source.backend.port.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/postgresql-resource-repository.backend.service.d.ts +57 -0
- package/dist/esm/base-classes/services/repositories/postgresql-resource-repository.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/postgresql-resource-repository.backend.service.js +95 -2
- package/dist/esm/base-classes/services/repositories/postgresql-resource-repository.backend.service.js.map +1 -1
- package/dist/esm/base-classes/services/repositories/repositories-registry-handler.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/repositories-registry-handler.backend.service.js.map +1 -1
- package/dist/esm/base-classes/services/repositories/repository-guarded-mutation.backend.types.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/repository-resource.backend.service.d.ts +5 -2
- package/dist/esm/base-classes/services/repositories/repository-resource.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/repository-resource.backend.service.js +14 -3
- package/dist/esm/base-classes/services/repositories/repository-resource.backend.service.js.map +1 -1
- package/dist/esm/base-classes/services/repositories/repository-version-metadata.backend.utils.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/resource-write-integrity.backend.d.ts.map +1 -1
- package/dist/esm/base-classes/services/repositories/seed-row-default-materialization.backend.d.ts +72 -0
- package/dist/esm/base-classes/services/repositories/seed-row-default-materialization.backend.d.ts.map +1 -0
- package/dist/esm/base-classes/services/repositories/seed-row-default-materialization.backend.js +88 -0
- package/dist/esm/base-classes/services/repositories/seed-row-default-materialization.backend.js.map +1 -0
- package/dist/esm/base-classes/services/repositories/unique-constraint-conflict-reference.backend.d.ts.map +1 -1
- package/dist/esm/base-classes/services/resource-operations-helper.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/services/__tests__/mock-services-registry-handler.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/services/__tests__/mock-system-access.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/services/read-only-field-change.backend.utils.d.ts.map +1 -1
- package/dist/esm/base-classes/services/services/resource-operation-audit-emission.backend.utils.d.ts.map +1 -1
- package/dist/esm/base-classes/services/services/resource-operation-custom-implementation-base.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/services/resource-operation-custom-implementation-base.backend.service.js.map +1 -1
- package/dist/esm/base-classes/services/services/resource-operation-custom-implementation-registry.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/services/resource-operation-custom-implementation.factory.backend.d.ts.map +1 -1
- package/dist/esm/base-classes/services/services/resource-operation-implementation-coverage.backend.utils.d.ts.map +1 -1
- package/dist/esm/base-classes/services/services/resource-operation-server-injected-fields.backend.utils.d.ts.map +1 -1
- package/dist/esm/base-classes/services/services/resource-operation-transaction-persistence.backend.utils.d.ts.map +1 -1
- package/dist/esm/base-classes/services/services/resource-status-transition.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/services/resource-status-transition.custom-impl.backend.service.js.map +1 -1
- package/dist/esm/base-classes/services/services/resource-status-transition.definitions.backend.d.ts.map +1 -1
- package/dist/esm/base-classes/services/services/resource-status-transition.definitions.backend.js.map +1 -1
- package/dist/esm/base-classes/services/services/services-registry-handler.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/services/services-registry-handler.backend.service.js +44 -6
- package/dist/esm/base-classes/services/services/services-registry-handler.backend.service.js.map +1 -1
- package/dist/esm/base-classes/services/services/system-access.backend.service.d.ts.map +1 -1
- package/dist/esm/base-classes/services/services/system-access.backend.service.js.map +1 -1
- package/dist/esm/base-classes/utils/backend-type-utils.d.ts.map +1 -1
- package/dist/esm/base-classes/utils/single-subject-addressing.backend.utils.d.ts.map +1 -1
- package/dist/esm/billing/batches/billing-reconciliation.batch.backend.service.d.ts.map +1 -1
- package/dist/esm/billing/batches/billing-reconciliation.batch.backend.service.js.map +1 -1
- package/dist/esm/billing/batches/usage-flush.batch.backend.service.d.ts.map +1 -1
- package/dist/esm/billing/batches/usage-flush.batch.backend.service.js.map +1 -1
- package/dist/esm/billing/models/billing-provider-event-settlement.backend.schemas.d.ts.map +1 -1
- package/dist/esm/billing/models/billing-provider-event-settlement.backend.schemas.js.map +1 -1
- package/dist/esm/billing/services/back-office/abstract-billing.backend.service.d.ts.map +1 -1
- package/dist/esm/billing/services/back-office/billing-feature-sync.backend.service.d.ts.map +1 -1
- package/dist/esm/billing/services/back-office/billing-reconciliation.backend.service.d.ts +1 -1
- package/dist/esm/billing/services/back-office/billing-reconciliation.backend.service.d.ts.map +1 -1
- package/dist/esm/billing/services/back-office/billing-reconciliation.backend.service.js +5 -4
- package/dist/esm/billing/services/back-office/billing-reconciliation.backend.service.js.map +1 -1
- package/dist/esm/billing/services/back-office/billing-state.backend.service.d.ts.map +1 -1
- package/dist/esm/billing/services/back-office/billing-state.backend.service.js +11 -1
- package/dist/esm/billing/services/back-office/billing-state.backend.service.js.map +1 -1
- package/dist/esm/billing/services/back-office/billing-subject-erasure-effect.backend.d.ts.map +1 -1
- package/dist/esm/billing/services/back-office/product-catalog-sync.backend.service.d.ts.map +1 -1
- package/dist/esm/billing/services/back-office/product-catalog-sync.backend.service.js.map +1 -1
- package/dist/esm/billing/services/back-office/usage-metering.backend.service.d.ts.map +1 -1
- package/dist/esm/billing/services/back-office/usage-metering.backend.service.js.map +1 -1
- package/dist/esm/billing/services/billing-adapter-registry.backend.d.ts.map +1 -1
- package/dist/esm/billing/services/billing-adapter-registry.backend.js.map +1 -1
- package/dist/esm/billing/services/billing-checkout-metadata.backend.utils.d.ts.map +1 -1
- package/dist/esm/billing/services/billing-checkout-metadata.backend.utils.js.map +1 -1
- package/dist/esm/billing/services/billing.utils.d.ts.map +1 -1
- package/dist/esm/billing/services/custom-impl/billing-account.mutations.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/billing/services/custom-impl/billing-account.mutations.custom-impl.backend.service.js.map +1 -1
- package/dist/esm/billing/services/custom-impl/billing-custom-impl-utils.backend.d.ts +32 -0
- package/dist/esm/billing/services/custom-impl/billing-custom-impl-utils.backend.d.ts.map +1 -1
- package/dist/esm/billing/services/custom-impl/billing-custom-impl-utils.backend.js +32 -1
- package/dist/esm/billing/services/custom-impl/billing-custom-impl-utils.backend.js.map +1 -1
- package/dist/esm/billing/services/custom-impl/billing-custom-implementations.backend.d.ts.map +1 -1
- package/dist/esm/billing/services/custom-impl/billing-custom-implementations.backend.js.map +1 -1
- package/dist/esm/billing/services/custom-impl/credit-pool.custom-ops.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/billing/services/custom-impl/promotion.custom-ops.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/billing/services/custom-impl/promotion.custom-ops.custom-impl.backend.service.js.map +1 -1
- package/dist/esm/billing/services/custom-impl/subscription.mutations.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/billing/services/custom-impl/subscription.mutations.custom-impl.backend.service.js.map +1 -1
- package/dist/esm/billing/services/stripe-standard-billing-provider.backend.service.d.ts +9 -6
- package/dist/esm/billing/services/stripe-standard-billing-provider.backend.service.d.ts.map +1 -1
- package/dist/esm/billing/services/stripe-standard-billing-provider.backend.service.js +9 -6
- package/dist/esm/billing/services/stripe-standard-billing-provider.backend.service.js.map +1 -1
- package/dist/esm/billing/services/webhooks/__tests__/settlement-ledger.test-double.d.ts.map +1 -1
- package/dist/esm/billing/services/webhooks/__tests__/settlement-ledger.test-double.js.map +1 -1
- package/dist/esm/billing/services/webhooks/billing-webhook-adapter.backend.service.d.ts.map +1 -1
- package/dist/esm/billing/services/webhooks/billing-webhook-capability-handler.backend.service.d.ts.map +1 -1
- package/dist/esm/billing/services/webhooks/billing-webhook-event-router.backend.service.d.ts.map +1 -1
- package/dist/esm/billing/services/webhooks/billing-webhook-event-router.backend.service.js +50 -3
- package/dist/esm/billing/services/webhooks/billing-webhook-event-router.backend.service.js.map +1 -1
- package/dist/esm/billing/testing/billing-test-fixtures.d.ts.map +1 -1
- package/dist/esm/billing/testing/mock-billing-provider.d.ts.map +1 -1
- package/dist/esm/billing/testing/mock-billing-provider.js.map +1 -1
- package/dist/esm/charts/controllers/chart.backend.controller.d.ts.map +1 -1
- package/dist/esm/charts/services/chart-registry.backend.service.d.ts +80 -7
- package/dist/esm/charts/services/chart-registry.backend.service.d.ts.map +1 -1
- package/dist/esm/charts/services/chart-registry.backend.service.js +115 -8
- package/dist/esm/charts/services/chart-registry.backend.service.js.map +1 -1
- package/dist/esm/companion-exports.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/audit-logs.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/batches/audit-logs-archive.batch.backend.service.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/batches/audit-logs-archive.batch.backend.service.js.map +1 -1
- package/dist/esm/compliance/audit-trails/batches/immudb-audit-reconcile.batch.backend.service.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/batches/siem-webhook-delivery.batch.backend.service.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/services/__tests__/mock-audit-logs.service.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/services/audit-event-dispatcher.backend.service.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/services/audit-event-dispatcher.backend.service.js.map +1 -1
- package/dist/esm/compliance/audit-trails/services/audit-logs.backend.service.d.ts +107 -4
- package/dist/esm/compliance/audit-trails/services/audit-logs.backend.service.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/services/audit-logs.backend.service.js +176 -5
- package/dist/esm/compliance/audit-trails/services/audit-logs.backend.service.js.map +1 -1
- package/dist/esm/compliance/audit-trails/services/composite-audit-log-sink.backend.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/services/composite-audit-log-sink.backend.js.map +1 -1
- package/dist/esm/compliance/audit-trails/services/siem-export-config-cache-invalidation.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/services/siem-export-config-cache-invalidation.custom-impl.backend.service.js.map +1 -1
- package/dist/esm/compliance/audit-trails/services/siem-webhook-delivery.backend.service.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/services/siem-webhook-delivery.backend.service.js.map +1 -1
- package/dist/esm/compliance/audit-trails/services/utils/leased-value-cache.backend.utils.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/services/utils/leased-value-cache.backend.utils.js.map +1 -1
- package/dist/esm/compliance/audit-trails/services/utils/ocsf-activity-mapping.backend.utils.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/services/utils/ocsf-activity-mapping.backend.utils.js +21 -0
- package/dist/esm/compliance/audit-trails/services/utils/ocsf-activity-mapping.backend.utils.js.map +1 -1
- package/dist/esm/compliance/audit-trails/services/utils/ocsf-class-mapping.backend.utils.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/services/utils/siem-dictionary.backend.utils.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/services/utils/siem-ocsf-projection.backend.utils.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/services/utils/siem-projection-contract.backend.utils.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/utils/audit-actor.backend.utils.d.ts.map +1 -1
- package/dist/esm/compliance/audit-trails/utils/layer2-audit-provider-boot-diagnostic.backend.utils.d.ts.map +1 -1
- package/dist/esm/compliance/index.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/retention-hide-predicate.backend.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/services/subject-erasure-external-effects.backend.service.d.ts.map +1 -1
- package/dist/esm/compliance/privacy/services/subject-session-revocation.backend.service.d.ts.map +1 -1
- package/dist/esm/config/bootstrap/application-runtime-profile.backend.d.ts.map +1 -1
- package/dist/esm/config/bootstrap/application-runtime-profile.backend.js.map +1 -1
- package/dist/esm/config/bootstrap/minion-initialization-projection.backend.d.ts.map +1 -1
- package/dist/esm/config/bootstrap/runtime-principal-attestation.backend.service.d.ts.map +1 -1
- package/dist/esm/config/bootstrap/runtime-principal-attestation.backend.service.js +3 -0
- package/dist/esm/config/bootstrap/runtime-principal-attestation.backend.service.js.map +1 -1
- package/dist/esm/config/bootstrap/runtime-principal.backend.service.d.ts.map +1 -1
- package/dist/esm/config/custom/application-config-controller.backend.service.d.ts.map +1 -1
- package/dist/esm/config/models/app-config-secrets.backend.schemas.d.ts.map +1 -1
- package/dist/esm/config/models/app-config.backend-authored.definitions.d.ts.map +1 -1
- package/dist/esm/config/models/app-config.backend.schemas.d.ts +4 -4
- package/dist/esm/config/models/app-config.backend.schemas.d.ts.map +1 -1
- package/dist/esm/config/models/app-config.backend.schemas.js.map +1 -1
- package/dist/esm/config/models/app-env-config.backend.schemas.d.ts.map +1 -1
- package/dist/esm/config/models/apps-manager-transport.backend.definitions.d.ts +36 -0
- package/dist/esm/config/models/apps-manager-transport.backend.definitions.d.ts.map +1 -0
- package/dist/esm/config/models/apps-manager-transport.backend.definitions.js +36 -0
- package/dist/esm/config/models/apps-manager-transport.backend.definitions.js.map +1 -0
- package/dist/esm/config/models/config-mutation-boundary.utils.d.ts.map +1 -1
- package/dist/esm/config/models/postgresql-env-config.backend.schemas.d.ts.map +1 -1
- package/dist/esm/config/models/provider-runtime-artifact.backend.schemas.d.ts.map +1 -1
- package/dist/esm/config/models/provider-runtime-artifact.backend.schemas.js.map +1 -1
- package/dist/esm/config/models/runtime-topology.backend.contracts.d.ts.map +1 -1
- package/dist/esm/config/services/__tests__/mock-app-configuration.service.d.ts.map +1 -1
- package/dist/esm/config/services/app-configuration-loader.backend.service.d.ts.map +1 -1
- package/dist/esm/config/services/app-configuration-loader.backend.service.js +3 -0
- package/dist/esm/config/services/app-configuration-loader.backend.service.js.map +1 -1
- package/dist/esm/config/services/app-configuration.backend.service.d.ts.map +1 -1
- package/dist/esm/config/services/app-configuration.backend.service.js.map +1 -1
- package/dist/esm/config/services/app-configuration.backend.utils.d.ts.map +1 -1
- package/dist/esm/config/services/app-configuration.backend.utils.js.map +1 -1
- package/dist/esm/config/services/application-startup-config-validator.backend.service.d.ts +12 -0
- package/dist/esm/config/services/application-startup-config-validator.backend.service.d.ts.map +1 -1
- package/dist/esm/config/services/application-startup-config-validator.backend.service.js +28 -0
- package/dist/esm/config/services/application-startup-config-validator.backend.service.js.map +1 -1
- package/dist/esm/data-seeding/batches/data-seeding-run-cleanup.batch.backend.service.d.ts.map +1 -1
- package/dist/esm/data-seeding/batches/data-seeding-scheduled-rerun.batch.backend.service.d.ts.map +1 -1
- package/dist/esm/data-seeding/controllers/data-seeding-admin.backend.contracts.d.ts.map +1 -1
- package/dist/esm/data-seeding/controllers/data-seeding-admin.backend.controller.d.ts.map +1 -1
- package/dist/esm/data-seeding/data-seeding-models.d.ts.map +1 -1
- package/dist/esm/data-seeding/models/business-key-resolver.shared.utils.d.ts.map +1 -1
- package/dist/esm/data-seeding/models/data-seed-execution-context.shared.types.d.ts.map +1 -1
- package/dist/esm/data-seeding/models/data-seed-migrator-runner.shared.utils.d.ts.map +1 -1
- package/dist/esm/data-seeding/models/data-seed-reconciler.shared.utils.d.ts.map +1 -1
- package/dist/esm/data-seeding/models/data-seed-row-metadata.shared.schemas.d.ts.map +1 -1
- package/dist/esm/data-seeding/models/data-seed-row-metadata.shared.utils.d.ts.map +1 -1
- package/dist/esm/data-seeding/models/data-seed-run.shared.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/data-seeding/models/data-seed-run.shared.schemas.d.ts.map +1 -1
- package/dist/esm/data-seeding/models/data-seed-trigger-mode-matrix.shared.utils.d.ts.map +1 -1
- package/dist/esm/data-seeding/models/data-seed.shared.schemas.d.ts.map +1 -1
- package/dist/esm/data-seeding/services/data-seed-application-bootstrap.backend.d.ts.map +1 -1
- package/dist/esm/data-seeding/services/data-seed-dispatcher.backend.service.d.ts.map +1 -1
- package/dist/esm/data-seeding/services/data-seed-registry.backend.service.d.ts.map +1 -1
- package/dist/esm/data-seeding/services/data-seed-scope-resolver-registry.backend.service.d.ts.map +1 -1
- package/dist/esm/data-seeding/services/engines/additive-seed-engine.backend.service.d.ts.map +1 -1
- package/dist/esm/data-seeding/services/engines/lazy-seed-engine.backend.service.d.ts.map +1 -1
- package/dist/esm/data-seeding/services/engines/manual-seed-engine.backend.service.d.ts.map +1 -1
- package/dist/esm/data-seeding/services/engines/sync-seed-engine.backend.service.d.ts.map +1 -1
- package/dist/esm/data-seeding/services/engines/upgrade-seed-engine.backend.service.d.ts.map +1 -1
- package/dist/esm/data-seeding/services/shared/data-seed-business-key.shared.utils.d.ts.map +1 -1
- package/dist/esm/data-seeding/services/shared/data-seed-error.shared.utils.d.ts.map +1 -1
- package/dist/esm/data-seeding/services/shared/data-seed-run-counters.shared.types.d.ts.map +1 -1
- package/dist/esm/data-seeding/services/shared/data-seed-run-ledger.backend.d.ts.map +1 -1
- package/dist/esm/data-seeding/services/shared/data-seed-scope-anchor.shared.types.d.ts.map +1 -1
- package/dist/esm/data-seeding/services/shared/data-seed-scope-iteration.shared.utils.d.ts.map +1 -1
- package/dist/esm/data-seeding/services/shared/data-seed-scope-resolution.backend.d.ts.map +1 -1
- package/dist/esm/databases/models/aggregation.backend.schemas.d.ts.map +1 -1
- package/dist/esm/databases/models/databases.backend.schemas.d.ts.map +1 -1
- package/dist/esm/databases/models/filter.backend.schemas.d.ts.map +1 -1
- package/dist/esm/databases/models/resolve-persistence-adapter.backend.utils.d.ts.map +1 -1
- package/dist/esm/databases/models/sql.backend.schemas.d.ts.map +1 -1
- package/dist/esm/databases/models/transaction.shared.schemas.d.ts.map +1 -1
- package/dist/esm/databases/services/__tests__/mock-mongo-transaction-registry.service.d.ts.map +1 -1
- package/dist/esm/databases/services/__tests__/mock-mongodb.service.d.ts.map +1 -1
- package/dist/esm/databases/services/__tests__/mock-mongoose-model.service.d.ts.map +1 -1
- package/dist/esm/databases/services/__tests__/mock-redis.service.d.ts.map +1 -1
- package/dist/esm/databases/services/__tests__/mock-zod-mongoose-schema-convertor.service.d.ts.map +1 -1
- package/dist/esm/databases/services/aggregation/aggregation-authorization.backend.service.d.ts.map +1 -1
- package/dist/esm/databases/services/aggregation/aggregation-query.backend.service.d.ts.map +1 -1
- package/dist/esm/databases/services/aggregation/computed-measure-evaluator.backend.service.d.ts.map +1 -1
- package/dist/esm/databases/services/aggregation/field-access-validator.backend.service.d.ts.map +1 -1
- package/dist/esm/databases/services/aggregation/time-series-densifier.backend.service.d.ts.map +1 -1
- package/dist/esm/databases/services/aggregation/topn-processor.backend.service.d.ts.map +1 -1
- package/dist/esm/databases/services/aggregation/window-function-processor.backend.service.d.ts.map +1 -1
- package/dist/esm/databases/services/db-utils.d.ts.map +1 -1
- package/dist/esm/databases/services/mongo-aggregation.backend.service.d.ts.map +1 -1
- package/dist/esm/databases/services/mongodb.service.d.ts.map +1 -1
- package/dist/esm/databases/services/postgresql-aggregation.backend.service.d.ts.map +1 -1
- package/dist/esm/databases/services/postgresql-database.backend.service.d.ts.map +1 -1
- package/dist/esm/databases/services/postgresql-development-provisioning.backend.d.ts.map +1 -1
- package/dist/esm/databases/services/postgresql-filter.backend.service.d.ts.map +1 -1
- package/dist/esm/databases/services/postgresql-migration-runner.backend.d.ts.map +1 -1
- package/dist/esm/databases/services/postgresql-schema-ddl.backend.d.ts.map +1 -1
- package/dist/esm/databases/services/postgresql-schema-migration-sql.backend.d.ts.map +1 -1
- package/dist/esm/databases/services/postgresql-schema-plan-diff.backend.d.ts.map +1 -1
- package/dist/esm/databases/services/postgresql-schema-plan-diff.backend.js.map +1 -1
- package/dist/esm/databases/services/postgresql-schema-plan-lockfile.backend.d.ts.map +1 -1
- package/dist/esm/databases/services/redis.service.d.ts.map +1 -1
- package/dist/esm/databases/services/resource-persistence-unit-of-work.backend.service.d.ts.map +1 -1
- package/dist/esm/databases/services/schema-planning-standalone.backend.d.ts.map +1 -1
- package/dist/esm/databases/services/zod-to-mongoose-schema-convertor.backend.service.d.ts.map +1 -1
- package/dist/esm/databases/services/zod-to-sql-hybrid-schema.planner.d.ts.map +1 -1
- package/dist/esm/databases/utils/postgresql-identifier.backend.utils.d.ts.map +1 -1
- package/dist/esm/errors/services/__tests__/mock-error-builder.service.d.ts.map +1 -1
- package/dist/esm/errors/services/error-builder.backend.service.d.ts.map +1 -1
- package/dist/esm/errors/services/error-builder.backend.service.js.map +1 -1
- package/dist/esm/errors/services/error-handler.backend.service.d.ts.map +1 -1
- package/dist/esm/errors/services/error-handler.backend.service.js.map +1 -1
- package/dist/esm/errors/services/rate-limit.backend.service.d.ts.map +1 -1
- package/dist/esm/errors/services/rate-limit.backend.service.js.map +1 -1
- package/dist/esm/errors/utils/error-log-level-classification.backend.utils.d.ts.map +1 -1
- package/dist/esm/errors/utils/error-log-level-classification.backend.utils.js.map +1 -1
- package/dist/esm/errors/utils/rate-limit-environment-relaxation.backend.utils.d.ts.map +1 -1
- package/dist/esm/errors/utils/rate-limit-environment-relaxation.backend.utils.js.map +1 -1
- package/dist/esm/external-data/batches/external-data-pipeline-scheduled-run.batch.backend.service.d.ts.map +1 -1
- package/dist/esm/external-data/controllers/external-data-admin.backend.contracts.d.ts.map +1 -1
- package/dist/esm/external-data/controllers/external-data-admin.backend.controller.d.ts.map +1 -1
- package/dist/esm/external-data/external-data-extraction-source.backend.d.ts.map +1 -1
- package/dist/esm/external-data/external-data-models.exports.d.ts.map +1 -1
- package/dist/esm/external-data/external-data-pipeline-run.backend.service.d.ts.map +1 -1
- package/dist/esm/external-data/external-data-pipeline-run.backend.service.js.map +1 -1
- package/dist/esm/external-data/external-data-transform.backend.d.ts.map +1 -1
- package/dist/esm/external-data/models/external-data-pipeline-state.backend.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/models/external-providers.backend.schemas.d.ts.map +1 -1
- package/dist/esm/external-providers/models/provider-selection-resolution-evidence.backend.definitions.d.ts.map +1 -1
- package/dist/esm/external-providers/models/provider-selection-resolution-evidence.backend.definitions.js.map +1 -1
- package/dist/esm/external-providers/operations/provider-operation-executor.backend.service.d.ts +102 -52
- package/dist/esm/external-providers/operations/provider-operation-executor.backend.service.d.ts.map +1 -1
- package/dist/esm/external-providers/operations/provider-operation-executor.backend.service.js +117 -71
- package/dist/esm/external-providers/operations/provider-operation-executor.backend.service.js.map +1 -1
- package/dist/esm/external-providers/operations/provider-operation-request.backend.d.ts.map +1 -1
- package/dist/esm/external-providers/operations/provider-operation-request.backend.js.map +1 -1
- package/dist/esm/external-providers/operations/provider-request-signing.backend.d.ts.map +1 -1
- package/dist/esm/external-providers/operations/provider-request-signing.backend.js +26 -7
- package/dist/esm/external-providers/operations/provider-request-signing.backend.js.map +1 -1
- package/dist/esm/external-providers/operations/provider-rest-call-client.backend.d.ts.map +1 -1
- package/dist/esm/external-providers/operations/provider-rest-call-client.backend.js.map +1 -1
- package/dist/esm/external-providers/services/__tests__/mock-external-providers-registry.service.d.ts.map +1 -1
- package/dist/esm/external-providers/services/__tests__/mock-external-providers-registry.service.js.map +1 -1
- package/dist/esm/external-providers/services/backend-provider-loader.backend.service.d.ts.map +1 -1
- package/dist/esm/external-providers/services/backend-provider-loader.backend.service.js.map +1 -1
- package/dist/esm/external-providers/services/backend-provider-registry.backend.service.d.ts.map +1 -1
- package/dist/esm/external-providers/services/backend-provider-registry.backend.service.js.map +1 -1
- package/dist/esm/external-providers/services/document-extraction.backend.service.d.ts +81 -34
- package/dist/esm/external-providers/services/document-extraction.backend.service.d.ts.map +1 -1
- package/dist/esm/external-providers/services/document-extraction.backend.service.js +179 -98
- package/dist/esm/external-providers/services/document-extraction.backend.service.js.map +1 -1
- package/dist/esm/external-providers/services/embeddings.backend.service.d.ts.map +1 -1
- package/dist/esm/external-providers/services/embeddings.backend.service.js.map +1 -1
- package/dist/esm/external-providers/services/external-api-handler.backend.service.d.ts.map +1 -1
- package/dist/esm/external-providers/services/external-providers-registry.backend.service.d.ts +121 -0
- package/dist/esm/external-providers/services/external-providers-registry.backend.service.d.ts.map +1 -1
- package/dist/esm/external-providers/services/external-providers-registry.backend.service.js +151 -0
- package/dist/esm/external-providers/services/external-providers-registry.backend.service.js.map +1 -1
- package/dist/esm/external-providers/services/frontend-bootstrap.backend.service.d.ts +15 -1
- package/dist/esm/external-providers/services/frontend-bootstrap.backend.service.d.ts.map +1 -1
- package/dist/esm/external-providers/services/frontend-bootstrap.backend.service.js +60 -4
- package/dist/esm/external-providers/services/frontend-bootstrap.backend.service.js.map +1 -1
- package/dist/esm/features/controllers/features.backend.controller.d.ts.map +1 -1
- package/dist/esm/features/services/__tests__/mock-feature-definition-registry.service.d.ts.map +1 -1
- package/dist/esm/features/services/__tests__/mock-feature-resolution.service.d.ts.map +1 -1
- package/dist/esm/features/services/application-features-admin-write-path.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/features/services/feature-definition-registry.backend.service.d.ts.map +1 -1
- package/dist/esm/features/services/feature-gate.backend.service.d.ts.map +1 -1
- package/dist/esm/features/services/feature-resolution.backend.service.d.ts.map +1 -1
- package/dist/esm/features/services/organization-features-admin-write-path.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/features/services/scope-feature-ledger-relationship.backend.utils.d.ts.map +1 -1
- package/dist/esm/features/services/scope-features-cache-invalidation.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/features/testing/feature-test-utils.d.ts.map +1 -1
- package/dist/esm/files/batches/files-cleanup.batch.backend.service.d.ts.map +1 -1
- package/dist/esm/files/constraints/file-analyzers.types.d.ts.map +1 -1
- package/dist/esm/files/constraints/file-constraint-resolver-chain.backend.service.d.ts.map +1 -1
- package/dist/esm/files/constraints/file-constraint.types.d.ts.map +1 -1
- package/dist/esm/files/constraints/file-validation.backend.service.d.ts.map +1 -1
- package/dist/esm/files/constraints/resource-field-constraint-resolver.backend.service.d.ts.map +1 -1
- package/dist/esm/files/controllers/file.controller.d.ts.map +1 -1
- package/dist/esm/files/controllers/file.controller.js.map +1 -1
- package/dist/esm/files/handlers/file-upload-route-locals.backend.types.d.ts.map +1 -1
- package/dist/esm/files/handlers/file-upload-route-locals.backend.types.js.map +1 -1
- package/dist/esm/files/handlers/resource-file-upload-handler.backend.service.d.ts +37 -0
- package/dist/esm/files/handlers/resource-file-upload-handler.backend.service.d.ts.map +1 -1
- package/dist/esm/files/handlers/resource-file-upload-handler.backend.service.js +221 -21
- package/dist/esm/files/handlers/resource-file-upload-handler.backend.service.js.map +1 -1
- package/dist/esm/files/scanning/clamav-scanner.backend.service.d.ts.map +1 -1
- package/dist/esm/files/scanning/file-scan.types.d.ts.map +1 -1
- package/dist/esm/files/scanning/yara-scanner.backend.service.d.ts.map +1 -1
- package/dist/esm/files/scanning/yara-scanner.backend.service.js +20 -2
- package/dist/esm/files/scanning/yara-scanner.backend.service.js.map +1 -1
- package/dist/esm/files/services/__tests__/mock-file-field-detection.service.d.ts.map +1 -1
- package/dist/esm/files/services/__tests__/mock-file-operation-handler.service.d.ts.map +1 -1
- package/dist/esm/files/services/__tests__/mock-file-repository.service.d.ts.map +1 -1
- package/dist/esm/files/services/file-field-detection.backend.service.d.ts.map +1 -1
- package/dist/esm/files/services/file-operation-handler.backend.service.d.ts.map +1 -1
- package/dist/esm/files/services/file-operation-handler.backend.service.js.map +1 -1
- package/dist/esm/files/services/file-population.backend.service.d.ts.map +1 -1
- package/dist/esm/files/services/file-scanning.backend.service.d.ts.map +1 -1
- package/dist/esm/files/services/file-scanning.backend.service.js +5 -0
- package/dist/esm/files/services/file-scanning.backend.service.js.map +1 -1
- package/dist/esm/files/services/file-text-extraction.backend.service.d.ts.map +1 -1
- package/dist/esm/files/services/file-text-extraction.backend.service.js +8 -5
- package/dist/esm/files/services/file-text-extraction.backend.service.js.map +1 -1
- package/dist/esm/files/services/file-upload-grant.backend.service.d.ts.map +1 -1
- package/dist/esm/files/services/file-upload-grant.backend.service.js.map +1 -1
- package/dist/esm/files/services/files.backend.service.d.ts.map +1 -1
- package/dist/esm/files/services/files.backend.service.js +3 -1
- package/dist/esm/files/services/files.backend.service.js.map +1 -1
- package/dist/esm/files/services/rag-source-field-detection.backend.service.d.ts.map +1 -1
- package/dist/esm/files/storage/application-storage-key.backend.utils.d.ts.map +1 -1
- package/dist/esm/files/storage/application-storage-key.backend.utils.js.map +1 -1
- package/dist/esm/files/storage/file-storage-path-resolver.backend.service.d.ts.map +1 -1
- package/dist/esm/files/storage/file-storage-provider.types.d.ts +36 -1
- package/dist/esm/files/storage/file-storage-provider.types.d.ts.map +1 -1
- package/dist/esm/files/storage/file-storage-provider.types.js.map +1 -1
- package/dist/esm/files/storage/file-storage-router.backend.service.d.ts +21 -3
- package/dist/esm/files/storage/file-storage-router.backend.service.d.ts.map +1 -1
- package/dist/esm/files/storage/file-storage-router.backend.service.js +38 -5
- package/dist/esm/files/storage/file-storage-router.backend.service.js.map +1 -1
- package/dist/esm/files/storage/google-drive-storage-provider.backend.service.d.ts +87 -0
- package/dist/esm/files/storage/google-drive-storage-provider.backend.service.d.ts.map +1 -0
- package/dist/esm/files/storage/google-drive-storage-provider.backend.service.js +340 -0
- package/dist/esm/files/storage/google-drive-storage-provider.backend.service.js.map +1 -0
- package/dist/esm/files/storage/local-directory-storage-provider.backend.service.d.ts.map +1 -1
- package/dist/esm/files/storage/local-directory-storage-provider.backend.service.js.map +1 -1
- package/dist/esm/files/storage/storage-credential-provider.backend.utils.d.ts.map +1 -1
- package/dist/esm/files/storage/storage-platform-sts-credential-resolver.backend.utils.d.ts.map +1 -1
- package/dist/esm/files/storage/storage-sts-credential-resolver.backend.utils.d.ts.map +1 -1
- package/dist/esm/files/storage/storage-sts-credential-resolver.backend.utils.js +10 -3
- package/dist/esm/files/storage/storage-sts-credential-resolver.backend.utils.js.map +1 -1
- package/dist/esm/files/storage/wildo-managed-storage-provider.backend.service.d.ts.map +1 -1
- package/dist/esm/files/storage/wildo-managed-storage-provider.backend.service.js.map +1 -1
- package/dist/esm/files/utils/file-field-schema-path.backend.utils.d.ts.map +1 -1
- package/dist/esm/files/utils/file-field-schema-path.backend.utils.js.map +1 -1
- package/dist/esm/files/utils/file-upload.utils.d.ts.map +1 -1
- package/dist/esm/files/utils/file-uploader.utils.d.ts.map +1 -1
- package/dist/esm/files/utils/file-uploader.utils.js.map +1 -1
- package/dist/esm/files/utils/file-validation.utils.d.ts.map +1 -1
- package/dist/esm/files/utils/image-derivation.backend.utils.d.ts.map +1 -1
- package/dist/esm/files/utils/image-thumbnail.backend.utils.d.ts.map +1 -1
- package/dist/esm/files/utils/office-document-text-extraction.backend.utils.d.ts.map +1 -1
- package/dist/esm/files/utils/office-document-text-extraction.backend.utils.js.map +1 -1
- package/dist/esm/files/utils/rag-source-field-schema-path.backend.utils.d.ts.map +1 -1
- package/dist/esm/files/utils/storage-application-identity.backend.utils.d.ts.map +1 -1
- package/dist/esm/flows-actors/a2a/batches/a2a-abandoned-task-sweep.batch.backend.service.d.ts.map +1 -1
- package/dist/esm/flows-actors/a2a/batches/a2a-abandoned-task-sweep.batch.backend.service.js.map +1 -1
- package/dist/esm/flows-actors/a2a/batches/a2a-push-delivery.batch.backend.service.d.ts.map +1 -1
- package/dist/esm/flows-actors/a2a/controllers/a2a.controller.d.ts.map +1 -1
- package/dist/esm/flows-actors/a2a/controllers/a2a.controller.js.map +1 -1
- package/dist/esm/flows-actors/a2a/models/a2a-dialect.backend.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/a2a/models/a2a-push-notification-delivery.backend.utils.d.ts.map +1 -1
- package/dist/esm/flows-actors/a2a/models/a2a-push-notification.backend.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/a2a/models/a2a.backend.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/a2a/models/a2a.backend.schemas.js.map +1 -1
- package/dist/esm/flows-actors/a2a/services/a2a-push-delivery-log.repository.d.ts.map +1 -1
- package/dist/esm/flows-actors/a2a/services/a2a-push-dispatcher.backend.service.d.ts.map +1 -1
- package/dist/esm/flows-actors/a2a/services/a2a-task-cancellation.backend.service.d.ts.map +1 -1
- package/dist/esm/flows-actors/a2a/services/a2a-task-cancellation.backend.service.js.map +1 -1
- package/dist/esm/flows-actors/a2a/services/a2a-task.backend.service.d.ts.map +1 -1
- package/dist/esm/flows-actors/a2a/services/a2a-task.backend.service.js.map +1 -1
- package/dist/esm/flows-actors/a2a/services/a2a-token-budget.backend.service.d.ts.map +1 -1
- package/dist/esm/flows-actors/a2a/services/a2a-token-budget.backend.service.js.map +1 -1
- package/dist/esm/flows-actors/a2a/services/a2a.backend.service.d.ts.map +1 -1
- package/dist/esm/flows-actors/a2a/services/a2a.backend.service.js.map +1 -1
- package/dist/esm/flows-actors/controllers/flows-actors.controller.d.ts.map +1 -1
- package/dist/esm/flows-actors/models/agent-catalogs.backend.definitions.d.ts.map +1 -1
- package/dist/esm/flows-actors/models/agent-catalogs.backend.definitions.js.map +1 -1
- package/dist/esm/flows-actors/models/agent-facets.backend.definitions.d.ts.map +1 -1
- package/dist/esm/flows-actors/models/agents.backend.definitions.d.ts.map +1 -1
- package/dist/esm/flows-actors/models/core-facets.backend.definitions.d.ts.map +1 -1
- package/dist/esm/flows-actors/models/core-facets.backend.definitions.js.map +1 -1
- package/dist/esm/flows-actors/models/flows-actors.backend.definitions.d.ts.map +1 -1
- package/dist/esm/flows-actors/models/flows-actors.backend.schemas.d.ts.map +1 -1
- package/dist/esm/flows-actors/models/flows-actors.backend.schemas.js.map +1 -1
- package/dist/esm/flows-actors/models/function-tools.backend.definitions.d.ts +107 -16
- package/dist/esm/flows-actors/models/function-tools.backend.definitions.d.ts.map +1 -1
- package/dist/esm/flows-actors/models/function-tools.backend.definitions.js +118 -18
- package/dist/esm/flows-actors/models/function-tools.backend.definitions.js.map +1 -1
- package/dist/esm/flows-actors/models/market-generation.actors-system.backend.definitions.d.ts.map +1 -1
- package/dist/esm/flows-actors/models/market-generation.actors-system.backend.definitions.js.map +1 -1
- package/dist/esm/flows-actors/models/mcp-client.backend.definitions.d.ts.map +1 -1
- package/dist/esm/flows-actors/models/mcp-client.backend.definitions.js.map +1 -1
- package/dist/esm/flows-actors/services/__tests__/fixtures/meta-workflow-evaluation-treatment.test-fixture.d.ts.map +1 -1
- package/dist/esm/flows-actors/services/actors-system.backend.service.d.ts.map +1 -1
- package/dist/esm/flows-actors/services/actors-system.backend.service.js.map +1 -1
- package/dist/esm/flows-actors/services/agent-call-trace-sink.backend.d.ts.map +1 -1
- package/dist/esm/flows-actors/services/agent-facets.backend.service.d.ts.map +1 -1
- package/dist/esm/flows-actors/services/agents.backend.service.d.ts +104 -5
- package/dist/esm/flows-actors/services/agents.backend.service.d.ts.map +1 -1
- package/dist/esm/flows-actors/services/agents.backend.service.js +263 -31
- package/dist/esm/flows-actors/services/agents.backend.service.js.map +1 -1
- package/dist/esm/flows-actors/services/context-curation.backend.service.d.ts.map +1 -1
- package/dist/esm/flows-actors/services/conversational-execution.backend.service.d.ts +46 -1
- package/dist/esm/flows-actors/services/conversational-execution.backend.service.d.ts.map +1 -1
- package/dist/esm/flows-actors/services/conversational-execution.backend.service.js +193 -6
- package/dist/esm/flows-actors/services/conversational-execution.backend.service.js.map +1 -1
- package/dist/esm/flows-actors/services/flows-actors-registry.service.d.ts.map +1 -1
- package/dist/esm/flows-actors/services/flows-actors-registry.service.js.map +1 -1
- package/dist/esm/flows-actors/services/flows.backend.services.d.ts.map +1 -1
- package/dist/esm/flows-actors/services/flows.backend.services.js.map +1 -1
- package/dist/esm/flows-actors/services/llm-observability-agent-call-trace-sink.backend.d.ts.map +1 -1
- package/dist/esm/flows-actors/services/llm-observability-agent-call-trace-sink.backend.js.map +1 -1
- package/dist/esm/flows-actors/services/mcp-client.backend.service.d.ts.map +1 -1
- package/dist/esm/flows-actors/services/mcp-client.backend.service.js +3 -0
- package/dist/esm/flows-actors/services/mcp-client.backend.service.js.map +1 -1
- package/dist/esm/flows-actors/services/mcp-credential-resolver.backend.service.d.ts +99 -0
- package/dist/esm/flows-actors/services/mcp-credential-resolver.backend.service.d.ts.map +1 -0
- package/dist/esm/flows-actors/services/mcp-credential-resolver.backend.service.js +155 -0
- package/dist/esm/flows-actors/services/mcp-credential-resolver.backend.service.js.map +1 -0
- package/dist/esm/flows-actors/services/meta-workflow-evaluation-treatment-compiler.backend.service.d.ts.map +1 -1
- package/dist/esm/flows-actors/services/meta-workflow-standard-action-contracts.backend.service.d.ts.map +1 -1
- package/dist/esm/flows-actors/services/meta-workflow-standard-evaluation-contracts.backend.service.d.ts.map +1 -1
- package/dist/esm/flows-actors/services/meta-workflow-structured-artifact-action-compiler.backend.service.d.ts.map +1 -1
- package/dist/esm/flows-actors/services/prompt-compiler.backend.service.d.ts.map +1 -1
- package/dist/esm/flows-actors/services/prompt-compiler.backend.service.js.map +1 -1
- package/dist/esm/flows-actors/utils/acp-session-runner.backend.utils.d.ts.map +1 -1
- package/dist/esm/flows-actors/utils/acp-session-runner.backend.utils.js +9 -0
- package/dist/esm/flows-actors/utils/acp-session-runner.backend.utils.js.map +1 -1
- package/dist/esm/flows-actors/utils/bounded-subprocess.backend.utils.d.ts.map +1 -1
- package/dist/esm/flows-actors/utils/flows-actors-frontend-extractor.utils.d.ts.map +1 -1
- package/dist/esm/flows-actors/utils/meta-workflow-canonical-json.backend.utils.d.ts.map +1 -1
- package/dist/esm/flows-actors/utils/meta-workflow-canonical-json.backend.utils.js.map +1 -1
- package/dist/esm/flows-actors/utils/meta-workflow-structured-generation-plan.backend.utils.d.ts.map +1 -1
- package/dist/esm/flows-actors/utils/meta-workflow-structured-generation-plan.backend.utils.js.map +1 -1
- package/dist/esm/flows-actors/utils/prompt-ir-adapters.backend.utils.d.ts.map +1 -1
- package/dist/esm/flows-actors/utils/tool-approval-modification.backend.utils.d.ts +77 -0
- package/dist/esm/flows-actors/utils/tool-approval-modification.backend.utils.d.ts.map +1 -0
- package/dist/esm/flows-actors/utils/tool-approval-modification.backend.utils.js +164 -0
- package/dist/esm/flows-actors/utils/tool-approval-modification.backend.utils.js.map +1 -0
- package/dist/esm/flows-actors/utils/tool-approval-signing.backend.utils.d.ts +48 -0
- package/dist/esm/flows-actors/utils/tool-approval-signing.backend.utils.d.ts.map +1 -0
- package/dist/esm/flows-actors/utils/tool-approval-signing.backend.utils.js +101 -0
- package/dist/esm/flows-actors/utils/tool-approval-signing.backend.utils.js.map +1 -0
- package/dist/esm/guidance/batches/dormancy-detection.batch.backend.service.d.ts.map +1 -1
- package/dist/esm/guidance/services/guidance-trigger-evaluator.backend.service.d.ts.map +1 -1
- package/dist/esm/guidance/services/lifecycle-custom-implementations.backend.d.ts.map +1 -1
- package/dist/esm/guidance/services/lifecycle-evaluator.backend.service.d.ts.map +1 -1
- package/dist/esm/guidance/services/lifecycle-scope-id.backend.utils.d.ts.map +1 -1
- package/dist/esm/guidance/services/milestone-condition-registry.backend.service.d.ts.map +1 -1
- package/dist/esm/guidance/services/milestone-definition-registry.backend.service.d.ts.map +1 -1
- package/dist/esm/guidance/services/milestone-evaluator.backend.service.d.ts.map +1 -1
- package/dist/esm/guidance/services/milestone-evaluator.backend.service.js.map +1 -1
- package/dist/esm/guidance/services/progression-state-store.backend.service.d.ts.map +1 -1
- package/dist/esm/guidance/services/progression-state-store.backend.service.js.map +1 -1
- package/dist/esm/guidance/services/scoped-state-read-custom-implementations.backend.d.ts.map +1 -1
- package/dist/esm/i18n/controllers/i18n-controller.backend.service.d.ts.map +1 -1
- package/dist/esm/i18n/controllers/i18n-controller.backend.service.js.map +1 -1
- package/dist/esm/i18n/services/i18n.backend.service.d.ts.map +1 -1
- package/dist/esm/index.d.ts +0 -1
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +0 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/inject/models/container.d.ts +10 -0
- package/dist/esm/inject/models/container.d.ts.map +1 -1
- package/dist/esm/inject/models/container.js +49 -1
- package/dist/esm/inject/models/container.js.map +1 -1
- package/dist/esm/inject/models/service-types.d.ts +3 -0
- package/dist/esm/inject/models/service-types.d.ts.map +1 -1
- package/dist/esm/inject/models/service-types.js +3 -0
- package/dist/esm/inject/models/service-types.js.map +1 -1
- package/dist/esm/mcp/controllers/mcp.controller.d.ts.map +1 -1
- package/dist/esm/mcp/controllers/mcp.controller.js +50 -3
- package/dist/esm/mcp/controllers/mcp.controller.js.map +1 -1
- package/dist/esm/mcp/models/mcp-protocol.backend.schemas.d.ts.map +1 -1
- package/dist/esm/mcp/models/mcp-tool.backend.schemas.d.ts.map +1 -1
- package/dist/esm/mcp/models/mcp-tool.backend.schemas.js.map +1 -1
- package/dist/esm/mcp/services/mcp-server.backend.service.d.ts.map +1 -1
- package/dist/esm/mcp/services/mcp-server.backend.service.js.map +1 -1
- package/dist/esm/mcp/services/mcp-tool-adapter.backend.service.d.ts.map +1 -1
- package/dist/esm/mcp/services/mcp-tool-adapter.backend.service.js.map +1 -1
- package/dist/esm/mcp/services/resource-server-instances-registry.backend.service.d.ts.map +1 -1
- package/dist/esm/mcp/utils/zod-to-mcp-json-schema.backend.utils.d.ts.map +1 -1
- package/dist/esm/meta-workflow-runtime.exports.d.ts.map +1 -1
- package/dist/esm/monitoring/analytics/controllers/analytics.backend.controller.d.ts.map +1 -1
- package/dist/esm/monitoring/analytics/controllers/analytics.backend.controller.js.map +1 -1
- package/dist/esm/monitoring/analytics/services/value-moment-definition-registry.backend.service.d.ts.map +1 -1
- package/dist/esm/monitoring/analytics/services/value-moment-definition-registry.backend.service.js.map +1 -1
- package/dist/esm/monitoring/analytics/services/value-moment-engine.backend.service.d.ts.map +1 -1
- package/dist/esm/monitoring/analytics/services/value-moment-engine.backend.service.js.map +1 -1
- package/dist/esm/monitoring/analytics/services/value-moment-handler-registry.backend.service.d.ts.map +1 -1
- package/dist/esm/monitoring/analytics/services/value-moment-handler-registry.backend.service.js.map +1 -1
- package/dist/esm/monitoring/logger/models/logger.backend.schemas.d.ts.map +1 -1
- package/dist/esm/monitoring/logger/models/logger.backend.schemas.js.map +1 -1
- package/dist/esm/monitoring/logger/services/__tests__/mock-logger.service.d.ts.map +1 -1
- package/dist/esm/monitoring/logger/services/logger.service.d.ts +12 -0
- package/dist/esm/monitoring/logger/services/logger.service.d.ts.map +1 -1
- package/dist/esm/monitoring/logger/services/logger.service.js +3 -3
- package/dist/esm/monitoring/logger/services/logger.service.js.map +1 -1
- package/dist/esm/monitoring/logger/utils/log-severity-floor.backend.utils.d.ts.map +1 -1
- package/dist/esm/monitoring/logger/utils/log-severity-floor.backend.utils.js.map +1 -1
- package/dist/esm/monitoring/logger/utils/log-value-normalization.backend.utils.d.ts.map +1 -1
- package/dist/esm/monitoring/observability/audit-observation-emission.backend.d.ts +10 -6
- package/dist/esm/monitoring/observability/audit-observation-emission.backend.d.ts.map +1 -1
- package/dist/esm/monitoring/observability/audit-observation-emission.backend.js +10 -6
- package/dist/esm/monitoring/observability/audit-observation-emission.backend.js.map +1 -1
- package/dist/esm/monitoring/observability/models/observability.backend.schemas.d.ts.map +1 -1
- package/dist/esm/monitoring/observability/models/observability.backend.schemas.js.map +1 -1
- package/dist/esm/monitoring/observability/otel-preload.d.ts.map +1 -1
- package/dist/esm/monitoring/observability/otel-sdk-global-handle.d.ts.map +1 -1
- package/dist/esm/monitoring/observability/services/__tests__/mock-metrics.service.d.ts.map +1 -1
- package/dist/esm/monitoring/observability/services/metrics.service.d.ts.map +1 -1
- package/dist/esm/monitoring/observability/services/metrics.service.js.map +1 -1
- package/dist/esm/monitoring/observability/services/observability.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/email/components/email-components.d.ts.map +1 -1
- package/dist/esm/notifications/email/models/email-template-definition.d.ts.map +1 -1
- package/dist/esm/notifications/email/models/email-transport.backend.definitions.d.ts.map +1 -1
- package/dist/esm/notifications/email/services/email-batch-send.batch.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/email/services/email-template-registry.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/email/services/email-template-registry.backend.service.js.map +1 -1
- package/dist/esm/notifications/email/services/email-template-validator.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/email/services/email-template-validator.backend.service.js.map +1 -1
- package/dist/esm/notifications/email/services/email.backend.service.d.ts +47 -6
- package/dist/esm/notifications/email/services/email.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/email/services/email.backend.service.js +86 -36
- package/dist/esm/notifications/email/services/email.backend.service.js.map +1 -1
- package/dist/esm/notifications/email/utils/color-conversion.utils.d.ts.map +1 -1
- package/dist/esm/notifications/email/utils/color-conversion.utils.js.map +1 -1
- package/dist/esm/notifications/email/utils/interpolate-email-label.utils.d.ts.map +1 -1
- package/dist/esm/notifications/email/utils/zod-to-typescript.utils.d.ts.map +1 -1
- package/dist/esm/notifications/services/notification-badge.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/services/notification-badge.backend.service.js.map +1 -1
- package/dist/esm/notifications/services/notifications-dispatcher.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/services/notifications-dispatcher.backend.service.js.map +1 -1
- package/dist/esm/notifications/sms/models/sms-transport.backend.definitions.d.ts +32 -0
- package/dist/esm/notifications/sms/models/sms-transport.backend.definitions.d.ts.map +1 -0
- package/dist/esm/notifications/sms/models/sms-transport.backend.definitions.js +32 -0
- package/dist/esm/notifications/sms/models/sms-transport.backend.definitions.js.map +1 -0
- package/dist/esm/notifications/sms/services/sms.backend.service.d.ts +64 -10
- package/dist/esm/notifications/sms/services/sms.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/sms/services/sms.backend.service.js +277 -82
- package/dist/esm/notifications/sms/services/sms.backend.service.js.map +1 -1
- package/dist/esm/notifications/webhooks/controllers/webhook-auto-controller.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/webhooks/controllers/webhook-auto-controller.backend.service.js.map +1 -1
- package/dist/esm/notifications/webhooks/outbound/batches/m2m-webhook-delivery.batch.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/webhooks/outbound/batches/m2m-webhook-delivery.batch.backend.service.js.map +1 -1
- package/dist/esm/notifications/webhooks/outbound/batches/m2m-webhook-delivery.batch.utils.d.ts.map +1 -1
- package/dist/esm/notifications/webhooks/outbound/m2m-webhook-signed-request.backend.utils.d.ts.map +1 -1
- package/dist/esm/notifications/webhooks/outbound/m2m-webhook-signed-request.backend.utils.js.map +1 -1
- package/dist/esm/notifications/webhooks/outbound/services/m2m-webhook-delivery-log.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/webhooks/outbound/services/m2m-webhook-delivery-log.repository.d.ts.map +1 -1
- package/dist/esm/notifications/webhooks/outbound/services/m2m-webhook-dispatcher.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/webhooks/outbound/services/webhook-config-public-key.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/webhooks/outbound/services/webhook-config-test-endpoint.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/webhooks/outbound/services/webhook-config-test-endpoint.custom-impl.backend.service.js.map +1 -1
- package/dist/esm/notifications/webhooks/outbound/services/webhook-config.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/webhooks/services/polymorphic-lookup.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/webhooks/services/webhook-handler.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/webhooks/services/webhook-handler.backend.service.js.map +1 -1
- package/dist/esm/organizations/batches/organization-member-invitation-sweep.batch.backend.service.d.ts.map +1 -1
- package/dist/esm/organizations/batches/organization-purge.batch.backend.service.d.ts.map +1 -1
- package/dist/esm/organizations/batches/organization-purge.batch.backend.service.js.map +1 -1
- package/dist/esm/organizations/services/authority-change-audit.backend.utils.d.ts.map +1 -1
- package/dist/esm/organizations/services/invitation-acceptance.backend.utils.d.ts.map +1 -1
- package/dist/esm/organizations/services/org-creation-on-registration.backend.utils.d.ts.map +1 -1
- package/dist/esm/organizations/services/org-member-roles-validation.backend.utils.d.ts.map +1 -1
- package/dist/esm/organizations/services/organization-custom-implementation.backend.service.d.ts.map +1 -1
- package/dist/esm/organizations/services/organization-custom-implementation.backend.service.js.map +1 -1
- package/dist/esm/organizations/services/organization-deletion-audit.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/organizations/services/organization-member-custom-implementation.backend.service.d.ts.map +1 -1
- package/dist/esm/organizations/services/organization-onboarding-operation.backend.utils.d.ts.map +1 -1
- package/dist/esm/organizations/services/organization-unit-custom-implementation.backend.service.d.ts.map +1 -1
- package/dist/esm/organizations/services/organization-unit-member-custom-implementation.backend.service.d.ts.map +1 -1
- package/dist/esm/organizations/services/scim-provisioning-gate.backend.utils.d.ts.map +1 -1
- package/dist/esm/organizations/services/user-org-type-grant.backend.utils.d.ts.map +1 -1
- package/dist/esm/organizations/services/user-type-revocation-on-org-leave.backend.utils.d.ts.map +1 -1
- package/dist/esm/pdf-templates/__tests__/fixtures/tiny-pdf-template.fixture.d.ts.map +1 -1
- package/dist/esm/pdf-templates/models/pdf-template-binding.d.ts.map +1 -1
- package/dist/esm/pdf-templates/models/pdf-template-definition.d.ts.map +1 -1
- package/dist/esm/pdf-templates/services/pdf-generated-file-writer.backend.service.d.ts.map +1 -1
- package/dist/esm/pdf-templates/services/pdf-generation-orchestrator.backend.service.d.ts.map +1 -1
- package/dist/esm/pdf-templates/services/pdf-renderer.backend.service.d.ts.map +1 -1
- package/dist/esm/pdf-templates/services/pdf-template-binding.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/adapters/in-memory-queue-adapter.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/adapters/in-memory-queue-adapter.backend.service.js.map +1 -1
- package/dist/esm/queue/adapters/queue-adapter.backend.binding.d.ts.map +1 -1
- package/dist/esm/queue/adapters/queue-adapter.backend.binding.js.map +1 -1
- package/dist/esm/queue/adapters/queue-adapter.backend.interface.d.ts.map +1 -1
- package/dist/esm/queue/adapters/queue-adapter.backend.interface.js.map +1 -1
- package/dist/esm/queue/adapters/queue-adapter.backend.options.d.ts.map +1 -1
- package/dist/esm/queue/adapters/queue-adapter.backend.options.js.map +1 -1
- package/dist/esm/queue/adapters/rabbitmq-adapter.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/adapters/rabbitmq-adapter.backend.service.js.map +1 -1
- package/dist/esm/queue/apps-crontabs-manager.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/cron-job-sync.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/domain-queue-consumer.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/domain-queue-consumer.backend.service.js.map +1 -1
- package/dist/esm/queue/job-completion-registry.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/job-consumer.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/job-consumer.backend.service.js.map +1 -1
- package/dist/esm/queue/job-executor.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/job-executor.backend.service.js.map +1 -1
- package/dist/esm/queue/job-payload-storage.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/job-status-tracking.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/queue-monitoring.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/queue-monitoring.backend.service.js.map +1 -1
- package/dist/esm/queue/queue-worker-initializer.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/queue-worker-initializer.backend.service.js.map +1 -1
- package/dist/esm/queue/queue.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/queue.backend.service.js.map +1 -1
- package/dist/esm/queue/scheduled-message-verifier.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/worker-shutdown-manager.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/worker-shutdown-manager.backend.service.js.map +1 -1
- package/dist/esm/rag/batches/rag-embedding-drain.batch.backend.service.d.ts.map +1 -1
- package/dist/esm/rag/batches/rag-reconciliation-sweep.batch.backend.service.d.ts.map +1 -1
- package/dist/esm/rag/models/rag-chunk-store.backend.types.d.ts.map +1 -1
- package/dist/esm/rag/models/rag-retrieval.backend.types.d.ts.map +1 -1
- package/dist/esm/rag/services/mongodb-rag-chunk-store.backend.service.d.ts.map +1 -1
- package/dist/esm/rag/services/postgresql-rag-chunk-store.backend.service.d.ts.map +1 -1
- package/dist/esm/rag/services/rag-chunk-collection.mongodb-ddl.backend.d.ts.map +1 -1
- package/dist/esm/rag/services/rag-chunk-retrieval.mongodb-query.backend.d.ts.map +1 -1
- package/dist/esm/rag/services/rag-chunk-retrieval.postgresql-query.backend.d.ts.map +1 -1
- package/dist/esm/rag/services/rag-chunk-store.backend.service.d.ts.map +1 -1
- package/dist/esm/rag/services/rag-chunk-table.postgresql-ddl.backend.d.ts.map +1 -1
- package/dist/esm/rag/services/rag-ingestion.backend.service.d.ts.map +1 -1
- package/dist/esm/rag/services/rag-retrieval.backend.service.d.ts.map +1 -1
- package/dist/esm/rag/utils/rag-chunk-fusion.backend.utils.d.ts.map +1 -1
- package/dist/esm/rag/utils/rag-chunk-removal.backend.utils.d.ts.map +1 -1
- package/dist/esm/rag/utils/rag-chunk-row-shaping.backend.utils.d.ts.map +1 -1
- package/dist/esm/rag/utils/rag-chunking.backend.utils.d.ts.map +1 -1
- package/dist/esm/rag/utils/rag-chunking.backend.utils.js.map +1 -1
- package/dist/esm/rag/utils/rag-context-assembly.backend.utils.d.ts.map +1 -1
- package/dist/esm/rag/utils/rag-context-assembly.backend.utils.js.map +1 -1
- package/dist/esm/rag/utils/rag-ingestion-trigger.backend.utils.d.ts.map +1 -1
- package/dist/esm/rag/utils/rag-retrieval-scope.backend.utils.d.ts.map +1 -1
- package/dist/esm/rag/utils/rag-source-field-value.backend.utils.d.ts.map +1 -1
- package/dist/esm/requests/models/api-routes.backend.defintions.d.ts.map +1 -1
- package/dist/esm/requests/models/requests.backend.schemas.d.ts.map +1 -1
- package/dist/esm/requests/service/platform-mutualized-handler.backend.service.d.ts.map +1 -1
- package/dist/esm/requests/service/platform-requests.backend.utils.d.ts.map +1 -1
- package/dist/esm/requests/service/remote-client-base.backend.service.d.ts.map +1 -1
- package/dist/esm/requests/service/serverless-services-handler.backend.service.d.ts.map +1 -1
- package/dist/esm/requests/service/websocket.service.d.ts.map +1 -1
- package/dist/esm/requests/service/websocket.service.js +49 -1
- package/dist/esm/requests/service/websocket.service.js.map +1 -1
- package/dist/esm/resources/backend-resource-registry.exports.d.ts.map +1 -1
- package/dist/esm/resources/models/custom-service-implementations.backend.definition.d.ts.map +1 -1
- package/dist/esm/resources/models/custom-service-implementations.backend.definition.js +2 -0
- package/dist/esm/resources/models/custom-service-implementations.backend.definition.js.map +1 -1
- package/dist/esm/resources/models/index.d.ts.map +1 -1
- package/dist/esm/resources/models/resources-operations.backend.definitions.d.ts.map +1 -1
- package/dist/esm/resources/models/resources-operations.backend.definitions.js.map +1 -1
- package/dist/esm/resources/models/resources-relationships.backend.definitions.d.ts.map +1 -1
- package/dist/esm/resources/models/resources-relationships.backend.definitions.js.map +1 -1
- package/dist/esm/resources/models/resources-types.backend.schemas.d.ts.map +1 -1
- package/dist/esm/resources/models/resources-types.backend.schemas.js.map +1 -1
- package/dist/esm/resources/models/resources.backend.schemas.d.ts.map +1 -1
- package/dist/esm/resources/models/virtual-fields.backend.types.d.ts.map +1 -1
- package/dist/esm/resources/services/__tests__/mock-resources-registry.service.d.ts.map +1 -1
- package/dist/esm/resources/services/resource-context.backend.service.d.ts.map +1 -1
- package/dist/esm/resources/services/resource-id.backend.service.d.ts.map +1 -1
- package/dist/esm/resources/services/resource-population.backend.service.d.ts +17 -2
- package/dist/esm/resources/services/resource-population.backend.service.d.ts.map +1 -1
- package/dist/esm/resources/services/resource-population.backend.service.js +74 -18
- package/dist/esm/resources/services/resource-population.backend.service.js.map +1 -1
- package/dist/esm/resources/services/resources-registry.backend.service.d.ts +23 -0
- package/dist/esm/resources/services/resources-registry.backend.service.d.ts.map +1 -1
- package/dist/esm/resources/services/resources-registry.backend.service.js +31 -0
- package/dist/esm/resources/services/resources-registry.backend.service.js.map +1 -1
- package/dist/esm/resources/services/virtual-fields.backend.service.d.ts.map +1 -1
- package/dist/esm/resources/utils/resource-retention.backend.utils.d.ts.map +1 -1
- package/dist/esm/runtime/controllers/health-controller.backend.service.d.ts.map +1 -1
- package/dist/esm/runtime/controllers/health-controller.backend.service.js.map +1 -1
- package/dist/esm/runtime/domain-module.backend.definitions.d.ts.map +1 -1
- package/dist/esm/runtime/domain-module.backend.definitions.js.map +1 -1
- package/dist/esm/runtime/models/execution-context.backend.schemas.d.ts.map +1 -1
- package/dist/esm/runtime/models/request-context.als.backend.d.ts.map +1 -1
- package/dist/esm/runtime/models/runtime.backend.schemas.d.ts.map +1 -1
- package/dist/esm/runtime/services/execution-context-creator.backend.service.d.ts.map +1 -1
- package/dist/esm/runtime/services/execution-context-creator.backend.service.js.map +1 -1
- package/dist/esm/runtime/services/execution-context-handler.backend.service.d.ts.map +1 -1
- package/dist/esm/runtime/services/health-readiness-contributor.backend.interface.d.ts.map +1 -1
- package/dist/esm/runtime/services/health-readiness-contributor.backend.interface.js.map +1 -1
- package/dist/esm/runtime/services/http-server.backend.service.d.ts.map +1 -1
- package/dist/esm/runtime/services/http-server.backend.service.js +10 -0
- package/dist/esm/runtime/services/http-server.backend.service.js.map +1 -1
- package/dist/esm/runtime/services/start-application.backend.service.d.ts.map +1 -1
- package/dist/esm/runtime/services/start-application.backend.service.js +26 -12
- package/dist/esm/runtime/services/start-application.backend.service.js.map +1 -1
- package/dist/esm/runtime/services/utils/oauth-body-cap.backend.utils.d.ts.map +1 -1
- package/dist/esm/runtime/testing/execution-context-test-fixtures.d.ts.map +1 -1
- package/dist/esm/runtime/testing/mock-execution-context-creator.service.d.ts.map +1 -1
- package/dist/esm/runtime/utils/application-startup-config-access.backend.utils.d.ts.map +1 -1
- package/dist/esm/runtime/utils/feature-gated-core-resource-exclusions.backend.utils.d.ts.map +1 -1
- package/dist/esm/runtime/utils/request-client-ip.utils.d.ts.map +1 -1
- package/dist/esm/runtime/utils/scan-default-exports.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/api-keys/api-key-generation.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/api-keys/api-keys.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/security/api-keys/api-keys.custom-impl.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/batches/anonymous-session-cleanup.batch.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/batches/anonymous-session-cleanup.batch.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/controllers/auth-method-management-controller.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/controllers/authentication-controller.backend.service.d.ts +22 -0
- package/dist/esm/security/authentications/controllers/authentication-controller.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/controllers/authentication-controller.backend.service.js +84 -0
- package/dist/esm/security/authentications/controllers/authentication-controller.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/controllers/oauth-provider-controller.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/controllers/oauth-provider-controller.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/models/auth-constants.backend.d.ts.map +1 -1
- package/dist/esm/security/authentications/models/authentications.backend.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/models/authorization-client.backend.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/models/cimd.backend.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/models/cimd.backend.schemas.js.map +1 -1
- package/dist/esm/security/authentications/models/federated-auth-transport.backend.definitions.d.ts +37 -0
- package/dist/esm/security/authentications/models/federated-auth-transport.backend.definitions.d.ts.map +1 -0
- package/dist/esm/security/authentications/models/federated-auth-transport.backend.definitions.js +37 -0
- package/dist/esm/security/authentications/models/federated-auth-transport.backend.definitions.js.map +1 -0
- package/dist/esm/security/authentications/models/identity-persistence-boundaries.backend.d.ts.map +1 -1
- package/dist/esm/security/authentications/models/jwt.backend.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/models/oauth2-connection.backend.schemas.d.ts +15 -0
- package/dist/esm/security/authentications/models/oauth2-connection.backend.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/models/oauth2-connection.backend.schemas.js.map +1 -1
- package/dist/esm/security/authentications/models/saml-authentication.backend.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/models/sso-connection.backend.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/models/user-authorization-version.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/authentications/seeds/enterprise-config-defaults.seeds.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/__tests__/mock-auth-execution-context-factory.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/__tests__/mock-auth-token-issuer.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/__tests__/oauth-provider-audit-spies.mock.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/admin-config/__tests__/mock-domain-to-org-lookup.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/admin-config/__tests__/mock-enterprise-user-provisioning.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/admin-config/auth-organization-configuration.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/admin-config/auth-organization-configuration.service.js.map +1 -1
- package/dist/esm/security/authentications/services/admin-config/domain-to-org-lookup.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/admin-config/domain-to-org-lookup.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/admin-config/domain-verification.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/admin-config/domain-verification.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/admin-config/enterprise-user-provisioning.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/admin-config/enterprise-user-provisioning.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/admin-config/oidc-discovery.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/admin-config/oidc-discovery.backend.service.js +2 -1
- package/dist/esm/security/authentications/services/admin-config/oidc-discovery.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/anonymous-session.backend.service.d.ts +9 -2
- package/dist/esm/security/authentications/services/anonymous-session.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/anonymous-session.backend.service.js +9 -2
- package/dist/esm/security/authentications/services/anonymous-session.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/auth-credential-verifier.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/auth-execution-context-factory.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/auth-method-management.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/auth-method-management.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/auth-mfa.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/auth-password-reset.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/auth-phone-verification.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/auth-registration.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/auth-registration.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/oauth2-authentication.backend.service.d.ts +97 -0
- package/dist/esm/security/authentications/services/auth-methods/oauth2-authentication.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/oauth2-authentication.backend.service.js +218 -26
- package/dist/esm/security/authentications/services/auth-methods/oauth2-authentication.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/oauth2-connection-resolver.backend.service.d.ts +14 -0
- package/dist/esm/security/authentications/services/auth-methods/oauth2-connection-resolver.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/oauth2-connection-resolver.backend.service.js +36 -0
- package/dist/esm/security/authentications/services/auth-methods/oauth2-connection-resolver.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/saml-assertion-validator.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/saml-authentication.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/saml-metadata.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/saml-replay-guard.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/webauthn.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/auth-methods/webauthn.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/auth-session-store.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/auth-token-issuer.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/auth-token-issuer.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/authentication-orchestrator.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/authentication-orchestrator.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/cimd-client-metadata.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/cimd-client-metadata.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/custom-impls/auth-custom-implementations.backend.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/custom-impls/auth-custom-implementations.backend.js.map +1 -1
- package/dist/esm/security/authentications/services/custom-impls/scim-tokens.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/custom-impls/siem-delivery-dlq.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/custom-impls/sso-config-domain-verification.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/custom-impls/sso-config-domain-verification.custom-impl.backend.service.js +57 -1
- package/dist/esm/security/authentications/services/custom-impls/sso-config-domain-verification.custom-impl.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/custom-impls/sso-config.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/custom-impls/sso-config.custom-impl.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/custom-impls/sso-connection.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/custom-impls/sso-connection.custom-impl.backend.service.js +11 -1
- package/dist/esm/security/authentications/services/custom-impls/sso-connection.custom-impl.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/email-verification-initiator.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/machine-token-issuer.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/oauth-provider-token.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/oauth-provider-token.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/oidc-authorization-code.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/oidc-authorization-code.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/oidc-user-claims.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/resolve-active-member-orgs.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/utils/__tests__/mock-auth-user-lookup.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/utils/auth-controller.utils.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/utils/auth-credential-ops.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/utils/auth-policy-resolution.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/utils/auth-policy-resolution.backend.utils.js.map +1 -1
- package/dist/esm/security/authentications/services/utils/auth-response-helper.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/utils/auth-user-lookup.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/utils/auth-user-lookup.backend.service.js.map +1 -1
- package/dist/esm/security/authentications/services/utils/concurrent-session-eviction.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/utils/ensure-user-profile.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/utils/external-turn-rate-limit.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/utils/external-turn-rate-limit.backend.utils.js.map +1 -1
- package/dist/esm/security/authentications/services/utils/machine-auth-rate-limit.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/utils/pkce.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/authentications/services/utils/saml-java-availability.d.ts.map +1 -1
- package/dist/esm/security/authentications/utils/application-auth-policy-audit.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/authentications/utils/enterprise-sso-enforcement.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/authentications/utils/enterprise-sso-enforcement.backend.utils.js.map +1 -1
- package/dist/esm/security/authentications/utils/one-off-session-lifetime.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/authentications/utils/social-oauth2-purpose.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/authorizations/access-grant-decision.factory.backend.d.ts +59 -0
- package/dist/esm/security/authorizations/access-grant-decision.factory.backend.d.ts.map +1 -0
- package/dist/esm/security/authorizations/access-grant-decision.factory.backend.js +111 -0
- package/dist/esm/security/authorizations/access-grant-decision.factory.backend.js.map +1 -0
- package/dist/esm/security/authorizations/access-grant-lifecycle-audit.backend.d.ts +57 -0
- package/dist/esm/security/authorizations/access-grant-lifecycle-audit.backend.d.ts.map +1 -0
- package/dist/esm/security/authorizations/access-grant-lifecycle-audit.backend.js +133 -0
- package/dist/esm/security/authorizations/access-grant-lifecycle-audit.backend.js.map +1 -0
- package/dist/esm/security/authorizations/application-access-grant-custom-implementation.backend.service.d.ts +41 -0
- package/dist/esm/security/authorizations/application-access-grant-custom-implementation.backend.service.d.ts.map +1 -0
- package/dist/esm/security/authorizations/application-access-grant-custom-implementation.backend.service.js +157 -0
- package/dist/esm/security/authorizations/application-access-grant-custom-implementation.backend.service.js.map +1 -0
- package/dist/esm/security/authorizations/application-wide-read-admission.backend.d.ts +84 -0
- package/dist/esm/security/authorizations/application-wide-read-admission.backend.d.ts.map +1 -0
- package/dist/esm/security/authorizations/application-wide-read-admission.backend.js +99 -0
- package/dist/esm/security/authorizations/application-wide-read-admission.backend.js.map +1 -0
- package/dist/esm/security/authorizations/authorization-denial-audit.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/authorizations/cross-tenant-read-observation.backend.d.ts.map +1 -1
- package/dist/esm/security/authorizations/cross-tenant-read-observation.backend.js.map +1 -1
- package/dist/esm/security/authorizations/initiator-organization-confinement.backend.d.ts.map +1 -1
- package/dist/esm/security/authorizations/junction-scope-resolution.backend.d.ts.map +1 -1
- package/dist/esm/security/authorizations/organization-owner-floor.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/authorizations/organization-owner-floor.backend.utils.js.map +1 -1
- package/dist/esm/security/authorizations/organization-unit-narrowing-enforcement.backend.d.ts.map +1 -1
- package/dist/esm/security/authorizations/platform-access-grant-custom-implementation.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authorizations/platform-access-grant-custom-implementation.backend.service.js +20 -181
- package/dist/esm/security/authorizations/platform-access-grant-custom-implementation.backend.service.js.map +1 -1
- package/dist/esm/security/authorizations/privileged-access-review.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/authorizations/relationship-foreign-key-filter.backend.d.ts.map +1 -1
- package/dist/esm/security/authorizations/role-ceiling.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/authorizations/role-ceiling.backend.utils.js.map +1 -1
- package/dist/esm/security/authorizations/role-conferral.backend.utils.d.ts +40 -0
- package/dist/esm/security/authorizations/role-conferral.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/authorizations/role-conferral.backend.utils.js +43 -1
- package/dist/esm/security/authorizations/role-conferral.backend.utils.js.map +1 -1
- package/dist/esm/security/authorizations/scope-root-collection-confinement.backend.d.ts +27 -17
- package/dist/esm/security/authorizations/scope-root-collection-confinement.backend.d.ts.map +1 -1
- package/dist/esm/security/authorizations/scope-root-collection-confinement.backend.js +27 -17
- package/dist/esm/security/authorizations/scope-root-collection-confinement.backend.js.map +1 -1
- package/dist/esm/security/authorizations/services/authorizations.backend.service.d.ts +72 -0
- package/dist/esm/security/authorizations/services/authorizations.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authorizations/services/authorizations.backend.service.js +153 -10
- package/dist/esm/security/authorizations/services/authorizations.backend.service.js.map +1 -1
- package/dist/esm/security/authorizations/super-admin-floor.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/authorizations/super-admin-floor.backend.utils.js.map +1 -1
- package/dist/esm/security/connected-accounts/connection-target-authorization.backend.d.ts.map +1 -1
- package/dist/esm/security/connected-accounts/connection-target-authorization.backend.js.map +1 -1
- package/dist/esm/security/connected-accounts/controllers/provider-connection.controller.backend.service.d.ts +139 -1
- package/dist/esm/security/connected-accounts/controllers/provider-connection.controller.backend.service.d.ts.map +1 -1
- package/dist/esm/security/connected-accounts/controllers/provider-connection.controller.backend.service.js +474 -33
- package/dist/esm/security/connected-accounts/controllers/provider-connection.controller.backend.service.js.map +1 -1
- package/dist/esm/security/connected-accounts/organization-provider-credential-resolver.port.d.ts +40 -0
- package/dist/esm/security/connected-accounts/organization-provider-credential-resolver.port.d.ts.map +1 -1
- package/dist/esm/security/connected-accounts/organization-provider-credential-resolver.port.js.map +1 -1
- package/dist/esm/security/connected-accounts/provider-oauth2-refresher.port.d.ts.map +1 -1
- package/dist/esm/security/connected-accounts/provider-oauth2-refresher.port.js.map +1 -1
- package/dist/esm/security/connected-accounts/services/organization-provider-credential-store.backend.service.d.ts +19 -0
- package/dist/esm/security/connected-accounts/services/organization-provider-credential-store.backend.service.d.ts.map +1 -1
- package/dist/esm/security/connected-accounts/services/organization-provider-credential-store.backend.service.js +38 -0
- package/dist/esm/security/connected-accounts/services/organization-provider-credential-store.backend.service.js.map +1 -1
- package/dist/esm/security/connected-accounts/services/organization-provider-credentials.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/security/connected-accounts/services/organization-provider-credentials.custom-impl.backend.service.js.map +1 -1
- package/dist/esm/security/connected-accounts/services/provider-oauth2-exchange.backend.d.ts.map +1 -1
- package/dist/esm/security/connected-accounts/services/provider-oauth2-exchange.backend.js +17 -1
- package/dist/esm/security/connected-accounts/services/provider-oauth2-exchange.backend.js.map +1 -1
- package/dist/esm/security/connected-accounts/services/provider-oauth2-pending-authorization.backend.service.d.ts +14 -0
- package/dist/esm/security/connected-accounts/services/provider-oauth2-pending-authorization.backend.service.d.ts.map +1 -1
- package/dist/esm/security/connected-accounts/services/provider-oauth2-pending-authorization.backend.service.js +16 -0
- package/dist/esm/security/connected-accounts/services/provider-oauth2-pending-authorization.backend.service.js.map +1 -1
- package/dist/esm/security/connected-accounts/services/provider-oauth2-refresher.backend.service.d.ts.map +1 -1
- package/dist/esm/security/connected-accounts/services/provider-oauth2-refresher.backend.service.js +1 -1
- package/dist/esm/security/connected-accounts/services/provider-oauth2-refresher.backend.service.js.map +1 -1
- package/dist/esm/security/connected-accounts/services/user-provider-credential-store.backend.service.d.ts +19 -0
- package/dist/esm/security/connected-accounts/services/user-provider-credential-store.backend.service.d.ts.map +1 -1
- package/dist/esm/security/connected-accounts/services/user-provider-credential-store.backend.service.js +45 -2
- package/dist/esm/security/connected-accounts/services/user-provider-credential-store.backend.service.js.map +1 -1
- package/dist/esm/security/connected-accounts/services/user-provider-credentials.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/security/connected-accounts/services/user-provider-credentials.custom-impl.backend.service.js.map +1 -1
- package/dist/esm/security/connected-accounts/user-provider-credential-resolver.port.d.ts +37 -1
- package/dist/esm/security/connected-accounts/user-provider-credential-resolver.port.d.ts.map +1 -1
- package/dist/esm/security/connected-accounts/user-provider-credential-resolver.port.js.map +1 -1
- package/dist/esm/security/connected-accounts/utils/provider-credential-envelope.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/connected-accounts/utils/provider-credential-envelope.backend.utils.js.map +1 -1
- package/dist/esm/security/connected-accounts/utils/stored-credential-value.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/connected-accounts/utils/stored-credential-value.backend.utils.js.map +1 -1
- package/dist/esm/security/connected-accounts/utils/user-delegated-access-token-slot.backend.utils.d.ts +34 -0
- package/dist/esm/security/connected-accounts/utils/user-delegated-access-token-slot.backend.utils.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/utils/user-delegated-access-token-slot.backend.utils.js +39 -0
- package/dist/esm/security/connected-accounts/utils/user-delegated-access-token-slot.backend.utils.js.map +1 -0
- package/dist/esm/security/consumable-tokens/batches/consumable-tokens-cleanup.batch.backend.service.d.ts.map +1 -1
- package/dist/esm/security/consumable-tokens/consumable-token-models.exports.d.ts.map +1 -1
- package/dist/esm/security/consumable-tokens/models/consumable-tokens.backend.resources-config.schemas.d.ts.map +1 -1
- package/dist/esm/security/consumable-tokens/models/consumable-tokens.shared.schemas.d.ts.map +1 -1
- package/dist/esm/security/consumable-tokens/models/index.d.ts.map +1 -1
- package/dist/esm/security/consumable-tokens/services/__tests__/mock-consumable-token.service.d.ts.map +1 -1
- package/dist/esm/security/consumable-tokens/services/consumable-token.backend.service.d.ts.map +1 -1
- package/dist/esm/security/consumable-tokens/services/consumable-token.backend.service.js.map +1 -1
- package/dist/esm/security/credential-rotation-grace.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/credential-rotation-grace.backend.utils.js.map +1 -1
- package/dist/esm/security/jwt/services/auth-jwt-guard.backend.service.d.ts.map +1 -1
- package/dist/esm/security/jwt/services/jwt.backend.service.d.ts.map +1 -1
- package/dist/esm/security/jwt/services/wildo-worker-bootstrap-client.backend.service.d.ts +13 -0
- package/dist/esm/security/jwt/services/wildo-worker-bootstrap-client.backend.service.d.ts.map +1 -1
- package/dist/esm/security/jwt/services/wildo-worker-bootstrap-client.backend.service.js +14 -0
- package/dist/esm/security/jwt/services/wildo-worker-bootstrap-client.backend.service.js.map +1 -1
- package/dist/esm/security/jwt/utils/jwt-verification-error-classification.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-client-generation.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-client-generation.backend.utils.js.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-clients.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/security/oauth-clients/oauth-clients.custom-impl.backend.service.js.map +1 -1
- package/dist/esm/security/outbound/outbound-request-deadline.backend.utils.d.ts +39 -0
- package/dist/esm/security/outbound/outbound-request-deadline.backend.utils.d.ts.map +1 -0
- package/dist/esm/security/outbound/outbound-request-deadline.backend.utils.js +60 -0
- package/dist/esm/security/outbound/outbound-request-deadline.backend.utils.js.map +1 -0
- package/dist/esm/security/outbound/outbound-request-headers.backend.utils.d.ts +66 -0
- package/dist/esm/security/outbound/outbound-request-headers.backend.utils.d.ts.map +1 -0
- package/dist/esm/security/outbound/outbound-request-headers.backend.utils.js +75 -0
- package/dist/esm/security/outbound/outbound-request-headers.backend.utils.js.map +1 -0
- package/dist/esm/security/scim/controllers/scim.backend.controller.d.ts.map +1 -1
- package/dist/esm/security/scim/controllers/scim.backend.controller.js.map +1 -1
- package/dist/esm/security/scim/models/scim-protocol.backend.schemas.d.ts.map +1 -1
- package/dist/esm/security/scim/models/scim-protocol.backend.schemas.js.map +1 -1
- package/dist/esm/security/scim/utils/scim-attribute-path-resolver.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/scim/utils/scim-filter-parser.d.ts.map +1 -1
- package/dist/esm/security/scim/utils/scim-response-formatter.d.ts.map +1 -1
- package/dist/esm/security/session-invalidation-fence.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/ssrf/outbound-target-guard.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/ssrf/outbound-target-guard.backend.utils.js.map +1 -1
- package/dist/esm/security/ssrf/pinned-outbound-fetch.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/ssrf/pinned-outbound-fetch.backend.utils.js.map +1 -1
- package/dist/esm/security/token-invalidation-fence.backend.utils.d.ts.map +1 -1
- package/dist/esm/testing.d.ts.map +1 -1
- package/dist/esm/users/services/inbound-contact-custom-implementation.backend.service.d.ts.map +1 -1
- package/dist/esm/users/services/user-deletion-audit.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/users/services/user-force-password-reset.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/users/services/user-read-retained.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/users/services/user-read-retained.custom-impl.backend.service.js.map +1 -1
- package/dist/esm/users/services/user-role-administration.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/esm/users/services/user-self-custom-implementations.backend.d.ts.map +1 -1
- package/dist/esm/users/services/user-super-admin-floor.custom-impl.backend.service.d.ts.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +9 -9
- package/dist/esm/external-providers/services/flow-actor-design.backend.service.d.ts +0 -45
- package/dist/esm/external-providers/services/flow-actor-design.backend.service.d.ts.map +0 -1
- package/dist/esm/external-providers/services/flow-actor-design.backend.service.js +0 -22
- package/dist/esm/external-providers/services/flow-actor-design.backend.service.js.map +0 -1
- package/dist/esm/notifications/email/models/email-context-provider.interface.d.ts +0 -0
- package/dist/esm/notifications/email/models/email-context-provider.interface.d.ts.map +0 -0
- package/dist/esm/notifications/email/models/email-context-provider.interface.js +0 -0
- package/dist/esm/notifications/email/models/email-context-provider.interface.js.map +0 -0
- package/dist/esm/notifications/email/services/email-context-provider-registry.backend.service.d.ts +0 -0
- package/dist/esm/notifications/email/services/email-context-provider-registry.backend.service.d.ts.map +0 -0
- package/dist/esm/notifications/email/services/email-context-provider-registry.backend.service.js +0 -0
- package/dist/esm/notifications/email/services/email-context-provider-registry.backend.service.js.map +0 -0
- package/dist/esm/notifications/email/services/email-template-compiler.backend.service.d.ts +0 -0
- package/dist/esm/notifications/email/services/email-template-compiler.backend.service.d.ts.map +0 -0
- package/dist/esm/notifications/email/services/email-template-compiler.backend.service.js +0 -0
- package/dist/esm/notifications/email/services/email-template-compiler.backend.service.js.map +0 -0
- package/dist/esm/notifications/email/services/email-template-sandbox.backend.service.d.ts +0 -0
- package/dist/esm/notifications/email/services/email-template-sandbox.backend.service.d.ts.map +0 -0
- package/dist/esm/notifications/email/services/email-template-sandbox.backend.service.js +0 -0
- package/dist/esm/notifications/email/services/email-template-sandbox.backend.service.js.map +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resources-registry.backend.service.js","sourceRoot":"","sources":["../../../../../src/resources/services/resources-registry.backend.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAKH,gCAAgC,EAChC,6CAA6C,EAC7C,4BAA4B,EAO5B,6CAA6C,EAC7C,kCAAkC,EAClC,0CAA0C,EAC1C,8BAA8B,EAE9B,yCAAyC,EACzC,yCAAyC,EACzC,kCAAkC,EAClC,4BAA4B,EAC5B,4BAA4B,EAC5B,mCAAmC,EACnC,sCAAsC,EACtC,mCAAmC,EACnC,oDAAoD,EACpD,kDAAkD,EAClD,SAAS,EACT,2BAA2B,EAC3B,kCAAkC,EAClC,0CAA0C,EAC1C,0CAA0C,EAK1C,2BAA2B,EAC3B,qBAAqB,EACrB,iCAAiC,EACjC,4CAA4C,EAC5C,qBAAqB,EACrB,oBAAoB,EACpB,0BAA0B,EAG1B,oBAAoB,EACpB,sCAAsC,GACzC,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,wCAAwC,EAAE,MAAM,8EAA8E,CAAC;AACxI,OAAO,EAAE,6BAA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K,CAAC;QACjB,CAAC;QAED,qBAAqB;QACrB,IAAI,CAAC,SAAS,CAAC,gBAAgB,EAAE,CAAC;YAC9B,SAAS,CAAC,gBAAgB,GAAG,EAAE,CAAC;QACpC,CAAC;QACD,IAAI,CAAC,SAAS,CAAC,gBAAgB,CAAC,WAAW,EAAE,CAAC;YAC1C,SAAS,CAAC,gBAAgB,CAAC,WAAW,GAAG,EAAE,CAAC;QAChD,CAAC;QACD,SAAS,CAAC,gBAAgB,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC;QAE3D,IAAI,CAAC,QAAQ,CAAC,2CAA2C,SAAS,OAAO,YAAY,SAAS,CAAC,CAAC;QAChG,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ,CAAA;AAthFY,+BAA+B;IAD3C,UAAU,EAAE;IAQJ,WAAA,MAAM,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAA;IACjC,WAAA,MAAM,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,CAAA;IAC3C,WAAA,MAAM,CAAC,kBAAkB,CAAC,mBAAmB,CAAC,CAAA;yDAAkC,0BAA0B;GATtG,+BAA+B,CAshF3C","sourcesContent":["import { injectable, inject } from 'inversify';\nimport {\n ResourcesRegistry,\n ResourceRelationship,\n TenantTeardownConfig,\n NotificationBadgeDefinition,\n coreNotificationBadgeDefinitions,\n collectNotificationBadgeDeclarationViolations,\n notificationBadgeIdentityKey,\n type NotificationBadgeOperationDeclarationSite,\n UserNotificationDefinition,\n ResourceConfiguration_Operation,\n ResourceConfiguration_OperationPath,\n AnyResourceConfiguration,\n ResourceConfiguration_InitializationFactoryMap,\n coreShared_ResourcesConfigurations_FactoryMap,\n coreResourceShared_FieldIdentifier,\n coreResourceShared_FieldIdentifierPriority,\n coreSharedResourceRelationship,\n ResourceType,\n ResourcesConfigOperationsUrlsBuilderUtils,\n ResourcesConfigOperationsDtosBuilderUtils,\n ResourcesConfig_OperationPathUtils,\n ResourceOperationVariantType,\n isDefaultUrlBearingOperation,\n isServiceResolvableDefaultOperation,\n SERVICE_NATIVE_OPERATION_VARIANT_TYPES,\n URL_BEARING_OPERATION_VARIANT_TYPES,\n findSharedPersistenceCollectionRetentionIncoherences,\n findSharedPersistenceCollectionAdapterIncoherences,\n ErrorType,\n ErrorCustomMessageReference,\n ENGINE_ORGANIZATION_UNIT_NARROWING,\n collectOrganizationUnitNarrowingViolations,\n mergeOrganizationUnitNarrowingDeclarations,\n type OrganizationUnitNarrowingDeclaration,\n ResourceConfiguration_Operation_UrlInitiatorInfo,\n ResourceConfiguration_Operation_UrlParameterInfo,\n PersistenceAdapterType,\n DEFAULT_PERSISTENCE_ADAPTER,\n CoreResourceOperation,\n ResourceParentResourceRequirement,\n reconcileGeneratedRelationshipBulkOperations,\n Resources_SharedUtils,\n isPersistenceAdapter,\n selectByPersistenceAdapter,\n CoreResourceType,\n DataMode,\n dataModeToVariantKey,\n findDuplicateRelationshipRegistrations,\n} from '@wildo-ai/saas-models';\nimport { BackendResourcesSources } from '~wildo-backend-lib/resources/models/resources.backend.schemas';\nimport { backendResourcesConfigurationsFactoryMap } from '~wildo-backend-lib/resources/models/resources-operations.backend.definitions';\nimport { backendResourcesRelationships } from '~wildo-backend-lib/resources/models/resources-relationships.backend.definitions';\nimport { BackendResourceFieldIdentifier } from '~wildo-backend-lib/resources/models/resources-types.backend.schemas';\nimport { SAAS_SERVICE_TYPES } from '~wildo-backend-lib/inject/models/service-types';\nimport { resolveDefaultPersistenceAdapter } from '~wildo-backend-lib/databases/models/resolve-persistence-adapter.backend.utils';\nimport type { LoggerService } from '~wildo-backend-lib/monitoring/logger/services/logger.service';\nimport type { AppConfigurationService } from '~wildo-backend-lib/config/services/app-configuration.backend.service';\nimport {\n classifySubjectErasureDisposition,\n IntrospectionTenancyStance,\n isResourcePersistenceAdapterIsolation,\n PersistenceAdapter,\n ResourceSystemAccessMode,\n SubjectErasureDisposition,\n} from '@wildo-ai/saas-models';\nimport {\n HttpApiErasureStance,\n HttpApiTransportDialect,\n} from '@wildo-ai/saas-models/external-data';\nimport { getZodObjectShape, isFileSchema, isZodObject, unwrapSchema } from '@wildo-ai/zod-decorators';\nimport { ErrorBuilderBackendService } from '~wildo-backend-lib/errors/services/error-builder.backend.service';\nimport { projectCaughtErrorLogFields } from '~wildo-backend-lib/errors/utils/error-log-level-classification.backend.utils';\nimport type { z } from 'zod';\n\n\n@injectable()\nexport class ResourcesRegistryBackendService {\n protected logDebug: (message: string, context?: Record<string, unknown>) => void;\n protected registry: ResourcesRegistry | null = null;\n\n protected isInitialized = false;\n\n constructor(\n @inject(SAAS_SERVICE_TYPES.Logger) protected readonly logger: LoggerService,\n @inject(SAAS_SERVICE_TYPES.AppConfigService) protected readonly configService: AppConfigurationService,\n @inject(SAAS_SERVICE_TYPES.ErrorBuilderService) protected readonly errorBuilder: ErrorBuilderBackendService\n ) {\n this.logDebug = this.logger.debugByType('ResourcesRegistryBackendService');\n this.logger.setDebugTypeLogging('ResourcesRegistryBackendService', false);\n\n this.logDebug('Resources registry service created (not yet initialized)');\n }\n\n /**\n * W5.1: Returns organizationTypes config when app config is initialized.\n * Used by organization create validation to ensure Organization.type is a valid key.\n * Returns undefined when config is not initialized (e.g. platform mode).\n */\n public getOrganizationTypesConfig(): Record<string, unknown> | undefined {\n if (!this.configService.isInitialized()) return undefined;\n const config = this.configService.config;\n return (config as { organizationTypes?: Record<string, unknown> })?.organizationTypes;\n }\n\n /**\n * W5.9: Returns userTypes config when app config is initialized.\n * Used by user type revocation to check requiresOrgMembership constraints.\n */\n public getUserTypesConfig(): Record<string, unknown> | undefined {\n if (!this.configService.isInitialized()) return undefined;\n const config = this.configService.config;\n return (config as { userTypes?: Record<string, unknown> })?.userTypes;\n }\n\n /**\n * WS-A: Returns the tenant-teardown block when app config is initialized.\n *\n * Consumed by the `request_deletion` lifecycle operation (to pin\n * `Organization.purgeScheduledAt`) and by the `organization-purge` batch (for its cadence and\n * per-run bound). `undefined` here is not a failure — every field of\n * `TenantTeardownConfigSchema` carries a default, and `resolveOrganizationPurgeScheduledAt`\n * falls back to them, so an application that declares no block still gets a working 30-day\n * window rather than a tenant that can never be purged.\n */\n public getTenantTeardownConfig(): TenantTeardownConfig | undefined {\n if (!this.configService.isInitialized()) return undefined;\n const config = this.configService.config;\n return (config as { tenantTeardown?: TenantTeardownConfig })?.tenantTeardown;\n }\n\n // ================================\n // Initialization Method\n // ================================\n\n public async initialize<\n CustomShared_ResourceType extends ResourceType | undefined = undefined,\n CustomBackend_ResourceType extends ResourceType | undefined = undefined\n >(\n customShared_ResourcesConfigurationsFactoryMap : ResourceConfiguration_InitializationFactoryMap<CustomShared_ResourceType>,\n customShared_ResourceFieldIdentifier: { [ key: string ]: string } | undefined,\n customShared_ResourcesRelationships: ResourceRelationship[],\n customBackend_ResourcesConfigurationsFactoryMap : ResourceConfiguration_InitializationFactoryMap<CustomBackend_ResourceType>,\n customBackend_ResourceFieldIdentifier: { [ key: string ]: string } | undefined,\n customBackend_ResourcesRelationships: ResourceRelationship[],\n customNotificationBadgeDefinitions?: NotificationBadgeDefinition[],\n customAdditionalUserNotificationDefinitions?: UserNotificationDefinition[],\n excludedResourceTypes?: ReadonlySet<string>,\n /**\n * App-declared organization-unit narrowing opt-ins, merged over the engine's.\n *\n * This is the app-builder authoring surface for unit-scoped authorization: naming a resource\n * here admits a principal whose authority for it comes only from a unit grant, and confines\n * them to the rows of those units. Validated against the D-C4 containment rule below, on the\n * MERGED map — an application must not be able to narrow the authorization plane merely by\n * declaring it after the engine.\n */\n customOrganizationUnitNarrowing?: Readonly<Partial<Record<string, OrganizationUnitNarrowingDeclaration>>>,\n ): Promise<void> {\n if (this.isInitialized) {\n this.logDebug('Service already initialized, skipping');\n return;\n }\n\n // Organization-unit narrowing containment (plan decision D-C4). A resource that ISSUES\n // authority must not be governed by the authority it issues, or a principal holding a role\n // in ONE unit can use it to write the grant surface and union themselves up to\n // organization-wide admin. Fail CLOSED at startup: a misdeclared narrowing is a silent\n // authorization hole, so the application must not come up with one.\n //\n // Validated on the MERGED map, which is also the map published on the registry and consulted\n // at runtime — validating the engine constant alone would have left every app-declared\n // opt-in unchecked, which is where the containment actually matters.\n const organizationUnitNarrowing = mergeOrganizationUnitNarrowingDeclarations(\n ENGINE_ORGANIZATION_UNIT_NARROWING,\n customOrganizationUnitNarrowing,\n );\n const narrowingViolations = collectOrganizationUnitNarrowingViolations(organizationUnitNarrowing);\n if (narrowingViolations.length > 0) {\n throw this.errorBuilder.buildError(ErrorType.CONFIGURATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFIGURATION,\n context: {\n message: 'Organization-unit narrowing declaration violates the authorization-plane containment rule',\n reason: 'organization_unit_narrowing_containment_violation',\n violations: narrowingViolations,\n },\n });\n }\n\n const coreBackend_ResourceConfigurationFactoryMaps = backendResourcesConfigurationsFactoryMap;\n const coreBackend_ResourceRelationship = backendResourcesRelationships;\n const coreBackend_FieldIdentifier = BackendResourceFieldIdentifier;\n\n const allResourceFieldIdentifiers : { [ key: string ]: string } = {\n ...customShared_ResourceFieldIdentifier,\n ...customBackend_ResourceFieldIdentifier,\n ...coreBackend_FieldIdentifier,\n ...coreResourceShared_FieldIdentifier,\n };\n\n const assembledResourceRelationships: ResourceRelationship[] = [\n ...(customShared_ResourcesRelationships || []),\n ...(customBackend_ResourcesRelationships || []),\n ...coreSharedResourceRelationship,\n ...coreBackend_ResourceRelationship,\n ];\n\n // ── DUPLICATE-EDGE GUARD (fail-closed, runs BEFORE compilation) ─────────\n //\n // The four sources above are concatenated with no dedup, and the config factory\n // buckets the result with a plain `filter` — so an edge present twice here is\n // present twice in the child's `parentRelationships` AND the parent's\n // `childRelationships`, forever. Nothing downstream can repair that, because two\n // identical entries are indistinguishable from two intentionally distinct edges.\n //\n // The damage is silent, uneven, and does NOT wait for a lifecycle to fire. Runtime\n // paths that assert a cardinality on the buckets throw CONFIGURATION on an ordinary\n // request (complete-association resolution needs EXACTLY TWO parents; the\n // context-addressed singleton paths reject an AMBIGUOUS target), the frontend drops\n // or doubles relationship semantics on the same ambiguity checks, and composition\n // seeding / the onParentDelete cascade then double-EXECUTE on top. URL generation,\n // index derivation and DTO shaping happen to collapse duplicates — which is exactly\n // why a doubled registry can look healthy. See the validator's JSDoc for the full\n // three-class breakdown, and do NOT relax this to a warning on the theory that\n // duplicates are inert until a lifecycle runs.\n //\n // In practice this is never a duplicated declaration in one file — it is a host\n // COMPOSING lists and passing the same array through two of `initialize`'s slots.\n // `platform-apps-manager` did exactly that and doubled its four `wildoApplication`\n // composition edges (surfaced by the cascade-deletability guard on a live boot,\n // 2026-07-29, which reported each edge twice).\n //\n // Checked pre-compilation on the AUTHORED declarations: `ensureCompiledRelationships`\n // may legitimately preserve pre-resolved semantics on one copy and recompile the\n // other, which would hide the duplicate from a post-compilation comparison.\n const duplicateRelationshipRegistrations = findDuplicateRelationshipRegistrations(\n assembledResourceRelationships,\n );\n if (duplicateRelationshipRegistrations.length > 0) {\n // Log before throwing, mirroring the FK-validation guard below: the error context is\n // sanitized on its way out, so the boot log is the reliable channel for the full list.\n this.logger.error('Duplicate relationship registration detected during registry assembly:', {\n duplicates: duplicateRelationshipRegistrations.map((duplicate) => duplicate.message),\n });\n throw this.errorBuilder.buildError(\n ErrorType.CONFIGURATION,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.RESOURCES_REGISTRY_RELATIONSHIP_VALIDATION_FAILED,\n context: {\n message:\n `${duplicateRelationshipRegistrations.length} relationship edge(s) registered more than once:\\n` +\n duplicateRelationshipRegistrations.map((duplicate) => ` • ${duplicate.message}`)\n .join('\\n'),\n duplicatedEdges: duplicateRelationshipRegistrations.map(\n (duplicate) =>\n `${String(duplicate.parentResourceType)} → ${String(duplicate.childResourceType)} (×${duplicate.occurrences})`,\n ),\n },\n },\n );\n }\n\n let allResourceRelationships : ResourceRelationship[] = (\n Resources_SharedUtils.ensureCompiledRelationships as (\n relationships: ResourceRelationship[],\n allResourceFieldIdentifiers?: Record<string, string>\n ) => ResourceRelationship[]\n ).call(Resources_SharedUtils, assembledResourceRelationships, allResourceFieldIdentifiers);\n\n // Apply factory functions for custom shared resources configurations\n const customShared_ResourcesConfigurations: { [key: string]: AnyResourceConfiguration } = {};\n if (customShared_ResourcesConfigurationsFactoryMap && Object.keys(customShared_ResourcesConfigurationsFactoryMap).length > 0) {\n Object.entries(customShared_ResourcesConfigurationsFactoryMap).forEach(([resourceType, factory]) => {\n if (factory && typeof factory === 'function') {\n this.logDebug(`🏭 Calling factory for custom resource: ${resourceType}`);\n customShared_ResourcesConfigurations[resourceType] = factory(allResourceRelationships);\n this.logDebug(`✅ Factory completed for ${resourceType}`);\n }\n });\n }\n\n // Apply factory functions for custom backend resources configurations\n const customBackend_ResourcesConfigurations: { [key: string]: AnyResourceConfiguration } = {};\n if (customBackend_ResourcesConfigurationsFactoryMap && Object.keys(customBackend_ResourcesConfigurationsFactoryMap).length > 0) {\n Object.entries(customBackend_ResourcesConfigurationsFactoryMap).forEach(([resourceType, factory]) => {\n if (factory && typeof factory === 'function') {\n customBackend_ResourcesConfigurations[resourceType] = factory(allResourceRelationships);\n }\n });\n }\n\n // Apply factory functions for core shared resources configurations\n const coreShared_ResourcesConfigurations: { [key: string]: AnyResourceConfiguration } = {};\n if (coreShared_ResourcesConfigurations_FactoryMap && Object.keys(coreShared_ResourcesConfigurations_FactoryMap).length > 0) {\n Object.entries(coreShared_ResourcesConfigurations_FactoryMap).forEach(([resourceType, factory]) => {\n if (factory && typeof factory === 'function') {\n coreShared_ResourcesConfigurations[resourceType] = factory(allResourceRelationships);\n }\n });\n }\n\n // Apply factory functions for core backend resources configurations\n const coreBackend_ResourcesConfigurations: { [key: string]: AnyResourceConfiguration } = {};\n if (coreBackend_ResourceConfigurationFactoryMaps && Object.keys(coreBackend_ResourceConfigurationFactoryMaps).length > 0) {\n Object.entries(coreBackend_ResourceConfigurationFactoryMaps).forEach(([resourceType, factory]) => {\n if (factory && typeof factory === 'function') {\n coreBackend_ResourcesConfigurations[resourceType] = factory(allResourceRelationships);\n }\n });\n }\n\n // Merge all resource configurations\n let allResourceConfigurations : { [key: string]: AnyResourceConfiguration } = {\n ...coreShared_ResourcesConfigurations,\n ...coreBackend_ResourcesConfigurations,\n ...customShared_ResourcesConfigurations,\n ...customBackend_ResourcesConfigurations,\n };\n\n // ── Resource Exclusion ─────────────────────────────────────────\n // Generic mechanism: remove excluded resource types from all 3 layers\n // (configurations, relationships, field identifiers).\n // Used for billing-conditional resources when billing is disabled.\n if (excludedResourceTypes && excludedResourceTypes.size > 0) {\n this.logDebug(`Excluding ${excludedResourceTypes.size} resource types from registry`, {\n excludedTypes: [...excludedResourceTypes],\n });\n\n // Layer 1: Remove excluded resource configurations\n allResourceConfigurations = Object.fromEntries(\n Object.entries(allResourceConfigurations).filter(\n ([resourceType]) => !excludedResourceTypes.has(resourceType)\n )\n );\n\n // Layer 2: Remove relationships that reference excluded types\n allResourceRelationships = allResourceRelationships.filter(\n (rel) => !excludedResourceTypes.has(rel.resourceType1) && !excludedResourceTypes.has(rel.resourceType2)\n );\n\n // Layer 3: Remove excluded field identifiers\n for (const resourceType of excludedResourceTypes) {\n delete allResourceFieldIdentifiers[resourceType];\n }\n\n this.logDebug('Resource exclusion applied', {\n remainingConfigurations: Object.keys(allResourceConfigurations).length,\n remainingRelationships: allResourceRelationships.length,\n });\n }\n\n this.normalizeResourceConfigurationRelationships(\n allResourceConfigurations,\n allResourceFieldIdentifiers\n );\n\n reconcileGeneratedRelationshipBulkOperations(\n allResourceConfigurations,\n allResourceRelationships,\n allResourceFieldIdentifiers\n );\n\n ResourcesConfigOperationsDtosBuilderUtils.rebuildResourceConfigurationsOperationDtos(\n allResourceConfigurations\n );\n\n // Reverse map fieldIdentifier → REFERENCED resourceType — built by THE shared\n // implementation (Resources_SharedUtils.buildFieldIdentifierToResourceTypeMap).\n // This service and the frontend resources repository used to carry hand-kept\n // copies of this logic; a semantic change to FK resolution now lands once.\n const fieldIdentifierToResourceType = Resources_SharedUtils.buildFieldIdentifierToResourceTypeMap({\n allResourceFieldIdentifiers,\n allResourceRelationships,\n getMainSchema: (resourceType) => allResourceConfigurations[resourceType]?.mainSchema,\n fieldIdentifierPriority: coreResourceShared_FieldIdentifierPriority,\n onForeignKeyCollision: ({ foreignKeyField, existingType, referencedResourceType }) => {\n this.logger.error(\n `[ResourcesRegistry] FK field \"${foreignKeyField}\" is reused by different holders ` +\n `referencing \"${existingType}\" and \"${referencedResourceType}\". ` +\n `Use distinct foreignKeyField names to disambiguate.`,\n { existingType, newType: referencedResourceType, foreignKeyField }\n );\n },\n }) as Record<string, ResourceType>;\n\n // Derive the scope-required reference-search junctions from the M:N\n // relationships (e.g. (users ← organizations) via organizationMembers).\n // Both registries build this identically so the picker (frontend) and\n // the contextual filter + authorization (backend) agree on scoping.\n const manyToManyScopeJunctions = Resources_SharedUtils.buildManyToManyScopeJunctionMap(\n allResourceRelationships,\n allResourceFieldIdentifiers,\n );\n\n // Create the final registry\n this.registry = {\n notificationBadgeDefinitions: [\n ...coreNotificationBadgeDefinitions,\n ...(customNotificationBadgeDefinitions ?? []),\n ],\n additionalUserNotificationDefinitions: [],\n resourceRelationships: allResourceRelationships,\n resourceConfigurations: allResourceConfigurations,\n // Recorded HERE because this is the last point at which app and core are distinguishable —\n // `allResourceConfigurations` merges them, deliberately, since every runtime consumer wants\n // one map. A consumer re-deriving the split from a core key set would be a second\n // enumeration of a population this method already has in two variables.\n applicationResourceTypes: [\n ...Object.keys(customShared_ResourcesConfigurations),\n ...Object.keys(customBackend_ResourcesConfigurations),\n ] as ResourceType[],\n allResourceFieldIdentifiers,\n fieldIdentifierToResourceType,\n manyToManyScopeJunctions,\n // Validated against the D-C4 containment rule at the top of this method. This is the ONE\n // map both halves of enforcement read — the authorization gate (which decides) and the\n // repositories (which apply) — so they cannot disagree about which resources are narrowed.\n organizationUnitNarrowing,\n };\n\n // Validate that every badge declaration is coherent, and refuse to start otherwise.\n this.logDebug('Validating notification badge declarations');\n this.validateNotificationBadgeDeclarations(this.registry.notificationBadgeDefinitions, allResourceConfigurations);\n\n // Validate all relationships can resolve FK fields\n this.logDebug('Validating relationship FK field resolution');\n this.validateRelationshipForeignKeyFields(allResourceRelationships, allResourceFieldIdentifiers);\n\n // Validate relationship graph for cycles\n this.logDebug('Validating relationship graph for cycles');\n this.validateRelationshipGraph(allResourceRelationships);\n\n // Validate persistence adapter configuration for all resources\n this.logDebug('Validating persistence adapter configuration');\n this.validatePersistenceAdapterConfiguration(allResourceConfigurations);\n\n // Validate that configs sharing one collection agree about retention governance\n this.logDebug('Validating shared-collection retention coherence');\n this.validateSharedCollectionRetentionCoherence(allResourceConfigurations);\n\n this.logDebug('Generating URLs for URL-bearing operations');\n this.generateUrlsForAllResourceConfigurations(allResourceConfigurations, this.registry, allResourceFieldIdentifiers);\n\n this.logDebug('Enhancing DTOs for all operations');\n this.enhanceDtosForAllResourceConfigurations(allResourceConfigurations, this.registry, allResourceFieldIdentifiers);\n\n this.isInitialized = true;\n this.logDebug('Resources registry initialized successfully', { totalConfigurations: Object.keys(allResourceConfigurations).length, totalRelationships: allResourceRelationships.length });\n\n //Debug display generated URLs after initialization is complete\n this.logDebug('Displaying generated URLs for debugging');\n this.debugDisplayGeneratedUrls();\n\n // Debug display generated DTOs after initialization is complete\n // this.logDebug('Displaying generated DTOs for debugging');\n // this.debugDisplayGeneratedDtos();\n\n }\n\n\n\n // ================================\n // Access Methods\n // ================================\n\n public getResourcesRegistry(): ResourcesRegistry {\n this.ensureInitialized();\n return this.registry!;\n }\n\n /**\n * The PLATFORM'S post-hydration adapter validation (Phase 5.3 review item (iv), decided).\n *\n * Registry initialization runs in platform mode while `AppConfigurationService` is\n * deliberately unhydrated, so `validatePersistenceAdapterConfiguration` SKIPS itself there —\n * which meant the enabled-flag coherence checks, the unsupported-adapter refusals, and the\n * shared-collection incoherence detection never ran on a platform AT ALL. Platform owners\n * (apps-manager, module-registry) call this once hydration completes.\n *\n * `toleratesDeclaredMixedAdapters` is forced ON — the platform's bootstrap-store plane\n * declares MongoDB by design through the D7/D8 transition, and the one-adapter refusal would\n * reject that sanctioned state (the tension is pinned in\n * `resources-registry.one-adapter-vs-bootstrap-plane.test.ts`). The mixed set is logged and\n * NAMED; actual mixed-adapter atomic boundaries stay refused at runtime by the persistence\n * unit of work. Everything else in the validation fails closed, exactly as it does for\n * applications.\n */\n public validatePersistenceAdapterConfigurationForPlatform(): void {\n this.ensureInitialized();\n this.validatePersistenceAdapterConfiguration(this.registry!.resourceConfigurations, {\n toleratesDeclaredMixedAdapters: true,\n });\n }\n\n\n public getResourceTypes(): ResourceType[] {\n this.ensureInitialized();\n return Object.keys(this.registry!.resourceConfigurations) as ResourceType[];\n }\n\n /**\n * Re-run persistence-dependent registry invariants after application config\n * is initialized.\n *\n * Platform hosts may assemble the resource registry before their resolved\n * database config exists, so initialization cannot always determine the\n * effective default adapter. Startup must call this post-config seam before\n * accepting traffic; in particular, transactional token generation,\n * consumption, or revocation must never silently span a PostgreSQL mutation\n * and Mongo token persistence.\n */\n public validateInitializedPersistenceAdapterConfiguration(): void {\n this.ensureInitialized();\n if (this.configService?.isInitialized?.() !== true) {\n throw this.errorBuilder.buildError(ErrorType.CONFIGURATION, undefined, {\n context: {\n message:\n 'Cannot validate persistence adapter configuration before application config is initialized.',\n },\n });\n }\n this.validatePersistenceAdapterConfiguration(\n this.registry!.resourceConfigurations,\n );\n }\n\n /**\n * Get the map of resource types to their standard field identifiers.\n * Used for FK field resolution without string manipulation.\n *\n * @example USERS -> userId, ORGANIZATIONS -> organizationId, USER_SELF -> userId\n */\n public getAllResourceFieldIdentifiers(): Record<ResourceType, string> {\n this.ensureInitialized();\n return this.registry!.allResourceFieldIdentifiers;\n }\n\n /**\n * Resolve the foreign key field name for a relationship.\n *\n * Priority:\n * 1. Explicit foreignKeyField from relationship (for disambiguation)\n * 2. Lookup in allResourceFieldIdentifiers map (authoritative source)\n * 3. Throws error if not found (no string manipulation fallback)\n *\n * @param relationship - The resource relationship\n * @returns The FK field name\n * @throws Error if resource type not found in allResourceFieldIdentifiers\n */\n public resolveForeignKeyField(relationship: { resourceType1: ResourceType; resourceType2?: ResourceType; foreignKeyField?: string }): string {\n this.ensureInitialized();\n const resolved = Resources_SharedUtils.tryResolveRelationshipForeignKeyIdentity(\n {\n resourceType1: relationship.resourceType1,\n resourceType2: relationship.resourceType2 ?? relationship.resourceType1,\n foreignKeyField: relationship.foreignKeyField,\n },\n this.registry!.allResourceFieldIdentifiers\n );\n\n if (!resolved) {\n throw this.errorBuilder.buildError(\n ErrorType.CONFIGURATION,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.RESOURCES_REGISTRY_FIELD_IDENTIFIER_NOT_FOUND,\n context: {\n resourceType: relationship.resourceType1,\n hint: 'Resource type must be registered with a resourceFieldIdentifier'\n }\n }\n );\n }\n\n return resolved.fieldIdentifier;\n }\n\n /**\n * Get the reverse map of field identifiers to resource types.\n * Used for quick lookup of resource type from a FK field name.\n *\n * @example userId -> USERS, organizationId -> ORGANIZATIONS\n */\n public getFieldIdentifierToResourceType(): Record<string, ResourceType> {\n this.ensureInitialized();\n return this.registry!.fieldIdentifierToResourceType;\n }\n\n /**\n * Resolve the resource type from a FK field name.\n *\n * @param fkField - The foreign key field name (e.g., 'userId', 'organizationId')\n * @returns The resource type or undefined if not found\n */\n public resolveResourceTypeFromForeignKeyField(fkField: string): ResourceType | undefined {\n this.ensureInitialized();\n return this.registry!.fieldIdentifierToResourceType[fkField];\n }\n\n /**\n * Resolve the default URL-bearing operation path for a `(resourceType, operationIdentifier)` pair.\n *\n * **Variant filter is intentional**: this method only considers `API_CALL` /\n * `API_CALL_WITH_CALLBACK` variants because callers consume the returned\n * path for HTTP routing (URL templates, methods, request/response DTOs),\n * controller wiring, and frontend URL generation — surfaces that are\n * meaningless for non-URL-bearing variants.\n *\n * **For repository-only resources (e.g. `CoreResourceType.FILES`), use\n * {@link getRepositoryOperationPathDefault} instead.** Those resources\n * declare only `REPOSITORY_ONLY` variants by design (managed via dedicated\n * backend services rather than HTTP), so this method will throw\n * `RESOURCES_REGISTRY_OPERATION_PATH_NOT_FOUND` for them. Calling this\n * method to bootstrap an internal `ExecutionContext` for such a resource\n * is a category error — the URL-routing intent does not apply, and there\n * is nothing for the registry to find.\n */\n public getOperationPathDefault(resourceType: ResourceType, operationIdentifier: string): ResourceConfiguration_OperationPath<any, any> {\n this.ensureInitialized();\n const registry = this.getResourcesRegistry();\n const resourceConfig = registry.resourceConfigurations[resourceType];\n // Selection predicate is shared with the validate-field route mount gate\n // (`findDefaultUrlBearingCreateOperation`) via `isDefaultUrlBearingOperation`.\n // That gate decides whether the per-resource validate-field route — whose\n // handler calls this resolver with CREATE — is registered at all. Both must\n // apply the identical filter or that handler can reach a CREATE this method\n // throws on; the shared guard makes the agreement structural.\n const matchingDefaultOperations = resourceConfig.operations.filter((operation) =>\n isDefaultUrlBearingOperation(operation, operationIdentifier)\n );\n if (matchingDefaultOperations.length > 1) {\n const candidateVariants = matchingDefaultOperations.map((operation) => ({\n variantType: operation.variantType,\n variantKey: operation.variantKey,\n resourceOperationLike: operation.resourceOperationLike,\n }));\n this.logDebug('Ambiguous default operation path candidates', {\n resourceType,\n operationIdentifier,\n candidateVariants,\n });\n throw this.errorBuilder.buildError(\n ErrorType.CONFIGURATION,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.RESOURCES_REGISTRY_REGISTRATION_FAILED,\n context: {\n message: 'Ambiguous default URL-bearing operation path candidates; callers must use an explicit operation path when multiple non-bulk default variants share an operation identifier',\n resourceType,\n operationIdentifier,\n candidateVariants,\n }\n }\n );\n }\n const operation = matchingDefaultOperations[0];\n if (!operation) {\n throw this.errorBuilder.buildError(\n ErrorType.INTERNAL,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.RESOURCES_REGISTRY_OPERATION_PATH_NOT_FOUND,\n context: { resourceType, operationIdentifier, }\n }\n );\n }\n return ResourcesConfig_OperationPathUtils.extractOperationPath(operation);\n }\n\n /**\n * Non-throwing existence check: does `resourceType` declare exactly one\n * canonical default URL-bearing operation for `operationIdentifier`?\n *\n * Mirrors the selection predicate of {@link getOperationPathDefault}\n * (`isDefaultUrlBearingOperation`) but answers the yes/no question WITHOUT\n * building an error. `getOperationPathDefault` constructs an alert-grade\n * `RESOURCES_REGISTRY_OPERATION_PATH_NOT_FOUND` (INTERNAL / critical) on its\n * miss path — and merely *constructing* a Wildo error fires its backend\n * actions (LOG / ALERT / RECORD_METRICS / TRACE) as a side effect, before\n * any caller `catch` can downgrade it. That is correct when a default is\n * genuinely required, but wrong for best-effort probes that legitimately\n * expect \"no default\" for internal-only resources — e.g. `userCredentials`,\n * which by design exposes only an `INTERNAL_CALL` update and no READ. Such\n * probes MUST call this predicate first and skip the throwing resolver when\n * it returns false.\n *\n * Returns false in every case where {@link getOperationPathDefault} would\n * throw: unregistered resource, no matching default, or an ambiguous (> 1)\n * set of default candidates.\n */\n public hasOperationPathDefault(resourceType: ResourceType, operationIdentifier: string): boolean {\n this.ensureInitialized();\n const registry = this.getResourcesRegistry();\n const resourceConfig = registry.resourceConfigurations[resourceType];\n if (!resourceConfig) {\n return false;\n }\n const matchingDefaultOperations = resourceConfig.operations.filter((operation) =>\n isDefaultUrlBearingOperation(operation, operationIdentifier)\n );\n return matchingDefaultOperations.length === 1;\n }\n\n /**\n * Resolve the default SERVICE-dispatch operation path for a\n * `(resourceType, operationIdentifier)` pair.\n *\n * The service layer (`ServicesRegistryHandlerBackendService`) is the\n * trusted INTERNAL dispatch path — reached by internal/trusted code, never\n * directly by HTTP requests (those flow controller → `doByExecutionContext`\n * with a route-bound path). `INTERNAL_CALL` is therefore the service\n * layer's NATIVE transport: the variant authors declare for operations that\n * must run through the registry pipeline (ACL, hooks, lifecycle) but are\n * deliberately NOT exposed over HTTP.\n *\n * Resolution is INTERNAL-preferred, then URL-bearing:\n * 1. If the operation declares an `INTERNAL_CALL` default, return it. This\n * honours author intent for resources whose default for this operation\n * is internal-only (`userIdentityLinks.list`, `users.list`,\n * `inboundContacts.update`) AND for the one resource that declares BOTH\n * an internal and a URL default for the same operation — the internal\n * variant is the one trusted callers must use; the URL variant is the\n * public/admin surface reached via its keyed/route path.\n *\n * **That \"BOTH\" population is exactly ONE operation: `organizations`\n * CREATE.** Measured 2026-09-08 over all 106 non-test\n * `*resources-config*.ts` files (653 variant blocks), replicating\n * `determineOperationVariantDefault` per variant-type group.\n *\n * This paragraph previously cited `users.list` and `inboundContacts.update`\n * as further both-default examples and BOTH were wrong: the former's\n * `API_CALL` is `isDefault: false, variantKey: \"admin\"`, and the latter\n * declares no `API_CALL` at all — so neither has a URL-bearing DEFAULT and\n * neither is a case where this method chooses between transports. The\n * correction is recorded rather than silently applied because the false\n * plural made the preference look like a broad, well-trodden policy when it\n * decides exactly one operation — which is what made the agent function-tool\n * plane's blast radius read as unbounded when it was a single, and severe,\n * case (see `9594526e`).\n *\n * ⚠️ **A caller that FACES AN EXTERNAL PRINCIPAL must not use this method.**\n * It answers \"which variant does a TRUSTED internal caller want\", and for\n * `organizations` CREATE that is the registration-owned path, which skips the\n * creation-policy guard and writes no founding owner. A surface that\n * advertises a public operation to an outside caller owes\n * {@link getOperationPathDefault} instead, so the operation it authorized and\n * advertised is the operation it executes — the invariant the MCP tool plane\n * and the agent function-tool factories both keep.\n * 2. Otherwise return the URL-bearing default (`API_CALL` /\n * `API_CALL_WITH_CALLBACK`) for resources exposed only over HTTP.\n * 3. Otherwise throw `RESOURCES_REGISTRY_OPERATION_PATH_NOT_FOUND`.\n *\n * The config factory guarantees AT MOST ONE default per transport group\n * (`determineOperationVariantDefault` for non-URL groups + the\n * URL-bearing-default validation), so this composition is unambiguous: it\n * never has to choose between two same-transport defaults, and the `> 1`\n * guard below is a corrupted-registry backstop, not an expected path.\n *\n * Distinct from {@link getOperationPathDefault} (URL-routing only — must\n * never receive an `INTERNAL_CALL` path, or it could build a route/URL for\n * an operation that has no HTTP surface). Distinct from\n * {@link getRepositoryOperationPathDefault} (REPOSITORY_ONLY) — that method\n * is the repository-direct transport for callers like `FilesBackendService`\n * that bypass the service pipeline entirely, whereas this one resolves the\n * INTERNAL_CALL / URL default for the generic service-dispatch entry point.\n */\n public getServiceOperationPathDefault(resourceType: ResourceType, operationIdentifier: string): ResourceConfiguration_OperationPath<any, any> {\n this.ensureInitialized();\n const registry = this.getResourcesRegistry();\n const resourceConfig = registry.resourceConfigurations[resourceType];\n // Admission is the SHARED predicate (identifier + default + non-bulk + accepted variant type);\n // this method only adds the transport PREFERENCE on top of it. Keeping admission shared is what\n // lets the `retentionPolicy` boot guard in `resources-config.shared.factory.ts` promise that a\n // config it accepts is a config this resolver can serve — see\n // `SERVICE_RESOLVABLE_OPERATION_VARIANT_TYPES`.\n const defaultOperationsOfVariantTypes = (variantTypes: readonly ResourceOperationVariantType[]) =>\n resourceConfig.operations.filter((operation) =>\n isServiceResolvableDefaultOperation(operation, operationIdentifier)\n && variantTypes.includes(operation.variantType)\n );\n\n const internalDefaults = defaultOperationsOfVariantTypes(SERVICE_NATIVE_OPERATION_VARIANT_TYPES);\n const urlDefaults = defaultOperationsOfVariantTypes(URL_BEARING_OPERATION_VARIANT_TYPES);\n\n if (internalDefaults.length > 1 || urlDefaults.length > 1) {\n const candidateVariants = [...internalDefaults, ...urlDefaults].map((operation) => ({\n variantType: operation.variantType,\n variantKey: operation.variantKey,\n resourceOperationLike: operation.resourceOperationLike,\n }));\n this.logDebug('Corrupted registry: multiple default service operation paths within one transport group', {\n resourceType,\n operationIdentifier,\n candidateVariants,\n });\n throw this.errorBuilder.buildError(\n ErrorType.CONFIGURATION,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.RESOURCES_REGISTRY_REGISTRATION_FAILED,\n context: {\n message: 'Corrupted registry: more than one default (non-bulk) operation within a single transport group. The config factory must guarantee at most one default per transport group.',\n resourceType,\n operationIdentifier,\n candidateVariants,\n }\n }\n );\n }\n\n // INTERNAL_CALL is the service layer's native transport — prefer it,\n // then fall back to the single URL-bearing default.\n const operation = internalDefaults[0] ?? urlDefaults[0];\n if (!operation) {\n throw this.errorBuilder.buildError(\n ErrorType.INTERNAL,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.RESOURCES_REGISTRY_OPERATION_PATH_NOT_FOUND,\n context: { resourceType, operationIdentifier, }\n }\n );\n }\n return ResourcesConfig_OperationPathUtils.extractOperationPath(operation);\n }\n\n /**\n * Resolve the default `REPOSITORY_ONLY` operation path for a\n * `(resourceType, operationIdentifier)` pair.\n *\n * Sibling of {@link getOperationPathDefault} for the repository-only side\n * of the registry. Use this to bootstrap an internal `ExecutionContext`\n * (via `ExecutionContextCreatorBackendService.createForInternalOperation`)\n * for resources that are intentionally managed off the HTTP surface —\n * notably `CoreResourceType.FILES`, whose READ/LIST/CREATE/UPDATE/DELETE\n * operations declare only `REPOSITORY_ONLY` variants and rely on\n * `FilesBackendService` for direct repository access rather than URL\n * routing.\n *\n * Why this exists as a distinct method:\n *\n * - `getOperationPathDefault` filters for `API_CALL` /\n * `API_CALL_WITH_CALLBACK` because its callers consume the result for\n * URL/DTO routing. Loosening that filter to fall back to\n * `REPOSITORY_ONLY` would corrupt URL routing for resources that\n * legitimately mix variant types.\n * - Internal repository operations have no URL identity. The variant\n * filter must explicitly opt into `REPOSITORY_ONLY` — the bulk-flag\n * carve-out is dropped because `isBulkOperation` is an HTTP-routing\n * concept that does not apply to repository-only variants.\n *\n * Throws `RESOURCES_REGISTRY_OPERATION_PATH_NOT_FOUND` if the resource\n * declares no default `REPOSITORY_ONLY` variant for the given identifier,\n * and `RESOURCES_REGISTRY_REGISTRATION_FAILED` if multiple default\n * `REPOSITORY_ONLY` variants share the identifier (configuration error).\n */\n public getRepositoryOperationPathDefault(resourceType: ResourceType, operationIdentifier: string): ResourceConfiguration_OperationPath<any, any> {\n this.ensureInitialized();\n const registry = this.getResourcesRegistry();\n const resourceConfig = registry.resourceConfigurations[resourceType];\n const matchingDefaultOperations = resourceConfig.operations.filter((operation) =>\n operation.operationIdentifier === operationIdentifier\n && operation.isOperationDefault === true\n && operation.variantType === ResourceOperationVariantType.REPOSITORY_ONLY\n );\n if (matchingDefaultOperations.length > 1) {\n const candidateVariants = matchingDefaultOperations.map((operation) => ({\n variantType: operation.variantType,\n variantKey: operation.variantKey,\n resourceOperationLike: operation.resourceOperationLike,\n }));\n this.logDebug('Ambiguous default repository-only operation path candidates', {\n resourceType,\n operationIdentifier,\n candidateVariants,\n });\n throw this.errorBuilder.buildError(\n ErrorType.CONFIGURATION,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.RESOURCES_REGISTRY_REGISTRATION_FAILED,\n context: {\n message: 'Ambiguous default REPOSITORY_ONLY operation path candidates; resource configurations must declare a single default repository-only variant per operation identifier',\n resourceType,\n operationIdentifier,\n candidateVariants,\n }\n }\n );\n }\n const operation = matchingDefaultOperations[0];\n if (!operation) {\n throw this.errorBuilder.buildError(\n ErrorType.INTERNAL,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.RESOURCES_REGISTRY_OPERATION_PATH_NOT_FOUND,\n context: {\n message: 'No default REPOSITORY_ONLY variant registered for the requested operation identifier',\n resourceType,\n operationIdentifier,\n }\n }\n );\n }\n return ResourcesConfig_OperationPathUtils.extractOperationPath(operation);\n }\n\n /**\n * Resolve the default operation path for bootstrapping an INTERNAL execution\n * context that will drive a repository operation — `REPOSITORY_ONLY`-preferred,\n * with a URL-bearing fallback.\n *\n * This is the single seam every internal-repository-context builder should use\n * (`FilesBackendService`, the queue services, the billing back-office services,\n * the scoped-state materialization hook). Such builders bootstrap an\n * `ExecutionContext` only to anchor a direct `repository.create/read/update/delete`\n * call — the operation slot is contextual metadata (the repository finds its own\n * default op regardless of variant), but it MUST resolve to *something*.\n *\n * Resolution precedence (mirrors the MIXED-variant reality of resources such as\n * scoped-state, whose READ/SEARCH are `API_CALL` but CREATE/UPDATE\n * `REPOSITORY_ONLY`):\n * 1. If the op declares a default `REPOSITORY_ONLY` variant, resolve it via\n * {@link getRepositoryOperationPathDefault}. This is the native transport for\n * resources managed off the HTTP surface — `FILES`, `JOB_PAYLOAD_STORAGE`,\n * `JOB_EXECUTIONS`, the billing core CRUD resources, scoped-state mutations.\n * 2. Otherwise resolve the URL-bearing default via {@link getOperationPathDefault}\n * (ops exposed over HTTP — scope-features READ, scoped-state READ).\n * 3. Otherwise the delegated resolver throws `RESOURCES_REGISTRY_OPERATION_PATH_NOT_FOUND`.\n *\n * **Why this exists as a distinct method.** The URL-only {@link getOperationPathDefault}\n * throws `ni` for `REPOSITORY_ONLY`-only resources. When it was hardened to\n * `API_CALL`-only, every internal-context builder that had reached for it silently\n * broke (FILES cleanup accumulated stale records; scoped-state first-read\n * materialization 500'd; the queue and billing internal ops 500'd or degraded to\n * empty data). Centralizing the precedence here means a future internal-repository\n * builder cannot reintroduce that bug by picking the wrong sibling resolver — there\n * is one obviously-correct entry point. Do NOT loosen {@link getOperationPathDefault}\n * to fall back to `REPOSITORY_ONLY`: that would corrupt URL routing for resources\n * that legitimately mix variant types.\n */\n public getInternalRepositoryOperationPathDefault(resourceType: ResourceType, operationIdentifier: string): ResourceConfiguration_OperationPath<any, any> {\n this.ensureInitialized();\n const registry = this.getResourcesRegistry();\n const resourceConfig = registry.resourceConfigurations[resourceType];\n const hasRepositoryOnlyDefault = resourceConfig.operations.some((operation) =>\n operation.operationIdentifier === operationIdentifier\n && operation.isOperationDefault === true\n && operation.variantType === ResourceOperationVariantType.REPOSITORY_ONLY\n );\n return hasRepositoryOnlyDefault\n ? this.getRepositoryOperationPathDefault(resourceType, operationIdentifier)\n : this.getOperationPathDefault(resourceType, operationIdentifier);\n }\n\n /**\n * Get operation path for a specific variant.\n * @param resourceType - The resource type\n * @param operationIdentifier - The operation identifier (e.g., CoreResourceOperation.READ)\n * @param variantKey - The variant key (e.g., 'summary', 'context')\n */\n public getOperationPath(resourceType: ResourceType, operationIdentifier: string, variantKey: string): ResourceConfiguration_OperationPath<any, any> {\n this.ensureInitialized();\n const registry = this.getResourcesRegistry();\n const resourceConfig = registry.resourceConfigurations[resourceType];\n\n const matchingVariantOperations = resourceConfig.operations.filter((op) =>\n op.operationIdentifier === operationIdentifier\n && op.variantKey === variantKey\n && op.isOperationDefault !== true\n && !('isBulkOperation' in op && op.isBulkOperation === true)\n && (\n op.variantType === ResourceOperationVariantType.API_CALL\n || op.variantType === ResourceOperationVariantType.API_CALL_WITH_CALLBACK\n )\n );\n if (matchingVariantOperations.length > 1) {\n const candidateVariants = matchingVariantOperations.map((operation) => ({\n variantType: operation.variantType,\n resourceOperationLike: operation.resourceOperationLike,\n }));\n this.logDebug('Ambiguous keyed operation path candidates', {\n resourceType,\n operationIdentifier,\n variantKey,\n candidateVariants,\n });\n throw this.errorBuilder.buildError(\n ErrorType.CONFIGURATION,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.RESOURCES_REGISTRY_REGISTRATION_FAILED,\n context: {\n message: 'Ambiguous keyed operation path candidates; callers must use an explicit operation path when multiple non-bulk variants share an operation identifier and variantKey',\n resourceType,\n operationIdentifier,\n variantKey,\n candidateVariants,\n }\n }\n );\n }\n const operation = matchingVariantOperations[0];\n\n if (!operation) {\n throw this.errorBuilder.buildError(\n ErrorType.INTERNAL,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.RESOURCES_REGISTRY_OPERATION_PATH_NOT_FOUND,\n context: { resourceType, operationIdentifier, variantKey }\n }\n );\n }\n return ResourcesConfig_OperationPathUtils.extractOperationPath(operation);\n }\n\n /**\n * Keyed sibling of {@link getServiceOperationPathDefault} — resolves a\n * specific NON-default variant by `variantKey` for the service-dispatch\n * layer, INTERNAL-preferred then URL-bearing fallback (same transport\n * rationale as {@link getServiceOperationPathDefault}: the service layer's\n * native transport is `INTERNAL_CALL`).\n *\n * Why this exists alongside {@link getOperationPath} (URL-only): the\n * service-dispatch layer (`ServicesRegistryHandlerBackendService`) resolves\n * keyed READ/LIST paths through this method so an `INTERNAL_CALL` resource\n * that declares a keyed non-default variant resolves instead of throwing\n * `RESOURCES_REGISTRY_OPERATION_PATH_NOT_FOUND`. URL-routing callers keep\n * using {@link getOperationPath} so they never receive a non-URL variant.\n *\n * A `variantKey` is unique within a transport group, so the `> 1` guard\n * below is a corrupted-registry backstop, not an expected path.\n */\n public getServiceOperationPath(resourceType: ResourceType, operationIdentifier: string, variantKey: string): ResourceConfiguration_OperationPath<any, any> {\n this.ensureInitialized();\n const registry = this.getResourcesRegistry();\n const resourceConfig = registry.resourceConfigurations[resourceType];\n const keyedOperationsOfVariantTypes = (variantTypes: readonly ResourceOperationVariantType[]) =>\n resourceConfig.operations.filter((op) =>\n op.operationIdentifier === operationIdentifier\n && op.variantKey === variantKey\n && op.isOperationDefault !== true\n && !('isBulkOperation' in op && op.isBulkOperation === true)\n && variantTypes.includes(op.variantType)\n );\n\n // Same transport-group vocabulary as the default resolver above — read from the shared\n // authority, not re-listed. This method answers the SERVICE-RESOLVABLE question (which\n // transports can the service-dispatch layer serve?), which is exactly what those sets define;\n // it is not the routable-over-HTTP question the controller/URL layer asks.\n const internalKeyed = keyedOperationsOfVariantTypes(SERVICE_NATIVE_OPERATION_VARIANT_TYPES);\n const urlKeyed = keyedOperationsOfVariantTypes(URL_BEARING_OPERATION_VARIANT_TYPES);\n\n if (internalKeyed.length > 1 || urlKeyed.length > 1) {\n const candidateVariants = [...internalKeyed, ...urlKeyed].map((operation) => ({\n variantType: operation.variantType,\n resourceOperationLike: operation.resourceOperationLike,\n }));\n this.logDebug('Corrupted registry: multiple keyed service operation paths within one transport group', {\n resourceType,\n operationIdentifier,\n variantKey,\n candidateVariants,\n });\n throw this.errorBuilder.buildError(\n ErrorType.CONFIGURATION,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.RESOURCES_REGISTRY_REGISTRATION_FAILED,\n context: {\n message: 'Corrupted registry: more than one keyed (non-bulk) operation for one (operationIdentifier, variantKey) within a single transport group.',\n resourceType,\n operationIdentifier,\n variantKey,\n candidateVariants,\n }\n }\n );\n }\n\n // INTERNAL_CALL is the service layer's native transport — prefer it,\n // then fall back to the URL-bearing keyed variant.\n const operation = internalKeyed[0] ?? urlKeyed[0];\n if (!operation) {\n throw this.errorBuilder.buildError(\n ErrorType.INTERNAL,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.RESOURCES_REGISTRY_OPERATION_PATH_NOT_FOUND,\n context: { resourceType, operationIdentifier, variantKey }\n }\n );\n }\n return ResourcesConfig_OperationPathUtils.extractOperationPath(operation);\n }\n\n /**\n * Non-throwing sibling of {@link getOperationFromPath}.\n *\n * Returns the single operation matching `operationPath`, or `undefined`\n * when none matches. It STILL throws on a `> 1` match — an ambiguous path\n * identity means a corrupted registry (duplicate operation identity), which\n * is never an expected \"absent\" case and must fail loudly for every caller.\n *\n * Use this when \"no such operation\" is a legitimate, caller-handled outcome\n * (e.g. a data-mode variant that a given operation does not declare — see\n * {@link getOperationForDataMode}). Use {@link getOperationFromPath} for the\n * assert-it-exists contract.\n */\n public findOperationFromPath( operationPath: ResourceConfiguration_OperationPath<any, any> ): ResourceConfiguration_Operation<any, any, any> | undefined {\n\n this.ensureInitialized();\n const registry = this.getResourcesRegistry();\n\n const resourceConfig = registry.resourceConfigurations[operationPath.resourceIdentifier];\n if (!resourceConfig) {\n return undefined;\n }\n\n const matchedOperations = resourceConfig.operations.filter((operation) => {\n if (operation.operationIdentifier !== operationPath.operationIdentifier) return false;\n if (operation.variantType !== operationPath.variantType) return false;\n\n // Match default/variant key\n if (operationPath.isOperationDefault) {\n if (operation.isOperationDefault !== true) return false;\n } else {\n const expectedVariantKey = operationPath.variantKey;\n const actualVariantKey = operation.variantKey;\n if ((actualVariantKey ?? undefined) !== (expectedVariantKey ?? undefined)) return false;\n }\n\n // For URL-bearing operations, also match bulk flag.\n if (\n operation.variantType === ResourceOperationVariantType.API_CALL\n || operation.variantType === ResourceOperationVariantType.API_CALL_WITH_CALLBACK\n ) {\n const opIsBulk = 'isBulkOperation' in operation && operation.isBulkOperation === true;\n const pathIsBulk = operationPath.isBulkOperation === true;\n return opIsBulk === pathIsBulk;\n }\n\n return true;\n });\n if (matchedOperations.length > 1) {\n const key = ResourcesConfig_OperationPathUtils.createOperationPathKey(operationPath);\n this.logDebug('Ambiguous operation path lookup candidates', {\n operationPathKey: key,\n resourceIdentifier: operationPath.resourceIdentifier,\n candidateCount: matchedOperations.length,\n });\n throw this.errorBuilder.buildError(\n ErrorType.CONFIGURATION,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.RESOURCES_REGISTRY_REGISTRATION_FAILED,\n context: {\n message: 'Operation path lookup matched multiple operations; operation path identity must be unique',\n operationPathKey: key,\n resourceIdentifier: operationPath.resourceIdentifier,\n operationIdentifier: operationPath.operationIdentifier,\n variantType: operationPath.variantType,\n isOperationDefault: operationPath.isOperationDefault,\n variantKey: operationPath.variantKey,\n isBulkOperation: operationPath.isBulkOperation,\n }\n }\n );\n }\n\n return matchedOperations[0] as ResourceConfiguration_Operation<any, any, any> | undefined;\n }\n\n public getOperationFromPath( operationPath: ResourceConfiguration_OperationPath<any, any> ): ResourceConfiguration_Operation<any, any, any> {\n const matchedOperation = this.findOperationFromPath(operationPath);\n\n if (!matchedOperation) {\n // As per requirement, assume it exists; if not, throw unified WildoError_Backend\n const key = ResourcesConfig_OperationPathUtils.createOperationPathKey(operationPath);\n throw this.errorBuilder.buildError(\n ErrorType.VALIDATION,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.RESOURCES_REGISTRY_REGISTRATION_FAILED,\n context: {\n // diagnostic (log-only)\n operationPathKey: key,\n resourceIdentifier: operationPath.resourceIdentifier,\n operationIdentifier: operationPath.operationIdentifier,\n variantType: operationPath.variantType,\n isOperationDefault: operationPath.isOperationDefault,\n variantKey: operationPath.variantKey,\n isBulkOperation: operationPath.isBulkOperation\n }\n }\n );\n }\n\n return matchedOperation;\n }\n\n /**\n * Resolve the operation to use for a request's `DataMode`, honoring the\n * collection-operation data-mode model. This is the single source of truth\n * shared by the controller (authorization-time variant resolution) and the\n * service handler (dispatch-time variant resolution).\n *\n * - RAW (or a data mode that maps to no variant key) → the base operation\n * as-authored.\n * - SUMMARY / CONTEXT → the distinct keyed auto-variant when the resource\n * declares one. The resource factory emits `summary`/`context`\n * auto-variants for READ and LIST operations.\n *\n * **SEARCH is summary by construction.** The factory derives a SEARCH\n * operation's response from the summary schema and intentionally does NOT\n * emit separate `summary`/`context` variants for SEARCH (the auto-variant\n * pass covers only READ and LIST). The base SEARCH operation already carries\n * `summaryDto`/`contextDto` — the controller's `selectResponseDto` picks the\n * right one — AND the SEARCH query enrichment (`searchQueryRequestSchema`,\n * `filterFields`, `sortFields`) that a stripped auto-variant would lack. So a\n * SUMMARY/CONTEXT request on a SEARCH-like operation resolves to the BASE\n * operation: it is the correct, complete operation to authorize, validate and\n * dispatch. Without this, the list preset's inline-search delegation — which\n * forwards its default `dataMode=SUMMARY` to the SEARCH operation — would\n * throw `RESOURCES_REGISTRY_REGISTRATION_FAILED`.\n *\n * For a non-SEARCH operation a missing data-mode variant is a genuine\n * misconfiguration (a READ/LIST whose auto-variant should exist but does\n * not), so it still fails fast via {@link getOperationFromPath}.\n */\n public getOperationForDataMode(\n baseOperation: ResourceConfiguration_Operation<any, any, any>,\n dataMode: DataMode | undefined,\n ): ResourceConfiguration_Operation<any, any, any> {\n const variantKey = dataMode ? dataModeToVariantKey(dataMode) : undefined;\n // RAW (or a data mode that maps to no variant key) keeps the base operation.\n if (!variantKey) {\n return baseOperation;\n }\n\n const variantPath: ResourceConfiguration_OperationPath<any, any> = {\n resourceIdentifier: baseOperation.resourceIdentifier,\n operationIdentifier: baseOperation.operationIdentifier,\n variantType: baseOperation.variantType,\n isOperationDefault: false,\n variantKey,\n isBulkOperation: false,\n };\n\n const variant = this.findOperationFromPath(variantPath);\n if (variant) {\n return variant;\n }\n\n const isSearchLike = baseOperation.operationIdentifier === CoreResourceOperation.SEARCH\n || baseOperation.resourceOperationLike === CoreResourceOperation.SEARCH;\n if (isSearchLike) {\n return baseOperation;\n }\n\n // Non-SEARCH operation with no matching data-mode variant: fail fast with\n // the canonical not-found error (re-uses getOperationFromPath so the error\n // body and backend actions stay identical to a direct lookup miss).\n return this.getOperationFromPath(variantPath);\n }\n\n public getRequestDtoFromPath(operationPath: ResourceConfiguration_OperationPath<any, any>) : z.ZodTypeAny {\n this.ensureInitialized();\n const operation = this.getOperationFromPath(operationPath);\n return operation.requestDto;\n }\n\n public getResponseDtoFromPath(operationPath: ResourceConfiguration_OperationPath<any, any>) : z.ZodTypeAny {\n this.ensureInitialized();\n const operation = this.getOperationFromPath(operationPath);\n return operation.responseDto;\n }\n\n public getMainSchemaFromPath(operationPath: ResourceConfiguration_OperationPath<any, any>) : z.ZodTypeAny {\n this.ensureInitialized();\n const operation = this.getOperationFromPath(operationPath);\n return operation.mainSchema;\n }\n\n public getDatabaseSchemaFromPath(operationPath: ResourceConfiguration_OperationPath<any, any>) : z.ZodTypeAny {\n this.ensureInitialized();\n const operation = this.getOperationFromPath(operationPath);\n // NOTE: databaseSchema was removed - mainSchema now contains all fields including backend-only\n return operation.mainSchema;\n }\n\n public getResourceConfiguration(resourceType: ResourceType): AnyResourceConfiguration {\n this.ensureInitialized();\n const config = this.registry!.resourceConfigurations[resourceType];\n if (!config) {\n throw this.errorBuilder.buildError(ErrorType.INTERNAL, undefined, {\n customMessageReference: ErrorCustomMessageReference.RESOURCES_REGISTRY_INITIALIZATION_FAILED,\n });\n }\n return config;\n }\n\n /**\n * Safe variant that returns undefined for unregistered resource types\n * instead of throwing. Use when the caller handles missing configs gracefully.\n */\n public tryGetResourceConfiguration(resourceType: ResourceType): AnyResourceConfiguration | undefined {\n this.ensureInitialized();\n return this.registry!.resourceConfigurations[resourceType];\n }\n\n // ================================\n // Initialization Utils\n // ================================\n\n protected ensureInitialized(): void {\n if (!this.isInitialized || !this.registry) {\n throw this.errorBuilder.buildError( ErrorType.INTERNAL, undefined, { customMessageReference: ErrorCustomMessageReference.RESOURCES_REGISTRY_INITIALIZATION_FAILED } );\n }\n }\n\n protected normalizeResourceConfigurationRelationships(\n allResourceConfigurations: { [key: string]: AnyResourceConfiguration },\n allResourceFieldIdentifiers: Record<string, string>\n ): void {\n for (const resourceConfig of Object.values(allResourceConfigurations)) {\n resourceConfig.resourceRelationships = {\n parentRelationships: (\n Resources_SharedUtils.ensureCompiledRelationships as (\n relationships: ResourceRelationship[],\n allResourceFieldIdentifiers?: Record<string, string>\n ) => ResourceRelationship[]\n ).call(Resources_SharedUtils, resourceConfig.resourceRelationships.parentRelationships, allResourceFieldIdentifiers),\n childRelationships: (\n Resources_SharedUtils.ensureCompiledRelationships as (\n relationships: ResourceRelationship[],\n allResourceFieldIdentifiers?: Record<string, string>\n ) => ResourceRelationship[]\n ).call(Resources_SharedUtils, resourceConfig.resourceRelationships.childRelationships, allResourceFieldIdentifiers),\n selfRelationships: (\n Resources_SharedUtils.ensureCompiledRelationships as (\n relationships: ResourceRelationship[],\n allResourceFieldIdentifiers?: Record<string, string>\n ) => ResourceRelationship[]\n ).call(Resources_SharedUtils, resourceConfig.resourceRelationships.selfRelationships, allResourceFieldIdentifiers),\n };\n }\n }\n\n /**\n * Refuse to start on an incoherent notification-badge declaration.\n *\n * ## What this catches, and why the runtime could not\n *\n * A badge write used to be addressed by a bare `identifier`, resolved against nothing. Two\n * declarations were therefore unfalsifiable:\n *\n * - an operation naming a badge NO definition declares — the write materialized a counter row\n * that no definition described and no screen could render, silently, forever;\n * - two definitions sharing one `(scope, identifier)` — every lookup answers the first, so the\n * second is unreachable while sharing the first's count.\n *\n * Neither produces an error at runtime. The write succeeds; the render finds nothing; nobody is\n * told. So the check belongs where the DECLARATION is, not where the write is, and it fails\n * CLOSED for the same reason the organization-unit narrowing containment above does: a\n * misconfiguration that only manifests as a missing number is one nobody chases.\n *\n * **What a misconfigured application experiences:** the backend does not come up. Startup throws\n * a `CONFIGURATION` error naming every violation — the resource and operation that declared the\n * unresolvable ref, or the duplicated key — beside the keys that ARE registered, so the author\n * reads the fix off the message rather than deriving it. A typo in a `badgeRef` is a refusal at\n * the moment it is authored instead of a badge that never appears in production.\n *\n * The enumeration is TOTAL over both populations rather than sampled: every registered\n * definition, and every `notificationBadgeOperations` entry on every operation of every resource\n * configuration — which is the merged core + application map, so an engine-declared badge is\n * checked on the same terms as an application-declared one.\n */\n protected validateNotificationBadgeDeclarations(\n notificationBadgeDefinitions: NotificationBadgeDefinition[],\n allResourceConfigurations: Record<string, AnyResourceConfiguration>,\n ): void {\n const operationSites: NotificationBadgeOperationDeclarationSite[] = [];\n for (const [resourceType, resourceConfiguration] of Object.entries(allResourceConfigurations)) {\n const operations = resourceConfiguration?.operations ?? {};\n for (const [operationIdentifier, operation] of Object.entries(operations)) {\n const badgeOperations = (operation as ResourceConfiguration_Operation<any, any, any> | undefined)?.notificationBadgeOperations ?? [];\n for (const badgeOperation of badgeOperations) {\n operationSites.push({ resourceType, operationIdentifier, badgeRef: badgeOperation.badgeRef });\n }\n }\n }\n\n const violations = collectNotificationBadgeDeclarationViolations(notificationBadgeDefinitions, operationSites);\n if (violations.length > 0) {\n this.logger.error('Notification badge declaration validation failed', { violations });\n throw this.errorBuilder.buildError(ErrorType.CONFIGURATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFIGURATION,\n context: {\n message: 'Notification badge declarations are incoherent',\n reason: 'notification_badge_declaration_violation',\n violations,\n registeredBadgeKeys: notificationBadgeDefinitions.map(notificationBadgeIdentityKey),\n },\n });\n }\n\n this.logDebug(\n `Validated ${notificationBadgeDefinitions.length} notification badge definition(s) `\n + `and ${operationSites.length} operation badge reference(s)`,\n );\n }\n\n /**\n * Validate that all relationships can resolve their FK fields at startup.\n * This catches configuration errors early (e.g., missing resourceFieldIdentifier).\n */\n protected validateRelationshipForeignKeyFields(\n allResourceRelationships: ResourceRelationship[],\n allResourceFieldIdentifiers: Record<string, string>\n ): void {\n const errors: string[] = [];\n\n for (const relationship of allResourceRelationships) {\n // Skip disabled relationships\n if (relationship.isDisabled) continue;\n\n const resolved = Resources_SharedUtils.tryResolveRelationshipForeignKeyIdentity(\n relationship,\n allResourceFieldIdentifiers\n );\n if (!resolved) {\n errors.push(\n `Relationship ${relationship.resourceType1} → ${relationship.resourceType2}: ` +\n `No resourceFieldIdentifier registered for ${relationship.resourceType1}. ` +\n `Either add it to the resourceFieldIdentifiers map or specify foreignKeyField explicitly.`\n );\n }\n }\n\n if (errors.length > 0) {\n this.logger.error('FK field validation failed for relationships:', { errors });\n throw this.errorBuilder.buildError(\n ErrorType.CONFIGURATION,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.RESOURCES_REGISTRY_RELATIONSHIP_VALIDATION_FAILED,\n context: { errors }\n }\n );\n }\n\n this.logDebug(`Validated FK field resolution for ${allResourceRelationships.length} relationships`);\n }\n\n /**\n * Validate the relationship graph for cycles at startup (fail-fast).\n *\n * Builds a directed graph from all relationships (resourceType1 → resourceType2)\n * and runs DFS-based cycle detection. Self-loops (resourceType1 === resourceType2)\n * and transitive cycles (A → B → C → A) are both detected.\n *\n * When a cycle is found, every edge in the cycle must have `allowCycle: true`.\n * If any edge lacks the flag, a configuration error is thrown listing the cycle path.\n *\n * Performance: O(V + E) where V = distinct resource types, E = relationship count.\n * Typical: V ≈ 50, E ≈ 80. Runs once at startup — negligible cost.\n */\n protected validateRelationshipGraph(allResourceRelationships: ResourceRelationship[]): void {\n // Build adjacency list with edge metadata\n const adjacency = new Map<string, Array<{ target: string; allowCycle: boolean; rel: ResourceRelationship }>>();\n const allNodes = new Set<string>();\n\n for (const rel of allResourceRelationships) {\n if (rel.isDisabled) continue;\n\n allNodes.add(rel.resourceType1);\n allNodes.add(rel.resourceType2);\n\n if (!adjacency.has(rel.resourceType1)) {\n adjacency.set(rel.resourceType1, []);\n }\n adjacency.get(rel.resourceType1)!.push({\n target: rel.resourceType2,\n allowCycle: rel.allowCycle || false,\n rel,\n });\n }\n\n // DFS cycle detection with path tracking\n // States: WHITE (unvisited), GRAY (in current DFS path), BLACK (fully processed)\n const WHITE = 0, GRAY = 1, BLACK = 2;\n const color = new Map<string, number>();\n for (const node of allNodes) color.set(node, WHITE);\n\n // Track the current DFS path for cycle reconstruction\n const path: string[] = [];\n const errors: string[] = [];\n\n const dfs = (node: string): void => {\n color.set(node, GRAY);\n path.push(node);\n\n const edges = adjacency.get(node) || [];\n for (const edge of edges) {\n const targetColor = color.get(edge.target);\n\n if (targetColor === GRAY) {\n // Cycle found — extract the cycle from path\n const cycleStart = path.indexOf(edge.target);\n const cyclePath = [...path.slice(cycleStart), edge.target];\n\n // Check if ALL edges in the cycle have allowCycle: true\n const cycleEdges: Array<{ from: string; to: string; allowCycle: boolean }> = [];\n for (let i = 0; i < cyclePath.length - 1; i++) {\n const from = cyclePath[i];\n const to = cyclePath[i + 1];\n const edgeData = adjacency.get(from)?.find(e => e.target === to);\n cycleEdges.push({\n from,\n to,\n allowCycle: edgeData?.allowCycle || false,\n });\n }\n\n const allAllowed = cycleEdges.every(e => e.allowCycle);\n if (!allAllowed) {\n const missingFlags = cycleEdges\n .filter(e => !e.allowCycle)\n .map(e => `${e.from} → ${e.to}`);\n errors.push(\n `Cycle detected: ${cyclePath.join(' → ')}. ` +\n `Edges missing allowCycle: [${missingFlags.join(', ')}]. ` +\n `Set allowCycle: true on all edges in the cycle to allow it.`\n );\n } else {\n this.logDebug(`Allowed cycle detected: ${cyclePath.join(' → ')} (all edges have allowCycle: true)`);\n }\n } else if (targetColor === WHITE) {\n dfs(edge.target);\n }\n // BLACK: already fully processed, skip\n }\n\n path.pop();\n color.set(node, BLACK);\n };\n\n for (const node of allNodes) {\n if (color.get(node) === WHITE) {\n dfs(node);\n }\n }\n\n if (errors.length > 0) {\n this.logger.error('Relationship graph cycle validation failed:', { errors });\n throw this.errorBuilder.buildError(\n ErrorType.CONFIGURATION,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.RESOURCES_REGISTRY_RELATIONSHIP_VALIDATION_FAILED,\n context: {\n message: 'Unauthorized cycles detected in the relationship graph',\n errors,\n }\n }\n );\n }\n\n this.logDebug(`Validated relationship graph: ${allNodes.size} nodes, ${allResourceRelationships.length} edges, no unauthorized cycles`);\n }\n\n /**\n * Boot-time coherence guard: every resource config that stores in the SAME\n * collection must declare the SAME retention posture.\n *\n * ## Why this cannot live where the rest of retention validation lives\n *\n * `retentionPolicy` is validated by the resource-config FACTORY, which sees\n * exactly one config per invocation. The relationship this guard checks is\n * between SIBLING configs, and it is only knowable here — at registry\n * assembly, the first moment the whole config set exists in one place. The\n * `USERS` retention opt-in shipped with the sibling (`USER_SELF`) opted in\n * by hand, on the strength of a review catching it; nothing enforced it, so\n * the next author to add a collection alias could reintroduce the hole\n * silently.\n *\n * The invariant, both failure modes it prevents (fail-open erasure through\n * the ungoverned door; E11000 on the second erasure from a plain unique\n * index beside a retention-scoped one) and the shared alias map itself live\n * in `@wildo-ai/saas-models` — see\n * `findSharedPersistenceCollectionRetentionIncoherences`. This method owns\n * only the registry's error shape, so the fact and its invariant stay in the\n * one layer both the persistence path and this validation can import.\n *\n * Fails CLOSED (throws): a registry in this state cannot perform a lawful\n * erasure, and a warning would be discovered by an auditor rather than by a\n * developer.\n */\n protected validateSharedCollectionRetentionCoherence(\n allResourceConfigurations: { [key: string]: AnyResourceConfiguration }\n ): void {\n const incoherences = findSharedPersistenceCollectionRetentionIncoherences(allResourceConfigurations);\n\n if (incoherences.length === 0) {\n return;\n }\n\n const errors = incoherences.map((incoherence) => incoherence.message);\n this.logger.error('Shared-collection retention coherence validation failed:', { errors });\n throw this.errorBuilder.buildError(\n ErrorType.CONFIGURATION,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.RESOURCES_REGISTRY_INITIALIZATION_FAILED,\n context: {\n reason: 'shared_collection_retention_incoherence',\n errors,\n collections: incoherences.map((incoherence) => incoherence.collectionName),\n },\n },\n );\n }\n\n /**\n * Validate that all resources using PostgreSQL have it enabled in app config.\n * This catches configuration mismatches early at startup.\n *\n * Checks:\n * - Resources with persistenceAdapter: 'postgresql' require postgresql.enabled = true\n * - Warns if defaultAdapter is 'postgresql' but it's not enabled\n *\n * NOTE: In platform mode, AppConfigurationService may not be initialized yet\n * (platform apps initialize config later in the startup sequence).\n * In this case, we skip validation and rely on defaults.\n */\n protected validatePersistenceAdapterConfiguration(\n allResourceConfigurations: { [key: string]: AnyResourceConfiguration },\n options?: {\n /**\n * Platform-mode ONLY (owner decision, migrations plan 5.3 item (iv)): a DECLARED\n * adapter differing from the default is logged-and-named instead of refused, because\n * the platform's bootstrap-store plane is deliberately Mongo through the D7/D8\n * transition. Every OTHER check in this validator still fails closed. Applications\n * never pass this — the one-adapter rule is absolute for them.\n */\n toleratesDeclaredMixedAdapters?: boolean;\n },\n ): void {\n const authoredAdapterErrors = Object.entries(allResourceConfigurations)\n .flatMap(([resourceType, resourceConfig]) => {\n const adapter = (resourceConfig as { persistenceAdapter?: unknown })\n .persistenceAdapter;\n return adapter === undefined || isPersistenceAdapter(adapter)\n ? []\n : [\n `Resource '${resourceType}' declares unsupported persistenceAdapter `\n + `'${String(adapter)}'. Supported adapters: `\n + Object.values(PersistenceAdapter).join(', '),\n ];\n });\n\n if (authoredAdapterErrors.length > 0) {\n this.logger.error(\n 'Persistence adapter configuration validation failed:',\n { errors: authoredAdapterErrors },\n );\n throw this.errorBuilder.buildError(\n ErrorType.CONFIGURATION,\n undefined,\n {\n customMessageReference:\n ErrorCustomMessageReference.RESOURCES_REGISTRY_INITIALIZATION_FAILED,\n context: {\n reason: 'unsupported_persistence_adapter',\n errors: authoredAdapterErrors,\n },\n },\n );\n }\n\n // Skip validation if config service is not initialized (platform mode)\n // Platform apps initialize AppConfigurationService after resources registry.\n // Optional chaining: partial/test containers without isInitialized are treated as not ready.\n if (this.configService?.isInitialized?.() !== true) {\n this.logger.warn('Skipping persistence adapter validation - config service not yet initialized (platform mode)');\n return;\n }\n\n const errors: string[] = [];\n const warnings: string[] = [];\n\n // Get database configuration\n const config = this.configService.config;\n const databaseConfig = (config as any)?.database;\n // The RAW authored value is inspected first (an unsupported string must be reported, which\n // the seam's fallback would silently swallow); the RESOLVED default below comes from the\n // one derivation seam so this tier can never disagree with repository construction about\n // what \"no declaration\" means (review round 3, F3).\n const authoredDefaultAdapter: unknown = databaseConfig?.defaultAdapter\n ?? resolveDefaultPersistenceAdapter(this.configService);\n const postgresqlEnabled = databaseConfig?.postgresql?.enabled ?? false;\n /**\n * `?? true`, deliberately NOT symmetric with PostgreSQL above — and the asymmetry is load-bearing.\n *\n * Flipping this to `?? false` alongside the loader change looked obviously right and broke\n * `platform-crontabs-batches-manager` into a crash loop on 2026-08-28. That service does not\n * build its config through `AppConfigurationLoaderBackendService`: it bridges platform config,\n * whose `defaultAdapter` still reads `mongodb` while the runtime separately overrides the\n * resolved adapter via `setPlatformModeDefaultPersistenceAdapter`. With no `database.mongodb`\n * branch and `?? false`, this gate rejected all 95 platform resources at boot.\n *\n * So absence means \"no branch was built\", NOT \"no MongoDB\" — those coincide only on the\n * application-loader path. This validation runs for BOTH, and the platform path has no\n * equivalent signal to read. Anything that needs the honest question (\"does this runtime have\n * a MongoDB?\") must ask it where the answer is knowable — see\n * `HealthControllerBackendService.runtimeDependsOnMongoDb`, which keys on the branch's\n * PRESENCE and is only ever consulted on the application path.\n */\n const mongodbEnabled = databaseConfig?.mongodb?.enabled ?? true;\n\n if (!isPersistenceAdapter(authoredDefaultAdapter)) {\n errors.push(\n `Database defaultAdapter '${String(authoredDefaultAdapter)}' is unsupported. `\n + `Supported adapters: ${Object.values(PersistenceAdapter).join(', ')}`,\n );\n }\n const defaultAdapter: PersistenceAdapterType = isPersistenceAdapter(\n authoredDefaultAdapter,\n )\n ? authoredDefaultAdapter\n : DEFAULT_PERSISTENCE_ADAPTER;\n\n // Check if default adapter is valid. Exhaustive over the enum so a new adapter member\n // cannot skip enablement validation entirely (the old per-member `if`s simply never fired\n // for a member they did not name). Severities preserved: a disabled-PostgreSQL default is\n // a warning, a disabled-MongoDB default is an error.\n selectByPersistenceAdapter(defaultAdapter, {\n [PersistenceAdapter.POSTGRESQL]: () => {\n if (!postgresqlEnabled) {\n warnings.push(\n `Default persistence adapter is 'postgresql' but PostgreSQL is not enabled in database config. ` +\n `Set database.postgresql.enabled = true or change defaultAdapter to 'mongodb'.`\n );\n }\n },\n [PersistenceAdapter.MONGODB]: () => {\n if (!mongodbEnabled) {\n errors.push(\n `Default persistence adapter is 'mongodb' but MongoDB is not enabled in database config. ` +\n `Set database.mongodb.enabled = true or change defaultAdapter to 'postgresql'.`\n );\n }\n },\n [PersistenceAdapter.INTROSPECTION]: () => {\n // Never a legal application-wide default, and the consequence is starker than\n // HTTP_API's: an application defaulting to introspection could PERSIST NOTHING —\n // every undeclared resource would be a read-only projection of the app's own source.\n errors.push(\n `Default persistence adapter is 'introspection', which cannot be an application-wide default. ` +\n `INTROSPECTION is a per-resource declaration for rows derived from the application itself; set defaultAdapter to 'mongodb' or 'postgresql'.`\n );\n },\n [PersistenceAdapter.HTTP_API]: () => {\n // Never a legal application-wide default: an HTTP_API resource is a PER-RESOURCE\n // declaration accompanied by its binding; defaulting every undeclared resource to\n // a remote API would mean rows that live nowhere (see the enum member's JSDoc).\n errors.push(\n `Default persistence adapter is 'http-api', which cannot be an application-wide default. ` +\n `HTTP_API is a per-resource declaration carrying its own binding; set defaultAdapter to 'mongodb' or 'postgresql'.`\n );\n },\n })();\n\n // Check each resource's persistence adapter\n for (const [resourceType, resourceConfig] of Object.entries(allResourceConfigurations)) {\n const adapter: PersistenceAdapterType = (resourceConfig as any).persistenceAdapter ?? defaultAdapter;\n\n // Defense-in-depth, currently unreachable: `authoredAdapterErrors` above already\n // THROWS for any invalid declared adapter before this loop runs, and `defaultAdapter`\n // is pre-sanitized. Kept so that if that early throw is ever softened, this routine\n // keeps its aggregate-findings contract (push + continue) instead of letting the\n // exhaustive select below throw mid-collection and hide every later resource's\n // finding. (`createRepository` also refuses the same resource at boot.)\n if (!isPersistenceAdapter(adapter)) {\n errors.push(\n `Resource '${resourceType}' declares unsupported persistenceAdapter '${String(adapter)}'. `\n + `Supported adapters: ${Object.values(PersistenceAdapter).join(', ')}`,\n );\n continue;\n }\n\n // Exhaustive per-resource enablement check — same reasoning as the default-adapter\n // check above: a member the old `if`s did not name was simply never validated.\n selectByPersistenceAdapter(adapter, {\n [PersistenceAdapter.POSTGRESQL]: () => {\n if (!postgresqlEnabled) {\n errors.push(\n `Resource '${resourceType}' requires PostgreSQL (persistenceAdapter: 'postgresql') ` +\n `but PostgreSQL is not enabled in database config. ` +\n `Either set database.postgresql.enabled = true or remove the persistenceAdapter override.`\n );\n }\n },\n [PersistenceAdapter.MONGODB]: () => {\n if (!mongodbEnabled) {\n errors.push(\n `Resource '${resourceType}' requires MongoDB (persistenceAdapter: 'mongodb') ` +\n `but MongoDB is not enabled in database config. ` +\n `Either set database.mongodb.enabled = true or change the persistenceAdapter.`\n );\n }\n },\n [PersistenceAdapter.INTROSPECTION]: () => {\n // Fail-closed at BOOT, same reasoning as the HTTP_API arm below: a posture with\n // no faithful answer must be refused where the resource is REGISTERED, not where\n // it is queried — a query-time refusal is one missed branch away from serving\n // something wrong.\n const config = resourceConfig as Record<string, any>;\n\n /*\n * TENANCY. Every other backing kind enforces scoping itself — Mongo and\n * PostgreSQL through `buildContextualFilter`, HTTP_API through its own stance —\n * so an introspected resource that simply returned what its behavior produced\n * would be the one adapter with no scoping story at all.\n *\n * `SCOPE_FILTER_PUSHDOWN` is refused HERE rather than at query time because no\n * introspection behavior takes a scope argument: the engine has nothing to push\n * down, and a resource that registered on the promise of scoping would serve\n * unscoped rows on its first read.\n */\n const tenancy = config.introspectionBinding?.tenancy;\n if (tenancy === IntrospectionTenancyStance.SCOPE_FILTER_PUSHDOWN) {\n errors.push(\n `Resource '${resourceType}' declares introspection tenancy 'scope-filter-pushdown', which is not implemented: no introspection behavior accepts a scope argument, so the engine has nothing to push down and the rows would be served unscoped. Declare 'application-structure' (source-derived rows) or 'application-runtime' (companion runtime projections) if the rows carry no tenant dimension, or do not back this resource with introspection.`\n );\n }\n if (config.retentionPolicy) {\n errors.push(\n `Resource '${resourceType}' is INTROSPECTION-backed and declares 'retentionPolicy' — nothing is stored, so there is nothing to retain or purge; remove the policy.`\n );\n }\n if (config.ragSource) {\n errors.push(\n `Resource '${resourceType}' is INTROSPECTION-backed and declares 'ragSource' — chunks would have no store to live in and no erasure path to reach them; remove it.`\n );\n }\n },\n [PersistenceAdapter.HTTP_API]: () => {\n // ETL Step 3 registration checks (papers A/B). Each is a FAIL-CLOSED\n // aggregate finding: these postures have no faithful remote translation, so a\n // resource declaring them must be refused at BOOT, not at query time (a\n // query-time refusal is a data leak one missed branch away — plan D8).\n const config = resourceConfig as Record<string, any>;\n if (!config.httpApiBinding) {\n // The shared factory enforces this at authoring; backstop for hand-built configs.\n errors.push(\n `Resource '${resourceType}' declares persistenceAdapter 'http-api' with no 'httpApiBinding' declaration.`\n );\n return;\n }\n if (config.retentionPolicy) {\n errors.push(\n `Resource '${resourceType}' is HTTP_API-backed and declares 'retentionPolicy' — the platform cannot retention-govern rows it does not own; remove the policy (erasure is governed by the binding's erasure stance instead).`\n );\n }\n if (config.isAnonymizable === true) {\n errors.push(\n `Resource '${resourceType}' is HTTP_API-backed and declares 'isAnonymizable' — the anonymous null-or-absent confinement has no faithful remote translation (ETL paper B).`\n );\n }\n // D6 coherence B3: NO_SUBJECT_DATA is the declaration \"these remote rows hold\n // no personal data\" — a resource carrying it cannot simultaneously PARTICIPATE\n // in a data-subject export (exportSubject: ALLOWED claims the opposite). The\n // reverse pairings are fine: a 6b/6c resource may still exclude itself from\n // export for reasons of its own.\n const erasureStance = (config.httpApiBinding as Record<string, any>).erasure?.stance;\n if (\n erasureStance === HttpApiErasureStance.NO_SUBJECT_DATA\n && config.systemAccessPolicy?.exportSubject === ResourceSystemAccessMode.ALLOWED\n ) {\n errors.push(\n `Resource '${resourceType}' is HTTP_API-backed with erasure stance NO_SUBJECT_DATA yet declares 'exportSubject: ALLOWED' — a subject-export participant claims the rows ARE subject data, contradicting the stance (ETL D6). Pick one: drop the export participation, or declare the stance that matches the data.`\n );\n }\n // D6 coherence B4: stance 6b's `subjectLinkLocalField` must be a DECLARED\n // relationship FK on this resource — that relationship is how the erasure\n // knows WHICH subject type the field names (declared, never inferred: the\n // dataSubjectPolicy doctrine).\n if (erasureStance === HttpApiErasureStance.EXTERNAL_ERASURE_OPERATION) {\n const subjectLinkLocalField = (config.httpApiBinding as Record<string, any>).erasure?.subjectLinkLocalField as string | undefined;\n const relationshipBuckets = config.resourceRelationships as Record<string, Array<Record<string, any>>> | undefined;\n const ownRelationships = [\n ...(relationshipBuckets?.parentRelationships ?? []),\n ...(relationshipBuckets?.childRelationships ?? []),\n ...(relationshipBuckets?.selfRelationships ?? []),\n ];\n const declaredAsOwnFk = ownRelationships.some((relationship) =>\n relationship.resourceType2 === resourceType\n && relationship.foreignKeyField === subjectLinkLocalField\n && relationship.isDisabled !== true,\n );\n if (!declaredAsOwnFk) {\n errors.push(\n `Resource '${resourceType}' is HTTP_API-backed with erasure stance EXTERNAL_ERASURE_OPERATION, but its 'subjectLinkLocalField' ('${String(subjectLinkLocalField)}') is not the foreign key of any enabled relationship holding this resource as its FK side — without that relationship the erasure cannot know which SUBJECT type the field names (ETL D6, B4).`\n );\n }\n }\n /**\n * G-F1 (ETL partial-resource-coverage paper, P-0): a FILE field on an\n * HTTP_API-backed resource is refused at boot. Files are LOCAL machinery by\n * construction — the `{fileId, updatedAt}` linkage lives ON the resource row,\n * and the upload/link flows WRITE that row — so on a read-only read-through\n * resource the linkage write would be refused MID-FLIGHT, after the file row\n * already exists: a half-landed upload, discovered by the first user to try.\n * Refusing at boot names the designed path instead: file fields belong on a\n * SYNCED-mode (locally materialized) resource — the industry's own split:\n * Dataverse likewise refuses file/attachment types on virtual tables\n * (`.claude/plans/etl-partial-resource-coverage.md`, v2 model).\n */\n {\n const fileFieldPaths: string[] = [];\n const collectFileFieldPathsRecursively = (schema: unknown, pathPrefix: string, depth: number): void => {\n if (depth > 6 || !schema) return;\n const unwrapped = unwrapSchema(schema as never);\n if (!isZodObject(unwrapped)) return;\n for (const [fieldName, fieldSchema] of Object.entries(getZodObjectShape(unwrapped))) {\n const fieldPath = pathPrefix ? `${pathPrefix}.${fieldName}` : fieldName;\n if (isFileSchema(fieldSchema as never)) {\n fileFieldPaths.push(fieldPath);\n continue;\n }\n collectFileFieldPathsRecursively(fieldSchema, fieldPath, depth + 1);\n }\n };\n collectFileFieldPathsRecursively(config.mainSchema, '', 0);\n if (fileFieldPaths.length > 0) {\n errors.push(\n `Resource '${resourceType}' is HTTP_API-backed and declares FILE field(s) [${fileFieldPaths.join(', ')}] — files are local machinery (FILES rows + storage + the fileId linkage written onto the resource row), and a read-through resource refuses that write mid-upload. Remove the file field(s); file fields belong on a SYNCED-mode locally-materialized resource when partial-resource coverage lands (ETL partial-resource-coverage paper, G-F1).`\n );\n }\n }\n const bindingDialect = (config.httpApiBinding as Record<string, any>).dialect;\n for (const operation of (config.operations ?? []) as Array<Record<string, any>>) {\n const isCollectionRead = operation.operationIdentifier === CoreResourceOperation.LIST\n || operation.operationIdentifier === CoreResourceOperation.SEARCH;\n if (!isCollectionRead) continue;\n const sortFields = operation.sortFields as readonly string[] | undefined;\n // ODATA + ODOO_JSONRPC (both have a generic sort translation — `$orderby`\n // / the `order` kwarg): the adapter refuses any UNDECLARED sort key at\n // translation, so the declaration is what makes sorting reachable at all.\n // REST_JSON has NO sort translation in slice 1 (the compiler refuses every\n // sort), so demanding sortFields there would mandate an always-failing\n // surface — those bindings serve the target's natural order and must\n // declare NO sortFields instead.\n const dialectTranslatesSort = bindingDialect === HttpApiTransportDialect.ODATA\n || bindingDialect === HttpApiTransportDialect.ODOO_JSONRPC;\n if (dialectTranslatesSort && (!sortFields || sortFields.length === 0)) {\n errors.push(\n `Resource '${resourceType}' (HTTP_API/${bindingDialect}) operation '${operation.operationIdentifier}' declares no 'sortFields' — the adapter refuses undeclared sort keys, so without a declaration no sort can ever reach the remote dialect (ETL paper B, T6).`\n );\n }\n if (bindingDialect === HttpApiTransportDialect.REST_JSON && sortFields && sortFields.length > 0) {\n errors.push(\n `Resource '${resourceType}' (HTTP_API/REST_JSON) operation '${operation.operationIdentifier}' declares 'sortFields', but REST_JSON has no sort translation in slice 1 — every advertised sort would fail at runtime. Remove them (the binding serves the target's natural order).`\n );\n }\n const searchableFields = operation.searchableFields as readonly unknown[] | undefined;\n if (searchableFields?.some((entry) => typeof entry !== 'string')) {\n errors.push(\n `Resource '${resourceType}' (HTTP_API) operation '${operation.operationIdentifier}' declares RELATIONAL searchable descriptors — relational search has no remote translation and is refused (ETL paper B, R3). Declare own-field searchableFields only.`\n );\n }\n }\n },\n })();\n\n /**\n * The scope-feature-ledger refusal that stood here is GONE, and the cause is fixed\n * rather than tolerated.\n *\n * It refused PostgreSQL for `applicationFeatures` / `organizationFeatures` /\n * `userFeatures` because their singleton writes need `upsertByFilter` conflict\n * semantics that only MongoDB had. The real blocker was one layer down: those ledgers\n * declare no scope FK — it is relationship-injected — so the SQL planner never planned\n * the column, and without it there was no `ON CONFLICT` target to arbitrate on. The\n * planner now plans injected FKs and marks a 1:1 relationship's FK unique, and\n * `upsertByFilter` is implemented against that constraint.\n *\n * Residual, stated because removing a guard should name what it stops covering: the\n * unique constraint is recorded in the PLAN, and the plan is what a migration is built\n * from — but nothing here verifies the deployed DDL actually carries it. A table\n * provisioned from an older migration will fail at the upsert with PostgreSQL's own\n * constraint error rather than at boot.\n */\n }\n\n /**\n * ONE ADAPTER PER APPLICATION — the model this workstream converged on.\n *\n * An application is wholly PostgreSQL or wholly MongoDB. The platform back-office may\n * differ; it is a separate deployment with its own lifecycle, which is a real bounded\n * context rather than a loophole.\n *\n * Enforced by refusing a per-resource `persistenceAdapter` that DISAGREES with the\n * application default, which is the only way a mixed configuration can now arise (no engine\n * resource pins an adapter any more — FILES was the last, and it now follows the default).\n *\n * Why refuse rather than tolerate: a mixed application cannot commit a row and its file\n * metadata in one native transaction, so every cross-resource boundary silently degrades\n * from atomic to at-least-once. That is exactly the class of failure the persistence unit of\n * work exists to make VISIBLE, and a configuration that produces it BY ACCIDENT should not\n * boot.\n *\n * \"By accident\" is the operative word, and it is what the default protects against rather\n * than the mixing itself. Two doors exist past it, both explicit and both named:\n * 1. a per-resource `persistenceAdapterIsolation` declaration (see the door below), by\n * which a resource author claims the resource takes part in no cross-adapter atomic\n * write;\n * 2. `options.toleratesDeclaredMixedAdapters`, the platform's sanctioned dual-store\n * transition (see further below).\n * Neither weakens the runtime guarantee; both make the mixed set visible in the log.\n *\n * assurance-control: WILDO.DATA.TRANSACTIONAL_INTEGRITY — refuses a configuration whose\n * cross-resource writes could not be atomic.\n */\n /**\n * THE DOOR (`.claude/rules/design-philosophy.md` — \"a construct that refuses must ship the\n * mutation path in the same change\").\n *\n * The blanket refusal above is right as a DEFAULT and wrong as an absolute: some resources\n * provably never take part in a cross-adapter atomic write, and for those the refusal\n * forbade a legitimate deployment with no way past it. A resource may now disagree with the\n * application default when — and ONLY when — its author declares\n * `persistenceAdapterIsolation`, a named claim about the resource's write topology.\n *\n * This weakens no runtime guarantee, and that is the whole basis for admitting it. The\n * property the refusal protects is still enforced where it is REAL:\n * `ResourcePersistenceUnitOfWorkBackendService.assessCompatibility` classifies any boundary\n * whose ATOMIC participants resolve to more than one adapter as\n * `MIXED_PERSISTENCE_ADAPTERS` (never `compatible`), and `executeInUnitOfWork` THROWS on it\n * before any work runs. So a resource that declares isolation and is nevertheless reached by\n * a cross-adapter atomic boundary fails loudly at that boundary. The declaration buys the\n * right to BOOT; it can never buy a silent atomic→at-least-once degradation.\n *\n * Tolerated ⇒ NAMED, as with the platform's dual-store transition below: every admitted\n * resource is logged with the member it declared, so a mixed state is never ambient.\n */\n const undeclaredMixedAdapterResourceTypes: string[] = [];\n const isolationDeclaredResourceTypes: string[] = [];\n\n for (const [resourceType, resourceConfig] of Object.entries(allResourceConfigurations)) {\n const declaredAdapter = (resourceConfig as any).persistenceAdapter;\n if (declaredAdapter === undefined || declaredAdapter === defaultAdapter) {\n continue;\n }\n\n /**\n * NON-TRANSACTIONAL adapters are EXEMPT from the one-adapter rule, and the exemption\n * preserves the property the rule protects rather than weakening it.\n *\n * The rule refuses a second PLATFORM store because a mixed application silently degrades\n * cross-resource atomicity. An `HTTP_API` or `INTROSPECTION` declaration is not a second\n * platform store: neither can be the application default (each has its own validation arm\n * refusing that), neither owns a transaction (the persistence unit of work fail-closes on\n * both with DATABASE_SERVICE_UNAVAILABLE), and both refuse every write. There is nothing\n * atomic left to degrade silently — the degradation this rule exists to make visible is\n * already an explicit runtime refusal on these adapters.\n *\n * Without the exemption, \"per-resource declaration, never a default\" and the one-adapter\n * rule are JOINTLY UNSATISFIABLE and no such resource could ever register. That is not\n * hypothetical: it is exactly how the first INTROSPECTION resource crash-looped the\n * companion on 2026-08-29.\n *\n * ORDERED BEFORE the isolation door below, deliberately: such a resource is admitted on\n * the ADAPTER'S OWN NATURE, never on a claim its author had to make. Inverting the two\n * would let an authored declaration decide something the adapter already settles.\n *\n * ## Why `selectByPersistenceAdapter` and not `=== HTTP_API || === INTROSPECTION`\n *\n * The previous form was a bare equality test, so `PersistenceAdapterCases` — the seam\n * that makes a new enum member a COMPILE error at every adapter decision — could not see\n * this site. Adding `INTROSPECTION` typechecked everywhere and then refused to boot. A\n * second MECHANISM for the same invariant is the failure shape\n * `invariant-call-site-enumeration.md` #12 records; routing through the exhaustive helper\n * puts this decision back under that guarantee, so the NEXT member must answer here too.\n */\n const ownsNoTransaction = selectByPersistenceAdapter<boolean>(declaredAdapter, {\n [PersistenceAdapter.MONGODB]: false,\n [PersistenceAdapter.POSTGRESQL]: false,\n [PersistenceAdapter.HTTP_API]: true,\n [PersistenceAdapter.INTROSPECTION]: true,\n });\n if (ownsNoTransaction) {\n continue;\n }\n const declaredIsolation = (resourceConfig as any).persistenceAdapterIsolation;\n if (isResourcePersistenceAdapterIsolation(declaredIsolation)) {\n isolationDeclaredResourceTypes.push(\n `${resourceType} (on '${declaredAdapter}', declares '${declaredIsolation}')`,\n );\n } else {\n undeclaredMixedAdapterResourceTypes.push(`${resourceType} (declares '${declaredAdapter}')`);\n }\n }\n\n if (isolationDeclaredResourceTypes.length > 0) {\n this.logger.warn(\n `Mixed persistence adapters ADMITTED by explicit per-resource isolation declaration: `\n + `the application default is '${defaultAdapter}', and these resources declared a different `\n + `adapter together with a persistenceAdapterIsolation claim: `\n + `${isolationDeclaredResourceTypes.join(', ')}. `\n + `Cross-adapter atomic boundaries remain refused at runtime by the persistence unit of work.`,\n );\n }\n\n const mixedAdapterResourceTypes = undeclaredMixedAdapterResourceTypes;\n\n if (mixedAdapterResourceTypes.length > 0) {\n if (options?.toleratesDeclaredMixedAdapters === true) {\n /**\n * THE PLATFORM'S DUAL-STORE TRANSITION (owner decision, migrations plan 5.3\n * item (iv)). The platform back-office is the bounded context the block comment\n * above already carves out: its BOOTSTRAP-STORE plane declares MongoDB on purpose\n * (INIT + the infra-manager's raw writers are Mongo-wired) while the platform\n * default moves to PostgreSQL. Refusing here would refuse the sanctioned\n * transition itself; the property this rule protects — no silent atomic→\n * at-least-once degradation — is still enforced where it is REAL, by the\n * persistence unit of work refusing any actual mixed-adapter transaction\n * boundary at runtime. Tolerated ⇒ NAMED: the declared set is logged so a\n * mixed state can never be ambient.\n */\n this.logger.warn(\n `Mixed persistence adapters TOLERATED (platform dual-store transition): default is `\n + `'${defaultAdapter}', declared differently by: ${mixedAdapterResourceTypes.join(', ')}. `\n + `Cross-adapter atomic boundaries are refused at runtime by the persistence unit of work.`,\n );\n } else {\n errors.push(\n `An application must use ONE persistence adapter. `\n + `The application default is '${defaultAdapter}', but these resources declare a different one: `\n + `${mixedAdapterResourceTypes.join(', ')}. `\n + `Remove the per-resource persistenceAdapter override, or change database.defaultAdapter to match. `\n + `Mixed adapters cannot share a native transaction, so cross-resource writes would silently `\n + `degrade from atomic to at-least-once.`\n );\n }\n }\n\n /**\n * G1 fail-closed sweep (ETL paper A, gate G1): a MONGODB-backed resource holding an FK to\n * an HTTP_API-backed resource cannot store the synthesized id — the Mongoose converter\n * physically types every `isForeignKey` column as a BSON ObjectId\n * (`zod-to-mongoose-schema-convertor.backend.service.ts:1417`). Until the converter learns\n * to emit a String column for HTTP_API targets (recorded Step 3 residual), such a\n * relationship is REFUSED at boot rather than silently persisting ids that cannot fit.\n * Cross-resource by nature, so it runs here, after the per-resource loop (the same\n * structural argument as the shared-collection check below). PostgreSQL FK columns are\n * text and need no refusal; an HTTP_API↔HTTP_API relationship is refused too — FK\n * synthesis-on-read is not yet declared on the binding (paper A, FK case 2).\n */\n {\n const resolveAdapterOf = (resourceType: string): PersistenceAdapterType | undefined => {\n const config = allResourceConfigurations[resourceType] as Record<string, any> | undefined;\n if (!config) return undefined;\n return (config.persistenceAdapter as PersistenceAdapterType | undefined) ?? defaultAdapter;\n };\n /**\n * DIRECTION is the whole check: the hazard is the FK HOLDER's column type, not the\n * relationship's existence. An HTTP_API row holding a platform id (the mandatory\n * primary-scope FK, e.g. `organizationId`) is LEGAL — a plain string remotely,\n * governed by the tenancy stance. What cannot work is a MONGO-backed HOLDER whose\n * physical ObjectId column must store an HTTP_API-synthesized id of the OTHER side.\n */\n const reported = new Set<string>();\n for (const [resourceType, resourceConfig] of Object.entries(allResourceConfigurations)) {\n const buckets = (resourceConfig as Record<string, any>).resourceRelationships;\n const relationships: Array<Record<string, any>> = [\n ...(buckets?.parentRelationships ?? []),\n ...(buckets?.childRelationships ?? []),\n ...(buckets?.selfRelationships ?? []),\n ];\n for (const relationship of relationships) {\n const side1 = relationship.resourceType1 as string | undefined;\n const side2 = relationship.resourceType2 as string | undefined;\n if (typeof side1 !== 'string' || typeof side2 !== 'string') continue;\n // Compiled holder when available; the authored convention (FK lives on\n // resourceType2, the FK-anchor side) as the fallback.\n const holder = (relationship.resolvedSemantics?.persistence?.foreignKey?.holderResourceType as string | undefined)\n ?? side2;\n const target = holder === side1 ? side2 : side1;\n const holderAdapter = resolveAdapterOf(holder);\n const targetAdapter = resolveAdapterOf(target);\n if (targetAdapter !== PersistenceAdapter.HTTP_API) continue;\n const dedupeKey = `${holder}→${target}:${String(relationship.foreignKeyField ?? '')}`;\n if (reported.has(dedupeKey)) continue;\n if (holderAdapter === PersistenceAdapter.MONGODB) {\n reported.add(dedupeKey);\n errors.push(\n `Resource '${holder}' (MongoDB) holds an FK targeting HTTP_API-backed '${target}' — its FK column is a physical ObjectId and cannot store the synthesized id (ETL paper A, gate G1). Refused until the Mongoose converter emits String columns for HTTP_API targets.`\n );\n } else if (holderAdapter === PersistenceAdapter.HTTP_API) {\n // Includes SELF-relationships (holder === target): an HTTP_API self-FK\n // needs the same undeclared synthesis-on-read as any cross-external FK.\n reported.add(dedupeKey);\n errors.push(\n `Resource '${holder}' (HTTP_API) holds an FK targeting HTTP_API-backed '${target}' — cross-external FK synthesis is not yet declared on the binding (ETL paper A, FK case 2) and is refused.`\n );\n }\n }\n }\n\n /**\n * D6 coherence B1 (ETL): a DEPENDENT edge whose CHILD (the FK holder toward its\n * parent) is HTTP_API-backed must declare `onParentDelete.enabled: false` EXPLICITLY.\n *\n * Reuses `classifySubjectErasureDisposition` — THE classifier the erasure runtime\n * runs — so boot and runtime cannot drift on what an edge means. Refused dispositions:\n *\n * - DELETE / IMPERSONALIZE_AND_RETAIN: an executing teardown against rows the\n * platform does not own. There is no general remote write in slice 1 (D3), the\n * IMPERSONALIZE variant additionally requires the `retentionPolicy` HTTP_API\n * resources already refuse, and stance 6b's declared operation is SUBJECT-ERASURE\n * scoped — it is not a lifecycle teardown a parent delete may invoke.\n * - UNCLASSIFIED / UNSUPPORTED_DEFERRED: left to runtime, the erasure's generic\n * refusal would tell the author to \"declare DELETE or IMPERSONALIZE_AND_RETAIN\" —\n * both illegal for an HTTP_API child — and every erasure (and parent delete) of\n * the parent would be permanently blocked on availability grounds, the exact shape\n * `administrative-continuity-floors.md` forbids. Refusing at BOOT names the one\n * legal declaration instead.\n *\n * The subject-data question is NOT this edge's to answer — it lives in the binding's\n * erasure stance (6a/6b/6c), which the erasure orchestrator enforces at runtime.\n */\n {\n const reportedEdges = new Set<string>();\n for (const resourceConfig of Object.values(allResourceConfigurations)) {\n const buckets = (resourceConfig as Record<string, any>).resourceRelationships;\n const relationships: Array<Record<string, any>> = [\n ...(buckets?.parentRelationships ?? []),\n ...(buckets?.childRelationships ?? []),\n ...(buckets?.selfRelationships ?? []),\n ];\n for (const relationship of relationships) {\n // The classifier's own child convention (resourceType2 holds the FK) —\n // the same edge the runtime will classify.\n const childResourceType = relationship.resourceType2 as string | undefined;\n if (typeof childResourceType !== 'string') continue;\n if (resolveAdapterOf(childResourceType) !== PersistenceAdapter.HTTP_API) continue;\n const edgeKey = `${String(relationship.resourceType1)}→${childResourceType}:${String(relationship.foreignKeyField ?? '')}`;\n if (reportedEdges.has(edgeKey)) continue;\n let disposition: SubjectErasureDisposition;\n let reason: string;\n try {\n const classification = classifySubjectErasureDisposition(relationship as never);\n disposition = classification.disposition;\n reason = classification.reason;\n } catch (classifyError) {\n // A relationship the startup compilation never resolved is its own\n // defect — report it rather than masking it or crashing mid-sweep.\n reportedEdges.add(edgeKey);\n errors.push(\n `Relationship '${edgeKey}' targets HTTP_API-backed '${childResourceType}' but could not be classified for erasure coherence: ${classifyError instanceof Error ? classifyError.message : String(classifyError)}`\n );\n continue;\n }\n const refused = disposition === SubjectErasureDisposition.DELETE\n || disposition === SubjectErasureDisposition.IMPERSONALIZE_AND_RETAIN\n || disposition === SubjectErasureDisposition.UNCLASSIFIED\n || disposition === SubjectErasureDisposition.UNSUPPORTED_DEFERRED;\n if (!refused) continue;\n reportedEdges.add(edgeKey);\n errors.push(\n `Relationship '${edgeKey}': the DEPENDENT child '${childResourceType}' is HTTP_API-backed and its erasure/lifecycle disposition is '${disposition}' (${reason}). The platform cannot tear down rows it does not own — declare 'onParentDelete: { enabled: false }' on the edge (the rows survive their parent), and answer the subject-data question with the binding's erasure stance (ETL D6).`\n );\n }\n }\n }\n }\n\n // Configs sharing ONE persistence collection must resolve to ONE database. The per-resource\n // loop above structurally cannot see this: it judges each config alone, and both halves of a\n // split alias group are individually valid. Runs here rather than in its own pass because it\n // needs the RESOLVED default (a config that declares nothing inherits it), which only exists\n // after the config-service readiness check above.\n errors.push(\n ...findSharedPersistenceCollectionAdapterIncoherences(allResourceConfigurations, defaultAdapter)\n .map((incoherence) => incoherence.message),\n );\n\n // Log warnings\n if (warnings.length > 0) {\n for (const warning of warnings) {\n this.logger.warn(warning);\n }\n }\n\n // Throw on errors\n if (errors.length > 0) {\n this.logger.error('Persistence adapter configuration validation failed:', { errors });\n throw this.errorBuilder.buildError(\n ErrorType.CONFIGURATION,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.RESOURCES_REGISTRY_INITIALIZATION_FAILED,\n context: {\n reason: 'persistence_adapter_mismatch',\n errors\n }\n }\n );\n }\n\n this.logDebug(`Validated persistence adapter configuration for ${Object.keys(allResourceConfigurations).length} resources`);\n }\n\n protected generateUrlsForAllResourceConfigurations(\n allResourceConfigurations: { [key: string]: AnyResourceConfiguration },\n registry: ResourcesRegistry,\n allResourceFieldIdentifiers: Record<string, string>\n ): void {\n\n let totalUrlBearingOperations = 0;\n let totalUrlsGenerated = 0;\n\n for (const [resourceType, resourceConfig] of Object.entries(allResourceConfigurations)) {\n try {\n this.logDebug(`Generating URLs for resource type: ${resourceType}`);\n\n // Use the URL builder to generate and update URLs\n ResourcesConfigOperationsUrlsBuilderUtils.updateOperationUrls(\n resourceConfig,\n allResourceFieldIdentifiers,\n );\n\n // Count URL-bearing operations for logging\n const urlBearingOps = resourceConfig.operations.filter(op =>\n op.variantType === ResourceOperationVariantType.API_CALL\n || op.variantType === ResourceOperationVariantType.API_CALL_WITH_CALLBACK\n );\n totalUrlBearingOperations += urlBearingOps.length;\n\n // Count total URLs generated\n urlBearingOps.forEach(op => {\n if ('initiatorInfos' in op && Array.isArray(op.initiatorInfos)) {\n totalUrlsGenerated += op.initiatorInfos.length;\n }\n });\n\n } catch (error) {\n this.logger.error(`Failed to generate URLs for resource type ${resourceType}`, {\n ...projectCaughtErrorLogFields(error),\n resourceType\n });\n }\n }\n\n this.logDebug('URL generation completed', {\n totalResourceTypes: Object.keys(allResourceConfigurations).length,\n totalUrlBearingOperations,\n totalUrlsGenerated\n });\n }\n\n /**\n * Enhance DTOs for all operations in resource configurations\n */\n protected enhanceDtosForAllResourceConfigurations(\n allResourceConfigurations: { [key: string]: AnyResourceConfiguration },\n registry: ResourcesRegistry,\n allResourceFieldIdentifiers: Record<string, string>\n ): void {\n\n\n for (const [resourceType, resourceConfig] of Object.entries(allResourceConfigurations)) {\n try {\n this.logDebug(`\\n🚀 Starting DTO enhancement for resource: ${resourceType} (${resourceConfig.operations?.length || 0} operations)`);\n\n if (!resourceConfig.operations || resourceConfig.operations.length === 0) {\n this.logDebug(`⚠️ No operations found for ${resourceType}, skipping...`);\n continue;\n }\n\n // NOTE: DTOs are already pre-computed by the factory via buildAllOperationDtos.\n // The factory builds all 6 DTO variants (requestDto, responseDto, summaryDto,\n // contextDto, internalDto, repositoryDto) with inheritance applied.\n //\n // Phase 2.1: Factory now pre-computes all DTOs, so runtime enhancement is no longer needed.\n // An earlier runtime DTO-rebuild pass only produced requestDto/responseDto and would\n // overwrite the factory's complete DTO set, losing summaryDto, contextDto, internalDto, repositoryDto.\n //\n // Operations already have all DTOs from factory - use them as-is.\n this.logDebug(`ℹ️ DTOs already pre-computed by factory (buildAllOperationDtos with all 6 variants), using factory-built DTOs`);\n // No need to replace - operations already have all DTOs from factory\n\n this.logDebug(`✅ Completed DTO enhancement for ${resourceType}`);\n\n } catch (error) {\n this.logger.error(`Failed to enhance DTOs for resource type ${resourceType}`, {\n ...projectCaughtErrorLogFields(error),\n resourceType\n });\n }\n }\n\n }\n\n // ================================\n // Debug Methods\n // ================================\n\n public debugDisplayGeneratedUrls(): void {\n this.ensureInitialized();\n\n const registry = this.getResourcesRegistry();\n\n this.logDebug('\\n=== 🌐 GENERATED API URLS DEBUG DISPLAY ===\\n');\n\n const resourceTypes = Object.keys(registry.resourceConfigurations).sort();\n let totalOperations = 0;\n let totalUrls = 0;\n\n for (const resourceType of resourceTypes) {\n const resourceConfig = registry.resourceConfigurations[resourceType];\n\n // Filter URL-bearing operations\n const apiCallOperations = resourceConfig.operations.filter(\n op => op.variantType === ResourceOperationVariantType.API_CALL\n || op.variantType === ResourceOperationVariantType.API_CALL_WITH_CALLBACK\n );\n\n if (apiCallOperations.length === 0) {\n continue;\n }\n\n this.logDebug(`📋 Resource: ${resourceType}`);\n this.logDebug(` Field Identifier: ${resourceConfig.resourceFieldIdentifier}`);\n this.logDebug(` Primary Scope: ${resourceConfig.resourcePrimaryScope}`);\n this.logDebug(` Parent Relationships: ${resourceConfig.resourceRelationships.parentRelationships.length}`);\n this.logDebug(' ────────────────────────────────────────────────────────────────────────');\n\n for (const operation of apiCallOperations) {\n totalOperations++;\n\n // Extract operation path using ResourcesConfig_OperationPathUtils\n const operationPath = ResourcesConfig_OperationPathUtils.extractOperationPath(operation);\n\n // Stringify operation path using ResourcesConfig_OperationPathUtils\n const operationPathString = ResourcesConfig_OperationPathUtils.createOperationPathKey(operationPath);\n\n this.logDebug(` 🔧 Operation Path: ${operationPathString}`);\n\n // Display URLs if they exist\n if ('initiatorInfos' in operation && Array.isArray(operation.initiatorInfos) && operation.initiatorInfos.length > 0) {\n this.logDebug(` 🌐 Generated URLs (${operation.initiatorInfos.length}):`);\n operation.initiatorInfos.forEach((initiatorInfo: ResourceConfiguration_Operation_UrlInitiatorInfo, index: number) => {\n const paramInfo = initiatorInfo.parameters?.map((p: ResourceConfiguration_Operation_UrlParameterInfo) => `${p.fieldIdentifier}:${p.resourceType}`).join(', ') || 'none';\n const callbackInfo = initiatorInfo.urlCallback ? ` | callback: ${initiatorInfo.urlCallback}` : '';\n this.logDebug(` ${index + 1}. ${operation.httpVerb || 'N/A'} ${initiatorInfo.url}${callbackInfo} [params: ${paramInfo}]`);\n totalUrls++;\n });\n } else {\n this.logDebug(` ❌ No URLs generated`);\n }\n\n // Additional operation details\n const details: string[] = [];\n if ('isBulkOperation' in operation && operation.isBulkOperation) {\n details.push('BULK');\n }\n if (operation.variantKey) {\n details.push(`VARIANT: ${operation.variantKey}`);\n }\n if ('isApiKeyAccessDisabled' in operation && operation.isApiKeyAccessDisabled) {\n details.push('NO_API_KEY');\n }\n\n if (details.length > 0) {\n this.logDebug(` 📝 Details: ${details.join(', ')}`);\n }\n\n this.logDebug(' ────────────────────────────────────────────────────────────────────────');\n }\n\n this.logDebug(''); // Empty line between resources\n }\n\n this.logDebug(`📊 Summary:`);\n this.logDebug(` Total Resource Types: ${resourceTypes.length}`);\n this.logDebug(` Total API_CALL Operations: ${totalOperations}`);\n this.logDebug(` Total Generated URLs: ${totalUrls}`);\n this.logDebug(` Average URLs per Operation: ${totalOperations > 0 ? (totalUrls / totalOperations).toFixed(2) : '0'}`);\n this.logDebug('\\n=== END URL DEBUG DISPLAY ===\\n');\n }\n\n\n public debugDisplayResourceUrls(resourceType: ResourceType): void {\n this.ensureInitialized();\n\n const registry = this.getResourcesRegistry();\n const resourceConfig = registry.resourceConfigurations[resourceType];\n\n if (!resourceConfig) {\n this.logDebug(`❌ Resource type '${resourceType}' not found in registry`);\n return;\n }\n\n this.logDebug(`\\n=== 🔍 URL PATTERNS FOR RESOURCE: ${resourceType} ===\\n`);\n\n // Show resource details\n this.logDebug(`📋 Resource Details:`);\n this.logDebug(` Identifier: ${resourceConfig.resourceIdentifier}`);\n this.logDebug(` Field Identifier: ${resourceConfig.resourceFieldIdentifier}`);\n this.logDebug(` Primary Scope: ${resourceConfig.resourcePrimaryScope}`);\n this.logDebug(` System Resource: ${resourceConfig.isSystemResource}`);\n\n // Show parent relationships\n const parentRels = resourceConfig.resourceRelationships.parentRelationships;\n if (parentRels.length > 0) {\n this.logDebug(`\\n🔗 Parent Relationships (${parentRels.length}):`);\n parentRels.forEach((rel, index) => {\n const scope = rel.isPrimaryScope ? ' [PRIMARY SCOPE]' : '';\n const requirement = rel.parentResourceRequirement === ResourceParentResourceRequirement.OPTIONAL ? ' [OPTIONAL]' : ' [MANDATORY]';\n this.logDebug(` ${index + 1}. ${rel.resourceType1} → ${rel.resourceType2}${scope}${requirement}`);\n });\n }\n\n // Show URL-bearing operations\n const apiCallOps = resourceConfig.operations.filter(\n op => op.variantType === ResourceOperationVariantType.API_CALL\n || op.variantType === ResourceOperationVariantType.API_CALL_WITH_CALLBACK\n );\n\n if (apiCallOps.length > 0) {\n this.logDebug(`\\n🔧 URL-bearing Operations (${apiCallOps.length}):`);\n\n apiCallOps.forEach((operation, index) => {\n const operationPath = ResourcesConfig_OperationPathUtils.extractOperationPath(operation);\n const pathString = ResourcesConfig_OperationPathUtils.createOperationPathKey(operationPath);\n\n this.logDebug(`\\n ${index + 1}. ${pathString}`);\n\n if ('initiatorInfos' in operation && Array.isArray(operation.initiatorInfos)) {\n operation.initiatorInfos.forEach((initiatorInfo: ResourceConfiguration_Operation_UrlInitiatorInfo, urlIndex: number) => {\n const paramInfo = initiatorInfo.parameters?.map((p: ResourceConfiguration_Operation_UrlParameterInfo) => `${p.fieldIdentifier}:${p.resourceType}`).join(', ') || 'none';\n const callbackInfo = initiatorInfo.urlCallback ? ` | callback: ${initiatorInfo.urlCallback}` : '';\n this.logDebug(` ${operation.httpVerb || 'N/A'} ${initiatorInfo.url}${callbackInfo} [params: ${paramInfo}]`);\n });\n }\n });\n } else {\n this.logDebug('\\n❌ No URL-bearing operations found');\n }\n\n this.logDebug(`\\n=== END RESOURCE URL PATTERNS ===\\n`);\n }\n\n public debugDisplayGeneratedDtos(resourceFilter: ResourceType[] = []): void {\n this.ensureInitialized();\n\n const registry = this.getResourcesRegistry();\n\n ResourcesConfigOperationsDtosBuilderUtils.debugDisplayGeneratedDtos(\n registry.resourceConfigurations,\n resourceFilter\n );\n }\n\n /**\n * Auto-register a limitCheck on a resource's CREATE default variant.\n * Called by FeatureDefinitionRegistryBackendService during startup for\n * limit features with `countResource`.\n *\n * Only adds the limitCheck if:\n * - The resource exists in the registry\n * - The resource has a CREATE operation\n * - No explicit limitChecks already references this featureId\n *\n * @param resourceType - The resource type whose CREATE operation should get the limitCheck\n * @param featureId - The feature identifier for the limit check\n * @returns true if the limitCheck was added, false if skipped\n */\n public addAutoLimitCheck(resourceType: string, featureId: string): boolean {\n this.ensureInitialized();\n\n const registry = this.getResourcesRegistry();\n const resourceConfig = registry.resourceConfigurations[resourceType as ResourceType];\n\n if (!resourceConfig) {\n this.logDebug(`addAutoLimitCheck: resource ${resourceType} not found in registry, skipping`);\n return false;\n }\n\n const createCandidates = resourceConfig.operations.filter((op) =>\n op.operationIdentifier === CoreResourceOperation.CREATE\n && op.isOperationDefault === true\n && !('isBulkOperation' in op && op.isBulkOperation === true)\n && (\n op.variantType === ResourceOperationVariantType.API_CALL\n || op.variantType === ResourceOperationVariantType.API_CALL_WITH_CALLBACK\n )\n );\n if (createCandidates.length > 1) {\n const candidateVariants = createCandidates.map((op) => ({\n variantType: op.variantType,\n variantKey: op.variantKey,\n }));\n this.logDebug('addAutoLimitCheck: ambiguous default CREATE variants', {\n resourceType,\n featureId,\n candidateVariants,\n });\n throw this.errorBuilder.buildError(\n ErrorType.CONFIGURATION,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.RESOURCES_REGISTRY_REGISTRATION_FAILED,\n context: {\n message: 'Auto limit checks require exactly one default non-bulk URL-bearing CREATE operation',\n resourceType,\n featureId,\n candidateVariants,\n }\n }\n );\n }\n const createOp = createCandidates[0];\n\n if (!createOp) {\n this.logDebug(`addAutoLimitCheck: resource ${resourceType} has no default URL-bearing CREATE variant, skipping`);\n return false;\n }\n\n // Cast to mutable shape for auto-registration mutation.\n // At startup, operations have already been normalized by the factory, so requiredFeatures\n // is in full form `{ features?, mode?, limitChecks? }` (never the shorthand `string[]`).\n const mutableOp = createOp as { requiredFeatures?: { features?: string[]; mode?: string; limitChecks?: Array<{ featureId: string; increment?: number }> } };\n\n // Check if this featureId is already in limitChecks\n if (mutableOp.requiredFeatures?.limitChecks?.some(lc => lc.featureId === featureId)) {\n this.logDebug(`addAutoLimitCheck: resource ${resourceType} CREATE already has limitCheck for ${featureId}, skipping`);\n return false;\n }\n\n // Add the limitCheck\n if (!mutableOp.requiredFeatures) {\n mutableOp.requiredFeatures = {};\n }\n if (!mutableOp.requiredFeatures.limitChecks) {\n mutableOp.requiredFeatures.limitChecks = [];\n }\n mutableOp.requiredFeatures.limitChecks.push({ featureId });\n\n this.logDebug(`addAutoLimitCheck: added limitCheck for ${featureId} on ${resourceType}.CREATE`);\n return true;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"resources-registry.backend.service.js","sourceRoot":"","sources":["../../../../src/resources/services/resources-registry.backend.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAKH,gCAAgC,EAChC,6CAA6C,EAC7C,4BAA4B,EAO5B,6CAA6C,EAC7C,kCAAkC,EAClC,0CAA0C,EAC1C,8BAA8B,EAE9B,yCAAyC,EACzC,yCAAyC,EACzC,kCAAkC,EAClC,4BAA4B,EAC5B,4BAA4B,EAC5B,mCAAmC,EACnC,sCAAsC,EACtC,mCAAmC,EACnC,oDAAoD,EACpD,kDAAkD,EAClD,SAAS,EACT,2BAA2B,EAC3B,kCAAkC,EAClC,0CAA0C,EAC1C,0CAA0C,EAK1C,2BAA2B,EAC3B,qBAAqB,EACrB,iCAAiC,EACjC,4CAA4C,EAC5C,qBAAqB,EACrB,oBAAoB,EACpB,0BAA0B,EAG1B,oBAAoB,EACpB,sCAAsC,GACzC,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,wCAAwC,EAAE,MAAM,8EAA8E,CAAC;AACxI,OAAO,EAAE,6BAA6B,EAAE,MAAM,iFAAiF,CAAC;AAChI,OAAO,EAAE,8BAA8B,EAAE,MAAM,qEAAqE,CAAC;AACrH,OAAO,EAAE,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AACpF,OAAO,EAAE,gCAAgC,EAAE,MAAM,+EAA+E,CAAC;AAGjI,OAAO,EACL,iCAAiC,EACjC,0BAA0B,EAC1B,qCAAqC,EACrC,kBAAkB,EAClB,wBAAwB,EACxB,yBAA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sCAAsC,SAAS,YAAY,CAAC,CAAC;YACtH,OAAO,KAAK,CAAC;QACjB,CAAC;QAED,qBAAqB;QACrB,IAAI,CAAC,SAAS,CAAC,gBAAgB,EAAE,CAAC;YAC9B,SAAS,CAAC,gBAAgB,GAAG,EAAE,CAAC;QACpC,CAAC;QACD,IAAI,CAAC,SAAS,CAAC,gBAAgB,CAAC,WAAW,EAAE,CAAC;YAC1C,SAAS,CAAC,gBAAgB,CAAC,WAAW,GAAG,EAAE,CAAC;QAChD,CAAC;QACD,SAAS,CAAC,gBAAgB,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC;QAE3D,IAAI,CAAC,QAAQ,CAAC,2CAA2C,SAAS,OAAO,YAAY,SAAS,CAAC,CAAC;QAChG,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ,CAAA;AAvjFY,+BAA+B;IAD3C,UAAU,EAAE;IAuBJ,WAAA,MAAM,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAA;IACjC,WAAA,MAAM,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,CAAA;IAC3C,WAAA,MAAM,CAAC,kBAAkB,CAAC,mBAAmB,CAAC,CAAA;yDAAkC,0BAA0B;GAxBtG,+BAA+B,CAujF3C","sourcesContent":["import { injectable, inject } from 'inversify';\nimport {\n ResourcesRegistry,\n ResourceRelationship,\n TenantTeardownConfig,\n NotificationBadgeDefinition,\n coreNotificationBadgeDefinitions,\n collectNotificationBadgeDeclarationViolations,\n notificationBadgeIdentityKey,\n type NotificationBadgeOperationDeclarationSite,\n UserNotificationDefinition,\n ResourceConfiguration_Operation,\n ResourceConfiguration_OperationPath,\n AnyResourceConfiguration,\n ResourceConfiguration_InitializationFactoryMap,\n coreShared_ResourcesConfigurations_FactoryMap,\n coreResourceShared_FieldIdentifier,\n coreResourceShared_FieldIdentifierPriority,\n coreSharedResourceRelationship,\n ResourceType,\n ResourcesConfigOperationsUrlsBuilderUtils,\n ResourcesConfigOperationsDtosBuilderUtils,\n ResourcesConfig_OperationPathUtils,\n ResourceOperationVariantType,\n isDefaultUrlBearingOperation,\n isServiceResolvableDefaultOperation,\n SERVICE_NATIVE_OPERATION_VARIANT_TYPES,\n URL_BEARING_OPERATION_VARIANT_TYPES,\n findSharedPersistenceCollectionRetentionIncoherences,\n findSharedPersistenceCollectionAdapterIncoherences,\n ErrorType,\n ErrorCustomMessageReference,\n ENGINE_ORGANIZATION_UNIT_NARROWING,\n collectOrganizationUnitNarrowingViolations,\n mergeOrganizationUnitNarrowingDeclarations,\n type OrganizationUnitNarrowingDeclaration,\n ResourceConfiguration_Operation_UrlInitiatorInfo,\n ResourceConfiguration_Operation_UrlParameterInfo,\n PersistenceAdapterType,\n DEFAULT_PERSISTENCE_ADAPTER,\n CoreResourceOperation,\n ResourceParentResourceRequirement,\n reconcileGeneratedRelationshipBulkOperations,\n Resources_SharedUtils,\n isPersistenceAdapter,\n selectByPersistenceAdapter,\n CoreResourceType,\n DataMode,\n dataModeToVariantKey,\n findDuplicateRelationshipRegistrations,\n} from '@wildo-ai/saas-models';\nimport { BackendResourcesSources } from '~wildo-backend-lib/resources/models/resources.backend.schemas';\nimport { backendResourcesConfigurationsFactoryMap } from '~wildo-backend-lib/resources/models/resources-operations.backend.definitions';\nimport { backendResourcesRelationships } from '~wildo-backend-lib/resources/models/resources-relationships.backend.definitions';\nimport { BackendResourceFieldIdentifier } from '~wildo-backend-lib/resources/models/resources-types.backend.schemas';\nimport { SAAS_SERVICE_TYPES } from '~wildo-backend-lib/inject/models/service-types';\nimport { resolveDefaultPersistenceAdapter } from '~wildo-backend-lib/databases/models/resolve-persistence-adapter.backend.utils';\nimport type { LoggerService } from '~wildo-backend-lib/monitoring/logger/services/logger.service';\nimport type { AppConfigurationService } from '~wildo-backend-lib/config/services/app-configuration.backend.service';\nimport {\n classifySubjectErasureDisposition,\n IntrospectionTenancyStance,\n isResourcePersistenceAdapterIsolation,\n PersistenceAdapter,\n ResourceSystemAccessMode,\n SubjectErasureDisposition,\n} from '@wildo-ai/saas-models';\nimport {\n HttpApiErasureStance,\n HttpApiTransportDialect,\n} from '@wildo-ai/saas-models/external-data';\nimport { getZodObjectShape, isFileSchema, isZodObject, unwrapSchema } from '@wildo-ai/zod-decorators';\nimport { ErrorBuilderBackendService } from '~wildo-backend-lib/errors/services/error-builder.backend.service';\nimport { projectCaughtErrorLogFields } from '~wildo-backend-lib/errors/utils/error-log-level-classification.backend.utils';\nimport type { z } from 'zod';\n\n\n@injectable()\nexport class ResourcesRegistryBackendService {\n protected logDebug: (message: string, context?: Record<string, unknown>) => void;\n protected registry: ResourcesRegistry | null = null;\n\n protected isInitialized = false;\n\n /**\n * The resource types this application DELIBERATELY excluded from the registry at\n * initialization (today: billing-conditional resources when billing is disabled).\n *\n * Retained because \"absent from the registry\" has two completely different causes and a\n * boot-time consumer must be able to tell them apart. A resource nobody ever declared is a\n * typo or a drifted reference — permanently broken, worth refusing startup over. A resource\n * that WAS declared and was then feature-excluded is a legitimate runtime configuration, and\n * refusing over it would turn \"billing is disabled\" into \"the application will not start\".\n *\n * Populated even when empty so a caller never has to distinguish \"no exclusions\" from \"not\n * yet initialized\" — {@link getExcludedResourceTypes} answers that with `ensureInitialized`.\n */\n protected excludedResourceTypes: ReadonlySet<string> = new Set<string>();\n\n constructor(\n @inject(SAAS_SERVICE_TYPES.Logger) protected readonly logger: LoggerService,\n @inject(SAAS_SERVICE_TYPES.AppConfigService) protected readonly configService: AppConfigurationService,\n @inject(SAAS_SERVICE_TYPES.ErrorBuilderService) protected readonly errorBuilder: ErrorBuilderBackendService\n ) {\n this.logDebug = this.logger.debugByType('ResourcesRegistryBackendService');\n this.logger.setDebugTypeLogging('ResourcesRegistryBackendService', false);\n\n this.logDebug('Resources registry service created (not yet initialized)');\n }\n\n /**\n * W5.1: Returns organizationTypes config when app config is initialized.\n * Used by organization create validation to ensure Organization.type is a valid key.\n * Returns undefined when config is not initialized (e.g. platform mode).\n */\n public getOrganizationTypesConfig(): Record<string, unknown> | undefined {\n if (!this.configService.isInitialized()) return undefined;\n const config = this.configService.config;\n return (config as { organizationTypes?: Record<string, unknown> })?.organizationTypes;\n }\n\n /**\n * W5.9: Returns userTypes config when app config is initialized.\n * Used by user type revocation to check requiresOrgMembership constraints.\n */\n public getUserTypesConfig(): Record<string, unknown> | undefined {\n if (!this.configService.isInitialized()) return undefined;\n const config = this.configService.config;\n return (config as { userTypes?: Record<string, unknown> })?.userTypes;\n }\n\n /**\n * WS-A: Returns the tenant-teardown block when app config is initialized.\n *\n * Consumed by the `request_deletion` lifecycle operation (to pin\n * `Organization.purgeScheduledAt`) and by the `organization-purge` batch (for its cadence and\n * per-run bound). `undefined` here is not a failure — every field of\n * `TenantTeardownConfigSchema` carries a default, and `resolveOrganizationPurgeScheduledAt`\n * falls back to them, so an application that declares no block still gets a working 30-day\n * window rather than a tenant that can never be purged.\n */\n public getTenantTeardownConfig(): TenantTeardownConfig | undefined {\n if (!this.configService.isInitialized()) return undefined;\n const config = this.configService.config;\n return (config as { tenantTeardown?: TenantTeardownConfig })?.tenantTeardown;\n }\n\n // ================================\n // Initialization Method\n // ================================\n\n public async initialize<\n CustomShared_ResourceType extends ResourceType | undefined = undefined,\n CustomBackend_ResourceType extends ResourceType | undefined = undefined\n >(\n customShared_ResourcesConfigurationsFactoryMap : ResourceConfiguration_InitializationFactoryMap<CustomShared_ResourceType>,\n customShared_ResourceFieldIdentifier: { [ key: string ]: string } | undefined,\n customShared_ResourcesRelationships: ResourceRelationship[],\n customBackend_ResourcesConfigurationsFactoryMap : ResourceConfiguration_InitializationFactoryMap<CustomBackend_ResourceType>,\n customBackend_ResourceFieldIdentifier: { [ key: string ]: string } | undefined,\n customBackend_ResourcesRelationships: ResourceRelationship[],\n customNotificationBadgeDefinitions?: NotificationBadgeDefinition[],\n customAdditionalUserNotificationDefinitions?: UserNotificationDefinition[],\n excludedResourceTypes?: ReadonlySet<string>,\n /**\n * App-declared organization-unit narrowing opt-ins, merged over the engine's.\n *\n * This is the app-builder authoring surface for unit-scoped authorization: naming a resource\n * here admits a principal whose authority for it comes only from a unit grant, and confines\n * them to the rows of those units. Validated against the D-C4 containment rule below, on the\n * MERGED map — an application must not be able to narrow the authorization plane merely by\n * declaring it after the engine.\n */\n customOrganizationUnitNarrowing?: Readonly<Partial<Record<string, OrganizationUnitNarrowingDeclaration>>>,\n ): Promise<void> {\n if (this.isInitialized) {\n this.logDebug('Service already initialized, skipping');\n return;\n }\n\n // Organization-unit narrowing containment (plan decision D-C4). A resource that ISSUES\n // authority must not be governed by the authority it issues, or a principal holding a role\n // in ONE unit can use it to write the grant surface and union themselves up to\n // organization-wide admin. Fail CLOSED at startup: a misdeclared narrowing is a silent\n // authorization hole, so the application must not come up with one.\n //\n // Validated on the MERGED map, which is also the map published on the registry and consulted\n // at runtime — validating the engine constant alone would have left every app-declared\n // opt-in unchecked, which is where the containment actually matters.\n const organizationUnitNarrowing = mergeOrganizationUnitNarrowingDeclarations(\n ENGINE_ORGANIZATION_UNIT_NARROWING,\n customOrganizationUnitNarrowing,\n );\n const narrowingViolations = collectOrganizationUnitNarrowingViolations(organizationUnitNarrowing);\n if (narrowingViolations.length > 0) {\n throw this.errorBuilder.buildError(ErrorType.CONFIGURATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFIGURATION,\n context: {\n message: 'Organization-unit narrowing declaration violates the authorization-plane containment rule',\n reason: 'organization_unit_narrowing_containment_violation',\n violations: narrowingViolations,\n },\n });\n }\n\n const coreBackend_ResourceConfigurationFactoryMaps = backendResourcesConfigurationsFactoryMap;\n const coreBackend_ResourceRelationship = backendResourcesRelationships;\n const coreBackend_FieldIdentifier = BackendResourceFieldIdentifier;\n\n const allResourceFieldIdentifiers : { [ key: string ]: string } = {\n ...customShared_ResourceFieldIdentifier,\n ...customBackend_ResourceFieldIdentifier,\n ...coreBackend_FieldIdentifier,\n ...coreResourceShared_FieldIdentifier,\n };\n\n const assembledResourceRelationships: ResourceRelationship[] = [\n ...(customShared_ResourcesRelationships || []),\n ...(customBackend_ResourcesRelationships || []),\n ...coreSharedResourceRelationship,\n ...coreBackend_ResourceRelationship,\n ];\n\n // ── DUPLICATE-EDGE GUARD (fail-closed, runs BEFORE compilation) ─────────\n //\n // The four sources above are concatenated with no dedup, and the config factory\n // buckets the result with a plain `filter` — so an edge present twice here is\n // present twice in the child's `parentRelationships` AND the parent's\n // `childRelationships`, forever. Nothing downstream can repair that, because two\n // identical entries are indistinguishable from two intentionally distinct edges.\n //\n // The damage is silent, uneven, and does NOT wait for a lifecycle to fire. Runtime\n // paths that assert a cardinality on the buckets throw CONFIGURATION on an ordinary\n // request (complete-association resolution needs EXACTLY TWO parents; the\n // context-addressed singleton paths reject an AMBIGUOUS target), the frontend drops\n // or doubles relationship semantics on the same ambiguity checks, and composition\n // seeding / the onParentDelete cascade then double-EXECUTE on top. URL generation,\n // index derivation and DTO shaping happen to collapse duplicates — which is exactly\n // why a doubled registry can look healthy. See the validator's JSDoc for the full\n // three-class breakdown, and do NOT relax this to a warning on the theory that\n // duplicates are inert until a lifecycle runs.\n //\n // In practice this is never a duplicated declaration in one file — it is a host\n // COMPOSING lists and passing the same array through two of `initialize`'s slots.\n // `platform-apps-manager` did exactly that and doubled its four `wildoApplication`\n // composition edges (surfaced by the cascade-deletability guard on a live boot,\n // 2026-07-29, which reported each edge twice).\n //\n // Checked pre-compilation on the AUTHORED declarations: `ensureCompiledRelationships`\n // may legitimately preserve pre-resolved semantics on one copy and recompile the\n // other, which would hide the duplicate from a post-compilation comparison.\n const duplicateRelationshipRegistrations = findDuplicateRelationshipRegistrations(\n assembledResourceRelationships,\n );\n if (duplicateRelationshipRegistrations.length > 0) {\n // Log before throwing, mirroring the FK-validation guard below: the error context is\n // sanitized on its way out, so the boot log is the reliable channel for the full list.\n this.logger.error('Duplicate relationship registration detected during registry assembly:', {\n duplicates: duplicateRelationshipRegistrations.map((duplicate) => duplicate.message),\n });\n throw this.errorBuilder.buildError(\n ErrorType.CONFIGURATION,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.RESOURCES_REGISTRY_RELATIONSHIP_VALIDATION_FAILED,\n context: {\n message:\n `${duplicateRelationshipRegistrations.length} relationship edge(s) registered more than once:\\n` +\n duplicateRelationshipRegistrations.map((duplicate) => ` • ${duplicate.message}`)\n .join('\\n'),\n duplicatedEdges: duplicateRelationshipRegistrations.map(\n (duplicate) =>\n `${String(duplicate.parentResourceType)} → ${String(duplicate.childResourceType)} (×${duplicate.occurrences})`,\n ),\n },\n },\n );\n }\n\n let allResourceRelationships : ResourceRelationship[] = (\n Resources_SharedUtils.ensureCompiledRelationships as (\n relationships: ResourceRelationship[],\n allResourceFieldIdentifiers?: Record<string, string>\n ) => ResourceRelationship[]\n ).call(Resources_SharedUtils, assembledResourceRelationships, allResourceFieldIdentifiers);\n\n // Apply factory functions for custom shared resources configurations\n const customShared_ResourcesConfigurations: { [key: string]: AnyResourceConfiguration } = {};\n if (customShared_ResourcesConfigurationsFactoryMap && Object.keys(customShared_ResourcesConfigurationsFactoryMap).length > 0) {\n Object.entries(customShared_ResourcesConfigurationsFactoryMap).forEach(([resourceType, factory]) => {\n if (factory && typeof factory === 'function') {\n this.logDebug(`🏭 Calling factory for custom resource: ${resourceType}`);\n customShared_ResourcesConfigurations[resourceType] = factory(allResourceRelationships);\n this.logDebug(`✅ Factory completed for ${resourceType}`);\n }\n });\n }\n\n // Apply factory functions for custom backend resources configurations\n const customBackend_ResourcesConfigurations: { [key: string]: AnyResourceConfiguration } = {};\n if (customBackend_ResourcesConfigurationsFactoryMap && Object.keys(customBackend_ResourcesConfigurationsFactoryMap).length > 0) {\n Object.entries(customBackend_ResourcesConfigurationsFactoryMap).forEach(([resourceType, factory]) => {\n if (factory && typeof factory === 'function') {\n customBackend_ResourcesConfigurations[resourceType] = factory(allResourceRelationships);\n }\n });\n }\n\n // Apply factory functions for core shared resources configurations\n const coreShared_ResourcesConfigurations: { [key: string]: AnyResourceConfiguration } = {};\n if (coreShared_ResourcesConfigurations_FactoryMap && Object.keys(coreShared_ResourcesConfigurations_FactoryMap).length > 0) {\n Object.entries(coreShared_ResourcesConfigurations_FactoryMap).forEach(([resourceType, factory]) => {\n if (factory && typeof factory === 'function') {\n coreShared_ResourcesConfigurations[resourceType] = factory(allResourceRelationships);\n }\n });\n }\n\n // Apply factory functions for core backend resources configurations\n const coreBackend_ResourcesConfigurations: { [key: string]: AnyResourceConfiguration } = {};\n if (coreBackend_ResourceConfigurationFactoryMaps && Object.keys(coreBackend_ResourceConfigurationFactoryMaps).length > 0) {\n Object.entries(coreBackend_ResourceConfigurationFactoryMaps).forEach(([resourceType, factory]) => {\n if (factory && typeof factory === 'function') {\n coreBackend_ResourcesConfigurations[resourceType] = factory(allResourceRelationships);\n }\n });\n }\n\n // Merge all resource configurations\n let allResourceConfigurations : { [key: string]: AnyResourceConfiguration } = {\n ...coreShared_ResourcesConfigurations,\n ...coreBackend_ResourcesConfigurations,\n ...customShared_ResourcesConfigurations,\n ...customBackend_ResourcesConfigurations,\n };\n\n // ── Resource Exclusion ─────────────────────────────────────────\n // Generic mechanism: remove excluded resource types from all 3 layers\n // (configurations, relationships, field identifiers).\n // Used for billing-conditional resources when billing is disabled.\n //\n // Recorded on the service BEFORE the filtering below, and unconditionally, so a later\n // boot-time consumer can distinguish a deliberately-excluded resource from one that was\n // never declared at all. See the `excludedResourceTypes` field.\n this.excludedResourceTypes = new Set<string>(excludedResourceTypes ?? []);\n if (excludedResourceTypes && excludedResourceTypes.size > 0) {\n this.logDebug(`Excluding ${excludedResourceTypes.size} resource types from registry`, {\n excludedTypes: [...excludedResourceTypes],\n });\n\n // Layer 1: Remove excluded resource configurations\n allResourceConfigurations = Object.fromEntries(\n Object.entries(allResourceConfigurations).filter(\n ([resourceType]) => !excludedResourceTypes.has(resourceType)\n )\n );\n\n // Layer 2: Remove relationships that reference excluded types\n allResourceRelationships = allResourceRelationships.filter(\n (rel) => !excludedResourceTypes.has(rel.resourceType1) && !excludedResourceTypes.has(rel.resourceType2)\n );\n\n // Layer 3: Remove excluded field identifiers\n for (const resourceType of excludedResourceTypes) {\n delete allResourceFieldIdentifiers[resourceType];\n }\n\n this.logDebug('Resource exclusion applied', {\n remainingConfigurations: Object.keys(allResourceConfigurations).length,\n remainingRelationships: allResourceRelationships.length,\n });\n }\n\n this.normalizeResourceConfigurationRelationships(\n allResourceConfigurations,\n allResourceFieldIdentifiers\n );\n\n reconcileGeneratedRelationshipBulkOperations(\n allResourceConfigurations,\n allResourceRelationships,\n allResourceFieldIdentifiers\n );\n\n ResourcesConfigOperationsDtosBuilderUtils.rebuildResourceConfigurationsOperationDtos(\n allResourceConfigurations\n );\n\n // Reverse map fieldIdentifier → REFERENCED resourceType — built by THE shared\n // implementation (Resources_SharedUtils.buildFieldIdentifierToResourceTypeMap).\n // This service and the frontend resources repository used to carry hand-kept\n // copies of this logic; a semantic change to FK resolution now lands once.\n const fieldIdentifierToResourceType = Resources_SharedUtils.buildFieldIdentifierToResourceTypeMap({\n allResourceFieldIdentifiers,\n allResourceRelationships,\n getMainSchema: (resourceType) => allResourceConfigurations[resourceType]?.mainSchema,\n fieldIdentifierPriority: coreResourceShared_FieldIdentifierPriority,\n onForeignKeyCollision: ({ foreignKeyField, existingType, referencedResourceType }) => {\n this.logger.error(\n `[ResourcesRegistry] FK field \"${foreignKeyField}\" is reused by different holders ` +\n `referencing \"${existingType}\" and \"${referencedResourceType}\". ` +\n `Use distinct foreignKeyField names to disambiguate.`,\n { existingType, newType: referencedResourceType, foreignKeyField }\n );\n },\n }) as Record<string, ResourceType>;\n\n // Derive the scope-required reference-search junctions from the M:N\n // relationships (e.g. (users ← organizations) via organizationMembers).\n // Both registries build this identically so the picker (frontend) and\n // the contextual filter + authorization (backend) agree on scoping.\n const manyToManyScopeJunctions = Resources_SharedUtils.buildManyToManyScopeJunctionMap(\n allResourceRelationships,\n allResourceFieldIdentifiers,\n );\n\n // Create the final registry\n this.registry = {\n notificationBadgeDefinitions: [\n ...coreNotificationBadgeDefinitions,\n ...(customNotificationBadgeDefinitions ?? []),\n ],\n additionalUserNotificationDefinitions: [],\n resourceRelationships: allResourceRelationships,\n resourceConfigurations: allResourceConfigurations,\n // Recorded HERE because this is the last point at which app and core are distinguishable —\n // `allResourceConfigurations` merges them, deliberately, since every runtime consumer wants\n // one map. A consumer re-deriving the split from a core key set would be a second\n // enumeration of a population this method already has in two variables.\n applicationResourceTypes: [\n ...Object.keys(customShared_ResourcesConfigurations),\n ...Object.keys(customBackend_ResourcesConfigurations),\n ] as ResourceType[],\n allResourceFieldIdentifiers,\n fieldIdentifierToResourceType,\n manyToManyScopeJunctions,\n // Validated against the D-C4 containment rule at the top of this method. This is the ONE\n // map both halves of enforcement read — the authorization gate (which decides) and the\n // repositories (which apply) — so they cannot disagree about which resources are narrowed.\n organizationUnitNarrowing,\n };\n\n // Validate that every badge declaration is coherent, and refuse to start otherwise.\n this.logDebug('Validating notification badge declarations');\n this.validateNotificationBadgeDeclarations(this.registry.notificationBadgeDefinitions, allResourceConfigurations);\n\n // Validate all relationships can resolve FK fields\n this.logDebug('Validating relationship FK field resolution');\n this.validateRelationshipForeignKeyFields(allResourceRelationships, allResourceFieldIdentifiers);\n\n // Validate relationship graph for cycles\n this.logDebug('Validating relationship graph for cycles');\n this.validateRelationshipGraph(allResourceRelationships);\n\n // Validate persistence adapter configuration for all resources\n this.logDebug('Validating persistence adapter configuration');\n this.validatePersistenceAdapterConfiguration(allResourceConfigurations);\n\n // Validate that configs sharing one collection agree about retention governance\n this.logDebug('Validating shared-collection retention coherence');\n this.validateSharedCollectionRetentionCoherence(allResourceConfigurations);\n\n this.logDebug('Generating URLs for URL-bearing operations');\n this.generateUrlsForAllResourceConfigurations(allResourceConfigurations, this.registry, allResourceFieldIdentifiers);\n\n this.logDebug('Enhancing DTOs for all operations');\n this.enhanceDtosForAllResourceConfigurations(allResourceConfigurations, this.registry, allResourceFieldIdentifiers);\n\n this.isInitialized = true;\n this.logDebug('Resources registry initialized successfully', { totalConfigurations: Object.keys(allResourceConfigurations).length, totalRelationships: allResourceRelationships.length });\n\n //Debug display generated URLs after initialization is complete\n this.logDebug('Displaying generated URLs for debugging');\n this.debugDisplayGeneratedUrls();\n\n // Debug display generated DTOs after initialization is complete\n // this.logDebug('Displaying generated DTOs for debugging');\n // this.debugDisplayGeneratedDtos();\n\n }\n\n\n\n // ================================\n // Access Methods\n // ================================\n\n public getResourcesRegistry(): ResourcesRegistry {\n this.ensureInitialized();\n return this.registry!;\n }\n\n /**\n * The PLATFORM'S post-hydration adapter validation (Phase 5.3 review item (iv), decided).\n *\n * Registry initialization runs in platform mode while `AppConfigurationService` is\n * deliberately unhydrated, so `validatePersistenceAdapterConfiguration` SKIPS itself there —\n * which meant the enabled-flag coherence checks, the unsupported-adapter refusals, and the\n * shared-collection incoherence detection never ran on a platform AT ALL. Platform owners\n * (apps-manager, module-registry) call this once hydration completes.\n *\n * `toleratesDeclaredMixedAdapters` is forced ON — the platform's bootstrap-store plane\n * declares MongoDB by design through the D7/D8 transition, and the one-adapter refusal would\n * reject that sanctioned state (the tension is pinned in\n * `resources-registry.one-adapter-vs-bootstrap-plane.test.ts`). The mixed set is logged and\n * NAMED; actual mixed-adapter atomic boundaries stay refused at runtime by the persistence\n * unit of work. Everything else in the validation fails closed, exactly as it does for\n * applications.\n */\n public validatePersistenceAdapterConfigurationForPlatform(): void {\n this.ensureInitialized();\n this.validatePersistenceAdapterConfiguration(this.registry!.resourceConfigurations, {\n toleratesDeclaredMixedAdapters: true,\n });\n }\n\n\n public getResourceTypes(): ResourceType[] {\n this.ensureInitialized();\n return Object.keys(this.registry!.resourceConfigurations) as ResourceType[];\n }\n\n /**\n * The resource types this application deliberately excluded at initialization — the\n * complement of {@link getResourceTypes} that a boot-time consumer needs in order to tell a\n * legitimate feature-gated absence from a broken reference.\n *\n * Fails closed when the registry is not initialized: an empty set would read as \"nothing was\n * excluded\" and let a caller draw a conclusion from a registry that has not been built.\n */\n public getExcludedResourceTypes(): ReadonlySet<string> {\n this.ensureInitialized();\n return this.excludedResourceTypes;\n }\n\n /**\n * Re-run persistence-dependent registry invariants after application config\n * is initialized.\n *\n * Platform hosts may assemble the resource registry before their resolved\n * database config exists, so initialization cannot always determine the\n * effective default adapter. Startup must call this post-config seam before\n * accepting traffic; in particular, transactional token generation,\n * consumption, or revocation must never silently span a PostgreSQL mutation\n * and Mongo token persistence.\n */\n public validateInitializedPersistenceAdapterConfiguration(): void {\n this.ensureInitialized();\n if (this.configService?.isInitialized?.() !== true) {\n throw this.errorBuilder.buildError(ErrorType.CONFIGURATION, undefined, {\n context: {\n message:\n 'Cannot validate persistence adapter configuration before application config is initialized.',\n },\n });\n }\n this.validatePersistenceAdapterConfiguration(\n this.registry!.resourceConfigurations,\n );\n }\n\n /**\n * Get the map of resource types to their standard field identifiers.\n * Used for FK field resolution without string manipulation.\n *\n * @example USERS -> userId, ORGANIZATIONS -> organizationId, USER_SELF -> userId\n */\n public getAllResourceFieldIdentifiers(): Record<ResourceType, string> {\n this.ensureInitialized();\n return this.registry!.allResourceFieldIdentifiers;\n }\n\n /**\n * Resolve the foreign key field name for a relationship.\n *\n * Priority:\n * 1. Explicit foreignKeyField from relationship (for disambiguation)\n * 2. Lookup in allResourceFieldIdentifiers map (authoritative source)\n * 3. Throws error if not found (no string manipulation fallback)\n *\n * @param relationship - The resource relationship\n * @returns The FK field name\n * @throws Error if resource type not found in allResourceFieldIdentifiers\n */\n public resolveForeignKeyField(relationship: { resourceType1: ResourceType; resourceType2?: ResourceType; foreignKeyField?: string }): string {\n this.ensureInitialized();\n const resolved = Resources_SharedUtils.tryResolveRelationshipForeignKeyIdentity(\n {\n resourceType1: relationship.resourceType1,\n resourceType2: relationship.resourceType2 ?? relationship.resourceType1,\n foreignKeyField: relationship.foreignKeyField,\n },\n this.registry!.allResourceFieldIdentifiers\n );\n\n if (!resolved) {\n throw this.errorBuilder.buildError(\n ErrorType.CONFIGURATION,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.RESOURCES_REGISTRY_FIELD_IDENTIFIER_NOT_FOUND,\n context: {\n resourceType: relationship.resourceType1,\n hint: 'Resource type must be registered with a resourceFieldIdentifier'\n }\n }\n );\n }\n\n return resolved.fieldIdentifier;\n }\n\n /**\n * Get the reverse map of field identifiers to resource types.\n * Used for quick lookup of resource type from a FK field name.\n *\n * @example userId -> USERS, organizationId -> ORGANIZATIONS\n */\n public getFieldIdentifierToResourceType(): Record<string, ResourceType> {\n this.ensureInitialized();\n return this.registry!.fieldIdentifierToResourceType;\n }\n\n /**\n * Resolve the resource type from a FK field name.\n *\n * @param fkField - The foreign key field name (e.g., 'userId', 'organizationId')\n * @returns The resource type or undefined if not found\n */\n public resolveResourceTypeFromForeignKeyField(fkField: string): ResourceType | undefined {\n this.ensureInitialized();\n return this.registry!.fieldIdentifierToResourceType[fkField];\n }\n\n /**\n * Resolve the default URL-bearing operation path for a `(resourceType, operationIdentifier)` pair.\n *\n * **Variant filter is intentional**: this method only considers `API_CALL` /\n * `API_CALL_WITH_CALLBACK` variants because callers consume the returned\n * path for HTTP routing (URL templates, methods, request/response DTOs),\n * controller wiring, and frontend URL generation — surfaces that are\n * meaningless for non-URL-bearing variants.\n *\n * **For repository-only resources (e.g. `CoreResourceType.FILES`), use\n * {@link getRepositoryOperationPathDefault} instead.** Those resources\n * declare only `REPOSITORY_ONLY` variants by design (managed via dedicated\n * backend services rather than HTTP), so this method will throw\n * `RESOURCES_REGISTRY_OPERATION_PATH_NOT_FOUND` for them. Calling this\n * method to bootstrap an internal `ExecutionContext` for such a resource\n * is a category error — the URL-routing intent does not apply, and there\n * is nothing for the registry to find.\n */\n public getOperationPathDefault(resourceType: ResourceType, operationIdentifier: string): ResourceConfiguration_OperationPath<any, any> {\n this.ensureInitialized();\n const registry = this.getResourcesRegistry();\n const resourceConfig = registry.resourceConfigurations[resourceType];\n // Selection predicate is shared with the validate-field route mount gate\n // (`findDefaultUrlBearingCreateOperation`) via `isDefaultUrlBearingOperation`.\n // That gate decides whether the per-resource validate-field route — whose\n // handler calls this resolver with CREATE — is registered at all. Both must\n // apply the identical filter or that handler can reach a CREATE this method\n // throws on; the shared guard makes the agreement structural.\n const matchingDefaultOperations = resourceConfig.operations.filter((operation) =>\n isDefaultUrlBearingOperation(operation, operationIdentifier)\n );\n if (matchingDefaultOperations.length > 1) {\n const candidateVariants = matchingDefaultOperations.map((operation) => ({\n variantType: operation.variantType,\n variantKey: operation.variantKey,\n resourceOperationLike: operation.resourceOperationLike,\n }));\n this.logDebug('Ambiguous default operation path candidates', {\n resourceType,\n operationIdentifier,\n candidateVariants,\n });\n throw this.errorBuilder.buildError(\n ErrorType.CONFIGURATION,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.RESOURCES_REGISTRY_REGISTRATION_FAILED,\n context: {\n message: 'Ambiguous default URL-bearing operation path candidates; callers must use an explicit operation path when multiple non-bulk default variants share an operation identifier',\n resourceType,\n operationIdentifier,\n candidateVariants,\n }\n }\n );\n }\n const operation = matchingDefaultOperations[0];\n if (!operation) {\n throw this.errorBuilder.buildError(\n ErrorType.INTERNAL,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.RESOURCES_REGISTRY_OPERATION_PATH_NOT_FOUND,\n context: { resourceType, operationIdentifier, }\n }\n );\n }\n return ResourcesConfig_OperationPathUtils.extractOperationPath(operation);\n }\n\n /**\n * Non-throwing existence check: does `resourceType` declare exactly one\n * canonical default URL-bearing operation for `operationIdentifier`?\n *\n * Mirrors the selection predicate of {@link getOperationPathDefault}\n * (`isDefaultUrlBearingOperation`) but answers the yes/no question WITHOUT\n * building an error. `getOperationPathDefault` constructs an alert-grade\n * `RESOURCES_REGISTRY_OPERATION_PATH_NOT_FOUND` (INTERNAL / critical) on its\n * miss path — and merely *constructing* a Wildo error fires its backend\n * actions (LOG / ALERT / RECORD_METRICS / TRACE) as a side effect, before\n * any caller `catch` can downgrade it. That is correct when a default is\n * genuinely required, but wrong for best-effort probes that legitimately\n * expect \"no default\" for internal-only resources — e.g. `userCredentials`,\n * which by design exposes only an `INTERNAL_CALL` update and no READ. Such\n * probes MUST call this predicate first and skip the throwing resolver when\n * it returns false.\n *\n * Returns false in every case where {@link getOperationPathDefault} would\n * throw: unregistered resource, no matching default, or an ambiguous (> 1)\n * set of default candidates.\n */\n public hasOperationPathDefault(resourceType: ResourceType, operationIdentifier: string): boolean {\n this.ensureInitialized();\n const registry = this.getResourcesRegistry();\n const resourceConfig = registry.resourceConfigurations[resourceType];\n if (!resourceConfig) {\n return false;\n }\n const matchingDefaultOperations = resourceConfig.operations.filter((operation) =>\n isDefaultUrlBearingOperation(operation, operationIdentifier)\n );\n return matchingDefaultOperations.length === 1;\n }\n\n /**\n * Resolve the default SERVICE-dispatch operation path for a\n * `(resourceType, operationIdentifier)` pair.\n *\n * The service layer (`ServicesRegistryHandlerBackendService`) is the\n * trusted INTERNAL dispatch path — reached by internal/trusted code, never\n * directly by HTTP requests (those flow controller → `doByExecutionContext`\n * with a route-bound path). `INTERNAL_CALL` is therefore the service\n * layer's NATIVE transport: the variant authors declare for operations that\n * must run through the registry pipeline (ACL, hooks, lifecycle) but are\n * deliberately NOT exposed over HTTP.\n *\n * Resolution is INTERNAL-preferred, then URL-bearing:\n * 1. If the operation declares an `INTERNAL_CALL` default, return it. This\n * honours author intent for resources whose default for this operation\n * is internal-only (`userIdentityLinks.list`, `users.list`,\n * `inboundContacts.update`) AND for the one resource that declares BOTH\n * an internal and a URL default for the same operation — the internal\n * variant is the one trusted callers must use; the URL variant is the\n * public/admin surface reached via its keyed/route path.\n *\n * **That \"BOTH\" population is exactly ONE operation: `organizations`\n * CREATE.** Measured 2026-09-08 over all 106 non-test\n * `*resources-config*.ts` files (653 variant blocks), replicating\n * `determineOperationVariantDefault` per variant-type group.\n *\n * This paragraph previously cited `users.list` and `inboundContacts.update`\n * as further both-default examples and BOTH were wrong: the former's\n * `API_CALL` is `isDefault: false, variantKey: \"admin\"`, and the latter\n * declares no `API_CALL` at all — so neither has a URL-bearing DEFAULT and\n * neither is a case where this method chooses between transports. The\n * correction is recorded rather than silently applied because the false\n * plural made the preference look like a broad, well-trodden policy when it\n * decides exactly one operation — which is what made the agent function-tool\n * plane's blast radius read as unbounded when it was a single, and severe,\n * case (see `9594526e`).\n *\n * ⚠️ **A caller that FACES AN EXTERNAL PRINCIPAL must not use this method.**\n * It answers \"which variant does a TRUSTED internal caller want\", and for\n * `organizations` CREATE that is the registration-owned path, which skips the\n * creation-policy guard and writes no founding owner. A surface that\n * advertises a public operation to an outside caller owes\n * {@link getOperationPathDefault} instead, so the operation it authorized and\n * advertised is the operation it executes — the invariant the MCP tool plane\n * and the agent function-tool factories both keep.\n * 2. Otherwise return the URL-bearing default (`API_CALL` /\n * `API_CALL_WITH_CALLBACK`) for resources exposed only over HTTP.\n * 3. Otherwise throw `RESOURCES_REGISTRY_OPERATION_PATH_NOT_FOUND`.\n *\n * The config factory guarantees AT MOST ONE default per transport group\n * (`determineOperationVariantDefault` for non-URL groups + the\n * URL-bearing-default validation), so this composition is unambiguous: it\n * never has to choose between two same-transport defaults, and the `> 1`\n * guard below is a corrupted-registry backstop, not an expected path.\n *\n * Distinct from {@link getOperationPathDefault} (URL-routing only — must\n * never receive an `INTERNAL_CALL` path, or it could build a route/URL for\n * an operation that has no HTTP surface). Distinct from\n * {@link getRepositoryOperationPathDefault} (REPOSITORY_ONLY) — that method\n * is the repository-direct transport for callers like `FilesBackendService`\n * that bypass the service pipeline entirely, whereas this one resolves the\n * INTERNAL_CALL / URL default for the generic service-dispatch entry point.\n */\n public getServiceOperationPathDefault(resourceType: ResourceType, operationIdentifier: string): ResourceConfiguration_OperationPath<any, any> {\n this.ensureInitialized();\n const registry = this.getResourcesRegistry();\n const resourceConfig = registry.resourceConfigurations[resourceType];\n // Admission is the SHARED predicate (identifier + default + non-bulk + accepted variant type);\n // this method only adds the transport PREFERENCE on top of it. Keeping admission shared is what\n // lets the `retentionPolicy` boot guard in `resources-config.shared.factory.ts` promise that a\n // config it accepts is a config this resolver can serve — see\n // `SERVICE_RESOLVABLE_OPERATION_VARIANT_TYPES`.\n const defaultOperationsOfVariantTypes = (variantTypes: readonly ResourceOperationVariantType[]) =>\n resourceConfig.operations.filter((operation) =>\n isServiceResolvableDefaultOperation(operation, operationIdentifier)\n && variantTypes.includes(operation.variantType)\n );\n\n const internalDefaults = defaultOperationsOfVariantTypes(SERVICE_NATIVE_OPERATION_VARIANT_TYPES);\n const urlDefaults = defaultOperationsOfVariantTypes(URL_BEARING_OPERATION_VARIANT_TYPES);\n\n if (internalDefaults.length > 1 || urlDefaults.length > 1) {\n const candidateVariants = [...internalDefaults, ...urlDefaults].map((operation) => ({\n variantType: operation.variantType,\n variantKey: operation.variantKey,\n resourceOperationLike: operation.resourceOperationLike,\n }));\n this.logDebug('Corrupted registry: multiple default service operation paths within one transport group', {\n resourceType,\n operationIdentifier,\n candidateVariants,\n });\n throw this.errorBuilder.buildError(\n ErrorType.CONFIGURATION,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.RESOURCES_REGISTRY_REGISTRATION_FAILED,\n context: {\n message: 'Corrupted registry: more than one default (non-bulk) operation within a single transport group. The config factory must guarantee at most one default per transport group.',\n resourceType,\n operationIdentifier,\n candidateVariants,\n }\n }\n );\n }\n\n // INTERNAL_CALL is the service layer's native transport — prefer it,\n // then fall back to the single URL-bearing default.\n const operation = internalDefaults[0] ?? urlDefaults[0];\n if (!operation) {\n throw this.errorBuilder.buildError(\n ErrorType.INTERNAL,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.RESOURCES_REGISTRY_OPERATION_PATH_NOT_FOUND,\n context: { resourceType, operationIdentifier, }\n }\n );\n }\n return ResourcesConfig_OperationPathUtils.extractOperationPath(operation);\n }\n\n /**\n * Resolve the default `REPOSITORY_ONLY` operation path for a\n * `(resourceType, operationIdentifier)` pair.\n *\n * Sibling of {@link getOperationPathDefault} for the repository-only side\n * of the registry. Use this to bootstrap an internal `ExecutionContext`\n * (via `ExecutionContextCreatorBackendService.createForInternalOperation`)\n * for resources that are intentionally managed off the HTTP surface —\n * notably `CoreResourceType.FILES`, whose READ/LIST/CREATE/UPDATE/DELETE\n * operations declare only `REPOSITORY_ONLY` variants and rely on\n * `FilesBackendService` for direct repository access rather than URL\n * routing.\n *\n * Why this exists as a distinct method:\n *\n * - `getOperationPathDefault` filters for `API_CALL` /\n * `API_CALL_WITH_CALLBACK` because its callers consume the result for\n * URL/DTO routing. Loosening that filter to fall back to\n * `REPOSITORY_ONLY` would corrupt URL routing for resources that\n * legitimately mix variant types.\n * - Internal repository operations have no URL identity. The variant\n * filter must explicitly opt into `REPOSITORY_ONLY` — the bulk-flag\n * carve-out is dropped because `isBulkOperation` is an HTTP-routing\n * concept that does not apply to repository-only variants.\n *\n * Throws `RESOURCES_REGISTRY_OPERATION_PATH_NOT_FOUND` if the resource\n * declares no default `REPOSITORY_ONLY` variant for the given identifier,\n * and `RESOURCES_REGISTRY_REGISTRATION_FAILED` if multiple default\n * `REPOSITORY_ONLY` variants share the identifier (configuration error).\n */\n public getRepositoryOperationPathDefault(resourceType: ResourceType, operationIdentifier: string): ResourceConfiguration_OperationPath<any, any> {\n this.ensureInitialized();\n const registry = this.getResourcesRegistry();\n const resourceConfig = registry.resourceConfigurations[resourceType];\n const matchingDefaultOperations = resourceConfig.operations.filter((operation) =>\n operation.operationIdentifier === operationIdentifier\n && operation.isOperationDefault === true\n && operation.variantType === ResourceOperationVariantType.REPOSITORY_ONLY\n );\n if (matchingDefaultOperations.length > 1) {\n const candidateVariants = matchingDefaultOperations.map((operation) => ({\n variantType: operation.variantType,\n variantKey: operation.variantKey,\n resourceOperationLike: operation.resourceOperationLike,\n }));\n this.logDebug('Ambiguous default repository-only operation path candidates', {\n resourceType,\n operationIdentifier,\n candidateVariants,\n });\n throw this.errorBuilder.buildError(\n ErrorType.CONFIGURATION,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.RESOURCES_REGISTRY_REGISTRATION_FAILED,\n context: {\n message: 'Ambiguous default REPOSITORY_ONLY operation path candidates; resource configurations must declare a single default repository-only variant per operation identifier',\n resourceType,\n operationIdentifier,\n candidateVariants,\n }\n }\n );\n }\n const operation = matchingDefaultOperations[0];\n if (!operation) {\n throw this.errorBuilder.buildError(\n ErrorType.INTERNAL,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.RESOURCES_REGISTRY_OPERATION_PATH_NOT_FOUND,\n context: {\n message: 'No default REPOSITORY_ONLY variant registered for the requested operation identifier',\n resourceType,\n operationIdentifier,\n }\n }\n );\n }\n return ResourcesConfig_OperationPathUtils.extractOperationPath(operation);\n }\n\n /**\n * Resolve the default operation path for bootstrapping an INTERNAL execution\n * context that will drive a repository operation — `REPOSITORY_ONLY`-preferred,\n * with a URL-bearing fallback.\n *\n * This is the single seam every internal-repository-context builder should use\n * (`FilesBackendService`, the queue services, the billing back-office services,\n * the scoped-state materialization hook). Such builders bootstrap an\n * `ExecutionContext` only to anchor a direct `repository.create/read/update/delete`\n * call — the operation slot is contextual metadata (the repository finds its own\n * default op regardless of variant), but it MUST resolve to *something*.\n *\n * Resolution precedence (mirrors the MIXED-variant reality of resources such as\n * scoped-state, whose READ/SEARCH are `API_CALL` but CREATE/UPDATE\n * `REPOSITORY_ONLY`):\n * 1. If the op declares a default `REPOSITORY_ONLY` variant, resolve it via\n * {@link getRepositoryOperationPathDefault}. This is the native transport for\n * resources managed off the HTTP surface — `FILES`, `JOB_PAYLOAD_STORAGE`,\n * `JOB_EXECUTIONS`, the billing core CRUD resources, scoped-state mutations.\n * 2. Otherwise resolve the URL-bearing default via {@link getOperationPathDefault}\n * (ops exposed over HTTP — scope-features READ, scoped-state READ).\n * 3. Otherwise the delegated resolver throws `RESOURCES_REGISTRY_OPERATION_PATH_NOT_FOUND`.\n *\n * **Why this exists as a distinct method.** The URL-only {@link getOperationPathDefault}\n * throws `ni` for `REPOSITORY_ONLY`-only resources. When it was hardened to\n * `API_CALL`-only, every internal-context builder that had reached for it silently\n * broke (FILES cleanup accumulated stale records; scoped-state first-read\n * materialization 500'd; the queue and billing internal ops 500'd or degraded to\n * empty data). Centralizing the precedence here means a future internal-repository\n * builder cannot reintroduce that bug by picking the wrong sibling resolver — there\n * is one obviously-correct entry point. Do NOT loosen {@link getOperationPathDefault}\n * to fall back to `REPOSITORY_ONLY`: that would corrupt URL routing for resources\n * that legitimately mix variant types.\n */\n public getInternalRepositoryOperationPathDefault(resourceType: ResourceType, operationIdentifier: string): ResourceConfiguration_OperationPath<any, any> {\n this.ensureInitialized();\n const registry = this.getResourcesRegistry();\n const resourceConfig = registry.resourceConfigurations[resourceType];\n const hasRepositoryOnlyDefault = resourceConfig.operations.some((operation) =>\n operation.operationIdentifier === operationIdentifier\n && operation.isOperationDefault === true\n && operation.variantType === ResourceOperationVariantType.REPOSITORY_ONLY\n );\n return hasRepositoryOnlyDefault\n ? this.getRepositoryOperationPathDefault(resourceType, operationIdentifier)\n : this.getOperationPathDefault(resourceType, operationIdentifier);\n }\n\n /**\n * Get operation path for a specific variant.\n * @param resourceType - The resource type\n * @param operationIdentifier - The operation identifier (e.g., CoreResourceOperation.READ)\n * @param variantKey - The variant key (e.g., 'summary', 'context')\n */\n public getOperationPath(resourceType: ResourceType, operationIdentifier: string, variantKey: string): ResourceConfiguration_OperationPath<any, any> {\n this.ensureInitialized();\n const registry = this.getResourcesRegistry();\n const resourceConfig = registry.resourceConfigurations[resourceType];\n\n const matchingVariantOperations = resourceConfig.operations.filter((op) =>\n op.operationIdentifier === operationIdentifier\n && op.variantKey === variantKey\n && op.isOperationDefault !== true\n && !('isBulkOperation' in op && op.isBulkOperation === true)\n && (\n op.variantType === ResourceOperationVariantType.API_CALL\n || op.variantType === ResourceOperationVariantType.API_CALL_WITH_CALLBACK\n )\n );\n if (matchingVariantOperations.length > 1) {\n const candidateVariants = matchingVariantOperations.map((operation) => ({\n variantType: operation.variantType,\n resourceOperationLike: operation.resourceOperationLike,\n }));\n this.logDebug('Ambiguous keyed operation path candidates', {\n resourceType,\n operationIdentifier,\n variantKey,\n candidateVariants,\n });\n throw this.errorBuilder.buildError(\n ErrorType.CONFIGURATION,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.RESOURCES_REGISTRY_REGISTRATION_FAILED,\n context: {\n message: 'Ambiguous keyed operation path candidates; callers must use an explicit operation path when multiple non-bulk variants share an operation identifier and variantKey',\n resourceType,\n operationIdentifier,\n variantKey,\n candidateVariants,\n }\n }\n );\n }\n const operation = matchingVariantOperations[0];\n\n if (!operation) {\n throw this.errorBuilder.buildError(\n ErrorType.INTERNAL,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.RESOURCES_REGISTRY_OPERATION_PATH_NOT_FOUND,\n context: { resourceType, operationIdentifier, variantKey }\n }\n );\n }\n return ResourcesConfig_OperationPathUtils.extractOperationPath(operation);\n }\n\n /**\n * Keyed sibling of {@link getServiceOperationPathDefault} — resolves a\n * specific NON-default variant by `variantKey` for the service-dispatch\n * layer, INTERNAL-preferred then URL-bearing fallback (same transport\n * rationale as {@link getServiceOperationPathDefault}: the service layer's\n * native transport is `INTERNAL_CALL`).\n *\n * Why this exists alongside {@link getOperationPath} (URL-only): the\n * service-dispatch layer (`ServicesRegistryHandlerBackendService`) resolves\n * keyed READ/LIST paths through this method so an `INTERNAL_CALL` resource\n * that declares a keyed non-default variant resolves instead of throwing\n * `RESOURCES_REGISTRY_OPERATION_PATH_NOT_FOUND`. URL-routing callers keep\n * using {@link getOperationPath} so they never receive a non-URL variant.\n *\n * A `variantKey` is unique within a transport group, so the `> 1` guard\n * below is a corrupted-registry backstop, not an expected path.\n */\n public getServiceOperationPath(resourceType: ResourceType, operationIdentifier: string, variantKey: string): ResourceConfiguration_OperationPath<any, any> {\n this.ensureInitialized();\n const registry = this.getResourcesRegistry();\n const resourceConfig = registry.resourceConfigurations[resourceType];\n const keyedOperationsOfVariantTypes = (variantTypes: readonly ResourceOperationVariantType[]) =>\n resourceConfig.operations.filter((op) =>\n op.operationIdentifier === operationIdentifier\n && op.variantKey === variantKey\n && op.isOperationDefault !== true\n && !('isBulkOperation' in op && op.isBulkOperation === true)\n && variantTypes.includes(op.variantType)\n );\n\n // Same transport-group vocabulary as the default resolver above — read from the shared\n // authority, not re-listed. This method answers the SERVICE-RESOLVABLE question (which\n // transports can the service-dispatch layer serve?), which is exactly what those sets define;\n // it is not the routable-over-HTTP question the controller/URL layer asks.\n const internalKeyed = keyedOperationsOfVariantTypes(SERVICE_NATIVE_OPERATION_VARIANT_TYPES);\n const urlKeyed = keyedOperationsOfVariantTypes(URL_BEARING_OPERATION_VARIANT_TYPES);\n\n if (internalKeyed.length > 1 || urlKeyed.length > 1) {\n const candidateVariants = [...internalKeyed, ...urlKeyed].map((operation) => ({\n variantType: operation.variantType,\n resourceOperationLike: operation.resourceOperationLike,\n }));\n this.logDebug('Corrupted registry: multiple keyed service operation paths within one transport group', {\n resourceType,\n operationIdentifier,\n variantKey,\n candidateVariants,\n });\n throw this.errorBuilder.buildError(\n ErrorType.CONFIGURATION,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.RESOURCES_REGISTRY_REGISTRATION_FAILED,\n context: {\n message: 'Corrupted registry: more than one keyed (non-bulk) operation for one (operationIdentifier, variantKey) within a single transport group.',\n resourceType,\n operationIdentifier,\n variantKey,\n candidateVariants,\n }\n }\n );\n }\n\n // INTERNAL_CALL is the service layer's native transport — prefer it,\n // then fall back to the URL-bearing keyed variant.\n const operation = internalKeyed[0] ?? urlKeyed[0];\n if (!operation) {\n throw this.errorBuilder.buildError(\n ErrorType.INTERNAL,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.RESOURCES_REGISTRY_OPERATION_PATH_NOT_FOUND,\n context: { resourceType, operationIdentifier, variantKey }\n }\n );\n }\n return ResourcesConfig_OperationPathUtils.extractOperationPath(operation);\n }\n\n /**\n * Non-throwing sibling of {@link getOperationFromPath}.\n *\n * Returns the single operation matching `operationPath`, or `undefined`\n * when none matches. It STILL throws on a `> 1` match — an ambiguous path\n * identity means a corrupted registry (duplicate operation identity), which\n * is never an expected \"absent\" case and must fail loudly for every caller.\n *\n * Use this when \"no such operation\" is a legitimate, caller-handled outcome\n * (e.g. a data-mode variant that a given operation does not declare — see\n * {@link getOperationForDataMode}). Use {@link getOperationFromPath} for the\n * assert-it-exists contract.\n */\n public findOperationFromPath( operationPath: ResourceConfiguration_OperationPath<any, any> ): ResourceConfiguration_Operation<any, any, any> | undefined {\n\n this.ensureInitialized();\n const registry = this.getResourcesRegistry();\n\n const resourceConfig = registry.resourceConfigurations[operationPath.resourceIdentifier];\n if (!resourceConfig) {\n return undefined;\n }\n\n const matchedOperations = resourceConfig.operations.filter((operation) => {\n if (operation.operationIdentifier !== operationPath.operationIdentifier) return false;\n if (operation.variantType !== operationPath.variantType) return false;\n\n // Match default/variant key\n if (operationPath.isOperationDefault) {\n if (operation.isOperationDefault !== true) return false;\n } else {\n const expectedVariantKey = operationPath.variantKey;\n const actualVariantKey = operation.variantKey;\n if ((actualVariantKey ?? undefined) !== (expectedVariantKey ?? undefined)) return false;\n }\n\n // For URL-bearing operations, also match bulk flag.\n if (\n operation.variantType === ResourceOperationVariantType.API_CALL\n || operation.variantType === ResourceOperationVariantType.API_CALL_WITH_CALLBACK\n ) {\n const opIsBulk = 'isBulkOperation' in operation && operation.isBulkOperation === true;\n const pathIsBulk = operationPath.isBulkOperation === true;\n return opIsBulk === pathIsBulk;\n }\n\n return true;\n });\n if (matchedOperations.length > 1) {\n const key = ResourcesConfig_OperationPathUtils.createOperationPathKey(operationPath);\n this.logDebug('Ambiguous operation path lookup candidates', {\n operationPathKey: key,\n resourceIdentifier: operationPath.resourceIdentifier,\n candidateCount: matchedOperations.length,\n });\n throw this.errorBuilder.buildError(\n ErrorType.CONFIGURATION,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.RESOURCES_REGISTRY_REGISTRATION_FAILED,\n context: {\n message: 'Operation path lookup matched multiple operations; operation path identity must be unique',\n operationPathKey: key,\n resourceIdentifier: operationPath.resourceIdentifier,\n operationIdentifier: operationPath.operationIdentifier,\n variantType: operationPath.variantType,\n isOperationDefault: operationPath.isOperationDefault,\n variantKey: operationPath.variantKey,\n isBulkOperation: operationPath.isBulkOperation,\n }\n }\n );\n }\n\n return matchedOperations[0] as ResourceConfiguration_Operation<any, any, any> | undefined;\n }\n\n public getOperationFromPath( operationPath: ResourceConfiguration_OperationPath<any, any> ): ResourceConfiguration_Operation<any, any, any> {\n const matchedOperation = this.findOperationFromPath(operationPath);\n\n if (!matchedOperation) {\n // As per requirement, assume it exists; if not, throw unified WildoError_Backend\n const key = ResourcesConfig_OperationPathUtils.createOperationPathKey(operationPath);\n throw this.errorBuilder.buildError(\n ErrorType.VALIDATION,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.RESOURCES_REGISTRY_REGISTRATION_FAILED,\n context: {\n // diagnostic (log-only)\n operationPathKey: key,\n resourceIdentifier: operationPath.resourceIdentifier,\n operationIdentifier: operationPath.operationIdentifier,\n variantType: operationPath.variantType,\n isOperationDefault: operationPath.isOperationDefault,\n variantKey: operationPath.variantKey,\n isBulkOperation: operationPath.isBulkOperation\n }\n }\n );\n }\n\n return matchedOperation;\n }\n\n /**\n * Resolve the operation to use for a request's `DataMode`, honoring the\n * collection-operation data-mode model. This is the single source of truth\n * shared by the controller (authorization-time variant resolution) and the\n * service handler (dispatch-time variant resolution).\n *\n * - RAW (or a data mode that maps to no variant key) → the base operation\n * as-authored.\n * - SUMMARY / CONTEXT → the distinct keyed auto-variant when the resource\n * declares one. The resource factory emits `summary`/`context`\n * auto-variants for READ and LIST operations.\n *\n * **SEARCH is summary by construction.** The factory derives a SEARCH\n * operation's response from the summary schema and intentionally does NOT\n * emit separate `summary`/`context` variants for SEARCH (the auto-variant\n * pass covers only READ and LIST). The base SEARCH operation already carries\n * `summaryDto`/`contextDto` — the controller's `selectResponseDto` picks the\n * right one — AND the SEARCH query enrichment (`searchQueryRequestSchema`,\n * `filterFields`, `sortFields`) that a stripped auto-variant would lack. So a\n * SUMMARY/CONTEXT request on a SEARCH-like operation resolves to the BASE\n * operation: it is the correct, complete operation to authorize, validate and\n * dispatch. Without this, the list preset's inline-search delegation — which\n * forwards its default `dataMode=SUMMARY` to the SEARCH operation — would\n * throw `RESOURCES_REGISTRY_REGISTRATION_FAILED`.\n *\n * For a non-SEARCH operation a missing data-mode variant is a genuine\n * misconfiguration (a READ/LIST whose auto-variant should exist but does\n * not), so it still fails fast via {@link getOperationFromPath}.\n */\n public getOperationForDataMode(\n baseOperation: ResourceConfiguration_Operation<any, any, any>,\n dataMode: DataMode | undefined,\n ): ResourceConfiguration_Operation<any, any, any> {\n const variantKey = dataMode ? dataModeToVariantKey(dataMode) : undefined;\n // RAW (or a data mode that maps to no variant key) keeps the base operation.\n if (!variantKey) {\n return baseOperation;\n }\n\n const variantPath: ResourceConfiguration_OperationPath<any, any> = {\n resourceIdentifier: baseOperation.resourceIdentifier,\n operationIdentifier: baseOperation.operationIdentifier,\n variantType: baseOperation.variantType,\n isOperationDefault: false,\n variantKey,\n isBulkOperation: false,\n };\n\n const variant = this.findOperationFromPath(variantPath);\n if (variant) {\n return variant;\n }\n\n const isSearchLike = baseOperation.operationIdentifier === CoreResourceOperation.SEARCH\n || baseOperation.resourceOperationLike === CoreResourceOperation.SEARCH;\n if (isSearchLike) {\n return baseOperation;\n }\n\n // Non-SEARCH operation with no matching data-mode variant: fail fast with\n // the canonical not-found error (re-uses getOperationFromPath so the error\n // body and backend actions stay identical to a direct lookup miss).\n return this.getOperationFromPath(variantPath);\n }\n\n public getRequestDtoFromPath(operationPath: ResourceConfiguration_OperationPath<any, any>) : z.ZodTypeAny {\n this.ensureInitialized();\n const operation = this.getOperationFromPath(operationPath);\n return operation.requestDto;\n }\n\n public getResponseDtoFromPath(operationPath: ResourceConfiguration_OperationPath<any, any>) : z.ZodTypeAny {\n this.ensureInitialized();\n const operation = this.getOperationFromPath(operationPath);\n return operation.responseDto;\n }\n\n public getMainSchemaFromPath(operationPath: ResourceConfiguration_OperationPath<any, any>) : z.ZodTypeAny {\n this.ensureInitialized();\n const operation = this.getOperationFromPath(operationPath);\n return operation.mainSchema;\n }\n\n public getDatabaseSchemaFromPath(operationPath: ResourceConfiguration_OperationPath<any, any>) : z.ZodTypeAny {\n this.ensureInitialized();\n const operation = this.getOperationFromPath(operationPath);\n // NOTE: databaseSchema was removed - mainSchema now contains all fields including backend-only\n return operation.mainSchema;\n }\n\n public getResourceConfiguration(resourceType: ResourceType): AnyResourceConfiguration {\n this.ensureInitialized();\n const config = this.registry!.resourceConfigurations[resourceType];\n if (!config) {\n throw this.errorBuilder.buildError(ErrorType.INTERNAL, undefined, {\n customMessageReference: ErrorCustomMessageReference.RESOURCES_REGISTRY_INITIALIZATION_FAILED,\n });\n }\n return config;\n }\n\n /**\n * Safe variant that returns undefined for unregistered resource types\n * instead of throwing. Use when the caller handles missing configs gracefully.\n */\n public tryGetResourceConfiguration(resourceType: ResourceType): AnyResourceConfiguration | undefined {\n this.ensureInitialized();\n return this.registry!.resourceConfigurations[resourceType];\n }\n\n // ================================\n // Initialization Utils\n // ================================\n\n protected ensureInitialized(): void {\n if (!this.isInitialized || !this.registry) {\n throw this.errorBuilder.buildError( ErrorType.INTERNAL, undefined, { customMessageReference: ErrorCustomMessageReference.RESOURCES_REGISTRY_INITIALIZATION_FAILED } );\n }\n }\n\n protected normalizeResourceConfigurationRelationships(\n allResourceConfigurations: { [key: string]: AnyResourceConfiguration },\n allResourceFieldIdentifiers: Record<string, string>\n ): void {\n for (const resourceConfig of Object.values(allResourceConfigurations)) {\n resourceConfig.resourceRelationships = {\n parentRelationships: (\n Resources_SharedUtils.ensureCompiledRelationships as (\n relationships: ResourceRelationship[],\n allResourceFieldIdentifiers?: Record<string, string>\n ) => ResourceRelationship[]\n ).call(Resources_SharedUtils, resourceConfig.resourceRelationships.parentRelationships, allResourceFieldIdentifiers),\n childRelationships: (\n Resources_SharedUtils.ensureCompiledRelationships as (\n relationships: ResourceRelationship[],\n allResourceFieldIdentifiers?: Record<string, string>\n ) => ResourceRelationship[]\n ).call(Resources_SharedUtils, resourceConfig.resourceRelationships.childRelationships, allResourceFieldIdentifiers),\n selfRelationships: (\n Resources_SharedUtils.ensureCompiledRelationships as (\n relationships: ResourceRelationship[],\n allResourceFieldIdentifiers?: Record<string, string>\n ) => ResourceRelationship[]\n ).call(Resources_SharedUtils, resourceConfig.resourceRelationships.selfRelationships, allResourceFieldIdentifiers),\n };\n }\n }\n\n /**\n * Refuse to start on an incoherent notification-badge declaration.\n *\n * ## What this catches, and why the runtime could not\n *\n * A badge write used to be addressed by a bare `identifier`, resolved against nothing. Two\n * declarations were therefore unfalsifiable:\n *\n * - an operation naming a badge NO definition declares — the write materialized a counter row\n * that no definition described and no screen could render, silently, forever;\n * - two definitions sharing one `(scope, identifier)` — every lookup answers the first, so the\n * second is unreachable while sharing the first's count.\n *\n * Neither produces an error at runtime. The write succeeds; the render finds nothing; nobody is\n * told. So the check belongs where the DECLARATION is, not where the write is, and it fails\n * CLOSED for the same reason the organization-unit narrowing containment above does: a\n * misconfiguration that only manifests as a missing number is one nobody chases.\n *\n * **What a misconfigured application experiences:** the backend does not come up. Startup throws\n * a `CONFIGURATION` error naming every violation — the resource and operation that declared the\n * unresolvable ref, or the duplicated key — beside the keys that ARE registered, so the author\n * reads the fix off the message rather than deriving it. A typo in a `badgeRef` is a refusal at\n * the moment it is authored instead of a badge that never appears in production.\n *\n * The enumeration is TOTAL over both populations rather than sampled: every registered\n * definition, and every `notificationBadgeOperations` entry on every operation of every resource\n * configuration — which is the merged core + application map, so an engine-declared badge is\n * checked on the same terms as an application-declared one.\n */\n protected validateNotificationBadgeDeclarations(\n notificationBadgeDefinitions: NotificationBadgeDefinition[],\n allResourceConfigurations: Record<string, AnyResourceConfiguration>,\n ): void {\n const operationSites: NotificationBadgeOperationDeclarationSite[] = [];\n for (const [resourceType, resourceConfiguration] of Object.entries(allResourceConfigurations)) {\n const operations = resourceConfiguration?.operations ?? {};\n for (const [operationIdentifier, operation] of Object.entries(operations)) {\n const badgeOperations = (operation as ResourceConfiguration_Operation<any, any, any> | undefined)?.notificationBadgeOperations ?? [];\n for (const badgeOperation of badgeOperations) {\n operationSites.push({ resourceType, operationIdentifier, badgeRef: badgeOperation.badgeRef });\n }\n }\n }\n\n const violations = collectNotificationBadgeDeclarationViolations(notificationBadgeDefinitions, operationSites);\n if (violations.length > 0) {\n this.logger.error('Notification badge declaration validation failed', { violations });\n throw this.errorBuilder.buildError(ErrorType.CONFIGURATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.CONFIGURATION,\n context: {\n message: 'Notification badge declarations are incoherent',\n reason: 'notification_badge_declaration_violation',\n violations,\n registeredBadgeKeys: notificationBadgeDefinitions.map(notificationBadgeIdentityKey),\n },\n });\n }\n\n this.logDebug(\n `Validated ${notificationBadgeDefinitions.length} notification badge definition(s) `\n + `and ${operationSites.length} operation badge reference(s)`,\n );\n }\n\n /**\n * Validate that all relationships can resolve their FK fields at startup.\n * This catches configuration errors early (e.g., missing resourceFieldIdentifier).\n */\n protected validateRelationshipForeignKeyFields(\n allResourceRelationships: ResourceRelationship[],\n allResourceFieldIdentifiers: Record<string, string>\n ): void {\n const errors: string[] = [];\n\n for (const relationship of allResourceRelationships) {\n // Skip disabled relationships\n if (relationship.isDisabled) continue;\n\n const resolved = Resources_SharedUtils.tryResolveRelationshipForeignKeyIdentity(\n relationship,\n allResourceFieldIdentifiers\n );\n if (!resolved) {\n errors.push(\n `Relationship ${relationship.resourceType1} → ${relationship.resourceType2}: ` +\n `No resourceFieldIdentifier registered for ${relationship.resourceType1}. ` +\n `Either add it to the resourceFieldIdentifiers map or specify foreignKeyField explicitly.`\n );\n }\n }\n\n if (errors.length > 0) {\n this.logger.error('FK field validation failed for relationships:', { errors });\n throw this.errorBuilder.buildError(\n ErrorType.CONFIGURATION,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.RESOURCES_REGISTRY_RELATIONSHIP_VALIDATION_FAILED,\n context: { errors }\n }\n );\n }\n\n this.logDebug(`Validated FK field resolution for ${allResourceRelationships.length} relationships`);\n }\n\n /**\n * Validate the relationship graph for cycles at startup (fail-fast).\n *\n * Builds a directed graph from all relationships (resourceType1 → resourceType2)\n * and runs DFS-based cycle detection. Self-loops (resourceType1 === resourceType2)\n * and transitive cycles (A → B → C → A) are both detected.\n *\n * When a cycle is found, every edge in the cycle must have `allowCycle: true`.\n * If any edge lacks the flag, a configuration error is thrown listing the cycle path.\n *\n * Performance: O(V + E) where V = distinct resource types, E = relationship count.\n * Typical: V ≈ 50, E ≈ 80. Runs once at startup — negligible cost.\n */\n protected validateRelationshipGraph(allResourceRelationships: ResourceRelationship[]): void {\n // Build adjacency list with edge metadata\n const adjacency = new Map<string, Array<{ target: string; allowCycle: boolean; rel: ResourceRelationship }>>();\n const allNodes = new Set<string>();\n\n for (const rel of allResourceRelationships) {\n if (rel.isDisabled) continue;\n\n allNodes.add(rel.resourceType1);\n allNodes.add(rel.resourceType2);\n\n if (!adjacency.has(rel.resourceType1)) {\n adjacency.set(rel.resourceType1, []);\n }\n adjacency.get(rel.resourceType1)!.push({\n target: rel.resourceType2,\n allowCycle: rel.allowCycle || false,\n rel,\n });\n }\n\n // DFS cycle detection with path tracking\n // States: WHITE (unvisited), GRAY (in current DFS path), BLACK (fully processed)\n const WHITE = 0, GRAY = 1, BLACK = 2;\n const color = new Map<string, number>();\n for (const node of allNodes) color.set(node, WHITE);\n\n // Track the current DFS path for cycle reconstruction\n const path: string[] = [];\n const errors: string[] = [];\n\n const dfs = (node: string): void => {\n color.set(node, GRAY);\n path.push(node);\n\n const edges = adjacency.get(node) || [];\n for (const edge of edges) {\n const targetColor = color.get(edge.target);\n\n if (targetColor === GRAY) {\n // Cycle found — extract the cycle from path\n const cycleStart = path.indexOf(edge.target);\n const cyclePath = [...path.slice(cycleStart), edge.target];\n\n // Check if ALL edges in the cycle have allowCycle: true\n const cycleEdges: Array<{ from: string; to: string; allowCycle: boolean }> = [];\n for (let i = 0; i < cyclePath.length - 1; i++) {\n const from = cyclePath[i];\n const to = cyclePath[i + 1];\n const edgeData = adjacency.get(from)?.find(e => e.target === to);\n cycleEdges.push({\n from,\n to,\n allowCycle: edgeData?.allowCycle || false,\n });\n }\n\n const allAllowed = cycleEdges.every(e => e.allowCycle);\n if (!allAllowed) {\n const missingFlags = cycleEdges\n .filter(e => !e.allowCycle)\n .map(e => `${e.from} → ${e.to}`);\n errors.push(\n `Cycle detected: ${cyclePath.join(' → ')}. ` +\n `Edges missing allowCycle: [${missingFlags.join(', ')}]. ` +\n `Set allowCycle: true on all edges in the cycle to allow it.`\n );\n } else {\n this.logDebug(`Allowed cycle detected: ${cyclePath.join(' → ')} (all edges have allowCycle: true)`);\n }\n } else if (targetColor === WHITE) {\n dfs(edge.target);\n }\n // BLACK: already fully processed, skip\n }\n\n path.pop();\n color.set(node, BLACK);\n };\n\n for (const node of allNodes) {\n if (color.get(node) === WHITE) {\n dfs(node);\n }\n }\n\n if (errors.length > 0) {\n this.logger.error('Relationship graph cycle validation failed:', { errors });\n throw this.errorBuilder.buildError(\n ErrorType.CONFIGURATION,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.RESOURCES_REGISTRY_RELATIONSHIP_VALIDATION_FAILED,\n context: {\n message: 'Unauthorized cycles detected in the relationship graph',\n errors,\n }\n }\n );\n }\n\n this.logDebug(`Validated relationship graph: ${allNodes.size} nodes, ${allResourceRelationships.length} edges, no unauthorized cycles`);\n }\n\n /**\n * Boot-time coherence guard: every resource config that stores in the SAME\n * collection must declare the SAME retention posture.\n *\n * ## Why this cannot live where the rest of retention validation lives\n *\n * `retentionPolicy` is validated by the resource-config FACTORY, which sees\n * exactly one config per invocation. The relationship this guard checks is\n * between SIBLING configs, and it is only knowable here — at registry\n * assembly, the first moment the whole config set exists in one place. The\n * `USERS` retention opt-in shipped with the sibling (`USER_SELF`) opted in\n * by hand, on the strength of a review catching it; nothing enforced it, so\n * the next author to add a collection alias could reintroduce the hole\n * silently.\n *\n * The invariant, both failure modes it prevents (fail-open erasure through\n * the ungoverned door; E11000 on the second erasure from a plain unique\n * index beside a retention-scoped one) and the shared alias map itself live\n * in `@wildo-ai/saas-models` — see\n * `findSharedPersistenceCollectionRetentionIncoherences`. This method owns\n * only the registry's error shape, so the fact and its invariant stay in the\n * one layer both the persistence path and this validation can import.\n *\n * Fails CLOSED (throws): a registry in this state cannot perform a lawful\n * erasure, and a warning would be discovered by an auditor rather than by a\n * developer.\n */\n protected validateSharedCollectionRetentionCoherence(\n allResourceConfigurations: { [key: string]: AnyResourceConfiguration }\n ): void {\n const incoherences = findSharedPersistenceCollectionRetentionIncoherences(allResourceConfigurations);\n\n if (incoherences.length === 0) {\n return;\n }\n\n const errors = incoherences.map((incoherence) => incoherence.message);\n this.logger.error('Shared-collection retention coherence validation failed:', { errors });\n throw this.errorBuilder.buildError(\n ErrorType.CONFIGURATION,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.RESOURCES_REGISTRY_INITIALIZATION_FAILED,\n context: {\n reason: 'shared_collection_retention_incoherence',\n errors,\n collections: incoherences.map((incoherence) => incoherence.collectionName),\n },\n },\n );\n }\n\n /**\n * Validate that all resources using PostgreSQL have it enabled in app config.\n * This catches configuration mismatches early at startup.\n *\n * Checks:\n * - Resources with persistenceAdapter: 'postgresql' require postgresql.enabled = true\n * - Warns if defaultAdapter is 'postgresql' but it's not enabled\n *\n * NOTE: In platform mode, AppConfigurationService may not be initialized yet\n * (platform apps initialize config later in the startup sequence).\n * In this case, we skip validation and rely on defaults.\n */\n protected validatePersistenceAdapterConfiguration(\n allResourceConfigurations: { [key: string]: AnyResourceConfiguration },\n options?: {\n /**\n * Platform-mode ONLY (owner decision, migrations plan 5.3 item (iv)): a DECLARED\n * adapter differing from the default is logged-and-named instead of refused, because\n * the platform's bootstrap-store plane is deliberately Mongo through the D7/D8\n * transition. Every OTHER check in this validator still fails closed. Applications\n * never pass this — the one-adapter rule is absolute for them.\n */\n toleratesDeclaredMixedAdapters?: boolean;\n },\n ): void {\n const authoredAdapterErrors = Object.entries(allResourceConfigurations)\n .flatMap(([resourceType, resourceConfig]) => {\n const adapter = (resourceConfig as { persistenceAdapter?: unknown })\n .persistenceAdapter;\n return adapter === undefined || isPersistenceAdapter(adapter)\n ? []\n : [\n `Resource '${resourceType}' declares unsupported persistenceAdapter `\n + `'${String(adapter)}'. Supported adapters: `\n + Object.values(PersistenceAdapter).join(', '),\n ];\n });\n\n if (authoredAdapterErrors.length > 0) {\n this.logger.error(\n 'Persistence adapter configuration validation failed:',\n { errors: authoredAdapterErrors },\n );\n throw this.errorBuilder.buildError(\n ErrorType.CONFIGURATION,\n undefined,\n {\n customMessageReference:\n ErrorCustomMessageReference.RESOURCES_REGISTRY_INITIALIZATION_FAILED,\n context: {\n reason: 'unsupported_persistence_adapter',\n errors: authoredAdapterErrors,\n },\n },\n );\n }\n\n // Skip validation if config service is not initialized (platform mode)\n // Platform apps initialize AppConfigurationService after resources registry.\n // Optional chaining: partial/test containers without isInitialized are treated as not ready.\n if (this.configService?.isInitialized?.() !== true) {\n this.logger.warn('Skipping persistence adapter validation - config service not yet initialized (platform mode)');\n return;\n }\n\n const errors: string[] = [];\n const warnings: string[] = [];\n\n // Get database configuration\n const config = this.configService.config;\n const databaseConfig = (config as any)?.database;\n // The RAW authored value is inspected first (an unsupported string must be reported, which\n // the seam's fallback would silently swallow); the RESOLVED default below comes from the\n // one derivation seam so this tier can never disagree with repository construction about\n // what \"no declaration\" means (review round 3, F3).\n const authoredDefaultAdapter: unknown = databaseConfig?.defaultAdapter\n ?? resolveDefaultPersistenceAdapter(this.configService);\n const postgresqlEnabled = databaseConfig?.postgresql?.enabled ?? false;\n /**\n * `?? true`, deliberately NOT symmetric with PostgreSQL above — and the asymmetry is load-bearing.\n *\n * Flipping this to `?? false` alongside the loader change looked obviously right and broke\n * `platform-crontabs-batches-manager` into a crash loop on 2026-08-28. That service does not\n * build its config through `AppConfigurationLoaderBackendService`: it bridges platform config,\n * whose `defaultAdapter` still reads `mongodb` while the runtime separately overrides the\n * resolved adapter via `setPlatformModeDefaultPersistenceAdapter`. With no `database.mongodb`\n * branch and `?? false`, this gate rejected all 95 platform resources at boot.\n *\n * So absence means \"no branch was built\", NOT \"no MongoDB\" — those coincide only on the\n * application-loader path. This validation runs for BOTH, and the platform path has no\n * equivalent signal to read. Anything that needs the honest question (\"does this runtime have\n * a MongoDB?\") must ask it where the answer is knowable — see\n * `HealthControllerBackendService.runtimeDependsOnMongoDb`, which keys on the branch's\n * PRESENCE and is only ever consulted on the application path.\n */\n const mongodbEnabled = databaseConfig?.mongodb?.enabled ?? true;\n\n if (!isPersistenceAdapter(authoredDefaultAdapter)) {\n errors.push(\n `Database defaultAdapter '${String(authoredDefaultAdapter)}' is unsupported. `\n + `Supported adapters: ${Object.values(PersistenceAdapter).join(', ')}`,\n );\n }\n const defaultAdapter: PersistenceAdapterType = isPersistenceAdapter(\n authoredDefaultAdapter,\n )\n ? authoredDefaultAdapter\n : DEFAULT_PERSISTENCE_ADAPTER;\n\n // Check if default adapter is valid. Exhaustive over the enum so a new adapter member\n // cannot skip enablement validation entirely (the old per-member `if`s simply never fired\n // for a member they did not name). Severities preserved: a disabled-PostgreSQL default is\n // a warning, a disabled-MongoDB default is an error.\n selectByPersistenceAdapter(defaultAdapter, {\n [PersistenceAdapter.POSTGRESQL]: () => {\n if (!postgresqlEnabled) {\n warnings.push(\n `Default persistence adapter is 'postgresql' but PostgreSQL is not enabled in database config. ` +\n `Set database.postgresql.enabled = true or change defaultAdapter to 'mongodb'.`\n );\n }\n },\n [PersistenceAdapter.MONGODB]: () => {\n if (!mongodbEnabled) {\n errors.push(\n `Default persistence adapter is 'mongodb' but MongoDB is not enabled in database config. ` +\n `Set database.mongodb.enabled = true or change defaultAdapter to 'postgresql'.`\n );\n }\n },\n [PersistenceAdapter.INTROSPECTION]: () => {\n // Never a legal application-wide default, and the consequence is starker than\n // HTTP_API's: an application defaulting to introspection could PERSIST NOTHING —\n // every undeclared resource would be a read-only projection of the app's own source.\n errors.push(\n `Default persistence adapter is 'introspection', which cannot be an application-wide default. ` +\n `INTROSPECTION is a per-resource declaration for rows derived from the application itself; set defaultAdapter to 'mongodb' or 'postgresql'.`\n );\n },\n [PersistenceAdapter.HTTP_API]: () => {\n // Never a legal application-wide default: an HTTP_API resource is a PER-RESOURCE\n // declaration accompanied by its binding; defaulting every undeclared resource to\n // a remote API would mean rows that live nowhere (see the enum member's JSDoc).\n errors.push(\n `Default persistence adapter is 'http-api', which cannot be an application-wide default. ` +\n `HTTP_API is a per-resource declaration carrying its own binding; set defaultAdapter to 'mongodb' or 'postgresql'.`\n );\n },\n })();\n\n // Check each resource's persistence adapter\n for (const [resourceType, resourceConfig] of Object.entries(allResourceConfigurations)) {\n const adapter: PersistenceAdapterType = (resourceConfig as any).persistenceAdapter ?? defaultAdapter;\n\n // Defense-in-depth, currently unreachable: `authoredAdapterErrors` above already\n // THROWS for any invalid declared adapter before this loop runs, and `defaultAdapter`\n // is pre-sanitized. Kept so that if that early throw is ever softened, this routine\n // keeps its aggregate-findings contract (push + continue) instead of letting the\n // exhaustive select below throw mid-collection and hide every later resource's\n // finding. (`createRepository` also refuses the same resource at boot.)\n if (!isPersistenceAdapter(adapter)) {\n errors.push(\n `Resource '${resourceType}' declares unsupported persistenceAdapter '${String(adapter)}'. `\n + `Supported adapters: ${Object.values(PersistenceAdapter).join(', ')}`,\n );\n continue;\n }\n\n // Exhaustive per-resource enablement check — same reasoning as the default-adapter\n // check above: a member the old `if`s did not name was simply never validated.\n selectByPersistenceAdapter(adapter, {\n [PersistenceAdapter.POSTGRESQL]: () => {\n if (!postgresqlEnabled) {\n errors.push(\n `Resource '${resourceType}' requires PostgreSQL (persistenceAdapter: 'postgresql') ` +\n `but PostgreSQL is not enabled in database config. ` +\n `Either set database.postgresql.enabled = true or remove the persistenceAdapter override.`\n );\n }\n },\n [PersistenceAdapter.MONGODB]: () => {\n if (!mongodbEnabled) {\n errors.push(\n `Resource '${resourceType}' requires MongoDB (persistenceAdapter: 'mongodb') ` +\n `but MongoDB is not enabled in database config. ` +\n `Either set database.mongodb.enabled = true or change the persistenceAdapter.`\n );\n }\n },\n [PersistenceAdapter.INTROSPECTION]: () => {\n // Fail-closed at BOOT, same reasoning as the HTTP_API arm below: a posture with\n // no faithful answer must be refused where the resource is REGISTERED, not where\n // it is queried — a query-time refusal is one missed branch away from serving\n // something wrong.\n const config = resourceConfig as Record<string, any>;\n\n /*\n * TENANCY. Every other backing kind enforces scoping itself — Mongo and\n * PostgreSQL through `buildContextualFilter`, HTTP_API through its own stance —\n * so an introspected resource that simply returned what its behavior produced\n * would be the one adapter with no scoping story at all.\n *\n * `SCOPE_FILTER_PUSHDOWN` is refused HERE rather than at query time because no\n * introspection behavior takes a scope argument: the engine has nothing to push\n * down, and a resource that registered on the promise of scoping would serve\n * unscoped rows on its first read.\n */\n const tenancy = config.introspectionBinding?.tenancy;\n if (tenancy === IntrospectionTenancyStance.SCOPE_FILTER_PUSHDOWN) {\n errors.push(\n `Resource '${resourceType}' declares introspection tenancy 'scope-filter-pushdown', which is not implemented: no introspection behavior accepts a scope argument, so the engine has nothing to push down and the rows would be served unscoped. Declare 'application-structure' (source-derived rows) or 'application-runtime' (companion runtime projections) if the rows carry no tenant dimension, or do not back this resource with introspection.`\n );\n }\n if (config.retentionPolicy) {\n errors.push(\n `Resource '${resourceType}' is INTROSPECTION-backed and declares 'retentionPolicy' — nothing is stored, so there is nothing to retain or purge; remove the policy.`\n );\n }\n if (config.ragSource) {\n errors.push(\n `Resource '${resourceType}' is INTROSPECTION-backed and declares 'ragSource' — chunks would have no store to live in and no erasure path to reach them; remove it.`\n );\n }\n },\n [PersistenceAdapter.HTTP_API]: () => {\n // ETL Step 3 registration checks (papers A/B). Each is a FAIL-CLOSED\n // aggregate finding: these postures have no faithful remote translation, so a\n // resource declaring them must be refused at BOOT, not at query time (a\n // query-time refusal is a data leak one missed branch away — plan D8).\n const config = resourceConfig as Record<string, any>;\n if (!config.httpApiBinding) {\n // The shared factory enforces this at authoring; backstop for hand-built configs.\n errors.push(\n `Resource '${resourceType}' declares persistenceAdapter 'http-api' with no 'httpApiBinding' declaration.`\n );\n return;\n }\n if (config.retentionPolicy) {\n errors.push(\n `Resource '${resourceType}' is HTTP_API-backed and declares 'retentionPolicy' — the platform cannot retention-govern rows it does not own; remove the policy (erasure is governed by the binding's erasure stance instead).`\n );\n }\n if (config.isAnonymizable === true) {\n errors.push(\n `Resource '${resourceType}' is HTTP_API-backed and declares 'isAnonymizable' — the anonymous null-or-absent confinement has no faithful remote translation (ETL paper B).`\n );\n }\n // D6 coherence B3: NO_SUBJECT_DATA is the declaration \"these remote rows hold\n // no personal data\" — a resource carrying it cannot simultaneously PARTICIPATE\n // in a data-subject export (exportSubject: ALLOWED claims the opposite). The\n // reverse pairings are fine: a 6b/6c resource may still exclude itself from\n // export for reasons of its own.\n const erasureStance = (config.httpApiBinding as Record<string, any>).erasure?.stance;\n if (\n erasureStance === HttpApiErasureStance.NO_SUBJECT_DATA\n && config.systemAccessPolicy?.exportSubject === ResourceSystemAccessMode.ALLOWED\n ) {\n errors.push(\n `Resource '${resourceType}' is HTTP_API-backed with erasure stance NO_SUBJECT_DATA yet declares 'exportSubject: ALLOWED' — a subject-export participant claims the rows ARE subject data, contradicting the stance (ETL D6). Pick one: drop the export participation, or declare the stance that matches the data.`\n );\n }\n // D6 coherence B4: stance 6b's `subjectLinkLocalField` must be a DECLARED\n // relationship FK on this resource — that relationship is how the erasure\n // knows WHICH subject type the field names (declared, never inferred: the\n // dataSubjectPolicy doctrine).\n if (erasureStance === HttpApiErasureStance.EXTERNAL_ERASURE_OPERATION) {\n const subjectLinkLocalField = (config.httpApiBinding as Record<string, any>).erasure?.subjectLinkLocalField as string | undefined;\n const relationshipBuckets = config.resourceRelationships as Record<string, Array<Record<string, any>>> | undefined;\n const ownRelationships = [\n ...(relationshipBuckets?.parentRelationships ?? []),\n ...(relationshipBuckets?.childRelationships ?? []),\n ...(relationshipBuckets?.selfRelationships ?? []),\n ];\n const declaredAsOwnFk = ownRelationships.some((relationship) =>\n relationship.resourceType2 === resourceType\n && relationship.foreignKeyField === subjectLinkLocalField\n && relationship.isDisabled !== true,\n );\n if (!declaredAsOwnFk) {\n errors.push(\n `Resource '${resourceType}' is HTTP_API-backed with erasure stance EXTERNAL_ERASURE_OPERATION, but its 'subjectLinkLocalField' ('${String(subjectLinkLocalField)}') is not the foreign key of any enabled relationship holding this resource as its FK side — without that relationship the erasure cannot know which SUBJECT type the field names (ETL D6, B4).`\n );\n }\n }\n /**\n * G-F1 (ETL partial-resource-coverage paper, P-0): a FILE field on an\n * HTTP_API-backed resource is refused at boot. Files are LOCAL machinery by\n * construction — the `{fileId, updatedAt}` linkage lives ON the resource row,\n * and the upload/link flows WRITE that row — so on a read-only read-through\n * resource the linkage write would be refused MID-FLIGHT, after the file row\n * already exists: a half-landed upload, discovered by the first user to try.\n * Refusing at boot names the designed path instead: file fields belong on a\n * SYNCED-mode (locally materialized) resource — the industry's own split:\n * Dataverse likewise refuses file/attachment types on virtual tables\n * (`.claude/plans/etl-partial-resource-coverage.md`, v2 model).\n */\n {\n const fileFieldPaths: string[] = [];\n const collectFileFieldPathsRecursively = (schema: unknown, pathPrefix: string, depth: number): void => {\n if (depth > 6 || !schema) return;\n const unwrapped = unwrapSchema(schema as never);\n if (!isZodObject(unwrapped)) return;\n for (const [fieldName, fieldSchema] of Object.entries(getZodObjectShape(unwrapped))) {\n const fieldPath = pathPrefix ? `${pathPrefix}.${fieldName}` : fieldName;\n if (isFileSchema(fieldSchema as never)) {\n fileFieldPaths.push(fieldPath);\n continue;\n }\n collectFileFieldPathsRecursively(fieldSchema, fieldPath, depth + 1);\n }\n };\n collectFileFieldPathsRecursively(config.mainSchema, '', 0);\n if (fileFieldPaths.length > 0) {\n errors.push(\n `Resource '${resourceType}' is HTTP_API-backed and declares FILE field(s) [${fileFieldPaths.join(', ')}] — files are local machinery (FILES rows + storage + the fileId linkage written onto the resource row), and a read-through resource refuses that write mid-upload. Remove the file field(s); file fields belong on a SYNCED-mode locally-materialized resource when partial-resource coverage lands (ETL partial-resource-coverage paper, G-F1).`\n );\n }\n }\n const bindingDialect = (config.httpApiBinding as Record<string, any>).dialect;\n for (const operation of (config.operations ?? []) as Array<Record<string, any>>) {\n const isCollectionRead = operation.operationIdentifier === CoreResourceOperation.LIST\n || operation.operationIdentifier === CoreResourceOperation.SEARCH;\n if (!isCollectionRead) continue;\n const sortFields = operation.sortFields as readonly string[] | undefined;\n // ODATA + ODOO_JSONRPC (both have a generic sort translation — `$orderby`\n // / the `order` kwarg): the adapter refuses any UNDECLARED sort key at\n // translation, so the declaration is what makes sorting reachable at all.\n // REST_JSON has NO sort translation in slice 1 (the compiler refuses every\n // sort), so demanding sortFields there would mandate an always-failing\n // surface — those bindings serve the target's natural order and must\n // declare NO sortFields instead.\n const dialectTranslatesSort = bindingDialect === HttpApiTransportDialect.ODATA\n || bindingDialect === HttpApiTransportDialect.ODOO_JSONRPC;\n if (dialectTranslatesSort && (!sortFields || sortFields.length === 0)) {\n errors.push(\n `Resource '${resourceType}' (HTTP_API/${bindingDialect}) operation '${operation.operationIdentifier}' declares no 'sortFields' — the adapter refuses undeclared sort keys, so without a declaration no sort can ever reach the remote dialect (ETL paper B, T6).`\n );\n }\n if (bindingDialect === HttpApiTransportDialect.REST_JSON && sortFields && sortFields.length > 0) {\n errors.push(\n `Resource '${resourceType}' (HTTP_API/REST_JSON) operation '${operation.operationIdentifier}' declares 'sortFields', but REST_JSON has no sort translation in slice 1 — every advertised sort would fail at runtime. Remove them (the binding serves the target's natural order).`\n );\n }\n const searchableFields = operation.searchableFields as readonly unknown[] | undefined;\n if (searchableFields?.some((entry) => typeof entry !== 'string')) {\n errors.push(\n `Resource '${resourceType}' (HTTP_API) operation '${operation.operationIdentifier}' declares RELATIONAL searchable descriptors — relational search has no remote translation and is refused (ETL paper B, R3). Declare own-field searchableFields only.`\n );\n }\n }\n },\n })();\n\n /**\n * The scope-feature-ledger refusal that stood here is GONE, and the cause is fixed\n * rather than tolerated.\n *\n * It refused PostgreSQL for `applicationFeatures` / `organizationFeatures` /\n * `userFeatures` because their singleton writes need `upsertByFilter` conflict\n * semantics that only MongoDB had. The real blocker was one layer down: those ledgers\n * declare no scope FK — it is relationship-injected — so the SQL planner never planned\n * the column, and without it there was no `ON CONFLICT` target to arbitrate on. The\n * planner now plans injected FKs and marks a 1:1 relationship's FK unique, and\n * `upsertByFilter` is implemented against that constraint.\n *\n * Residual, stated because removing a guard should name what it stops covering: the\n * unique constraint is recorded in the PLAN, and the plan is what a migration is built\n * from — but nothing here verifies the deployed DDL actually carries it. A table\n * provisioned from an older migration will fail at the upsert with PostgreSQL's own\n * constraint error rather than at boot.\n */\n }\n\n /**\n * ONE ADAPTER PER APPLICATION — the model this workstream converged on.\n *\n * An application is wholly PostgreSQL or wholly MongoDB. The platform back-office may\n * differ; it is a separate deployment with its own lifecycle, which is a real bounded\n * context rather than a loophole.\n *\n * Enforced by refusing a per-resource `persistenceAdapter` that DISAGREES with the\n * application default, which is the only way a mixed configuration can now arise (no engine\n * resource pins an adapter any more — FILES was the last, and it now follows the default).\n *\n * Why refuse rather than tolerate: a mixed application cannot commit a row and its file\n * metadata in one native transaction, so every cross-resource boundary silently degrades\n * from atomic to at-least-once. That is exactly the class of failure the persistence unit of\n * work exists to make VISIBLE, and a configuration that produces it BY ACCIDENT should not\n * boot.\n *\n * \"By accident\" is the operative word, and it is what the default protects against rather\n * than the mixing itself. Two doors exist past it, both explicit and both named:\n * 1. a per-resource `persistenceAdapterIsolation` declaration (see the door below), by\n * which a resource author claims the resource takes part in no cross-adapter atomic\n * write;\n * 2. `options.toleratesDeclaredMixedAdapters`, the platform's sanctioned dual-store\n * transition (see further below).\n * Neither weakens the runtime guarantee; both make the mixed set visible in the log.\n *\n * assurance-control: WILDO.DATA.TRANSACTIONAL_INTEGRITY — refuses a configuration whose\n * cross-resource writes could not be atomic.\n */\n /**\n * THE DOOR (`.claude/rules/design-philosophy.md` — \"a construct that refuses must ship the\n * mutation path in the same change\").\n *\n * The blanket refusal above is right as a DEFAULT and wrong as an absolute: some resources\n * provably never take part in a cross-adapter atomic write, and for those the refusal\n * forbade a legitimate deployment with no way past it. A resource may now disagree with the\n * application default when — and ONLY when — its author declares\n * `persistenceAdapterIsolation`, a named claim about the resource's write topology.\n *\n * This weakens no runtime guarantee, and that is the whole basis for admitting it. The\n * property the refusal protects is still enforced where it is REAL:\n * `ResourcePersistenceUnitOfWorkBackendService.assessCompatibility` classifies any boundary\n * whose ATOMIC participants resolve to more than one adapter as\n * `MIXED_PERSISTENCE_ADAPTERS` (never `compatible`), and `executeInUnitOfWork` THROWS on it\n * before any work runs. So a resource that declares isolation and is nevertheless reached by\n * a cross-adapter atomic boundary fails loudly at that boundary. The declaration buys the\n * right to BOOT; it can never buy a silent atomic→at-least-once degradation.\n *\n * Tolerated ⇒ NAMED, as with the platform's dual-store transition below: every admitted\n * resource is logged with the member it declared, so a mixed state is never ambient.\n */\n const undeclaredMixedAdapterResourceTypes: string[] = [];\n const isolationDeclaredResourceTypes: string[] = [];\n\n for (const [resourceType, resourceConfig] of Object.entries(allResourceConfigurations)) {\n const declaredAdapter = (resourceConfig as any).persistenceAdapter;\n if (declaredAdapter === undefined || declaredAdapter === defaultAdapter) {\n continue;\n }\n\n /**\n * NON-TRANSACTIONAL adapters are EXEMPT from the one-adapter rule, and the exemption\n * preserves the property the rule protects rather than weakening it.\n *\n * The rule refuses a second PLATFORM store because a mixed application silently degrades\n * cross-resource atomicity. An `HTTP_API` or `INTROSPECTION` declaration is not a second\n * platform store: neither can be the application default (each has its own validation arm\n * refusing that), neither owns a transaction (the persistence unit of work fail-closes on\n * both with DATABASE_SERVICE_UNAVAILABLE), and both refuse every write. There is nothing\n * atomic left to degrade silently — the degradation this rule exists to make visible is\n * already an explicit runtime refusal on these adapters.\n *\n * Without the exemption, \"per-resource declaration, never a default\" and the one-adapter\n * rule are JOINTLY UNSATISFIABLE and no such resource could ever register. That is not\n * hypothetical: it is exactly how the first INTROSPECTION resource crash-looped the\n * companion on 2026-08-29.\n *\n * ORDERED BEFORE the isolation door below, deliberately: such a resource is admitted on\n * the ADAPTER'S OWN NATURE, never on a claim its author had to make. Inverting the two\n * would let an authored declaration decide something the adapter already settles.\n *\n * ## Why `selectByPersistenceAdapter` and not `=== HTTP_API || === INTROSPECTION`\n *\n * The previous form was a bare equality test, so `PersistenceAdapterCases` — the seam\n * that makes a new enum member a COMPILE error at every adapter decision — could not see\n * this site. Adding `INTROSPECTION` typechecked everywhere and then refused to boot. A\n * second MECHANISM for the same invariant is the failure shape\n * `invariant-call-site-enumeration.md` #12 records; routing through the exhaustive helper\n * puts this decision back under that guarantee, so the NEXT member must answer here too.\n */\n const ownsNoTransaction = selectByPersistenceAdapter<boolean>(declaredAdapter, {\n [PersistenceAdapter.MONGODB]: false,\n [PersistenceAdapter.POSTGRESQL]: false,\n [PersistenceAdapter.HTTP_API]: true,\n [PersistenceAdapter.INTROSPECTION]: true,\n });\n if (ownsNoTransaction) {\n continue;\n }\n const declaredIsolation = (resourceConfig as any).persistenceAdapterIsolation;\n if (isResourcePersistenceAdapterIsolation(declaredIsolation)) {\n isolationDeclaredResourceTypes.push(\n `${resourceType} (on '${declaredAdapter}', declares '${declaredIsolation}')`,\n );\n } else {\n undeclaredMixedAdapterResourceTypes.push(`${resourceType} (declares '${declaredAdapter}')`);\n }\n }\n\n if (isolationDeclaredResourceTypes.length > 0) {\n this.logger.warn(\n `Mixed persistence adapters ADMITTED by explicit per-resource isolation declaration: `\n + `the application default is '${defaultAdapter}', and these resources declared a different `\n + `adapter together with a persistenceAdapterIsolation claim: `\n + `${isolationDeclaredResourceTypes.join(', ')}. `\n + `Cross-adapter atomic boundaries remain refused at runtime by the persistence unit of work.`,\n );\n }\n\n const mixedAdapterResourceTypes = undeclaredMixedAdapterResourceTypes;\n\n if (mixedAdapterResourceTypes.length > 0) {\n if (options?.toleratesDeclaredMixedAdapters === true) {\n /**\n * THE PLATFORM'S DUAL-STORE TRANSITION (owner decision, migrations plan 5.3\n * item (iv)). The platform back-office is the bounded context the block comment\n * above already carves out: its BOOTSTRAP-STORE plane declares MongoDB on purpose\n * (INIT + the infra-manager's raw writers are Mongo-wired) while the platform\n * default moves to PostgreSQL. Refusing here would refuse the sanctioned\n * transition itself; the property this rule protects — no silent atomic→\n * at-least-once degradation — is still enforced where it is REAL, by the\n * persistence unit of work refusing any actual mixed-adapter transaction\n * boundary at runtime. Tolerated ⇒ NAMED: the declared set is logged so a\n * mixed state can never be ambient.\n */\n this.logger.warn(\n `Mixed persistence adapters TOLERATED (platform dual-store transition): default is `\n + `'${defaultAdapter}', declared differently by: ${mixedAdapterResourceTypes.join(', ')}. `\n + `Cross-adapter atomic boundaries are refused at runtime by the persistence unit of work.`,\n );\n } else {\n errors.push(\n `An application must use ONE persistence adapter. `\n + `The application default is '${defaultAdapter}', but these resources declare a different one: `\n + `${mixedAdapterResourceTypes.join(', ')}. `\n + `Remove the per-resource persistenceAdapter override, or change database.defaultAdapter to match. `\n + `Mixed adapters cannot share a native transaction, so cross-resource writes would silently `\n + `degrade from atomic to at-least-once.`\n );\n }\n }\n\n /**\n * G1 fail-closed sweep (ETL paper A, gate G1): a MONGODB-backed resource holding an FK to\n * an HTTP_API-backed resource cannot store the synthesized id — the Mongoose converter\n * physically types every `isForeignKey` column as a BSON ObjectId\n * (`zod-to-mongoose-schema-convertor.backend.service.ts:1417`). Until the converter learns\n * to emit a String column for HTTP_API targets (recorded Step 3 residual), such a\n * relationship is REFUSED at boot rather than silently persisting ids that cannot fit.\n * Cross-resource by nature, so it runs here, after the per-resource loop (the same\n * structural argument as the shared-collection check below). PostgreSQL FK columns are\n * text and need no refusal; an HTTP_API↔HTTP_API relationship is refused too — FK\n * synthesis-on-read is not yet declared on the binding (paper A, FK case 2).\n */\n {\n const resolveAdapterOf = (resourceType: string): PersistenceAdapterType | undefined => {\n const config = allResourceConfigurations[resourceType] as Record<string, any> | undefined;\n if (!config) return undefined;\n return (config.persistenceAdapter as PersistenceAdapterType | undefined) ?? defaultAdapter;\n };\n /**\n * DIRECTION is the whole check: the hazard is the FK HOLDER's column type, not the\n * relationship's existence. An HTTP_API row holding a platform id (the mandatory\n * primary-scope FK, e.g. `organizationId`) is LEGAL — a plain string remotely,\n * governed by the tenancy stance. What cannot work is a MONGO-backed HOLDER whose\n * physical ObjectId column must store an HTTP_API-synthesized id of the OTHER side.\n */\n const reported = new Set<string>();\n for (const [resourceType, resourceConfig] of Object.entries(allResourceConfigurations)) {\n const buckets = (resourceConfig as Record<string, any>).resourceRelationships;\n const relationships: Array<Record<string, any>> = [\n ...(buckets?.parentRelationships ?? []),\n ...(buckets?.childRelationships ?? []),\n ...(buckets?.selfRelationships ?? []),\n ];\n for (const relationship of relationships) {\n const side1 = relationship.resourceType1 as string | undefined;\n const side2 = relationship.resourceType2 as string | undefined;\n if (typeof side1 !== 'string' || typeof side2 !== 'string') continue;\n // Compiled holder when available; the authored convention (FK lives on\n // resourceType2, the FK-anchor side) as the fallback.\n const holder = (relationship.resolvedSemantics?.persistence?.foreignKey?.holderResourceType as string | undefined)\n ?? side2;\n const target = holder === side1 ? side2 : side1;\n const holderAdapter = resolveAdapterOf(holder);\n const targetAdapter = resolveAdapterOf(target);\n if (targetAdapter !== PersistenceAdapter.HTTP_API) continue;\n const dedupeKey = `${holder}→${target}:${String(relationship.foreignKeyField ?? '')}`;\n if (reported.has(dedupeKey)) continue;\n if (holderAdapter === PersistenceAdapter.MONGODB) {\n reported.add(dedupeKey);\n errors.push(\n `Resource '${holder}' (MongoDB) holds an FK targeting HTTP_API-backed '${target}' — its FK column is a physical ObjectId and cannot store the synthesized id (ETL paper A, gate G1). Refused until the Mongoose converter emits String columns for HTTP_API targets.`\n );\n } else if (holderAdapter === PersistenceAdapter.HTTP_API) {\n // Includes SELF-relationships (holder === target): an HTTP_API self-FK\n // needs the same undeclared synthesis-on-read as any cross-external FK.\n reported.add(dedupeKey);\n errors.push(\n `Resource '${holder}' (HTTP_API) holds an FK targeting HTTP_API-backed '${target}' — cross-external FK synthesis is not yet declared on the binding (ETL paper A, FK case 2) and is refused.`\n );\n }\n }\n }\n\n /**\n * D6 coherence B1 (ETL): a DEPENDENT edge whose CHILD (the FK holder toward its\n * parent) is HTTP_API-backed must declare `onParentDelete.enabled: false` EXPLICITLY.\n *\n * Reuses `classifySubjectErasureDisposition` — THE classifier the erasure runtime\n * runs — so boot and runtime cannot drift on what an edge means. Refused dispositions:\n *\n * - DELETE / IMPERSONALIZE_AND_RETAIN: an executing teardown against rows the\n * platform does not own. There is no general remote write in slice 1 (D3), the\n * IMPERSONALIZE variant additionally requires the `retentionPolicy` HTTP_API\n * resources already refuse, and stance 6b's declared operation is SUBJECT-ERASURE\n * scoped — it is not a lifecycle teardown a parent delete may invoke.\n * - UNCLASSIFIED / UNSUPPORTED_DEFERRED: left to runtime, the erasure's generic\n * refusal would tell the author to \"declare DELETE or IMPERSONALIZE_AND_RETAIN\" —\n * both illegal for an HTTP_API child — and every erasure (and parent delete) of\n * the parent would be permanently blocked on availability grounds, the exact shape\n * `administrative-continuity-floors.md` forbids. Refusing at BOOT names the one\n * legal declaration instead.\n *\n * The subject-data question is NOT this edge's to answer — it lives in the binding's\n * erasure stance (6a/6b/6c), which the erasure orchestrator enforces at runtime.\n */\n {\n const reportedEdges = new Set<string>();\n for (const resourceConfig of Object.values(allResourceConfigurations)) {\n const buckets = (resourceConfig as Record<string, any>).resourceRelationships;\n const relationships: Array<Record<string, any>> = [\n ...(buckets?.parentRelationships ?? []),\n ...(buckets?.childRelationships ?? []),\n ...(buckets?.selfRelationships ?? []),\n ];\n for (const relationship of relationships) {\n // The classifier's own child convention (resourceType2 holds the FK) —\n // the same edge the runtime will classify.\n const childResourceType = relationship.resourceType2 as string | undefined;\n if (typeof childResourceType !== 'string') continue;\n if (resolveAdapterOf(childResourceType) !== PersistenceAdapter.HTTP_API) continue;\n const edgeKey = `${String(relationship.resourceType1)}→${childResourceType}:${String(relationship.foreignKeyField ?? '')}`;\n if (reportedEdges.has(edgeKey)) continue;\n let disposition: SubjectErasureDisposition;\n let reason: string;\n try {\n const classification = classifySubjectErasureDisposition(relationship as never);\n disposition = classification.disposition;\n reason = classification.reason;\n } catch (classifyError) {\n // A relationship the startup compilation never resolved is its own\n // defect — report it rather than masking it or crashing mid-sweep.\n reportedEdges.add(edgeKey);\n errors.push(\n `Relationship '${edgeKey}' targets HTTP_API-backed '${childResourceType}' but could not be classified for erasure coherence: ${classifyError instanceof Error ? classifyError.message : String(classifyError)}`\n );\n continue;\n }\n const refused = disposition === SubjectErasureDisposition.DELETE\n || disposition === SubjectErasureDisposition.IMPERSONALIZE_AND_RETAIN\n || disposition === SubjectErasureDisposition.UNCLASSIFIED\n || disposition === SubjectErasureDisposition.UNSUPPORTED_DEFERRED;\n if (!refused) continue;\n reportedEdges.add(edgeKey);\n errors.push(\n `Relationship '${edgeKey}': the DEPENDENT child '${childResourceType}' is HTTP_API-backed and its erasure/lifecycle disposition is '${disposition}' (${reason}). The platform cannot tear down rows it does not own — declare 'onParentDelete: { enabled: false }' on the edge (the rows survive their parent), and answer the subject-data question with the binding's erasure stance (ETL D6).`\n );\n }\n }\n }\n }\n\n // Configs sharing ONE persistence collection must resolve to ONE database. The per-resource\n // loop above structurally cannot see this: it judges each config alone, and both halves of a\n // split alias group are individually valid. Runs here rather than in its own pass because it\n // needs the RESOLVED default (a config that declares nothing inherits it), which only exists\n // after the config-service readiness check above.\n errors.push(\n ...findSharedPersistenceCollectionAdapterIncoherences(allResourceConfigurations, defaultAdapter)\n .map((incoherence) => incoherence.message),\n );\n\n // Log warnings\n if (warnings.length > 0) {\n for (const warning of warnings) {\n this.logger.warn(warning);\n }\n }\n\n // Throw on errors\n if (errors.length > 0) {\n this.logger.error('Persistence adapter configuration validation failed:', { errors });\n throw this.errorBuilder.buildError(\n ErrorType.CONFIGURATION,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.RESOURCES_REGISTRY_INITIALIZATION_FAILED,\n context: {\n reason: 'persistence_adapter_mismatch',\n errors\n }\n }\n );\n }\n\n this.logDebug(`Validated persistence adapter configuration for ${Object.keys(allResourceConfigurations).length} resources`);\n }\n\n protected generateUrlsForAllResourceConfigurations(\n allResourceConfigurations: { [key: string]: AnyResourceConfiguration },\n registry: ResourcesRegistry,\n allResourceFieldIdentifiers: Record<string, string>\n ): void {\n\n let totalUrlBearingOperations = 0;\n let totalUrlsGenerated = 0;\n\n for (const [resourceType, resourceConfig] of Object.entries(allResourceConfigurations)) {\n try {\n this.logDebug(`Generating URLs for resource type: ${resourceType}`);\n\n // Use the URL builder to generate and update URLs\n ResourcesConfigOperationsUrlsBuilderUtils.updateOperationUrls(\n resourceConfig,\n allResourceFieldIdentifiers,\n );\n\n // Count URL-bearing operations for logging\n const urlBearingOps = resourceConfig.operations.filter(op =>\n op.variantType === ResourceOperationVariantType.API_CALL\n || op.variantType === ResourceOperationVariantType.API_CALL_WITH_CALLBACK\n );\n totalUrlBearingOperations += urlBearingOps.length;\n\n // Count total URLs generated\n urlBearingOps.forEach(op => {\n if ('initiatorInfos' in op && Array.isArray(op.initiatorInfos)) {\n totalUrlsGenerated += op.initiatorInfos.length;\n }\n });\n\n } catch (error) {\n this.logger.error(`Failed to generate URLs for resource type ${resourceType}`, {\n ...projectCaughtErrorLogFields(error),\n resourceType\n });\n }\n }\n\n this.logDebug('URL generation completed', {\n totalResourceTypes: Object.keys(allResourceConfigurations).length,\n totalUrlBearingOperations,\n totalUrlsGenerated\n });\n }\n\n /**\n * Enhance DTOs for all operations in resource configurations\n */\n protected enhanceDtosForAllResourceConfigurations(\n allResourceConfigurations: { [key: string]: AnyResourceConfiguration },\n registry: ResourcesRegistry,\n allResourceFieldIdentifiers: Record<string, string>\n ): void {\n\n\n for (const [resourceType, resourceConfig] of Object.entries(allResourceConfigurations)) {\n try {\n this.logDebug(`\\n🚀 Starting DTO enhancement for resource: ${resourceType} (${resourceConfig.operations?.length || 0} operations)`);\n\n if (!resourceConfig.operations || resourceConfig.operations.length === 0) {\n this.logDebug(`⚠️ No operations found for ${resourceType}, skipping...`);\n continue;\n }\n\n // NOTE: DTOs are already pre-computed by the factory via buildAllOperationDtos.\n // The factory builds all 6 DTO variants (requestDto, responseDto, summaryDto,\n // contextDto, internalDto, repositoryDto) with inheritance applied.\n //\n // Phase 2.1: Factory now pre-computes all DTOs, so runtime enhancement is no longer needed.\n // An earlier runtime DTO-rebuild pass only produced requestDto/responseDto and would\n // overwrite the factory's complete DTO set, losing summaryDto, contextDto, internalDto, repositoryDto.\n //\n // Operations already have all DTOs from factory - use them as-is.\n this.logDebug(`ℹ️ DTOs already pre-computed by factory (buildAllOperationDtos with all 6 variants), using factory-built DTOs`);\n // No need to replace - operations already have all DTOs from factory\n\n this.logDebug(`✅ Completed DTO enhancement for ${resourceType}`);\n\n } catch (error) {\n this.logger.error(`Failed to enhance DTOs for resource type ${resourceType}`, {\n ...projectCaughtErrorLogFields(error),\n resourceType\n });\n }\n }\n\n }\n\n // ================================\n // Debug Methods\n // ================================\n\n public debugDisplayGeneratedUrls(): void {\n this.ensureInitialized();\n\n const registry = this.getResourcesRegistry();\n\n this.logDebug('\\n=== 🌐 GENERATED API URLS DEBUG DISPLAY ===\\n');\n\n const resourceTypes = Object.keys(registry.resourceConfigurations).sort();\n let totalOperations = 0;\n let totalUrls = 0;\n\n for (const resourceType of resourceTypes) {\n const resourceConfig = registry.resourceConfigurations[resourceType];\n\n // Filter URL-bearing operations\n const apiCallOperations = resourceConfig.operations.filter(\n op => op.variantType === ResourceOperationVariantType.API_CALL\n || op.variantType === ResourceOperationVariantType.API_CALL_WITH_CALLBACK\n );\n\n if (apiCallOperations.length === 0) {\n continue;\n }\n\n this.logDebug(`📋 Resource: ${resourceType}`);\n this.logDebug(` Field Identifier: ${resourceConfig.resourceFieldIdentifier}`);\n this.logDebug(` Primary Scope: ${resourceConfig.resourcePrimaryScope}`);\n this.logDebug(` Parent Relationships: ${resourceConfig.resourceRelationships.parentRelationships.length}`);\n this.logDebug(' ────────────────────────────────────────────────────────────────────────');\n\n for (const operation of apiCallOperations) {\n totalOperations++;\n\n // Extract operation path using ResourcesConfig_OperationPathUtils\n const operationPath = ResourcesConfig_OperationPathUtils.extractOperationPath(operation);\n\n // Stringify operation path using ResourcesConfig_OperationPathUtils\n const operationPathString = ResourcesConfig_OperationPathUtils.createOperationPathKey(operationPath);\n\n this.logDebug(` 🔧 Operation Path: ${operationPathString}`);\n\n // Display URLs if they exist\n if ('initiatorInfos' in operation && Array.isArray(operation.initiatorInfos) && operation.initiatorInfos.length > 0) {\n this.logDebug(` 🌐 Generated URLs (${operation.initiatorInfos.length}):`);\n operation.initiatorInfos.forEach((initiatorInfo: ResourceConfiguration_Operation_UrlInitiatorInfo, index: number) => {\n const paramInfo = initiatorInfo.parameters?.map((p: ResourceConfiguration_Operation_UrlParameterInfo) => `${p.fieldIdentifier}:${p.resourceType}`).join(', ') || 'none';\n const callbackInfo = initiatorInfo.urlCallback ? ` | callback: ${initiatorInfo.urlCallback}` : '';\n this.logDebug(` ${index + 1}. ${operation.httpVerb || 'N/A'} ${initiatorInfo.url}${callbackInfo} [params: ${paramInfo}]`);\n totalUrls++;\n });\n } else {\n this.logDebug(` ❌ No URLs generated`);\n }\n\n // Additional operation details\n const details: string[] = [];\n if ('isBulkOperation' in operation && operation.isBulkOperation) {\n details.push('BULK');\n }\n if (operation.variantKey) {\n details.push(`VARIANT: ${operation.variantKey}`);\n }\n if ('isApiKeyAccessDisabled' in operation && operation.isApiKeyAccessDisabled) {\n details.push('NO_API_KEY');\n }\n\n if (details.length > 0) {\n this.logDebug(` 📝 Details: ${details.join(', ')}`);\n }\n\n this.logDebug(' ────────────────────────────────────────────────────────────────────────');\n }\n\n this.logDebug(''); // Empty line between resources\n }\n\n this.logDebug(`📊 Summary:`);\n this.logDebug(` Total Resource Types: ${resourceTypes.length}`);\n this.logDebug(` Total API_CALL Operations: ${totalOperations}`);\n this.logDebug(` Total Generated URLs: ${totalUrls}`);\n this.logDebug(` Average URLs per Operation: ${totalOperations > 0 ? (totalUrls / totalOperations).toFixed(2) : '0'}`);\n this.logDebug('\\n=== END URL DEBUG DISPLAY ===\\n');\n }\n\n\n public debugDisplayResourceUrls(resourceType: ResourceType): void {\n this.ensureInitialized();\n\n const registry = this.getResourcesRegistry();\n const resourceConfig = registry.resourceConfigurations[resourceType];\n\n if (!resourceConfig) {\n this.logDebug(`❌ Resource type '${resourceType}' not found in registry`);\n return;\n }\n\n this.logDebug(`\\n=== 🔍 URL PATTERNS FOR RESOURCE: ${resourceType} ===\\n`);\n\n // Show resource details\n this.logDebug(`📋 Resource Details:`);\n this.logDebug(` Identifier: ${resourceConfig.resourceIdentifier}`);\n this.logDebug(` Field Identifier: ${resourceConfig.resourceFieldIdentifier}`);\n this.logDebug(` Primary Scope: ${resourceConfig.resourcePrimaryScope}`);\n this.logDebug(` System Resource: ${resourceConfig.isSystemResource}`);\n\n // Show parent relationships\n const parentRels = resourceConfig.resourceRelationships.parentRelationships;\n if (parentRels.length > 0) {\n this.logDebug(`\\n🔗 Parent Relationships (${parentRels.length}):`);\n parentRels.forEach((rel, index) => {\n const scope = rel.isPrimaryScope ? ' [PRIMARY SCOPE]' : '';\n const requirement = rel.parentResourceRequirement === ResourceParentResourceRequirement.OPTIONAL ? ' [OPTIONAL]' : ' [MANDATORY]';\n this.logDebug(` ${index + 1}. ${rel.resourceType1} → ${rel.resourceType2}${scope}${requirement}`);\n });\n }\n\n // Show URL-bearing operations\n const apiCallOps = resourceConfig.operations.filter(\n op => op.variantType === ResourceOperationVariantType.API_CALL\n || op.variantType === ResourceOperationVariantType.API_CALL_WITH_CALLBACK\n );\n\n if (apiCallOps.length > 0) {\n this.logDebug(`\\n🔧 URL-bearing Operations (${apiCallOps.length}):`);\n\n apiCallOps.forEach((operation, index) => {\n const operationPath = ResourcesConfig_OperationPathUtils.extractOperationPath(operation);\n const pathString = ResourcesConfig_OperationPathUtils.createOperationPathKey(operationPath);\n\n this.logDebug(`\\n ${index + 1}. ${pathString}`);\n\n if ('initiatorInfos' in operation && Array.isArray(operation.initiatorInfos)) {\n operation.initiatorInfos.forEach((initiatorInfo: ResourceConfiguration_Operation_UrlInitiatorInfo, urlIndex: number) => {\n const paramInfo = initiatorInfo.parameters?.map((p: ResourceConfiguration_Operation_UrlParameterInfo) => `${p.fieldIdentifier}:${p.resourceType}`).join(', ') || 'none';\n const callbackInfo = initiatorInfo.urlCallback ? ` | callback: ${initiatorInfo.urlCallback}` : '';\n this.logDebug(` ${operation.httpVerb || 'N/A'} ${initiatorInfo.url}${callbackInfo} [params: ${paramInfo}]`);\n });\n }\n });\n } else {\n this.logDebug('\\n❌ No URL-bearing operations found');\n }\n\n this.logDebug(`\\n=== END RESOURCE URL PATTERNS ===\\n`);\n }\n\n public debugDisplayGeneratedDtos(resourceFilter: ResourceType[] = []): void {\n this.ensureInitialized();\n\n const registry = this.getResourcesRegistry();\n\n ResourcesConfigOperationsDtosBuilderUtils.debugDisplayGeneratedDtos(\n registry.resourceConfigurations,\n resourceFilter\n );\n }\n\n /**\n * Auto-register a limitCheck on a resource's CREATE default variant.\n * Called by FeatureDefinitionRegistryBackendService during startup for\n * limit features with `countResource`.\n *\n * Only adds the limitCheck if:\n * - The resource exists in the registry\n * - The resource has a CREATE operation\n * - No explicit limitChecks already references this featureId\n *\n * @param resourceType - The resource type whose CREATE operation should get the limitCheck\n * @param featureId - The feature identifier for the limit check\n * @returns true if the limitCheck was added, false if skipped\n */\n public addAutoLimitCheck(resourceType: string, featureId: string): boolean {\n this.ensureInitialized();\n\n const registry = this.getResourcesRegistry();\n const resourceConfig = registry.resourceConfigurations[resourceType as ResourceType];\n\n if (!resourceConfig) {\n this.logDebug(`addAutoLimitCheck: resource ${resourceType} not found in registry, skipping`);\n return false;\n }\n\n const createCandidates = resourceConfig.operations.filter((op) =>\n op.operationIdentifier === CoreResourceOperation.CREATE\n && op.isOperationDefault === true\n && !('isBulkOperation' in op && op.isBulkOperation === true)\n && (\n op.variantType === ResourceOperationVariantType.API_CALL\n || op.variantType === ResourceOperationVariantType.API_CALL_WITH_CALLBACK\n )\n );\n if (createCandidates.length > 1) {\n const candidateVariants = createCandidates.map((op) => ({\n variantType: op.variantType,\n variantKey: op.variantKey,\n }));\n this.logDebug('addAutoLimitCheck: ambiguous default CREATE variants', {\n resourceType,\n featureId,\n candidateVariants,\n });\n throw this.errorBuilder.buildError(\n ErrorType.CONFIGURATION,\n undefined,\n {\n customMessageReference: ErrorCustomMessageReference.RESOURCES_REGISTRY_REGISTRATION_FAILED,\n context: {\n message: 'Auto limit checks require exactly one default non-bulk URL-bearing CREATE operation',\n resourceType,\n featureId,\n candidateVariants,\n }\n }\n );\n }\n const createOp = createCandidates[0];\n\n if (!createOp) {\n this.logDebug(`addAutoLimitCheck: resource ${resourceType} has no default URL-bearing CREATE variant, skipping`);\n return false;\n }\n\n // Cast to mutable shape for auto-registration mutation.\n // At startup, operations have already been normalized by the factory, so requiredFeatures\n // is in full form `{ features?, mode?, limitChecks? }` (never the shorthand `string[]`).\n const mutableOp = createOp as { requiredFeatures?: { features?: string[]; mode?: string; limitChecks?: Array<{ featureId: string; increment?: number }> } };\n\n // Check if this featureId is already in limitChecks\n if (mutableOp.requiredFeatures?.limitChecks?.some(lc => lc.featureId === featureId)) {\n this.logDebug(`addAutoLimitCheck: resource ${resourceType} CREATE already has limitCheck for ${featureId}, skipping`);\n return false;\n }\n\n // Add the limitCheck\n if (!mutableOp.requiredFeatures) {\n mutableOp.requiredFeatures = {};\n }\n if (!mutableOp.requiredFeatures.limitChecks) {\n mutableOp.requiredFeatures.limitChecks = [];\n }\n mutableOp.requiredFeatures.limitChecks.push({ featureId });\n\n this.logDebug(`addAutoLimitCheck: added limitCheck for ${featureId} on ${resourceType}.CREATE`);\n return true;\n }\n}\n"]}
|