@wildo-ai/saas-backend-lib 1.1.2 → 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 +19 -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 +4 -0
- 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 +35 -0
- package/dist/esm/base-classes/services/batches/child-lifecycle-teardown.batch.backend.service.d.ts.map +1 -0
- package/dist/esm/base-classes/services/batches/child-lifecycle-teardown.batch.backend.service.js +111 -0
- package/dist/esm/base-classes/services/batches/child-lifecycle-teardown.batch.backend.service.js.map +1 -0
- package/dist/esm/base-classes/services/batches/credential-expiry-sweep.batch.backend.service.d.ts +50 -0
- package/dist/esm/base-classes/services/batches/credential-expiry-sweep.batch.backend.service.d.ts.map +1 -0
- package/dist/esm/base-classes/services/batches/credential-expiry-sweep.batch.backend.service.js +210 -0
- package/dist/esm/base-classes/services/batches/credential-expiry-sweep.batch.backend.service.js.map +1 -0
- package/dist/esm/base-classes/services/batches/engine-custom-batch-manifests.d.ts +111 -0
- 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 +140 -0
- 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 +27 -6
- 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 +124 -13
- 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 +220 -25
- 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 +60 -8
- 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 +191 -26
- 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 +47 -4
- 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 +96 -29
- 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 +55 -0
- package/dist/esm/base-classes/services/repositories/http-api/http-api-rest-operation-reference.backend.d.ts.map +1 -0
- package/dist/esm/base-classes/services/repositories/http-api/http-api-rest-operation-reference.backend.js +114 -0
- package/dist/esm/base-classes/services/repositories/http-api/http-api-rest-operation-reference.backend.js.map +1 -0
- 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 +89 -14
- 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 +84 -11
- 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 +9 -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 +106 -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 +266 -20
- 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 +23 -3
- 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 +34 -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 +22 -0
- 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 +4 -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 +11 -0
- 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 +39 -5
- 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 +181 -2
- 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 +571 -45
- 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 +36 -3
- 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 +70 -8
- 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 +28 -0
- package/dist/esm/billing/batches/billing-reconciliation.batch.backend.service.d.ts.map +1 -0
- package/dist/esm/billing/batches/billing-reconciliation.batch.backend.service.js +90 -0
- package/dist/esm/billing/batches/billing-reconciliation.batch.backend.service.js.map +1 -0
- package/dist/esm/billing/batches/usage-flush.batch.backend.service.d.ts +44 -0
- package/dist/esm/billing/batches/usage-flush.batch.backend.service.d.ts.map +1 -0
- package/dist/esm/billing/batches/usage-flush.batch.backend.service.js +99 -0
- package/dist/esm/billing/batches/usage-flush.batch.backend.service.js.map +1 -0
- package/dist/esm/billing/models/billing-provider-event-settlement.backend.schemas.d.ts +91 -0
- package/dist/esm/billing/models/billing-provider-event-settlement.backend.schemas.d.ts.map +1 -0
- package/dist/esm/billing/models/billing-provider-event-settlement.backend.schemas.js +152 -0
- package/dist/esm/billing/models/billing-provider-event-settlement.backend.schemas.js.map +1 -0
- 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 +186 -0
- package/dist/esm/billing/services/back-office/billing-reconciliation.backend.service.d.ts.map +1 -0
- package/dist/esm/billing/services/back-office/billing-reconciliation.backend.service.js +475 -0
- package/dist/esm/billing/services/back-office/billing-reconciliation.backend.service.js.map +1 -0
- 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 +100 -0
- 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 +209 -6
- 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 +200 -4
- 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 +593 -64
- 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 +36 -0
- package/dist/esm/billing/services/billing-adapter-registry.backend.d.ts.map +1 -0
- package/dist/esm/billing/services/billing-adapter-registry.backend.js +83 -0
- package/dist/esm/billing/services/billing-adapter-registry.backend.js.map +1 -0
- package/dist/esm/billing/services/billing-checkout-metadata.backend.utils.d.ts +9 -0
- 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 +11 -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 +48 -7
- 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 +70 -1
- 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 +98 -2
- 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 +30 -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 +43 -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 +11 -3
- 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 +30 -16
- 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 +104 -25
- 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 +21 -1
- 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 +109 -2
- 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 +52 -0
- package/dist/esm/billing/services/webhooks/__tests__/settlement-ledger.test-double.d.ts.map +1 -0
- package/dist/esm/billing/services/webhooks/__tests__/settlement-ledger.test-double.js +74 -0
- package/dist/esm/billing/services/webhooks/__tests__/settlement-ledger.test-double.js.map +1 -0
- 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 +104 -11
- 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 +310 -29
- 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 +30 -1
- package/dist/esm/billing/testing/mock-billing-provider.d.ts.map +1 -1
- package/dist/esm/billing/testing/mock-billing-provider.js +25 -0
- 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 +11 -4
- 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 +225 -13
- 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 +340 -62
- 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 +350 -10
- 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 +562 -10
- 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 +7 -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 +6 -2
- 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 +31 -9
- 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 +42 -0
- 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 +57 -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 +110 -0
- package/dist/esm/compliance/audit-trails/services/utils/leased-value-cache.backend.utils.d.ts.map +1 -0
- package/dist/esm/compliance/audit-trails/services/utils/leased-value-cache.backend.utils.js +192 -0
- package/dist/esm/compliance/audit-trails/services/utils/leased-value-cache.backend.utils.js.map +1 -0
- 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 +52 -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 +5 -0
- package/dist/esm/config/bootstrap/application-runtime-profile.backend.d.ts.map +1 -1
- package/dist/esm/config/bootstrap/application-runtime-profile.backend.js +6 -0
- 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 +145 -49
- package/dist/esm/config/models/app-config.backend.schemas.d.ts.map +1 -1
- package/dist/esm/config/models/app-config.backend.schemas.js +121 -12
- 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 +38 -15
- 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 +17 -2
- 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 +0 -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 +71 -76
- 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 +23 -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 +33 -0
- package/dist/esm/config/services/app-configuration.backend.utils.d.ts.map +1 -1
- package/dist/esm/config/services/app-configuration.backend.utils.js +39 -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 +37 -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 +69 -1
- 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 +48 -0
- 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 +13 -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 +13 -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 +70 -7
- package/dist/esm/errors/services/error-handler.backend.service.d.ts.map +1 -1
- package/dist/esm/errors/services/error-handler.backend.service.js +129 -8
- package/dist/esm/errors/services/error-handler.backend.service.js.map +1 -1
- package/dist/esm/errors/services/rate-limit.backend.service.d.ts +66 -0
- package/dist/esm/errors/services/rate-limit.backend.service.d.ts.map +1 -1
- package/dist/esm/errors/services/rate-limit.backend.service.js +102 -25
- 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 +5 -0
- 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 +25 -0
- 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 +33 -0
- 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 +40 -0
- 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 +59 -2
- 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 +52 -17
- 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 +4 -2
- 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 +306 -0
- package/dist/esm/external-providers/operations/provider-operation-executor.backend.service.d.ts.map +1 -0
- package/dist/esm/external-providers/operations/provider-operation-executor.backend.service.js +379 -0
- package/dist/esm/external-providers/operations/provider-operation-executor.backend.service.js.map +1 -0
- package/dist/esm/external-providers/operations/provider-operation-request.backend.d.ts +56 -0
- package/dist/esm/external-providers/operations/provider-operation-request.backend.d.ts.map +1 -0
- package/dist/esm/external-providers/operations/provider-operation-request.backend.js +211 -0
- package/dist/esm/external-providers/operations/provider-operation-request.backend.js.map +1 -0
- package/dist/esm/external-providers/operations/provider-request-signing.backend.d.ts +45 -0
- package/dist/esm/external-providers/operations/provider-request-signing.backend.d.ts.map +1 -0
- package/dist/esm/external-providers/operations/provider-request-signing.backend.js +235 -0
- package/dist/esm/external-providers/operations/provider-request-signing.backend.js.map +1 -0
- package/dist/esm/external-providers/operations/provider-rest-call-client.backend.d.ts +56 -0
- package/dist/esm/external-providers/operations/provider-rest-call-client.backend.d.ts.map +1 -0
- package/dist/esm/external-providers/operations/provider-rest-call-client.backend.js +78 -0
- package/dist/esm/external-providers/operations/provider-rest-call-client.backend.js.map +1 -0
- package/dist/esm/external-providers/services/__tests__/mock-external-providers-registry.service.d.ts +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 +2 -2
- 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 +89 -0
- package/dist/esm/external-providers/services/backend-provider-loader.backend.service.d.ts.map +1 -0
- package/dist/esm/external-providers/services/backend-provider-loader.backend.service.js +164 -0
- package/dist/esm/external-providers/services/backend-provider-loader.backend.service.js.map +1 -0
- package/dist/esm/external-providers/services/backend-provider-registry.backend.service.d.ts +26 -27
- 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 +50 -64
- 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 +181 -100
- 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 +4 -4
- 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 +413 -7
- 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 +684 -45
- 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 +84 -5
- 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 +21 -13
- 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 +260 -36
- 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 +94 -9
- package/dist/esm/files/services/file-scanning.backend.service.d.ts.map +1 -1
- package/dist/esm/files/services/file-scanning.backend.service.js +202 -17
- 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 +60 -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 +175 -13
- 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 +53 -2
- 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 +127 -3
- package/dist/esm/files/services/file-upload-grant.backend.service.js.map +1 -1
- package/dist/esm/files/services/files.backend.service.d.ts +68 -0
- package/dist/esm/files/services/files.backend.service.d.ts.map +1 -1
- package/dist/esm/files/services/files.backend.service.js +177 -5
- 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 +109 -0
- package/dist/esm/files/storage/application-storage-key.backend.utils.d.ts.map +1 -0
- package/dist/esm/files/storage/application-storage-key.backend.utils.js +123 -0
- package/dist/esm/files/storage/application-storage-key.backend.utils.js.map +1 -0
- 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 +52 -11
- 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 +67 -8
- 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 +101 -28
- 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 +8 -55
- 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 +20 -0
- 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 +86 -0
- package/dist/esm/files/utils/office-document-text-extraction.backend.utils.d.ts.map +1 -0
- package/dist/esm/files/utils/office-document-text-extraction.backend.utils.js +288 -0
- package/dist/esm/files/utils/office-document-text-extraction.backend.utils.js.map +1 -0
- 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 +15 -0
- 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 +76 -5
- 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 +6 -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 +60 -0
- 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 +63 -0
- 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 +74 -0
- 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 +196 -40
- 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 +7 -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 +53 -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 +18 -0
- 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 +18 -0
- 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 +12 -7
- 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 +0 -13
- 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 +14 -22
- 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 +8 -3
- 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 +25 -15
- 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 +13 -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 +179 -8
- 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 +436 -34
- 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 +4 -2
- 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 +113 -0
- package/dist/esm/flows-actors/models/mcp-client.backend.definitions.d.ts.map +1 -0
- package/dist/esm/flows-actors/models/mcp-client.backend.definitions.js +62 -0
- package/dist/esm/flows-actors/models/mcp-client.backend.definitions.js.map +1 -0
- 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 +0 -2
- 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 +132 -6
- package/dist/esm/flows-actors/services/agents.backend.service.d.ts.map +1 -1
- package/dist/esm/flows-actors/services/agents.backend.service.js +467 -49
- 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 +50 -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 +270 -20
- 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 +34 -5
- 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 +154 -20
- 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 +27 -23
- 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 +7 -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 +90 -0
- package/dist/esm/flows-actors/services/mcp-client.backend.service.d.ts.map +1 -0
- package/dist/esm/flows-actors/services/mcp-client.backend.service.js +371 -0
- package/dist/esm/flows-actors/services/mcp-client.backend.service.js.map +1 -0
- 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 +9 -5
- 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 +12 -17
- 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 +17 -4
- 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 +0 -207
- 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 +8 -243
- 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 +9 -14
- package/dist/esm/guidance/services/milestone-evaluator.backend.service.d.ts.map +1 -1
- package/dist/esm/guidance/services/milestone-evaluator.backend.service.js +18 -89
- 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 +86 -0
- package/dist/esm/guidance/services/progression-state-store.backend.service.d.ts.map +1 -0
- package/dist/esm/guidance/services/progression-state-store.backend.service.js +155 -0
- package/dist/esm/guidance/services/progression-state-store.backend.service.js.map +1 -0
- 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 +10 -0
- package/dist/esm/i18n/controllers/i18n-controller.backend.service.d.ts.map +1 -1
- package/dist/esm/i18n/controllers/i18n-controller.backend.service.js +55 -5
- 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 +11 -5
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +31 -5
- 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 +126 -10
- package/dist/esm/inject/models/container.js.map +1 -1
- package/dist/esm/inject/models/service-types.d.ts +20 -3
- package/dist/esm/inject/models/service-types.d.ts.map +1 -1
- package/dist/esm/inject/models/service-types.js +22 -3
- 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 +70 -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 +56 -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 +107 -11
- 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 +22 -0
- 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 +49 -4
- 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 +66 -0
- package/dist/esm/monitoring/analytics/services/value-moment-definition-registry.backend.service.d.ts.map +1 -0
- package/dist/esm/monitoring/analytics/services/value-moment-definition-registry.backend.service.js +199 -0
- package/dist/esm/monitoring/analytics/services/value-moment-definition-registry.backend.service.js.map +1 -0
- package/dist/esm/monitoring/analytics/services/value-moment-engine.backend.service.d.ts +149 -13
- 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 +411 -19
- 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 +11 -2
- 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 +28 -9
- package/dist/esm/monitoring/logger/models/logger.backend.schemas.d.ts.map +1 -1
- package/dist/esm/monitoring/logger/models/logger.backend.schemas.js +30 -10
- 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 +24 -0
- package/dist/esm/monitoring/logger/services/logger.service.d.ts.map +1 -1
- package/dist/esm/monitoring/logger/services/logger.service.js +52 -11
- 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 +62 -0
- package/dist/esm/monitoring/logger/utils/log-severity-floor.backend.utils.d.ts.map +1 -0
- package/dist/esm/monitoring/logger/utils/log-severity-floor.backend.utils.js +78 -0
- package/dist/esm/monitoring/logger/utils/log-severity-floor.backend.utils.js.map +1 -0
- 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 +313 -0
- package/dist/esm/monitoring/observability/audit-observation-emission.backend.d.ts.map +1 -0
- package/dist/esm/monitoring/observability/audit-observation-emission.backend.js +389 -0
- package/dist/esm/monitoring/observability/audit-observation-emission.backend.js.map +1 -0
- package/dist/esm/monitoring/observability/models/observability.backend.schemas.d.ts +1 -0
- 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 +21 -0
- package/dist/esm/monitoring/observability/services/metrics.service.d.ts.map +1 -1
- package/dist/esm/monitoring/observability/services/metrics.service.js +38 -0
- 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 +66 -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 +105 -10
- 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 +10 -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 +102 -5
- package/dist/esm/notifications/email/services/email.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/email/services/email.backend.service.js +222 -70
- package/dist/esm/notifications/email/services/email.backend.service.js.map +1 -1
- package/dist/esm/notifications/email/utils/color-conversion.utils.d.ts +0 -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 +142 -21
- package/dist/esm/notifications/services/notification-badge.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/services/notification-badge.backend.service.js +283 -58
- package/dist/esm/notifications/services/notification-badge.backend.service.js.map +1 -1
- package/dist/esm/notifications/services/notifications-dispatcher.backend.service.d.ts +99 -13
- package/dist/esm/notifications/services/notifications-dispatcher.backend.service.d.ts.map +1 -1
- package/dist/esm/notifications/services/notifications-dispatcher.backend.service.js +422 -66
- 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 +117 -5
- 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 +164 -6
- 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 +0 -6
- 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 +46 -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 +16 -6
- 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 +12 -12
- 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 +16 -0
- 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 +18 -0
- 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 +2 -2
- 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 +2 -2
- 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 +63 -2
- 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 +66 -0
- package/dist/esm/queue/adapters/in-memory-queue-adapter.backend.service.d.ts.map +1 -0
- package/dist/esm/queue/adapters/in-memory-queue-adapter.backend.service.js +257 -0
- package/dist/esm/queue/adapters/in-memory-queue-adapter.backend.service.js.map +1 -0
- package/dist/esm/queue/adapters/queue-adapter.backend.binding.d.ts +12 -0
- package/dist/esm/queue/adapters/queue-adapter.backend.binding.d.ts.map +1 -0
- package/dist/esm/queue/adapters/queue-adapter.backend.binding.js +47 -0
- package/dist/esm/queue/adapters/queue-adapter.backend.binding.js.map +1 -0
- package/dist/esm/queue/adapters/queue-adapter.backend.interface.d.ts +87 -0
- package/dist/esm/queue/adapters/queue-adapter.backend.interface.d.ts.map +1 -0
- package/dist/esm/queue/adapters/queue-adapter.backend.interface.js +1 -0
- package/dist/esm/queue/adapters/queue-adapter.backend.interface.js.map +1 -0
- package/dist/esm/queue/adapters/queue-adapter.backend.options.d.ts +31 -0
- package/dist/esm/queue/adapters/queue-adapter.backend.options.d.ts.map +1 -0
- package/dist/esm/queue/adapters/queue-adapter.backend.options.js +13 -0
- package/dist/esm/queue/adapters/queue-adapter.backend.options.js.map +1 -0
- package/dist/esm/queue/adapters/rabbitmq-adapter.backend.service.d.ts +19 -25
- package/dist/esm/queue/adapters/rabbitmq-adapter.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/adapters/rabbitmq-adapter.backend.service.js +33 -0
- 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 +2 -2
- package/dist/esm/queue/domain-queue-consumer.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/domain-queue-consumer.backend.service.js +1 -4
- 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 +2 -2
- package/dist/esm/queue/job-consumer.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/job-consumer.backend.service.js +1 -4
- package/dist/esm/queue/job-consumer.backend.service.js.map +1 -1
- package/dist/esm/queue/job-executor.backend.service.d.ts +2 -2
- package/dist/esm/queue/job-executor.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/job-executor.backend.service.js +1 -4
- 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 +8 -4
- package/dist/esm/queue/queue-monitoring.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/queue-monitoring.backend.service.js +25 -17
- package/dist/esm/queue/queue-monitoring.backend.service.js.map +1 -1
- package/dist/esm/queue/queue-worker-initializer.backend.service.d.ts +16 -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 +16 -1
- package/dist/esm/queue/queue-worker-initializer.backend.service.js.map +1 -1
- package/dist/esm/queue/queue.backend.service.d.ts +3 -3
- package/dist/esm/queue/queue.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/queue.backend.service.js +26 -4
- 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 +2 -2
- package/dist/esm/queue/worker-shutdown-manager.backend.service.d.ts.map +1 -1
- package/dist/esm/queue/worker-shutdown-manager.backend.service.js +18 -3
- 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 +50 -25
- package/dist/esm/rag/utils/rag-chunking.backend.utils.d.ts.map +1 -1
- package/dist/esm/rag/utils/rag-chunking.backend.utils.js +147 -39
- 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 +12 -3
- 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 +12 -3
- 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 +9 -0
- package/dist/esm/requests/service/websocket.service.d.ts.map +1 -1
- package/dist/esm/requests/service/websocket.service.js +81 -9
- 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 +16 -2
- 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 +2 -0
- 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 +14 -0
- package/dist/esm/resources/models/resources-relationships.backend.definitions.js.map +1 -1
- package/dist/esm/resources/models/resources-types.backend.schemas.d.ts +2 -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 +8 -0
- 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 +83 -5
- package/dist/esm/resources/services/resources-registry.backend.service.d.ts.map +1 -1
- package/dist/esm/resources/services/resources-registry.backend.service.js +121 -6
- 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 +36 -3
- package/dist/esm/runtime/controllers/health-controller.backend.service.d.ts.map +1 -1
- package/dist/esm/runtime/controllers/health-controller.backend.service.js +32 -10
- package/dist/esm/runtime/controllers/health-controller.backend.service.js.map +1 -1
- package/dist/esm/runtime/domain-module.backend.definitions.d.ts +24 -0
- package/dist/esm/runtime/domain-module.backend.definitions.d.ts.map +1 -1
- package/dist/esm/runtime/domain-module.backend.definitions.js +24 -0
- 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 +51 -0
- 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 +26 -0
- package/dist/esm/runtime/services/http-server.backend.service.d.ts.map +1 -1
- package/dist/esm/runtime/services/http-server.backend.service.js +191 -1
- package/dist/esm/runtime/services/http-server.backend.service.js.map +1 -1
- package/dist/esm/runtime/services/start-application.backend.service.d.ts +19 -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 +287 -89
- 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 +15 -0
- 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 +28 -0
- 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 +5 -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 +24 -4
- 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 +113 -4
- 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 +114 -0
- 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 +354 -3
- 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 +1 -0
- package/dist/esm/security/authentications/models/cimd.backend.schemas.d.ts.map +1 -1
- package/dist/esm/security/authentications/models/cimd.backend.schemas.js +22 -0
- 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 +30 -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 +0 -2
- 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 +23 -14
- 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 +0 -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 +15 -12
- 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 +113 -3
- 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 +207 -30
- 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 +95 -2
- 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 +153 -9
- 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 +197 -0
- 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 +384 -53
- 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 +68 -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 +41 -0
- 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 +202 -23
- 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 +260 -27
- 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 +70 -4
- 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 +29 -5
- 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 +77 -5
- 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 +17 -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 +49 -17
- 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 +43 -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 +277 -97
- 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 +28 -5
- 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 +72 -12
- 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 +3 -0
- 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 +28 -0
- package/dist/esm/security/authentications/services/custom-impls/sso-config-domain-verification.custom-impl.backend.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/custom-impls/sso-config-domain-verification.custom-impl.backend.service.js +339 -0
- package/dist/esm/security/authentications/services/custom-impls/sso-config-domain-verification.custom-impl.backend.service.js.map +1 -0
- package/dist/esm/security/authentications/services/custom-impls/sso-config.custom-impl.backend.service.d.ts +4 -3
- 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 +4 -3
- 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 +35 -0
- 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 +111 -21
- 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 +14 -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 +49 -8
- 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 +4 -0
- 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 +6 -0
- 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 +37 -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 +51 -0
- 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 +41 -0
- 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 +45 -0
- 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 +116 -0
- package/dist/esm/security/authorizations/cross-tenant-read-observation.backend.d.ts.map +1 -0
- package/dist/esm/security/authorizations/cross-tenant-read-observation.backend.js +162 -0
- package/dist/esm/security/authorizations/cross-tenant-read-observation.backend.js.map +1 -0
- 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 +20 -20
- 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 +27 -28
- 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 +37 -124
- 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 +4 -0
- package/dist/esm/security/authorizations/role-ceiling.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/authorizations/role-ceiling.backend.utils.js +4 -0
- package/dist/esm/security/authorizations/role-ceiling.backend.utils.js.map +1 -1
- package/dist/esm/security/authorizations/role-conferral.backend.utils.d.ts +133 -0
- package/dist/esm/security/authorizations/role-conferral.backend.utils.d.ts.map +1 -0
- package/dist/esm/security/authorizations/role-conferral.backend.utils.js +137 -0
- package/dist/esm/security/authorizations/role-conferral.backend.utils.js.map +1 -0
- package/dist/esm/security/authorizations/scope-root-collection-confinement.backend.d.ts +134 -1
- 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 +152 -5
- 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 +146 -8
- package/dist/esm/security/authorizations/services/authorizations.backend.service.d.ts.map +1 -1
- package/dist/esm/security/authorizations/services/authorizations.backend.service.js +328 -29
- 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 +6 -14
- 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 +13 -22
- 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 +60 -0
- package/dist/esm/security/connected-accounts/connection-target-authorization.backend.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/connection-target-authorization.backend.js +79 -0
- package/dist/esm/security/connected-accounts/connection-target-authorization.backend.js.map +1 -0
- package/dist/esm/security/connected-accounts/controllers/provider-connection.controller.backend.service.d.ts +299 -0
- package/dist/esm/security/connected-accounts/controllers/provider-connection.controller.backend.service.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/controllers/provider-connection.controller.backend.service.js +953 -0
- package/dist/esm/security/connected-accounts/controllers/provider-connection.controller.backend.service.js.map +1 -0
- package/dist/esm/security/connected-accounts/organization-provider-credential-resolver.port.d.ts +99 -0
- package/dist/esm/security/connected-accounts/organization-provider-credential-resolver.port.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/organization-provider-credential-resolver.port.js +22 -0
- package/dist/esm/security/connected-accounts/organization-provider-credential-resolver.port.js.map +1 -0
- package/dist/esm/security/connected-accounts/provider-oauth2-refresher.port.d.ts +44 -0
- package/dist/esm/security/connected-accounts/provider-oauth2-refresher.port.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/provider-oauth2-refresher.port.js +20 -0
- package/dist/esm/security/connected-accounts/provider-oauth2-refresher.port.js.map +1 -0
- package/dist/esm/security/connected-accounts/services/organization-provider-credential-store.backend.service.d.ts +210 -0
- package/dist/esm/security/connected-accounts/services/organization-provider-credential-store.backend.service.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/services/organization-provider-credential-store.backend.service.js +423 -0
- package/dist/esm/security/connected-accounts/services/organization-provider-credential-store.backend.service.js.map +1 -0
- package/dist/esm/security/connected-accounts/services/organization-provider-credentials.custom-impl.backend.service.d.ts +41 -0
- package/dist/esm/security/connected-accounts/services/organization-provider-credentials.custom-impl.backend.service.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/services/organization-provider-credentials.custom-impl.backend.service.js +358 -0
- package/dist/esm/security/connected-accounts/services/organization-provider-credentials.custom-impl.backend.service.js.map +1 -0
- package/dist/esm/security/connected-accounts/services/provider-oauth2-exchange.backend.d.ts +160 -0
- package/dist/esm/security/connected-accounts/services/provider-oauth2-exchange.backend.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/services/provider-oauth2-exchange.backend.js +282 -0
- package/dist/esm/security/connected-accounts/services/provider-oauth2-exchange.backend.js.map +1 -0
- package/dist/esm/security/connected-accounts/services/provider-oauth2-pending-authorization.backend.service.d.ts +125 -0
- package/dist/esm/security/connected-accounts/services/provider-oauth2-pending-authorization.backend.service.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/services/provider-oauth2-pending-authorization.backend.service.js +123 -0
- package/dist/esm/security/connected-accounts/services/provider-oauth2-pending-authorization.backend.service.js.map +1 -0
- package/dist/esm/security/connected-accounts/services/provider-oauth2-refresher.backend.service.d.ts +54 -0
- package/dist/esm/security/connected-accounts/services/provider-oauth2-refresher.backend.service.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/services/provider-oauth2-refresher.backend.service.js +153 -0
- package/dist/esm/security/connected-accounts/services/provider-oauth2-refresher.backend.service.js.map +1 -0
- package/dist/esm/security/connected-accounts/services/user-provider-credential-store.backend.service.d.ts +214 -0
- package/dist/esm/security/connected-accounts/services/user-provider-credential-store.backend.service.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/services/user-provider-credential-store.backend.service.js +430 -0
- package/dist/esm/security/connected-accounts/services/user-provider-credential-store.backend.service.js.map +1 -0
- package/dist/esm/security/connected-accounts/services/user-provider-credentials.custom-impl.backend.service.d.ts +45 -0
- package/dist/esm/security/connected-accounts/services/user-provider-credentials.custom-impl.backend.service.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/services/user-provider-credentials.custom-impl.backend.service.js +291 -0
- package/dist/esm/security/connected-accounts/services/user-provider-credentials.custom-impl.backend.service.js.map +1 -0
- package/dist/esm/security/connected-accounts/user-provider-credential-resolver.port.d.ts +98 -0
- package/dist/esm/security/connected-accounts/user-provider-credential-resolver.port.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/user-provider-credential-resolver.port.js +29 -0
- package/dist/esm/security/connected-accounts/user-provider-credential-resolver.port.js.map +1 -0
- package/dist/esm/security/connected-accounts/utils/provider-credential-envelope.backend.utils.d.ts +127 -0
- package/dist/esm/security/connected-accounts/utils/provider-credential-envelope.backend.utils.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/utils/provider-credential-envelope.backend.utils.js +277 -0
- package/dist/esm/security/connected-accounts/utils/provider-credential-envelope.backend.utils.js.map +1 -0
- package/dist/esm/security/connected-accounts/utils/stored-credential-value.backend.utils.d.ts +66 -0
- package/dist/esm/security/connected-accounts/utils/stored-credential-value.backend.utils.d.ts.map +1 -0
- package/dist/esm/security/connected-accounts/utils/stored-credential-value.backend.utils.js +75 -0
- package/dist/esm/security/connected-accounts/utils/stored-credential-value.backend.utils.js.map +1 -0
- 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 +21 -3
- 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 +26 -16
- 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 +9 -4
- package/dist/esm/security/credential-rotation-grace.backend.utils.d.ts.map +1 -1
- package/dist/esm/security/credential-rotation-grace.backend.utils.js +9 -4
- 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 +26 -0
- 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 +43 -0
- 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 +8 -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 +49 -0
- 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 +17 -5
- 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 +67 -29
- 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 +47 -25
- 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 +10 -2
- 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 +10 -2
- 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 +143 -0
- package/dist/esm/security/ssrf/pinned-outbound-fetch.backend.utils.d.ts.map +1 -0
- package/dist/esm/security/ssrf/pinned-outbound-fetch.backend.utils.js +258 -0
- package/dist/esm/security/ssrf/pinned-outbound-fetch.backend.utils.js.map +1 -0
- 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 +39 -0
- package/dist/esm/users/services/user-read-retained.custom-impl.backend.service.d.ts.map +1 -0
- package/dist/esm/users/services/user-read-retained.custom-impl.backend.service.js +159 -0
- package/dist/esm/users/services/user-read-retained.custom-impl.backend.service.js.map +1 -0
- 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 +11 -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 -80
- package/dist/esm/notifications/email/models/email-context-provider.interface.d.ts.map +0 -1
- package/dist/esm/notifications/email/models/email-context-provider.interface.js +0 -25
- package/dist/esm/notifications/email/models/email-context-provider.interface.js.map +0 -1
- package/dist/esm/notifications/email/services/email-context-provider-registry.backend.service.d.ts +0 -49
- package/dist/esm/notifications/email/services/email-context-provider-registry.backend.service.d.ts.map +0 -1
- package/dist/esm/notifications/email/services/email-context-provider-registry.backend.service.js +0 -141
- package/dist/esm/notifications/email/services/email-context-provider-registry.backend.service.js.map +0 -1
- package/dist/esm/notifications/email/services/email-template-compiler.backend.service.d.ts +0 -37
- package/dist/esm/notifications/email/services/email-template-compiler.backend.service.d.ts.map +0 -1
- package/dist/esm/notifications/email/services/email-template-compiler.backend.service.js +0 -121
- package/dist/esm/notifications/email/services/email-template-compiler.backend.service.js.map +0 -1
- package/dist/esm/notifications/email/services/email-template-sandbox.backend.service.d.ts +0 -58
- package/dist/esm/notifications/email/services/email-template-sandbox.backend.service.d.ts.map +0 -1
- package/dist/esm/notifications/email/services/email-template-sandbox.backend.service.js +0 -223
- package/dist/esm/notifications/email/services/email-template-sandbox.backend.service.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-operation-handler.backend.service.js","sourceRoot":"","sources":["../../../../../src/files/services/file-operation-handler.backend.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;;;;;;;;;;;;;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAgB,SAAS,EAAE,2BAA2B,EAAE,UAAU,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AACjI,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AAEpF,OAAO,EAAE,0BAA0B,EAAE,MAAM,kEAAkE,CAAC;AAC9G,OAAO,EAAE,2BAA2B,EAAE,MAAM,8EAA8E,CAAC;AAC3H,OAAO,EAAE,gCAAgC,EAAqB,MAAM,wCAAwC,CAAC;AAC7G,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAI9D,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,sDAAsD,CAAC;AACnJ,OAAO,EACL,kCAAkC,EAClC,iCAAiC,EACjC,2BAA2B,GAE5B,MAAM,qEAAqE,CAAC;AAYtE,IAAM,kCAAkC,GAAxC,MAAM,kCAAkC;IAK1B;IAEA;IAEA;IAEA;IAVT,QAAQ,CAA+D;IAEjF,YAEmB,MAAqB,EAErB,YAAwC,EAExC,kBAAoD,EAEpD,YAAiC;QANjC,WAAM,GAAN,MAAM,CAAe;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Y,CAAC,MAAM,GAAG,CAAC,IAAI,YAAY,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC1D,KAAK,CAAC,IAAI,CAAC;gBACT,aAAa,EAAE,YAAY,CAAC,KAAK,EAAE;gBACnC,aAAa,EAAE,YAAY,CAAC,KAAK,EAAE;aACpC,CAAC,CAAC;QACL,CAAC;QAED,OAAO;YACL,KAAK;YACL,yBAAyB;SAC1B,CAAC;IACJ,CAAC;CACF,CAAA;AAjnCY,kCAAkC;IAD9C,UAAU,EAAE;IAKR,WAAA,MAAM,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAA;IAEjC,WAAA,MAAM,CAAC,kBAAkB,CAAC,mBAAmB,CAAC,CAAA;IAE9C,WAAA,MAAM,CAAC,kBAAkB,CAAC,yBAAyB,CAAC,CAAA;IAEpD,WAAA,MAAM,CAAC,kBAAkB,CAAC,mBAAmB,CAAC,CAAA;+CAHhB,0BAA0B;QAEpB,gCAAgC;QAEtC,mBAAmB;GAXzC,kCAAkC,CAinC9C","sourcesContent":["/**\n * File Operation Handler Backend Service\n *\n * Handles file field operations during resource CRUD operations.\n * Validates and processes file fields when resources are created, updated, or deleted.\n *\n * Features:\n * - File validation before resource creation/update\n * - File linking/unlinking during resource operations\n * - Cascade behavior on resource deletion\n * - Idempotent operations (safe to retry)\n */\n\nimport { injectable, inject } from 'inversify';\nimport { ResourceType, ErrorType, ErrorCustomMessageReference, FileStatus, FILE_LINKABLE_STATUSES } from '@wildo-ai/saas-models';\nimport { FileGenerationSource } from '@wildo-ai/zod-decorators';\nimport { SAAS_SERVICE_TYPES } from '~wildo-backend-lib/inject/models/service-types';\nimport type { LoggerService } from '~wildo-backend-lib/monitoring/logger/services/logger.service';\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 { FileFieldDetectionBackendService, FileFieldMetadata } from './file-field-detection.backend.service';\nimport { FilesBackendService } from './files.backend.service';\nimport { ExecutionContext } from '~wildo-backend-lib/runtime/models/execution-context.backend.schemas';\nimport { RepositoryOptions } from '~wildo-backend-lib/base-classes/models/repositories.backend.schemas';\nimport { File } from '@wildo-ai/saas-models';\nimport { validateFileId, validateResourceType, validateResourceId, validateFieldName } from '~wildo-backend-lib/files/utils/file-validation.utils';\nimport {\n enumerateFileFieldValueOccurrences,\n hasExplicitCanonicalFieldMutation,\n mergeEffectiveResourceState,\n type FileFieldValueOccurrence,\n} from '~wildo-backend-lib/files/utils/file-field-schema-path.backend.utils';\n\ninterface FileFieldWriteProcessingOptions {\n /**\n * Internal-only escape hatch for framework materializers. Public write DTOs\n * still fail closed for generated PDF fields; only the exact generated\n * field/file-id pairs created by the service registry are accepted here.\n */\n frameworkGeneratedPdfFileIdsByField?: Record<string, readonly string[]>;\n}\n\n@injectable()\nexport class FileOperationHandlerBackendService {\n protected logDebug: (message: string, context?: Record<string, unknown>) => void;\n\n constructor(\n @inject(SAAS_SERVICE_TYPES.Logger)\n private readonly logger: LoggerService,\n @inject(SAAS_SERVICE_TYPES.ErrorBuilderService)\n private readonly errorBuilder: ErrorBuilderBackendService,\n @inject(SAAS_SERVICE_TYPES.FileFieldDetectionService)\n private readonly fileFieldDetection: FileFieldDetectionBackendService,\n @inject(SAAS_SERVICE_TYPES.FilesBackendService)\n private readonly filesService: FilesBackendService,\n ) {\n this.logDebug = this.logger.debugByType('FileOperationHandlerBackendService');\n this.logger.setDebugTypeLogging('FileOperationHandlerBackendService', false);\n }\n\n private isGeneratedPdfFileField(fileField: FileFieldMetadata): boolean {\n return fileField.fileMetadata.generation?.source === FileGenerationSource.PDF_TEMPLATE;\n }\n\n /**\n * The ONE place that decides whether a file's status admits linking (issue #320).\n *\n * Both link-time validators (CREATE and UPDATE) used to compare against the literal\n * `FileStatus.UPLOADED`, so a file the scanner had certified `CLEAN` — a status\n * `FILE_STATUS_TRANSITIONS` explicitly allows to become `LINKED` — was refused with an error\n * naming `UPLOADED` as the expected state. Whether a scanned file could be attached depended on\n * beating the scanner. The admitted set now comes from `FILE_LINKABLE_STATUSES`, the single copy\n * shared with `FilesBackendService.linkFileToResource`.\n *\n * `SCANNING` is named separately: the file is not wrong, it is not yet KNOWN to be safe, so the\n * caller must learn to retry rather than re-upload. Every other non-linkable status (PENDING,\n * FAILED, DELETED, ORPHANED, INFECTED, QUARANTINED, and LINKED-to-something-else, which\n * `linkFileToResource` distinguishes further) is a terminal refusal for this write.\n *\n * @param diagnostics - log-only context; never rendered to the caller.\n */\n private assertFileLinkable(\n file: Pick<File, 'status'>,\n executionContext: ExecutionContext<any>,\n diagnostics: Record<string, unknown>,\n ): void {\n if (FILE_LINKABLE_STATUSES.has(file.status)) {\n return;\n }\n throw this.errorBuilder.buildError(\n ErrorType.BUSINESS_RULE,\n executionContext,\n {\n customMessageReference: file.status === FileStatus.SCANNING\n ? ErrorCustomMessageReference.FILE_SCAN_IN_PROGRESS\n : ErrorCustomMessageReference.FILE_NOT_LINKABLE,\n context: {\n // diagnostic (log-only)\n ...diagnostics,\n fileStatus: file.status,\n linkableStatuses: [...FILE_LINKABLE_STATUSES],\n },\n }\n );\n }\n\n /**\n * Best-effort cleanup for the previous generated PDF after REGENERATE.\n *\n * The parent field already points at the newly rendered file when this runs.\n * A cleanup failure must not roll back a successful regeneration; the normal\n * file cleanup path can still pick up the stale generated file later.\n */\n async softDeleteGeneratedFileReplacement(params: {\n fileId: string | undefined;\n replacementFileId: string;\n fieldName: string;\n executionContext: ExecutionContext<any>;\n options?: RepositoryOptions;\n }): Promise<void> {\n if (!params.fileId || params.fileId === params.replacementFileId) {\n return;\n }\n\n try {\n await this.filesService.deleteFile(\n params.fileId,\n params.executionContext,\n params.options,\n );\n } catch (error) {\n this.logger.warn('Failed to soft-delete replaced generated PDF file', {\n fileId: params.fileId,\n replacementFileId: params.replacementFileId,\n fieldName: params.fieldName,\n ...projectCaughtErrorLogFields(error),\n });\n }\n }\n\n private assertGeneratedFileFieldNotUserSupplied(params: {\n data: Record<string, any>;\n fileField: FileFieldMetadata;\n occurrences: FileFieldValueOccurrence[];\n resourceType: ResourceType;\n executionContext: ExecutionContext<any>;\n processingOptions?: FileFieldWriteProcessingOptions;\n }): void {\n if (\n !this.isGeneratedPdfFileField(params.fileField)\n || (\n params.occurrences.length === 0\n && !hasExplicitCanonicalFieldMutation(params.data, params.fileField.fieldName)\n )\n ) {\n return;\n }\n\n const allowedFileIds = params.processingOptions?.frameworkGeneratedPdfFileIdsByField?.[params.fileField.fieldName];\n if (allowedFileIds && params.occurrences.length > 0) {\n const allowed = new Set(allowedFileIds);\n const submittedFileIds = params.occurrences.flatMap((occurrence) =>\n this.extractFileIds(occurrence.value, params.executionContext, true),\n );\n if (submittedFileIds.length > 0 && submittedFileIds.every((fileId) => allowed.has(fileId))) {\n return;\n }\n }\n\n throw this.errorBuilder.buildError(\n ErrorType.BUSINESS_RULE,\n params.executionContext,\n {\n customMessageReference: ErrorCustomMessageReference.FILE_GENERATED_FIELD_NOT_WRITABLE,\n context: {\n // diagnostic (log-only)\n fieldName: params.fileField.fieldName,\n resourceType: params.resourceType,\n },\n }\n );\n }\n\n /**\n * Validate file fields before resource creation.\n * Ensures files exist, are in UPLOADED status, and are ready to be linked.\n *\n * @param data - Resource data being created\n * @param resourceType - Resource type\n * @param executionContext - Execution context\n * @param options - Repository options (for transaction support)\n * @throws Error if validation fails (fail fast before resource creation)\n */\n async validateFileFieldsForCreate(\n data: Record<string, any>,\n resourceType: ResourceType,\n executionContext: ExecutionContext<any>,\n options?: RepositoryOptions,\n processingOptions?: FileFieldWriteProcessingOptions,\n ): Promise<void> {\n // Validate inputs (CRITICAL: Prevents invalid data propagation)\n validateResourceType(resourceType, this.errorBuilder, executionContext, 'resourceType');\n\n // Check if resource has file fields\n if (!this.fileFieldDetection.hasFileFields(resourceType)) {\n return;\n }\n\n const fileFields = this.fileFieldDetection.detectFileFields(resourceType);\n\n this.logDebug('Validating file fields for CREATE', {\n resourceType,\n fileFieldsCount: fileFields.length,\n });\n\n // Collect all fileIds to validate\n const fileIdsToValidate: string[] = [];\n\n for (const fileField of fileFields) {\n const occurrences = enumerateFileFieldValueOccurrences(data, fileField.fieldName);\n this.assertGeneratedFileFieldNotUserSupplied({\n data,\n fileField,\n occurrences,\n resourceType,\n executionContext,\n processingOptions,\n });\n\n for (const occurrence of occurrences) {\n const fieldFileIds = this.extractFileIds(occurrence.value, executionContext, true);\n\n // F4-01: Enforce maxFiles constraint per concrete occurrence\n const { maxFiles, multiple } = fileField.fileMetadata;\n if (multiple && maxFiles !== undefined && fieldFileIds.length > maxFiles) {\n throw this.errorBuilder.buildError(\n ErrorType.BUSINESS_RULE,\n executionContext,\n {\n customMessageReference: ErrorCustomMessageReference.FILE_TOO_MANY_FILES,\n context: {\n // diagnostic (log-only)\n fieldName: fileField.fieldName,\n runtimeFieldPath: occurrence.runtimeFieldPath,\n resourceType,\n maxFiles,\n receivedCount: fieldFileIds.length,\n },\n }\n );\n }\n\n fileIdsToValidate.push(...fieldFileIds);\n }\n }\n\n // Validate each file\n for (const fileId of fileIdsToValidate) {\n // Validate fileId format (CRITICAL: Prevents query injection and database errors)\n validateFileId(fileId, this.errorBuilder, executionContext, 'fileId');\n\n const file = await this.filesService.getFile(fileId, executionContext, options);\n\n if (!file) {\n throw this.errorBuilder.buildError(\n ErrorType.NOT_FOUND,\n executionContext,\n {\n customMessageReference: ErrorCustomMessageReference.FILE_NOT_FOUND,\n context: {\n // diagnostic (log-only)\n fileId,\n resourceType,\n },\n }\n );\n }\n\n this.assertFileLinkable(file, executionContext, { fileId, resourceType });\n\n // Note: uploadContext validation can be added in Phase 2 if needed\n // For now, we only validate that file is UPLOADED\n }\n\n this.logDebug('File fields validation for CREATE completed', {\n resourceType,\n validatedFilesCount: fileIdsToValidate.length,\n });\n }\n\n /**\n * Process file fields after resource creation.\n * Links files to the newly created resource.\n *\n * @param data - Resource data that was created\n * @param resourceType - Resource type\n * @param resourceId - ID of the created resource\n * @param executionContext - Execution context\n */\n /**\n * Strip the PARENT resource's optimistic-lock version from options before any\n * child-file write.\n *\n * When a resource CREATE/UPDATE links/unlinks a `z_file()` field, the file is a\n * SEPARATE document with its own `_version_db_doc` lifecycle. If the parent request\n * carried an `If-Match` header, its `ifMatchVersion` must NOT fence the file update:\n * the repository would add a `{ _version_db_doc: <parentVersion> }` filter to the\n * FILE query, which (mis)matches the file by the PARENT's version and yields a\n * spurious `version_conflict` (the avatar-save 409: parent `If-Match: 0` leaking onto\n * the internal `files | update`). The transaction context is preserved so the file\n * write still participates in the parent's atomic boundary.\n */\n private stripParentVersionFence(options?: RepositoryOptions): RepositoryOptions | undefined {\n if (!options || options.ifMatchVersion === undefined) return options;\n const { ifMatchVersion: _parentVersionFence, ...fileWriteOptions } = options;\n return fileWriteOptions;\n }\n\n async processFileFieldsForCreate(\n data: Record<string, any>,\n resourceType: ResourceType,\n resourceId: string,\n executionContext: ExecutionContext<any>,\n options?: RepositoryOptions,\n processingOptions?: FileFieldWriteProcessingOptions,\n ): Promise<void> {\n // Validate inputs (CRITICAL: Prevents invalid data propagation)\n validateResourceType(resourceType, this.errorBuilder, executionContext, 'resourceType');\n validateResourceId(resourceId, this.errorBuilder, executionContext, 'resourceId');\n\n // A child-file link/unlink must not inherit the parent's optimistic-lock version.\n options = this.stripParentVersionFence(options);\n\n // Check if resource has file fields\n if (!this.fileFieldDetection.hasFileFields(resourceType)) {\n return;\n }\n\n const fileFields = this.fileFieldDetection.detectFileFields(resourceType);\n\n this.logDebug('Processing file fields for CREATE', {\n resourceType,\n resourceId,\n fileFieldsCount: fileFields.length,\n });\n\n // Process each file field\n for (const fileField of fileFields) {\n const submittedOccurrences = enumerateFileFieldValueOccurrences(data, fileField.fieldName);\n this.assertGeneratedFileFieldNotUserSupplied({\n data,\n fileField,\n occurrences: submittedOccurrences,\n resourceType,\n executionContext,\n processingOptions,\n });\n if (\n this.isGeneratedPdfFileField(fileField)\n && !processingOptions?.frameworkGeneratedPdfFileIdsByField?.[fileField.fieldName]\n ) {\n continue;\n }\n const occurrences = enumerateFileFieldValueOccurrences(data, fileField.fieldName);\n\n for (const occurrence of occurrences) {\n const fieldFileIds = this.extractFileIds(occurrence.value, executionContext, true);\n for (const fileId of fieldFileIds) {\n await this.linkFileToResource(\n fileId,\n resourceType,\n resourceId,\n fileField.fieldName,\n executionContext,\n options\n );\n }\n }\n }\n\n this.logDebug('File fields processing for CREATE completed', {\n resourceType,\n resourceId,\n });\n }\n\n /**\n * Process file fields after resource update.\n * Unlinks old files and links new files.\n * Validates new files BEFORE unlinking old ones (fail fast).\n *\n * Note: This method handles partial updates correctly. If a file field is not present\n * in `data`, it is treated as unchanged (not removed). Only explicit changes to file\n * field values trigger unlinking/linking operations.\n *\n * @param data - Updated resource data (may be partial update - only changed fields)\n * @param existingResource - Existing resource before update (complete state)\n * @param resourceType - Resource type\n * @param resourceId - Resource ID\n * @param executionContext - Execution context\n */\n async processFileFieldsForUpdate(\n data: Record<string, any>,\n existingResource: Record<string, any>,\n resourceType: ResourceType,\n resourceId: string,\n executionContext: ExecutionContext<any>,\n options?: RepositoryOptions,\n processingOptions?: FileFieldWriteProcessingOptions,\n ): Promise<void> {\n // Validate inputs (CRITICAL: Prevents invalid data propagation)\n validateResourceType(resourceType, this.errorBuilder, executionContext, 'resourceType');\n validateResourceId(resourceId, this.errorBuilder, executionContext, 'resourceId');\n\n // A child-file link/unlink must not inherit the parent's optimistic-lock version.\n options = this.stripParentVersionFence(options);\n\n // Check if resource has file fields\n if (!this.fileFieldDetection.hasFileFields(resourceType)) {\n return;\n }\n\n const fileFields = this.fileFieldDetection.detectFileFields(resourceType);\n const effectiveNewResource = mergeEffectiveResourceState(existingResource, data) as Record<string, any>;\n\n this.logDebug('Processing file fields for UPDATE', {\n resourceType,\n resourceId,\n fileFieldsCount: fileFields.length,\n });\n\n // Process each file field\n for (const fileField of fileFields) {\n const submittedOccurrences = enumerateFileFieldValueOccurrences(data, fileField.fieldName);\n this.assertGeneratedFileFieldNotUserSupplied({\n data,\n fileField,\n occurrences: submittedOccurrences,\n resourceType,\n executionContext,\n processingOptions,\n });\n if (\n this.isGeneratedPdfFileField(fileField)\n && !processingOptions?.frameworkGeneratedPdfFileIdsByField?.[fileField.fieldName]\n ) {\n continue;\n }\n const oldOccurrences = this.prepareOccurrences(\n enumerateFileFieldValueOccurrences(existingResource, fileField.fieldName),\n executionContext,\n false,\n );\n const newOccurrences = this.prepareOccurrences(\n enumerateFileFieldValueOccurrences(effectiveNewResource, fileField.fieldName),\n executionContext,\n true,\n );\n\n const occurrencePairs = this.matchOccurrences(oldOccurrences, newOccurrences);\n if (occurrencePairs.requiresAmbiguousFallback && fileField.fileMetadata.overridable === false) {\n throw this.errorBuilder.buildError(\n ErrorType.BUSINESS_RULE,\n executionContext,\n {\n customMessageReference: ErrorCustomMessageReference.FILE_NESTED_UPDATE_AMBIGUOUS,\n context: {\n // diagnostic (log-only)\n fieldName: fileField.fieldName,\n resourceType,\n resourceId,\n },\n }\n );\n }\n\n for (const pair of occurrencePairs.pairs) {\n const oldFileIds = pair.oldOccurrence?.fileIds ?? [];\n const newFileIds = pair.newOccurrence?.fileIds ?? [];\n const oldSet = new Set(oldFileIds);\n const newSet = new Set(newFileIds);\n const hasChanged =\n oldSet.size !== newSet.size ||\n !oldFileIds.every(id => newSet.has(id)) ||\n !newFileIds.every(id => oldSet.has(id));\n\n if (!hasChanged) {\n continue;\n }\n\n const runtimeFieldPath = pair.newOccurrence?.occurrence.runtimeFieldPath\n ?? pair.oldOccurrence?.occurrence.runtimeFieldPath;\n\n // F4-02: Enforce overridable constraint\n const { overridable, multiple, maxFiles } = fileField.fileMetadata;\n if (overridable === false) {\n const removedFileIds = oldFileIds.filter(id => !newSet.has(id));\n\n if (!multiple) {\n if (removedFileIds.length > 0) {\n throw this.errorBuilder.buildError(\n ErrorType.BUSINESS_RULE,\n executionContext,\n {\n customMessageReference: ErrorCustomMessageReference.FILE_FIELD_NOT_OVERRIDABLE,\n context: {\n // diagnostic (log-only)\n fieldName: fileField.fieldName,\n runtimeFieldPath,\n resourceType,\n resourceId,\n },\n }\n );\n }\n } else if (removedFileIds.length > 0) {\n throw this.errorBuilder.buildError(\n ErrorType.BUSINESS_RULE,\n executionContext,\n {\n customMessageReference: ErrorCustomMessageReference.FILE_FIELD_NOT_OVERRIDABLE,\n context: {\n // diagnostic (log-only)\n fieldName: fileField.fieldName,\n runtimeFieldPath,\n resourceType,\n resourceId,\n removedFileIds,\n },\n }\n );\n }\n }\n\n if (multiple && maxFiles !== undefined && newFileIds.length > maxFiles) {\n throw this.errorBuilder.buildError(\n ErrorType.BUSINESS_RULE,\n executionContext,\n {\n customMessageReference: ErrorCustomMessageReference.FILE_TOO_MANY_FILES,\n context: {\n // diagnostic (log-only)\n fieldName: fileField.fieldName,\n runtimeFieldPath,\n resourceType,\n resourceId,\n maxFiles,\n newTotal: newFileIds.length,\n },\n }\n );\n }\n\n for (const fileId of newFileIds) {\n if (!oldSet.has(fileId)) {\n // New file - validate fileId format (CRITICAL: Prevents query injection and database errors)\n validateFileId(fileId, this.errorBuilder, executionContext, 'fileId');\n\n const file = await this.filesService.getFile(fileId, executionContext, options);\n\n if (!file) {\n throw this.errorBuilder.buildError(\n ErrorType.NOT_FOUND,\n executionContext,\n {\n customMessageReference: ErrorCustomMessageReference.FILE_NOT_FOUND,\n context: {\n // diagnostic (log-only)\n fileId,\n resourceType,\n resourceId,\n runtimeFieldPath,\n },\n }\n );\n }\n\n this.assertFileLinkable(file, executionContext, { fileId, runtimeFieldPath, resourceType, resourceId });\n }\n }\n\n for (const oldFileId of oldFileIds) {\n if (!newSet.has(oldFileId)) {\n // File removed - unlink it\n await this.unlinkFileFromResource(\n oldFileId,\n fileField.fieldName,\n executionContext,\n options\n );\n }\n }\n\n for (const newFileId of newFileIds) {\n if (!oldSet.has(newFileId)) {\n // New file - link it\n await this.linkFileToResource(\n newFileId,\n resourceType,\n resourceId,\n fileField.fieldName,\n executionContext,\n options\n );\n }\n }\n }\n }\n\n this.logDebug('File fields processing for UPDATE completed', {\n resourceType,\n resourceId,\n });\n }\n\n /**\n * Process file fields before resource deletion.\n * Applies onParentDelete behavior to all linked files.\n *\n * @param resourceType - Resource type being deleted\n * @param resourceId - Resource ID being deleted\n * @param executionContext - Execution context\n */\n /**\n * Carry the owner ALREADY VERIFIED by `listFilesForResource` (which authorized each returned file\n * against the parent resource's derived scope) onto the options used for the subsequent delete/erase,\n * so the deletion gate (`getFile`'s per-file authorize) checks against that owner rather than the\n * identity-less system-cascade EC — which would otherwise DENY the subject's own file and abort the\n * erasure. Never widens access: `authorizeFileAccess` still matches this against the file's own scope.\n */\n private withAuthoritativeFileScope(options: RepositoryOptions | undefined, file: File): RepositoryOptions {\n return {\n ...(options ?? {}),\n authoritativeFileScope: {\n applicationId: file.applicationId,\n organizationId: file.organizationId,\n userId: file.userId,\n },\n };\n }\n\n async processFileFieldsForDelete(\n resourceType: ResourceType,\n resourceId: string,\n executionContext: ExecutionContext<any>,\n options?: RepositoryOptions\n ): Promise<void> {\n // A child-file cleanup must not inherit the parent's optimistic-lock version.\n options = this.stripParentVersionFence(options);\n\n // Check if resource has file fields\n if (!this.fileFieldDetection.hasFileFields(resourceType)) {\n return;\n }\n\n const fileFields = this.fileFieldDetection.detectFileFields(resourceType);\n\n this.logDebug('Processing file fields for DELETE', {\n resourceType,\n resourceId,\n fileFieldsCount: fileFields.length,\n });\n\n // Get all files linked to this resource\n const linkedFiles = await this.filesService.listFilesForResource(\n resourceType,\n resourceId,\n undefined, // fieldName - undefined means all fields\n executionContext,\n options\n );\n\n // Process each file based on onParentDelete behavior from field metadata\n for (const file of linkedFiles) {\n // Forward the owner `listFilesForResource` already verified for THIS file to the deletion gate,\n // so a system-cascade teardown (identity-less EC) does not deny the subject's own file.\n const teardownOptions = this.withAuthoritativeFileScope(options, file);\n if (!file.linkedFieldName) {\n this.logger.warn('Linked file missing linkedFieldName during parent delete; defaulting to cascade cleanup', {\n fileId: file.fileId,\n resourceType,\n resourceId,\n });\n await this.applyOnParentDeleteBehavior(\n file.fileId,\n 'cascade',\n executionContext,\n teardownOptions\n );\n continue;\n }\n\n const fileField = this.fileFieldDetection.getFileFieldMetadata(\n resourceType,\n file.linkedFieldName\n );\n\n if (!fileField) {\n // Field not found - use default cascade behavior\n await this.applyOnParentDeleteBehavior(\n file.fileId,\n 'cascade',\n executionContext,\n teardownOptions\n );\n continue;\n }\n\n const onParentDelete = fileField.fileMetadata.onParentDelete || 'cascade';\n\n await this.applyOnParentDeleteBehavior(\n file.fileId,\n onParentDelete,\n executionContext,\n teardownOptions\n );\n }\n\n this.logDebug('File fields processing for DELETE completed', {\n resourceType,\n resourceId,\n processedFilesCount: linkedFiles.length,\n });\n }\n\n /**\n * Process file fields when a resource row is IMPERSONALIZED-AND-RETAINED (gate **G-FILE**).\n *\n * The row survives for a legal/audit obligation, so this is NOT the delete cascade — but \"keep the\n * record\" must not become \"keep the personal data\". A field-level scrub cannot reach inside a stored\n * blob (a passport scan stays a passport scan however the row is rewritten), so for a file field the\n * only real erasure is deleting the file.\n *\n * Which files? Exactly the ones whose field the author marked personal with `.impersonalizeWith()` —\n * the SAME author-responsibility contract as ordinary fields, reusing the same vocabulary rather\n * than inventing a second axis. The caller passes the scrub patch's field names:\n * - field IS scrubbed (REMOVE) ⇒ delete the file. The scrub patch nulls the pointer in the same\n * write, so the retained row keeps no dangling reference.\n * - field NOT scrubbed (KEEP / untreated) ⇒ leave the file. This is how a legally-required artifact\n * (an invoice PDF that IS the retained record) survives the erasure.\n *\n * Why deletion is required rather than relying on the row being hidden: the resource-scoped serve\n * route inherits the parent's READ authorization, so a hidden retained row already blocks it — but\n * the GLOBAL `/files/:fileId` route (direct / consumable-token / public-share) is explicitly NOT\n * resource-scoped and re-checks only the file's OWN scope. A file left ACTIVE therefore stays\n * reachable there even though its parent row is invisible.\n *\n * Erasure here goes through `FilesBackendService.eraseFile`, NOT `deleteFile`: besides marking the\n * file DELETED it scrubs the file row's OWN personal data (`originalFilename`, `uploadedBy`) in the\n * same write. Without that, the row's metadata stayed readable on the global metadata route for the\n * weeks until physical cleanup — an \"erasure\" that leaked `passport-jane-doe.pdf` the whole time. A\n * lifecycle delete deliberately keeps that provenance; a privacy erasure must not.\n *\n * Physical storage cleanup stays with the existing cleanup batch, so an erasure never mixes a DB\n * rollback with non-transactional storage side effects.\n *\n * ## The MIDDLE state — keep-but-hide — is deliberately NOT built (decided 2026-08-09)\n *\n * There are only two outcomes above, and the consequence of the second is worth stating plainly: a KEEP\n * file stays ORDINARILY READABLE to the file's own scope (its organization) through the global route,\n * indefinitely, even though its parent row is now invisible. A third state — retained but reachable only\n * through the audited see-through door, mirroring the parent row's posture — was considered and refused\n * for three reasons, in order of weight:\n *\n * 1. **It would contradict a decision already taken.** The concrete case that motivates it is the\n * invoice PDF, and the billing retention decision was explicitly \"retained as audit material, and\n * invoices stay VISIBLE\" for ordinary accounting. Hiding retained invoice documents would reverse\n * that, and the sibling ruling on invoice URLs went the same way: keep the document, close the\n * ordinary door only where the document is not itself the record.\n * 2. **A hiding door is worthless without its reading door, and shipping one alone is worse than\n * neither.** Withholding the file without also building an audited retrieval primitive would make\n * the legally-required artifact unreachable by ANYONE — destroying the very access the retention\n * obligation exists to preserve. (Same pairing rule as the cross-tenant repair doors: a marking\n * door without its release door is a one-way door calling itself a window.)\n * 3. **No shipped resource needs it.** The author already controls both ends per field: mark the field\n * and the file is erased, leave it and the file survives. The gap is only the middle, and nothing in\n * the tree declares a file field that is simultaneously personal, legally required, and must stop\n * being ordinarily visible.\n *\n * **What would trigger building it:** a resource declaring exactly that combination. The shape is then a\n * new `FileStatus` member excluded from `FILE_DOWNLOADABLE_STATUSES` and added to\n * `FILE_METADATA_WITHHELD_STATUSES`, a `FILE_STATUS_TRANSITIONS` entry, and — non-optional — an audited\n * see-through retrieval primitive alongside it. Do not add the status without the door.\n */\n async processFileFieldsForImpersonalize(\n resourceType: ResourceType,\n resourceId: string,\n scrubbedFieldNames: readonly string[],\n executionContext: ExecutionContext<any>,\n options?: RepositoryOptions\n ): Promise<void> {\n options = this.stripParentVersionFence(options);\n\n if (scrubbedFieldNames.length === 0 || !this.fileFieldDetection.hasFileFields(resourceType)) {\n return;\n }\n\n const scrubbedFields = new Set(scrubbedFieldNames);\n const linkedFiles = await this.filesService.listFilesForResource(\n resourceType,\n resourceId,\n undefined, // all fields — we filter by treatment below\n executionContext,\n options\n );\n\n let erasedCount = 0;\n let unattributableCount = 0;\n for (const file of linkedFiles) {\n // Fail-closed on an unattributable file: without `linkedFieldName` we cannot tell whether its\n // field was marked personal, and silently keeping it risks retaining an erased subject's\n // document. The delete cascade defaults such a file to cleanup for the same reason.\n const isUnattributable = !file.linkedFieldName;\n const isScrubbedField = isUnattributable || scrubbedFields.has(file.linkedFieldName!);\n if (!isScrubbedField) {\n continue;\n }\n if (isUnattributable) {\n /**\n * WARN, not debug: this is an irreversible deletion taken on a GUESS.\n *\n * The fail-closed default is right — a file we cannot attribute might be the erased subject's\n * passport scan — but it can equally destroy a file the retention obligation existed to KEEP\n * (an invoice PDF whose link lost its field name). Either way the cause is upstream metadata,\n * so it has to be visible: the sibling delete cascade has warned here since before this path\n * existed, and this one erased silently. Same decision, same audibility.\n */\n unattributableCount += 1;\n this.logger.warn(\n '[Retention] Erasing a linked file with no `linkedFieldName` during impersonalize — it cannot '\n + 'be attributed to a field, so the fail-closed default deletes it. If this file was meant to '\n + 'be RETAINED, its link metadata is the defect.',\n { resourceType, resourceId, fileId: file.fileId },\n );\n }\n // Forward the owner `listFilesForResource` already verified for THIS file to the deletion gate,\n // so a system-cascade (identity-less EC) impersonalize erase does not deny the subject's own file.\n await this.filesService.eraseFile(file.fileId, executionContext, this.withAuthoritativeFileScope(options, file));\n erasedCount++;\n }\n\n this.logDebug('File fields processing for IMPERSONALIZE completed', {\n resourceType,\n resourceId,\n linkedFilesCount: linkedFiles.length,\n erasedCount,\n retainedCount: linkedFiles.length - erasedCount,\n unattributableCount,\n });\n }\n\n /**\n * Extract file IDs from field value (handles single file or array).\n *\n * @param fieldValue - The raw field value from the resource object\n * @param executionContext - Current execution context\n * @param strict - When true (user input / new values), throws on invalid fileIds.\n * When false (existing DB data), silently filters and logs warnings.\n */\n private extractFileIds(fieldValue: any, executionContext?: ExecutionContext<any>, strict: boolean = false): string[] {\n if (fieldValue === null || fieldValue === undefined) {\n return [];\n }\n\n if (typeof fieldValue === 'object' && !Array.isArray(fieldValue)) {\n if ('fileId' in fieldValue) {\n return this.extractFileIds((fieldValue as { fileId?: unknown }).fileId, executionContext, strict);\n }\n\n if ('fileIds' in fieldValue) {\n return this.extractFileIds((fieldValue as { fileIds?: unknown }).fileIds, executionContext, strict);\n }\n }\n\n if (Array.isArray(fieldValue)) {\n const validFileIds: string[] = [];\n for (const fileId of fieldValue) {\n if (typeof fileId !== 'string' || fileId.trim() === '') {\n if (strict) {\n throw this.errorBuilder.buildError(\n ErrorType.VALIDATION,\n executionContext,\n {\n customMessageReference: ErrorCustomMessageReference.FILE_ID_VALIDATION_FAILED,\n context: {\n // diagnostic (log-only)\n fileId,\n receivedType: typeof fileId,\n },\n }\n );\n }\n continue;\n }\n try {\n validateFileId(fileId, this.errorBuilder, executionContext, 'fileId');\n validFileIds.push(fileId);\n } catch (error) {\n if (strict) {\n throw error; // Re-throw in strict mode — user provided invalid input\n }\n // Tolerant mode: filter out and warn (handles corrupt DB data gracefully)\n this.logger.warn('Invalid fileId filtered out during extraction', {\n fileId,\n ...projectCaughtErrorLogFields(error),\n });\n }\n }\n return validFileIds;\n }\n\n if (typeof fieldValue === 'string' && fieldValue.trim() !== '') {\n try {\n validateFileId(fieldValue, this.errorBuilder, executionContext, 'fileId');\n return [fieldValue];\n } catch (error) {\n if (strict) {\n throw error;\n }\n this.logger.warn('Invalid fileId filtered out during extraction', {\n fileId: fieldValue,\n ...projectCaughtErrorLogFields(error),\n });\n return [];\n }\n }\n\n if (strict && fieldValue !== null && fieldValue !== undefined) {\n throw this.errorBuilder.buildError(\n ErrorType.VALIDATION,\n executionContext,\n {\n customMessageReference: ErrorCustomMessageReference.FILE_FIELD_VALUE_INVALID,\n context: {\n // diagnostic (log-only)\n receivedType: typeof fieldValue,\n },\n }\n );\n }\n\n return [];\n }\n\n /**\n * Link a file to a resource.\n * Handles race conditions (idempotent - safe to call multiple times).\n */\n private async linkFileToResource(\n fileId: string,\n resourceType: ResourceType,\n resourceId: string,\n fieldName: string,\n executionContext: ExecutionContext<any>,\n options?: RepositoryOptions\n ): Promise<void> {\n // Validate inputs (CRITICAL: Prevents query injection and database errors)\n validateFileId(fileId, this.errorBuilder, executionContext, 'fileId');\n validateResourceType(resourceType, this.errorBuilder, executionContext, 'resourceType');\n validateResourceId(resourceId, this.errorBuilder, executionContext, 'resourceId');\n validateFieldName(fieldName, this.errorBuilder, executionContext, 'fieldName');\n\n // Check if file is already linked to the same resource (idempotent check - before calling service)\n // This prevents unnecessary service calls and handles idempotent cases early\n const file = await this.filesService.getFile(fileId, executionContext, options);\n if (file &&\n file.status === FileStatus.LINKED &&\n file.linkedResourceType === resourceType &&\n file.linkedResourceId === resourceId &&\n file.linkedFieldName === fieldName) {\n // Already linked to same resource - skip (idempotent)\n this.logDebug('File already linked to same resource, skipping', {\n fileId,\n resourceType,\n resourceId,\n fieldName,\n });\n return;\n }\n\n // Link file - errors propagate to fail the transaction (Decision 2.2: Option A)\n // FilesBackendService.linkFileToResource() handles idempotent cases internally (returns existing file)\n // All other errors (NOT_FOUND, BUSINESS_RULE, INTERNAL) should fail the operation\n await this.filesService.linkFileToResource(\n fileId,\n resourceType,\n resourceId,\n fieldName,\n executionContext,\n options\n );\n }\n\n /**\n * Unlink a file from a resource.\n * Applies onParentDelete behavior.\n */\n private async unlinkFileFromResource(\n fileId: string,\n fieldName: string,\n executionContext: ExecutionContext<any>,\n options?: RepositoryOptions\n ): Promise<void> {\n // Validate fileId format (CRITICAL: Prevents query injection and database errors)\n validateFileId(fileId, this.errorBuilder, executionContext, 'fileId');\n\n const file = await this.filesService.getFile(fileId, executionContext, options);\n if (!file || file.status !== FileStatus.LINKED) {\n // Already unlinked or doesn't exist - skip (idempotent)\n return;\n }\n\n // Unlink file (sets status to ORPHANED)\n await this.filesService.unlinkFileFromResource(fileId, executionContext, options);\n }\n\n /**\n * Apply onParentDelete behavior to a file.\n *\n * @param fileId - File ID\n * @param behavior - Behavior: 'cascade', 'soft-delete', or 'orphan'\n * @param executionContext - Execution context\n */\n private async applyOnParentDeleteBehavior(\n fileId: string,\n behavior: 'cascade' | 'soft-delete' | 'orphan',\n executionContext: ExecutionContext<any>,\n options?: RepositoryOptions\n ): Promise<void> {\n this.logDebug('Applying onParentDelete behavior', {\n fileId,\n behavior,\n });\n\n switch (behavior) {\n case 'cascade':\n // Cascade now marks the file as DELETED only. Physical storage cleanup is\n // intentionally deferred to the cleanup batch so resource deletes never\n // mix Mongo rollback with non-transactional storage side effects.\n await this.filesService.deleteFile(fileId, executionContext, options);\n break;\n\n case 'soft-delete':\n // Soft delete: update status to DELETED\n await this.filesService.deleteFile(fileId, executionContext, options);\n break;\n\n case 'orphan':\n // Unlink: clear parent fields, set status to ORPHANED\n await this.filesService.unlinkFileFromResource(fileId, executionContext, options);\n break;\n\n default:\n // Default to cascade\n await this.filesService.deleteFile(fileId, executionContext, options);\n }\n }\n\n private prepareOccurrences(\n occurrences: FileFieldValueOccurrence[],\n executionContext: ExecutionContext<any>,\n strict: boolean,\n ): Array<{\n occurrence: FileFieldValueOccurrence;\n fileIds: string[];\n signature: string;\n }> {\n return occurrences.map((occurrence) => {\n const fileIds = this.extractFileIds(occurrence.value, executionContext, strict);\n return {\n occurrence,\n fileIds,\n signature: JSON.stringify([...fileIds].sort()),\n };\n });\n }\n\n private matchOccurrences(\n oldOccurrences: Array<{\n occurrence: FileFieldValueOccurrence;\n fileIds: string[];\n signature: string;\n }>,\n newOccurrences: Array<{\n occurrence: FileFieldValueOccurrence;\n fileIds: string[];\n signature: string;\n }>,\n ): {\n pairs: Array<{\n oldOccurrence?: {\n occurrence: FileFieldValueOccurrence;\n fileIds: string[];\n signature: string;\n };\n newOccurrence?: {\n occurrence: FileFieldValueOccurrence;\n fileIds: string[];\n signature: string;\n };\n }>;\n requiresAmbiguousFallback: boolean;\n } {\n const pairs: Array<{\n oldOccurrence?: {\n occurrence: FileFieldValueOccurrence;\n fileIds: string[];\n signature: string;\n };\n newOccurrence?: {\n occurrence: FileFieldValueOccurrence;\n fileIds: string[];\n signature: string;\n };\n }> = [];\n\n const remainingOld = [...oldOccurrences];\n const remainingNew = [...newOccurrences];\n\n const stableIds = new Set(\n [...remainingOld, ...remainingNew]\n .map((entry) => entry.occurrence.ownerStableId)\n .filter((value): value is string => typeof value === 'string' && value.trim() !== ''),\n );\n\n for (const stableId of stableIds) {\n const oldMatches = remainingOld.filter((entry) => entry.occurrence.ownerStableId === stableId);\n const newMatches = remainingNew.filter((entry) => entry.occurrence.ownerStableId === stableId);\n\n while (oldMatches.length > 0 && newMatches.length > 0) {\n const oldEntry = oldMatches.shift()!;\n const newEntry = newMatches.shift()!;\n remainingOld.splice(remainingOld.indexOf(oldEntry), 1);\n remainingNew.splice(remainingNew.indexOf(newEntry), 1);\n pairs.push({ oldOccurrence: oldEntry, newOccurrence: newEntry });\n }\n }\n\n const oldSignatureBuckets = new Map<string, typeof remainingOld>();\n for (const entry of remainingOld) {\n if (entry.occurrence.ownerStableId) {\n continue;\n }\n const bucket = oldSignatureBuckets.get(entry.signature) ?? [];\n bucket.push(entry);\n oldSignatureBuckets.set(entry.signature, bucket);\n }\n\n for (const newEntry of [...remainingNew]) {\n if (newEntry.occurrence.ownerStableId) {\n continue;\n }\n\n const bucket = oldSignatureBuckets.get(newEntry.signature);\n const oldEntry = bucket?.shift();\n if (!oldEntry) {\n continue;\n }\n\n remainingOld.splice(remainingOld.indexOf(oldEntry), 1);\n remainingNew.splice(remainingNew.indexOf(newEntry), 1);\n pairs.push({ oldOccurrence: oldEntry, newOccurrence: newEntry });\n }\n\n const requiresAmbiguousFallback =\n remainingOld.some((entry) => !entry.occurrence.ownerStableId) &&\n remainingNew.some((entry) => !entry.occurrence.ownerStableId);\n\n while (remainingOld.length > 0 || remainingNew.length > 0) {\n pairs.push({\n oldOccurrence: remainingOld.shift(),\n newOccurrence: remainingNew.shift(),\n });\n }\n\n return {\n pairs,\n requiresAmbiguousFallback,\n };\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"file-operation-handler.backend.service.js","sourceRoot":"","sources":["../../../../src/files/services/file-operation-handler.backend.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;;;;;;;;;;;;;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAgB,SAAS,EAAE,2BAA2B,EAAE,UAAU,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AACjI,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AAEpF,OAAO,EAAE,0BAA0B,EAAE,MAAM,kEAAkE,CAAC;AAC9G,OAAO,EAAE,2BAA2B,EAAE,MAAM,8EAA8E,CAAC;AAC3H,OAAO,EAAE,gCAAgC,EAAqB,MAAM,wCAAwC,CAAC;AAC7G,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAI9D,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,sDAAsD,CAAC;AACnJ,OAAO,EACL,kCAAkC,EAClC,iCAAiC,EACjC,2BAA2B,GAE5B,MAAM,qEAAqE,CAAC;AAYtE,IAAM,kCAAkC,GAAxC,MAAM,kCAAkC;IAK1B;IAEA;IAEA;IAEA;IAVT,QAAQ,CAA+D;IAEjF,YAEmB,MAAqB,EAErB,YAAwC,EAExC,kBAAoD,EAEpD,YAAiC;QANjC,WAAM,GAAN,MAAM,CAAe;QAErB,iBAAY,GAAZ,YAAY,CAA4B;QAExC,uBAAkB,GAAlB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G,CAAC,EAAE,CAAC;YAC1D,KAAK,CAAC,IAAI,CAAC;gBACT,aAAa,EAAE,YAAY,CAAC,KAAK,EAAE;gBACnC,aAAa,EAAE,YAAY,CAAC,KAAK,EAAE;aACpC,CAAC,CAAC;QACL,CAAC;QAED,OAAO;YACL,KAAK;YACL,yBAAyB;SAC1B,CAAC;IACJ,CAAC;CACF,CAAA;AAjnCY,kCAAkC;IAD9C,UAAU,EAAE;IAKR,WAAA,MAAM,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAA;IAEjC,WAAA,MAAM,CAAC,kBAAkB,CAAC,mBAAmB,CAAC,CAAA;IAE9C,WAAA,MAAM,CAAC,kBAAkB,CAAC,yBAAyB,CAAC,CAAA;IAEpD,WAAA,MAAM,CAAC,kBAAkB,CAAC,mBAAmB,CAAC,CAAA;+CAHhB,0BAA0B;QAEpB,gCAAgC;QAEtC,mBAAmB;GAXzC,kCAAkC,CAinC9C","sourcesContent":["/**\n * File Operation Handler Backend Service\n *\n * Handles file field operations during resource CRUD operations.\n * Validates and processes file fields when resources are created, updated, or deleted.\n *\n * Features:\n * - File validation before resource creation/update\n * - File linking/unlinking during resource operations\n * - Cascade behavior on resource deletion\n * - Idempotent operations (safe to retry)\n */\n\nimport { injectable, inject } from 'inversify';\nimport { ResourceType, ErrorType, ErrorCustomMessageReference, FileStatus, FILE_LINKABLE_STATUSES } from '@wildo-ai/saas-models';\nimport { FileGenerationSource } from '@wildo-ai/zod-decorators';\nimport { SAAS_SERVICE_TYPES } from '~wildo-backend-lib/inject/models/service-types';\nimport type { LoggerService } from '~wildo-backend-lib/monitoring/logger/services/logger.service';\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 { FileFieldDetectionBackendService, FileFieldMetadata } from './file-field-detection.backend.service';\nimport { FilesBackendService } from './files.backend.service';\nimport { ExecutionContext } from '~wildo-backend-lib/runtime/models/execution-context.backend.schemas';\nimport { RepositoryOptions } from '~wildo-backend-lib/base-classes/models/repositories.backend.schemas';\nimport { File } from '@wildo-ai/saas-models';\nimport { validateFileId, validateResourceType, validateResourceId, validateFieldName } from '~wildo-backend-lib/files/utils/file-validation.utils';\nimport {\n enumerateFileFieldValueOccurrences,\n hasExplicitCanonicalFieldMutation,\n mergeEffectiveResourceState,\n type FileFieldValueOccurrence,\n} from '~wildo-backend-lib/files/utils/file-field-schema-path.backend.utils';\n\ninterface FileFieldWriteProcessingOptions {\n /**\n * Internal-only escape hatch for framework materializers. Public write DTOs\n * still fail closed for generated PDF fields; only the exact generated\n * field/file-id pairs created by the service registry are accepted here.\n */\n frameworkGeneratedPdfFileIdsByField?: Record<string, readonly string[]>;\n}\n\n@injectable()\nexport class FileOperationHandlerBackendService {\n protected logDebug: (message: string, context?: Record<string, unknown>) => void;\n\n constructor(\n @inject(SAAS_SERVICE_TYPES.Logger)\n private readonly logger: LoggerService,\n @inject(SAAS_SERVICE_TYPES.ErrorBuilderService)\n private readonly errorBuilder: ErrorBuilderBackendService,\n @inject(SAAS_SERVICE_TYPES.FileFieldDetectionService)\n private readonly fileFieldDetection: FileFieldDetectionBackendService,\n @inject(SAAS_SERVICE_TYPES.FilesBackendService)\n private readonly filesService: FilesBackendService,\n ) {\n this.logDebug = this.logger.debugByType('FileOperationHandlerBackendService');\n this.logger.setDebugTypeLogging('FileOperationHandlerBackendService', false);\n }\n\n private isGeneratedPdfFileField(fileField: FileFieldMetadata): boolean {\n return fileField.fileMetadata.generation?.source === FileGenerationSource.PDF_TEMPLATE;\n }\n\n /**\n * The ONE place that decides whether a file's status admits linking (issue #320).\n *\n * Both link-time validators (CREATE and UPDATE) used to compare against the literal\n * `FileStatus.UPLOADED`, so a file the scanner had certified `CLEAN` — a status\n * `FILE_STATUS_TRANSITIONS` explicitly allows to become `LINKED` — was refused with an error\n * naming `UPLOADED` as the expected state. Whether a scanned file could be attached depended on\n * beating the scanner. The admitted set now comes from `FILE_LINKABLE_STATUSES`, the single copy\n * shared with `FilesBackendService.linkFileToResource`.\n *\n * `SCANNING` is named separately: the file is not wrong, it is not yet KNOWN to be safe, so the\n * caller must learn to retry rather than re-upload. Every other non-linkable status (PENDING,\n * FAILED, DELETED, ORPHANED, INFECTED, QUARANTINED, and LINKED-to-something-else, which\n * `linkFileToResource` distinguishes further) is a terminal refusal for this write.\n *\n * @param diagnostics - log-only context; never rendered to the caller.\n */\n private assertFileLinkable(\n file: Pick<File, 'status'>,\n executionContext: ExecutionContext<any>,\n diagnostics: Record<string, unknown>,\n ): void {\n if (FILE_LINKABLE_STATUSES.has(file.status)) {\n return;\n }\n throw this.errorBuilder.buildError(\n ErrorType.BUSINESS_RULE,\n executionContext,\n {\n customMessageReference: file.status === FileStatus.SCANNING\n ? ErrorCustomMessageReference.FILE_SCAN_IN_PROGRESS\n : ErrorCustomMessageReference.FILE_NOT_LINKABLE,\n context: {\n // diagnostic (log-only)\n ...diagnostics,\n fileStatus: file.status,\n linkableStatuses: [...FILE_LINKABLE_STATUSES],\n },\n }\n );\n }\n\n /**\n * Best-effort cleanup for the previous generated PDF after REGENERATE.\n *\n * The parent field already points at the newly rendered file when this runs.\n * A cleanup failure must not roll back a successful regeneration; the normal\n * file cleanup path can still pick up the stale generated file later.\n */\n async softDeleteGeneratedFileReplacement(params: {\n fileId: string | undefined;\n replacementFileId: string;\n fieldName: string;\n executionContext: ExecutionContext<any>;\n options?: RepositoryOptions;\n }): Promise<void> {\n if (!params.fileId || params.fileId === params.replacementFileId) {\n return;\n }\n\n try {\n await this.filesService.deleteFile(\n params.fileId,\n params.executionContext,\n params.options,\n );\n } catch (error) {\n this.logger.warn('Failed to soft-delete replaced generated PDF file', {\n fileId: params.fileId,\n replacementFileId: params.replacementFileId,\n fieldName: params.fieldName,\n ...projectCaughtErrorLogFields(error),\n });\n }\n }\n\n private assertGeneratedFileFieldNotUserSupplied(params: {\n data: Record<string, any>;\n fileField: FileFieldMetadata;\n occurrences: FileFieldValueOccurrence[];\n resourceType: ResourceType;\n executionContext: ExecutionContext<any>;\n processingOptions?: FileFieldWriteProcessingOptions;\n }): void {\n if (\n !this.isGeneratedPdfFileField(params.fileField)\n || (\n params.occurrences.length === 0\n && !hasExplicitCanonicalFieldMutation(params.data, params.fileField.fieldName)\n )\n ) {\n return;\n }\n\n const allowedFileIds = params.processingOptions?.frameworkGeneratedPdfFileIdsByField?.[params.fileField.fieldName];\n if (allowedFileIds && params.occurrences.length > 0) {\n const allowed = new Set(allowedFileIds);\n const submittedFileIds = params.occurrences.flatMap((occurrence) =>\n this.extractFileIds(occurrence.value, params.executionContext, true),\n );\n if (submittedFileIds.length > 0 && submittedFileIds.every((fileId) => allowed.has(fileId))) {\n return;\n }\n }\n\n throw this.errorBuilder.buildError(\n ErrorType.BUSINESS_RULE,\n params.executionContext,\n {\n customMessageReference: ErrorCustomMessageReference.FILE_GENERATED_FIELD_NOT_WRITABLE,\n context: {\n // diagnostic (log-only)\n fieldName: params.fileField.fieldName,\n resourceType: params.resourceType,\n },\n }\n );\n }\n\n /**\n * Validate file fields before resource creation.\n * Ensures files exist, are in UPLOADED status, and are ready to be linked.\n *\n * @param data - Resource data being created\n * @param resourceType - Resource type\n * @param executionContext - Execution context\n * @param options - Repository options (for transaction support)\n * @throws Error if validation fails (fail fast before resource creation)\n */\n async validateFileFieldsForCreate(\n data: Record<string, any>,\n resourceType: ResourceType,\n executionContext: ExecutionContext<any>,\n options?: RepositoryOptions,\n processingOptions?: FileFieldWriteProcessingOptions,\n ): Promise<void> {\n // Validate inputs (CRITICAL: Prevents invalid data propagation)\n validateResourceType(resourceType, this.errorBuilder, executionContext, 'resourceType');\n\n // Check if resource has file fields\n if (!this.fileFieldDetection.hasFileFields(resourceType)) {\n return;\n }\n\n const fileFields = this.fileFieldDetection.detectFileFields(resourceType);\n\n this.logDebug('Validating file fields for CREATE', {\n resourceType,\n fileFieldsCount: fileFields.length,\n });\n\n // Collect all fileIds to validate\n const fileIdsToValidate: string[] = [];\n\n for (const fileField of fileFields) {\n const occurrences = enumerateFileFieldValueOccurrences(data, fileField.fieldName);\n this.assertGeneratedFileFieldNotUserSupplied({\n data,\n fileField,\n occurrences,\n resourceType,\n executionContext,\n processingOptions,\n });\n\n for (const occurrence of occurrences) {\n const fieldFileIds = this.extractFileIds(occurrence.value, executionContext, true);\n\n // F4-01: Enforce maxFiles constraint per concrete occurrence\n const { maxFiles, multiple } = fileField.fileMetadata;\n if (multiple && maxFiles !== undefined && fieldFileIds.length > maxFiles) {\n throw this.errorBuilder.buildError(\n ErrorType.BUSINESS_RULE,\n executionContext,\n {\n customMessageReference: ErrorCustomMessageReference.FILE_TOO_MANY_FILES,\n context: {\n // diagnostic (log-only)\n fieldName: fileField.fieldName,\n runtimeFieldPath: occurrence.runtimeFieldPath,\n resourceType,\n maxFiles,\n receivedCount: fieldFileIds.length,\n },\n }\n );\n }\n\n fileIdsToValidate.push(...fieldFileIds);\n }\n }\n\n // Validate each file\n for (const fileId of fileIdsToValidate) {\n // Validate fileId format (CRITICAL: Prevents query injection and database errors)\n validateFileId(fileId, this.errorBuilder, executionContext, 'fileId');\n\n const file = await this.filesService.getFile(fileId, executionContext, options);\n\n if (!file) {\n throw this.errorBuilder.buildError(\n ErrorType.NOT_FOUND,\n executionContext,\n {\n customMessageReference: ErrorCustomMessageReference.FILE_NOT_FOUND,\n context: {\n // diagnostic (log-only)\n fileId,\n resourceType,\n },\n }\n );\n }\n\n this.assertFileLinkable(file, executionContext, { fileId, resourceType });\n\n // Note: uploadContext validation can be added in Phase 2 if needed\n // For now, we only validate that file is UPLOADED\n }\n\n this.logDebug('File fields validation for CREATE completed', {\n resourceType,\n validatedFilesCount: fileIdsToValidate.length,\n });\n }\n\n /**\n * Process file fields after resource creation.\n * Links files to the newly created resource.\n *\n * @param data - Resource data that was created\n * @param resourceType - Resource type\n * @param resourceId - ID of the created resource\n * @param executionContext - Execution context\n */\n /**\n * Strip the PARENT resource's optimistic-lock version from options before any\n * child-file write.\n *\n * When a resource CREATE/UPDATE links/unlinks a `z_file()` field, the file is a\n * SEPARATE document with its own `_version_db_doc` lifecycle. If the parent request\n * carried an `If-Match` header, its `ifMatchVersion` must NOT fence the file update:\n * the repository would add a `{ _version_db_doc: <parentVersion> }` filter to the\n * FILE query, which (mis)matches the file by the PARENT's version and yields a\n * spurious `version_conflict` (the avatar-save 409: parent `If-Match: 0` leaking onto\n * the internal `files | update`). The transaction context is preserved so the file\n * write still participates in the parent's atomic boundary.\n */\n private stripParentVersionFence(options?: RepositoryOptions): RepositoryOptions | undefined {\n if (!options || options.ifMatchVersion === undefined) return options;\n const { ifMatchVersion: _parentVersionFence, ...fileWriteOptions } = options;\n return fileWriteOptions;\n }\n\n async processFileFieldsForCreate(\n data: Record<string, any>,\n resourceType: ResourceType,\n resourceId: string,\n executionContext: ExecutionContext<any>,\n options?: RepositoryOptions,\n processingOptions?: FileFieldWriteProcessingOptions,\n ): Promise<void> {\n // Validate inputs (CRITICAL: Prevents invalid data propagation)\n validateResourceType(resourceType, this.errorBuilder, executionContext, 'resourceType');\n validateResourceId(resourceId, this.errorBuilder, executionContext, 'resourceId');\n\n // A child-file link/unlink must not inherit the parent's optimistic-lock version.\n options = this.stripParentVersionFence(options);\n\n // Check if resource has file fields\n if (!this.fileFieldDetection.hasFileFields(resourceType)) {\n return;\n }\n\n const fileFields = this.fileFieldDetection.detectFileFields(resourceType);\n\n this.logDebug('Processing file fields for CREATE', {\n resourceType,\n resourceId,\n fileFieldsCount: fileFields.length,\n });\n\n // Process each file field\n for (const fileField of fileFields) {\n const submittedOccurrences = enumerateFileFieldValueOccurrences(data, fileField.fieldName);\n this.assertGeneratedFileFieldNotUserSupplied({\n data,\n fileField,\n occurrences: submittedOccurrences,\n resourceType,\n executionContext,\n processingOptions,\n });\n if (\n this.isGeneratedPdfFileField(fileField)\n && !processingOptions?.frameworkGeneratedPdfFileIdsByField?.[fileField.fieldName]\n ) {\n continue;\n }\n const occurrences = enumerateFileFieldValueOccurrences(data, fileField.fieldName);\n\n for (const occurrence of occurrences) {\n const fieldFileIds = this.extractFileIds(occurrence.value, executionContext, true);\n for (const fileId of fieldFileIds) {\n await this.linkFileToResource(\n fileId,\n resourceType,\n resourceId,\n fileField.fieldName,\n executionContext,\n options\n );\n }\n }\n }\n\n this.logDebug('File fields processing for CREATE completed', {\n resourceType,\n resourceId,\n });\n }\n\n /**\n * Process file fields after resource update.\n * Unlinks old files and links new files.\n * Validates new files BEFORE unlinking old ones (fail fast).\n *\n * Note: This method handles partial updates correctly. If a file field is not present\n * in `data`, it is treated as unchanged (not removed). Only explicit changes to file\n * field values trigger unlinking/linking operations.\n *\n * @param data - Updated resource data (may be partial update - only changed fields)\n * @param existingResource - Existing resource before update (complete state)\n * @param resourceType - Resource type\n * @param resourceId - Resource ID\n * @param executionContext - Execution context\n */\n async processFileFieldsForUpdate(\n data: Record<string, any>,\n existingResource: Record<string, any>,\n resourceType: ResourceType,\n resourceId: string,\n executionContext: ExecutionContext<any>,\n options?: RepositoryOptions,\n processingOptions?: FileFieldWriteProcessingOptions,\n ): Promise<void> {\n // Validate inputs (CRITICAL: Prevents invalid data propagation)\n validateResourceType(resourceType, this.errorBuilder, executionContext, 'resourceType');\n validateResourceId(resourceId, this.errorBuilder, executionContext, 'resourceId');\n\n // A child-file link/unlink must not inherit the parent's optimistic-lock version.\n options = this.stripParentVersionFence(options);\n\n // Check if resource has file fields\n if (!this.fileFieldDetection.hasFileFields(resourceType)) {\n return;\n }\n\n const fileFields = this.fileFieldDetection.detectFileFields(resourceType);\n const effectiveNewResource = mergeEffectiveResourceState(existingResource, data) as Record<string, any>;\n\n this.logDebug('Processing file fields for UPDATE', {\n resourceType,\n resourceId,\n fileFieldsCount: fileFields.length,\n });\n\n // Process each file field\n for (const fileField of fileFields) {\n const submittedOccurrences = enumerateFileFieldValueOccurrences(data, fileField.fieldName);\n this.assertGeneratedFileFieldNotUserSupplied({\n data,\n fileField,\n occurrences: submittedOccurrences,\n resourceType,\n executionContext,\n processingOptions,\n });\n if (\n this.isGeneratedPdfFileField(fileField)\n && !processingOptions?.frameworkGeneratedPdfFileIdsByField?.[fileField.fieldName]\n ) {\n continue;\n }\n const oldOccurrences = this.prepareOccurrences(\n enumerateFileFieldValueOccurrences(existingResource, fileField.fieldName),\n executionContext,\n false,\n );\n const newOccurrences = this.prepareOccurrences(\n enumerateFileFieldValueOccurrences(effectiveNewResource, fileField.fieldName),\n executionContext,\n true,\n );\n\n const occurrencePairs = this.matchOccurrences(oldOccurrences, newOccurrences);\n if (occurrencePairs.requiresAmbiguousFallback && fileField.fileMetadata.overridable === false) {\n throw this.errorBuilder.buildError(\n ErrorType.BUSINESS_RULE,\n executionContext,\n {\n customMessageReference: ErrorCustomMessageReference.FILE_NESTED_UPDATE_AMBIGUOUS,\n context: {\n // diagnostic (log-only)\n fieldName: fileField.fieldName,\n resourceType,\n resourceId,\n },\n }\n );\n }\n\n for (const pair of occurrencePairs.pairs) {\n const oldFileIds = pair.oldOccurrence?.fileIds ?? [];\n const newFileIds = pair.newOccurrence?.fileIds ?? [];\n const oldSet = new Set(oldFileIds);\n const newSet = new Set(newFileIds);\n const hasChanged =\n oldSet.size !== newSet.size ||\n !oldFileIds.every(id => newSet.has(id)) ||\n !newFileIds.every(id => oldSet.has(id));\n\n if (!hasChanged) {\n continue;\n }\n\n const runtimeFieldPath = pair.newOccurrence?.occurrence.runtimeFieldPath\n ?? pair.oldOccurrence?.occurrence.runtimeFieldPath;\n\n // F4-02: Enforce overridable constraint\n const { overridable, multiple, maxFiles } = fileField.fileMetadata;\n if (overridable === false) {\n const removedFileIds = oldFileIds.filter(id => !newSet.has(id));\n\n if (!multiple) {\n if (removedFileIds.length > 0) {\n throw this.errorBuilder.buildError(\n ErrorType.BUSINESS_RULE,\n executionContext,\n {\n customMessageReference: ErrorCustomMessageReference.FILE_FIELD_NOT_OVERRIDABLE,\n context: {\n // diagnostic (log-only)\n fieldName: fileField.fieldName,\n runtimeFieldPath,\n resourceType,\n resourceId,\n },\n }\n );\n }\n } else if (removedFileIds.length > 0) {\n throw this.errorBuilder.buildError(\n ErrorType.BUSINESS_RULE,\n executionContext,\n {\n customMessageReference: ErrorCustomMessageReference.FILE_FIELD_NOT_OVERRIDABLE,\n context: {\n // diagnostic (log-only)\n fieldName: fileField.fieldName,\n runtimeFieldPath,\n resourceType,\n resourceId,\n removedFileIds,\n },\n }\n );\n }\n }\n\n if (multiple && maxFiles !== undefined && newFileIds.length > maxFiles) {\n throw this.errorBuilder.buildError(\n ErrorType.BUSINESS_RULE,\n executionContext,\n {\n customMessageReference: ErrorCustomMessageReference.FILE_TOO_MANY_FILES,\n context: {\n // diagnostic (log-only)\n fieldName: fileField.fieldName,\n runtimeFieldPath,\n resourceType,\n resourceId,\n maxFiles,\n newTotal: newFileIds.length,\n },\n }\n );\n }\n\n for (const fileId of newFileIds) {\n if (!oldSet.has(fileId)) {\n // New file - validate fileId format (CRITICAL: Prevents query injection and database errors)\n validateFileId(fileId, this.errorBuilder, executionContext, 'fileId');\n\n const file = await this.filesService.getFile(fileId, executionContext, options);\n\n if (!file) {\n throw this.errorBuilder.buildError(\n ErrorType.NOT_FOUND,\n executionContext,\n {\n customMessageReference: ErrorCustomMessageReference.FILE_NOT_FOUND,\n context: {\n // diagnostic (log-only)\n fileId,\n resourceType,\n resourceId,\n runtimeFieldPath,\n },\n }\n );\n }\n\n this.assertFileLinkable(file, executionContext, { fileId, runtimeFieldPath, resourceType, resourceId });\n }\n }\n\n for (const oldFileId of oldFileIds) {\n if (!newSet.has(oldFileId)) {\n // File removed - unlink it\n await this.unlinkFileFromResource(\n oldFileId,\n fileField.fieldName,\n executionContext,\n options\n );\n }\n }\n\n for (const newFileId of newFileIds) {\n if (!oldSet.has(newFileId)) {\n // New file - link it\n await this.linkFileToResource(\n newFileId,\n resourceType,\n resourceId,\n fileField.fieldName,\n executionContext,\n options\n );\n }\n }\n }\n }\n\n this.logDebug('File fields processing for UPDATE completed', {\n resourceType,\n resourceId,\n });\n }\n\n /**\n * Process file fields before resource deletion.\n * Applies onParentDelete behavior to all linked files.\n *\n * @param resourceType - Resource type being deleted\n * @param resourceId - Resource ID being deleted\n * @param executionContext - Execution context\n */\n /**\n * Carry the owner ALREADY VERIFIED by `listFilesForResource` (which authorized each returned file\n * against the parent resource's derived scope) onto the options used for the subsequent delete/erase,\n * so the deletion gate (`getFile`'s per-file authorize) checks against that owner rather than the\n * identity-less system-cascade EC — which would otherwise DENY the subject's own file and abort the\n * erasure. Never widens access: `authorizeFileAccess` still matches this against the file's own scope.\n */\n private withAuthoritativeFileScope(options: RepositoryOptions | undefined, file: File): RepositoryOptions {\n return {\n ...(options ?? {}),\n authoritativeFileScope: {\n applicationId: file.applicationId,\n organizationId: file.organizationId,\n userId: file.userId,\n },\n };\n }\n\n async processFileFieldsForDelete(\n resourceType: ResourceType,\n resourceId: string,\n executionContext: ExecutionContext<any>,\n options?: RepositoryOptions\n ): Promise<void> {\n // A child-file cleanup must not inherit the parent's optimistic-lock version.\n options = this.stripParentVersionFence(options);\n\n // Check if resource has file fields\n if (!this.fileFieldDetection.hasFileFields(resourceType)) {\n return;\n }\n\n const fileFields = this.fileFieldDetection.detectFileFields(resourceType);\n\n this.logDebug('Processing file fields for DELETE', {\n resourceType,\n resourceId,\n fileFieldsCount: fileFields.length,\n });\n\n // Get all files linked to this resource\n const linkedFiles = await this.filesService.listFilesForResource(\n resourceType,\n resourceId,\n undefined, // fieldName - undefined means all fields\n executionContext,\n options\n );\n\n // Process each file based on onParentDelete behavior from field metadata\n for (const file of linkedFiles) {\n // Forward the owner `listFilesForResource` already verified for THIS file to the deletion gate,\n // so a system-cascade teardown (identity-less EC) does not deny the subject's own file.\n const teardownOptions = this.withAuthoritativeFileScope(options, file);\n if (!file.linkedFieldName) {\n this.logger.warn('Linked file missing linkedFieldName during parent delete; defaulting to cascade cleanup', {\n fileId: file.fileId,\n resourceType,\n resourceId,\n });\n await this.applyOnParentDeleteBehavior(\n file.fileId,\n 'cascade',\n executionContext,\n teardownOptions\n );\n continue;\n }\n\n const fileField = this.fileFieldDetection.getFileFieldMetadata(\n resourceType,\n file.linkedFieldName\n );\n\n if (!fileField) {\n // Field not found - use default cascade behavior\n await this.applyOnParentDeleteBehavior(\n file.fileId,\n 'cascade',\n executionContext,\n teardownOptions\n );\n continue;\n }\n\n const onParentDelete = fileField.fileMetadata.onParentDelete || 'cascade';\n\n await this.applyOnParentDeleteBehavior(\n file.fileId,\n onParentDelete,\n executionContext,\n teardownOptions\n );\n }\n\n this.logDebug('File fields processing for DELETE completed', {\n resourceType,\n resourceId,\n processedFilesCount: linkedFiles.length,\n });\n }\n\n /**\n * Process file fields when a resource row is IMPERSONALIZED-AND-RETAINED (gate **G-FILE**).\n *\n * The row survives for a legal/audit obligation, so this is NOT the delete cascade — but \"keep the\n * record\" must not become \"keep the personal data\". A field-level scrub cannot reach inside a stored\n * blob (a passport scan stays a passport scan however the row is rewritten), so for a file field the\n * only real erasure is deleting the file.\n *\n * Which files? Exactly the ones whose field the author marked personal with `.impersonalizeWith()` —\n * the SAME author-responsibility contract as ordinary fields, reusing the same vocabulary rather\n * than inventing a second axis. The caller passes the scrub patch's field names:\n * - field IS scrubbed (REMOVE) ⇒ delete the file. The scrub patch nulls the pointer in the same\n * write, so the retained row keeps no dangling reference.\n * - field NOT scrubbed (KEEP / untreated) ⇒ leave the file. This is how a legally-required artifact\n * (an invoice PDF that IS the retained record) survives the erasure.\n *\n * Why deletion is required rather than relying on the row being hidden: the resource-scoped serve\n * route inherits the parent's READ authorization, so a hidden retained row already blocks it — but\n * the GLOBAL `/files/:fileId` route (direct / consumable-token / public-share) is explicitly NOT\n * resource-scoped and re-checks only the file's OWN scope. A file left ACTIVE therefore stays\n * reachable there even though its parent row is invisible.\n *\n * Erasure here goes through `FilesBackendService.eraseFile`, NOT `deleteFile`: besides marking the\n * file DELETED it scrubs the file row's OWN personal data (`originalFilename`, `uploadedBy`) in the\n * same write. Without that, the row's metadata stayed readable on the global metadata route for the\n * weeks until physical cleanup — an \"erasure\" that leaked `passport-jane-doe.pdf` the whole time. A\n * lifecycle delete deliberately keeps that provenance; a privacy erasure must not.\n *\n * Physical storage cleanup stays with the existing cleanup batch, so an erasure never mixes a DB\n * rollback with non-transactional storage side effects.\n *\n * ## The MIDDLE state — keep-but-hide — is deliberately NOT built (decided 2026-08-09)\n *\n * There are only two outcomes above, and the consequence of the second is worth stating plainly: a KEEP\n * file stays ORDINARILY READABLE to the file's own scope (its organization) through the global route,\n * indefinitely, even though its parent row is now invisible. A third state — retained but reachable only\n * through the audited see-through door, mirroring the parent row's posture — was considered and refused\n * for three reasons, in order of weight:\n *\n * 1. **It would contradict a decision already taken.** The concrete case that motivates it is the\n * invoice PDF, and the billing retention decision was explicitly \"retained as audit material, and\n * invoices stay VISIBLE\" for ordinary accounting. Hiding retained invoice documents would reverse\n * that, and the sibling ruling on invoice URLs went the same way: keep the document, close the\n * ordinary door only where the document is not itself the record.\n * 2. **A hiding door is worthless without its reading door, and shipping one alone is worse than\n * neither.** Withholding the file without also building an audited retrieval primitive would make\n * the legally-required artifact unreachable by ANYONE — destroying the very access the retention\n * obligation exists to preserve. (Same pairing rule as the cross-tenant repair doors: a marking\n * door without its release door is a one-way door calling itself a window.)\n * 3. **No shipped resource needs it.** The author already controls both ends per field: mark the field\n * and the file is erased, leave it and the file survives. The gap is only the middle, and nothing in\n * the tree declares a file field that is simultaneously personal, legally required, and must stop\n * being ordinarily visible.\n *\n * **What would trigger building it:** a resource declaring exactly that combination. The shape is then a\n * new `FileStatus` member excluded from `FILE_DOWNLOADABLE_STATUSES` and added to\n * `FILE_METADATA_WITHHELD_STATUSES`, a `FILE_STATUS_TRANSITIONS` entry, and — non-optional — an audited\n * see-through retrieval primitive alongside it. Do not add the status without the door.\n */\n async processFileFieldsForImpersonalize(\n resourceType: ResourceType,\n resourceId: string,\n scrubbedFieldNames: readonly string[],\n executionContext: ExecutionContext<any>,\n options?: RepositoryOptions\n ): Promise<void> {\n options = this.stripParentVersionFence(options);\n\n if (scrubbedFieldNames.length === 0 || !this.fileFieldDetection.hasFileFields(resourceType)) {\n return;\n }\n\n const scrubbedFields = new Set(scrubbedFieldNames);\n const linkedFiles = await this.filesService.listFilesForResource(\n resourceType,\n resourceId,\n undefined, // all fields — we filter by treatment below\n executionContext,\n options\n );\n\n let erasedCount = 0;\n let unattributableCount = 0;\n for (const file of linkedFiles) {\n // Fail-closed on an unattributable file: without `linkedFieldName` we cannot tell whether its\n // field was marked personal, and silently keeping it risks retaining an erased subject's\n // document. The delete cascade defaults such a file to cleanup for the same reason.\n const isUnattributable = !file.linkedFieldName;\n const isScrubbedField = isUnattributable || scrubbedFields.has(file.linkedFieldName!);\n if (!isScrubbedField) {\n continue;\n }\n if (isUnattributable) {\n /**\n * WARN, not debug: this is an irreversible deletion taken on a GUESS.\n *\n * The fail-closed default is right — a file we cannot attribute might be the erased subject's\n * passport scan — but it can equally destroy a file the retention obligation existed to KEEP\n * (an invoice PDF whose link lost its field name). Either way the cause is upstream metadata,\n * so it has to be visible: the sibling delete cascade has warned here since before this path\n * existed, and this one erased silently. Same decision, same audibility.\n */\n unattributableCount += 1;\n this.logger.warn(\n '[Retention] Erasing a linked file with no `linkedFieldName` during impersonalize — it cannot '\n + 'be attributed to a field, so the fail-closed default deletes it. If this file was meant to '\n + 'be RETAINED, its link metadata is the defect.',\n { resourceType, resourceId, fileId: file.fileId },\n );\n }\n // Forward the owner `listFilesForResource` already verified for THIS file to the deletion gate,\n // so a system-cascade (identity-less EC) impersonalize erase does not deny the subject's own file.\n await this.filesService.eraseFile(file.fileId, executionContext, this.withAuthoritativeFileScope(options, file));\n erasedCount++;\n }\n\n this.logDebug('File fields processing for IMPERSONALIZE completed', {\n resourceType,\n resourceId,\n linkedFilesCount: linkedFiles.length,\n erasedCount,\n retainedCount: linkedFiles.length - erasedCount,\n unattributableCount,\n });\n }\n\n /**\n * Extract file IDs from field value (handles single file or array).\n *\n * @param fieldValue - The raw field value from the resource object\n * @param executionContext - Current execution context\n * @param strict - When true (user input / new values), throws on invalid fileIds.\n * When false (existing DB data), silently filters and logs warnings.\n */\n private extractFileIds(fieldValue: any, executionContext?: ExecutionContext<any>, strict: boolean = false): string[] {\n if (fieldValue === null || fieldValue === undefined) {\n return [];\n }\n\n if (typeof fieldValue === 'object' && !Array.isArray(fieldValue)) {\n if ('fileId' in fieldValue) {\n return this.extractFileIds((fieldValue as { fileId?: unknown }).fileId, executionContext, strict);\n }\n\n if ('fileIds' in fieldValue) {\n return this.extractFileIds((fieldValue as { fileIds?: unknown }).fileIds, executionContext, strict);\n }\n }\n\n if (Array.isArray(fieldValue)) {\n const validFileIds: string[] = [];\n for (const fileId of fieldValue) {\n if (typeof fileId !== 'string' || fileId.trim() === '') {\n if (strict) {\n throw this.errorBuilder.buildError(\n ErrorType.VALIDATION,\n executionContext,\n {\n customMessageReference: ErrorCustomMessageReference.FILE_ID_VALIDATION_FAILED,\n context: {\n // diagnostic (log-only)\n fileId,\n receivedType: typeof fileId,\n },\n }\n );\n }\n continue;\n }\n try {\n validateFileId(fileId, this.errorBuilder, executionContext, 'fileId');\n validFileIds.push(fileId);\n } catch (error) {\n if (strict) {\n throw error; // Re-throw in strict mode — user provided invalid input\n }\n // Tolerant mode: filter out and warn (handles corrupt DB data gracefully)\n this.logger.warn('Invalid fileId filtered out during extraction', {\n fileId,\n ...projectCaughtErrorLogFields(error),\n });\n }\n }\n return validFileIds;\n }\n\n if (typeof fieldValue === 'string' && fieldValue.trim() !== '') {\n try {\n validateFileId(fieldValue, this.errorBuilder, executionContext, 'fileId');\n return [fieldValue];\n } catch (error) {\n if (strict) {\n throw error;\n }\n this.logger.warn('Invalid fileId filtered out during extraction', {\n fileId: fieldValue,\n ...projectCaughtErrorLogFields(error),\n });\n return [];\n }\n }\n\n if (strict && fieldValue !== null && fieldValue !== undefined) {\n throw this.errorBuilder.buildError(\n ErrorType.VALIDATION,\n executionContext,\n {\n customMessageReference: ErrorCustomMessageReference.FILE_FIELD_VALUE_INVALID,\n context: {\n // diagnostic (log-only)\n receivedType: typeof fieldValue,\n },\n }\n );\n }\n\n return [];\n }\n\n /**\n * Link a file to a resource.\n * Handles race conditions (idempotent - safe to call multiple times).\n */\n private async linkFileToResource(\n fileId: string,\n resourceType: ResourceType,\n resourceId: string,\n fieldName: string,\n executionContext: ExecutionContext<any>,\n options?: RepositoryOptions\n ): Promise<void> {\n // Validate inputs (CRITICAL: Prevents query injection and database errors)\n validateFileId(fileId, this.errorBuilder, executionContext, 'fileId');\n validateResourceType(resourceType, this.errorBuilder, executionContext, 'resourceType');\n validateResourceId(resourceId, this.errorBuilder, executionContext, 'resourceId');\n validateFieldName(fieldName, this.errorBuilder, executionContext, 'fieldName');\n\n // Check if file is already linked to the same resource (idempotent check - before calling service)\n // This prevents unnecessary service calls and handles idempotent cases early\n const file = await this.filesService.getFile(fileId, executionContext, options);\n if (file &&\n file.status === FileStatus.LINKED &&\n file.linkedResourceType === resourceType &&\n file.linkedResourceId === resourceId &&\n file.linkedFieldName === fieldName) {\n // Already linked to same resource - skip (idempotent)\n this.logDebug('File already linked to same resource, skipping', {\n fileId,\n resourceType,\n resourceId,\n fieldName,\n });\n return;\n }\n\n // Link file - errors propagate to fail the transaction (Decision 2.2: Option A)\n // FilesBackendService.linkFileToResource() handles idempotent cases internally (returns existing file)\n // All other errors (NOT_FOUND, BUSINESS_RULE, INTERNAL) should fail the operation\n await this.filesService.linkFileToResource(\n fileId,\n resourceType,\n resourceId,\n fieldName,\n executionContext,\n options\n );\n }\n\n /**\n * Unlink a file from a resource.\n * Applies onParentDelete behavior.\n */\n private async unlinkFileFromResource(\n fileId: string,\n fieldName: string,\n executionContext: ExecutionContext<any>,\n options?: RepositoryOptions\n ): Promise<void> {\n // Validate fileId format (CRITICAL: Prevents query injection and database errors)\n validateFileId(fileId, this.errorBuilder, executionContext, 'fileId');\n\n const file = await this.filesService.getFile(fileId, executionContext, options);\n if (!file || file.status !== FileStatus.LINKED) {\n // Already unlinked or doesn't exist - skip (idempotent)\n return;\n }\n\n // Unlink file (sets status to ORPHANED)\n await this.filesService.unlinkFileFromResource(fileId, executionContext, options);\n }\n\n /**\n * Apply onParentDelete behavior to a file.\n *\n * @param fileId - File ID\n * @param behavior - Behavior: 'cascade', 'soft-delete', or 'orphan'\n * @param executionContext - Execution context\n */\n private async applyOnParentDeleteBehavior(\n fileId: string,\n behavior: 'cascade' | 'soft-delete' | 'orphan',\n executionContext: ExecutionContext<any>,\n options?: RepositoryOptions\n ): Promise<void> {\n this.logDebug('Applying onParentDelete behavior', {\n fileId,\n behavior,\n });\n\n switch (behavior) {\n case 'cascade':\n // Cascade now marks the file as DELETED only. Physical storage cleanup is\n // intentionally deferred to the cleanup batch so resource deletes never\n // mix Mongo rollback with non-transactional storage side effects.\n await this.filesService.deleteFile(fileId, executionContext, options);\n break;\n\n case 'soft-delete':\n // Soft delete: update status to DELETED\n await this.filesService.deleteFile(fileId, executionContext, options);\n break;\n\n case 'orphan':\n // Unlink: clear parent fields, set status to ORPHANED\n await this.filesService.unlinkFileFromResource(fileId, executionContext, options);\n break;\n\n default:\n // Default to cascade\n await this.filesService.deleteFile(fileId, executionContext, options);\n }\n }\n\n private prepareOccurrences(\n occurrences: FileFieldValueOccurrence[],\n executionContext: ExecutionContext<any>,\n strict: boolean,\n ): Array<{\n occurrence: FileFieldValueOccurrence;\n fileIds: string[];\n signature: string;\n }> {\n return occurrences.map((occurrence) => {\n const fileIds = this.extractFileIds(occurrence.value, executionContext, strict);\n return {\n occurrence,\n fileIds,\n signature: JSON.stringify([...fileIds].sort()),\n };\n });\n }\n\n private matchOccurrences(\n oldOccurrences: Array<{\n occurrence: FileFieldValueOccurrence;\n fileIds: string[];\n signature: string;\n }>,\n newOccurrences: Array<{\n occurrence: FileFieldValueOccurrence;\n fileIds: string[];\n signature: string;\n }>,\n ): {\n pairs: Array<{\n oldOccurrence?: {\n occurrence: FileFieldValueOccurrence;\n fileIds: string[];\n signature: string;\n };\n newOccurrence?: {\n occurrence: FileFieldValueOccurrence;\n fileIds: string[];\n signature: string;\n };\n }>;\n requiresAmbiguousFallback: boolean;\n } {\n const pairs: Array<{\n oldOccurrence?: {\n occurrence: FileFieldValueOccurrence;\n fileIds: string[];\n signature: string;\n };\n newOccurrence?: {\n occurrence: FileFieldValueOccurrence;\n fileIds: string[];\n signature: string;\n };\n }> = [];\n\n const remainingOld = [...oldOccurrences];\n const remainingNew = [...newOccurrences];\n\n const stableIds = new Set(\n [...remainingOld, ...remainingNew]\n .map((entry) => entry.occurrence.ownerStableId)\n .filter((value): value is string => typeof value === 'string' && value.trim() !== ''),\n );\n\n for (const stableId of stableIds) {\n const oldMatches = remainingOld.filter((entry) => entry.occurrence.ownerStableId === stableId);\n const newMatches = remainingNew.filter((entry) => entry.occurrence.ownerStableId === stableId);\n\n while (oldMatches.length > 0 && newMatches.length > 0) {\n const oldEntry = oldMatches.shift()!;\n const newEntry = newMatches.shift()!;\n remainingOld.splice(remainingOld.indexOf(oldEntry), 1);\n remainingNew.splice(remainingNew.indexOf(newEntry), 1);\n pairs.push({ oldOccurrence: oldEntry, newOccurrence: newEntry });\n }\n }\n\n const oldSignatureBuckets = new Map<string, typeof remainingOld>();\n for (const entry of remainingOld) {\n if (entry.occurrence.ownerStableId) {\n continue;\n }\n const bucket = oldSignatureBuckets.get(entry.signature) ?? [];\n bucket.push(entry);\n oldSignatureBuckets.set(entry.signature, bucket);\n }\n\n for (const newEntry of [...remainingNew]) {\n if (newEntry.occurrence.ownerStableId) {\n continue;\n }\n\n const bucket = oldSignatureBuckets.get(newEntry.signature);\n const oldEntry = bucket?.shift();\n if (!oldEntry) {\n continue;\n }\n\n remainingOld.splice(remainingOld.indexOf(oldEntry), 1);\n remainingNew.splice(remainingNew.indexOf(newEntry), 1);\n pairs.push({ oldOccurrence: oldEntry, newOccurrence: newEntry });\n }\n\n const requiresAmbiguousFallback =\n remainingOld.some((entry) => !entry.occurrence.ownerStableId) &&\n remainingNew.some((entry) => !entry.occurrence.ownerStableId);\n\n while (remainingOld.length > 0 || remainingNew.length > 0) {\n pairs.push({\n oldOccurrence: remainingOld.shift(),\n newOccurrence: remainingNew.shift(),\n });\n }\n\n return {\n pairs,\n requiresAmbiguousFallback,\n };\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-population.backend.service.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"file-population.backend.service.d.ts","sourceRoot":"","sources":["../../../../src/files/services/file-population.backend.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,EAAE,YAAY,EAA0C,MAAM,uBAAuB,CAAC;AAE7F,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8DAA8D,CAAC;AAClG,OAAO,EAAE,gCAAgC,EAAqB,MAAM,wCAAwC,CAAC;AAC7G,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,qEAAqE,CAAC;AAEvG,OAAO,EAAE,0BAA0B,EAAE,MAAM,kEAAkE,CAAC;AAG9G,OAAO,EAAE,iBAAiB,EAAE,MAAM,qEAAqE,CAAC;AAMxG;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,sDAAsD;IACtD,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,qBACa,4BAA4B;IAKrC,OAAO,CAAC,QAAQ,CAAC,MAAM;IAEvB,OAAO,CAAC,QAAQ,CAAC,kBAAkB;IAEnC,OAAO,CAAC,QAAQ,CAAC,YAAY;IAE7B,OAAO,CAAC,QAAQ,CAAC,YAAY;IAV/B,SAAS,CAAC,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;gBAI9D,MAAM,EAAE,aAAa,EAErB,kBAAkB,EAAE,gCAAgC,EAEpD,YAAY,EAAE,mBAAmB,EAEjC,YAAY,EAAE,0BAA0B;IAM3D;;;;;;;;;;OAUG;IACG,kBAAkB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,EAC5E,IAAI,EAAE,CAAC,EACP,YAAY,EAAE,YAAY,EAC1B,gBAAgB,EAAE,gBAAgB,CAAC,GAAG,CAAC,EACvC,iBAAiB,GAAE,qBAA0B,EAC7C,iBAAiB,CAAC,EAAE,iBAAiB,GACpC,OAAO,CAAC,CAAC,CAAC;IAqBb;;;;;;;;;OASG;YACW,yBAAyB;IAuGvC;;;;;;;;OAQG;YACW,2BAA2B;IAqEzC,OAAO,CAAC,cAAc;IA0BtB,OAAO,CAAC,mBAAmB;IA0B3B,OAAO,CAAC,wBAAwB;IAOhC,OAAO,CAAC,wBAAwB;YAyElB,wBAAwB;CAoEvC"}
|
|
@@ -11,16 +11,33 @@
|
|
|
11
11
|
* 5. Processes combined results (CLEAN / INFECTED)
|
|
12
12
|
* 6. Quarantines infected files
|
|
13
13
|
*
|
|
14
|
-
* Scanning is **
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
14
|
+
* Scanning is **fail-closed at the gate, asynchronous in the pipeline** (#433). The upload handler
|
|
15
|
+
* AWAITS `initiateScan`, which awaits the UPLOADED -> SCANNING transition and only then fires the
|
|
16
|
+
* pipeline — so the upload response costs one status write, not a scan, and the file is already
|
|
17
|
+
* non-downloadable when the caller is told the upload succeeded. It becomes downloadable when the
|
|
18
|
+
* result handler transitions it to CLEAN.
|
|
19
|
+
*
|
|
20
|
+
* This paragraph used to say the response "returns immediately with status UPLOADED", and that was
|
|
21
|
+
* the defect: UPLOADED is a downloadable status, so a field declaring `scanPolicy: 'required'` had
|
|
22
|
+
* a window in which unscanned bytes were servable. If scanning is not required for the field, the
|
|
23
|
+
* file stays at UPLOADED and remains downloadable — that half is unchanged and deliberate.
|
|
18
24
|
*
|
|
19
25
|
* Configuration:
|
|
20
|
-
* -
|
|
21
|
-
*
|
|
26
|
+
* - Application-wide: DERIVED, not declared. Scanning is on for a field that states no policy of its
|
|
27
|
+
* own exactly when a scanner is reachable — `fileScanning.antivirus` (seeded from `CLAMAV_HOST`) or
|
|
28
|
+
* `fileScanning.yara` both enabled and reachable (`YARA_ENABLED` + `YARA_HOST`). Provisioning the
|
|
29
|
+
* sidecar IS the application-level opt-in; there is no separate on/off flag. See
|
|
30
|
+
* {@link FileScanningBackendService.isGlobalScanningEnabled} for why it is derived rather than declared.
|
|
31
|
+
* - Per-field: `z_file({ scanPolicy: 'required' | 'skip' })` overrides that, in both directions.
|
|
32
|
+
*
|
|
33
|
+
* These two lines used to name `appConfig.files.scanning.enabled`, a configuration path no schema has
|
|
34
|
+
* ever declared — so the application-wide half was documented, cast through `any`, and dead.
|
|
35
|
+
*
|
|
36
|
+
* A scan that was REQUESTED and finds no scanner now FAILS the file rather than passing it; the tail of
|
|
37
|
+
* `executeScan` carries the reasoning.
|
|
22
38
|
*/
|
|
23
39
|
import type { FileSchemaMetadata } from '@wildo-ai/zod-decorators';
|
|
40
|
+
import type { AuditLogsBackendService } from '../../compliance/audit-trails/services/audit-logs.backend.service';
|
|
24
41
|
import type { LoggerService } from '../../monitoring/logger/services/logger.service';
|
|
25
42
|
import { ErrorBuilderBackendService } from '../../errors/services/error-builder.backend.service';
|
|
26
43
|
import { ExecutionContext } from '../../runtime/models/execution-context.backend.schemas';
|
|
@@ -39,19 +56,72 @@ export declare class FileScanningBackendService {
|
|
|
39
56
|
private readonly clamavScanner;
|
|
40
57
|
private readonly yaraScanner;
|
|
41
58
|
private readonly fileStorageRouter;
|
|
59
|
+
private readonly auditLogsService?;
|
|
42
60
|
protected logDebug: (message: string, context?: Record<string, unknown>) => void;
|
|
43
61
|
private readonly onCleanCallbacks;
|
|
44
|
-
constructor(logger: LoggerService, errorBuilder: ErrorBuilderBackendService, filesService: FilesBackendService, appConfigService: AppConfigurationService, clamavScanner: ClamAVScannerBackendService, yaraScanner: YaraScannerBackendService, fileStorageRouter: FileStorageRouterBackendService);
|
|
62
|
+
constructor(logger: LoggerService, errorBuilder: ErrorBuilderBackendService, filesService: FilesBackendService, appConfigService: AppConfigurationService, clamavScanner: ClamAVScannerBackendService, yaraScanner: YaraScannerBackendService, fileStorageRouter: FileStorageRouterBackendService, auditLogsService?: AuditLogsBackendService);
|
|
45
63
|
/**
|
|
46
64
|
* Determine whether a file should be scanned after upload.
|
|
47
65
|
*
|
|
48
66
|
* Resolution order:
|
|
49
67
|
* 1. Per-field `z_file({ scanPolicy })` wins if set
|
|
50
|
-
* 2. Falls back to
|
|
68
|
+
* 2. Falls back to the application-wide answer, {@link isGlobalScanningEnabled}
|
|
69
|
+
*
|
|
70
|
+
* assurance-control: WILDO.SECURITY.INGESTED_CONTENT_INSPECTION — whether ingested content is
|
|
71
|
+
* inspected is a declared decision, per field and then per application, rather than an implicit one.
|
|
72
|
+
*
|
|
73
|
+
* The per-APPLICATION half of that claim was false until 2026-09-09: step 2 read a configuration path
|
|
74
|
+
* no schema declares, so it answered `false` in every application ever built and `scanPolicy` was the
|
|
75
|
+
* only reachable declaration. It is true now because the application-wide answer is DERIVED from the
|
|
76
|
+
* scanner topology the operator provisions — a declaration made by supplying `CLAMAV_HOST`, and
|
|
77
|
+
* refused a default. Nothing here is implicit in either direction: a field can still override, and a
|
|
78
|
+
* requested scan with no scanner refuses rather than passing (see the tail of `executeScan`).
|
|
51
79
|
*/
|
|
52
80
|
shouldScan(fileMetadata?: FileSchemaMetadata): boolean;
|
|
53
81
|
/**
|
|
54
|
-
*
|
|
82
|
+
* Whether scanning is on APPLICATION-WIDE, for a file field that states no `scanPolicy` of its own.
|
|
83
|
+
*
|
|
84
|
+
* DERIVED from the platform-injected `fileScanning` topology: a scanner being reachable IS the
|
|
85
|
+
* application-level opt-in.
|
|
86
|
+
*
|
|
87
|
+
* ## What this replaced
|
|
88
|
+
*
|
|
89
|
+
* `(this.appConfigService.config as Record<string, any>)?.files?.scanning?.enabled === true`. The
|
|
90
|
+
* `any` cast is the tell — `AppConfigurationSchema` declares no `files` section, `z.object` strips
|
|
91
|
+
* unknown keys, so the parsed configuration could never carry that path and the expression was
|
|
92
|
+
* `undefined === true` for every application, for the whole life of the flag. The service's own
|
|
93
|
+
* docstring documented it as the global switch.
|
|
94
|
+
*
|
|
95
|
+
* ## Why DERIVED rather than declared
|
|
96
|
+
*
|
|
97
|
+
* Adding an `enabled` boolean to `AppConfiguration_FileScanningSchema` was the other candidate and is
|
|
98
|
+
* rejected on three counts:
|
|
99
|
+
*
|
|
100
|
+
* - **the answer already exists.** `fileScanning` is a mutation-boundary-PROTECTED section
|
|
101
|
+
* (`APP_CONFIG_MUTATION_BOUNDARY_RULES` in `app-config.backend-authored.definitions.ts`: "file-scanning
|
|
102
|
+
* sidecar topology and its platform-level opt-in are env/bootstrap-owned"), so an application cannot
|
|
103
|
+
* author it. A boolean would have to be seeded from a NEW environment key sitting beside the host key
|
|
104
|
+
* that already says the same thing — a second source of truth that can disagree with the first;
|
|
105
|
+
* - **it matches the convention of the thing it gates.** ClamAV has no enable flag anywhere in this
|
|
106
|
+
* subsystem: `ClamAVScannerBackendService.isConfigured()` states "presence of a host IS the opt-in",
|
|
107
|
+
* and `buildFileServicesTopologyFromEnvironment` refuses to emit a plausible default host for exactly
|
|
108
|
+
* that reason;
|
|
109
|
+
* - **it closes the hole the repair would otherwise open.** A separate boolean makes "globally on, no
|
|
110
|
+
* scanner reachable" a REPRESENTABLE state, and that state is precisely the one the pipeline used to
|
|
111
|
+
* answer with a CLEAN verdict. Derived, the state cannot exist: the switch is on only when something
|
|
112
|
+
* can actually run. The runtime refusal in `executeScan` stays regardless, because `scanPolicy:
|
|
113
|
+
* 'required'` reaches the same tail without consulting this switch at all.
|
|
114
|
+
*
|
|
115
|
+
* The two predicates are the pipeline's OWN — `executeScan` gates its two layers on exactly
|
|
116
|
+
* `clamavScanner.isConfigured()` and `yaraScanner.isEnabled()` — so the switch and the pipeline cannot
|
|
117
|
+
* come to different conclusions about whether a scan is possible. Note `isEnabled()` is already the
|
|
118
|
+
* conjunction of YARA's two independent axes (opted in AND reachable), which is why the "enabled but
|
|
119
|
+
* unreachable" misconfiguration does not read as an application-wide opt-in here; the startup validator
|
|
120
|
+
* reports it as its own issue instead.
|
|
121
|
+
*
|
|
122
|
+
* The `isInitialized()` guard stays: both scanner reads deliberately throw
|
|
123
|
+
* `app_configuration_not_initialized` rather than softening to `false`, and a scan decision taken before
|
|
124
|
+
* configuration has landed is not a decision.
|
|
55
125
|
*/
|
|
56
126
|
isGlobalScanningEnabled(): boolean;
|
|
57
127
|
/**
|
|
@@ -88,6 +158,21 @@ export declare class FileScanningBackendService {
|
|
|
88
158
|
* - ERROR: transition to FAILED (retryable via re-scan)
|
|
89
159
|
*/
|
|
90
160
|
handleScanResult(fileId: string, result: FileScanResult, executionContext: ExecutionContext<any>): Promise<void>;
|
|
161
|
+
/**
|
|
162
|
+
* Write the scan outcome to the audit trail (#506).
|
|
163
|
+
*
|
|
164
|
+
* Best-effort and never throwing: the file's status transition is the enforcement, and an audit
|
|
165
|
+
* store being unavailable must not convert a successful quarantine into an exception that leaves
|
|
166
|
+
* the caller believing the scan failed.
|
|
167
|
+
*
|
|
168
|
+
* A CLEAN verdict is deliberately NOT audited. Every upload is scanned, so a clean row per upload
|
|
169
|
+
* would be the highest-volume event in the trail and would bury the two that matter — and the
|
|
170
|
+
* upload itself is already recorded by `FILE_UPLOAD_GRANT_REDEEMED`. What is added here is the
|
|
171
|
+
* conclusion an operator would want to be alerted on.
|
|
172
|
+
*/
|
|
173
|
+
private recordScanOutcomeAudit;
|
|
174
|
+
/** The status the FILES row actually carries after the transition, or `unknown` if it cannot be read. */
|
|
175
|
+
private resolveRecordedFileStatus;
|
|
91
176
|
/**
|
|
92
177
|
* Quarantine an infected file.
|
|
93
178
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-scanning.backend.service.d.ts","sourceRoot":"","sources":["
|
|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