@wildo-ai/saas-backend-lib 1.0.1
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__/setup.d.ts +7 -0
- package/dist/esm/__tests__/setup.d.ts.map +1 -0
- package/dist/esm/__tests__/setup.js +14 -0
- package/dist/esm/__tests__/setup.js.map +1 -0
- package/dist/esm/__tests__/test-container.d.ts +39 -0
- package/dist/esm/__tests__/test-container.d.ts.map +1 -0
- package/dist/esm/__tests__/test-container.js +94 -0
- package/dist/esm/__tests__/test-container.js.map +1 -0
- package/dist/esm/applications/models/applications.backend.schemas.d.ts +11 -0
- package/dist/esm/applications/models/applications.backend.schemas.d.ts.map +1 -0
- package/dist/esm/applications/models/applications.backend.schemas.js +15 -0
- package/dist/esm/applications/models/applications.backend.schemas.js.map +1 -0
- package/dist/esm/base-classes/models/manual-controllers.backend.definition.d.ts +12 -0
- package/dist/esm/base-classes/models/manual-controllers.backend.definition.d.ts.map +1 -0
- package/dist/esm/base-classes/models/manual-controllers.backend.definition.js +30 -0
- package/dist/esm/base-classes/models/manual-controllers.backend.definition.js.map +1 -0
- package/dist/esm/base-classes/models/repositories.backend.schemas.d.ts +98 -0
- package/dist/esm/base-classes/models/repositories.backend.schemas.d.ts.map +1 -0
- package/dist/esm/base-classes/models/repositories.backend.schemas.js +11 -0
- package/dist/esm/base-classes/models/repositories.backend.schemas.js.map +1 -0
- package/dist/esm/base-classes/services/__tests__/mock-resource-operation-helper.service.d.ts +31 -0
- package/dist/esm/base-classes/services/__tests__/mock-resource-operation-helper.service.d.ts.map +1 -0
- package/dist/esm/base-classes/services/__tests__/mock-resource-operation-helper.service.js +52 -0
- package/dist/esm/base-classes/services/__tests__/mock-resource-operation-helper.service.js.map +1 -0
- package/dist/esm/base-classes/services/batches/batches-cronjobs-custom-execution.service.d.ts +56 -0
- package/dist/esm/base-classes/services/batches/batches-cronjobs-custom-execution.service.d.ts.map +1 -0
- package/dist/esm/base-classes/services/batches/batches-cronjobs-custom-execution.service.js +52 -0
- package/dist/esm/base-classes/services/batches/batches-cronjobs-custom-execution.service.js.map +1 -0
- package/dist/esm/base-classes/services/batches/batches-cronjobs-executor.backend.service.d.ts +33 -0
- package/dist/esm/base-classes/services/batches/batches-cronjobs-executor.backend.service.d.ts.map +1 -0
- package/dist/esm/base-classes/services/batches/batches-cronjobs-executor.backend.service.js +125 -0
- package/dist/esm/base-classes/services/batches/batches-cronjobs-executor.backend.service.js.map +1 -0
- package/dist/esm/base-classes/services/batches/batches-cronjobs-resource-execution.backend.service.d.ts +20 -0
- package/dist/esm/base-classes/services/batches/batches-cronjobs-resource-execution.backend.service.d.ts.map +1 -0
- package/dist/esm/base-classes/services/batches/batches-cronjobs-resource-execution.backend.service.js +45 -0
- package/dist/esm/base-classes/services/batches/batches-cronjobs-resource-execution.backend.service.js.map +1 -0
- package/dist/esm/base-classes/services/controllers/abstract-controller.backend.service.d.ts +133 -0
- package/dist/esm/base-classes/services/controllers/abstract-controller.backend.service.d.ts.map +1 -0
- package/dist/esm/base-classes/services/controllers/abstract-controller.backend.service.js +280 -0
- package/dist/esm/base-classes/services/controllers/abstract-controller.backend.service.js.map +1 -0
- package/dist/esm/base-classes/services/controllers/controller-resource.backend.service.d.ts +147 -0
- package/dist/esm/base-classes/services/controllers/controller-resource.backend.service.d.ts.map +1 -0
- package/dist/esm/base-classes/services/controllers/controller-resource.backend.service.js +1320 -0
- package/dist/esm/base-classes/services/controllers/controller-resource.backend.service.js.map +1 -0
- package/dist/esm/base-classes/services/controllers/controllers-registry-handler.backend.service.d.ts +107 -0
- package/dist/esm/base-classes/services/controllers/controllers-registry-handler.backend.service.d.ts.map +1 -0
- package/dist/esm/base-classes/services/controllers/controllers-registry-handler.backend.service.js +369 -0
- package/dist/esm/base-classes/services/controllers/controllers-registry-handler.backend.service.js.map +1 -0
- package/dist/esm/base-classes/services/controllers/validate-field-handler.backend.service.d.ts +194 -0
- package/dist/esm/base-classes/services/controllers/validate-field-handler.backend.service.d.ts.map +1 -0
- package/dist/esm/base-classes/services/controllers/validate-field-handler.backend.service.js +417 -0
- package/dist/esm/base-classes/services/controllers/validate-field-handler.backend.service.js.map +1 -0
- package/dist/esm/base-classes/services/repositories/__tests__/mock-repositories-registry-handler.service.d.ts +9 -0
- package/dist/esm/base-classes/services/repositories/__tests__/mock-repositories-registry-handler.service.d.ts.map +1 -0
- package/dist/esm/base-classes/services/repositories/__tests__/mock-repositories-registry-handler.service.js +35 -0
- package/dist/esm/base-classes/services/repositories/__tests__/mock-repositories-registry-handler.service.js.map +1 -0
- package/dist/esm/base-classes/services/repositories/postgresql-resource-repository.backend.service.d.ts +107 -0
- package/dist/esm/base-classes/services/repositories/postgresql-resource-repository.backend.service.d.ts.map +1 -0
- package/dist/esm/base-classes/services/repositories/postgresql-resource-repository.backend.service.js +800 -0
- package/dist/esm/base-classes/services/repositories/postgresql-resource-repository.backend.service.js.map +1 -0
- package/dist/esm/base-classes/services/repositories/repositories-registry-handler.backend.service.d.ts +181 -0
- package/dist/esm/base-classes/services/repositories/repositories-registry-handler.backend.service.d.ts.map +1 -0
- package/dist/esm/base-classes/services/repositories/repositories-registry-handler.backend.service.js +529 -0
- package/dist/esm/base-classes/services/repositories/repositories-registry-handler.backend.service.js.map +1 -0
- package/dist/esm/base-classes/services/repositories/repository-resource.backend.service.d.ts +245 -0
- package/dist/esm/base-classes/services/repositories/repository-resource.backend.service.d.ts.map +1 -0
- package/dist/esm/base-classes/services/repositories/repository-resource.backend.service.js +1509 -0
- package/dist/esm/base-classes/services/repositories/repository-resource.backend.service.js.map +1 -0
- package/dist/esm/base-classes/services/resource-operations-helper.backend.service.d.ts +134 -0
- package/dist/esm/base-classes/services/resource-operations-helper.backend.service.d.ts.map +1 -0
- package/dist/esm/base-classes/services/resource-operations-helper.backend.service.js +388 -0
- package/dist/esm/base-classes/services/resource-operations-helper.backend.service.js.map +1 -0
- package/dist/esm/base-classes/services/services/__tests__/mock-services-registry-handler.service.d.ts +9 -0
- package/dist/esm/base-classes/services/services/__tests__/mock-services-registry-handler.service.d.ts.map +1 -0
- package/dist/esm/base-classes/services/services/__tests__/mock-services-registry-handler.service.js +26 -0
- package/dist/esm/base-classes/services/services/__tests__/mock-services-registry-handler.service.js.map +1 -0
- package/dist/esm/base-classes/services/services/resource-operation-custom-implementation-base.backend.service.d.ts +144 -0
- package/dist/esm/base-classes/services/services/resource-operation-custom-implementation-base.backend.service.d.ts.map +1 -0
- package/dist/esm/base-classes/services/services/resource-operation-custom-implementation-base.backend.service.js +49 -0
- package/dist/esm/base-classes/services/services/resource-operation-custom-implementation-base.backend.service.js.map +1 -0
- package/dist/esm/base-classes/services/services/resource-operation-custom-implementation-registry.backend.service.d.ts +84 -0
- package/dist/esm/base-classes/services/services/resource-operation-custom-implementation-registry.backend.service.d.ts.map +1 -0
- package/dist/esm/base-classes/services/services/resource-operation-custom-implementation-registry.backend.service.js +156 -0
- package/dist/esm/base-classes/services/services/resource-operation-custom-implementation-registry.backend.service.js.map +1 -0
- package/dist/esm/base-classes/services/services/resource-operation-custom-implementation.factory.backend.d.ts +42 -0
- package/dist/esm/base-classes/services/services/resource-operation-custom-implementation.factory.backend.d.ts.map +1 -0
- package/dist/esm/base-classes/services/services/resource-operation-custom-implementation.factory.backend.js +94 -0
- package/dist/esm/base-classes/services/services/resource-operation-custom-implementation.factory.backend.js.map +1 -0
- package/dist/esm/base-classes/services/services/services-registry-handler.backend.service.d.ts +593 -0
- package/dist/esm/base-classes/services/services/services-registry-handler.backend.service.d.ts.map +1 -0
- package/dist/esm/base-classes/services/services/services-registry-handler.backend.service.js +4015 -0
- package/dist/esm/base-classes/services/services/services-registry-handler.backend.service.js.map +1 -0
- package/dist/esm/base-classes/utils/backend-type-utils.d.ts +43 -0
- package/dist/esm/base-classes/utils/backend-type-utils.d.ts.map +1 -0
- package/dist/esm/base-classes/utils/backend-type-utils.js +10 -0
- package/dist/esm/base-classes/utils/backend-type-utils.js.map +1 -0
- package/dist/esm/billing/services/back-office/abstract-billing.backend.service.d.ts +44 -0
- package/dist/esm/billing/services/back-office/abstract-billing.backend.service.d.ts.map +1 -0
- package/dist/esm/billing/services/back-office/abstract-billing.backend.service.js +94 -0
- package/dist/esm/billing/services/back-office/abstract-billing.backend.service.js.map +1 -0
- package/dist/esm/billing/services/back-office/billing-feature-sync.backend.service.d.ts +102 -0
- package/dist/esm/billing/services/back-office/billing-feature-sync.backend.service.d.ts.map +1 -0
- package/dist/esm/billing/services/back-office/billing-feature-sync.backend.service.js +405 -0
- package/dist/esm/billing/services/back-office/billing-feature-sync.backend.service.js.map +1 -0
- package/dist/esm/billing/services/back-office/billing-state.backend.service.d.ts +55 -0
- package/dist/esm/billing/services/back-office/billing-state.backend.service.d.ts.map +1 -0
- package/dist/esm/billing/services/back-office/billing-state.backend.service.js +268 -0
- package/dist/esm/billing/services/back-office/billing-state.backend.service.js.map +1 -0
- package/dist/esm/billing/services/back-office/product-catalog-sync.backend.service.d.ts +83 -0
- package/dist/esm/billing/services/back-office/product-catalog-sync.backend.service.d.ts.map +1 -0
- package/dist/esm/billing/services/back-office/product-catalog-sync.backend.service.js +371 -0
- package/dist/esm/billing/services/back-office/product-catalog-sync.backend.service.js.map +1 -0
- package/dist/esm/billing/services/back-office/usage-metering.backend.service.d.ts +80 -0
- package/dist/esm/billing/services/back-office/usage-metering.backend.service.d.ts.map +1 -0
- package/dist/esm/billing/services/back-office/usage-metering.backend.service.js +255 -0
- package/dist/esm/billing/services/back-office/usage-metering.backend.service.js.map +1 -0
- package/dist/esm/billing/services/billing.utils.d.ts +17 -0
- package/dist/esm/billing/services/billing.utils.d.ts.map +1 -0
- package/dist/esm/billing/services/billing.utils.js +25 -0
- package/dist/esm/billing/services/billing.utils.js.map +1 -0
- package/dist/esm/billing/services/custom-impl/billing-account.mutations.custom-impl.backend.service.d.ts +50 -0
- package/dist/esm/billing/services/custom-impl/billing-account.mutations.custom-impl.backend.service.d.ts.map +1 -0
- package/dist/esm/billing/services/custom-impl/billing-account.mutations.custom-impl.backend.service.js +290 -0
- package/dist/esm/billing/services/custom-impl/billing-account.mutations.custom-impl.backend.service.js.map +1 -0
- package/dist/esm/billing/services/custom-impl/billing-custom-impl-utils.backend.d.ts +92 -0
- package/dist/esm/billing/services/custom-impl/billing-custom-impl-utils.backend.d.ts.map +1 -0
- package/dist/esm/billing/services/custom-impl/billing-custom-impl-utils.backend.js +193 -0
- package/dist/esm/billing/services/custom-impl/billing-custom-impl-utils.backend.js.map +1 -0
- package/dist/esm/billing/services/custom-impl/billing-custom-implementations.backend.d.ts +66 -0
- package/dist/esm/billing/services/custom-impl/billing-custom-implementations.backend.d.ts.map +1 -0
- package/dist/esm/billing/services/custom-impl/billing-custom-implementations.backend.js +180 -0
- package/dist/esm/billing/services/custom-impl/billing-custom-implementations.backend.js.map +1 -0
- package/dist/esm/billing/services/custom-impl/credit-pool.custom-ops.custom-impl.backend.service.d.ts +31 -0
- package/dist/esm/billing/services/custom-impl/credit-pool.custom-ops.custom-impl.backend.service.d.ts.map +1 -0
- package/dist/esm/billing/services/custom-impl/credit-pool.custom-ops.custom-impl.backend.service.js +100 -0
- package/dist/esm/billing/services/custom-impl/credit-pool.custom-ops.custom-impl.backend.service.js.map +1 -0
- package/dist/esm/billing/services/custom-impl/promotion.custom-ops.custom-impl.backend.service.d.ts +33 -0
- package/dist/esm/billing/services/custom-impl/promotion.custom-ops.custom-impl.backend.service.d.ts.map +1 -0
- package/dist/esm/billing/services/custom-impl/promotion.custom-ops.custom-impl.backend.service.js +200 -0
- package/dist/esm/billing/services/custom-impl/promotion.custom-ops.custom-impl.backend.service.js.map +1 -0
- package/dist/esm/billing/services/custom-impl/subscription.mutations.custom-impl.backend.service.d.ts +58 -0
- package/dist/esm/billing/services/custom-impl/subscription.mutations.custom-impl.backend.service.d.ts.map +1 -0
- package/dist/esm/billing/services/custom-impl/subscription.mutations.custom-impl.backend.service.js +362 -0
- package/dist/esm/billing/services/custom-impl/subscription.mutations.custom-impl.backend.service.js.map +1 -0
- package/dist/esm/billing/services/webhooks/billing-webhook-adapter.backend.service.d.ts +19 -0
- package/dist/esm/billing/services/webhooks/billing-webhook-adapter.backend.service.d.ts.map +1 -0
- package/dist/esm/billing/services/webhooks/billing-webhook-adapter.backend.service.js +50 -0
- package/dist/esm/billing/services/webhooks/billing-webhook-adapter.backend.service.js.map +1 -0
- package/dist/esm/billing/services/webhooks/billing-webhook-capability-handler.backend.service.d.ts +21 -0
- package/dist/esm/billing/services/webhooks/billing-webhook-capability-handler.backend.service.d.ts.map +1 -0
- package/dist/esm/billing/services/webhooks/billing-webhook-capability-handler.backend.service.js +32 -0
- package/dist/esm/billing/services/webhooks/billing-webhook-capability-handler.backend.service.js.map +1 -0
- package/dist/esm/billing/services/webhooks/billing-webhook-event-router.backend.service.d.ts +114 -0
- package/dist/esm/billing/services/webhooks/billing-webhook-event-router.backend.service.d.ts.map +1 -0
- package/dist/esm/billing/services/webhooks/billing-webhook-event-router.backend.service.js +569 -0
- package/dist/esm/billing/services/webhooks/billing-webhook-event-router.backend.service.js.map +1 -0
- package/dist/esm/billing/testing/billing-test-fixtures.d.ts +109 -0
- package/dist/esm/billing/testing/billing-test-fixtures.d.ts.map +1 -0
- package/dist/esm/billing/testing/billing-test-fixtures.js +200 -0
- package/dist/esm/billing/testing/billing-test-fixtures.js.map +1 -0
- package/dist/esm/billing/testing/mock-billing-provider.d.ts +152 -0
- package/dist/esm/billing/testing/mock-billing-provider.d.ts.map +1 -0
- package/dist/esm/billing/testing/mock-billing-provider.js +394 -0
- package/dist/esm/billing/testing/mock-billing-provider.js.map +1 -0
- package/dist/esm/charts/controllers/chart.backend.controller.d.ts +46 -0
- package/dist/esm/charts/controllers/chart.backend.controller.d.ts.map +1 -0
- package/dist/esm/charts/controllers/chart.backend.controller.js +214 -0
- package/dist/esm/charts/controllers/chart.backend.controller.js.map +1 -0
- package/dist/esm/charts/services/chart-registry.backend.service.d.ts +55 -0
- package/dist/esm/charts/services/chart-registry.backend.service.d.ts.map +1 -0
- package/dist/esm/charts/services/chart-registry.backend.service.js +102 -0
- package/dist/esm/charts/services/chart-registry.backend.service.js.map +1 -0
- package/dist/esm/compliance/audit-trails/audit-logs.custom-impl.backend.service.d.ts +9 -0
- package/dist/esm/compliance/audit-trails/audit-logs.custom-impl.backend.service.d.ts.map +1 -0
- package/dist/esm/compliance/audit-trails/audit-logs.custom-impl.backend.service.js +80 -0
- package/dist/esm/compliance/audit-trails/audit-logs.custom-impl.backend.service.js.map +1 -0
- package/dist/esm/compliance/audit-trails/services/__tests__/mock-audit-logs.service.d.ts +23 -0
- package/dist/esm/compliance/audit-trails/services/__tests__/mock-audit-logs.service.d.ts.map +1 -0
- package/dist/esm/compliance/audit-trails/services/__tests__/mock-audit-logs.service.js +46 -0
- package/dist/esm/compliance/audit-trails/services/__tests__/mock-audit-logs.service.js.map +1 -0
- package/dist/esm/compliance/audit-trails/services/audit-event-dispatcher.backend.service.d.ts +73 -0
- package/dist/esm/compliance/audit-trails/services/audit-event-dispatcher.backend.service.d.ts.map +1 -0
- package/dist/esm/compliance/audit-trails/services/audit-event-dispatcher.backend.service.js +291 -0
- package/dist/esm/compliance/audit-trails/services/audit-event-dispatcher.backend.service.js.map +1 -0
- package/dist/esm/compliance/audit-trails/services/audit-logs.backend.service.d.ts +447 -0
- package/dist/esm/compliance/audit-trails/services/audit-logs.backend.service.d.ts.map +1 -0
- package/dist/esm/compliance/audit-trails/services/audit-logs.backend.service.js +898 -0
- package/dist/esm/compliance/audit-trails/services/audit-logs.backend.service.js.map +1 -0
- package/dist/esm/compliance/audit-trails/services/siem-webhook-delivery.backend.service.d.ts +127 -0
- package/dist/esm/compliance/audit-trails/services/siem-webhook-delivery.backend.service.d.ts.map +1 -0
- package/dist/esm/compliance/audit-trails/services/siem-webhook-delivery.backend.service.js +462 -0
- package/dist/esm/compliance/audit-trails/services/siem-webhook-delivery.backend.service.js.map +1 -0
- package/dist/esm/compliance/index.d.ts +2 -0
- package/dist/esm/compliance/index.d.ts.map +1 -0
- package/dist/esm/compliance/index.js +1 -0
- package/dist/esm/compliance/index.js.map +1 -0
- package/dist/esm/config/custom/application-config-controller.backend.service.d.ts +31 -0
- package/dist/esm/config/custom/application-config-controller.backend.service.d.ts.map +1 -0
- package/dist/esm/config/custom/application-config-controller.backend.service.js +112 -0
- package/dist/esm/config/custom/application-config-controller.backend.service.js.map +1 -0
- package/dist/esm/config/models/app-config-overrides.backend.definitions.d.ts +29 -0
- package/dist/esm/config/models/app-config-overrides.backend.definitions.d.ts.map +1 -0
- package/dist/esm/config/models/app-config-overrides.backend.definitions.js +143 -0
- package/dist/esm/config/models/app-config-overrides.backend.definitions.js.map +1 -0
- package/dist/esm/config/models/app-config-secrets.backend.schemas.d.ts +56 -0
- package/dist/esm/config/models/app-config-secrets.backend.schemas.d.ts.map +1 -0
- package/dist/esm/config/models/app-config-secrets.backend.schemas.js +121 -0
- package/dist/esm/config/models/app-config-secrets.backend.schemas.js.map +1 -0
- package/dist/esm/config/models/app-config.backend-authored.definitions.d.ts +35 -0
- package/dist/esm/config/models/app-config.backend-authored.definitions.d.ts.map +1 -0
- package/dist/esm/config/models/app-config.backend-authored.definitions.js +89 -0
- package/dist/esm/config/models/app-config.backend-authored.definitions.js.map +1 -0
- package/dist/esm/config/models/app-config.backend.schemas.d.ts +1651 -0
- package/dist/esm/config/models/app-config.backend.schemas.d.ts.map +1 -0
- package/dist/esm/config/models/app-config.backend.schemas.js +478 -0
- package/dist/esm/config/models/app-config.backend.schemas.js.map +1 -0
- package/dist/esm/config/models/app-env-config.backend.schemas.d.ts +74 -0
- package/dist/esm/config/models/app-env-config.backend.schemas.d.ts.map +1 -0
- package/dist/esm/config/models/app-env-config.backend.schemas.js +115 -0
- package/dist/esm/config/models/app-env-config.backend.schemas.js.map +1 -0
- package/dist/esm/config/models/config-mutation-boundary.utils.d.ts +11 -0
- package/dist/esm/config/models/config-mutation-boundary.utils.d.ts.map +1 -0
- package/dist/esm/config/models/config-mutation-boundary.utils.js +50 -0
- package/dist/esm/config/models/config-mutation-boundary.utils.js.map +1 -0
- package/dist/esm/config/models/postgresql-env-config.backend.schemas.d.ts +48 -0
- package/dist/esm/config/models/postgresql-env-config.backend.schemas.d.ts.map +1 -0
- package/dist/esm/config/models/postgresql-env-config.backend.schemas.js +106 -0
- package/dist/esm/config/models/postgresql-env-config.backend.schemas.js.map +1 -0
- package/dist/esm/config/models/runtime-topology.backend.contracts.d.ts +12 -0
- package/dist/esm/config/models/runtime-topology.backend.contracts.d.ts.map +1 -0
- package/dist/esm/config/models/runtime-topology.backend.contracts.js +23 -0
- package/dist/esm/config/models/runtime-topology.backend.contracts.js.map +1 -0
- package/dist/esm/config/services/__tests__/mock-app-configuration.service.d.ts +39 -0
- package/dist/esm/config/services/__tests__/mock-app-configuration.service.d.ts.map +1 -0
- package/dist/esm/config/services/__tests__/mock-app-configuration.service.js +124 -0
- package/dist/esm/config/services/__tests__/mock-app-configuration.service.js.map +1 -0
- package/dist/esm/config/services/app-configuration-loader.backend.service.d.ts +76 -0
- package/dist/esm/config/services/app-configuration-loader.backend.service.d.ts.map +1 -0
- package/dist/esm/config/services/app-configuration-loader.backend.service.js +375 -0
- package/dist/esm/config/services/app-configuration-loader.backend.service.js.map +1 -0
- package/dist/esm/config/services/app-configuration.backend.service.d.ts +148 -0
- package/dist/esm/config/services/app-configuration.backend.service.d.ts.map +1 -0
- package/dist/esm/config/services/app-configuration.backend.service.js +494 -0
- package/dist/esm/config/services/app-configuration.backend.service.js.map +1 -0
- package/dist/esm/config/services/app-configuration.backend.utils.d.ts +17 -0
- package/dist/esm/config/services/app-configuration.backend.utils.d.ts.map +1 -0
- package/dist/esm/config/services/app-configuration.backend.utils.js +61 -0
- package/dist/esm/config/services/app-configuration.backend.utils.js.map +1 -0
- package/dist/esm/config/services/application-startup-config-validator.backend.service.d.ts +70 -0
- package/dist/esm/config/services/application-startup-config-validator.backend.service.d.ts.map +1 -0
- package/dist/esm/config/services/application-startup-config-validator.backend.service.js +470 -0
- package/dist/esm/config/services/application-startup-config-validator.backend.service.js.map +1 -0
- package/dist/esm/databases/models/aggregation.backend.schemas.d.ts +136 -0
- package/dist/esm/databases/models/aggregation.backend.schemas.d.ts.map +1 -0
- package/dist/esm/databases/models/aggregation.backend.schemas.js +9 -0
- package/dist/esm/databases/models/aggregation.backend.schemas.js.map +1 -0
- package/dist/esm/databases/models/databases.backend.schemas.d.ts +32 -0
- package/dist/esm/databases/models/databases.backend.schemas.d.ts.map +1 -0
- package/dist/esm/databases/models/databases.backend.schemas.js +60 -0
- package/dist/esm/databases/models/databases.backend.schemas.js.map +1 -0
- package/dist/esm/databases/models/filter.backend.schemas.d.ts +83 -0
- package/dist/esm/databases/models/filter.backend.schemas.d.ts.map +1 -0
- package/dist/esm/databases/models/filter.backend.schemas.js +27 -0
- package/dist/esm/databases/models/filter.backend.schemas.js.map +1 -0
- package/dist/esm/databases/models/sql.backend.schemas.d.ts +75 -0
- package/dist/esm/databases/models/sql.backend.schemas.d.ts.map +1 -0
- package/dist/esm/databases/models/sql.backend.schemas.js +31 -0
- package/dist/esm/databases/models/sql.backend.schemas.js.map +1 -0
- package/dist/esm/databases/models/transaction.shared.schemas.d.ts +120 -0
- package/dist/esm/databases/models/transaction.shared.schemas.d.ts.map +1 -0
- package/dist/esm/databases/models/transaction.shared.schemas.js +30 -0
- package/dist/esm/databases/models/transaction.shared.schemas.js.map +1 -0
- package/dist/esm/databases/services/__tests__/mock-mongo-transaction-registry.service.d.ts +15 -0
- package/dist/esm/databases/services/__tests__/mock-mongo-transaction-registry.service.d.ts.map +1 -0
- package/dist/esm/databases/services/__tests__/mock-mongo-transaction-registry.service.js +60 -0
- package/dist/esm/databases/services/__tests__/mock-mongo-transaction-registry.service.js.map +1 -0
- package/dist/esm/databases/services/__tests__/mock-mongodb.service.d.ts +19 -0
- package/dist/esm/databases/services/__tests__/mock-mongodb.service.d.ts.map +1 -0
- package/dist/esm/databases/services/__tests__/mock-mongodb.service.js +69 -0
- package/dist/esm/databases/services/__tests__/mock-mongodb.service.js.map +1 -0
- package/dist/esm/databases/services/__tests__/mock-mongoose-model.service.d.ts +11 -0
- package/dist/esm/databases/services/__tests__/mock-mongoose-model.service.d.ts.map +1 -0
- package/dist/esm/databases/services/__tests__/mock-mongoose-model.service.js +315 -0
- package/dist/esm/databases/services/__tests__/mock-mongoose-model.service.js.map +1 -0
- package/dist/esm/databases/services/__tests__/mock-redis.service.d.ts +29 -0
- package/dist/esm/databases/services/__tests__/mock-redis.service.d.ts.map +1 -0
- package/dist/esm/databases/services/__tests__/mock-redis.service.js +65 -0
- package/dist/esm/databases/services/__tests__/mock-redis.service.js.map +1 -0
- package/dist/esm/databases/services/__tests__/mock-zod-mongoose-schema-convertor.service.d.ts +19 -0
- package/dist/esm/databases/services/__tests__/mock-zod-mongoose-schema-convertor.service.d.ts.map +1 -0
- package/dist/esm/databases/services/__tests__/mock-zod-mongoose-schema-convertor.service.js +44 -0
- package/dist/esm/databases/services/__tests__/mock-zod-mongoose-schema-convertor.service.js.map +1 -0
- package/dist/esm/databases/services/aggregation/aggregation-authorization.backend.service.d.ts +74 -0
- package/dist/esm/databases/services/aggregation/aggregation-authorization.backend.service.d.ts.map +1 -0
- package/dist/esm/databases/services/aggregation/aggregation-authorization.backend.service.js +369 -0
- package/dist/esm/databases/services/aggregation/aggregation-authorization.backend.service.js.map +1 -0
- package/dist/esm/databases/services/aggregation/aggregation-query.backend.service.d.ts +110 -0
- package/dist/esm/databases/services/aggregation/aggregation-query.backend.service.d.ts.map +1 -0
- package/dist/esm/databases/services/aggregation/aggregation-query.backend.service.js +444 -0
- package/dist/esm/databases/services/aggregation/aggregation-query.backend.service.js.map +1 -0
- package/dist/esm/databases/services/aggregation/computed-measure-evaluator.backend.service.d.ts +38 -0
- package/dist/esm/databases/services/aggregation/computed-measure-evaluator.backend.service.d.ts.map +1 -0
- package/dist/esm/databases/services/aggregation/computed-measure-evaluator.backend.service.js +180 -0
- package/dist/esm/databases/services/aggregation/computed-measure-evaluator.backend.service.js.map +1 -0
- package/dist/esm/databases/services/aggregation/field-access-validator.backend.service.d.ts +42 -0
- package/dist/esm/databases/services/aggregation/field-access-validator.backend.service.d.ts.map +1 -0
- package/dist/esm/databases/services/aggregation/field-access-validator.backend.service.js +183 -0
- package/dist/esm/databases/services/aggregation/field-access-validator.backend.service.js.map +1 -0
- package/dist/esm/databases/services/aggregation/time-series-densifier.backend.service.d.ts +48 -0
- package/dist/esm/databases/services/aggregation/time-series-densifier.backend.service.d.ts.map +1 -0
- package/dist/esm/databases/services/aggregation/time-series-densifier.backend.service.js +320 -0
- package/dist/esm/databases/services/aggregation/time-series-densifier.backend.service.js.map +1 -0
- package/dist/esm/databases/services/aggregation/topn-processor.backend.service.d.ts +47 -0
- package/dist/esm/databases/services/aggregation/topn-processor.backend.service.d.ts.map +1 -0
- package/dist/esm/databases/services/aggregation/topn-processor.backend.service.js +187 -0
- package/dist/esm/databases/services/aggregation/topn-processor.backend.service.js.map +1 -0
- package/dist/esm/databases/services/aggregation/window-function-processor.backend.service.d.ts +47 -0
- package/dist/esm/databases/services/aggregation/window-function-processor.backend.service.d.ts.map +1 -0
- package/dist/esm/databases/services/aggregation/window-function-processor.backend.service.js +250 -0
- package/dist/esm/databases/services/aggregation/window-function-processor.backend.service.js.map +1 -0
- package/dist/esm/databases/services/db-utils.d.ts +56 -0
- package/dist/esm/databases/services/db-utils.d.ts.map +1 -0
- package/dist/esm/databases/services/db-utils.js +66 -0
- package/dist/esm/databases/services/db-utils.js.map +1 -0
- package/dist/esm/databases/services/mongo-aggregation.backend.service.d.ts +91 -0
- package/dist/esm/databases/services/mongo-aggregation.backend.service.d.ts.map +1 -0
- package/dist/esm/databases/services/mongo-aggregation.backend.service.js +652 -0
- package/dist/esm/databases/services/mongo-aggregation.backend.service.js.map +1 -0
- package/dist/esm/databases/services/mongodb.service.d.ts +132 -0
- package/dist/esm/databases/services/mongodb.service.d.ts.map +1 -0
- package/dist/esm/databases/services/mongodb.service.js +630 -0
- package/dist/esm/databases/services/mongodb.service.js.map +1 -0
- package/dist/esm/databases/services/postgresql-aggregation.backend.service.d.ts +113 -0
- package/dist/esm/databases/services/postgresql-aggregation.backend.service.d.ts.map +1 -0
- package/dist/esm/databases/services/postgresql-aggregation.backend.service.js +635 -0
- package/dist/esm/databases/services/postgresql-aggregation.backend.service.js.map +1 -0
- package/dist/esm/databases/services/postgresql-database.backend.service.d.ts +75 -0
- package/dist/esm/databases/services/postgresql-database.backend.service.d.ts.map +1 -0
- package/dist/esm/databases/services/postgresql-database.backend.service.js +255 -0
- package/dist/esm/databases/services/postgresql-database.backend.service.js.map +1 -0
- package/dist/esm/databases/services/postgresql-filter.backend.service.d.ts +116 -0
- package/dist/esm/databases/services/postgresql-filter.backend.service.d.ts.map +1 -0
- package/dist/esm/databases/services/postgresql-filter.backend.service.js +624 -0
- package/dist/esm/databases/services/postgresql-filter.backend.service.js.map +1 -0
- package/dist/esm/databases/services/redis.service.d.ts +143 -0
- package/dist/esm/databases/services/redis.service.d.ts.map +1 -0
- package/dist/esm/databases/services/redis.service.js +429 -0
- package/dist/esm/databases/services/redis.service.js.map +1 -0
- package/dist/esm/databases/services/zod-to-mongoose-schema-convertor.backend.service.d.ts +302 -0
- package/dist/esm/databases/services/zod-to-mongoose-schema-convertor.backend.service.d.ts.map +1 -0
- package/dist/esm/databases/services/zod-to-mongoose-schema-convertor.backend.service.js +1787 -0
- package/dist/esm/databases/services/zod-to-mongoose-schema-convertor.backend.service.js.map +1 -0
- package/dist/esm/databases/services/zod-to-sql-hybrid-schema.planner.d.ts +65 -0
- package/dist/esm/databases/services/zod-to-sql-hybrid-schema.planner.d.ts.map +1 -0
- package/dist/esm/databases/services/zod-to-sql-hybrid-schema.planner.js +237 -0
- package/dist/esm/databases/services/zod-to-sql-hybrid-schema.planner.js.map +1 -0
- package/dist/esm/errors/services/__tests__/mock-error-builder.service.d.ts +339 -0
- package/dist/esm/errors/services/__tests__/mock-error-builder.service.d.ts.map +1 -0
- package/dist/esm/errors/services/__tests__/mock-error-builder.service.js +209 -0
- package/dist/esm/errors/services/__tests__/mock-error-builder.service.js.map +1 -0
- package/dist/esm/errors/services/error-builder.backend.service.d.ts +95 -0
- package/dist/esm/errors/services/error-builder.backend.service.d.ts.map +1 -0
- package/dist/esm/errors/services/error-builder.backend.service.js +334 -0
- package/dist/esm/errors/services/error-builder.backend.service.js.map +1 -0
- package/dist/esm/errors/services/error-handler.backend.service.d.ts +43 -0
- package/dist/esm/errors/services/error-handler.backend.service.d.ts.map +1 -0
- package/dist/esm/errors/services/error-handler.backend.service.js +219 -0
- package/dist/esm/errors/services/error-handler.backend.service.js.map +1 -0
- package/dist/esm/errors/services/rate-limit.backend.service.d.ts +23 -0
- package/dist/esm/errors/services/rate-limit.backend.service.d.ts.map +1 -0
- package/dist/esm/errors/services/rate-limit.backend.service.js +59 -0
- package/dist/esm/errors/services/rate-limit.backend.service.js.map +1 -0
- package/dist/esm/external-providers/models/external-providers.backend.schemas.d.ts +135 -0
- package/dist/esm/external-providers/models/external-providers.backend.schemas.d.ts.map +1 -0
- package/dist/esm/external-providers/models/external-providers.backend.schemas.js +129 -0
- package/dist/esm/external-providers/models/external-providers.backend.schemas.js.map +1 -0
- package/dist/esm/external-providers/services/__tests__/mock-external-providers-registry.service.d.ts +18 -0
- package/dist/esm/external-providers/services/__tests__/mock-external-providers-registry.service.d.ts.map +1 -0
- package/dist/esm/external-providers/services/__tests__/mock-external-providers-registry.service.js +38 -0
- package/dist/esm/external-providers/services/__tests__/mock-external-providers-registry.service.js.map +1 -0
- package/dist/esm/external-providers/services/__tests__/mock-lazy-provider-registry.service.d.ts +20 -0
- package/dist/esm/external-providers/services/__tests__/mock-lazy-provider-registry.service.d.ts.map +1 -0
- package/dist/esm/external-providers/services/__tests__/mock-lazy-provider-registry.service.js +44 -0
- package/dist/esm/external-providers/services/__tests__/mock-lazy-provider-registry.service.js.map +1 -0
- package/dist/esm/external-providers/services/external-api-handler.backend.service.d.ts +9 -0
- package/dist/esm/external-providers/services/external-api-handler.backend.service.d.ts.map +1 -0
- package/dist/esm/external-providers/services/external-api-handler.backend.service.js +36 -0
- package/dist/esm/external-providers/services/external-api-handler.backend.service.js.map +1 -0
- package/dist/esm/external-providers/services/external-providers-registry.backend.service.d.ts +83 -0
- package/dist/esm/external-providers/services/external-providers-registry.backend.service.d.ts.map +1 -0
- package/dist/esm/external-providers/services/external-providers-registry.backend.service.js +422 -0
- package/dist/esm/external-providers/services/external-providers-registry.backend.service.js.map +1 -0
- package/dist/esm/external-providers/services/feature-bindings.backend.service.d.ts +102 -0
- package/dist/esm/external-providers/services/feature-bindings.backend.service.d.ts.map +1 -0
- package/dist/esm/external-providers/services/feature-bindings.backend.service.js +352 -0
- package/dist/esm/external-providers/services/feature-bindings.backend.service.js.map +1 -0
- package/dist/esm/external-providers/services/lazy-provider-registry.backend.service.d.ts +141 -0
- package/dist/esm/external-providers/services/lazy-provider-registry.backend.service.d.ts.map +1 -0
- package/dist/esm/external-providers/services/lazy-provider-registry.backend.service.js +391 -0
- package/dist/esm/external-providers/services/lazy-provider-registry.backend.service.js.map +1 -0
- package/dist/esm/features/controllers/features.backend.controller.d.ts +35 -0
- package/dist/esm/features/controllers/features.backend.controller.d.ts.map +1 -0
- package/dist/esm/features/controllers/features.backend.controller.js +179 -0
- package/dist/esm/features/controllers/features.backend.controller.js.map +1 -0
- package/dist/esm/features/services/__tests__/mock-capability-bindings.service.d.ts +8 -0
- package/dist/esm/features/services/__tests__/mock-capability-bindings.service.d.ts.map +1 -0
- package/dist/esm/features/services/__tests__/mock-capability-bindings.service.js +31 -0
- package/dist/esm/features/services/__tests__/mock-capability-bindings.service.js.map +1 -0
- package/dist/esm/features/services/__tests__/mock-feature-definition-registry.service.d.ts +22 -0
- package/dist/esm/features/services/__tests__/mock-feature-definition-registry.service.d.ts.map +1 -0
- package/dist/esm/features/services/__tests__/mock-feature-definition-registry.service.js +52 -0
- package/dist/esm/features/services/__tests__/mock-feature-definition-registry.service.js.map +1 -0
- package/dist/esm/features/services/__tests__/mock-feature-resolution.service.d.ts +13 -0
- package/dist/esm/features/services/__tests__/mock-feature-resolution.service.d.ts.map +1 -0
- package/dist/esm/features/services/__tests__/mock-feature-resolution.service.js +36 -0
- package/dist/esm/features/services/__tests__/mock-feature-resolution.service.js.map +1 -0
- package/dist/esm/features/services/feature-definition-registry.backend.service.d.ts +111 -0
- package/dist/esm/features/services/feature-definition-registry.backend.service.d.ts.map +1 -0
- package/dist/esm/features/services/feature-definition-registry.backend.service.js +437 -0
- package/dist/esm/features/services/feature-definition-registry.backend.service.js.map +1 -0
- package/dist/esm/features/services/feature-gate.backend.service.d.ts +110 -0
- package/dist/esm/features/services/feature-gate.backend.service.d.ts.map +1 -0
- package/dist/esm/features/services/feature-gate.backend.service.js +414 -0
- package/dist/esm/features/services/feature-gate.backend.service.js.map +1 -0
- package/dist/esm/features/services/feature-resolution.backend.service.d.ts +163 -0
- package/dist/esm/features/services/feature-resolution.backend.service.d.ts.map +1 -0
- package/dist/esm/features/services/feature-resolution.backend.service.js +550 -0
- package/dist/esm/features/services/feature-resolution.backend.service.js.map +1 -0
- package/dist/esm/features/testing/feature-test-utils.d.ts +85 -0
- package/dist/esm/features/testing/feature-test-utils.d.ts.map +1 -0
- package/dist/esm/features/testing/feature-test-utils.js +127 -0
- package/dist/esm/features/testing/feature-test-utils.js.map +1 -0
- package/dist/esm/files/batches/files-cleanup.batch.backend.service.d.ts +34 -0
- package/dist/esm/files/batches/files-cleanup.batch.backend.service.d.ts.map +1 -0
- package/dist/esm/files/batches/files-cleanup.batch.backend.service.js +226 -0
- package/dist/esm/files/batches/files-cleanup.batch.backend.service.js.map +1 -0
- package/dist/esm/files/constraints/file-analyzers.types.d.ts +76 -0
- package/dist/esm/files/constraints/file-analyzers.types.d.ts.map +1 -0
- package/dist/esm/files/constraints/file-analyzers.types.js +16 -0
- package/dist/esm/files/constraints/file-analyzers.types.js.map +1 -0
- package/dist/esm/files/constraints/file-constraint-resolver-chain.backend.service.d.ts +38 -0
- package/dist/esm/files/constraints/file-constraint-resolver-chain.backend.service.d.ts.map +1 -0
- package/dist/esm/files/constraints/file-constraint-resolver-chain.backend.service.js +99 -0
- package/dist/esm/files/constraints/file-constraint-resolver-chain.backend.service.js.map +1 -0
- package/dist/esm/files/constraints/file-constraint.types.d.ts +77 -0
- package/dist/esm/files/constraints/file-constraint.types.d.ts.map +1 -0
- package/dist/esm/files/constraints/file-constraint.types.js +16 -0
- package/dist/esm/files/constraints/file-constraint.types.js.map +1 -0
- package/dist/esm/files/constraints/file-validation.backend.service.d.ts +63 -0
- package/dist/esm/files/constraints/file-validation.backend.service.d.ts.map +1 -0
- package/dist/esm/files/constraints/file-validation.backend.service.js +317 -0
- package/dist/esm/files/constraints/file-validation.backend.service.js.map +1 -0
- package/dist/esm/files/constraints/resource-field-constraint-resolver.backend.service.d.ts +33 -0
- package/dist/esm/files/constraints/resource-field-constraint-resolver.backend.service.d.ts.map +1 -0
- package/dist/esm/files/constraints/resource-field-constraint-resolver.backend.service.js +126 -0
- package/dist/esm/files/constraints/resource-field-constraint-resolver.backend.service.js.map +1 -0
- package/dist/esm/files/controllers/file.controller.d.ts +145 -0
- package/dist/esm/files/controllers/file.controller.d.ts.map +1 -0
- package/dist/esm/files/controllers/file.controller.js +806 -0
- package/dist/esm/files/controllers/file.controller.js.map +1 -0
- package/dist/esm/files/handlers/resource-file-upload-handler.backend.service.d.ts +85 -0
- package/dist/esm/files/handlers/resource-file-upload-handler.backend.service.d.ts.map +1 -0
- package/dist/esm/files/handlers/resource-file-upload-handler.backend.service.js +512 -0
- package/dist/esm/files/handlers/resource-file-upload-handler.backend.service.js.map +1 -0
- package/dist/esm/files/rag/weaviate-vector-store.backend.service.d.ts +84 -0
- package/dist/esm/files/rag/weaviate-vector-store.backend.service.d.ts.map +1 -0
- package/dist/esm/files/rag/weaviate-vector-store.backend.service.js +224 -0
- package/dist/esm/files/rag/weaviate-vector-store.backend.service.js.map +1 -0
- package/dist/esm/files/scanning/clamav-scanner.backend.service.d.ts +55 -0
- package/dist/esm/files/scanning/clamav-scanner.backend.service.d.ts.map +1 -0
- package/dist/esm/files/scanning/clamav-scanner.backend.service.js +202 -0
- package/dist/esm/files/scanning/clamav-scanner.backend.service.js.map +1 -0
- package/dist/esm/files/scanning/file-scan.types.d.ts +17 -0
- package/dist/esm/files/scanning/file-scan.types.d.ts.map +1 -0
- package/dist/esm/files/scanning/file-scan.types.js +7 -0
- package/dist/esm/files/scanning/file-scan.types.js.map +1 -0
- package/dist/esm/files/scanning/yara-scanner.backend.service.d.ts +73 -0
- package/dist/esm/files/scanning/yara-scanner.backend.service.d.ts.map +1 -0
- package/dist/esm/files/scanning/yara-scanner.backend.service.js +184 -0
- package/dist/esm/files/scanning/yara-scanner.backend.service.js.map +1 -0
- package/dist/esm/files/services/__tests__/mock-file-field-detection.service.d.ts +12 -0
- package/dist/esm/files/services/__tests__/mock-file-field-detection.service.d.ts.map +1 -0
- package/dist/esm/files/services/__tests__/mock-file-field-detection.service.js +41 -0
- package/dist/esm/files/services/__tests__/mock-file-field-detection.service.js.map +1 -0
- package/dist/esm/files/services/__tests__/mock-file-operation-handler.service.d.ts +33 -0
- package/dist/esm/files/services/__tests__/mock-file-operation-handler.service.d.ts.map +1 -0
- package/dist/esm/files/services/__tests__/mock-file-operation-handler.service.js +71 -0
- package/dist/esm/files/services/__tests__/mock-file-operation-handler.service.js.map +1 -0
- package/dist/esm/files/services/__tests__/mock-file-repository.service.d.ts +16 -0
- package/dist/esm/files/services/__tests__/mock-file-repository.service.d.ts.map +1 -0
- package/dist/esm/files/services/__tests__/mock-file-repository.service.js +95 -0
- package/dist/esm/files/services/__tests__/mock-file-repository.service.js.map +1 -0
- package/dist/esm/files/services/file-field-detection.backend.service.d.ts +57 -0
- package/dist/esm/files/services/file-field-detection.backend.service.d.ts.map +1 -0
- package/dist/esm/files/services/file-field-detection.backend.service.js +145 -0
- package/dist/esm/files/services/file-field-detection.backend.service.js.map +1 -0
- package/dist/esm/files/services/file-operation-handler.backend.service.d.ts +103 -0
- package/dist/esm/files/services/file-operation-handler.backend.service.d.ts.map +1 -0
- package/dist/esm/files/services/file-operation-handler.backend.service.js +604 -0
- package/dist/esm/files/services/file-operation-handler.backend.service.js.map +1 -0
- package/dist/esm/files/services/file-population.backend.service.d.ts +73 -0
- package/dist/esm/files/services/file-population.backend.service.d.ts.map +1 -0
- package/dist/esm/files/services/file-population.backend.service.js +367 -0
- package/dist/esm/files/services/file-population.backend.service.js.map +1 -0
- package/dist/esm/files/services/file-rag-indexing.backend.service.d.ts +64 -0
- package/dist/esm/files/services/file-rag-indexing.backend.service.d.ts.map +1 -0
- package/dist/esm/files/services/file-rag-indexing.backend.service.js +188 -0
- package/dist/esm/files/services/file-rag-indexing.backend.service.js.map +1 -0
- package/dist/esm/files/services/file-scanning.backend.service.d.ts +97 -0
- package/dist/esm/files/services/file-scanning.backend.service.d.ts.map +1 -0
- package/dist/esm/files/services/file-scanning.backend.service.js +323 -0
- package/dist/esm/files/services/file-scanning.backend.service.js.map +1 -0
- package/dist/esm/files/services/file-text-extraction.backend.service.d.ts +52 -0
- package/dist/esm/files/services/file-text-extraction.backend.service.d.ts.map +1 -0
- package/dist/esm/files/services/file-text-extraction.backend.service.js +168 -0
- package/dist/esm/files/services/file-text-extraction.backend.service.js.map +1 -0
- package/dist/esm/files/services/files.backend.service.d.ts +235 -0
- package/dist/esm/files/services/files.backend.service.d.ts.map +1 -0
- package/dist/esm/files/services/files.backend.service.js +987 -0
- package/dist/esm/files/services/files.backend.service.js.map +1 -0
- package/dist/esm/files/storage/file-storage-path-resolver.backend.service.d.ts +50 -0
- package/dist/esm/files/storage/file-storage-path-resolver.backend.service.d.ts.map +1 -0
- package/dist/esm/files/storage/file-storage-path-resolver.backend.service.js +253 -0
- package/dist/esm/files/storage/file-storage-path-resolver.backend.service.js.map +1 -0
- package/dist/esm/files/storage/file-storage-provider.types.d.ts +156 -0
- package/dist/esm/files/storage/file-storage-provider.types.d.ts.map +1 -0
- package/dist/esm/files/storage/file-storage-provider.types.js +10 -0
- package/dist/esm/files/storage/file-storage-provider.types.js.map +1 -0
- package/dist/esm/files/storage/file-storage-router.backend.service.d.ts +68 -0
- package/dist/esm/files/storage/file-storage-router.backend.service.d.ts.map +1 -0
- package/dist/esm/files/storage/file-storage-router.backend.service.js +168 -0
- package/dist/esm/files/storage/file-storage-router.backend.service.js.map +1 -0
- package/dist/esm/files/storage/local-directory-storage-provider.backend.service.d.ts +57 -0
- package/dist/esm/files/storage/local-directory-storage-provider.backend.service.d.ts.map +1 -0
- package/dist/esm/files/storage/local-directory-storage-provider.backend.service.js +307 -0
- package/dist/esm/files/storage/local-directory-storage-provider.backend.service.js.map +1 -0
- package/dist/esm/files/storage/wildo-managed-storage-provider.backend.service.d.ts +41 -0
- package/dist/esm/files/storage/wildo-managed-storage-provider.backend.service.d.ts.map +1 -0
- package/dist/esm/files/storage/wildo-managed-storage-provider.backend.service.js +397 -0
- package/dist/esm/files/storage/wildo-managed-storage-provider.backend.service.js.map +1 -0
- package/dist/esm/files/utils/file-field-schema-path.backend.utils.d.ts +30 -0
- package/dist/esm/files/utils/file-field-schema-path.backend.utils.d.ts.map +1 -0
- package/dist/esm/files/utils/file-field-schema-path.backend.utils.js +251 -0
- package/dist/esm/files/utils/file-field-schema-path.backend.utils.js.map +1 -0
- package/dist/esm/files/utils/file-upload.utils.d.ts +74 -0
- package/dist/esm/files/utils/file-upload.utils.d.ts.map +1 -0
- package/dist/esm/files/utils/file-upload.utils.js +116 -0
- package/dist/esm/files/utils/file-upload.utils.js.map +1 -0
- package/dist/esm/files/utils/file-uploader.utils.d.ts +15 -0
- package/dist/esm/files/utils/file-uploader.utils.d.ts.map +1 -0
- package/dist/esm/files/utils/file-uploader.utils.js +47 -0
- package/dist/esm/files/utils/file-uploader.utils.js.map +1 -0
- package/dist/esm/files/utils/file-validation.utils.d.ts +111 -0
- package/dist/esm/files/utils/file-validation.utils.d.ts.map +1 -0
- package/dist/esm/files/utils/file-validation.utils.js +516 -0
- package/dist/esm/files/utils/file-validation.utils.js.map +1 -0
- package/dist/esm/flows-actors/agent-catalogs.backend.d.ts +222 -0
- package/dist/esm/flows-actors/agent-catalogs.backend.d.ts.map +1 -0
- package/dist/esm/flows-actors/agent-catalogs.backend.js +320 -0
- package/dist/esm/flows-actors/agent-catalogs.backend.js.map +1 -0
- package/dist/esm/flows-actors/controllers/flows-actors.controller.d.ts +33 -0
- package/dist/esm/flows-actors/controllers/flows-actors.controller.d.ts.map +1 -0
- package/dist/esm/flows-actors/controllers/flows-actors.controller.js +96 -0
- package/dist/esm/flows-actors/controllers/flows-actors.controller.js.map +1 -0
- package/dist/esm/flows-actors/models/agent-catalogs.backend.definitions.d.ts +225 -0
- package/dist/esm/flows-actors/models/agent-catalogs.backend.definitions.d.ts.map +1 -0
- package/dist/esm/flows-actors/models/agent-catalogs.backend.definitions.js +323 -0
- package/dist/esm/flows-actors/models/agent-catalogs.backend.definitions.js.map +1 -0
- package/dist/esm/flows-actors/models/agent-facets.backend.definitions.d.ts +77 -0
- package/dist/esm/flows-actors/models/agent-facets.backend.definitions.d.ts.map +1 -0
- package/dist/esm/flows-actors/models/agent-facets.backend.definitions.js +28 -0
- package/dist/esm/flows-actors/models/agent-facets.backend.definitions.js.map +1 -0
- package/dist/esm/flows-actors/models/agents.backend.definitions.d.ts +1 -0
- package/dist/esm/flows-actors/models/agents.backend.definitions.d.ts.map +1 -0
- package/dist/esm/flows-actors/models/agents.backend.definitions.js +1 -0
- package/dist/esm/flows-actors/models/agents.backend.definitions.js.map +1 -0
- package/dist/esm/flows-actors/models/core-facets.backend.definitions.d.ts +52 -0
- package/dist/esm/flows-actors/models/core-facets.backend.definitions.d.ts.map +1 -0
- package/dist/esm/flows-actors/models/core-facets.backend.definitions.js +307 -0
- package/dist/esm/flows-actors/models/core-facets.backend.definitions.js.map +1 -0
- package/dist/esm/flows-actors/models/flows-actors.backend.definitions.d.ts +7 -0
- package/dist/esm/flows-actors/models/flows-actors.backend.definitions.d.ts.map +1 -0
- package/dist/esm/flows-actors/models/flows-actors.backend.definitions.js +8 -0
- package/dist/esm/flows-actors/models/flows-actors.backend.definitions.js.map +1 -0
- package/dist/esm/flows-actors/models/flows-actors.backend.schemas.d.ts +30 -0
- package/dist/esm/flows-actors/models/flows-actors.backend.schemas.d.ts.map +1 -0
- package/dist/esm/flows-actors/models/flows-actors.backend.schemas.js +7 -0
- package/dist/esm/flows-actors/models/flows-actors.backend.schemas.js.map +1 -0
- package/dist/esm/flows-actors/services/actors-system.backend.service.d.ts +72 -0
- package/dist/esm/flows-actors/services/actors-system.backend.service.d.ts.map +1 -0
- package/dist/esm/flows-actors/services/actors-system.backend.service.js +229 -0
- package/dist/esm/flows-actors/services/actors-system.backend.service.js.map +1 -0
- package/dist/esm/flows-actors/services/agent-facets.backend.service.d.ts +95 -0
- package/dist/esm/flows-actors/services/agent-facets.backend.service.d.ts.map +1 -0
- package/dist/esm/flows-actors/services/agent-facets.backend.service.js +276 -0
- package/dist/esm/flows-actors/services/agent-facets.backend.service.js.map +1 -0
- package/dist/esm/flows-actors/services/agents.backend.service.d.ts +183 -0
- package/dist/esm/flows-actors/services/agents.backend.service.d.ts.map +1 -0
- package/dist/esm/flows-actors/services/agents.backend.service.js +2095 -0
- package/dist/esm/flows-actors/services/agents.backend.service.js.map +1 -0
- package/dist/esm/flows-actors/services/context-curation.backend.service.d.ts +64 -0
- package/dist/esm/flows-actors/services/context-curation.backend.service.d.ts.map +1 -0
- package/dist/esm/flows-actors/services/context-curation.backend.service.js +180 -0
- package/dist/esm/flows-actors/services/context-curation.backend.service.js.map +1 -0
- package/dist/esm/flows-actors/services/flows-actors-registry.service.d.ts +101 -0
- package/dist/esm/flows-actors/services/flows-actors-registry.service.d.ts.map +1 -0
- package/dist/esm/flows-actors/services/flows-actors-registry.service.js +313 -0
- package/dist/esm/flows-actors/services/flows-actors-registry.service.js.map +1 -0
- package/dist/esm/flows-actors/services/flows.backend.services.d.ts +64 -0
- package/dist/esm/flows-actors/services/flows.backend.services.d.ts.map +1 -0
- package/dist/esm/flows-actors/services/flows.backend.services.js +203 -0
- package/dist/esm/flows-actors/services/flows.backend.services.js.map +1 -0
- package/dist/esm/flows-actors/services/prompt-compiler.backend.service.d.ts +91 -0
- package/dist/esm/flows-actors/services/prompt-compiler.backend.service.d.ts.map +1 -0
- package/dist/esm/flows-actors/services/prompt-compiler.backend.service.js +629 -0
- package/dist/esm/flows-actors/services/prompt-compiler.backend.service.js.map +1 -0
- package/dist/esm/flows-actors/utils/cli-runtime-operation-support.backend.utils.d.ts +15 -0
- package/dist/esm/flows-actors/utils/cli-runtime-operation-support.backend.utils.d.ts.map +1 -0
- package/dist/esm/flows-actors/utils/cli-runtime-operation-support.backend.utils.js +55 -0
- package/dist/esm/flows-actors/utils/cli-runtime-operation-support.backend.utils.js.map +1 -0
- package/dist/esm/flows-actors/utils/cli-runtime-runner.backend.utils.d.ts +22 -0
- package/dist/esm/flows-actors/utils/cli-runtime-runner.backend.utils.d.ts.map +1 -0
- package/dist/esm/flows-actors/utils/cli-runtime-runner.backend.utils.js +131 -0
- package/dist/esm/flows-actors/utils/cli-runtime-runner.backend.utils.js.map +1 -0
- package/dist/esm/flows-actors/utils/flows-actors-frontend-extractor.utils.d.ts +15 -0
- package/dist/esm/flows-actors/utils/flows-actors-frontend-extractor.utils.d.ts.map +1 -0
- package/dist/esm/flows-actors/utils/flows-actors-frontend-extractor.utils.js +43 -0
- package/dist/esm/flows-actors/utils/flows-actors-frontend-extractor.utils.js.map +1 -0
- package/dist/esm/flows-actors/utils/prompt-ir-adapters.backend.utils.d.ts +66 -0
- package/dist/esm/flows-actors/utils/prompt-ir-adapters.backend.utils.d.ts.map +1 -0
- package/dist/esm/flows-actors/utils/prompt-ir-adapters.backend.utils.js +219 -0
- package/dist/esm/flows-actors/utils/prompt-ir-adapters.backend.utils.js.map +1 -0
- package/dist/esm/guidance/batches/dormancy-detection.batch.backend.service.d.ts +17 -0
- package/dist/esm/guidance/batches/dormancy-detection.batch.backend.service.d.ts.map +1 -0
- package/dist/esm/guidance/batches/dormancy-detection.batch.backend.service.js +110 -0
- package/dist/esm/guidance/batches/dormancy-detection.batch.backend.service.js.map +1 -0
- package/dist/esm/guidance/services/guidance-trigger-evaluator.backend.service.d.ts +41 -0
- package/dist/esm/guidance/services/guidance-trigger-evaluator.backend.service.d.ts.map +1 -0
- package/dist/esm/guidance/services/guidance-trigger-evaluator.backend.service.js +135 -0
- package/dist/esm/guidance/services/guidance-trigger-evaluator.backend.service.js.map +1 -0
- package/dist/esm/guidance/services/lifecycle-custom-implementations.backend.d.ts +33 -0
- package/dist/esm/guidance/services/lifecycle-custom-implementations.backend.d.ts.map +1 -0
- package/dist/esm/guidance/services/lifecycle-custom-implementations.backend.js +105 -0
- package/dist/esm/guidance/services/lifecycle-custom-implementations.backend.js.map +1 -0
- package/dist/esm/guidance/services/lifecycle-evaluator.backend.service.d.ts +103 -0
- package/dist/esm/guidance/services/lifecycle-evaluator.backend.service.d.ts.map +1 -0
- package/dist/esm/guidance/services/lifecycle-evaluator.backend.service.js +685 -0
- package/dist/esm/guidance/services/lifecycle-evaluator.backend.service.js.map +1 -0
- package/dist/esm/guidance/services/milestone-condition-registry.backend.service.d.ts +23 -0
- package/dist/esm/guidance/services/milestone-condition-registry.backend.service.d.ts.map +1 -0
- package/dist/esm/guidance/services/milestone-condition-registry.backend.service.js +57 -0
- package/dist/esm/guidance/services/milestone-condition-registry.backend.service.js.map +1 -0
- package/dist/esm/guidance/services/milestone-definition-registry.backend.service.d.ts +49 -0
- package/dist/esm/guidance/services/milestone-definition-registry.backend.service.d.ts.map +1 -0
- package/dist/esm/guidance/services/milestone-definition-registry.backend.service.js +248 -0
- package/dist/esm/guidance/services/milestone-definition-registry.backend.service.js.map +1 -0
- package/dist/esm/guidance/services/milestone-evaluator.backend.service.d.ts +64 -0
- package/dist/esm/guidance/services/milestone-evaluator.backend.service.d.ts.map +1 -0
- package/dist/esm/guidance/services/milestone-evaluator.backend.service.js +487 -0
- package/dist/esm/guidance/services/milestone-evaluator.backend.service.js.map +1 -0
- package/dist/esm/i18n/controllers/i18n-controller.backend.service.d.ts +55 -0
- package/dist/esm/i18n/controllers/i18n-controller.backend.service.d.ts.map +1 -0
- package/dist/esm/i18n/controllers/i18n-controller.backend.service.js +208 -0
- package/dist/esm/i18n/controllers/i18n-controller.backend.service.js.map +1 -0
- package/dist/esm/i18n/services/i18n.backend.service.d.ts +43 -0
- package/dist/esm/i18n/services/i18n.backend.service.d.ts.map +1 -0
- package/dist/esm/i18n/services/i18n.backend.service.js +83 -0
- package/dist/esm/i18n/services/i18n.backend.service.js.map +1 -0
- package/dist/esm/index.d.ts +203 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +239 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/inject/models/container.d.ts +44 -0
- package/dist/esm/inject/models/container.d.ts.map +1 -0
- package/dist/esm/inject/models/container.js +489 -0
- package/dist/esm/inject/models/container.js.map +1 -0
- package/dist/esm/inject/models/service-types.d.ts +198 -0
- package/dist/esm/inject/models/service-types.d.ts.map +1 -0
- package/dist/esm/inject/models/service-types.js +226 -0
- package/dist/esm/inject/models/service-types.js.map +1 -0
- package/dist/esm/monitoring/analytics/controllers/analytics.backend.controller.d.ts +34 -0
- package/dist/esm/monitoring/analytics/controllers/analytics.backend.controller.d.ts.map +1 -0
- package/dist/esm/monitoring/analytics/controllers/analytics.backend.controller.js +122 -0
- package/dist/esm/monitoring/analytics/controllers/analytics.backend.controller.js.map +1 -0
- package/dist/esm/monitoring/analytics/services/value-moment-engine.backend.service.d.ts +41 -0
- package/dist/esm/monitoring/analytics/services/value-moment-engine.backend.service.d.ts.map +1 -0
- package/dist/esm/monitoring/analytics/services/value-moment-engine.backend.service.js +62 -0
- package/dist/esm/monitoring/analytics/services/value-moment-engine.backend.service.js.map +1 -0
- package/dist/esm/monitoring/analytics/services/value-moment-handler-registry.backend.service.d.ts +18 -0
- package/dist/esm/monitoring/analytics/services/value-moment-handler-registry.backend.service.d.ts.map +1 -0
- package/dist/esm/monitoring/analytics/services/value-moment-handler-registry.backend.service.js +43 -0
- package/dist/esm/monitoring/analytics/services/value-moment-handler-registry.backend.service.js.map +1 -0
- package/dist/esm/monitoring/logger/middleware/logging.middleware.d.ts +12 -0
- package/dist/esm/monitoring/logger/middleware/logging.middleware.d.ts.map +1 -0
- package/dist/esm/monitoring/logger/middleware/logging.middleware.js +25 -0
- package/dist/esm/monitoring/logger/middleware/logging.middleware.js.map +1 -0
- package/dist/esm/monitoring/logger/models/logger.backend.schemas.d.ts +41 -0
- package/dist/esm/monitoring/logger/models/logger.backend.schemas.d.ts.map +1 -0
- package/dist/esm/monitoring/logger/models/logger.backend.schemas.js +29 -0
- package/dist/esm/monitoring/logger/models/logger.backend.schemas.js.map +1 -0
- package/dist/esm/monitoring/logger/services/__tests__/mock-logger.service.d.ts +22 -0
- package/dist/esm/monitoring/logger/services/__tests__/mock-logger.service.d.ts.map +1 -0
- package/dist/esm/monitoring/logger/services/__tests__/mock-logger.service.js +53 -0
- package/dist/esm/monitoring/logger/services/__tests__/mock-logger.service.js.map +1 -0
- package/dist/esm/monitoring/logger/services/logger.service.d.ts +37 -0
- package/dist/esm/monitoring/logger/services/logger.service.d.ts.map +1 -0
- package/dist/esm/monitoring/logger/services/logger.service.js +189 -0
- package/dist/esm/monitoring/logger/services/logger.service.js.map +1 -0
- package/dist/esm/monitoring/observability/middleware/metrics.middleware.d.ts +38 -0
- package/dist/esm/monitoring/observability/middleware/metrics.middleware.d.ts.map +1 -0
- package/dist/esm/monitoring/observability/middleware/metrics.middleware.js +147 -0
- package/dist/esm/monitoring/observability/middleware/metrics.middleware.js.map +1 -0
- package/dist/esm/monitoring/observability/middleware/telemetry.middleware.d.ts +26 -0
- package/dist/esm/monitoring/observability/middleware/telemetry.middleware.d.ts.map +1 -0
- package/dist/esm/monitoring/observability/middleware/telemetry.middleware.js +117 -0
- package/dist/esm/monitoring/observability/middleware/telemetry.middleware.js.map +1 -0
- package/dist/esm/monitoring/observability/middleware/tracing.middleware.d.ts +28 -0
- package/dist/esm/monitoring/observability/middleware/tracing.middleware.d.ts.map +1 -0
- package/dist/esm/monitoring/observability/middleware/tracing.middleware.js +182 -0
- package/dist/esm/monitoring/observability/middleware/tracing.middleware.js.map +1 -0
- package/dist/esm/monitoring/observability/models/observability.backend.schemas.d.ts +86 -0
- package/dist/esm/monitoring/observability/models/observability.backend.schemas.d.ts.map +1 -0
- package/dist/esm/monitoring/observability/models/observability.backend.schemas.js +1 -0
- package/dist/esm/monitoring/observability/models/observability.backend.schemas.js.map +1 -0
- package/dist/esm/monitoring/observability/services/instrumentations/custom.instrumentations.d.ts +57 -0
- package/dist/esm/monitoring/observability/services/instrumentations/custom.instrumentations.d.ts.map +1 -0
- package/dist/esm/monitoring/observability/services/instrumentations/custom.instrumentations.js +77 -0
- package/dist/esm/monitoring/observability/services/instrumentations/custom.instrumentations.js.map +1 -0
- package/dist/esm/monitoring/observability/services/metrics.service.d.ts +27 -0
- package/dist/esm/monitoring/observability/services/metrics.service.d.ts.map +1 -0
- package/dist/esm/monitoring/observability/services/metrics.service.js +236 -0
- package/dist/esm/monitoring/observability/services/metrics.service.js.map +1 -0
- package/dist/esm/monitoring/observability/services/telemetry.service.d.ts +28 -0
- package/dist/esm/monitoring/observability/services/telemetry.service.d.ts.map +1 -0
- package/dist/esm/monitoring/observability/services/telemetry.service.js +144 -0
- package/dist/esm/monitoring/observability/services/telemetry.service.js.map +1 -0
- package/dist/esm/monitoring/observability/services/tracer.service.d.ts +24 -0
- package/dist/esm/monitoring/observability/services/tracer.service.d.ts.map +1 -0
- package/dist/esm/monitoring/observability/services/tracer.service.js +287 -0
- package/dist/esm/monitoring/observability/services/tracer.service.js.map +1 -0
- package/dist/esm/notifications/email/components/email-components.d.ts +90 -0
- package/dist/esm/notifications/email/components/email-components.d.ts.map +1 -0
- package/dist/esm/notifications/email/components/email-components.js +171 -0
- package/dist/esm/notifications/email/components/email-components.js.map +1 -0
- package/dist/esm/notifications/email/models/email-context-provider.interface.d.ts +80 -0
- package/dist/esm/notifications/email/models/email-context-provider.interface.d.ts.map +1 -0
- package/dist/esm/notifications/email/models/email-context-provider.interface.js +25 -0
- package/dist/esm/notifications/email/models/email-context-provider.interface.js.map +1 -0
- package/dist/esm/notifications/email/models/email-template-definition.d.ts +68 -0
- package/dist/esm/notifications/email/models/email-template-definition.d.ts.map +1 -0
- package/dist/esm/notifications/email/models/email-template-definition.js +12 -0
- package/dist/esm/notifications/email/models/email-template-definition.js.map +1 -0
- package/dist/esm/notifications/email/models/email-template.actors-system.backend.definitions.d.ts +19 -0
- package/dist/esm/notifications/email/models/email-template.actors-system.backend.definitions.d.ts.map +1 -0
- package/dist/esm/notifications/email/models/email-template.actors-system.backend.definitions.js +66 -0
- package/dist/esm/notifications/email/models/email-template.actors-system.backend.definitions.js.map +1 -0
- package/dist/esm/notifications/email/models/email.backend.scheamas.d.ts +1 -0
- package/dist/esm/notifications/email/models/email.backend.scheamas.d.ts.map +1 -0
- package/dist/esm/notifications/email/models/email.backend.scheamas.js +1 -0
- package/dist/esm/notifications/email/models/email.backend.scheamas.js.map +1 -0
- package/dist/esm/notifications/email/services/email-batch-send.batch.backend.service.d.ts +74 -0
- package/dist/esm/notifications/email/services/email-batch-send.batch.backend.service.d.ts.map +1 -0
- package/dist/esm/notifications/email/services/email-batch-send.batch.backend.service.js +196 -0
- package/dist/esm/notifications/email/services/email-batch-send.batch.backend.service.js.map +1 -0
- package/dist/esm/notifications/email/services/email-context-provider-registry.backend.service.d.ts +49 -0
- package/dist/esm/notifications/email/services/email-context-provider-registry.backend.service.d.ts.map +1 -0
- package/dist/esm/notifications/email/services/email-context-provider-registry.backend.service.js +141 -0
- package/dist/esm/notifications/email/services/email-context-provider-registry.backend.service.js.map +1 -0
- package/dist/esm/notifications/email/services/email-renderer.backend.service.d.ts +74 -0
- package/dist/esm/notifications/email/services/email-renderer.backend.service.d.ts.map +1 -0
- package/dist/esm/notifications/email/services/email-renderer.backend.service.js +215 -0
- package/dist/esm/notifications/email/services/email-renderer.backend.service.js.map +1 -0
- package/dist/esm/notifications/email/services/email-template-compiler.backend.service.d.ts +37 -0
- package/dist/esm/notifications/email/services/email-template-compiler.backend.service.d.ts.map +1 -0
- package/dist/esm/notifications/email/services/email-template-compiler.backend.service.js +121 -0
- package/dist/esm/notifications/email/services/email-template-compiler.backend.service.js.map +1 -0
- package/dist/esm/notifications/email/services/email-template-generation.backend.service.d.ts +115 -0
- package/dist/esm/notifications/email/services/email-template-generation.backend.service.d.ts.map +1 -0
- package/dist/esm/notifications/email/services/email-template-generation.backend.service.js +634 -0
- package/dist/esm/notifications/email/services/email-template-generation.backend.service.js.map +1 -0
- package/dist/esm/notifications/email/services/email-template-registry.backend.service.d.ts +48 -0
- package/dist/esm/notifications/email/services/email-template-registry.backend.service.d.ts.map +1 -0
- package/dist/esm/notifications/email/services/email-template-registry.backend.service.js +146 -0
- package/dist/esm/notifications/email/services/email-template-registry.backend.service.js.map +1 -0
- package/dist/esm/notifications/email/services/email-template-sandbox.backend.service.d.ts +58 -0
- package/dist/esm/notifications/email/services/email-template-sandbox.backend.service.d.ts.map +1 -0
- package/dist/esm/notifications/email/services/email-template-sandbox.backend.service.js +223 -0
- package/dist/esm/notifications/email/services/email-template-sandbox.backend.service.js.map +1 -0
- package/dist/esm/notifications/email/services/email-template-validator.backend.service.d.ts +49 -0
- package/dist/esm/notifications/email/services/email-template-validator.backend.service.d.ts.map +1 -0
- package/dist/esm/notifications/email/services/email-template-validator.backend.service.js +204 -0
- package/dist/esm/notifications/email/services/email-template-validator.backend.service.js.map +1 -0
- package/dist/esm/notifications/email/services/email.backend.service.d.ts +76 -0
- package/dist/esm/notifications/email/services/email.backend.service.d.ts.map +1 -0
- package/dist/esm/notifications/email/services/email.backend.service.js +294 -0
- package/dist/esm/notifications/email/services/email.backend.service.js.map +1 -0
- package/dist/esm/notifications/email/utils/color-conversion.utils.d.ts +56 -0
- package/dist/esm/notifications/email/utils/color-conversion.utils.d.ts.map +1 -0
- package/dist/esm/notifications/email/utils/color-conversion.utils.js +108 -0
- package/dist/esm/notifications/email/utils/color-conversion.utils.js.map +1 -0
- package/dist/esm/notifications/email/utils/interpolate-email-label.utils.d.ts +8 -0
- package/dist/esm/notifications/email/utils/interpolate-email-label.utils.d.ts.map +1 -0
- package/dist/esm/notifications/email/utils/interpolate-email-label.utils.js +15 -0
- package/dist/esm/notifications/email/utils/interpolate-email-label.utils.js.map +1 -0
- package/dist/esm/notifications/email/utils/zod-to-typescript.utils.d.ts +50 -0
- package/dist/esm/notifications/email/utils/zod-to-typescript.utils.d.ts.map +1 -0
- package/dist/esm/notifications/email/utils/zod-to-typescript.utils.js +281 -0
- package/dist/esm/notifications/email/utils/zod-to-typescript.utils.js.map +1 -0
- package/dist/esm/notifications/services/notification-badge.backend.service.d.ts +94 -0
- package/dist/esm/notifications/services/notification-badge.backend.service.d.ts.map +1 -0
- package/dist/esm/notifications/services/notification-badge.backend.service.js +292 -0
- package/dist/esm/notifications/services/notification-badge.backend.service.js.map +1 -0
- package/dist/esm/notifications/services/notifications-dispatcher.backend.service.d.ts +202 -0
- package/dist/esm/notifications/services/notifications-dispatcher.backend.service.d.ts.map +1 -0
- package/dist/esm/notifications/services/notifications-dispatcher.backend.service.js +1290 -0
- package/dist/esm/notifications/services/notifications-dispatcher.backend.service.js.map +1 -0
- package/dist/esm/notifications/sms/services/sms.backend.service.d.ts +50 -0
- package/dist/esm/notifications/sms/services/sms.backend.service.d.ts.map +1 -0
- package/dist/esm/notifications/sms/services/sms.backend.service.js +209 -0
- package/dist/esm/notifications/sms/services/sms.backend.service.js.map +1 -0
- package/dist/esm/notifications/webhooks/controllers/webhook-auto-controller.backend.service.d.ts +58 -0
- package/dist/esm/notifications/webhooks/controllers/webhook-auto-controller.backend.service.d.ts.map +1 -0
- package/dist/esm/notifications/webhooks/controllers/webhook-auto-controller.backend.service.js +184 -0
- package/dist/esm/notifications/webhooks/controllers/webhook-auto-controller.backend.service.js.map +1 -0
- package/dist/esm/notifications/webhooks/services/polymorphic-lookup.backend.service.d.ts +56 -0
- package/dist/esm/notifications/webhooks/services/polymorphic-lookup.backend.service.d.ts.map +1 -0
- package/dist/esm/notifications/webhooks/services/polymorphic-lookup.backend.service.js +109 -0
- package/dist/esm/notifications/webhooks/services/polymorphic-lookup.backend.service.js.map +1 -0
- package/dist/esm/notifications/webhooks/services/webhook-handler.backend.service.d.ts +96 -0
- package/dist/esm/notifications/webhooks/services/webhook-handler.backend.service.d.ts.map +1 -0
- package/dist/esm/notifications/webhooks/services/webhook-handler.backend.service.js +396 -0
- package/dist/esm/notifications/webhooks/services/webhook-handler.backend.service.js.map +1 -0
- package/dist/esm/organizations/services/org-creation-on-registration.backend.utils.d.ts +39 -0
- package/dist/esm/organizations/services/org-creation-on-registration.backend.utils.d.ts.map +1 -0
- package/dist/esm/organizations/services/org-creation-on-registration.backend.utils.js +73 -0
- package/dist/esm/organizations/services/org-creation-on-registration.backend.utils.js.map +1 -0
- package/dist/esm/organizations/services/org-member-roles-validation.backend.utils.d.ts +22 -0
- package/dist/esm/organizations/services/org-member-roles-validation.backend.utils.d.ts.map +1 -0
- package/dist/esm/organizations/services/org-member-roles-validation.backend.utils.js +35 -0
- package/dist/esm/organizations/services/org-member-roles-validation.backend.utils.js.map +1 -0
- package/dist/esm/organizations/services/organization-custom-implementation.backend.service.d.ts +10 -0
- package/dist/esm/organizations/services/organization-custom-implementation.backend.service.d.ts.map +1 -0
- package/dist/esm/organizations/services/organization-custom-implementation.backend.service.js +77 -0
- package/dist/esm/organizations/services/organization-custom-implementation.backend.service.js.map +1 -0
- package/dist/esm/organizations/services/organization-member-custom-implementation.backend.service.d.ts +10 -0
- package/dist/esm/organizations/services/organization-member-custom-implementation.backend.service.d.ts.map +1 -0
- package/dist/esm/organizations/services/organization-member-custom-implementation.backend.service.js +131 -0
- package/dist/esm/organizations/services/organization-member-custom-implementation.backend.service.js.map +1 -0
- package/dist/esm/organizations/services/scim-provisioning-gate.backend.utils.d.ts +22 -0
- package/dist/esm/organizations/services/scim-provisioning-gate.backend.utils.d.ts.map +1 -0
- package/dist/esm/organizations/services/scim-provisioning-gate.backend.utils.js +21 -0
- package/dist/esm/organizations/services/scim-provisioning-gate.backend.utils.js.map +1 -0
- package/dist/esm/organizations/services/user-org-type-grant.backend.utils.d.ts +25 -0
- package/dist/esm/organizations/services/user-org-type-grant.backend.utils.d.ts.map +1 -0
- package/dist/esm/organizations/services/user-org-type-grant.backend.utils.js +34 -0
- package/dist/esm/organizations/services/user-org-type-grant.backend.utils.js.map +1 -0
- package/dist/esm/organizations/services/user-type-revocation-on-org-leave.backend.utils.d.ts +32 -0
- package/dist/esm/organizations/services/user-type-revocation-on-org-leave.backend.utils.d.ts.map +1 -0
- package/dist/esm/organizations/services/user-type-revocation-on-org-leave.backend.utils.js +66 -0
- package/dist/esm/organizations/services/user-type-revocation-on-org-leave.backend.utils.js.map +1 -0
- package/dist/esm/queue/adapters/rabbitmq-adapter.backend.service.d.ts +126 -0
- package/dist/esm/queue/adapters/rabbitmq-adapter.backend.service.d.ts.map +1 -0
- package/dist/esm/queue/adapters/rabbitmq-adapter.backend.service.js +370 -0
- package/dist/esm/queue/adapters/rabbitmq-adapter.backend.service.js.map +1 -0
- package/dist/esm/queue/apps-crontabs-manager.backend.service.d.ts +86 -0
- package/dist/esm/queue/apps-crontabs-manager.backend.service.d.ts.map +1 -0
- package/dist/esm/queue/apps-crontabs-manager.backend.service.js +176 -0
- package/dist/esm/queue/apps-crontabs-manager.backend.service.js.map +1 -0
- package/dist/esm/queue/cron-job-sync.backend.service.d.ts +42 -0
- package/dist/esm/queue/cron-job-sync.backend.service.d.ts.map +1 -0
- package/dist/esm/queue/cron-job-sync.backend.service.js +181 -0
- package/dist/esm/queue/cron-job-sync.backend.service.js.map +1 -0
- package/dist/esm/queue/domain-queue-consumer.backend.service.d.ts +84 -0
- package/dist/esm/queue/domain-queue-consumer.backend.service.d.ts.map +1 -0
- package/dist/esm/queue/domain-queue-consumer.backend.service.js +275 -0
- package/dist/esm/queue/domain-queue-consumer.backend.service.js.map +1 -0
- package/dist/esm/queue/job-completion-registry.backend.service.d.ts +111 -0
- package/dist/esm/queue/job-completion-registry.backend.service.d.ts.map +1 -0
- package/dist/esm/queue/job-completion-registry.backend.service.js +237 -0
- package/dist/esm/queue/job-completion-registry.backend.service.js.map +1 -0
- package/dist/esm/queue/job-consumer.backend.service.d.ts +109 -0
- package/dist/esm/queue/job-consumer.backend.service.d.ts.map +1 -0
- package/dist/esm/queue/job-consumer.backend.service.js +515 -0
- package/dist/esm/queue/job-consumer.backend.service.js.map +1 -0
- package/dist/esm/queue/job-executor.backend.service.d.ts +53 -0
- package/dist/esm/queue/job-executor.backend.service.d.ts.map +1 -0
- package/dist/esm/queue/job-executor.backend.service.js +278 -0
- package/dist/esm/queue/job-executor.backend.service.js.map +1 -0
- package/dist/esm/queue/job-payload-storage.backend.service.d.ts +86 -0
- package/dist/esm/queue/job-payload-storage.backend.service.d.ts.map +1 -0
- package/dist/esm/queue/job-payload-storage.backend.service.js +250 -0
- package/dist/esm/queue/job-payload-storage.backend.service.js.map +1 -0
- package/dist/esm/queue/job-status-tracking.backend.service.d.ts +97 -0
- package/dist/esm/queue/job-status-tracking.backend.service.d.ts.map +1 -0
- package/dist/esm/queue/job-status-tracking.backend.service.js +281 -0
- package/dist/esm/queue/job-status-tracking.backend.service.js.map +1 -0
- package/dist/esm/queue/queue-monitoring.backend.service.d.ts +71 -0
- package/dist/esm/queue/queue-monitoring.backend.service.d.ts.map +1 -0
- package/dist/esm/queue/queue-monitoring.backend.service.js +297 -0
- package/dist/esm/queue/queue-monitoring.backend.service.js.map +1 -0
- package/dist/esm/queue/queue-worker-initializer.backend.service.d.ts +63 -0
- package/dist/esm/queue/queue-worker-initializer.backend.service.d.ts.map +1 -0
- package/dist/esm/queue/queue-worker-initializer.backend.service.js +171 -0
- package/dist/esm/queue/queue-worker-initializer.backend.service.js.map +1 -0
- package/dist/esm/queue/queue.backend.service.d.ts +108 -0
- package/dist/esm/queue/queue.backend.service.d.ts.map +1 -0
- package/dist/esm/queue/queue.backend.service.js +419 -0
- package/dist/esm/queue/queue.backend.service.js.map +1 -0
- package/dist/esm/queue/scheduled-message-verifier.backend.service.d.ts +74 -0
- package/dist/esm/queue/scheduled-message-verifier.backend.service.d.ts.map +1 -0
- package/dist/esm/queue/scheduled-message-verifier.backend.service.js +189 -0
- package/dist/esm/queue/scheduled-message-verifier.backend.service.js.map +1 -0
- package/dist/esm/queue/worker-shutdown-manager.backend.service.d.ts +124 -0
- package/dist/esm/queue/worker-shutdown-manager.backend.service.d.ts.map +1 -0
- package/dist/esm/queue/worker-shutdown-manager.backend.service.js +250 -0
- package/dist/esm/queue/worker-shutdown-manager.backend.service.js.map +1 -0
- package/dist/esm/requests/models/api-routes.backend.defintions.d.ts +34 -0
- package/dist/esm/requests/models/api-routes.backend.defintions.d.ts.map +1 -0
- package/dist/esm/requests/models/api-routes.backend.defintions.js +42 -0
- package/dist/esm/requests/models/api-routes.backend.defintions.js.map +1 -0
- package/dist/esm/requests/models/requests.backend.schemas.d.ts +48 -0
- package/dist/esm/requests/models/requests.backend.schemas.d.ts.map +1 -0
- package/dist/esm/requests/models/requests.backend.schemas.js +7 -0
- package/dist/esm/requests/models/requests.backend.schemas.js.map +1 -0
- package/dist/esm/requests/service/__tests__/mock-apps-shared-resources-gateway.service.d.ts +6 -0
- package/dist/esm/requests/service/__tests__/mock-apps-shared-resources-gateway.service.d.ts.map +1 -0
- package/dist/esm/requests/service/__tests__/mock-apps-shared-resources-gateway.service.js +20 -0
- package/dist/esm/requests/service/__tests__/mock-apps-shared-resources-gateway.service.js.map +1 -0
- package/dist/esm/requests/service/apps-shared-resources-gateway.backend.service.d.ts +84 -0
- package/dist/esm/requests/service/apps-shared-resources-gateway.backend.service.d.ts.map +1 -0
- package/dist/esm/requests/service/apps-shared-resources-gateway.backend.service.js +462 -0
- package/dist/esm/requests/service/apps-shared-resources-gateway.backend.service.js.map +1 -0
- package/dist/esm/requests/service/platform-mutualized-handler.backend.service.d.ts +9 -0
- package/dist/esm/requests/service/platform-mutualized-handler.backend.service.d.ts.map +1 -0
- package/dist/esm/requests/service/platform-mutualized-handler.backend.service.js +36 -0
- package/dist/esm/requests/service/platform-mutualized-handler.backend.service.js.map +1 -0
- package/dist/esm/requests/service/platform-requests.backend.utils.d.ts +6 -0
- package/dist/esm/requests/service/platform-requests.backend.utils.d.ts.map +1 -0
- package/dist/esm/requests/service/platform-requests.backend.utils.js +47 -0
- package/dist/esm/requests/service/platform-requests.backend.utils.js.map +1 -0
- package/dist/esm/requests/service/remote-client-base.backend.service.d.ts +111 -0
- package/dist/esm/requests/service/remote-client-base.backend.service.d.ts.map +1 -0
- package/dist/esm/requests/service/remote-client-base.backend.service.js +354 -0
- package/dist/esm/requests/service/remote-client-base.backend.service.js.map +1 -0
- package/dist/esm/requests/service/serverless-services-handler.backend.service.d.ts +9 -0
- package/dist/esm/requests/service/serverless-services-handler.backend.service.d.ts.map +1 -0
- package/dist/esm/requests/service/serverless-services-handler.backend.service.js +36 -0
- package/dist/esm/requests/service/serverless-services-handler.backend.service.js.map +1 -0
- package/dist/esm/requests/service/websocket.service.d.ts +507 -0
- package/dist/esm/requests/service/websocket.service.d.ts.map +1 -0
- package/dist/esm/requests/service/websocket.service.js +2222 -0
- package/dist/esm/requests/service/websocket.service.js.map +1 -0
- package/dist/esm/resources/models/custom-service-implementations.backend.definition.d.ts +3 -0
- package/dist/esm/resources/models/custom-service-implementations.backend.definition.d.ts.map +1 -0
- package/dist/esm/resources/models/custom-service-implementations.backend.definition.js +17 -0
- package/dist/esm/resources/models/custom-service-implementations.backend.definition.js.map +1 -0
- package/dist/esm/resources/models/index.d.ts +7 -0
- package/dist/esm/resources/models/index.d.ts.map +1 -0
- package/dist/esm/resources/models/index.js +7 -0
- package/dist/esm/resources/models/index.js.map +1 -0
- package/dist/esm/resources/models/resources-operations.backend.definitions.d.ts +4 -0
- package/dist/esm/resources/models/resources-operations.backend.definitions.d.ts.map +1 -0
- package/dist/esm/resources/models/resources-operations.backend.definitions.js +7 -0
- package/dist/esm/resources/models/resources-operations.backend.definitions.js.map +1 -0
- package/dist/esm/resources/models/resources-relationships.backend.definitions.d.ts +3 -0
- package/dist/esm/resources/models/resources-relationships.backend.definitions.d.ts.map +1 -0
- package/dist/esm/resources/models/resources-relationships.backend.definitions.js +19 -0
- package/dist/esm/resources/models/resources-relationships.backend.definitions.js.map +1 -0
- package/dist/esm/resources/models/resources-types.backend.schemas.d.ts +13 -0
- package/dist/esm/resources/models/resources-types.backend.schemas.d.ts.map +1 -0
- package/dist/esm/resources/models/resources-types.backend.schemas.js +14 -0
- package/dist/esm/resources/models/resources-types.backend.schemas.js.map +1 -0
- package/dist/esm/resources/models/resources.backend.schemas.d.ts +7 -0
- package/dist/esm/resources/models/resources.backend.schemas.d.ts.map +1 -0
- package/dist/esm/resources/models/resources.backend.schemas.js +8 -0
- package/dist/esm/resources/models/resources.backend.schemas.js.map +1 -0
- package/dist/esm/resources/models/virtual-fields.backend.types.d.ts +121 -0
- package/dist/esm/resources/models/virtual-fields.backend.types.d.ts.map +1 -0
- package/dist/esm/resources/models/virtual-fields.backend.types.js +10 -0
- package/dist/esm/resources/models/virtual-fields.backend.types.js.map +1 -0
- package/dist/esm/resources/services/__tests__/mock-resources-registry.service.d.ts +25 -0
- package/dist/esm/resources/services/__tests__/mock-resources-registry.service.d.ts.map +1 -0
- package/dist/esm/resources/services/__tests__/mock-resources-registry.service.js +59 -0
- package/dist/esm/resources/services/__tests__/mock-resources-registry.service.js.map +1 -0
- package/dist/esm/resources/services/resource-context.backend.service.d.ts +321 -0
- package/dist/esm/resources/services/resource-context.backend.service.d.ts.map +1 -0
- package/dist/esm/resources/services/resource-context.backend.service.js +723 -0
- package/dist/esm/resources/services/resource-context.backend.service.js.map +1 -0
- package/dist/esm/resources/services/resource-id.backend.service.d.ts +110 -0
- package/dist/esm/resources/services/resource-id.backend.service.d.ts.map +1 -0
- package/dist/esm/resources/services/resource-id.backend.service.js +267 -0
- package/dist/esm/resources/services/resource-id.backend.service.js.map +1 -0
- package/dist/esm/resources/services/resource-population.backend.service.d.ts +149 -0
- package/dist/esm/resources/services/resource-population.backend.service.d.ts.map +1 -0
- package/dist/esm/resources/services/resource-population.backend.service.js +543 -0
- package/dist/esm/resources/services/resource-population.backend.service.js.map +1 -0
- package/dist/esm/resources/services/resources-registry.backend.service.d.ts +151 -0
- package/dist/esm/resources/services/resources-registry.backend.service.d.ts.map +1 -0
- package/dist/esm/resources/services/resources-registry.backend.service.js +867 -0
- package/dist/esm/resources/services/resources-registry.backend.service.js.map +1 -0
- package/dist/esm/resources/services/virtual-fields.backend.service.d.ts +72 -0
- package/dist/esm/resources/services/virtual-fields.backend.service.d.ts.map +1 -0
- package/dist/esm/resources/services/virtual-fields.backend.service.js +254 -0
- package/dist/esm/resources/services/virtual-fields.backend.service.js.map +1 -0
- package/dist/esm/runtime/controllers/health-controller.backend.service.d.ts +73 -0
- package/dist/esm/runtime/controllers/health-controller.backend.service.d.ts.map +1 -0
- package/dist/esm/runtime/controllers/health-controller.backend.service.js +275 -0
- package/dist/esm/runtime/controllers/health-controller.backend.service.js.map +1 -0
- package/dist/esm/runtime/domain-module.backend.definitions.d.ts +43 -0
- package/dist/esm/runtime/domain-module.backend.definitions.d.ts.map +1 -0
- package/dist/esm/runtime/domain-module.backend.definitions.js +70 -0
- package/dist/esm/runtime/domain-module.backend.definitions.js.map +1 -0
- package/dist/esm/runtime/models/execution-context.backend.schemas.d.ts +253 -0
- package/dist/esm/runtime/models/execution-context.backend.schemas.d.ts.map +1 -0
- package/dist/esm/runtime/models/execution-context.backend.schemas.js +329 -0
- package/dist/esm/runtime/models/execution-context.backend.schemas.js.map +1 -0
- package/dist/esm/runtime/models/runtime.backend.schemas.d.ts +45 -0
- package/dist/esm/runtime/models/runtime.backend.schemas.d.ts.map +1 -0
- package/dist/esm/runtime/models/runtime.backend.schemas.js +73 -0
- package/dist/esm/runtime/models/runtime.backend.schemas.js.map +1 -0
- package/dist/esm/runtime/services/execution-context-creator.backend.service.d.ts +315 -0
- package/dist/esm/runtime/services/execution-context-creator.backend.service.d.ts.map +1 -0
- package/dist/esm/runtime/services/execution-context-creator.backend.service.js +1525 -0
- package/dist/esm/runtime/services/execution-context-creator.backend.service.js.map +1 -0
- package/dist/esm/runtime/services/execution-context-handler.backend.service.d.ts +60 -0
- package/dist/esm/runtime/services/execution-context-handler.backend.service.d.ts.map +1 -0
- package/dist/esm/runtime/services/execution-context-handler.backend.service.js +150 -0
- package/dist/esm/runtime/services/execution-context-handler.backend.service.js.map +1 -0
- package/dist/esm/runtime/services/health-readiness-contributor.backend.interface.d.ts +11 -0
- package/dist/esm/runtime/services/health-readiness-contributor.backend.interface.d.ts.map +1 -0
- package/dist/esm/runtime/services/health-readiness-contributor.backend.interface.js +1 -0
- package/dist/esm/runtime/services/health-readiness-contributor.backend.interface.js.map +1 -0
- package/dist/esm/runtime/services/http-server.backend.service.d.ts +188 -0
- package/dist/esm/runtime/services/http-server.backend.service.d.ts.map +1 -0
- package/dist/esm/runtime/services/http-server.backend.service.js +755 -0
- package/dist/esm/runtime/services/http-server.backend.service.js.map +1 -0
- package/dist/esm/runtime/services/start-application.backend.service.d.ts +240 -0
- package/dist/esm/runtime/services/start-application.backend.service.d.ts.map +1 -0
- package/dist/esm/runtime/services/start-application.backend.service.js +977 -0
- package/dist/esm/runtime/services/start-application.backend.service.js.map +1 -0
- package/dist/esm/runtime/testing/execution-context-test-fixtures.d.ts +10 -0
- package/dist/esm/runtime/testing/execution-context-test-fixtures.d.ts.map +1 -0
- package/dist/esm/runtime/testing/execution-context-test-fixtures.js +13 -0
- package/dist/esm/runtime/testing/execution-context-test-fixtures.js.map +1 -0
- package/dist/esm/runtime/testing/mock-execution-context-creator.service.d.ts +15 -0
- package/dist/esm/runtime/testing/mock-execution-context-creator.service.d.ts.map +1 -0
- package/dist/esm/runtime/testing/mock-execution-context-creator.service.js +42 -0
- package/dist/esm/runtime/testing/mock-execution-context-creator.service.js.map +1 -0
- package/dist/esm/runtime/utils/scan-default-exports.backend.utils.d.ts +85 -0
- package/dist/esm/runtime/utils/scan-default-exports.backend.utils.d.ts.map +1 -0
- package/dist/esm/runtime/utils/scan-default-exports.backend.utils.js +171 -0
- package/dist/esm/runtime/utils/scan-default-exports.backend.utils.js.map +1 -0
- package/dist/esm/security/authentications/batches/anonymous-session-cleanup.batch.backend.service.d.ts +19 -0
- package/dist/esm/security/authentications/batches/anonymous-session-cleanup.batch.backend.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/batches/anonymous-session-cleanup.batch.backend.service.js +59 -0
- package/dist/esm/security/authentications/batches/anonymous-session-cleanup.batch.backend.service.js.map +1 -0
- package/dist/esm/security/authentications/controllers/auth-method-management-controller.backend.service.d.ts +31 -0
- package/dist/esm/security/authentications/controllers/auth-method-management-controller.backend.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/controllers/auth-method-management-controller.backend.service.js +215 -0
- package/dist/esm/security/authentications/controllers/auth-method-management-controller.backend.service.js.map +1 -0
- package/dist/esm/security/authentications/controllers/authentication-controller.backend.service.d.ts +493 -0
- package/dist/esm/security/authentications/controllers/authentication-controller.backend.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/controllers/authentication-controller.backend.service.js +2371 -0
- package/dist/esm/security/authentications/controllers/authentication-controller.backend.service.js.map +1 -0
- package/dist/esm/security/authentications/models/auth-constants.backend.d.ts +83 -0
- package/dist/esm/security/authentications/models/auth-constants.backend.d.ts.map +1 -0
- package/dist/esm/security/authentications/models/auth-constants.backend.js +113 -0
- package/dist/esm/security/authentications/models/auth-constants.backend.js.map +1 -0
- package/dist/esm/security/authentications/models/authentications.backend.schemas.d.ts +98 -0
- package/dist/esm/security/authentications/models/authentications.backend.schemas.d.ts.map +1 -0
- package/dist/esm/security/authentications/models/authentications.backend.schemas.js +59 -0
- package/dist/esm/security/authentications/models/authentications.backend.schemas.js.map +1 -0
- package/dist/esm/security/authentications/models/jwt.backend.schemas.d.ts +42 -0
- package/dist/esm/security/authentications/models/jwt.backend.schemas.d.ts.map +1 -0
- package/dist/esm/security/authentications/models/jwt.backend.schemas.js +98 -0
- package/dist/esm/security/authentications/models/jwt.backend.schemas.js.map +1 -0
- package/dist/esm/security/authentications/models/oauth2-connection.backend.schemas.d.ts +163 -0
- package/dist/esm/security/authentications/models/oauth2-connection.backend.schemas.d.ts.map +1 -0
- package/dist/esm/security/authentications/models/oauth2-connection.backend.schemas.js +12 -0
- package/dist/esm/security/authentications/models/oauth2-connection.backend.schemas.js.map +1 -0
- package/dist/esm/security/authentications/models/saml-authentication.backend.schemas.d.ts +102 -0
- package/dist/esm/security/authentications/models/saml-authentication.backend.schemas.d.ts.map +1 -0
- package/dist/esm/security/authentications/models/saml-authentication.backend.schemas.js +7 -0
- package/dist/esm/security/authentications/models/saml-authentication.backend.schemas.js.map +1 -0
- package/dist/esm/security/authentications/models/sso-connection.backend.schemas.d.ts +88 -0
- package/dist/esm/security/authentications/models/sso-connection.backend.schemas.d.ts.map +1 -0
- package/dist/esm/security/authentications/models/sso-connection.backend.schemas.js +17 -0
- package/dist/esm/security/authentications/models/sso-connection.backend.schemas.js.map +1 -0
- package/dist/esm/security/authentications/services/__tests__/mock-auth-execution-context-factory.service.d.ts +27 -0
- package/dist/esm/security/authentications/services/__tests__/mock-auth-execution-context-factory.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/__tests__/mock-auth-execution-context-factory.service.js +66 -0
- package/dist/esm/security/authentications/services/__tests__/mock-auth-execution-context-factory.service.js.map +1 -0
- package/dist/esm/security/authentications/services/__tests__/mock-auth-token-issuer.service.d.ts +30 -0
- package/dist/esm/security/authentications/services/__tests__/mock-auth-token-issuer.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/__tests__/mock-auth-token-issuer.service.js +44 -0
- package/dist/esm/security/authentications/services/__tests__/mock-auth-token-issuer.service.js.map +1 -0
- package/dist/esm/security/authentications/services/admin-config/__tests__/mock-domain-to-org-lookup.service.d.ts +19 -0
- package/dist/esm/security/authentications/services/admin-config/__tests__/mock-domain-to-org-lookup.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/admin-config/__tests__/mock-domain-to-org-lookup.service.js +43 -0
- package/dist/esm/security/authentications/services/admin-config/__tests__/mock-domain-to-org-lookup.service.js.map +1 -0
- package/dist/esm/security/authentications/services/admin-config/__tests__/mock-enterprise-user-provisioning.service.d.ts +37 -0
- package/dist/esm/security/authentications/services/admin-config/__tests__/mock-enterprise-user-provisioning.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/admin-config/__tests__/mock-enterprise-user-provisioning.service.js +58 -0
- package/dist/esm/security/authentications/services/admin-config/__tests__/mock-enterprise-user-provisioning.service.js.map +1 -0
- package/dist/esm/security/authentications/services/admin-config/auth-organization-configuration.service.d.ts +85 -0
- package/dist/esm/security/authentications/services/admin-config/auth-organization-configuration.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/admin-config/auth-organization-configuration.service.js +379 -0
- package/dist/esm/security/authentications/services/admin-config/auth-organization-configuration.service.js.map +1 -0
- package/dist/esm/security/authentications/services/admin-config/domain-to-org-lookup.backend.service.d.ts +79 -0
- package/dist/esm/security/authentications/services/admin-config/domain-to-org-lookup.backend.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/admin-config/domain-to-org-lookup.backend.service.js +205 -0
- package/dist/esm/security/authentications/services/admin-config/domain-to-org-lookup.backend.service.js.map +1 -0
- package/dist/esm/security/authentications/services/admin-config/domain-verification.backend.service.d.ts +59 -0
- package/dist/esm/security/authentications/services/admin-config/domain-verification.backend.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/admin-config/domain-verification.backend.service.js +179 -0
- package/dist/esm/security/authentications/services/admin-config/domain-verification.backend.service.js.map +1 -0
- package/dist/esm/security/authentications/services/admin-config/enterprise-user-provisioning.backend.service.d.ts +116 -0
- package/dist/esm/security/authentications/services/admin-config/enterprise-user-provisioning.backend.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/admin-config/enterprise-user-provisioning.backend.service.js +436 -0
- package/dist/esm/security/authentications/services/admin-config/enterprise-user-provisioning.backend.service.js.map +1 -0
- package/dist/esm/security/authentications/services/admin-config/oidc-discovery.backend.service.d.ts +67 -0
- package/dist/esm/security/authentications/services/admin-config/oidc-discovery.backend.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/admin-config/oidc-discovery.backend.service.js +222 -0
- package/dist/esm/security/authentications/services/admin-config/oidc-discovery.backend.service.js.map +1 -0
- package/dist/esm/security/authentications/services/anonymous-session.backend.service.d.ts +80 -0
- package/dist/esm/security/authentications/services/anonymous-session.backend.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/anonymous-session.backend.service.js +368 -0
- package/dist/esm/security/authentications/services/anonymous-session.backend.service.js.map +1 -0
- package/dist/esm/security/authentications/services/auth-credential-verifier.backend.service.d.ts +75 -0
- package/dist/esm/security/authentications/services/auth-credential-verifier.backend.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/auth-credential-verifier.backend.service.js +139 -0
- package/dist/esm/security/authentications/services/auth-credential-verifier.backend.service.js.map +1 -0
- package/dist/esm/security/authentications/services/auth-execution-context-factory.backend.service.d.ts +72 -0
- package/dist/esm/security/authentications/services/auth-execution-context-factory.backend.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/auth-execution-context-factory.backend.service.js +127 -0
- package/dist/esm/security/authentications/services/auth-execution-context-factory.backend.service.js.map +1 -0
- package/dist/esm/security/authentications/services/auth-methods/auth-method-management.backend.service.d.ts +57 -0
- package/dist/esm/security/authentications/services/auth-methods/auth-method-management.backend.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/auth-methods/auth-method-management.backend.service.js +459 -0
- package/dist/esm/security/authentications/services/auth-methods/auth-method-management.backend.service.js.map +1 -0
- package/dist/esm/security/authentications/services/auth-methods/auth-mfa.backend.service.d.ts +44 -0
- package/dist/esm/security/authentications/services/auth-methods/auth-mfa.backend.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/auth-methods/auth-mfa.backend.service.js +131 -0
- package/dist/esm/security/authentications/services/auth-methods/auth-mfa.backend.service.js.map +1 -0
- package/dist/esm/security/authentications/services/auth-methods/auth-password-reset.backend.service.d.ts +58 -0
- package/dist/esm/security/authentications/services/auth-methods/auth-password-reset.backend.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/auth-methods/auth-password-reset.backend.service.js +209 -0
- package/dist/esm/security/authentications/services/auth-methods/auth-password-reset.backend.service.js.map +1 -0
- package/dist/esm/security/authentications/services/auth-methods/auth-phone-verification.backend.service.d.ts +46 -0
- package/dist/esm/security/authentications/services/auth-methods/auth-phone-verification.backend.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/auth-methods/auth-phone-verification.backend.service.js +124 -0
- package/dist/esm/security/authentications/services/auth-methods/auth-phone-verification.backend.service.js.map +1 -0
- package/dist/esm/security/authentications/services/auth-methods/auth-registration.backend.service.d.ts +165 -0
- package/dist/esm/security/authentications/services/auth-methods/auth-registration.backend.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/auth-methods/auth-registration.backend.service.js +816 -0
- package/dist/esm/security/authentications/services/auth-methods/auth-registration.backend.service.js.map +1 -0
- package/dist/esm/security/authentications/services/auth-methods/oauth2-authentication.backend.service.d.ts +218 -0
- package/dist/esm/security/authentications/services/auth-methods/oauth2-authentication.backend.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/auth-methods/oauth2-authentication.backend.service.js +1026 -0
- package/dist/esm/security/authentications/services/auth-methods/oauth2-authentication.backend.service.js.map +1 -0
- package/dist/esm/security/authentications/services/auth-methods/oauth2-connection-resolver.backend.service.d.ts +150 -0
- package/dist/esm/security/authentications/services/auth-methods/oauth2-connection-resolver.backend.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/auth-methods/oauth2-connection-resolver.backend.service.js +737 -0
- package/dist/esm/security/authentications/services/auth-methods/oauth2-connection-resolver.backend.service.js.map +1 -0
- package/dist/esm/security/authentications/services/auth-methods/saml-assertion-validator.backend.service.d.ts +224 -0
- package/dist/esm/security/authentications/services/auth-methods/saml-assertion-validator.backend.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/auth-methods/saml-assertion-validator.backend.service.js +593 -0
- package/dist/esm/security/authentications/services/auth-methods/saml-assertion-validator.backend.service.js.map +1 -0
- package/dist/esm/security/authentications/services/auth-methods/saml-authentication.backend.service.d.ts +267 -0
- package/dist/esm/security/authentications/services/auth-methods/saml-authentication.backend.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/auth-methods/saml-authentication.backend.service.js +1376 -0
- package/dist/esm/security/authentications/services/auth-methods/saml-authentication.backend.service.js.map +1 -0
- package/dist/esm/security/authentications/services/auth-methods/saml-metadata.backend.service.d.ts +93 -0
- package/dist/esm/security/authentications/services/auth-methods/saml-metadata.backend.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/auth-methods/saml-metadata.backend.service.js +396 -0
- package/dist/esm/security/authentications/services/auth-methods/saml-metadata.backend.service.js.map +1 -0
- package/dist/esm/security/authentications/services/auth-methods/saml-replay-guard.backend.service.d.ts +40 -0
- package/dist/esm/security/authentications/services/auth-methods/saml-replay-guard.backend.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/auth-methods/saml-replay-guard.backend.service.js +92 -0
- package/dist/esm/security/authentications/services/auth-methods/saml-replay-guard.backend.service.js.map +1 -0
- package/dist/esm/security/authentications/services/auth-methods/webauthn.backend.service.d.ts +82 -0
- package/dist/esm/security/authentications/services/auth-methods/webauthn.backend.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/auth-methods/webauthn.backend.service.js +325 -0
- package/dist/esm/security/authentications/services/auth-methods/webauthn.backend.service.js.map +1 -0
- package/dist/esm/security/authentications/services/auth-session-store.backend.service.d.ts +66 -0
- package/dist/esm/security/authentications/services/auth-session-store.backend.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/auth-session-store.backend.service.js +198 -0
- package/dist/esm/security/authentications/services/auth-session-store.backend.service.js.map +1 -0
- package/dist/esm/security/authentications/services/auth-token-issuer.backend.service.d.ts +108 -0
- package/dist/esm/security/authentications/services/auth-token-issuer.backend.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/auth-token-issuer.backend.service.js +406 -0
- package/dist/esm/security/authentications/services/auth-token-issuer.backend.service.js.map +1 -0
- package/dist/esm/security/authentications/services/authentication-orchestrator.backend.service.d.ts +366 -0
- package/dist/esm/security/authentications/services/authentication-orchestrator.backend.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/authentication-orchestrator.backend.service.js +2631 -0
- package/dist/esm/security/authentications/services/authentication-orchestrator.backend.service.js.map +1 -0
- package/dist/esm/security/authentications/services/custom-impls/auth-custom-implementations.backend.d.ts +13 -0
- package/dist/esm/security/authentications/services/custom-impls/auth-custom-implementations.backend.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/custom-impls/auth-custom-implementations.backend.js +53 -0
- package/dist/esm/security/authentications/services/custom-impls/auth-custom-implementations.backend.js.map +1 -0
- package/dist/esm/security/authentications/services/custom-impls/auth-policy.custom-impl.backend.service.d.ts +12 -0
- package/dist/esm/security/authentications/services/custom-impls/auth-policy.custom-impl.backend.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/custom-impls/auth-policy.custom-impl.backend.service.js +41 -0
- package/dist/esm/security/authentications/services/custom-impls/auth-policy.custom-impl.backend.service.js.map +1 -0
- package/dist/esm/security/authentications/services/custom-impls/scim-provisioning-config.custom-impl.backend.service.d.ts +18 -0
- package/dist/esm/security/authentications/services/custom-impls/scim-provisioning-config.custom-impl.backend.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/custom-impls/scim-provisioning-config.custom-impl.backend.service.js +140 -0
- package/dist/esm/security/authentications/services/custom-impls/scim-provisioning-config.custom-impl.backend.service.js.map +1 -0
- package/dist/esm/security/authentications/services/custom-impls/scim-tokens.custom-impl.backend.service.d.ts +16 -0
- package/dist/esm/security/authentications/services/custom-impls/scim-tokens.custom-impl.backend.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/custom-impls/scim-tokens.custom-impl.backend.service.js +112 -0
- package/dist/esm/security/authentications/services/custom-impls/scim-tokens.custom-impl.backend.service.js.map +1 -0
- package/dist/esm/security/authentications/services/custom-impls/siem-delivery-dlq.custom-impl.backend.service.d.ts +16 -0
- package/dist/esm/security/authentications/services/custom-impls/siem-delivery-dlq.custom-impl.backend.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/custom-impls/siem-delivery-dlq.custom-impl.backend.service.js +101 -0
- package/dist/esm/security/authentications/services/custom-impls/siem-delivery-dlq.custom-impl.backend.service.js.map +1 -0
- package/dist/esm/security/authentications/services/custom-impls/siem-export-config.custom-impl.backend.service.d.ts +18 -0
- package/dist/esm/security/authentications/services/custom-impls/siem-export-config.custom-impl.backend.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/custom-impls/siem-export-config.custom-impl.backend.service.js +136 -0
- package/dist/esm/security/authentications/services/custom-impls/siem-export-config.custom-impl.backend.service.js.map +1 -0
- package/dist/esm/security/authentications/services/custom-impls/sso-config.custom-impl.backend.service.d.ts +19 -0
- package/dist/esm/security/authentications/services/custom-impls/sso-config.custom-impl.backend.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/custom-impls/sso-config.custom-impl.backend.service.js +154 -0
- package/dist/esm/security/authentications/services/custom-impls/sso-config.custom-impl.backend.service.js.map +1 -0
- package/dist/esm/security/authentications/services/custom-impls/sso-connection.custom-impl.backend.service.d.ts +26 -0
- package/dist/esm/security/authentications/services/custom-impls/sso-connection.custom-impl.backend.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/custom-impls/sso-connection.custom-impl.backend.service.js +657 -0
- package/dist/esm/security/authentications/services/custom-impls/sso-connection.custom-impl.backend.service.js.map +1 -0
- package/dist/esm/security/authentications/services/utils/__tests__/mock-auth-user-lookup.service.d.ts +27 -0
- package/dist/esm/security/authentications/services/utils/__tests__/mock-auth-user-lookup.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/utils/__tests__/mock-auth-user-lookup.service.js +60 -0
- package/dist/esm/security/authentications/services/utils/__tests__/mock-auth-user-lookup.service.js.map +1 -0
- package/dist/esm/security/authentications/services/utils/auth-controller.utils.d.ts +23 -0
- package/dist/esm/security/authentications/services/utils/auth-controller.utils.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/utils/auth-controller.utils.js +44 -0
- package/dist/esm/security/authentications/services/utils/auth-controller.utils.js.map +1 -0
- package/dist/esm/security/authentications/services/utils/auth-credential-ops.backend.service.d.ts +89 -0
- package/dist/esm/security/authentications/services/utils/auth-credential-ops.backend.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/utils/auth-credential-ops.backend.service.js +192 -0
- package/dist/esm/security/authentications/services/utils/auth-credential-ops.backend.service.js.map +1 -0
- package/dist/esm/security/authentications/services/utils/auth-response-helper.backend.service.d.ts +20 -0
- package/dist/esm/security/authentications/services/utils/auth-response-helper.backend.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/utils/auth-response-helper.backend.service.js +55 -0
- package/dist/esm/security/authentications/services/utils/auth-response-helper.backend.service.js.map +1 -0
- package/dist/esm/security/authentications/services/utils/auth-user-lookup.backend.service.d.ts +50 -0
- package/dist/esm/security/authentications/services/utils/auth-user-lookup.backend.service.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/utils/auth-user-lookup.backend.service.js +135 -0
- package/dist/esm/security/authentications/services/utils/auth-user-lookup.backend.service.js.map +1 -0
- package/dist/esm/security/authentications/services/utils/saml-java-availability.d.ts +26 -0
- package/dist/esm/security/authentications/services/utils/saml-java-availability.d.ts.map +1 -0
- package/dist/esm/security/authentications/services/utils/saml-java-availability.js +59 -0
- package/dist/esm/security/authentications/services/utils/saml-java-availability.js.map +1 -0
- package/dist/esm/security/authorizations/services/authorizations.backend.service.d.ts +137 -0
- package/dist/esm/security/authorizations/services/authorizations.backend.service.d.ts.map +1 -0
- package/dist/esm/security/authorizations/services/authorizations.backend.service.js +723 -0
- package/dist/esm/security/authorizations/services/authorizations.backend.service.js.map +1 -0
- package/dist/esm/security/consumable-tokens/batches/consumable-tokens-cleanup.batch.backend.service.d.ts +28 -0
- package/dist/esm/security/consumable-tokens/batches/consumable-tokens-cleanup.batch.backend.service.d.ts.map +1 -0
- package/dist/esm/security/consumable-tokens/batches/consumable-tokens-cleanup.batch.backend.service.js +156 -0
- package/dist/esm/security/consumable-tokens/batches/consumable-tokens-cleanup.batch.backend.service.js.map +1 -0
- package/dist/esm/security/consumable-tokens/models/consumable-tokens.backend.resources-config.schemas.d.ts +4 -0
- package/dist/esm/security/consumable-tokens/models/consumable-tokens.backend.resources-config.schemas.d.ts.map +1 -0
- package/dist/esm/security/consumable-tokens/models/consumable-tokens.backend.resources-config.schemas.js +72 -0
- package/dist/esm/security/consumable-tokens/models/consumable-tokens.backend.resources-config.schemas.js.map +1 -0
- package/dist/esm/security/consumable-tokens/models/consumable-tokens.shared.schemas.d.ts +125 -0
- package/dist/esm/security/consumable-tokens/models/consumable-tokens.shared.schemas.d.ts.map +1 -0
- package/dist/esm/security/consumable-tokens/models/consumable-tokens.shared.schemas.js +69 -0
- package/dist/esm/security/consumable-tokens/models/consumable-tokens.shared.schemas.js.map +1 -0
- package/dist/esm/security/consumable-tokens/models/index.d.ts +3 -0
- package/dist/esm/security/consumable-tokens/models/index.d.ts.map +1 -0
- package/dist/esm/security/consumable-tokens/models/index.js +3 -0
- package/dist/esm/security/consumable-tokens/models/index.js.map +1 -0
- package/dist/esm/security/consumable-tokens/services/__tests__/mock-consumable-token.service.d.ts +26 -0
- package/dist/esm/security/consumable-tokens/services/__tests__/mock-consumable-token.service.d.ts.map +1 -0
- package/dist/esm/security/consumable-tokens/services/__tests__/mock-consumable-token.service.js +55 -0
- package/dist/esm/security/consumable-tokens/services/__tests__/mock-consumable-token.service.js.map +1 -0
- package/dist/esm/security/consumable-tokens/services/consumable-token.backend.service.d.ts +142 -0
- package/dist/esm/security/consumable-tokens/services/consumable-token.backend.service.d.ts.map +1 -0
- package/dist/esm/security/consumable-tokens/services/consumable-token.backend.service.js +446 -0
- package/dist/esm/security/consumable-tokens/services/consumable-token.backend.service.js.map +1 -0
- package/dist/esm/security/jwt/services/auth-jwt-guard.backend.service.d.ts +46 -0
- package/dist/esm/security/jwt/services/auth-jwt-guard.backend.service.d.ts.map +1 -0
- package/dist/esm/security/jwt/services/auth-jwt-guard.backend.service.js +147 -0
- package/dist/esm/security/jwt/services/auth-jwt-guard.backend.service.js.map +1 -0
- package/dist/esm/security/jwt/services/jwt.backend.service.d.ts +75 -0
- package/dist/esm/security/jwt/services/jwt.backend.service.d.ts.map +1 -0
- package/dist/esm/security/jwt/services/jwt.backend.service.js +368 -0
- package/dist/esm/security/jwt/services/jwt.backend.service.js.map +1 -0
- package/dist/esm/security/scim/controllers/scim.backend.controller.d.ts +71 -0
- package/dist/esm/security/scim/controllers/scim.backend.controller.d.ts.map +1 -0
- package/dist/esm/security/scim/controllers/scim.backend.controller.js +863 -0
- package/dist/esm/security/scim/controllers/scim.backend.controller.js.map +1 -0
- package/dist/esm/security/scim/models/scim-protocol.backend.schemas.d.ts +275 -0
- package/dist/esm/security/scim/models/scim-protocol.backend.schemas.d.ts.map +1 -0
- package/dist/esm/security/scim/models/scim-protocol.backend.schemas.js +139 -0
- package/dist/esm/security/scim/models/scim-protocol.backend.schemas.js.map +1 -0
- package/dist/esm/security/scim/utils/scim-filter-parser.d.ts +35 -0
- package/dist/esm/security/scim/utils/scim-filter-parser.d.ts.map +1 -0
- package/dist/esm/security/scim/utils/scim-filter-parser.js +232 -0
- package/dist/esm/security/scim/utils/scim-filter-parser.js.map +1 -0
- package/dist/esm/security/scim/utils/scim-response-formatter.d.ts +42 -0
- package/dist/esm/security/scim/utils/scim-response-formatter.d.ts.map +1 -0
- package/dist/esm/security/scim/utils/scim-response-formatter.js +89 -0
- package/dist/esm/security/scim/utils/scim-response-formatter.js.map +1 -0
- package/dist/esm/testing.d.ts +31 -0
- package/dist/esm/testing.d.ts.map +1 -0
- package/dist/esm/testing.js +31 -0
- package/dist/esm/testing.js.map +1 -0
- package/dist/esm/users/services/user-self-custom-implementations.backend.d.ts +9 -0
- package/dist/esm/users/services/user-self-custom-implementations.backend.d.ts.map +1 -0
- package/dist/esm/users/services/user-self-custom-implementations.backend.js +48 -0
- package/dist/esm/users/services/user-self-custom-implementations.backend.js.map +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -0
- package/package.json +163 -0
- package/src/__tests__/integration/bulk-repository-write-contract.integration.test.ts +373 -0
- package/src/__tests__/integration/custom-batch-job-execution.integration.test.ts +147 -0
- package/src/__tests__/integration/delete-file-rollback-persistence.integration.test.ts +551 -0
- package/src/__tests__/integration/file-management-nested-persistence.integration.test.ts +487 -0
- package/src/__tests__/integration/file-management-postgresql-persistence.integration.test.ts +466 -0
- package/src/__tests__/integration/files-cleanup-persistence.integration.test.ts +335 -0
- package/src/__tests__/integration/generated-bulk-relationship-runtime.integration.test.ts +545 -0
- package/src/__tests__/integration/lifecycle-delete-rollback-persistence.integration.test.ts +537 -0
- package/src/__tests__/integration/postgresql-contextual-filter-enforcement.integration.test.ts +170 -0
- package/src/__tests__/integration/postgresql-delete-best-effort-boundary.integration.test.ts +604 -0
- package/src/__tests__/integration/prompt-compiler.integration.test.ts +723 -0
- package/src/__tests__/integration/relationship-service-semantics.integration.test.ts +2086 -0
- package/src/__tests__/integration/repositories-registry.integration.test.ts +296 -0
- package/src/__tests__/integration/resource-factory-pipeline.integration.test.ts +556 -0
- package/src/__tests__/integration/resource-services.integration.test.ts +265 -0
- package/src/__tests__/integration/resources-registry.integration.test.ts +327 -0
- package/src/__tests__/integration/services-registry.integration.test.ts +231 -0
- package/src/__tests__/integration/update-many-runtime-guards.integration.test.ts +290 -0
- package/src/__tests__/setup.ts +15 -0
- package/src/__tests__/test-container.ts +120 -0
- package/src/applications/models/applications.backend.schemas.ts +18 -0
- package/src/base-classes/__tests__/batches-cronjobs-executor.test.ts +63 -0
- package/src/base-classes/__tests__/bulk-delete-child-file-guard.test.ts +152 -0
- package/src/base-classes/__tests__/bulk-nested-file-update-coordination.test.ts +171 -0
- package/src/base-classes/__tests__/delete-file-coordination.test.ts +185 -0
- package/src/base-classes/__tests__/postgresql-file-transaction-coordination.test.ts +424 -0
- package/src/base-classes/__tests__/postgresql-repository-contextual-filter-enforcement.test.ts +88 -0
- package/src/base-classes/__tests__/repository-contextual-filter-enforcement.test.ts +87 -0
- package/src/base-classes/__tests__/resource-operation-helper-context-enforcement.test.ts +74 -0
- package/src/base-classes/__tests__/transaction-boundaries.test.ts +153 -0
- package/src/base-classes/models/manual-controllers.backend.definition.ts +56 -0
- package/src/base-classes/models/repositories.backend.schemas.ts +105 -0
- package/src/base-classes/services/__tests__/mock-resource-operation-helper.service.ts +61 -0
- package/src/base-classes/services/batches/batches-cronjobs-custom-execution.service.ts +148 -0
- package/src/base-classes/services/batches/batches-cronjobs-executor.backend.service.ts +115 -0
- package/src/base-classes/services/batches/batches-cronjobs-resource-execution.backend.service.ts +58 -0
- package/src/base-classes/services/controllers/__tests__/controller-request-validation.utils.test.ts +292 -0
- package/src/base-classes/services/controllers/__tests__/controller-resource-file-upload-routes.test.ts +1335 -0
- package/src/base-classes/services/controllers/__tests__/controller-resource.version-conflict.test.ts +372 -0
- package/src/base-classes/services/controllers/abstract-controller.backend.service.ts +302 -0
- package/src/base-classes/services/controllers/controller-resource.backend.service.ts +1833 -0
- package/src/base-classes/services/controllers/controllers-registry-handler.backend.service.ts +494 -0
- package/src/base-classes/services/controllers/validate-field-handler.backend.service.ts +613 -0
- package/src/base-classes/services/repositories/__tests__/mock-repositories-registry-handler.service.ts +31 -0
- package/src/base-classes/services/repositories/__tests__/repository-resource.singleton-read.test.ts +50 -0
- package/src/base-classes/services/repositories/postgresql-resource-repository.backend.service.ts +1207 -0
- package/src/base-classes/services/repositories/repositories-registry-handler.backend.service.ts +804 -0
- package/src/base-classes/services/repositories/repository-resource.backend.service.ts +2186 -0
- package/src/base-classes/services/resource-operations-helper.backend.service.ts +468 -0
- package/src/base-classes/services/services/__tests__/mock-services-registry-handler.service.ts +21 -0
- package/src/base-classes/services/services/__tests__/services-registry-handler.notifications.test.ts +65 -0
- package/src/base-classes/services/services/resource-operation-custom-implementation-base.backend.service.ts +305 -0
- package/src/base-classes/services/services/resource-operation-custom-implementation-registry.backend.service.ts +224 -0
- package/src/base-classes/services/services/resource-operation-custom-implementation.factory.backend.ts +331 -0
- package/src/base-classes/services/services/services-registry-handler.backend.service.ts +6288 -0
- package/src/base-classes/utils/backend-type-utils.ts +64 -0
- package/src/billing/services/back-office/__tests__/billing-feature-sync.backend.service.test.ts +132 -0
- package/src/billing/services/back-office/__tests__/billing-state.backend.service.test.ts +245 -0
- package/src/billing/services/back-office/__tests__/product-catalog-sync.backend.service.test.ts +238 -0
- package/src/billing/services/back-office/abstract-billing.backend.service.ts +89 -0
- package/src/billing/services/back-office/billing-feature-sync.backend.service.ts +473 -0
- package/src/billing/services/back-office/billing-state.backend.service.ts +348 -0
- package/src/billing/services/back-office/product-catalog-sync.backend.service.ts +415 -0
- package/src/billing/services/back-office/usage-metering.backend.service.ts +326 -0
- package/src/billing/services/billing.utils.ts +26 -0
- package/src/billing/services/custom-impl/billing-account.mutations.custom-impl.backend.service.ts +342 -0
- package/src/billing/services/custom-impl/billing-custom-impl-utils.backend.ts +274 -0
- package/src/billing/services/custom-impl/billing-custom-implementations.backend.ts +236 -0
- package/src/billing/services/custom-impl/credit-pool.custom-ops.custom-impl.backend.service.ts +133 -0
- package/src/billing/services/custom-impl/promotion.custom-ops.custom-impl.backend.service.ts +242 -0
- package/src/billing/services/custom-impl/subscription.mutations.custom-impl.backend.service.ts +434 -0
- package/src/billing/services/webhooks/billing-webhook-adapter.backend.service.ts +70 -0
- package/src/billing/services/webhooks/billing-webhook-capability-handler.backend.service.ts +46 -0
- package/src/billing/services/webhooks/billing-webhook-event-router.backend.service.ts +727 -0
- package/src/billing/testing/billing-test-fixtures.ts +296 -0
- package/src/billing/testing/mock-billing-provider.ts +548 -0
- package/src/charts/controllers/__tests__/chart.backend.controller.test.ts +403 -0
- package/src/charts/controllers/chart.backend.controller.ts +238 -0
- package/src/charts/services/__tests__/chart-registry.backend.service.test.ts +120 -0
- package/src/charts/services/chart-registry.backend.service.ts +109 -0
- package/src/compliance/audit-trails/audit-logs.custom-impl.backend.service.ts +104 -0
- package/src/compliance/audit-trails/services/__tests__/mock-audit-logs.service.ts +48 -0
- package/src/compliance/audit-trails/services/audit-event-dispatcher.backend.service.ts +325 -0
- package/src/compliance/audit-trails/services/audit-logs.backend.service.ts +1313 -0
- package/src/compliance/audit-trails/services/siem-webhook-delivery.backend.service.ts +542 -0
- package/src/compliance/index.ts +1 -0
- package/src/config/custom/application-config-controller.backend.service.ts +119 -0
- package/src/config/models/__tests__/app-config-secrets.boundaries.test.ts +56 -0
- package/src/config/models/__tests__/app-config.backend-authored.definitions.test.ts +286 -0
- package/src/config/models/app-config-secrets.backend.schemas.ts +154 -0
- package/src/config/models/app-config.backend-authored.definitions.ts +165 -0
- package/src/config/models/app-config.backend.schemas.ts +614 -0
- package/src/config/models/app-env-config.backend.schemas.ts +135 -0
- package/src/config/models/config-mutation-boundary.utils.ts +76 -0
- package/src/config/models/postgresql-env-config.backend.schemas.ts +126 -0
- package/src/config/models/runtime-topology.backend.contracts.ts +42 -0
- package/src/config/services/__tests__/app-configuration-loader.backend.service.test.ts +118 -0
- package/src/config/services/__tests__/app-configuration.backend.service.test.ts +40 -0
- package/src/config/services/__tests__/app-configuration.backend.utils.test.ts +72 -0
- package/src/config/services/__tests__/application-startup-config-validator.backend.service.test.ts +404 -0
- package/src/config/services/__tests__/mock-app-configuration.service.ts +131 -0
- package/src/config/services/app-configuration-loader.backend.service.ts +443 -0
- package/src/config/services/app-configuration.backend.service.ts +570 -0
- package/src/config/services/app-configuration.backend.utils.ts +94 -0
- package/src/config/services/application-startup-config-validator.backend.service.ts +611 -0
- package/src/databases/models/aggregation.backend.schemas.ts +174 -0
- package/src/databases/models/databases.backend.schemas.ts +70 -0
- package/src/databases/models/filter.backend.schemas.ts +101 -0
- package/src/databases/models/sql.backend.schemas.ts +111 -0
- package/src/databases/models/transaction.shared.schemas.ts +172 -0
- package/src/databases/services/__tests__/mock-mongo-transaction-registry.service.ts +90 -0
- package/src/databases/services/__tests__/mock-mongodb.service.ts +86 -0
- package/src/databases/services/__tests__/mock-mongoose-model.service.ts +411 -0
- package/src/databases/services/__tests__/mock-redis.service.ts +72 -0
- package/src/databases/services/__tests__/mock-zod-mongoose-schema-convertor.service.ts +41 -0
- package/src/databases/services/__tests__/mongo-aggregation-compiler.test.ts +918 -0
- package/src/databases/services/__tests__/postgresql-filter.backend.service.test.ts +180 -0
- package/src/databases/services/__tests__/sql-hybrid-transform.test.ts +73 -0
- package/src/databases/services/aggregation/__tests__/aggregation-authorization.backend.service.test.ts +444 -0
- package/src/databases/services/aggregation/__tests__/aggregation-query.backend.service.test.ts +150 -0
- package/src/databases/services/aggregation/__tests__/computed-measure-evaluator.test.ts +525 -0
- package/src/databases/services/aggregation/__tests__/field-access-validator.test.ts +458 -0
- package/src/databases/services/aggregation/__tests__/time-series-densifier.test.ts +631 -0
- package/src/databases/services/aggregation/__tests__/window-function-processor.test.ts +598 -0
- package/src/databases/services/aggregation/aggregation-authorization.backend.service.ts +516 -0
- package/src/databases/services/aggregation/aggregation-query.backend.service.ts +514 -0
- package/src/databases/services/aggregation/computed-measure-evaluator.backend.service.ts +196 -0
- package/src/databases/services/aggregation/field-access-validator.backend.service.ts +225 -0
- package/src/databases/services/aggregation/time-series-densifier.backend.service.ts +389 -0
- package/src/databases/services/aggregation/topn-processor.backend.service.ts +221 -0
- package/src/databases/services/aggregation/window-function-processor.backend.service.ts +301 -0
- package/src/databases/services/db-utils.ts +96 -0
- package/src/databases/services/mongo-aggregation.backend.service.ts +762 -0
- package/src/databases/services/mongodb.service.ts +736 -0
- package/src/databases/services/postgresql-aggregation.backend.service.ts +794 -0
- package/src/databases/services/postgresql-database.backend.service.ts +288 -0
- package/src/databases/services/postgresql-filter.backend.service.ts +673 -0
- package/src/databases/services/redis.service.ts +531 -0
- package/src/databases/services/zod-to-mongoose-schema-convertor.backend.service.ts +2486 -0
- package/src/databases/services/zod-to-sql-hybrid-schema.planner.ts +312 -0
- package/src/errors/services/__tests__/error-builder.backend.service.test.ts +31 -0
- package/src/errors/services/__tests__/error-handler.backend.service.test.ts +82 -0
- package/src/errors/services/__tests__/mock-error-builder.service.ts +288 -0
- package/src/errors/services/error-builder.backend.service.ts +403 -0
- package/src/errors/services/error-handler.backend.service.ts +236 -0
- package/src/errors/services/rate-limit.backend.service.ts +45 -0
- package/src/external-providers/models/external-providers.backend.schemas.ts +243 -0
- package/src/external-providers/services/__tests__/external-providers-registry.backend.service.test.ts +136 -0
- package/src/external-providers/services/__tests__/feature-bindings.backend.service.test.ts +40 -0
- package/src/external-providers/services/__tests__/mock-external-providers-registry.service.ts +33 -0
- package/src/external-providers/services/__tests__/mock-lazy-provider-registry.service.ts +45 -0
- package/src/external-providers/services/external-api-handler.backend.service.ts +19 -0
- package/src/external-providers/services/external-providers-registry.backend.service.ts +534 -0
- package/src/external-providers/services/feature-bindings.backend.service.ts +422 -0
- package/src/external-providers/services/lazy-provider-registry.backend.service.ts +486 -0
- package/src/features/__tests__/feature-builders.test.ts +152 -0
- package/src/features/controllers/__tests__/features.backend.controller.test.ts +173 -0
- package/src/features/controllers/features.backend.controller.ts +200 -0
- package/src/features/services/__tests__/feature-definition-registry.backend.service.test.ts +152 -0
- package/src/features/services/__tests__/feature-gate.test.ts +484 -0
- package/src/features/services/__tests__/feature-resolution.backend.service.test.ts +203 -0
- package/src/features/services/__tests__/mock-capability-bindings.service.ts +26 -0
- package/src/features/services/__tests__/mock-feature-definition-registry.service.ts +56 -0
- package/src/features/services/__tests__/mock-feature-resolution.service.ts +36 -0
- package/src/features/services/feature-definition-registry.backend.service.ts +537 -0
- package/src/features/services/feature-gate.backend.service.ts +522 -0
- package/src/features/services/feature-resolution.backend.service.ts +652 -0
- package/src/features/testing/feature-test-utils.ts +200 -0
- package/src/files/batches/__tests__/files-cleanup.batch.backend.service.test.ts +186 -0
- package/src/files/batches/files-cleanup.batch.backend.service.ts +259 -0
- package/src/files/constraints/file-analyzers.types.ts +85 -0
- package/src/files/constraints/file-constraint-resolver-chain.backend.service.ts +99 -0
- package/src/files/constraints/file-constraint.types.ts +104 -0
- package/src/files/constraints/file-validation.backend.service.ts +359 -0
- package/src/files/constraints/resource-field-constraint-resolver.backend.service.ts +138 -0
- package/src/files/controllers/__tests__/file.controller.behavior.test.ts +655 -0
- package/src/files/controllers/file.controller.ts +1030 -0
- package/src/files/handlers/__tests__/resource-file-upload-handler.backend.service.test.ts +392 -0
- package/src/files/handlers/resource-file-upload-handler.backend.service.ts +605 -0
- package/src/files/rag/weaviate-vector-store.backend.service.ts +271 -0
- package/src/files/scanning/clamav-scanner.backend.service.ts +214 -0
- package/src/files/scanning/file-scan.types.ts +17 -0
- package/src/files/scanning/yara-scanner.backend.service.ts +212 -0
- package/src/files/services/__tests__/file-field-detection.backend.service.test.ts +91 -0
- package/src/files/services/__tests__/file-operation-handler.backend.service.test.ts +272 -0
- package/src/files/services/__tests__/file-population.backend.service.test.ts +120 -0
- package/src/files/services/__tests__/file-scanning.backend.service.test.ts +163 -0
- package/src/files/services/__tests__/files.backend.service.test.ts +885 -0
- package/src/files/services/__tests__/mock-file-field-detection.service.ts +43 -0
- package/src/files/services/__tests__/mock-file-operation-handler.service.ts +113 -0
- package/src/files/services/__tests__/mock-file-repository.service.ts +104 -0
- package/src/files/services/file-field-detection.backend.service.ts +156 -0
- package/src/files/services/file-operation-handler.backend.service.ts +861 -0
- package/src/files/services/file-population.backend.service.ts +485 -0
- package/src/files/services/file-rag-indexing.backend.service.ts +229 -0
- package/src/files/services/file-scanning.backend.service.ts +373 -0
- package/src/files/services/file-text-extraction.backend.service.ts +193 -0
- package/src/files/services/files.backend.service.ts +1356 -0
- package/src/files/storage/file-storage-path-resolver.backend.service.ts +289 -0
- package/src/files/storage/file-storage-provider.types.ts +188 -0
- package/src/files/storage/file-storage-router.backend.service.ts +172 -0
- package/src/files/storage/local-directory-storage-provider.backend.service.ts +417 -0
- package/src/files/storage/wildo-managed-storage-provider.backend.service.ts +530 -0
- package/src/files/utils/__tests__/file-field-schema-path.backend.utils.test.ts +44 -0
- package/src/files/utils/__tests__/file-uploader.utils.test.ts +57 -0
- package/src/files/utils/__tests__/file-validation.utils.test.ts +559 -0
- package/src/files/utils/file-field-schema-path.backend.utils.ts +385 -0
- package/src/files/utils/file-upload.utils.ts +146 -0
- package/src/files/utils/file-uploader.utils.ts +65 -0
- package/src/files/utils/file-validation.utils.ts +753 -0
- package/src/flows-actors/agent-catalogs.backend.ts +427 -0
- package/src/flows-actors/controllers/flows-actors.controller.ts +91 -0
- package/src/flows-actors/models/agent-catalogs.backend.definitions.ts +430 -0
- package/src/flows-actors/models/agent-facets.backend.definitions.ts +120 -0
- package/src/flows-actors/models/agents.backend.definitions.ts +4 -0
- package/src/flows-actors/models/core-facets.backend.definitions.ts +348 -0
- package/src/flows-actors/models/flows-actors.backend.definitions.ts +13 -0
- package/src/flows-actors/models/flows-actors.backend.schemas.ts +44 -0
- package/src/flows-actors/services/__tests__/agent-facets-catalogs.test.ts +544 -0
- package/src/flows-actors/services/__tests__/agents.backend.service.cli-runtime.test.ts +234 -0
- package/src/flows-actors/services/actors-system.backend.service.ts +270 -0
- package/src/flows-actors/services/agent-facets.backend.service.ts +350 -0
- package/src/flows-actors/services/agents.backend.service.ts +2730 -0
- package/src/flows-actors/services/context-curation.backend.service.ts +203 -0
- package/src/flows-actors/services/flows-actors-registry.service.ts +374 -0
- package/src/flows-actors/services/flows.backend.services.ts +237 -0
- package/src/flows-actors/services/prompt-compiler.backend.service.ts +734 -0
- package/src/flows-actors/utils/__tests__/cli-runtime-operation-support.backend.utils.test.ts +95 -0
- package/src/flows-actors/utils/cli-runtime-operation-support.backend.utils.ts +87 -0
- package/src/flows-actors/utils/cli-runtime-runner.backend.utils.ts +171 -0
- package/src/flows-actors/utils/flows-actors-frontend-extractor.utils.ts +63 -0
- package/src/flows-actors/utils/prompt-ir-adapters.backend.utils.ts +257 -0
- package/src/guidance/batches/dormancy-detection.batch.backend.service.ts +126 -0
- package/src/guidance/services/__tests__/guidance-trigger-evaluator.backend.service.test.ts +49 -0
- package/src/guidance/services/__tests__/lifecycle-evaluator.backend.service.test.ts +85 -0
- package/src/guidance/services/__tests__/milestone-definition-registry.backend.service.test.ts +211 -0
- package/src/guidance/services/__tests__/milestone-evaluator.backend.service.test.ts +561 -0
- package/src/guidance/services/guidance-trigger-evaluator.backend.service.ts +151 -0
- package/src/guidance/services/lifecycle-custom-implementations.backend.ts +139 -0
- package/src/guidance/services/lifecycle-evaluator.backend.service.ts +908 -0
- package/src/guidance/services/milestone-condition-registry.backend.service.ts +57 -0
- package/src/guidance/services/milestone-definition-registry.backend.service.ts +265 -0
- package/src/guidance/services/milestone-evaluator.backend.service.ts +611 -0
- package/src/i18n/controllers/i18n-controller.backend.service.ts +227 -0
- package/src/i18n/services/i18n.backend.service.ts +88 -0
- package/src/index.ts +286 -0
- package/src/inject/models/container.ts +586 -0
- package/src/inject/models/service-types.ts +488 -0
- package/src/monitoring/analytics/controllers/analytics.backend.controller.ts +114 -0
- package/src/monitoring/analytics/services/value-moment-engine.backend.service.ts +53 -0
- package/src/monitoring/analytics/services/value-moment-handler-registry.backend.service.ts +38 -0
- package/src/monitoring/logger/middleware/logging.middleware.ts +40 -0
- package/src/monitoring/logger/models/logger.backend.schemas.ts +56 -0
- package/src/monitoring/logger/services/__tests__/mock-logger.service.ts +49 -0
- package/src/monitoring/logger/services/logger.service.ts +214 -0
- package/src/monitoring/observability/middleware/metrics.middleware.ts +205 -0
- package/src/monitoring/observability/middleware/telemetry.middleware.ts +188 -0
- package/src/monitoring/observability/middleware/tracing.middleware.ts +265 -0
- package/src/monitoring/observability/models/observability.backend.schemas.ts +96 -0
- package/src/monitoring/observability/services/instrumentations/custom.instrumentations.ts +132 -0
- package/src/monitoring/observability/services/metrics.service.ts +266 -0
- package/src/monitoring/observability/services/telemetry.service.ts +157 -0
- package/src/monitoring/observability/services/tracer.service.ts +334 -0
- package/src/notifications/email/components/email-components.ts +341 -0
- package/src/notifications/email/models/email-context-provider.interface.ts +107 -0
- package/src/notifications/email/models/email-template-definition.ts +74 -0
- package/src/notifications/email/models/email-template.actors-system.backend.definitions.ts +80 -0
- package/src/notifications/email/models/email.backend.scheamas.ts +0 -0
- package/src/notifications/email/services/email-batch-send.batch.backend.service.ts +236 -0
- package/src/notifications/email/services/email-context-provider-registry.backend.service.ts +157 -0
- package/src/notifications/email/services/email-renderer.backend.service.ts +274 -0
- package/src/notifications/email/services/email-template-compiler.backend.service.ts +136 -0
- package/src/notifications/email/services/email-template-generation.backend.service.ts +811 -0
- package/src/notifications/email/services/email-template-registry.backend.service.ts +166 -0
- package/src/notifications/email/services/email-template-sandbox.backend.service.ts +255 -0
- package/src/notifications/email/services/email-template-validator.backend.service.ts +229 -0
- package/src/notifications/email/services/email.backend.service.ts +429 -0
- package/src/notifications/email/utils/color-conversion.utils.ts +142 -0
- package/src/notifications/email/utils/interpolate-email-label.utils.ts +16 -0
- package/src/notifications/email/utils/zod-to-typescript.utils.ts +352 -0
- package/src/notifications/services/__tests__/notifications-dispatcher.operation-semantics.test.ts +773 -0
- package/src/notifications/services/__tests__/notifications-dispatcher.websocket-integration.test.ts +173 -0
- package/src/notifications/services/notification-badge.backend.service.ts +412 -0
- package/src/notifications/services/notifications-dispatcher.backend.service.ts +1696 -0
- package/src/notifications/sms/services/sms.backend.service.ts +283 -0
- package/src/notifications/webhooks/controllers/webhook-auto-controller.backend.service.ts +220 -0
- package/src/notifications/webhooks/services/polymorphic-lookup.backend.service.ts +131 -0
- package/src/notifications/webhooks/services/webhook-handler.backend.service.ts +481 -0
- package/src/organizations/services/__tests__/org-creation-on-registration.backend.utils.test.ts +193 -0
- package/src/organizations/services/__tests__/org-member-roles-validation.backend.utils.test.ts +101 -0
- package/src/organizations/services/__tests__/organization-custom-implementation.backend.service.test.ts +113 -0
- package/src/organizations/services/__tests__/scim-provisioning-gate.backend.utils.test.ts +94 -0
- package/src/organizations/services/__tests__/user-org-type-grant.backend.utils.test.ts +164 -0
- package/src/organizations/services/__tests__/user-type-revocation-on-org-leave.backend.utils.test.ts +161 -0
- package/src/organizations/services/org-creation-on-registration.backend.utils.ts +119 -0
- package/src/organizations/services/org-member-roles-validation.backend.utils.ts +51 -0
- package/src/organizations/services/organization-custom-implementation.backend.service.ts +106 -0
- package/src/organizations/services/organization-member-custom-implementation.backend.service.ts +150 -0
- package/src/organizations/services/scim-provisioning-gate.backend.utils.ts +34 -0
- package/src/organizations/services/user-org-type-grant.backend.utils.ts +49 -0
- package/src/organizations/services/user-type-revocation-on-org-leave.backend.utils.ts +102 -0
- package/src/queue/adapters/rabbitmq-adapter.backend.service.ts +494 -0
- package/src/queue/apps-crontabs-manager.backend.service.ts +258 -0
- package/src/queue/cron-job-sync.backend.service.ts +184 -0
- package/src/queue/domain-queue-consumer.backend.service.ts +333 -0
- package/src/queue/job-completion-registry.backend.service.ts +342 -0
- package/src/queue/job-consumer.backend.service.ts +646 -0
- package/src/queue/job-executor.backend.service.ts +315 -0
- package/src/queue/job-payload-storage.backend.service.ts +297 -0
- package/src/queue/job-status-tracking.backend.service.ts +376 -0
- package/src/queue/queue-monitoring.backend.service.ts +333 -0
- package/src/queue/queue-worker-initializer.backend.service.ts +179 -0
- package/src/queue/queue.backend.service.ts +530 -0
- package/src/queue/scheduled-message-verifier.backend.service.ts +228 -0
- package/src/queue/worker-shutdown-manager.backend.service.ts +298 -0
- package/src/requests/models/api-routes.backend.defintions.ts +45 -0
- package/src/requests/models/requests.backend.schemas.ts +73 -0
- package/src/requests/service/__tests__/websocket.service.auth-refresh.test.ts +361 -0
- package/src/requests/service/__tests__/websocket.service.resource-room-validation.test.ts +234 -0
- package/src/requests/service/__tests__/websocket.service.variant-authorization.test.ts +94 -0
- package/src/requests/service/platform-mutualized-handler.backend.service.ts +19 -0
- package/src/requests/service/platform-requests.backend.utils.ts +54 -0
- package/src/requests/service/remote-client-base.backend.service.ts +485 -0
- package/src/requests/service/serverless-services-handler.backend.service.ts +19 -0
- package/src/requests/service/websocket.service.ts +2844 -0
- package/src/resources/models/custom-service-implementations.backend.definition.ts +22 -0
- package/src/resources/models/index.ts +7 -0
- package/src/resources/models/resources-operations.backend.definitions.ts +9 -0
- package/src/resources/models/resources-relationships.backend.definitions.ts +30 -0
- package/src/resources/models/resources-types.backend.schemas.ts +14 -0
- package/src/resources/models/resources.backend.schemas.ts +6 -0
- package/src/resources/models/virtual-fields.backend.types.ts +132 -0
- package/src/resources/services/__tests__/mock-resources-registry.service.ts +69 -0
- package/src/resources/services/__tests__/resource-id.backend.service.test.ts +69 -0
- package/src/resources/services/resource-context.backend.service.ts +1107 -0
- package/src/resources/services/resource-id.backend.service.ts +280 -0
- package/src/resources/services/resource-population.backend.service.ts +761 -0
- package/src/resources/services/resources-registry.backend.service.ts +1126 -0
- package/src/resources/services/virtual-fields.backend.service.ts +303 -0
- package/src/runtime/__tests__/execution-context-creator.backend.service.test.ts +469 -0
- package/src/runtime/controllers/health-controller.backend.service.ts +297 -0
- package/src/runtime/domain-module.backend.definitions.test.ts +83 -0
- package/src/runtime/domain-module.backend.definitions.ts +161 -0
- package/src/runtime/models/execution-context.backend.schemas.ts +456 -0
- package/src/runtime/models/runtime.backend.schemas.ts +82 -0
- package/src/runtime/services/execution-context-creator.backend.service.ts +2102 -0
- package/src/runtime/services/execution-context-handler.backend.service.ts +224 -0
- package/src/runtime/services/health-readiness-contributor.backend.interface.ts +11 -0
- package/src/runtime/services/http-server.backend.service.ts +870 -0
- package/src/runtime/services/start-application.backend.service.ts +1109 -0
- package/src/runtime/testing/execution-context-test-fixtures.ts +14 -0
- package/src/runtime/testing/mock-execution-context-creator.service.ts +46 -0
- package/src/runtime/utils/scan-default-exports.backend.utils.ts +247 -0
- package/src/security/authentications/__tests__/auth-registration.test.ts +338 -0
- package/src/security/authentications/__tests__/authentication-controller.test.ts +31 -0
- package/src/security/authentications/__tests__/authentication-orchestrator.test.ts +27 -0
- package/src/security/authentications/__tests__/saml-assertion-validator.test.ts +631 -0
- package/src/security/authentications/__tests__/saml-authentication.test.ts +126 -0
- package/src/security/authentications/__tests__/saml-integration-test-helpers.test.ts +234 -0
- package/src/security/authentications/__tests__/saml-metadata.test.ts +185 -0
- package/src/security/authentications/__tests__/saml-replay-guard.test.ts +99 -0
- package/src/security/authentications/__tests__/saml-sso-flow.integration.test.ts +355 -0
- package/src/security/authentications/__tests__/saml-test-fixtures.test.ts +433 -0
- package/src/security/authentications/__tests__/saml-test-parser.test.ts +117 -0
- package/src/security/authentications/__tests__/sso-connection-custom-ops.integration.test.ts +236 -0
- package/src/security/authentications/batches/anonymous-session-cleanup.batch.backend.service.ts +71 -0
- package/src/security/authentications/controllers/auth-method-management-controller.backend.service.ts +205 -0
- package/src/security/authentications/controllers/authentication-controller.backend.service.ts +2712 -0
- package/src/security/authentications/models/auth-constants.backend.ts +141 -0
- package/src/security/authentications/models/authentications.backend.schemas.ts +106 -0
- package/src/security/authentications/models/jwt.backend.schemas.ts +107 -0
- package/src/security/authentications/models/oauth2-connection.backend.schemas.ts +196 -0
- package/src/security/authentications/models/saml-authentication.backend.schemas.ts +124 -0
- package/src/security/authentications/models/sso-connection.backend.schemas.ts +104 -0
- package/src/security/authentications/services/__tests__/mock-auth-execution-context-factory.service.ts +73 -0
- package/src/security/authentications/services/__tests__/mock-auth-token-issuer.service.ts +46 -0
- package/src/security/authentications/services/admin-config/__tests__/mock-domain-to-org-lookup.service.ts +40 -0
- package/src/security/authentications/services/admin-config/__tests__/mock-enterprise-user-provisioning.service.ts +67 -0
- package/src/security/authentications/services/admin-config/auth-organization-configuration.service.ts +424 -0
- package/src/security/authentications/services/admin-config/domain-to-org-lookup.backend.service.ts +244 -0
- package/src/security/authentications/services/admin-config/domain-verification.backend.service.ts +215 -0
- package/src/security/authentications/services/admin-config/enterprise-user-provisioning.backend.service.ts +509 -0
- package/src/security/authentications/services/admin-config/oidc-discovery.backend.service.ts +250 -0
- package/src/security/authentications/services/anonymous-session.backend.service.ts +442 -0
- package/src/security/authentications/services/auth-credential-verifier.backend.service.ts +147 -0
- package/src/security/authentications/services/auth-execution-context-factory.backend.service.ts +132 -0
- package/src/security/authentications/services/auth-methods/auth-method-management.backend.service.ts +532 -0
- package/src/security/authentications/services/auth-methods/auth-mfa.backend.service.ts +141 -0
- package/src/security/authentications/services/auth-methods/auth-password-reset.backend.service.ts +215 -0
- package/src/security/authentications/services/auth-methods/auth-phone-verification.backend.service.ts +136 -0
- package/src/security/authentications/services/auth-methods/auth-registration.backend.service.ts +994 -0
- package/src/security/authentications/services/auth-methods/oauth2-authentication.backend.service.ts +1210 -0
- package/src/security/authentications/services/auth-methods/oauth2-connection-resolver.backend.service.ts +903 -0
- package/src/security/authentications/services/auth-methods/saml-assertion-validator.backend.service.ts +791 -0
- package/src/security/authentications/services/auth-methods/saml-authentication.backend.service.ts +1727 -0
- package/src/security/authentications/services/auth-methods/saml-metadata.backend.service.ts +432 -0
- package/src/security/authentications/services/auth-methods/saml-replay-guard.backend.service.ts +90 -0
- package/src/security/authentications/services/auth-methods/webauthn.backend.service.ts +393 -0
- package/src/security/authentications/services/auth-session-store.backend.service.ts +211 -0
- package/src/security/authentications/services/auth-token-issuer.backend.service.ts +496 -0
- package/src/security/authentications/services/authentication-orchestrator.backend.service.ts +3156 -0
- package/src/security/authentications/services/custom-impls/auth-custom-implementations.backend.ts +88 -0
- package/src/security/authentications/services/custom-impls/auth-policy.custom-impl.backend.service.ts +54 -0
- package/src/security/authentications/services/custom-impls/scim-provisioning-config.custom-impl.backend.service.ts +167 -0
- package/src/security/authentications/services/custom-impls/scim-tokens.custom-impl.backend.service.ts +136 -0
- package/src/security/authentications/services/custom-impls/siem-delivery-dlq.custom-impl.backend.service.ts +123 -0
- package/src/security/authentications/services/custom-impls/siem-export-config.custom-impl.backend.service.ts +161 -0
- package/src/security/authentications/services/custom-impls/sso-config.custom-impl.backend.service.ts +185 -0
- package/src/security/authentications/services/custom-impls/sso-connection.custom-impl.backend.service.ts +792 -0
- package/src/security/authentications/services/utils/__tests__/mock-auth-user-lookup.service.ts +62 -0
- package/src/security/authentications/services/utils/auth-controller.utils.ts +51 -0
- package/src/security/authentications/services/utils/auth-credential-ops.backend.service.ts +202 -0
- package/src/security/authentications/services/utils/auth-response-helper.backend.service.ts +38 -0
- package/src/security/authentications/services/utils/auth-user-lookup.backend.service.ts +128 -0
- package/src/security/authentications/services/utils/saml-java-availability.ts +64 -0
- package/src/security/authorizations/__tests__/authorizations.backend.service.test.ts +82 -0
- package/src/security/authorizations/services/authorizations.backend.service.ts +934 -0
- package/src/security/consumable-tokens/batches/consumable-tokens-cleanup.batch.backend.service.ts +168 -0
- package/src/security/consumable-tokens/models/consumable-tokens.backend.resources-config.schemas.ts +92 -0
- package/src/security/consumable-tokens/models/consumable-tokens.shared.schemas.ts +86 -0
- package/src/security/consumable-tokens/models/index.ts +3 -0
- package/src/security/consumable-tokens/services/__tests__/mock-consumable-token.service.ts +63 -0
- package/src/security/consumable-tokens/services/consumable-token.backend.service.ts +568 -0
- package/src/security/jwt/services/auth-jwt-guard.backend.service.ts +137 -0
- package/src/security/jwt/services/jwt.backend.service.ts +397 -0
- package/src/security/scim/__tests__/scim-filter-parser.test.ts +121 -0
- package/src/security/scim/controllers/scim.backend.controller.ts +1066 -0
- package/src/security/scim/models/scim-protocol.backend.schemas.ts +258 -0
- package/src/security/scim/utils/scim-filter-parser.ts +289 -0
- package/src/security/scim/utils/scim-response-formatter.ts +122 -0
- package/src/testing.ts +30 -0
- package/src/types/xmldom.d.ts +9 -0
- package/src/users/services/user-self-custom-implementations.backend.ts +62 -0
|
@@ -0,0 +1,1833 @@
|
|
|
1
|
+
import 'reflect-metadata';
|
|
2
|
+
import { injectable, inject } from 'inversify';
|
|
3
|
+
import { Router, Request, Response, NextFunction } from 'express';
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
import type {
|
|
6
|
+
ResourceConfiguration,
|
|
7
|
+
ResourceConfiguration_Operation,
|
|
8
|
+
ResourceConfiguration_OperationPath,
|
|
9
|
+
ResourceType,
|
|
10
|
+
ResourceConfiguration_Operation_UrlInitiatorInfo,
|
|
11
|
+
ResourceConfiguration_Operation_UrlParameterInfo,
|
|
12
|
+
ResourceConfiguration_Operation_ApiCall,
|
|
13
|
+
ResourceConfiguration_Operation_ApiCallWithCallback,
|
|
14
|
+
VersionConflictDetails,
|
|
15
|
+
} from '@wildo-ai/saas-models';
|
|
16
|
+
import { EnumLikeType } from '@wildo-ai/zod-decorators';
|
|
17
|
+
import { HttpMethod, DataMode, OPERATION_VARIANT_KEY, ResourcesConfigOperationsDtosBuilderUtils, ResourceOperationsUtils, ResourcesConfigOperationsUrlsBuilderUtils, extractCrdtFieldNames } from '@wildo-ai/saas-models';
|
|
18
|
+
import { isBackendOnlyField, getBackendOnlyParams, isAuditAccessField, getZodObjectShape, isZodObject } from '@wildo-ai/zod-decorators';
|
|
19
|
+
|
|
20
|
+
import { ExecutionContext_ExecutionType, ExecutionContext_InitiatorIds, UserStatus, OrganizationMemberStatus, ApiKeyStatus } from '@wildo-ai/saas-models';
|
|
21
|
+
import { CoreResourceOperation, ALL_COLLECTION_OPERATIONS, OPERATIONS_WITHOUT_REQUEST_BODY, ARRAY_RESPONSE_OPERATIONS } from '@wildo-ai/saas-models';
|
|
22
|
+
import { ResourceOperationVariantType, ResourcesConfig_OperationPathUtils, ErrorType, ErrorCustomMessageReference, WildoHeaderKeys, isWildoBackendError } from '@wildo-ai/saas-models';
|
|
23
|
+
import { ExecutionContext } from '~wildo-backend-lib/runtime/models/execution-context.backend.schemas';
|
|
24
|
+
import { LoggerService } from '~wildo-backend-lib/monitoring/logger/services/logger.service';
|
|
25
|
+
import { ServicesRegistryHandlerBackendService } from '~wildo-backend-lib/base-classes/services/services/services-registry-handler.backend.service';
|
|
26
|
+
import { RepositoriesRegistryHandlerBackendService } from '~wildo-backend-lib/base-classes/services/repositories/repositories-registry-handler.backend.service';
|
|
27
|
+
import { ErrorBuilderBackendService } from '~wildo-backend-lib/errors/services/error-builder.backend.service';
|
|
28
|
+
import { ErrorHandlerService } from '~wildo-backend-lib/errors/services/error-handler.backend.service';
|
|
29
|
+
import { JwtBackendService } from '~wildo-backend-lib/security/jwt/services/jwt.backend.service';
|
|
30
|
+
import { AuthorizationsBackendService } from '~wildo-backend-lib/security/authorizations/services/authorizations.backend.service';
|
|
31
|
+
import { ExecutionContextCreatorBackendService } from '~wildo-backend-lib/runtime/services/execution-context-creator.backend.service';
|
|
32
|
+
import { ResourceFileUploadHandlerBackendService } from '~wildo-backend-lib/files/handlers/resource-file-upload-handler.backend.service';
|
|
33
|
+
import { FileFieldDetectionBackendService } from '~wildo-backend-lib/files/services/file-field-detection.backend.service';
|
|
34
|
+
import { createMulterUploadConfig } from '~wildo-backend-lib/files/utils/file-upload.utils';
|
|
35
|
+
import { ResourcesRegistryBackendService } from '~wildo-backend-lib/resources/services/resources-registry.backend.service';
|
|
36
|
+
import { JwtClaim_App_Auth_Schema } from '~wildo-backend-lib/security/authentications/models/authentications.backend.schemas';
|
|
37
|
+
import { SAAS_SERVICE_TYPES } from '~wildo-backend-lib/inject/models/service-types';
|
|
38
|
+
import { ExecutionContextHandlerBackendService } from '~wildo-backend-lib/runtime/services/execution-context-handler.backend.service';
|
|
39
|
+
import { ResourceOperationHelperBackendService } from '~wildo-backend-lib/base-classes/services/resource-operations-helper.backend.service';
|
|
40
|
+
import type { ServiceOptions } from '~wildo-backend-lib/base-classes/models/repositories.backend.schemas';
|
|
41
|
+
import { AuditLogsBackendService } from '~wildo-backend-lib/compliance/audit-trails/services/audit-logs.backend.service';
|
|
42
|
+
import { AnonymousSessionBackendService } from '~wildo-backend-lib/security/authentications/services/anonymous-session.backend.service';
|
|
43
|
+
import { AppConfigurationService } from '~wildo-backend-lib/config/services/app-configuration.backend.service';
|
|
44
|
+
import { resolveConfiguredMaxFileSize } from '~wildo-backend-lib/files/utils/file-validation.utils';
|
|
45
|
+
import { initializeValidateFieldRoutes } from './validate-field-handler.backend.service';
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* HTTP Method mapping for operations
|
|
49
|
+
*/
|
|
50
|
+
const HTTP_METHOD_MAP: Record<CoreResourceOperation, HttpMethod> = {
|
|
51
|
+
[CoreResourceOperation.CREATE]: HttpMethod.POST,
|
|
52
|
+
[CoreResourceOperation.READ]: HttpMethod.GET,
|
|
53
|
+
[CoreResourceOperation.UPDATE]: HttpMethod.PUT,
|
|
54
|
+
[CoreResourceOperation.DELETE]: HttpMethod.DELETE,
|
|
55
|
+
[CoreResourceOperation.LIST]: HttpMethod.GET,
|
|
56
|
+
[CoreResourceOperation.SEARCH]: HttpMethod.GET,
|
|
57
|
+
[CoreResourceOperation.COUNT]: HttpMethod.GET,
|
|
58
|
+
[CoreResourceOperation.UPDATE_MANY]: HttpMethod.PUT,
|
|
59
|
+
[CoreResourceOperation.DELETE_MANY]: HttpMethod.DELETE,
|
|
60
|
+
[CoreResourceOperation.CREATE_MANY]: HttpMethod.POST,
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
export function shouldSkipImplicitRequestValidation(
|
|
64
|
+
effectiveOperation: string,
|
|
65
|
+
hasExplicitRequestDto: boolean,
|
|
66
|
+
): boolean {
|
|
67
|
+
return !hasExplicitRequestDto && OPERATIONS_WITHOUT_REQUEST_BODY.includes(effectiveOperation as any);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
function hasMeaningfulExplicitRequestDto(requestDto: z.ZodTypeAny | undefined): boolean {
|
|
71
|
+
if (!requestDto) {
|
|
72
|
+
return false;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
if (requestDto instanceof z.ZodObject) {
|
|
76
|
+
return Object.keys(requestDto.shape).length > 0;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
return true;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
type CollectionQuerySort = Record<string, 1 | -1>;
|
|
83
|
+
|
|
84
|
+
type CollectionQueryRequestData = {
|
|
85
|
+
filter: Record<string, unknown>;
|
|
86
|
+
page?: number;
|
|
87
|
+
limit?: number;
|
|
88
|
+
searchQuery?: string;
|
|
89
|
+
sort?: CollectionQuerySort;
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
type CollectionQueryOperationMetadata = {
|
|
93
|
+
filterFields?: readonly string[];
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
type FileUploadRouteLocals = {
|
|
97
|
+
fileUploadExecutionContext?: ExecutionContext<any>;
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
function parseOptionalPositiveInt(value: unknown): number | undefined {
|
|
101
|
+
if (typeof value === 'number' && Number.isFinite(value) && value > 0) {
|
|
102
|
+
return Math.trunc(value);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
if (typeof value !== 'string' || value.trim() === '') {
|
|
106
|
+
return undefined;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
const parsed = Number.parseInt(value, 10);
|
|
110
|
+
return Number.isFinite(parsed) && parsed > 0 ? parsed : undefined;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
function parseCollectionQuerySort(value: unknown): CollectionQuerySort | undefined {
|
|
114
|
+
if (!value || typeof value !== 'string') {
|
|
115
|
+
return undefined;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
const sortEntries = value
|
|
119
|
+
.split(',')
|
|
120
|
+
.map((segment) => segment.trim())
|
|
121
|
+
.filter(Boolean)
|
|
122
|
+
.map((segment) => {
|
|
123
|
+
const [field, rawDirection] = segment.split(':');
|
|
124
|
+
if (!field) {
|
|
125
|
+
return null;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
const normalizedDirection = rawDirection?.toLowerCase();
|
|
129
|
+
const direction = normalizedDirection === 'desc' ? -1 : 1;
|
|
130
|
+
return [field, direction] as const;
|
|
131
|
+
})
|
|
132
|
+
.filter((entry): entry is readonly [string, 1 | -1] => entry !== null);
|
|
133
|
+
|
|
134
|
+
return sortEntries.length > 0 ? Object.fromEntries(sortEntries) : undefined;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
function normalizeCollectionSorting(value: unknown): CollectionQuerySort | undefined {
|
|
138
|
+
if (!value || typeof value !== 'object' || Array.isArray(value)) {
|
|
139
|
+
return undefined;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
const normalizedEntries: Array<[string, 1 | -1]> = [];
|
|
143
|
+
for (const [field, rawValue] of Object.entries(value)) {
|
|
144
|
+
if (rawValue === 1 || rawValue === -1) {
|
|
145
|
+
normalizedEntries.push([field, rawValue]);
|
|
146
|
+
continue;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
if (
|
|
150
|
+
rawValue
|
|
151
|
+
&& typeof rawValue === 'object'
|
|
152
|
+
&& !Array.isArray(rawValue)
|
|
153
|
+
&& typeof (rawValue as { field?: unknown }).field === 'string'
|
|
154
|
+
) {
|
|
155
|
+
const sortField = (rawValue as { field: string }).field;
|
|
156
|
+
const rawOrder = String((rawValue as { order?: unknown }).order ?? 'asc').toLowerCase();
|
|
157
|
+
normalizedEntries.push([sortField, rawOrder === 'desc' ? -1 : 1]);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
return normalizedEntries.length > 0 ? Object.fromEntries(normalizedEntries) : undefined;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
function isPlainRecord(value: unknown): value is Record<string, unknown> {
|
|
165
|
+
return value !== null && typeof value === 'object' && !Array.isArray(value);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
function parseIfMatchVersionHeader(rawHeader: string | string[] | undefined): number | undefined {
|
|
169
|
+
const rawValues = Array.isArray(rawHeader) ? rawHeader : [rawHeader];
|
|
170
|
+
|
|
171
|
+
for (const rawValue of rawValues) {
|
|
172
|
+
if (typeof rawValue !== 'string' || rawValue.trim() === '') {
|
|
173
|
+
continue;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
const candidates = rawValue
|
|
177
|
+
.split(',')
|
|
178
|
+
.map((candidate) => candidate.trim())
|
|
179
|
+
.filter((candidate) => candidate !== '');
|
|
180
|
+
|
|
181
|
+
for (const candidate of candidates) {
|
|
182
|
+
const normalizedCandidate = candidate
|
|
183
|
+
.replace(/^W\//, '')
|
|
184
|
+
.replace(/^"|"$/g, '');
|
|
185
|
+
|
|
186
|
+
if (!normalizedCandidate) {
|
|
187
|
+
continue;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
const parsedVersion = Number(normalizedCandidate);
|
|
191
|
+
if (Number.isInteger(parsedVersion) && parsedVersion >= 0) {
|
|
192
|
+
return parsedVersion;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
return undefined;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
function hasNonEmptyIfMatchHeader(rawHeader: string | string[] | undefined): boolean {
|
|
201
|
+
const rawValues = Array.isArray(rawHeader) ? rawHeader : [rawHeader];
|
|
202
|
+
return rawValues.some((rawValue) => typeof rawValue === 'string' && rawValue.trim() !== '');
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
function supportsIfMatchOptimisticLocking(params: {
|
|
206
|
+
operationIdentifier: unknown;
|
|
207
|
+
resourceOperationLike?: unknown;
|
|
208
|
+
isBulkOperation?: boolean;
|
|
209
|
+
}): boolean {
|
|
210
|
+
// The framework only treats If-Match as authoritative optimistic locking for
|
|
211
|
+
// the single-resource UPDATE-like lane. Broader mutation families may still
|
|
212
|
+
// be update-like semantically, but they do not have the same per-resource
|
|
213
|
+
// compare-and-swap contract and must fail closed when the header is present.
|
|
214
|
+
const effectiveOperation = params.resourceOperationLike || params.operationIdentifier;
|
|
215
|
+
return effectiveOperation === CoreResourceOperation.UPDATE && params.isBulkOperation !== true;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
function collectSubmittedFieldPaths(value: unknown, prefix = ''): string[] {
|
|
219
|
+
if (Array.isArray(value)) {
|
|
220
|
+
if (value.length === 0) {
|
|
221
|
+
return prefix ? [prefix] : [];
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
return value.flatMap((childValue, index) => (
|
|
225
|
+
collectSubmittedFieldPaths(childValue, `${prefix}[${index}]`)
|
|
226
|
+
));
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
if (!isPlainRecord(value)) {
|
|
230
|
+
return prefix ? [prefix] : [];
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
const entries = Object.entries(value).filter(([key]) => !key.startsWith('_'));
|
|
234
|
+
if (entries.length === 0) {
|
|
235
|
+
return prefix ? [prefix] : [];
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
return entries.flatMap(([key, childValue]) => {
|
|
239
|
+
const nextPath = prefix ? `${prefix}.${key}` : key;
|
|
240
|
+
return collectSubmittedFieldPaths(childValue, nextPath);
|
|
241
|
+
});
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
function getValueAtPath(record: Record<string, unknown>, path: string): unknown {
|
|
245
|
+
const normalizedPath = path.replace(/\[(\d+)\]/g, '.$1');
|
|
246
|
+
return normalizedPath.split('.').filter(Boolean).reduce<unknown>((current, segment) => {
|
|
247
|
+
if (current == null || typeof current !== 'object') {
|
|
248
|
+
return undefined;
|
|
249
|
+
}
|
|
250
|
+
return (current as Record<string, unknown>)[segment];
|
|
251
|
+
}, record);
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
function areConflictValuesEqual(left: unknown, right: unknown): boolean {
|
|
255
|
+
if (left === right) {
|
|
256
|
+
return true;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
if (left === null || left === undefined || right === null || right === undefined) {
|
|
260
|
+
return left === right;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
if (Array.isArray(left) || Array.isArray(right)) {
|
|
264
|
+
if (!Array.isArray(left) || !Array.isArray(right) || left.length !== right.length) {
|
|
265
|
+
return false;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
return left.every((value, index) => areConflictValuesEqual(value, right[index]));
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
if (isPlainRecord(left) || isPlainRecord(right)) {
|
|
272
|
+
if (!isPlainRecord(left) || !isPlainRecord(right)) {
|
|
273
|
+
return false;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
const keys = [...new Set([...Object.keys(left), ...Object.keys(right)])]
|
|
277
|
+
.filter((key) => !key.startsWith('_'));
|
|
278
|
+
return keys.every((key) => areConflictValuesEqual(left[key], right[key]));
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
return false;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
function buildSortingSchemaInput(sort: CollectionQuerySort | undefined): Record<string, { field: string; order: 'asc' | 'desc'; priority: number }> | undefined {
|
|
285
|
+
if (!sort) {
|
|
286
|
+
return undefined;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
const entries = Object.entries(sort);
|
|
290
|
+
if (entries.length === 0) {
|
|
291
|
+
return undefined;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
return Object.fromEntries(
|
|
295
|
+
entries.map(([field, direction], index) => [
|
|
296
|
+
field,
|
|
297
|
+
{
|
|
298
|
+
field,
|
|
299
|
+
order: direction === -1 ? 'desc' : 'asc',
|
|
300
|
+
priority: index,
|
|
301
|
+
},
|
|
302
|
+
]),
|
|
303
|
+
);
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
function extractCollectionFilters(
|
|
307
|
+
rawData: Record<string, unknown>,
|
|
308
|
+
allowedFilterFields: readonly string[] | undefined,
|
|
309
|
+
): Record<string, unknown> {
|
|
310
|
+
const allowedKeys = new Set<string>([
|
|
311
|
+
...(allowedFilterFields ?? []),
|
|
312
|
+
'createdAt',
|
|
313
|
+
'updatedAt',
|
|
314
|
+
]);
|
|
315
|
+
|
|
316
|
+
const filters: Record<string, unknown> = {};
|
|
317
|
+
for (const key of allowedKeys) {
|
|
318
|
+
const value = rawData[key];
|
|
319
|
+
if (value !== undefined) {
|
|
320
|
+
filters[key] = value;
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
return filters;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
export function shouldAuthorizeCollectionOperation(
|
|
328
|
+
effectiveOperation: string,
|
|
329
|
+
): boolean {
|
|
330
|
+
return ALL_COLLECTION_OPERATIONS.includes(effectiveOperation as any);
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
export function isContextAddressedReadOperation(
|
|
334
|
+
effectiveOperation: string,
|
|
335
|
+
resourceFieldIdentifier: string,
|
|
336
|
+
initiatorInfo: Pick<ResourceConfiguration_Operation_UrlInitiatorInfo, 'parameters'>,
|
|
337
|
+
matchedParameterFieldIdentifiers?: string[],
|
|
338
|
+
): boolean {
|
|
339
|
+
if (effectiveOperation !== CoreResourceOperation.READ) {
|
|
340
|
+
return false;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
const parameters = initiatorInfo.parameters ?? [];
|
|
344
|
+
|
|
345
|
+
if ((matchedParameterFieldIdentifiers?.length ?? 0) > 0) {
|
|
346
|
+
const declaredParameterFieldIdentifiers = new Set(
|
|
347
|
+
parameters.map((parameter) => parameter.fieldIdentifier),
|
|
348
|
+
);
|
|
349
|
+
const allMatchedParametersAreDeclared = matchedParameterFieldIdentifiers!.every(
|
|
350
|
+
(fieldIdentifier) => declaredParameterFieldIdentifiers.has(fieldIdentifier),
|
|
351
|
+
);
|
|
352
|
+
|
|
353
|
+
if (allMatchedParametersAreDeclared) {
|
|
354
|
+
return !matchedParameterFieldIdentifiers?.includes(resourceFieldIdentifier);
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
if (parameters.length === 0) {
|
|
359
|
+
return false;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
return !parameters.some((parameter) => parameter.fieldIdentifier === resourceFieldIdentifier);
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
export class ControllerResourceBackendService<
|
|
366
|
+
TCustomOperationEnum extends EnumLikeType | undefined = undefined,
|
|
367
|
+
TCoreOperationEnum extends Partial<CoreResourceOperation> | undefined = undefined,
|
|
368
|
+
TMainSchema extends z.ZodTypeAny = z.ZodTypeAny> {
|
|
369
|
+
|
|
370
|
+
private readonly resourceConfiguration: ResourceConfiguration<TCustomOperationEnum, TCoreOperationEnum, TMainSchema>;
|
|
371
|
+
private readonly operationsMap: Map<string, ResourceConfiguration_Operation<TCustomOperationEnum, TCoreOperationEnum, TMainSchema>>;
|
|
372
|
+
private readonly router: Router;
|
|
373
|
+
|
|
374
|
+
protected logDebug: (message: string, context?: Record<string, unknown>) => void;
|
|
375
|
+
|
|
376
|
+
constructor(
|
|
377
|
+
resourceType: ResourceType,
|
|
378
|
+
private readonly logger: LoggerService,
|
|
379
|
+
private readonly errorBuilder: ErrorBuilderBackendService,
|
|
380
|
+
private readonly errorHandler: ErrorHandlerService,
|
|
381
|
+
private readonly jwtService: JwtBackendService,
|
|
382
|
+
private readonly authorizationsService: AuthorizationsBackendService,
|
|
383
|
+
private readonly resourcesRegistry: ResourcesRegistryBackendService,
|
|
384
|
+
private readonly executionContextCreator: ExecutionContextCreatorBackendService,
|
|
385
|
+
private readonly executionContextHandler: ExecutionContextHandlerBackendService,
|
|
386
|
+
private readonly repositoriesRegistry: RepositoriesRegistryHandlerBackendService,
|
|
387
|
+
private readonly resourceOperationHelper: ResourceOperationHelperBackendService,
|
|
388
|
+
private readonly servicesRegistry: ServicesRegistryHandlerBackendService,
|
|
389
|
+
private readonly fileFieldDetection: FileFieldDetectionBackendService,
|
|
390
|
+
private readonly fileUploadHandler: ResourceFileUploadHandlerBackendService,
|
|
391
|
+
private readonly auditLogsService: AuditLogsBackendService,
|
|
392
|
+
private readonly anonymousSessionService: AnonymousSessionBackendService,
|
|
393
|
+
private readonly appConfigService: AppConfigurationService
|
|
394
|
+
) {
|
|
395
|
+
|
|
396
|
+
|
|
397
|
+
this.resourceConfiguration = this.resourcesRegistry.getResourceConfiguration(resourceType);
|
|
398
|
+
this.router = Router();
|
|
399
|
+
this.operationsMap = new Map();
|
|
400
|
+
|
|
401
|
+
this.logDebug = this.logger.debugByType(`ControllerResource_${resourceType}`);
|
|
402
|
+
this.logger.setDebugTypeLogging(`ControllerResource_${resourceType}`, false);
|
|
403
|
+
|
|
404
|
+
this.initializeOperationsMap();
|
|
405
|
+
this.initializeRoutes();
|
|
406
|
+
|
|
407
|
+
this.logDebug('Controller resource service created', { resourceType: this.resourceConfiguration.resourceIdentifier, operationsCount: this.operationsMap.size
|
|
408
|
+
});
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
public getRouter(): Router { return this.router }
|
|
412
|
+
|
|
413
|
+
// ================================
|
|
414
|
+
// Initialization
|
|
415
|
+
// ================================
|
|
416
|
+
|
|
417
|
+
static createInstance<
|
|
418
|
+
TCustomOperationEnum extends EnumLikeType | undefined = undefined,
|
|
419
|
+
TCoreOperationEnum extends Partial<CoreResourceOperation> | undefined = undefined,
|
|
420
|
+
TMainSchema extends z.ZodTypeAny = z.ZodTypeAny
|
|
421
|
+
>(
|
|
422
|
+
resourceType: ResourceType,
|
|
423
|
+
logger: LoggerService,
|
|
424
|
+
errorBuilder: ErrorBuilderBackendService,
|
|
425
|
+
errorHandler: ErrorHandlerService,
|
|
426
|
+
jwtService: JwtBackendService,
|
|
427
|
+
authorizationsService: AuthorizationsBackendService,
|
|
428
|
+
resourcesRegistry: ResourcesRegistryBackendService,
|
|
429
|
+
executionContextCreator: ExecutionContextCreatorBackendService,
|
|
430
|
+
executionContextHandler: ExecutionContextHandlerBackendService,
|
|
431
|
+
repositoriesRegistry: RepositoriesRegistryHandlerBackendService,
|
|
432
|
+
resourceOperationHelper: ResourceOperationHelperBackendService,
|
|
433
|
+
servicesRegistry: ServicesRegistryHandlerBackendService,
|
|
434
|
+
fileFieldDetection: FileFieldDetectionBackendService,
|
|
435
|
+
fileUploadHandler: ResourceFileUploadHandlerBackendService,
|
|
436
|
+
auditLogsService: AuditLogsBackendService,
|
|
437
|
+
anonymousSessionService: AnonymousSessionBackendService,
|
|
438
|
+
appConfigService: AppConfigurationService
|
|
439
|
+
): ControllerResourceBackendService<TCustomOperationEnum, TCoreOperationEnum, TMainSchema> {
|
|
440
|
+
return new ControllerResourceBackendService(
|
|
441
|
+
resourceType, logger, errorBuilder, errorHandler,
|
|
442
|
+
jwtService, authorizationsService, resourcesRegistry, executionContextCreator, executionContextHandler,
|
|
443
|
+
repositoriesRegistry, resourceOperationHelper, servicesRegistry,
|
|
444
|
+
fileFieldDetection, fileUploadHandler, auditLogsService, anonymousSessionService, appConfigService);
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
|
|
448
|
+
private initializeOperationsMap(): void {
|
|
449
|
+
if (!this.resourceConfiguration.operations) {
|
|
450
|
+
return;
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
// Only include API_CALL operations
|
|
454
|
+
const apiCallOperations = this.resourceConfiguration.operations.filter(
|
|
455
|
+
(op): op is ResourceConfiguration_Operation<TCustomOperationEnum, TCoreOperationEnum, TMainSchema> =>
|
|
456
|
+
[ResourceOperationVariantType.API_CALL, ResourceOperationVariantType.API_CALL_WITH_CALLBACK].includes(op.variantType)
|
|
457
|
+
);
|
|
458
|
+
|
|
459
|
+
apiCallOperations.forEach(operation => {
|
|
460
|
+
const operationKey = ResourcesConfig_OperationPathUtils.createOperationPathKeyFromOperation(operation as any);
|
|
461
|
+
this.operationsMap.set(operationKey, operation);
|
|
462
|
+
});
|
|
463
|
+
|
|
464
|
+
this.logDebug('Operations map initialized', { totalOperations: this.resourceConfiguration.operations.length, apiCallOperations: apiCallOperations.length });
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
|
|
468
|
+
private initializeRoutes(): void {
|
|
469
|
+
this.logDebug('Initializing Express routes');
|
|
470
|
+
|
|
471
|
+
this.operationsMap.forEach((operation, operationKey) => {
|
|
472
|
+
this.createRouteForOperation(operation);
|
|
473
|
+
});
|
|
474
|
+
|
|
475
|
+
// Initialize file upload routes for resources with file fields
|
|
476
|
+
this.initializeFileUploadRoutes();
|
|
477
|
+
|
|
478
|
+
// Initialize validate-field routes for resources with unique fields
|
|
479
|
+
this.initializeValidateFieldRoutes();
|
|
480
|
+
|
|
481
|
+
this.router.use(this.errorHandler.expressErrorHandler());
|
|
482
|
+
|
|
483
|
+
this.logDebug('Express routes initialized with unified error handler', {
|
|
484
|
+
routeCount: this.operationsMap.size
|
|
485
|
+
});
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
/**
|
|
489
|
+
* Initialize file upload routes for resources with file fields.
|
|
490
|
+
* Creates routes:
|
|
491
|
+
* - POST /api/v1/.../resourceType/files/:fieldName (CREATE)
|
|
492
|
+
* - POST /api/v1/.../resourceType/:resourceId/files/:fieldName (UPDATE)
|
|
493
|
+
*/
|
|
494
|
+
/**
|
|
495
|
+
* L12 Audit (Phase I):
|
|
496
|
+
* - Authorization: registered upload routes now build the execution context and
|
|
497
|
+
* perform `authorizeInController()` before Multer and before the async upload
|
|
498
|
+
* handler runs, so unauthorized requests are rejected before temp-disk writes,
|
|
499
|
+
* storage upload, or DB write.
|
|
500
|
+
* - Parent resource params: `initiatorInfo.parameters` is correctly passed to the execution context
|
|
501
|
+
* creator, ensuring parent resource FK authorization matches non-file routes.
|
|
502
|
+
* - Multer errors: Request-body parsing failures still flow through the unified
|
|
503
|
+
* error handler, and request-size violations are classified as validation
|
|
504
|
+
* errors rather than generic internal failures.
|
|
505
|
+
* - Route order: the controller-specific authorization middleware runs before
|
|
506
|
+
* Multer for registered upload routes, so unauthenticated callers are
|
|
507
|
+
* rejected before temp-disk parsing starts. Multer still runs before the
|
|
508
|
+
* async upload handler itself, which is why file-type/size failures surface
|
|
509
|
+
* as middleware-layer errors rather than handler exceptions.
|
|
510
|
+
*/
|
|
511
|
+
private initializeFileUploadRoutes(): void {
|
|
512
|
+
const resourceType = this.resourceConfiguration.resourceIdentifier;
|
|
513
|
+
|
|
514
|
+
// Check if resource has file fields
|
|
515
|
+
if (!this.fileFieldDetection.hasFileFields(resourceType)) {
|
|
516
|
+
this.logDebug('No file fields detected, skipping file upload routes', { resourceType });
|
|
517
|
+
return;
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
const fileFields = this.fileFieldDetection.detectFileFields(resourceType);
|
|
521
|
+
|
|
522
|
+
// Get CREATE and UPDATE operations from resource configuration
|
|
523
|
+
// Operations already have initiatorInfos populated (via ResourcesConfigOperationsUrlsBuilderUtils.updateOperationUrls)
|
|
524
|
+
// This includes all parent combinations (REQUIRES_CONTEXT, OPTIONAL_CONTEXT, STANDALONE)
|
|
525
|
+
const createOperation = this.resourceConfiguration.operations.find(
|
|
526
|
+
op => op.operationIdentifier === CoreResourceOperation.CREATE &&
|
|
527
|
+
[ResourceOperationVariantType.API_CALL, ResourceOperationVariantType.API_CALL_WITH_CALLBACK].includes(op.variantType)
|
|
528
|
+
) as ResourceConfiguration_Operation_ApiCall<any, any, any> | ResourceConfiguration_Operation_ApiCallWithCallback<any, any, any> | undefined;
|
|
529
|
+
|
|
530
|
+
const updateOperation = this.resourceConfiguration.operations.find(
|
|
531
|
+
op => op.operationIdentifier === CoreResourceOperation.UPDATE &&
|
|
532
|
+
[ResourceOperationVariantType.API_CALL, ResourceOperationVariantType.API_CALL_WITH_CALLBACK].includes(op.variantType)
|
|
533
|
+
) as ResourceConfiguration_Operation_ApiCall<any, any, any> | ResourceConfiguration_Operation_ApiCallWithCallback<any, any, any> | undefined;
|
|
534
|
+
|
|
535
|
+
if (!createOperation || !updateOperation) {
|
|
536
|
+
this.logDebug('CREATE or UPDATE operation not found or not API_CALL type, skipping file upload routes', { resourceType });
|
|
537
|
+
return;
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
// Get initiatorInfos (already populated with all parent combinations)
|
|
541
|
+
// Each initiatorInfo contains:
|
|
542
|
+
// - url: URL pattern with parent paths (e.g., /api/v1/parents/{parentId}/children)
|
|
543
|
+
// - parameters: Parent resource parameters to extract (e.g., [{ fieldIdentifier: 'parentId', resourceType: 'PARENTS' }])
|
|
544
|
+
const createInitiatorInfos = createOperation.initiatorInfos || [];
|
|
545
|
+
const updateInitiatorInfos = updateOperation.initiatorInfos || [];
|
|
546
|
+
|
|
547
|
+
if (createInitiatorInfos.length === 0 || updateInitiatorInfos.length === 0) {
|
|
548
|
+
this.logDebug('CREATE or UPDATE operation has no initiatorInfos, skipping file upload routes', { resourceType });
|
|
549
|
+
return;
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
// Configure Multer middleware with disk storage for true streaming (no memory buffering)
|
|
553
|
+
// Files are written to temp directory, then streamed to storage
|
|
554
|
+
// This enables true streaming for large files without OOM risk
|
|
555
|
+
// NOTE: In k8s, ensure pod has volume mount with read-write access to temp directory
|
|
556
|
+
// NOTE: Consider temp file cleanup job for orphaned files (if process crashes)
|
|
557
|
+
const upload = createMulterUploadConfig({
|
|
558
|
+
logger: this.logger,
|
|
559
|
+
maxFileSize: resolveConfiguredMaxFileSize(this.appConfigService.config.storage?.maxFileSize),
|
|
560
|
+
});
|
|
561
|
+
|
|
562
|
+
// Register routes for each file field and each parent combination
|
|
563
|
+
// CRITICAL SECURITY FIX: Use initiatorInfos to include parent resource context in routes
|
|
564
|
+
// This ensures parent resource authorization is properly validated
|
|
565
|
+
for (const fileField of fileFields) {
|
|
566
|
+
const { fieldName } = fileField;
|
|
567
|
+
|
|
568
|
+
// CREATE routes (one per parent combination)
|
|
569
|
+
// Register more specific routes first (with parent paths) for correct Express matching
|
|
570
|
+
// Sort by parameter count (more parameters = more specific route)
|
|
571
|
+
const sortedCreateInfos = [...createInitiatorInfos].sort((a, b) => {
|
|
572
|
+
const aParams = a.parameters?.length || 0;
|
|
573
|
+
const bParams = b.parameters?.length || 0;
|
|
574
|
+
return bParams - aParams; // Descending order (more specific first)
|
|
575
|
+
});
|
|
576
|
+
|
|
577
|
+
for (const initiatorInfo of sortedCreateInfos) {
|
|
578
|
+
const fileUploadInitiatorInfo = ResourcesConfigOperationsUrlsBuilderUtils.buildFileUploadRouteForOperation({
|
|
579
|
+
operationRouteUrl: initiatorInfo.url,
|
|
580
|
+
operationParameters: initiatorInfo.parameters || [],
|
|
581
|
+
targetResourceType: resourceType,
|
|
582
|
+
targetResourceFieldIdentifier: this.resourceConfiguration.resourceFieldIdentifier,
|
|
583
|
+
fieldName,
|
|
584
|
+
requiresTargetResourceId: false,
|
|
585
|
+
isFrontend: false,
|
|
586
|
+
});
|
|
587
|
+
const createPath = this.convertUrlPatternToExpressPath(fileUploadInitiatorInfo.url);
|
|
588
|
+
const authorizeCreateUpload = this.createFileUploadAuthorizationMiddleware(
|
|
589
|
+
createOperation,
|
|
590
|
+
fileUploadInitiatorInfo,
|
|
591
|
+
{
|
|
592
|
+
requiresTargetResourceId: false,
|
|
593
|
+
resourceType,
|
|
594
|
+
fieldName,
|
|
595
|
+
},
|
|
596
|
+
);
|
|
597
|
+
|
|
598
|
+
this.router.post(
|
|
599
|
+
createPath,
|
|
600
|
+
authorizeCreateUpload,
|
|
601
|
+
upload.single('file'), // Multer middleware - expects 'file' field name
|
|
602
|
+
this.asyncHandler(async (req: Request, res: Response, next: NextFunction) => {
|
|
603
|
+
try {
|
|
604
|
+
const executionContext = (res.locals as FileUploadRouteLocals).fileUploadExecutionContext
|
|
605
|
+
?? await this.executionContextCreator.createExecutionContextFromRequest(
|
|
606
|
+
req,
|
|
607
|
+
createOperation,
|
|
608
|
+
{
|
|
609
|
+
url: fileUploadInitiatorInfo.url,
|
|
610
|
+
parameters: fileUploadInitiatorInfo.parameters,
|
|
611
|
+
}
|
|
612
|
+
);
|
|
613
|
+
|
|
614
|
+
await this.fileUploadHandler.handleFileUpload(
|
|
615
|
+
req,
|
|
616
|
+
res,
|
|
617
|
+
resourceType,
|
|
618
|
+
fieldName,
|
|
619
|
+
undefined, // No resourceId for CREATE
|
|
620
|
+
CoreResourceOperation.CREATE,
|
|
621
|
+
executionContext
|
|
622
|
+
);
|
|
623
|
+
} catch (error) {
|
|
624
|
+
next(error);
|
|
625
|
+
}
|
|
626
|
+
})
|
|
627
|
+
);
|
|
628
|
+
|
|
629
|
+
this.logDebug('File upload CREATE route registered', {
|
|
630
|
+
resourceType,
|
|
631
|
+
fieldName,
|
|
632
|
+
path: createPath,
|
|
633
|
+
parentParams: fileUploadInitiatorInfo.parameters.map(p => `${p.fieldIdentifier}:${p.resourceType}`).join(', ') || 'none',
|
|
634
|
+
});
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
// UPDATE routes (one per parent combination)
|
|
638
|
+
// Register more specific routes first (with parent paths) for correct Express matching
|
|
639
|
+
const sortedUpdateInfos = [...updateInitiatorInfos].sort((a, b) => {
|
|
640
|
+
const aParams = a.parameters?.length || 0;
|
|
641
|
+
const bParams = b.parameters?.length || 0;
|
|
642
|
+
return bParams - aParams; // Descending order (more specific first)
|
|
643
|
+
});
|
|
644
|
+
|
|
645
|
+
for (const initiatorInfo of sortedUpdateInfos) {
|
|
646
|
+
const fileUploadInitiatorInfo = ResourcesConfigOperationsUrlsBuilderUtils.buildFileUploadRouteForOperation({
|
|
647
|
+
operationRouteUrl: initiatorInfo.url,
|
|
648
|
+
operationParameters: initiatorInfo.parameters || [],
|
|
649
|
+
targetResourceType: resourceType,
|
|
650
|
+
targetResourceFieldIdentifier: this.resourceConfiguration.resourceFieldIdentifier,
|
|
651
|
+
fieldName,
|
|
652
|
+
requiresTargetResourceId: true,
|
|
653
|
+
isFrontend: false,
|
|
654
|
+
});
|
|
655
|
+
const updatePath = this.convertUrlPatternToExpressPath(fileUploadInitiatorInfo.url);
|
|
656
|
+
const authorizeUpdateUpload = this.createFileUploadAuthorizationMiddleware(
|
|
657
|
+
updateOperation,
|
|
658
|
+
fileUploadInitiatorInfo,
|
|
659
|
+
{
|
|
660
|
+
requiresTargetResourceId: true,
|
|
661
|
+
resourceType,
|
|
662
|
+
fieldName,
|
|
663
|
+
},
|
|
664
|
+
);
|
|
665
|
+
|
|
666
|
+
this.router.post(
|
|
667
|
+
updatePath,
|
|
668
|
+
authorizeUpdateUpload,
|
|
669
|
+
upload.single('file'), // Multer middleware
|
|
670
|
+
this.asyncHandler(async (req: Request, res: Response, next: NextFunction) => {
|
|
671
|
+
try {
|
|
672
|
+
// Extract resourceId from URL params
|
|
673
|
+
const resourceId = req.params[this.resourceConfiguration.resourceFieldIdentifier] as string | undefined;
|
|
674
|
+
|
|
675
|
+
if (!resourceId) {
|
|
676
|
+
throw this.errorBuilder.buildError(
|
|
677
|
+
ErrorType.VALIDATION,
|
|
678
|
+
{} as ExecutionContext<any>,
|
|
679
|
+
{
|
|
680
|
+
customMessageReference: ErrorCustomMessageReference.VALIDATION,
|
|
681
|
+
context: {
|
|
682
|
+
message: `Resource ID is required for UPDATE file upload`,
|
|
683
|
+
resourceType,
|
|
684
|
+
fieldName,
|
|
685
|
+
},
|
|
686
|
+
}
|
|
687
|
+
);
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
const executionContext = (res.locals as FileUploadRouteLocals).fileUploadExecutionContext
|
|
691
|
+
?? await this.executionContextCreator.createExecutionContextFromRequest(
|
|
692
|
+
req,
|
|
693
|
+
updateOperation,
|
|
694
|
+
{
|
|
695
|
+
url: fileUploadInitiatorInfo.url,
|
|
696
|
+
parameters: fileUploadInitiatorInfo.parameters,
|
|
697
|
+
}
|
|
698
|
+
);
|
|
699
|
+
|
|
700
|
+
await this.fileUploadHandler.handleFileUpload(
|
|
701
|
+
req,
|
|
702
|
+
res,
|
|
703
|
+
resourceType,
|
|
704
|
+
fieldName,
|
|
705
|
+
resourceId,
|
|
706
|
+
CoreResourceOperation.UPDATE,
|
|
707
|
+
executionContext
|
|
708
|
+
);
|
|
709
|
+
} catch (error) {
|
|
710
|
+
next(error);
|
|
711
|
+
}
|
|
712
|
+
})
|
|
713
|
+
);
|
|
714
|
+
|
|
715
|
+
this.logDebug('File upload UPDATE route registered', {
|
|
716
|
+
resourceType,
|
|
717
|
+
fieldName,
|
|
718
|
+
path: updatePath,
|
|
719
|
+
parentParams: fileUploadInitiatorInfo.parameters.map(p => `${p.fieldIdentifier}:${p.resourceType}`).join(', ') || 'none',
|
|
720
|
+
});
|
|
721
|
+
}
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
this.logDebug('File upload routes initialized', {
|
|
725
|
+
resourceType,
|
|
726
|
+
fileFieldCount: fileFields.length,
|
|
727
|
+
createRoutes: createInitiatorInfos.length * fileFields.length,
|
|
728
|
+
updateRoutes: updateInitiatorInfos.length * fileFields.length,
|
|
729
|
+
});
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
/**
|
|
733
|
+
* Authorize file uploads before Multer touches request bodies.
|
|
734
|
+
*
|
|
735
|
+
* Resource upload routes are intentionally protected at the same semantic
|
|
736
|
+
* execution-context layer as the actual upload handler. Running that auth step
|
|
737
|
+
* first avoids unauthenticated callers forcing temp-disk writes through Multer
|
|
738
|
+
* while still reusing the exact same execution context for the later upload.
|
|
739
|
+
*/
|
|
740
|
+
private createFileUploadAuthorizationMiddleware(
|
|
741
|
+
operation: ResourceConfiguration_Operation<TCustomOperationEnum, TCoreOperationEnum, TMainSchema>,
|
|
742
|
+
fileUploadInitiatorInfo: ResourceConfiguration_Operation_UrlInitiatorInfo,
|
|
743
|
+
options: {
|
|
744
|
+
requiresTargetResourceId: boolean;
|
|
745
|
+
resourceType: ResourceType;
|
|
746
|
+
fieldName: string;
|
|
747
|
+
},
|
|
748
|
+
) {
|
|
749
|
+
return this.asyncHandler(async (req: Request, res: Response, next: NextFunction) => {
|
|
750
|
+
try {
|
|
751
|
+
let executionContext = await this.executionContextCreator.createExecutionContextFromRequest(
|
|
752
|
+
req,
|
|
753
|
+
operation,
|
|
754
|
+
{
|
|
755
|
+
url: fileUploadInitiatorInfo.url,
|
|
756
|
+
parameters: fileUploadInitiatorInfo.parameters,
|
|
757
|
+
}
|
|
758
|
+
);
|
|
759
|
+
executionContext = this.resolveExecutionContextForAuthorization(executionContext, req).executionContext;
|
|
760
|
+
(req as any).executionContext = executionContext;
|
|
761
|
+
const locals = ((res.locals ??= {}) as FileUploadRouteLocals);
|
|
762
|
+
locals.fileUploadExecutionContext = executionContext;
|
|
763
|
+
|
|
764
|
+
const resourceId = options.requiresTargetResourceId
|
|
765
|
+
? req.params[this.resourceConfiguration.resourceFieldIdentifier] as string | undefined
|
|
766
|
+
: undefined;
|
|
767
|
+
|
|
768
|
+
if (options.requiresTargetResourceId && !resourceId) {
|
|
769
|
+
throw this.errorBuilder.buildError(
|
|
770
|
+
ErrorType.VALIDATION,
|
|
771
|
+
executionContext,
|
|
772
|
+
{
|
|
773
|
+
customMessageReference: ErrorCustomMessageReference.VALIDATION,
|
|
774
|
+
context: {
|
|
775
|
+
message: 'Resource ID is required for UPDATE file upload',
|
|
776
|
+
resourceType: options.resourceType,
|
|
777
|
+
fieldName: options.fieldName,
|
|
778
|
+
},
|
|
779
|
+
}
|
|
780
|
+
);
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
await this.authorizationsService.authorizeInController(resourceId, executionContext);
|
|
784
|
+
next();
|
|
785
|
+
} catch (error) {
|
|
786
|
+
next(error);
|
|
787
|
+
}
|
|
788
|
+
});
|
|
789
|
+
}
|
|
790
|
+
|
|
791
|
+
/**
|
|
792
|
+
* Initialize validate-field routes for resources with unique fields.
|
|
793
|
+
* Delegates to the validate-field handler module.
|
|
794
|
+
*
|
|
795
|
+
* Creates route: POST /api/v1/.../:resourceType/validate-field
|
|
796
|
+
* Authorization uses CREATE operation rights (collection-level).
|
|
797
|
+
*/
|
|
798
|
+
private initializeValidateFieldRoutes(): void {
|
|
799
|
+
initializeValidateFieldRoutes(
|
|
800
|
+
this.router,
|
|
801
|
+
this.resourceConfiguration,
|
|
802
|
+
this.logger,
|
|
803
|
+
this.errorBuilder,
|
|
804
|
+
this.authorizationsService,
|
|
805
|
+
this.executionContextCreator,
|
|
806
|
+
this.resourcesRegistry,
|
|
807
|
+
this.repositoriesRegistry,
|
|
808
|
+
this.convertUrlPatternToExpressPath.bind(this),
|
|
809
|
+
this.asyncHandler.bind(this),
|
|
810
|
+
);
|
|
811
|
+
}
|
|
812
|
+
|
|
813
|
+
/**
|
|
814
|
+
* Async handler wrapper for Express route handlers.
|
|
815
|
+
* Ensures errors are properly passed to Express error handler.
|
|
816
|
+
*/
|
|
817
|
+
private asyncHandler(fn: (req: Request, res: Response, next: NextFunction) => Promise<void>) {
|
|
818
|
+
return (req: Request, res: Response, next: NextFunction) => {
|
|
819
|
+
Promise.resolve(fn(req, res, next)).catch(next);
|
|
820
|
+
};
|
|
821
|
+
}
|
|
822
|
+
|
|
823
|
+
|
|
824
|
+
private createRouteForOperation(
|
|
825
|
+
operation: ResourceConfiguration_Operation<TCustomOperationEnum, TCoreOperationEnum, TMainSchema>
|
|
826
|
+
): void {
|
|
827
|
+
|
|
828
|
+
if (![ResourceOperationVariantType.API_CALL, ResourceOperationVariantType.API_CALL_WITH_CALLBACK].includes(operation.variantType)) {
|
|
829
|
+
this.logDebug('Operation is not API_CALL or API_CALL_WITH_CALLBACK type, skipping route creation', { operation: operation.operationIdentifier, variantType: operation.variantType});
|
|
830
|
+
return;
|
|
831
|
+
}
|
|
832
|
+
|
|
833
|
+
const apiCallOperation = operation as ResourceConfiguration_Operation_ApiCall<any, any, any> | ResourceConfiguration_Operation_ApiCallWithCallback<any, any, any>;
|
|
834
|
+
const operationInitiatorInfos = apiCallOperation.initiatorInfos;
|
|
835
|
+
|
|
836
|
+
if (!operationInitiatorInfos || operationInitiatorInfos.length === 0) {
|
|
837
|
+
this.logDebug('No URLs found for operation, skipping route creation', {operation: operation.operationIdentifier });
|
|
838
|
+
return;
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
const httpMethod = this.getHttpMethodForOperation(operation);
|
|
842
|
+
// Create routes for all URL patterns
|
|
843
|
+
operationInitiatorInfos.forEach((initiatorInfo: ResourceConfiguration_Operation_UrlInitiatorInfo) => {
|
|
844
|
+
const expressPath = this.convertUrlPatternToExpressPath(initiatorInfo.url);
|
|
845
|
+
|
|
846
|
+
this.logDebug('Creating route', {
|
|
847
|
+
method: httpMethod,
|
|
848
|
+
path: expressPath,
|
|
849
|
+
operation: operation.operationIdentifier,
|
|
850
|
+
parameters: initiatorInfo.parameters?.map((p: ResourceConfiguration_Operation_UrlParameterInfo) => `${p.fieldIdentifier}:${p.resourceType}`).join(', ') || 'none',
|
|
851
|
+
callbackUrl: (initiatorInfo as any)['urlCallback'] ?? 'none'
|
|
852
|
+
});
|
|
853
|
+
|
|
854
|
+
const handler = async (req: Request, res: Response, next: NextFunction) => {
|
|
855
|
+
try {
|
|
856
|
+
await this.doOperation(operation, initiatorInfo, httpMethod, req, res, next);
|
|
857
|
+
} catch (error) {
|
|
858
|
+
next(error);
|
|
859
|
+
}
|
|
860
|
+
};
|
|
861
|
+
|
|
862
|
+
switch (httpMethod) {
|
|
863
|
+
case HttpMethod.GET:
|
|
864
|
+
this.router.get(expressPath, handler);
|
|
865
|
+
break;
|
|
866
|
+
case HttpMethod.POST:
|
|
867
|
+
this.router.post(expressPath, handler);
|
|
868
|
+
break;
|
|
869
|
+
case HttpMethod.PUT:
|
|
870
|
+
this.router.put(expressPath, handler);
|
|
871
|
+
break;
|
|
872
|
+
case HttpMethod.DELETE:
|
|
873
|
+
this.router.delete(expressPath, handler);
|
|
874
|
+
break;
|
|
875
|
+
case HttpMethod.PATCH:
|
|
876
|
+
this.router.patch(expressPath, handler);
|
|
877
|
+
break;
|
|
878
|
+
default:
|
|
879
|
+
this.logDebug('Unsupported HTTP method', { method: httpMethod });
|
|
880
|
+
}
|
|
881
|
+
});
|
|
882
|
+
}
|
|
883
|
+
|
|
884
|
+
private convertUrlPatternToExpressPath(urlPattern: string): string {
|
|
885
|
+
// Remove /api/v1 prefix to avoid double mounting (HTTP server already mounts master router at /api/v1)
|
|
886
|
+
let path = urlPattern.replace(/^\/api\/v1/, '');
|
|
887
|
+
|
|
888
|
+
// Ensure path starts with / if it's not empty
|
|
889
|
+
if (path && !path.startsWith('/')) {
|
|
890
|
+
path = '/' + path;
|
|
891
|
+
}
|
|
892
|
+
|
|
893
|
+
// Convert {param} to :param for Express
|
|
894
|
+
return path.replace(/\{([^}]+)\}/g, ':$1');
|
|
895
|
+
}
|
|
896
|
+
|
|
897
|
+
// ================================
|
|
898
|
+
// Execution
|
|
899
|
+
// ================================
|
|
900
|
+
|
|
901
|
+
private async doOperation(
|
|
902
|
+
operation: ResourceConfiguration_Operation<TCustomOperationEnum, TCoreOperationEnum, TMainSchema>,
|
|
903
|
+
initiatorInfo: ResourceConfiguration_Operation_UrlInitiatorInfo,
|
|
904
|
+
httpMethod: HttpMethod,
|
|
905
|
+
req: Request,
|
|
906
|
+
res: Response,
|
|
907
|
+
next: NextFunction
|
|
908
|
+
): Promise<void> {
|
|
909
|
+
let executionContext: ExecutionContext<any> | undefined;
|
|
910
|
+
let validatedData: unknown;
|
|
911
|
+
let dataMode: DataMode | undefined;
|
|
912
|
+
let optionsWithVersion: ServiceOptions | undefined;
|
|
913
|
+
|
|
914
|
+
try {
|
|
915
|
+
this.logDebug('Executing operation', { operation: operation.operationIdentifier, method: req.method, path: req.path });
|
|
916
|
+
|
|
917
|
+
executionContext = await this.executionContextCreator.createExecutionContextFromRequest(req, operation, initiatorInfo);
|
|
918
|
+
const resolvedContext = this.resolveExecutionContextForAuthorization(executionContext, req);
|
|
919
|
+
executionContext = resolvedContext.executionContext;
|
|
920
|
+
dataMode = resolvedContext.dataMode;
|
|
921
|
+
// Attach executionContext to request for error handler access
|
|
922
|
+
(req as any).executionContext = executionContext;
|
|
923
|
+
validatedData = this.validateRequestData(
|
|
924
|
+
req,
|
|
925
|
+
executionContext.operation as ResourceConfiguration_Operation<TCustomOperationEnum, TCoreOperationEnum, TMainSchema>,
|
|
926
|
+
executionContext as ExecutionContext<ResourceConfiguration_Operation<TCustomOperationEnum, TCoreOperationEnum, TMainSchema>>,
|
|
927
|
+
);
|
|
928
|
+
|
|
929
|
+
// Collection operations (LIST, CREATE, SEARCH) don't have a target resource ID
|
|
930
|
+
// They operate on collections and authorization is based on roles + parent scope
|
|
931
|
+
const operationId = executionContext.operation.operationIdentifier;
|
|
932
|
+
const operationLike = executionContext.operation.resourceOperationLike;
|
|
933
|
+
const effectiveOperation = operationLike || operationId;
|
|
934
|
+
const isCollectionOperation = shouldAuthorizeCollectionOperation(
|
|
935
|
+
String(effectiveOperation),
|
|
936
|
+
);
|
|
937
|
+
|
|
938
|
+
if (isCollectionOperation) {
|
|
939
|
+
// For collection operations: authorize without specific resource ID
|
|
940
|
+
// Authorization relies on roles and parent scope validation (via initiatorIds)
|
|
941
|
+
this.logDebug('Collection operation - authorizing without resource ID', {
|
|
942
|
+
operation: operationId,
|
|
943
|
+
effectiveOperation,
|
|
944
|
+
initiatorIds: executionContext.initiatorIds
|
|
945
|
+
});
|
|
946
|
+
await this.authorizationsService.authorizeInController(undefined, executionContext);
|
|
947
|
+
} else {
|
|
948
|
+
const resourceId = this.resourceOperationHelper.extractIdsFromExecutionContext(
|
|
949
|
+
executionContext,
|
|
950
|
+
executionContext.operation.resourceFieldIdentifier
|
|
951
|
+
);
|
|
952
|
+
|
|
953
|
+
const allowContextOnlyRead = (
|
|
954
|
+
resourceId === undefined
|
|
955
|
+
&& isContextAddressedReadOperation(
|
|
956
|
+
String(effectiveOperation),
|
|
957
|
+
executionContext.operation.resourceFieldIdentifier,
|
|
958
|
+
initiatorInfo,
|
|
959
|
+
Object.keys(req.params ?? {}),
|
|
960
|
+
)
|
|
961
|
+
);
|
|
962
|
+
|
|
963
|
+
if (allowContextOnlyRead) {
|
|
964
|
+
this.logDebug('Context-addressed read - authorizing without explicit resource ID', {
|
|
965
|
+
operation: operationId,
|
|
966
|
+
effectiveOperation,
|
|
967
|
+
initiatorParameters: initiatorInfo.parameters?.map((parameter) => parameter.fieldIdentifier) ?? [],
|
|
968
|
+
});
|
|
969
|
+
await this.authorizationsService.authorizeInController(undefined, executionContext);
|
|
970
|
+
} else {
|
|
971
|
+
// Validate resourceId format (MongoDB ObjectId or UUID)
|
|
972
|
+
// After validation, we know resourceId is a valid string
|
|
973
|
+
this.resourceOperationHelper.validateResourceId(
|
|
974
|
+
resourceId,
|
|
975
|
+
executionContext,
|
|
976
|
+
executionContext.operation.resourceFieldIdentifier
|
|
977
|
+
);
|
|
978
|
+
|
|
979
|
+
// Type assertion is safe here because validateResourceId ensures it's a string
|
|
980
|
+
await this.authorizationsService.authorizeInController(resourceId as string, executionContext);
|
|
981
|
+
}
|
|
982
|
+
}
|
|
983
|
+
|
|
984
|
+
// For API calls, request pagination wrapper for list operations
|
|
985
|
+
// Extract dataMode from query to pass to service layer for variant resolution
|
|
986
|
+
const needsPagination = effectiveOperation === CoreResourceOperation.LIST || effectiveOperation === CoreResourceOperation.SEARCH;
|
|
987
|
+
const options: ServiceOptions | undefined = needsPagination ? { paginated: true, dataMode } : dataMode ? { dataMode } : undefined;
|
|
988
|
+
|
|
989
|
+
// Parse If-Match header for optimistic locking on the supported single-resource
|
|
990
|
+
// update-like lane only. Other mutation families must fail closed instead of
|
|
991
|
+
// silently accepting a header they do not actually enforce downstream.
|
|
992
|
+
const ifMatchRaw = req.headers[WildoHeaderKeys.IF_MATCH] as string | string[] | undefined;
|
|
993
|
+
optionsWithVersion = options;
|
|
994
|
+
const hasIfMatchHeader = hasNonEmptyIfMatchHeader(ifMatchRaw);
|
|
995
|
+
const supportsIfMatch = supportsIfMatchOptimisticLocking({
|
|
996
|
+
operationIdentifier: operationId,
|
|
997
|
+
resourceOperationLike: operationLike,
|
|
998
|
+
isBulkOperation: executionContext.operation.isBulkOperation,
|
|
999
|
+
});
|
|
1000
|
+
if (hasIfMatchHeader && !supportsIfMatch) {
|
|
1001
|
+
throw this.errorBuilder.buildError(ErrorType.VALIDATION, executionContext, {
|
|
1002
|
+
customMessageReference: ErrorCustomMessageReference.CONTROLLER_RESOURCE_VALIDATION_FAILED,
|
|
1003
|
+
context: {
|
|
1004
|
+
field: WildoHeaderKeys.IF_MATCH,
|
|
1005
|
+
message: 'If-Match is only supported for single-resource update-like operations',
|
|
1006
|
+
operationIdentifier: executionContext.operation.operationIdentifier,
|
|
1007
|
+
resourceOperationLike: executionContext.operation.resourceOperationLike,
|
|
1008
|
+
isBulkOperation: executionContext.operation.isBulkOperation ?? false,
|
|
1009
|
+
},
|
|
1010
|
+
});
|
|
1011
|
+
}
|
|
1012
|
+
|
|
1013
|
+
const parsedVersion = supportsIfMatch ? parseIfMatchVersionHeader(ifMatchRaw) : undefined;
|
|
1014
|
+
if (hasIfMatchHeader && supportsIfMatch && parsedVersion == null) {
|
|
1015
|
+
throw this.errorBuilder.buildError(ErrorType.VALIDATION, executionContext, {
|
|
1016
|
+
customMessageReference: ErrorCustomMessageReference.CONTROLLER_RESOURCE_VALIDATION_FAILED,
|
|
1017
|
+
context: {
|
|
1018
|
+
field: WildoHeaderKeys.IF_MATCH,
|
|
1019
|
+
message: 'If-Match must contain a non-negative integer version',
|
|
1020
|
+
operationIdentifier: executionContext.operation.operationIdentifier,
|
|
1021
|
+
resourceOperationLike: executionContext.operation.resourceOperationLike,
|
|
1022
|
+
isBulkOperation: executionContext.operation.isBulkOperation ?? false,
|
|
1023
|
+
},
|
|
1024
|
+
});
|
|
1025
|
+
}
|
|
1026
|
+
if (parsedVersion != null) {
|
|
1027
|
+
optionsWithVersion = { ...options, ifMatchVersion: parsedVersion };
|
|
1028
|
+
}
|
|
1029
|
+
|
|
1030
|
+
// CRDT: extract and validate field timestamps from request body (not from validated DTO —
|
|
1031
|
+
// _field_timestamps is engine infrastructure, not part of the resource schema).
|
|
1032
|
+
// S2: semantic validation — only accept keys that are actually marked isCRDT() on the schema.
|
|
1033
|
+
const rawFieldTimestamps = req.body?._field_timestamps;
|
|
1034
|
+
if (rawFieldTimestamps && typeof rawFieldTimestamps === 'object' && !Array.isArray(rawFieldTimestamps)) {
|
|
1035
|
+
const crdtFields = extractCrdtFieldNames(operation.mainSchema, false);
|
|
1036
|
+
const validated: Record<string, number> = {};
|
|
1037
|
+
const entries = Object.entries(rawFieldTimestamps as Record<string, unknown>);
|
|
1038
|
+
if (entries.length <= 100) {
|
|
1039
|
+
for (const [key, value] of entries) {
|
|
1040
|
+
if (typeof key === 'string' && key.length <= 200
|
|
1041
|
+
&& typeof value === 'number' && Number.isFinite(value) && value > 0
|
|
1042
|
+
&& crdtFields.has(key)) {
|
|
1043
|
+
validated[key] = value;
|
|
1044
|
+
}
|
|
1045
|
+
}
|
|
1046
|
+
if (Object.keys(validated).length > 0) {
|
|
1047
|
+
optionsWithVersion = { ...optionsWithVersion, fieldTimestamps: validated };
|
|
1048
|
+
}
|
|
1049
|
+
}
|
|
1050
|
+
}
|
|
1051
|
+
|
|
1052
|
+
this.logDebug('Calling service with operation', {
|
|
1053
|
+
operationIdentifier: executionContext.operation.operationIdentifier,
|
|
1054
|
+
variantKey: executionContext.operation.variantKey,
|
|
1055
|
+
dataMode,
|
|
1056
|
+
hasOptions: !!optionsWithVersion
|
|
1057
|
+
});
|
|
1058
|
+
|
|
1059
|
+
// W7.3a: Create AnonymousUser BEFORE the main operation to avoid FK orphans.
|
|
1060
|
+
// The main operation may create a resource with anonymousUserId FK — the
|
|
1061
|
+
// AnonymousUser record must exist first for FK integrity.
|
|
1062
|
+
if (executionContext.anonymousUserCreated) {
|
|
1063
|
+
await this.anonymousSessionService.createAnonymousUser(executionContext.anonymousUserId!, req);
|
|
1064
|
+
const token = this.anonymousSessionService.signSessionToken(executionContext.anonymousUserId!);
|
|
1065
|
+
executionContext.setAnonymousSessionToken(token);
|
|
1066
|
+
}
|
|
1067
|
+
|
|
1068
|
+
const result = await this.servicesRegistry.doByExecutionContext(executionContext, validatedData, optionsWithVersion);
|
|
1069
|
+
|
|
1070
|
+
// W7.3a: Set the token as response header AFTER the main operation succeeds.
|
|
1071
|
+
if (executionContext.anonymousSessionToken) {
|
|
1072
|
+
res.setHeader(WildoHeaderKeys.ANONYMOUS_SESSION_TOKEN, executionContext.anonymousSessionToken);
|
|
1073
|
+
}
|
|
1074
|
+
|
|
1075
|
+
await this.sendResponse(res, req, executionContext, result);
|
|
1076
|
+
} catch (error) {
|
|
1077
|
+
if (!executionContext) {
|
|
1078
|
+
next(error);
|
|
1079
|
+
return;
|
|
1080
|
+
}
|
|
1081
|
+
const enrichedError = await this.enrichVersionConflictError(error, executionContext, validatedData, optionsWithVersion);
|
|
1082
|
+
next(enrichedError);
|
|
1083
|
+
}
|
|
1084
|
+
}
|
|
1085
|
+
|
|
1086
|
+
|
|
1087
|
+
|
|
1088
|
+
private async enrichVersionConflictError(
|
|
1089
|
+
error: unknown,
|
|
1090
|
+
executionContext: ExecutionContext<any>,
|
|
1091
|
+
validatedData: unknown,
|
|
1092
|
+
options: ServiceOptions | undefined,
|
|
1093
|
+
): Promise<unknown> {
|
|
1094
|
+
if (!isWildoBackendError(error)) {
|
|
1095
|
+
return error;
|
|
1096
|
+
}
|
|
1097
|
+
|
|
1098
|
+
if (error.type !== ErrorType.CONFLICT || error.customMessageReference !== ErrorCustomMessageReference.VERSION_CONFLICT) {
|
|
1099
|
+
return error;
|
|
1100
|
+
}
|
|
1101
|
+
|
|
1102
|
+
if (options?.ifMatchVersion == null) {
|
|
1103
|
+
return error;
|
|
1104
|
+
}
|
|
1105
|
+
|
|
1106
|
+
// Only optimistic-lock conflicts carry the richer versionConflict payload.
|
|
1107
|
+
// A generic CONFLICT without an If-Match fence does not guarantee that the
|
|
1108
|
+
// controller can explain "expected vs current" truth field-by-field.
|
|
1109
|
+
const versionConflict = await this.buildVersionConflictDetails(
|
|
1110
|
+
executionContext,
|
|
1111
|
+
validatedData,
|
|
1112
|
+
options.ifMatchVersion,
|
|
1113
|
+
);
|
|
1114
|
+
if (!versionConflict) {
|
|
1115
|
+
return error;
|
|
1116
|
+
}
|
|
1117
|
+
|
|
1118
|
+
error.context = {
|
|
1119
|
+
...(error.context ?? {}),
|
|
1120
|
+
versionConflict,
|
|
1121
|
+
};
|
|
1122
|
+
return error;
|
|
1123
|
+
}
|
|
1124
|
+
|
|
1125
|
+
private async buildVersionConflictDetails(
|
|
1126
|
+
executionContext: ExecutionContext<any>,
|
|
1127
|
+
validatedData: unknown,
|
|
1128
|
+
expectedVersion: number,
|
|
1129
|
+
): Promise<VersionConflictDetails | undefined> {
|
|
1130
|
+
const resourceId = this.resourceOperationHelper.extractIdsFromExecutionContext(
|
|
1131
|
+
executionContext,
|
|
1132
|
+
executionContext.operation.resourceFieldIdentifier,
|
|
1133
|
+
);
|
|
1134
|
+
if (typeof resourceId !== 'string' || resourceId.length === 0) {
|
|
1135
|
+
return undefined;
|
|
1136
|
+
}
|
|
1137
|
+
|
|
1138
|
+
const submittedValues = isPlainRecord(validatedData) ? { ...validatedData } : {};
|
|
1139
|
+
|
|
1140
|
+
try {
|
|
1141
|
+
const currentResource = await this.servicesRegistry.read<Record<string, unknown>>(
|
|
1142
|
+
executionContext.operation.resourceIdentifier as ResourceType,
|
|
1143
|
+
executionContext,
|
|
1144
|
+
resourceId,
|
|
1145
|
+
);
|
|
1146
|
+
if (!isPlainRecord(currentResource)) {
|
|
1147
|
+
return undefined;
|
|
1148
|
+
}
|
|
1149
|
+
|
|
1150
|
+
const currentValues = this.shapeCanonicalConflictCurrentValues(currentResource);
|
|
1151
|
+
if (!currentValues) {
|
|
1152
|
+
return undefined;
|
|
1153
|
+
}
|
|
1154
|
+
|
|
1155
|
+
// Compare the client-submitted shape against canonical READ-shaped server
|
|
1156
|
+
// truth so conflict consumers see the same surface the frontend normally
|
|
1157
|
+
// reads, while still preserving authoritative engine metadata below.
|
|
1158
|
+
const conflictingFields = collectSubmittedFieldPaths(submittedValues).filter((fieldPath) => (
|
|
1159
|
+
!areConflictValuesEqual(
|
|
1160
|
+
getValueAtPath(currentValues, fieldPath),
|
|
1161
|
+
getValueAtPath(submittedValues, fieldPath),
|
|
1162
|
+
)
|
|
1163
|
+
));
|
|
1164
|
+
|
|
1165
|
+
if (typeof currentValues._version !== 'number') {
|
|
1166
|
+
this.logger.warn('Skipped version conflict enrichment because canonical current values omitted authoritative version', {
|
|
1167
|
+
resourceType: executionContext.operation.resourceIdentifier,
|
|
1168
|
+
resourceId,
|
|
1169
|
+
expectedVersion,
|
|
1170
|
+
});
|
|
1171
|
+
return undefined;
|
|
1172
|
+
}
|
|
1173
|
+
|
|
1174
|
+
return {
|
|
1175
|
+
currentVersion: currentValues._version,
|
|
1176
|
+
expectedVersion,
|
|
1177
|
+
conflictingFields,
|
|
1178
|
+
currentValues,
|
|
1179
|
+
submittedValues,
|
|
1180
|
+
};
|
|
1181
|
+
} catch (readError) {
|
|
1182
|
+
this.logger.warn('Failed to enrich version conflict with authoritative current values', {
|
|
1183
|
+
resourceType: executionContext.operation.resourceIdentifier,
|
|
1184
|
+
resourceId,
|
|
1185
|
+
error: readError instanceof Error ? readError.message : String(readError),
|
|
1186
|
+
});
|
|
1187
|
+
return undefined;
|
|
1188
|
+
}
|
|
1189
|
+
}
|
|
1190
|
+
|
|
1191
|
+
private shapeCanonicalConflictCurrentValues(currentResource: Record<string, unknown>): Record<string, unknown> | undefined {
|
|
1192
|
+
const readOperation = this.resolveCanonicalConflictReadOperation();
|
|
1193
|
+
if (!readOperation) {
|
|
1194
|
+
return currentResource;
|
|
1195
|
+
}
|
|
1196
|
+
|
|
1197
|
+
const selectedDto = this.selectResponseDto(readOperation, undefined);
|
|
1198
|
+
if (!selectedDto) {
|
|
1199
|
+
return currentResource;
|
|
1200
|
+
}
|
|
1201
|
+
|
|
1202
|
+
const transformedCurrentResource = ResourcesConfigOperationsDtosBuilderUtils.transformResponseDates(currentResource, selectedDto);
|
|
1203
|
+
const parsedCurrentResource = selectedDto.parse(transformedCurrentResource);
|
|
1204
|
+
if (!isPlainRecord(parsedCurrentResource)) {
|
|
1205
|
+
return undefined;
|
|
1206
|
+
}
|
|
1207
|
+
|
|
1208
|
+
// Preserve engine-owned identity/version metadata even when the canonical
|
|
1209
|
+
// READ DTO strips them. Conflict consumers still need the authoritative
|
|
1210
|
+
// resource id/version tuple from storage truth, not only the public DTO body.
|
|
1211
|
+
if (parsedCurrentResource._id === undefined && currentResource._id !== undefined) {
|
|
1212
|
+
parsedCurrentResource._id = currentResource._id;
|
|
1213
|
+
}
|
|
1214
|
+
if (parsedCurrentResource._version === undefined && currentResource._version !== undefined) {
|
|
1215
|
+
parsedCurrentResource._version = currentResource._version;
|
|
1216
|
+
}
|
|
1217
|
+
if (currentResource._field_meta && typeof currentResource._field_meta === 'object' && !Array.isArray(currentResource._field_meta)) {
|
|
1218
|
+
parsedCurrentResource._field_meta = currentResource._field_meta;
|
|
1219
|
+
}
|
|
1220
|
+
|
|
1221
|
+
return parsedCurrentResource;
|
|
1222
|
+
}
|
|
1223
|
+
|
|
1224
|
+
private resolveCanonicalConflictReadOperation(): ResourceConfiguration_Operation<TCustomOperationEnum, TCoreOperationEnum, TMainSchema> | undefined {
|
|
1225
|
+
return this.resourceConfiguration.operations?.find((operation) => (
|
|
1226
|
+
operation.operationIdentifier === CoreResourceOperation.READ && operation.isOperationDefault === true
|
|
1227
|
+
)) ?? this.resourceConfiguration.operations?.find((operation) => (
|
|
1228
|
+
operation.operationIdentifier === CoreResourceOperation.READ
|
|
1229
|
+
));
|
|
1230
|
+
}
|
|
1231
|
+
|
|
1232
|
+
private normalizeCollectionQueryRequestData(
|
|
1233
|
+
rawRequestData: Record<string, unknown>,
|
|
1234
|
+
operation: ResourceConfiguration_Operation<TCustomOperationEnum, TCoreOperationEnum, TMainSchema>,
|
|
1235
|
+
effectiveOperation: string,
|
|
1236
|
+
): CollectionQueryRequestData {
|
|
1237
|
+
const { filterFields } = operation as unknown as CollectionQueryOperationMetadata;
|
|
1238
|
+
|
|
1239
|
+
const nestedFilters = rawRequestData.filters && typeof rawRequestData.filters === 'object' && !Array.isArray(rawRequestData.filters)
|
|
1240
|
+
? rawRequestData.filters as Record<string, unknown>
|
|
1241
|
+
: {};
|
|
1242
|
+
const filter = {
|
|
1243
|
+
...extractCollectionFilters(rawRequestData, filterFields),
|
|
1244
|
+
...extractCollectionFilters(nestedFilters, filterFields),
|
|
1245
|
+
};
|
|
1246
|
+
|
|
1247
|
+
const page = parseOptionalPositiveInt(rawRequestData.page)
|
|
1248
|
+
?? parseOptionalPositiveInt((rawRequestData.pagination as { page?: unknown } | undefined)?.page);
|
|
1249
|
+
const limit = parseOptionalPositiveInt(rawRequestData.limit)
|
|
1250
|
+
?? parseOptionalPositiveInt((rawRequestData.pagination as { limit?: unknown } | undefined)?.limit);
|
|
1251
|
+
|
|
1252
|
+
if (effectiveOperation === CoreResourceOperation.SEARCH) {
|
|
1253
|
+
const searchQuery = (
|
|
1254
|
+
typeof rawRequestData.q === 'string' && rawRequestData.q.trim() !== ''
|
|
1255
|
+
? rawRequestData.q
|
|
1256
|
+
: typeof rawRequestData.searchQuery === 'string' && rawRequestData.searchQuery.trim() !== ''
|
|
1257
|
+
? rawRequestData.searchQuery
|
|
1258
|
+
: typeof nestedFilters.searchRequest === 'string' && nestedFilters.searchRequest.trim() !== ''
|
|
1259
|
+
? nestedFilters.searchRequest
|
|
1260
|
+
: undefined
|
|
1261
|
+
);
|
|
1262
|
+
const sort = parseCollectionQuerySort(rawRequestData.sort)
|
|
1263
|
+
?? normalizeCollectionSorting(rawRequestData.sorting);
|
|
1264
|
+
|
|
1265
|
+
return { filter, page, limit, searchQuery, sort };
|
|
1266
|
+
}
|
|
1267
|
+
|
|
1268
|
+
if (effectiveOperation === CoreResourceOperation.LIST) {
|
|
1269
|
+
return { filter, page, limit };
|
|
1270
|
+
}
|
|
1271
|
+
|
|
1272
|
+
return { filter };
|
|
1273
|
+
}
|
|
1274
|
+
|
|
1275
|
+
private buildCollectionQueryRequestDtoInput(
|
|
1276
|
+
req: Request,
|
|
1277
|
+
operation: ResourceConfiguration_Operation<TCustomOperationEnum, TCoreOperationEnum, TMainSchema>,
|
|
1278
|
+
effectiveOperation: string,
|
|
1279
|
+
): Record<string, unknown> {
|
|
1280
|
+
const requestData = { ...req.params, ...req.query, ...req.body } as Record<string, unknown>;
|
|
1281
|
+
const normalizedRequest = this.normalizeCollectionQueryRequestData(requestData, operation, effectiveOperation);
|
|
1282
|
+
|
|
1283
|
+
const filters = { ...normalizedRequest.filter };
|
|
1284
|
+
if (effectiveOperation === CoreResourceOperation.SEARCH && normalizedRequest.searchQuery) {
|
|
1285
|
+
filters.searchRequest = normalizedRequest.searchQuery;
|
|
1286
|
+
}
|
|
1287
|
+
|
|
1288
|
+
return {
|
|
1289
|
+
...requestData,
|
|
1290
|
+
...(Object.keys(filters).length > 0 ? { filters } : {}),
|
|
1291
|
+
...(normalizedRequest.page !== undefined || normalizedRequest.limit !== undefined
|
|
1292
|
+
? {
|
|
1293
|
+
pagination: {
|
|
1294
|
+
...(normalizedRequest.page !== undefined ? { page: normalizedRequest.page } : {}),
|
|
1295
|
+
...(normalizedRequest.limit !== undefined ? { limit: normalizedRequest.limit } : {}),
|
|
1296
|
+
},
|
|
1297
|
+
}
|
|
1298
|
+
: {}),
|
|
1299
|
+
...(normalizedRequest.sort ? { sorting: buildSortingSchemaInput(normalizedRequest.sort) } : {}),
|
|
1300
|
+
};
|
|
1301
|
+
}
|
|
1302
|
+
|
|
1303
|
+
private validateRequestData(
|
|
1304
|
+
req: Request,
|
|
1305
|
+
operation: ResourceConfiguration_Operation<TCustomOperationEnum, TCoreOperationEnum, TMainSchema>,
|
|
1306
|
+
executionContext: ExecutionContext<typeof operation>
|
|
1307
|
+
): any {
|
|
1308
|
+
const _extractedRequestData = (req: Request) => ({ ...req.params, ...req.query, ...req.body });
|
|
1309
|
+
|
|
1310
|
+
// Use effectiveOperation to account for resourceOperationLike
|
|
1311
|
+
const effectiveOperation = operation.resourceOperationLike || operation.operationIdentifier;
|
|
1312
|
+
|
|
1313
|
+
const hasExplicitRequestDto = hasMeaningfulExplicitRequestDto(operation.requestDto);
|
|
1314
|
+
|
|
1315
|
+
if (
|
|
1316
|
+
effectiveOperation === CoreResourceOperation.LIST
|
|
1317
|
+
|| effectiveOperation === CoreResourceOperation.COUNT
|
|
1318
|
+
|| effectiveOperation === CoreResourceOperation.SEARCH
|
|
1319
|
+
) {
|
|
1320
|
+
const dtoInput = this.buildCollectionQueryRequestDtoInput(
|
|
1321
|
+
req,
|
|
1322
|
+
operation,
|
|
1323
|
+
String(effectiveOperation),
|
|
1324
|
+
);
|
|
1325
|
+
|
|
1326
|
+
if (shouldSkipImplicitRequestValidation(String(effectiveOperation), hasExplicitRequestDto)) {
|
|
1327
|
+
return this.normalizeCollectionQueryRequestData(
|
|
1328
|
+
dtoInput,
|
|
1329
|
+
operation,
|
|
1330
|
+
String(effectiveOperation),
|
|
1331
|
+
);
|
|
1332
|
+
}
|
|
1333
|
+
|
|
1334
|
+
if (!operation.requestDto) {
|
|
1335
|
+
return this.normalizeCollectionQueryRequestData(
|
|
1336
|
+
dtoInput,
|
|
1337
|
+
operation,
|
|
1338
|
+
String(effectiveOperation),
|
|
1339
|
+
);
|
|
1340
|
+
}
|
|
1341
|
+
|
|
1342
|
+
try {
|
|
1343
|
+
const transformedRequestData = ResourcesConfigOperationsDtosBuilderUtils.transformRequestDates(
|
|
1344
|
+
dtoInput,
|
|
1345
|
+
operation.requestDto,
|
|
1346
|
+
);
|
|
1347
|
+
const parsedRequestData = operation.requestDto.parse(transformedRequestData) as Record<string, unknown>;
|
|
1348
|
+
return this.normalizeCollectionQueryRequestData(
|
|
1349
|
+
parsedRequestData,
|
|
1350
|
+
operation,
|
|
1351
|
+
String(effectiveOperation),
|
|
1352
|
+
);
|
|
1353
|
+
} catch (error) {
|
|
1354
|
+
if (error instanceof z.ZodError) {
|
|
1355
|
+
throw this.errorBuilder.buildError( ErrorType.VALIDATION, executionContext,
|
|
1356
|
+
{ customMessageReference: ErrorCustomMessageReference.CONTROLLER_RESOURCE_VALIDATION_FAILED,
|
|
1357
|
+
stack: error.stack,
|
|
1358
|
+
context: { requestData: dtoInput, error: error.message, zodIssues: error.issues }
|
|
1359
|
+
});
|
|
1360
|
+
}
|
|
1361
|
+
throw error;
|
|
1362
|
+
}
|
|
1363
|
+
}
|
|
1364
|
+
|
|
1365
|
+
// For pure core READ/LIST/DELETE/COUNT/SEARCH semantics without an explicit
|
|
1366
|
+
// request DTO, no request body validation is needed. Custom operations that
|
|
1367
|
+
// reuse READ-like semantics may still declare requestDto and must keep it.
|
|
1368
|
+
if (shouldSkipImplicitRequestValidation(String(effectiveOperation), hasExplicitRequestDto)) {
|
|
1369
|
+
// For other operations (READ, DELETE, COUNT): return empty or minimal data
|
|
1370
|
+
// The actual IDs will be extracted from execution context
|
|
1371
|
+
return req.body || {};
|
|
1372
|
+
}
|
|
1373
|
+
|
|
1374
|
+
if (!operation.requestDto) {
|
|
1375
|
+
return _extractedRequestData(req);
|
|
1376
|
+
}
|
|
1377
|
+
|
|
1378
|
+
try {
|
|
1379
|
+
const requestData = _extractedRequestData(req);
|
|
1380
|
+
|
|
1381
|
+
// Phase 3.8: Transform dates from strings to Date objects before validation
|
|
1382
|
+
let transformedRequestData = requestData;
|
|
1383
|
+
if (operation.requestDto) {
|
|
1384
|
+
transformedRequestData = ResourcesConfigOperationsDtosBuilderUtils.transformRequestDates(requestData, operation.requestDto);
|
|
1385
|
+
}
|
|
1386
|
+
|
|
1387
|
+
// Phase 3.9: Validate against requestDto (field stripping already applied at factory time)
|
|
1388
|
+
return operation.requestDto.parse(transformedRequestData);
|
|
1389
|
+
} catch (error) {
|
|
1390
|
+
if (error instanceof z.ZodError) {
|
|
1391
|
+
throw this.errorBuilder.buildError( ErrorType.VALIDATION, executionContext,
|
|
1392
|
+
{ customMessageReference: ErrorCustomMessageReference.CONTROLLER_RESOURCE_VALIDATION_FAILED,
|
|
1393
|
+
stack: error.stack,
|
|
1394
|
+
context: { requestData: _extractedRequestData(req), error: error.message, zodIssues: error.issues }
|
|
1395
|
+
});
|
|
1396
|
+
}
|
|
1397
|
+
throw this.errorBuilder.buildFromStandardError(error, executionContext, {
|
|
1398
|
+
customMessageReference: ErrorCustomMessageReference.CONTROLLER_RESOURCE_VALIDATION_FAILED,
|
|
1399
|
+
context: { requestData: _extractedRequestData(req), error: error.message }
|
|
1400
|
+
});
|
|
1401
|
+
}
|
|
1402
|
+
}
|
|
1403
|
+
|
|
1404
|
+
|
|
1405
|
+
/**
|
|
1406
|
+
* Phase 3.7: Extract DataMode from execution context or query parameters.
|
|
1407
|
+
* DataMode determines which DTO variant to use (SUMMARY, CONTEXT, or RAW).
|
|
1408
|
+
*
|
|
1409
|
+
* Priority:
|
|
1410
|
+
* 1. Query parameter `dataMode` (if provided)
|
|
1411
|
+
* 2. Operation variantKey (set at factory time)
|
|
1412
|
+
* 3. Default to RAW (responseDto)
|
|
1413
|
+
*/
|
|
1414
|
+
private extractDataMode(
|
|
1415
|
+
executionContext: ExecutionContext<any>,
|
|
1416
|
+
req?: Request
|
|
1417
|
+
): DataMode {
|
|
1418
|
+
// Check query parameter first (allows runtime override)
|
|
1419
|
+
const queryDataMode = req?.query?.dataMode as string | undefined;
|
|
1420
|
+
const extractedFromQuery = ResourceOperationsUtils.normalizeDataModeString(queryDataMode);
|
|
1421
|
+
|
|
1422
|
+
// If query param provided a valid value, use it
|
|
1423
|
+
if (queryDataMode && extractedFromQuery) {
|
|
1424
|
+
return extractedFromQuery;
|
|
1425
|
+
}
|
|
1426
|
+
|
|
1427
|
+
// Fall back to operation variantKey (set at factory time)
|
|
1428
|
+
const operation = executionContext.operation;
|
|
1429
|
+
if (operation.variantKey === OPERATION_VARIANT_KEY.SUMMARY) {
|
|
1430
|
+
return DataMode.SUMMARY;
|
|
1431
|
+
}
|
|
1432
|
+
if (operation.variantKey === OPERATION_VARIANT_KEY.CONTEXT) {
|
|
1433
|
+
return DataMode.CONTEXT;
|
|
1434
|
+
}
|
|
1435
|
+
|
|
1436
|
+
// Default to RAW
|
|
1437
|
+
return DataMode.RAW;
|
|
1438
|
+
}
|
|
1439
|
+
|
|
1440
|
+
private resolveExecutionContextForAuthorization(
|
|
1441
|
+
executionContext: ExecutionContext<any>,
|
|
1442
|
+
req?: Request,
|
|
1443
|
+
): { executionContext: ExecutionContext<any>; dataMode: DataMode } {
|
|
1444
|
+
const dataMode = this.extractDataMode(executionContext, req);
|
|
1445
|
+
const resolvedOperation = this.resolveOperationForAuthorizationDataMode(
|
|
1446
|
+
executionContext.operation as ResourceConfiguration_Operation<TCustomOperationEnum, TCoreOperationEnum, TMainSchema>,
|
|
1447
|
+
dataMode,
|
|
1448
|
+
);
|
|
1449
|
+
|
|
1450
|
+
if (executionContext.operation === resolvedOperation) {
|
|
1451
|
+
return { executionContext, dataMode };
|
|
1452
|
+
}
|
|
1453
|
+
|
|
1454
|
+
this.logDebug('Resolved controller authorization operation variant before role checks', {
|
|
1455
|
+
originalVariantKey: executionContext.operation.variantKey,
|
|
1456
|
+
resolvedVariantKey: resolvedOperation.variantKey,
|
|
1457
|
+
dataMode,
|
|
1458
|
+
operationIdentifier: executionContext.operation.operationIdentifier,
|
|
1459
|
+
});
|
|
1460
|
+
|
|
1461
|
+
return {
|
|
1462
|
+
executionContext: executionContext.withOperation(resolvedOperation),
|
|
1463
|
+
dataMode,
|
|
1464
|
+
};
|
|
1465
|
+
}
|
|
1466
|
+
|
|
1467
|
+
private resolveOperationForAuthorizationDataMode(
|
|
1468
|
+
operation: ResourceConfiguration_Operation<TCustomOperationEnum, TCoreOperationEnum, TMainSchema>,
|
|
1469
|
+
dataMode: DataMode | undefined,
|
|
1470
|
+
): ResourceConfiguration_Operation<TCustomOperationEnum, TCoreOperationEnum, TMainSchema> {
|
|
1471
|
+
if (!dataMode || dataMode === DataMode.RAW) {
|
|
1472
|
+
return operation;
|
|
1473
|
+
}
|
|
1474
|
+
|
|
1475
|
+
const operationPath = {
|
|
1476
|
+
resourceIdentifier: operation.resourceIdentifier,
|
|
1477
|
+
operationIdentifier: operation.operationIdentifier,
|
|
1478
|
+
variantType: operation.variantType,
|
|
1479
|
+
isOperationDefault: false,
|
|
1480
|
+
variantKey: dataMode === DataMode.SUMMARY
|
|
1481
|
+
? OPERATION_VARIANT_KEY.SUMMARY
|
|
1482
|
+
: OPERATION_VARIANT_KEY.CONTEXT,
|
|
1483
|
+
isBulkOperation: false,
|
|
1484
|
+
} as const;
|
|
1485
|
+
|
|
1486
|
+
return this.resourcesRegistry.getOperationFromPath(operationPath) as ResourceConfiguration_Operation<
|
|
1487
|
+
TCustomOperationEnum,
|
|
1488
|
+
TCoreOperationEnum,
|
|
1489
|
+
TMainSchema
|
|
1490
|
+
>;
|
|
1491
|
+
}
|
|
1492
|
+
|
|
1493
|
+
/**
|
|
1494
|
+
* Phase 3.7: Select the appropriate response DTO based on DataMode.
|
|
1495
|
+
* Uses structure-aware utility method that handles LIST/SEARCH pagination wrappers.
|
|
1496
|
+
*
|
|
1497
|
+
* - Variant operations: Uses `responseDto` (already variant-specific)
|
|
1498
|
+
* - SUMMARY mode: Uses `summaryDto` (wrapped in pagination for LIST/SEARCH)
|
|
1499
|
+
* - CONTEXT mode: Uses `contextDto` (wrapped in pagination for LIST/SEARCH)
|
|
1500
|
+
* - RAW mode: Uses `responseDto` (default)
|
|
1501
|
+
*/
|
|
1502
|
+
private selectResponseDto(
|
|
1503
|
+
operation: ResourceConfiguration_Operation<TCustomOperationEnum, TCoreOperationEnum, TMainSchema>,
|
|
1504
|
+
dataMode?: DataMode
|
|
1505
|
+
): z.ZodTypeAny | undefined {
|
|
1506
|
+
return ResourcesConfigOperationsDtosBuilderUtils.selectResponseDto(operation, dataMode) || undefined;
|
|
1507
|
+
}
|
|
1508
|
+
|
|
1509
|
+
private async sendResponse(
|
|
1510
|
+
res: Response,
|
|
1511
|
+
req: Request,
|
|
1512
|
+
executionContext: ExecutionContext<any>,
|
|
1513
|
+
result: any,
|
|
1514
|
+
): Promise<void | Response> {
|
|
1515
|
+
const operation = executionContext.operation as ResourceConfiguration_Operation<
|
|
1516
|
+
TCustomOperationEnum,
|
|
1517
|
+
TCoreOperationEnum,
|
|
1518
|
+
TMainSchema
|
|
1519
|
+
>;
|
|
1520
|
+
// Phase 3.7: Select response DTO based on operation variant
|
|
1521
|
+
// selectResponseDto() is now structure-aware and handles variant operations correctly
|
|
1522
|
+
const dataMode = this.extractDataMode(executionContext, req);
|
|
1523
|
+
const selectedDto = this.selectResponseDto(operation, dataMode);
|
|
1524
|
+
|
|
1525
|
+
// Analyze the DTOs to understand structure
|
|
1526
|
+
const analyzeDtoStructure = (dto: any) => {
|
|
1527
|
+
if (!dto || typeof dto !== 'object' || !('shape' in dto)) return 'Not a Zod object';
|
|
1528
|
+
try {
|
|
1529
|
+
const shape = (dto as any).shape;
|
|
1530
|
+
return Object.keys(shape).join(', ');
|
|
1531
|
+
} catch {
|
|
1532
|
+
return 'Cannot analyze';
|
|
1533
|
+
}
|
|
1534
|
+
};
|
|
1535
|
+
|
|
1536
|
+
this.logDebug('Controller - sendResponse DTO selection', {
|
|
1537
|
+
operationIdentifier: operation.operationIdentifier,
|
|
1538
|
+
variantKey: operation.variantKey,
|
|
1539
|
+
dataMode,
|
|
1540
|
+
hasSelectedDto: !!selectedDto,
|
|
1541
|
+
hasResponseDto: !!operation.responseDto,
|
|
1542
|
+
hasSummaryDto: !!operation.summaryDto,
|
|
1543
|
+
hasContextDto: !!operation.contextDto,
|
|
1544
|
+
hasInternalDto: !!operation.internalDto,
|
|
1545
|
+
responseDtoFields: analyzeDtoStructure(operation.responseDto),
|
|
1546
|
+
selectedDtoFields: analyzeDtoStructure(selectedDto),
|
|
1547
|
+
resultStructure: result && typeof result === 'object' ? Object.keys(result) : typeof result
|
|
1548
|
+
});
|
|
1549
|
+
|
|
1550
|
+
// Phase 3.8: Transform dates from Date objects to ISO strings before validation
|
|
1551
|
+
let transformedResult = result;
|
|
1552
|
+
if (selectedDto) {
|
|
1553
|
+
transformedResult = ResourcesConfigOperationsDtosBuilderUtils.transformResponseDates(result, selectedDto);
|
|
1554
|
+
}
|
|
1555
|
+
|
|
1556
|
+
// CRDT: preserve _field_meta before DTO parse. Zod's .parse() silently strips
|
|
1557
|
+
// engine fields not in the resource schema. We save per-item _field_meta for both
|
|
1558
|
+
// single-item responses and collection responses (flat arrays + paginated wrappers).
|
|
1559
|
+
const savedFieldMetaMap = new Map<number, unknown>();
|
|
1560
|
+
const savedSingleFieldMeta = transformedResult?._field_meta;
|
|
1561
|
+
if (Array.isArray(transformedResult)) {
|
|
1562
|
+
for (let i = 0; i < transformedResult.length; i++) {
|
|
1563
|
+
if (transformedResult[i]?._field_meta) savedFieldMetaMap.set(i, transformedResult[i]._field_meta);
|
|
1564
|
+
}
|
|
1565
|
+
} else if (transformedResult?.data && Array.isArray(transformedResult.data)) {
|
|
1566
|
+
for (let i = 0; i < transformedResult.data.length; i++) {
|
|
1567
|
+
if (transformedResult.data[i]?._field_meta) savedFieldMetaMap.set(i, transformedResult.data[i]._field_meta);
|
|
1568
|
+
}
|
|
1569
|
+
}
|
|
1570
|
+
|
|
1571
|
+
// Phase 3.9: Validate response against selected DTO (runtime safety net)
|
|
1572
|
+
// Field stripping happens at two levels:
|
|
1573
|
+
// 1. Schema-level (factory time): stripBackendOnlyFields() removes backend-only fields from the schema using .omit()
|
|
1574
|
+
// - Backend-only fields are stripped except isReturnedAtCreation for CREATE operations
|
|
1575
|
+
// 2. Data-level (runtime): Zod's .parse() automatically strips any fields not in the schema (default behavior)
|
|
1576
|
+
// - This provides an additional safety layer in case any backend-only fields leak through
|
|
1577
|
+
let responseData = transformedResult;
|
|
1578
|
+
if (selectedDto) {
|
|
1579
|
+
try {
|
|
1580
|
+
// For operations that return arrays (LIST, LIST_MANY, etc.),
|
|
1581
|
+
// validate each item against the selected DTO
|
|
1582
|
+
const operationId = operation.operationIdentifier;
|
|
1583
|
+
const operationLike = operation.resourceOperationLike;
|
|
1584
|
+
const effectiveOperation = operationLike || operationId;
|
|
1585
|
+
|
|
1586
|
+
const isArrayOperation = ARRAY_RESPONSE_OPERATIONS.includes(effectiveOperation as any);
|
|
1587
|
+
|
|
1588
|
+
if (isArrayOperation && Array.isArray(transformedResult)) {
|
|
1589
|
+
// For array operations, validate each item individually
|
|
1590
|
+
// Note: Zod's .parse() automatically strips fields not in the schema (default behavior)
|
|
1591
|
+
responseData = transformedResult.map(item => selectedDto!.parse(item));
|
|
1592
|
+
} else {
|
|
1593
|
+
// For single-item operations, validate directly
|
|
1594
|
+
// Note: Zod's .parse() automatically strips fields not in the schema (default behavior)
|
|
1595
|
+
responseData = selectedDto.parse(transformedResult);
|
|
1596
|
+
}
|
|
1597
|
+
|
|
1598
|
+
|
|
1599
|
+
} catch (error) {
|
|
1600
|
+
// Phase 3.9: Log warning if validation fails (safety net - this shouldn't happen if factory-time field stripping is correct)
|
|
1601
|
+
this.logger.warn('Response DTO validation failed', {
|
|
1602
|
+
operation: operation.operationIdentifier,
|
|
1603
|
+
resourceIdentifier: operation.resourceIdentifier,
|
|
1604
|
+
dataMode,
|
|
1605
|
+
error: error instanceof Error ? error.message : 'Unknown',
|
|
1606
|
+
resultKeys: typeof result === 'object' ? Object.keys(result) : 'not-object'
|
|
1607
|
+
});
|
|
1608
|
+
|
|
1609
|
+
// Build error and send JSON response directly (don't throw to avoid HTML error page)
|
|
1610
|
+
const wildoError = error instanceof z.ZodError
|
|
1611
|
+
? this.errorBuilder.buildError(ErrorType.VALIDATION, executionContext, {
|
|
1612
|
+
customMessageReference: ErrorCustomMessageReference.CONTROLLER_RESOURCE_VALIDATION_FAILED,
|
|
1613
|
+
stack: error.stack,
|
|
1614
|
+
context: { responseData: result, error: error.message, zodIssues: error.issues }
|
|
1615
|
+
})
|
|
1616
|
+
: this.errorBuilder.buildFromStandardError(error, executionContext, {
|
|
1617
|
+
customMessageReference: ErrorCustomMessageReference.CONTROLLER_RESOURCE_VALIDATION_FAILED,
|
|
1618
|
+
context: { responseData: result, error: error.message }
|
|
1619
|
+
});
|
|
1620
|
+
|
|
1621
|
+
// Extract validationErrors from zodIssues for frontend consumption
|
|
1622
|
+
let validationErrors: Record<string, string> | undefined;
|
|
1623
|
+
if (error instanceof z.ZodError) {
|
|
1624
|
+
validationErrors = {};
|
|
1625
|
+
for (const issue of error.issues) {
|
|
1626
|
+
const fieldPath = issue.path.join('.');
|
|
1627
|
+
if (fieldPath) validationErrors[fieldPath] = issue.message;
|
|
1628
|
+
}
|
|
1629
|
+
}
|
|
1630
|
+
|
|
1631
|
+
return res.status(wildoError.statusCode).json({
|
|
1632
|
+
error: {
|
|
1633
|
+
type: wildoError.type,
|
|
1634
|
+
severity: wildoError.severity,
|
|
1635
|
+
message: wildoError.customMessageReference,
|
|
1636
|
+
timestamp: wildoError.timestamp?.toISOString() || new Date().toISOString(),
|
|
1637
|
+
...(wildoError.context && { details: wildoError.context }),
|
|
1638
|
+
...(validationErrors && { validationErrors }),
|
|
1639
|
+
}
|
|
1640
|
+
});
|
|
1641
|
+
}
|
|
1642
|
+
}
|
|
1643
|
+
|
|
1644
|
+
// CRDT: reattach _field_meta after DTO parse (stripped by Zod since it's not in any resource schema)
|
|
1645
|
+
if (Array.isArray(responseData) && savedFieldMetaMap.size > 0) {
|
|
1646
|
+
for (const [i, meta] of savedFieldMetaMap) {
|
|
1647
|
+
if (responseData[i] && typeof responseData[i] === 'object') {
|
|
1648
|
+
(responseData[i] as Record<string, unknown>)._field_meta = meta;
|
|
1649
|
+
}
|
|
1650
|
+
}
|
|
1651
|
+
} else if (responseData?.data && Array.isArray(responseData.data) && savedFieldMetaMap.size > 0) {
|
|
1652
|
+
for (const [i, meta] of savedFieldMetaMap) {
|
|
1653
|
+
if (responseData.data[i] && typeof responseData.data[i] === 'object') {
|
|
1654
|
+
(responseData.data[i] as Record<string, unknown>)._field_meta = meta;
|
|
1655
|
+
}
|
|
1656
|
+
}
|
|
1657
|
+
} else if (savedSingleFieldMeta && responseData && typeof responseData === 'object' && !Array.isArray(responseData)) {
|
|
1658
|
+
(responseData as Record<string, unknown>)._field_meta = savedSingleFieldMeta;
|
|
1659
|
+
}
|
|
1660
|
+
|
|
1661
|
+
// Phase 3.10 + Q4: Audit logging for isReturnedAtCreation (CREATE) and auditAccess (any operation) fields
|
|
1662
|
+
await this.logAuditAccessForFields(operation, executionContext, responseData, result, selectedDto);
|
|
1663
|
+
|
|
1664
|
+
if (executionContext.consumableTokenConsumed) {
|
|
1665
|
+
res.setHeader(WildoHeaderKeys.CONSUMABLE_TOKEN_CONSUMED, 'true');
|
|
1666
|
+
}
|
|
1667
|
+
|
|
1668
|
+
res.setHeader(WildoHeaderKeys.X_SERVER_TIME, String(Date.now()));
|
|
1669
|
+
|
|
1670
|
+
const statusCode = this.getStatusCodeForOperation(operation, result);
|
|
1671
|
+
res.status(statusCode).json(responseData);
|
|
1672
|
+
}
|
|
1673
|
+
|
|
1674
|
+
/**
|
|
1675
|
+
* Phase 3.10 + Q4: Log audit access for sensitive backend-only fields.
|
|
1676
|
+
* Two independent triggers:
|
|
1677
|
+
* - CREATE operations: fields with `isReturnedAtCreation: true` (Phase 3.10)
|
|
1678
|
+
* - Any operation: fields with `auditAccess: true` (Q4)
|
|
1679
|
+
*
|
|
1680
|
+
* @param operation - The operation being executed
|
|
1681
|
+
* @param executionContext - Execution context with initiator information
|
|
1682
|
+
* @param responseData - The validated response data (may be array or single object)
|
|
1683
|
+
* @param originalResult - The original result before validation (to get _id for CREATE operations)
|
|
1684
|
+
* @param selectedDto - The selected response DTO schema that was used for validation
|
|
1685
|
+
*/
|
|
1686
|
+
private async logAuditAccessForFields(
|
|
1687
|
+
operation: ResourceConfiguration_Operation<TCustomOperationEnum, TCoreOperationEnum, TMainSchema>,
|
|
1688
|
+
executionContext: ExecutionContext<any>,
|
|
1689
|
+
responseData: any,
|
|
1690
|
+
originalResult: any,
|
|
1691
|
+
selectedDto: z.ZodTypeAny | undefined
|
|
1692
|
+
): Promise<void> {
|
|
1693
|
+
try {
|
|
1694
|
+
if (!selectedDto || !isZodObject(selectedDto)) {
|
|
1695
|
+
return;
|
|
1696
|
+
}
|
|
1697
|
+
|
|
1698
|
+
const operationId = operation.operationIdentifier;
|
|
1699
|
+
const operationLike = operation.resourceOperationLike;
|
|
1700
|
+
const effectiveOperation = operationLike || operationId;
|
|
1701
|
+
const isCreateOperation = effectiveOperation === CoreResourceOperation.CREATE ||
|
|
1702
|
+
effectiveOperation === CoreResourceOperation.CREATE_MANY;
|
|
1703
|
+
|
|
1704
|
+
const operationIdentifierStr = String(effectiveOperation);
|
|
1705
|
+
|
|
1706
|
+
const shape = getZodObjectShape(selectedDto);
|
|
1707
|
+
const fieldsToAudit: string[] = [];
|
|
1708
|
+
|
|
1709
|
+
for (const [fieldName, fieldSchema] of Object.entries(shape)) {
|
|
1710
|
+
if (!isBackendOnlyField(fieldSchema as z.ZodTypeAny)) continue;
|
|
1711
|
+
|
|
1712
|
+
const backendOnlyParams = getBackendOnlyParams(fieldSchema as z.ZodTypeAny);
|
|
1713
|
+
|
|
1714
|
+
// CREATE path: audit fields with isReturnedAtCreation (existing behavior)
|
|
1715
|
+
if (isCreateOperation && backendOnlyParams?.isReturnedAtCreation) {
|
|
1716
|
+
fieldsToAudit.push(fieldName);
|
|
1717
|
+
continue;
|
|
1718
|
+
}
|
|
1719
|
+
|
|
1720
|
+
// Any operation: audit fields with auditAccess: true (Q4)
|
|
1721
|
+
if (isAuditAccessField(fieldSchema as z.ZodTypeAny)) {
|
|
1722
|
+
fieldsToAudit.push(fieldName);
|
|
1723
|
+
}
|
|
1724
|
+
}
|
|
1725
|
+
|
|
1726
|
+
// If no fields to audit, return early
|
|
1727
|
+
if (fieldsToAudit.length === 0) {
|
|
1728
|
+
return;
|
|
1729
|
+
}
|
|
1730
|
+
|
|
1731
|
+
// Check if any of these fields are present in the response data
|
|
1732
|
+
const checkFieldsInData = (data: any): string[] => {
|
|
1733
|
+
if (!data || typeof data !== 'object') {
|
|
1734
|
+
return [];
|
|
1735
|
+
}
|
|
1736
|
+
return fieldsToAudit.filter(fieldName => fieldName in data && data[fieldName] !== undefined);
|
|
1737
|
+
};
|
|
1738
|
+
|
|
1739
|
+
// Handle array responses (LIST, CREATE_MANY, etc.)
|
|
1740
|
+
if (Array.isArray(responseData)) {
|
|
1741
|
+
for (const item of responseData) {
|
|
1742
|
+
const fieldsPresent = checkFieldsInData(item);
|
|
1743
|
+
if (fieldsPresent.length > 0) {
|
|
1744
|
+
// Get resource ID from item or original result
|
|
1745
|
+
const resourceId = item?._id || (Array.isArray(originalResult) ? originalResult.find(r => r?._id)?._id : originalResult?._id);
|
|
1746
|
+
|
|
1747
|
+
for (const fieldName of fieldsPresent) {
|
|
1748
|
+
await this.auditLogsService.logFieldAccess({
|
|
1749
|
+
fieldName,
|
|
1750
|
+
resourceType: operation.resourceIdentifier,
|
|
1751
|
+
resourceId: resourceId,
|
|
1752
|
+
userId: executionContext.initiatorIds?.userId,
|
|
1753
|
+
organizationId: executionContext.initiatorIds?.organizationId,
|
|
1754
|
+
applicationId: executionContext.initiatorIds?.applicationId,
|
|
1755
|
+
operationIdentifier: operationIdentifierStr,
|
|
1756
|
+
isCreateOperation,
|
|
1757
|
+
});
|
|
1758
|
+
}
|
|
1759
|
+
}
|
|
1760
|
+
}
|
|
1761
|
+
} else {
|
|
1762
|
+
// Single object response
|
|
1763
|
+
const fieldsPresent = checkFieldsInData(responseData);
|
|
1764
|
+
if (fieldsPresent.length > 0) {
|
|
1765
|
+
// Get resource ID from response data or original result
|
|
1766
|
+
const resourceId = responseData?._id || originalResult?._id;
|
|
1767
|
+
|
|
1768
|
+
for (const fieldName of fieldsPresent) {
|
|
1769
|
+
await this.auditLogsService.logFieldAccess({
|
|
1770
|
+
fieldName,
|
|
1771
|
+
resourceType: operation.resourceIdentifier,
|
|
1772
|
+
resourceId: resourceId,
|
|
1773
|
+
userId: executionContext.initiatorIds?.userId,
|
|
1774
|
+
organizationId: executionContext.initiatorIds?.organizationId,
|
|
1775
|
+
applicationId: executionContext.initiatorIds?.applicationId,
|
|
1776
|
+
operationIdentifier: operationIdentifierStr,
|
|
1777
|
+
isCreateOperation,
|
|
1778
|
+
});
|
|
1779
|
+
}
|
|
1780
|
+
}
|
|
1781
|
+
}
|
|
1782
|
+
} catch (error) {
|
|
1783
|
+
// Don't let audit logging break the main flow
|
|
1784
|
+
this.logger.warn('Failed to log audit access for fields', {
|
|
1785
|
+
operation: operation.operationIdentifier,
|
|
1786
|
+
resourceIdentifier: operation.resourceIdentifier,
|
|
1787
|
+
error: error instanceof Error ? error.message : 'Unknown',
|
|
1788
|
+
});
|
|
1789
|
+
}
|
|
1790
|
+
}
|
|
1791
|
+
|
|
1792
|
+
private getHttpMethodForOperation(
|
|
1793
|
+
operation: ResourceConfiguration_Operation<TCustomOperationEnum, TCoreOperationEnum, TMainSchema>
|
|
1794
|
+
): HttpMethod {
|
|
1795
|
+
|
|
1796
|
+
const operationToCheck = ResourceOperationsUtils.getCoreResourceOperationFromOperation(operation);
|
|
1797
|
+
|
|
1798
|
+
if(!operationToCheck) {
|
|
1799
|
+
this.logDebug('No HTTP method found for operation, defaulting to POST', { operation: operation.operationIdentifier });
|
|
1800
|
+
return HttpMethod.POST;
|
|
1801
|
+
}
|
|
1802
|
+
return HTTP_METHOD_MAP[operationToCheck] || HttpMethod.POST;
|
|
1803
|
+
|
|
1804
|
+
}
|
|
1805
|
+
|
|
1806
|
+
private getStatusCodeForOperation(
|
|
1807
|
+
operation: ResourceConfiguration_Operation<TCustomOperationEnum, TCoreOperationEnum, TMainSchema>,
|
|
1808
|
+
result: any
|
|
1809
|
+
): number {
|
|
1810
|
+
|
|
1811
|
+
const notFoundableOperations : CoreResourceOperation[] = [
|
|
1812
|
+
CoreResourceOperation.DELETE,
|
|
1813
|
+
CoreResourceOperation.UPDATE_MANY,
|
|
1814
|
+
CoreResourceOperation.DELETE_MANY,
|
|
1815
|
+
CoreResourceOperation.READ,
|
|
1816
|
+
CoreResourceOperation.UPDATE
|
|
1817
|
+
];
|
|
1818
|
+
|
|
1819
|
+
const operationToCheck = ResourceOperationsUtils.getCoreResourceOperationFromOperation(operation);
|
|
1820
|
+
|
|
1821
|
+
if(!operationToCheck) {
|
|
1822
|
+
this.logDebug('No HTTP method found for operation, defaulting to 200', { operation: operation.operationIdentifier });
|
|
1823
|
+
return 200;
|
|
1824
|
+
}
|
|
1825
|
+
|
|
1826
|
+
return (operationToCheck === CoreResourceOperation.CREATE || operationToCheck === CoreResourceOperation.CREATE_MANY)
|
|
1827
|
+
? 201
|
|
1828
|
+
: (notFoundableOperations.includes(operationToCheck)
|
|
1829
|
+
? result ? 200 : 404
|
|
1830
|
+
: 200);
|
|
1831
|
+
}
|
|
1832
|
+
|
|
1833
|
+
}
|