@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,2102 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
ApiKeyApplication,
|
|
3
|
+
ApiKeyOrganization,
|
|
4
|
+
Application,
|
|
5
|
+
AnyResourceConfiguration,
|
|
6
|
+
ExecutionContext_RoleInfo,
|
|
7
|
+
OrganizationMember,
|
|
8
|
+
ResourceConfiguration_Operation,
|
|
9
|
+
ResourceConfiguration_Operation_UrlInitiatorInfo,
|
|
10
|
+
User,
|
|
11
|
+
ExecutionContext_RelationshipContext,
|
|
12
|
+
ResourceFieldIdentifier,
|
|
13
|
+
ResourceType,
|
|
14
|
+
ResourceConfiguration_OperationPath
|
|
15
|
+
} from '@wildo-ai/saas-models';
|
|
16
|
+
import { EnumLikeType } from '@wildo-ai/zod-decorators';
|
|
17
|
+
import { Request } from 'express';
|
|
18
|
+
import { Container, inject, injectable } from 'inversify';
|
|
19
|
+
import 'reflect-metadata';
|
|
20
|
+
import { z } from 'zod';
|
|
21
|
+
|
|
22
|
+
import { CORE_APP_ROLES, CoreResourceType, OrganizationMemberStatus, ResourcePrimaryScope, WildoHeaderKeys } from '@wildo-ai/saas-models';
|
|
23
|
+
|
|
24
|
+
import { ApiKeyStatus, CoreResourceOperation, ErrorCustomMessageReference, ErrorType, ExecutionContext_ExecutionType, ExecutionContext_InitiatorIds, ResourceOperationVariantType, ResourcesConfig_OperationPathUtils, TokenAuthenticationPolicy, UserStatus, isWildoBackendError } from '@wildo-ai/saas-models';
|
|
25
|
+
|
|
26
|
+
// =====================================================
|
|
27
|
+
// Socket Authentication Types (reuses existing ExecutionContext types)
|
|
28
|
+
// =====================================================
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
import { LoggerService } from '~wildo-backend-lib/monitoring/logger/services/logger.service';
|
|
32
|
+
import { ExecutionContext, ExecutionContext_FactoryParams, SocketAuthResult } from '~wildo-backend-lib/runtime/models/execution-context.backend.schemas';
|
|
33
|
+
import { ServiceOptions } from '~wildo-backend-lib/base-classes/models/repositories.backend.schemas';
|
|
34
|
+
|
|
35
|
+
import { AppConfigurationService } from '~wildo-backend-lib/config/services/app-configuration.backend.service';
|
|
36
|
+
import { JwtClaim_App_Auth_Schema, JwtClaim_App_Auth_UserRequest } from '~wildo-backend-lib/security/authentications/models/authentications.backend.schemas';
|
|
37
|
+
import { JwtBackendService } from '~wildo-backend-lib/security/jwt/services/jwt.backend.service';
|
|
38
|
+
import { AuthorizationsBackendService } from '~wildo-backend-lib/security/authorizations/services/authorizations.backend.service';
|
|
39
|
+
import { RepositoriesRegistryHandlerBackendService } from '~wildo-backend-lib/base-classes/services/repositories/repositories-registry-handler.backend.service';
|
|
40
|
+
import { ErrorBuilderBackendService } from '~wildo-backend-lib/errors/services/error-builder.backend.service';
|
|
41
|
+
import { ErrorHandlerService } from '~wildo-backend-lib/errors/services/error-handler.backend.service';
|
|
42
|
+
import { SAAS_SERVICE_TYPES } from '~wildo-backend-lib/inject/models/service-types';
|
|
43
|
+
import { ResourcesRegistryBackendService } from '~wildo-backend-lib/resources/services/resources-registry.backend.service';
|
|
44
|
+
import { ExecutionContextHandlerBackendService } from './execution-context-handler.backend.service';
|
|
45
|
+
import { BackendResourceType } from '~wildo-backend-lib/resources/models/resources-types.backend.schemas';
|
|
46
|
+
import { ConsumableToken } from '~wildo-backend-lib/security/consumable-tokens/models/consumable-tokens.shared.schemas';
|
|
47
|
+
import { ConsumableTokenBackendService } from '~wildo-backend-lib/security/consumable-tokens/services/consumable-token.backend.service';
|
|
48
|
+
import { AnonymousSessionBackendService } from '~wildo-backend-lib/security/authentications/services/anonymous-session.backend.service';
|
|
49
|
+
import { RedisService } from '~wildo-backend-lib/databases/services/redis.service';
|
|
50
|
+
import { AUTH_REDIS_KEYS } from '~wildo-backend-lib/security/authentications/models/auth-constants.backend';
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
@injectable()
|
|
54
|
+
export class ExecutionContextCreatorBackendService {
|
|
55
|
+
|
|
56
|
+
private readonly logDebug: (message: string, context?: Record<string, unknown>) => void;
|
|
57
|
+
|
|
58
|
+
constructor(
|
|
59
|
+
@inject(SAAS_SERVICE_TYPES.Logger) private readonly logger: LoggerService,
|
|
60
|
+
@inject(SAAS_SERVICE_TYPES.AppConfigService) private readonly appConfigService: AppConfigurationService,
|
|
61
|
+
@inject(SAAS_SERVICE_TYPES.ErrorBuilderService) private readonly errorBuilder: ErrorBuilderBackendService,
|
|
62
|
+
@inject(SAAS_SERVICE_TYPES.ExecutionContextHandlerService) private readonly executionContextHandlerService: ExecutionContextHandlerBackendService,
|
|
63
|
+
@inject(SAAS_SERVICE_TYPES.JwtBackendService) private readonly jwtService: JwtBackendService,
|
|
64
|
+
@inject(SAAS_SERVICE_TYPES.ResourceRegistryService) private readonly resourcesRegistryService: ResourcesRegistryBackendService,
|
|
65
|
+
@inject(SAAS_SERVICE_TYPES.RepositoriesRegistryHandlerService) private readonly repositoriesRegistry: RepositoriesRegistryHandlerBackendService,
|
|
66
|
+
@inject(SAAS_SERVICE_TYPES.ConsumableTokenService) private readonly consumableTokenService: ConsumableTokenBackendService,
|
|
67
|
+
@inject(SAAS_SERVICE_TYPES.RedisService) private readonly redisService: RedisService,
|
|
68
|
+
@inject(SAAS_SERVICE_TYPES.Container) private readonly container: Container,
|
|
69
|
+
) {
|
|
70
|
+
this.logDebug = this.logger.debugByType('ExecutionContextCreator');
|
|
71
|
+
this.logger.setDebugTypeLogging('ExecutionContextCreator', false);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Anonymous session handling eventually calls back into the services registry,
|
|
76
|
+
* so we resolve it lazily to avoid a hard DI cycle during backend startup.
|
|
77
|
+
*/
|
|
78
|
+
private getAnonymousSessionService(): AnonymousSessionBackendService {
|
|
79
|
+
return this.container.get<AnonymousSessionBackendService>(SAAS_SERVICE_TYPES.AnonymousSessionService);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
private createInternalSystemRoles(): ExecutionContext_RoleInfo[] {
|
|
83
|
+
return [
|
|
84
|
+
{
|
|
85
|
+
roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],
|
|
86
|
+
relatedPrimaryScope: ResourcePrimaryScope.APPLICATION,
|
|
87
|
+
}
|
|
88
|
+
];
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
private async populateApplicationIdIfNeeded(executionContext: ExecutionContext<any>, forcePopulate: boolean = false) {
|
|
92
|
+
// Check if applicationId is already set
|
|
93
|
+
const applicationIdUndefinedOrNull =
|
|
94
|
+
executionContext.initiatorIds?.applicationId === undefined ||
|
|
95
|
+
executionContext.initiatorIds?.applicationId === null;
|
|
96
|
+
|
|
97
|
+
// Populate if needed
|
|
98
|
+
const needsPopulation = (
|
|
99
|
+
executionContext.operation.resourcePrimaryScope === ResourcePrimaryScope.APPLICATION &&
|
|
100
|
+
applicationIdUndefinedOrNull
|
|
101
|
+
) || forcePopulate;
|
|
102
|
+
|
|
103
|
+
if (!needsPopulation) {
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// initiatorIds should always exist (validated in ExecutionContext constructor)
|
|
108
|
+
if (!executionContext.initiatorIds) {
|
|
109
|
+
throw this.errorBuilder.buildError(
|
|
110
|
+
ErrorType.INTERNAL,
|
|
111
|
+
executionContext,
|
|
112
|
+
{
|
|
113
|
+
customMessageReference: ErrorCustomMessageReference.CONFIGURATION,
|
|
114
|
+
context: {
|
|
115
|
+
message: 'ExecutionContext.initiatorIds is null - this should not happen after validation. Check ExecutionContext construction.'
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
// Fetch APPLICATION record
|
|
122
|
+
const appRepository = this.repositoriesRegistry.getRepository(CoreResourceType.APPLICATION);
|
|
123
|
+
const currentApplication = await appRepository.read<Application>(executionContext, { }); // only one application for the whole applications
|
|
124
|
+
|
|
125
|
+
if (!currentApplication) {
|
|
126
|
+
throw this.errorBuilder.buildError(
|
|
127
|
+
ErrorType.INTERNAL,
|
|
128
|
+
executionContext,
|
|
129
|
+
{
|
|
130
|
+
customMessageReference: ErrorCustomMessageReference.CONFIGURATION,
|
|
131
|
+
context: {
|
|
132
|
+
message: 'No APPLICATION record found in database. The application must be seeded with an APPLICATION record during initialization.'
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
executionContext.initiatorIds.applicationId = currentApplication._id;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
private async getApplicationId(): Promise<string> {
|
|
142
|
+
const appReadOp = this.resourcesRegistryService.getOperationPathDefault(CoreResourceType.APPLICATION, CoreResourceOperation.READ);
|
|
143
|
+
const execCtx = await this.createForInternalOperation({
|
|
144
|
+
operation: appReadOp,
|
|
145
|
+
contextResourcesFieldIdentifier: new Map(),
|
|
146
|
+
initiatorIds: null, // Null for internal operations
|
|
147
|
+
initiatorRoles: [ { roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN], relatedPrimaryScope: ResourcePrimaryScope.APPLICATION } ],
|
|
148
|
+
});
|
|
149
|
+
|
|
150
|
+
const appRepository = this.repositoriesRegistry.getRepository(CoreResourceType.APPLICATION);
|
|
151
|
+
const currentApplication = await appRepository.read<Application>(execCtx, { });
|
|
152
|
+
|
|
153
|
+
if (!currentApplication) {
|
|
154
|
+
throw this.errorBuilder.buildError(
|
|
155
|
+
ErrorType.INTERNAL,
|
|
156
|
+
undefined,
|
|
157
|
+
{
|
|
158
|
+
customMessageReference: ErrorCustomMessageReference.CONFIGURATION,
|
|
159
|
+
context: {
|
|
160
|
+
message: 'No APPLICATION record found in database. The application must be seeded with an APPLICATION record during initialization.'
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
return currentApplication._id;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
public async createExecutionContext<TResourceConfigOperation extends ResourceConfiguration_Operation<any, any, any> >(
|
|
170
|
+
params: ExecutionContext_FactoryParams
|
|
171
|
+
): Promise<ExecutionContext<TResourceConfigOperation>> {
|
|
172
|
+
|
|
173
|
+
this.logDebug('Creating ExecutionContext', { executionType: params.executionType,operationIdentifier: params.operation.operationIdentifier,resourceIdentifier: params.operation.resourceIdentifier });
|
|
174
|
+
|
|
175
|
+
const operation = this.resourcesRegistryService.getOperationFromPath(params.operation) as TResourceConfigOperation;
|
|
176
|
+
|
|
177
|
+
await this.executionContextHandlerService.validateOperation(operation);
|
|
178
|
+
|
|
179
|
+
const executionContext = new ExecutionContext<TResourceConfigOperation>(
|
|
180
|
+
operation,
|
|
181
|
+
params.executionType,
|
|
182
|
+
params.contextResourcesFieldIdentifier,
|
|
183
|
+
params.initiatorIds ?? {}, // Use nullish coalescing - handles both null and undefined
|
|
184
|
+
params.initiatorRoles ?? [],
|
|
185
|
+
params.relationshipContexts ?? []
|
|
186
|
+
);
|
|
187
|
+
|
|
188
|
+
if(operation.resourcePrimaryScope === ResourcePrimaryScope.APPLICATION) {
|
|
189
|
+
await this.populateApplicationIdIfNeeded(executionContext);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
this.logDebug('ExecutionContext created successfully', { executionType: executionContext.executionType, contextResourcesCount: executionContext.getContextResourceIds().size, hasExecutionContext_InitiatorIds: !!executionContext.initiatorIds, initiatorRolesCount: executionContext.initiatorRoles.length });
|
|
193
|
+
|
|
194
|
+
return executionContext;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
public async createForInternalOperation<TResourceConfigOperation extends ResourceConfiguration_Operation<any, any, any> >(
|
|
199
|
+
params: Omit<ExecutionContext_FactoryParams, 'executionType'>
|
|
200
|
+
): Promise<ExecutionContext<TResourceConfigOperation>> {
|
|
201
|
+
|
|
202
|
+
return this.createExecutionContext({
|
|
203
|
+
...params,
|
|
204
|
+
executionType: ExecutionContext_ExecutionType.INTERNALLY_INITIATED_REQUEST,
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* Create an internal execution context for a custom batch definition.
|
|
210
|
+
*
|
|
211
|
+
* Custom batches are authored outside the resource-operation registry, so some
|
|
212
|
+
* of them point at semantic operation identifiers that do not exist as concrete
|
|
213
|
+
* `CRON_JOB` / `BATCH_JOB` registry variants. We still bootstrap through a real
|
|
214
|
+
* registered operation for validation and creator-side initialization, then
|
|
215
|
+
* correct the operation to the custom batch's synthetic identity.
|
|
216
|
+
*/
|
|
217
|
+
public async createForInternalCustomBatch(
|
|
218
|
+
params: {
|
|
219
|
+
batchOperationContext: {
|
|
220
|
+
resourceIdentifier: ResourceType;
|
|
221
|
+
operationIdentifier: string;
|
|
222
|
+
cronJobExpression?: string;
|
|
223
|
+
};
|
|
224
|
+
contextResourcesFieldIdentifier: Map<ResourceFieldIdentifier, string>;
|
|
225
|
+
relationshipContexts?: ExecutionContext_RelationshipContext[];
|
|
226
|
+
}
|
|
227
|
+
): Promise<ExecutionContext<any>> {
|
|
228
|
+
const { batchOperationContext, contextResourcesFieldIdentifier, relationshipContexts } = params;
|
|
229
|
+
const resourceConfig = this.resourcesRegistryService
|
|
230
|
+
.getResourcesRegistry()
|
|
231
|
+
.resourceConfigurations[batchOperationContext.resourceIdentifier];
|
|
232
|
+
|
|
233
|
+
if (!resourceConfig) {
|
|
234
|
+
throw this.errorBuilder.buildError(
|
|
235
|
+
ErrorType.INTERNAL,
|
|
236
|
+
undefined,
|
|
237
|
+
{
|
|
238
|
+
customMessageReference: ErrorCustomMessageReference.CONFIGURATION,
|
|
239
|
+
context: {
|
|
240
|
+
message: `Custom batch '${batchOperationContext.operationIdentifier}' targets unknown resource '${batchOperationContext.resourceIdentifier}'`,
|
|
241
|
+
resourceIdentifier: batchOperationContext.resourceIdentifier,
|
|
242
|
+
operationIdentifier: batchOperationContext.operationIdentifier,
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
);
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
const expectedVariantType = batchOperationContext.cronJobExpression
|
|
249
|
+
? ResourceOperationVariantType.CRON_JOB
|
|
250
|
+
: ResourceOperationVariantType.BATCH_JOB;
|
|
251
|
+
|
|
252
|
+
const exactVariantMatches = resourceConfig.operations.filter((operation) =>
|
|
253
|
+
operation.operationIdentifier === batchOperationContext.operationIdentifier
|
|
254
|
+
&& operation.variantType === expectedVariantType
|
|
255
|
+
);
|
|
256
|
+
|
|
257
|
+
if (exactVariantMatches.length > 1) {
|
|
258
|
+
throw this.errorBuilder.buildError(
|
|
259
|
+
ErrorType.INTERNAL,
|
|
260
|
+
undefined,
|
|
261
|
+
{
|
|
262
|
+
customMessageReference: ErrorCustomMessageReference.CONFIGURATION,
|
|
263
|
+
context: {
|
|
264
|
+
message: `Custom batch operation resolution is ambiguous for '${batchOperationContext.resourceIdentifier}.${batchOperationContext.operationIdentifier}'`,
|
|
265
|
+
resourceIdentifier: batchOperationContext.resourceIdentifier,
|
|
266
|
+
operationIdentifier: batchOperationContext.operationIdentifier,
|
|
267
|
+
expectedVariantType,
|
|
268
|
+
matchedCount: exactVariantMatches.length,
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
);
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
const bootstrapOperation = exactVariantMatches[0]
|
|
275
|
+
?? this.resolveBootstrapOperationForCustomBatch(resourceConfig, batchOperationContext.operationIdentifier);
|
|
276
|
+
|
|
277
|
+
const bootstrapContext = await this.createForInternalOperation({
|
|
278
|
+
operation: ResourcesConfig_OperationPathUtils.extractOperationPath(bootstrapOperation),
|
|
279
|
+
contextResourcesFieldIdentifier,
|
|
280
|
+
initiatorIds: null,
|
|
281
|
+
initiatorRoles: this.createInternalSystemRoles(),
|
|
282
|
+
relationshipContexts,
|
|
283
|
+
});
|
|
284
|
+
|
|
285
|
+
const syntheticBatchOperation: ResourceConfiguration_Operation<any, any, any> = expectedVariantType === ResourceOperationVariantType.CRON_JOB
|
|
286
|
+
? {
|
|
287
|
+
...bootstrapOperation,
|
|
288
|
+
operationIdentifier: batchOperationContext.operationIdentifier,
|
|
289
|
+
variantType: ResourceOperationVariantType.CRON_JOB,
|
|
290
|
+
cronExpression: batchOperationContext.cronJobExpression ?? '',
|
|
291
|
+
isOperationDefault: false,
|
|
292
|
+
roles: [],
|
|
293
|
+
} as ResourceConfiguration_Operation<any, any, any>
|
|
294
|
+
: {
|
|
295
|
+
...bootstrapOperation,
|
|
296
|
+
operationIdentifier: batchOperationContext.operationIdentifier,
|
|
297
|
+
variantType: ResourceOperationVariantType.BATCH_JOB,
|
|
298
|
+
isOperationDefault: false,
|
|
299
|
+
roles: [],
|
|
300
|
+
} as ResourceConfiguration_Operation<any, any, any>;
|
|
301
|
+
|
|
302
|
+
return bootstrapContext.withOperation(syntheticBatchOperation);
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
async createForPublicOperation<TResourceConfigOperation extends ResourceConfiguration_Operation<any, any, any>>(
|
|
307
|
+
params: Omit<ExecutionContext_FactoryParams, 'executionType'>
|
|
308
|
+
): Promise<ExecutionContext<TResourceConfigOperation>> {
|
|
309
|
+
|
|
310
|
+
return this.createExecutionContext({
|
|
311
|
+
...params,
|
|
312
|
+
executionType: ExecutionContext_ExecutionType.PUBLIC_EXECUTION,
|
|
313
|
+
});
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* Create internal execution context for system operations (no specific operation context needed).
|
|
320
|
+
* Convenience method for queue services, tracking, and other internal operations.
|
|
321
|
+
*
|
|
322
|
+
* Uses a generic "system" operation that grants full access within the application scope.
|
|
323
|
+
* This is used by queue services for internal DB operations that don't have a specific user context.
|
|
324
|
+
*/
|
|
325
|
+
public async createForInternalSystemOperation(): Promise<ExecutionContext<any>> {
|
|
326
|
+
// Use a generic internal operation for system-level access
|
|
327
|
+
const operationPath = this.resourcesRegistryService.getOperationPathDefault(
|
|
328
|
+
CoreResourceType.APPLICATION,
|
|
329
|
+
CoreResourceOperation.READ
|
|
330
|
+
);
|
|
331
|
+
const systemOperation = this.resourcesRegistryService.getOperationFromPath(operationPath);
|
|
332
|
+
|
|
333
|
+
return this.createForInternalOperation({
|
|
334
|
+
operation: systemOperation,
|
|
335
|
+
contextResourcesFieldIdentifier: new Map(),
|
|
336
|
+
initiatorIds: null, // Null for internal operations
|
|
337
|
+
initiatorRoles: this.createInternalSystemRoles(),
|
|
338
|
+
relationshipContexts: [],
|
|
339
|
+
});
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
private resolveBootstrapOperationForCustomBatch(
|
|
343
|
+
resourceConfig: AnyResourceConfiguration,
|
|
344
|
+
operationIdentifier: string,
|
|
345
|
+
): AnyResourceConfiguration['operations'][number] {
|
|
346
|
+
const sameIdentifierOperation = resourceConfig.operations.find(
|
|
347
|
+
(operation) => operation.operationIdentifier === operationIdentifier
|
|
348
|
+
);
|
|
349
|
+
|
|
350
|
+
if (sameIdentifierOperation) {
|
|
351
|
+
return sameIdentifierOperation;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
const defaultReadOperation = resourceConfig.operations.find(
|
|
355
|
+
(operation) => operation.operationIdentifier === CoreResourceOperation.READ && operation.isOperationDefault
|
|
356
|
+
);
|
|
357
|
+
|
|
358
|
+
if (defaultReadOperation) {
|
|
359
|
+
return defaultReadOperation;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
const firstDefaultOperation = resourceConfig.operations.find((operation) => operation.isOperationDefault);
|
|
363
|
+
if (firstDefaultOperation) {
|
|
364
|
+
return firstDefaultOperation;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
const fallbackOperation = resourceConfig.operations[0];
|
|
368
|
+
if (fallbackOperation) {
|
|
369
|
+
return fallbackOperation;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
throw this.errorBuilder.buildError(
|
|
373
|
+
ErrorType.INTERNAL,
|
|
374
|
+
undefined,
|
|
375
|
+
{
|
|
376
|
+
customMessageReference: ErrorCustomMessageReference.CONFIGURATION,
|
|
377
|
+
context: {
|
|
378
|
+
message: `Custom batch '${operationIdentifier}' cannot bootstrap an execution context because resource '${resourceConfig.resourceIdentifier}' exposes no operations`,
|
|
379
|
+
resourceIdentifier: resourceConfig.resourceIdentifier,
|
|
380
|
+
operationIdentifier,
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
);
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
/**
|
|
387
|
+
* Create an ExecutionContext for a webhook callback.
|
|
388
|
+
*
|
|
389
|
+
* Webhook events are not tied to a single resource operation — a single event
|
|
390
|
+
* (e.g., invoice.paid) may trigger multiple operations (update subscription, create invoice record, adjust credits).
|
|
391
|
+
* Uses APPLICATION.READ as a generic "entry" operation for the pipeline.
|
|
392
|
+
* Capability handlers create per-resource sub-contexts via createForSubCall() for specific operations.
|
|
393
|
+
*
|
|
394
|
+
* @param resolvedScope - Scope identifiers resolved from the webhook event payload
|
|
395
|
+
* @param parsedEvent - The parsed webhook event (for providerRef metadata)
|
|
396
|
+
*/
|
|
397
|
+
public async createForWebhookCallback(
|
|
398
|
+
resolvedScope: {
|
|
399
|
+
applicationId?: string;
|
|
400
|
+
organizationId?: string;
|
|
401
|
+
userId?: string;
|
|
402
|
+
providerScopeIds?: Record<string, string>;
|
|
403
|
+
},
|
|
404
|
+
parsedEvent: {
|
|
405
|
+
providerRef: string;
|
|
406
|
+
endpointKey: string;
|
|
407
|
+
eventId: string;
|
|
408
|
+
eventType: string;
|
|
409
|
+
}
|
|
410
|
+
): Promise<ExecutionContext<any>> {
|
|
411
|
+
// Use a generic APPLICATION.READ operation as the entry point
|
|
412
|
+
const operationPath = this.resourcesRegistryService.getOperationPathDefault(
|
|
413
|
+
CoreResourceType.APPLICATION,
|
|
414
|
+
CoreResourceOperation.READ,
|
|
415
|
+
);
|
|
416
|
+
const operation = this.resourcesRegistryService.getOperationFromPath(operationPath);
|
|
417
|
+
|
|
418
|
+
// Map all resolved scope fields to initiatorIds
|
|
419
|
+
const initiatorIds: ExecutionContext_InitiatorIds = {
|
|
420
|
+
applicationId: resolvedScope.applicationId,
|
|
421
|
+
organizationId: resolvedScope.organizationId,
|
|
422
|
+
userId: resolvedScope.userId,
|
|
423
|
+
webhookProviderId: parsedEvent.providerRef,
|
|
424
|
+
};
|
|
425
|
+
|
|
426
|
+
const executionContext = new ExecutionContext(
|
|
427
|
+
operation,
|
|
428
|
+
ExecutionContext_ExecutionType.WEBHOOK_CALLBACK,
|
|
429
|
+
new Map(),
|
|
430
|
+
initiatorIds,
|
|
431
|
+
[], // No roles — webhooks are trusted after signature verification
|
|
432
|
+
[]
|
|
433
|
+
);
|
|
434
|
+
|
|
435
|
+
await this.populateApplicationIdIfNeeded(executionContext);
|
|
436
|
+
|
|
437
|
+
return executionContext;
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
/**
|
|
441
|
+
* Reconstruct ExecutionContext from serialized data (for queue workers).
|
|
442
|
+
*
|
|
443
|
+
* This method:
|
|
444
|
+
* 1. Deserializes the operationPathJson to get the OperationPath
|
|
445
|
+
* 2. Gets the full Operation from the registry
|
|
446
|
+
* 3. Reconstructs ExecutionContext with the original execution type, initiator IDs, and roles
|
|
447
|
+
*
|
|
448
|
+
* @param executionContextJson - Serialized execution context data (optional for CUSTOM_BATCH/SCHEDULED_CRON)
|
|
449
|
+
* @param operationPathJson - Serialized operation path from JobPayload (optional for CUSTOM_BATCH)
|
|
450
|
+
* @returns Reconstructed ExecutionContext ready for execution
|
|
451
|
+
*/
|
|
452
|
+
public async reconstructFromSerializedData(
|
|
453
|
+
executionContextJson: string | undefined,
|
|
454
|
+
operationPathJson: string | undefined
|
|
455
|
+
): Promise<ExecutionContext<any>> {
|
|
456
|
+
// Import dynamically to avoid circular dependencies
|
|
457
|
+
const { ResourceSerializationUtils } = await import('@wildo-ai/saas-models');
|
|
458
|
+
|
|
459
|
+
// If no serialized data, return internal system context
|
|
460
|
+
if (!executionContextJson || !operationPathJson) {
|
|
461
|
+
throw this.errorBuilder.buildError(
|
|
462
|
+
ErrorType.INTERNAL,
|
|
463
|
+
undefined,
|
|
464
|
+
{
|
|
465
|
+
customMessageReference: ErrorCustomMessageReference.JOB_EXECUTION_CONTEXT_INVALID,
|
|
466
|
+
context: { message: 'Cannot reconstruct ExecutionContext from undefined serialized data' },
|
|
467
|
+
}
|
|
468
|
+
);
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
// Deserialize the data
|
|
472
|
+
const ctxData = ResourceSerializationUtils.deserializeExecutionContextData(executionContextJson);
|
|
473
|
+
const operationPath = ResourceSerializationUtils.deserializeOperationPath(operationPathJson);
|
|
474
|
+
|
|
475
|
+
// Get the full operation from registry
|
|
476
|
+
const operation = this.resourcesRegistryService.getOperationFromPath(operationPath);
|
|
477
|
+
|
|
478
|
+
// Convert contextResourcesFieldIdentifier from plain object to Map
|
|
479
|
+
// Note: The schema accepts Map<string, string> but the actual ExecutionContext uses Map<ResourceFieldIdentifier, string | string[]>
|
|
480
|
+
// We convert arrays to comma-separated strings for factory param compatibility
|
|
481
|
+
const contextResourcesMap = new Map<string, string>();
|
|
482
|
+
if (ctxData.contextResourcesFieldIdentifier) {
|
|
483
|
+
Object.entries(ctxData.contextResourcesFieldIdentifier).forEach(([key, value]) => {
|
|
484
|
+
// Convert arrays to first value (most common case) or comma-separated for compatibility
|
|
485
|
+
const stringValue = Array.isArray(value) ? value[0] ?? '' : value;
|
|
486
|
+
contextResourcesMap.set(key, stringValue);
|
|
487
|
+
});
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
// Convert relationshipContexts
|
|
491
|
+
const relationshipContexts = ctxData.relationshipContexts || [];
|
|
492
|
+
|
|
493
|
+
// Reconstruct ExecutionContext based on original execution type
|
|
494
|
+
if (ctxData.executionType === ExecutionContext_ExecutionType.INTERNALLY_INITIATED_REQUEST) {
|
|
495
|
+
return this.createForInternalOperation({
|
|
496
|
+
operation,
|
|
497
|
+
contextResourcesFieldIdentifier: contextResourcesMap,
|
|
498
|
+
initiatorIds: ctxData.initiatorIds,
|
|
499
|
+
initiatorRoles: ctxData.initiatorRoles,
|
|
500
|
+
relationshipContexts,
|
|
501
|
+
});
|
|
502
|
+
} else if (ctxData.executionType === ExecutionContext_ExecutionType.PUBLIC_EXECUTION) {
|
|
503
|
+
return this.createForPublicOperation({
|
|
504
|
+
operation,
|
|
505
|
+
contextResourcesFieldIdentifier: contextResourcesMap,
|
|
506
|
+
initiatorIds: ctxData.initiatorIds,
|
|
507
|
+
initiatorRoles: ctxData.initiatorRoles,
|
|
508
|
+
relationshipContexts,
|
|
509
|
+
});
|
|
510
|
+
} else if (ctxData.executionType === ExecutionContext_ExecutionType.ANONYMOUS_SESSION) {
|
|
511
|
+
// W7.3a: Reconstruct anonymous session context with anonymousUserId from serialized initiatorIds
|
|
512
|
+
return this.createExecutionContext({
|
|
513
|
+
executionType: ExecutionContext_ExecutionType.ANONYMOUS_SESSION,
|
|
514
|
+
operation,
|
|
515
|
+
contextResourcesFieldIdentifier: contextResourcesMap,
|
|
516
|
+
initiatorIds: ctxData.initiatorIds,
|
|
517
|
+
initiatorRoles: ctxData.initiatorRoles ?? [{ roles: [CORE_APP_ROLES.APP_ANONYMOUS], relatedPrimaryScope: ResourcePrimaryScope.APPLICATION }],
|
|
518
|
+
relationshipContexts,
|
|
519
|
+
});
|
|
520
|
+
} else if (ctxData.executionType === ExecutionContext_ExecutionType.WEBHOOK_CALLBACK) {
|
|
521
|
+
// Webhook callback — reconstruct with the resolved scope from initiatorIds
|
|
522
|
+
return this.createForWebhookCallback(
|
|
523
|
+
{
|
|
524
|
+
applicationId: ctxData.initiatorIds?.applicationId,
|
|
525
|
+
organizationId: ctxData.initiatorIds?.organizationId,
|
|
526
|
+
userId: ctxData.initiatorIds?.userId,
|
|
527
|
+
},
|
|
528
|
+
{
|
|
529
|
+
providerRef: ctxData.initiatorIds?.webhookProviderId ?? 'unknown',
|
|
530
|
+
endpointKey: 'reconstructed',
|
|
531
|
+
eventId: 'reconstructed',
|
|
532
|
+
eventType: 'reconstructed',
|
|
533
|
+
}
|
|
534
|
+
);
|
|
535
|
+
} else {
|
|
536
|
+
// USER_REQUEST, API_KEY, etc. - use createExecutionContext
|
|
537
|
+
return this.createExecutionContext({
|
|
538
|
+
executionType: ctxData.executionType as ExecutionContext_ExecutionType,
|
|
539
|
+
operation,
|
|
540
|
+
contextResourcesFieldIdentifier: contextResourcesMap,
|
|
541
|
+
initiatorIds: ctxData.initiatorIds,
|
|
542
|
+
initiatorRoles: ctxData.initiatorRoles,
|
|
543
|
+
relationshipContexts,
|
|
544
|
+
});
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
/**
|
|
549
|
+
* Create a new ExecutionContext for an internal sub-call.
|
|
550
|
+
* Inherits security context from parent but uses the correct operation for the sub-resource.
|
|
551
|
+
*
|
|
552
|
+
* @param parentContext - The parent execution context to inherit from
|
|
553
|
+
* @param resourceType - The resource type for the sub-call
|
|
554
|
+
* @param operationIdentifier - The operation (READ, LIST, etc.)
|
|
555
|
+
* @param options - ServiceOptions with variantKey, dataMode
|
|
556
|
+
* @param resourceId - Optional resource ID for single-resource operations (undefined for LIST)
|
|
557
|
+
* @param relationshipContext - Optional relationship context tracking how we got to this sub-resource.
|
|
558
|
+
* Should be provided when there's an FK relationship between parent and sub-resource.
|
|
559
|
+
* Example: { resourceType: 'USER_SELF', relationshipField: 'userId', resourceId: '...' }
|
|
560
|
+
*/
|
|
561
|
+
async createForSubCall(
|
|
562
|
+
parentContext: ExecutionContext<any>,
|
|
563
|
+
resourceType: ResourceType,
|
|
564
|
+
operationIdentifier: CoreResourceOperation,
|
|
565
|
+
options?: ServiceOptions,
|
|
566
|
+
resourceId?: string,
|
|
567
|
+
relationshipContext?: ExecutionContext_RelationshipContext
|
|
568
|
+
): Promise<ExecutionContext<any>> {
|
|
569
|
+
|
|
570
|
+
// 0. Validate parent context exists
|
|
571
|
+
if (!parentContext) {
|
|
572
|
+
throw this.errorBuilder.buildError(
|
|
573
|
+
ErrorType.INTERNAL,
|
|
574
|
+
undefined,
|
|
575
|
+
{
|
|
576
|
+
customMessageReference: ErrorCustomMessageReference.CONFIGURATION,
|
|
577
|
+
context: {
|
|
578
|
+
message: 'Parent context is required for sub-calls. Use createForInternalOperation for top-level internal operations.'
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
);
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
// 1. Cycle detection and depth check
|
|
585
|
+
const currentDepth = parentContext.getSubCallDepth();
|
|
586
|
+
const MAX_DEPTH = 15;
|
|
587
|
+
if (currentDepth >= MAX_DEPTH) {
|
|
588
|
+
throw this.errorBuilder.buildError(
|
|
589
|
+
ErrorType.INTERNAL,
|
|
590
|
+
parentContext,
|
|
591
|
+
{
|
|
592
|
+
customMessageReference: ErrorCustomMessageReference.CONFIGURATION,
|
|
593
|
+
context: {
|
|
594
|
+
message: `Max sub-call depth (${MAX_DEPTH}) exceeded. Possible circular dependency.`,
|
|
595
|
+
resourceType,
|
|
596
|
+
operationIdentifier,
|
|
597
|
+
currentDepth
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
);
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
// 2a. Instance-level cycle detection (UPDATE/DELETE — same resourceType:resourceId visited before)
|
|
604
|
+
if (resourceId) {
|
|
605
|
+
const visitKey = `${resourceType}:${resourceId}`;
|
|
606
|
+
if (parentContext.hasVisitedResource(visitKey)) {
|
|
607
|
+
throw this.errorBuilder.buildError(
|
|
608
|
+
ErrorType.INTERNAL,
|
|
609
|
+
parentContext,
|
|
610
|
+
{
|
|
611
|
+
customMessageReference: ErrorCustomMessageReference.CONFIGURATION,
|
|
612
|
+
context: {
|
|
613
|
+
message: `Circular dependency detected: ${visitKey} already visited in call chain.`,
|
|
614
|
+
visitKey,
|
|
615
|
+
resourceType,
|
|
616
|
+
operationIdentifier
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
);
|
|
620
|
+
}
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
// 2b. Type-level cycle detection for nested CREATE.
|
|
624
|
+
// CREATE has no resourceId, so the instance-level check above is skipped.
|
|
625
|
+
// Instead, detect schema-level cycles by checking if the child resource type
|
|
626
|
+
// already appears as a parent in the relationship context chain.
|
|
627
|
+
// Example: A→B→A cycle would have relationshipContexts=[{resourceType:A},{resourceType:B}]
|
|
628
|
+
// and we're about to create another A — the chain proves a cycle.
|
|
629
|
+
//
|
|
630
|
+
// Performance: O(n) where n = relationship chain depth, typically <5. Negligible.
|
|
631
|
+
if (operationIdentifier === CoreResourceOperation.CREATE && relationshipContext) {
|
|
632
|
+
const ancestorResourceTypes = parentContext.relationshipContexts.map(rc => rc.resourceType);
|
|
633
|
+
if (ancestorResourceTypes.includes(resourceType)) {
|
|
634
|
+
const chainDescription = [...ancestorResourceTypes, resourceType].join(' → ');
|
|
635
|
+
throw this.errorBuilder.buildError(
|
|
636
|
+
ErrorType.INTERNAL,
|
|
637
|
+
parentContext,
|
|
638
|
+
{
|
|
639
|
+
customMessageReference: ErrorCustomMessageReference.CONFIGURATION,
|
|
640
|
+
context: {
|
|
641
|
+
message: `Circular dependency in nested CREATE: resource type "${resourceType}" already appears as an ancestor in the relationship chain. Chain: ${chainDescription}`,
|
|
642
|
+
resourceType,
|
|
643
|
+
operationIdentifier,
|
|
644
|
+
chainDescription,
|
|
645
|
+
}
|
|
646
|
+
}
|
|
647
|
+
);
|
|
648
|
+
}
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
// 3. Get the correct operation path (with fallback to default if variant not found)
|
|
652
|
+
let operationPath: ResourceConfiguration_OperationPath<any, any>;
|
|
653
|
+
if (options?.variantKey) {
|
|
654
|
+
try {
|
|
655
|
+
operationPath = this.resourcesRegistryService.getOperationPath(resourceType, operationIdentifier, options.variantKey);
|
|
656
|
+
} catch {
|
|
657
|
+
// Fallback to default variant with warning log
|
|
658
|
+
this.logger.warn(`Variant '${options.variantKey}' not found for ${resourceType}.${operationIdentifier}, falling back to default`);
|
|
659
|
+
operationPath = this.resourcesRegistryService.getOperationPathDefault(resourceType, operationIdentifier);
|
|
660
|
+
}
|
|
661
|
+
} else {
|
|
662
|
+
operationPath = this.resourcesRegistryService.getOperationPathDefault(resourceType, operationIdentifier);
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
// 4. Get the operation configuration
|
|
666
|
+
const operation = this.resourcesRegistryService.getOperationFromPath(operationPath);
|
|
667
|
+
|
|
668
|
+
// 5. Build contextual FK fields: INHERIT from parent + add new
|
|
669
|
+
const contextResourcesFieldIdentifier = new Map<ResourceFieldIdentifier, string | string[]>(
|
|
670
|
+
parentContext.getContextResourceIds() as Map<ResourceFieldIdentifier, string | string[]>
|
|
671
|
+
);
|
|
672
|
+
if (resourceId) {
|
|
673
|
+
const allFieldIds = this.resourcesRegistryService.getAllResourceFieldIdentifiers();
|
|
674
|
+
const fieldIdentifier = allFieldIds[resourceType];
|
|
675
|
+
if (fieldIdentifier) {
|
|
676
|
+
contextResourcesFieldIdentifier.set(fieldIdentifier, resourceId);
|
|
677
|
+
}
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
// 6. Build relationship contexts: inherit from parent + add new relationship if provided
|
|
681
|
+
const relationshipContexts = [...parentContext.relationshipContexts];
|
|
682
|
+
if (relationshipContext) {
|
|
683
|
+
relationshipContexts.push(relationshipContext);
|
|
684
|
+
}
|
|
685
|
+
|
|
686
|
+
// 7. Build visited resources set: inherit from parent + add current
|
|
687
|
+
const visitedResources = new Set<string>(parentContext.getVisitedResources());
|
|
688
|
+
if (resourceId) {
|
|
689
|
+
visitedResources.add(`${resourceType}:${resourceId}`);
|
|
690
|
+
}
|
|
691
|
+
|
|
692
|
+
// 8. Create new context inheriting from parent
|
|
693
|
+
// Note: ExecutionType and requestUUID inherited (same request flow)
|
|
694
|
+
return new ExecutionContext(
|
|
695
|
+
operation,
|
|
696
|
+
parentContext.executionType, // Inherit - same origin
|
|
697
|
+
contextResourcesFieldIdentifier, // Inherit parent + add new
|
|
698
|
+
parentContext.initiatorIds, // Inherit (readonly, passed as reference)
|
|
699
|
+
[...parentContext.initiatorRoles], // Inherit (spread to new array)
|
|
700
|
+
relationshipContexts, // Inherit parent + add new relationship
|
|
701
|
+
parentContext.requestUUID, // INHERIT - same request trace
|
|
702
|
+
currentDepth + 1, // Increment depth for next level
|
|
703
|
+
visitedResources, // Track visited for cycle detection
|
|
704
|
+
parentContext.activeUserType, // Inherit - same user type context
|
|
705
|
+
);
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
public async createExecutionContextFromRequest<
|
|
709
|
+
TCustomOperationEnum extends EnumLikeType | undefined = undefined,
|
|
710
|
+
TCoreOperationEnum extends Partial<CoreResourceOperation> | undefined = undefined,
|
|
711
|
+
TMainSchema extends z.ZodTypeAny = z.ZodTypeAny
|
|
712
|
+
>(
|
|
713
|
+
req: Request,
|
|
714
|
+
operation: ResourceConfiguration_Operation<TCustomOperationEnum, TCoreOperationEnum, TMainSchema>,
|
|
715
|
+
initiatorInfo: ResourceConfiguration_Operation_UrlInitiatorInfo
|
|
716
|
+
): Promise<ExecutionContext<typeof operation>> {
|
|
717
|
+
|
|
718
|
+
this.logDebug('Creating execution context from request', { operation: operation.operationIdentifier, url: req.url, method: req.method });
|
|
719
|
+
|
|
720
|
+
// ── Token and authentication sources ──
|
|
721
|
+
const queryToken = req.query?.consumable_token as string | undefined;
|
|
722
|
+
const headerToken = req.headers[WildoHeaderKeys.CONSUMABLE_TOKEN] as string | undefined;
|
|
723
|
+
const tokenAuthConfig = 'tokenAuthentication' in operation ? operation.tokenAuthentication : undefined;
|
|
724
|
+
const policy = tokenAuthConfig?.policy;
|
|
725
|
+
|
|
726
|
+
// ── GATE 1: Query token present — route by policy ──
|
|
727
|
+
if (queryToken) {
|
|
728
|
+
if (!tokenAuthConfig) {
|
|
729
|
+
// Trap 6: operation doesn't accept token authentication
|
|
730
|
+
throw this.errorBuilder.buildError(ErrorType.AUTHENTICATION, undefined, {
|
|
731
|
+
customMessageReference: ErrorCustomMessageReference.CONSUMABLE_TOKEN_NOT_ACCEPTED_FOR_OPERATION,
|
|
732
|
+
context: { operationIdentifier: operation.operationIdentifier },
|
|
733
|
+
});
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
if (policy === TokenAuthenticationPolicy.ALTERNATIVE) {
|
|
737
|
+
this.logDebug('Consumable token provided, processing ALTERNATIVE token authentication');
|
|
738
|
+
|
|
739
|
+
const expectedTypes = tokenAuthConfig.types || [];
|
|
740
|
+
const consumableTokenObject = await this.consumableTokenService.validateToken(
|
|
741
|
+
queryToken,
|
|
742
|
+
expectedTypes.length > 0 ? expectedTypes : undefined,
|
|
743
|
+
);
|
|
744
|
+
|
|
745
|
+
// Build context from typed token fields (Trap 3: no untyped metadata bag)
|
|
746
|
+
const tokenContext: Record<string, string> = {};
|
|
747
|
+
if (consumableTokenObject.organizationId) {
|
|
748
|
+
tokenContext.organizationId = consumableTokenObject.organizationId;
|
|
749
|
+
}
|
|
750
|
+
if (consumableTokenObject.relatedId) {
|
|
751
|
+
const resourceFieldIdentifier = this.resolveResourceFieldIdentifier(operation);
|
|
752
|
+
if (resourceFieldIdentifier) {
|
|
753
|
+
tokenContext[resourceFieldIdentifier] = consumableTokenObject.relatedId;
|
|
754
|
+
}
|
|
755
|
+
}
|
|
756
|
+
if (consumableTokenObject.userId) {
|
|
757
|
+
tokenContext.userId = consumableTokenObject.userId;
|
|
758
|
+
}
|
|
759
|
+
|
|
760
|
+
const initiatorCriticalParamsValue = this.validateParameterCoherence(req, initiatorInfo, tokenContext);
|
|
761
|
+
const relationshipContexts = this.buildRelationshipContexts(initiatorInfo, initiatorCriticalParamsValue);
|
|
762
|
+
|
|
763
|
+
const initiatorIds = {
|
|
764
|
+
consumableTokenId: consumableTokenObject._id,
|
|
765
|
+
organizationId: consumableTokenObject.organizationId,
|
|
766
|
+
userId: consumableTokenObject.userId,
|
|
767
|
+
...this.extractInitiatorIds(initiatorCriticalParamsValue),
|
|
768
|
+
};
|
|
769
|
+
|
|
770
|
+
const executionContext = new ExecutionContext(
|
|
771
|
+
operation,
|
|
772
|
+
ExecutionContext_ExecutionType.CONSUMABLE_TOKEN,
|
|
773
|
+
new Map(Object.entries(initiatorCriticalParamsValue)),
|
|
774
|
+
initiatorIds,
|
|
775
|
+
consumableTokenObject.roles || [],
|
|
776
|
+
relationshipContexts
|
|
777
|
+
);
|
|
778
|
+
|
|
779
|
+
executionContext.setConsumableTokenValue(queryToken);
|
|
780
|
+
|
|
781
|
+
if (operation.resourcePrimaryScope === ResourcePrimaryScope.APPLICATION) {
|
|
782
|
+
await this.populateApplicationIdIfNeeded(executionContext);
|
|
783
|
+
}
|
|
784
|
+
|
|
785
|
+
return executionContext;
|
|
786
|
+
}
|
|
787
|
+
|
|
788
|
+
// ADDITIVE: query token is irrelevant — fall through to JWT/API-key auth
|
|
789
|
+
}
|
|
790
|
+
|
|
791
|
+
// ── GATE 2: JWT / API-key authentication ──
|
|
792
|
+
const authHeader = req.headers[WildoHeaderKeys.AUTHORIZATION] as string | undefined;
|
|
793
|
+
|
|
794
|
+
if (authHeader) {
|
|
795
|
+
let executionContext: ExecutionContext<typeof operation>;
|
|
796
|
+
|
|
797
|
+
if (authHeader.startsWith('sk_org_') || authHeader.startsWith('sk_app_')) {
|
|
798
|
+
executionContext = await this.handleApiKeyAuthentication(authHeader, req, operation, initiatorInfo);
|
|
799
|
+
} else {
|
|
800
|
+
const token = this.parseBearerToken(authHeader);
|
|
801
|
+
executionContext = await this.handleJwtAuthentication(token, req, operation, initiatorInfo);
|
|
802
|
+
|
|
803
|
+
const reAuthToken = req.headers[WildoHeaderKeys.REAUTH_TOKEN] as string | undefined;
|
|
804
|
+
if (reAuthToken) {
|
|
805
|
+
executionContext.setReAuthTokenValue(reAuthToken);
|
|
806
|
+
}
|
|
807
|
+
}
|
|
808
|
+
|
|
809
|
+
// ── GATE 3: ADDITIVE check (after JWT/API-key auth succeeded) ──
|
|
810
|
+
if (policy === TokenAuthenticationPolicy.ADDITIVE) {
|
|
811
|
+
if (!headerToken) {
|
|
812
|
+
throw this.errorBuilder.buildError(ErrorType.AUTHENTICATION, undefined, {
|
|
813
|
+
customMessageReference: ErrorCustomMessageReference.ADDITIVE_TOKEN_REQUIRED,
|
|
814
|
+
context: { operationIdentifier: operation.operationIdentifier },
|
|
815
|
+
});
|
|
816
|
+
}
|
|
817
|
+
const expectedTypes = tokenAuthConfig!.types || [];
|
|
818
|
+
const consumableTokenObject = await this.consumableTokenService.validateToken(
|
|
819
|
+
headerToken,
|
|
820
|
+
expectedTypes.length > 0 ? expectedTypes : undefined,
|
|
821
|
+
);
|
|
822
|
+
|
|
823
|
+
if (consumableTokenObject.userId && executionContext.initiatorIds?.userId
|
|
824
|
+
&& consumableTokenObject.userId !== executionContext.initiatorIds.userId) {
|
|
825
|
+
throw this.errorBuilder.buildError(ErrorType.AUTHENTICATION, undefined, {
|
|
826
|
+
customMessageReference: ErrorCustomMessageReference.CONSUMABLE_TOKEN_CONTEXT_MISMATCH,
|
|
827
|
+
context: { operationIdentifier: operation.operationIdentifier },
|
|
828
|
+
});
|
|
829
|
+
}
|
|
830
|
+
|
|
831
|
+
executionContext.setConsumableTokenValue(headerToken);
|
|
832
|
+
}
|
|
833
|
+
|
|
834
|
+
return executionContext;
|
|
835
|
+
}
|
|
836
|
+
|
|
837
|
+
// ADDITIVE operations require JWT/API-key — anonymous sessions cannot satisfy them
|
|
838
|
+
if (policy === TokenAuthenticationPolicy.ADDITIVE) {
|
|
839
|
+
throw this.errorBuilder.buildError(ErrorType.AUTHENTICATION, undefined, {
|
|
840
|
+
customMessageReference: ErrorCustomMessageReference.ADDITIVE_TOKEN_REQUIRED,
|
|
841
|
+
context: { operationIdentifier: operation.operationIdentifier },
|
|
842
|
+
});
|
|
843
|
+
}
|
|
844
|
+
|
|
845
|
+
// Step 3: x-anonymous-session header — existing anonymous session with signed JWT
|
|
846
|
+
const anonymousSessionToken = req.headers[WildoHeaderKeys.ANONYMOUS_SESSION] as string | undefined;
|
|
847
|
+
if (anonymousSessionToken) {
|
|
848
|
+
return this.handleAnonymousSessionAuthentication(anonymousSessionToken, req, operation, initiatorInfo);
|
|
849
|
+
}
|
|
850
|
+
|
|
851
|
+
// Step 4: x-anonymous-session-init header — new session initialization (raw UUID)
|
|
852
|
+
const anonymousSessionInitId = req.headers[WildoHeaderKeys.ANONYMOUS_SESSION_INIT] as string | undefined;
|
|
853
|
+
if (anonymousSessionInitId) {
|
|
854
|
+
return this.handleAnonymousSessionInit(anonymousSessionInitId, req, operation, initiatorInfo);
|
|
855
|
+
}
|
|
856
|
+
|
|
857
|
+
// Step 5: No authentication provided
|
|
858
|
+
throw this.errorBuilder.buildError( ErrorType.AUTHENTICATION, undefined,
|
|
859
|
+
{ customMessageReference: ErrorCustomMessageReference.AUTHENTICATION_NO_AUTHENTICATION_PROVIDED });
|
|
860
|
+
}
|
|
861
|
+
|
|
862
|
+
/**
|
|
863
|
+
* Create an ExecutionContext for manual controller requests (charts, billing, etc.).
|
|
864
|
+
*
|
|
865
|
+
* Manual controllers are NOT resource controllers — they don't have a
|
|
866
|
+
* ResourceConfiguration_Operation or URL initiatorInfo. This method provides a
|
|
867
|
+
* lightweight alternative to createExecutionContextFromRequest that:
|
|
868
|
+
*
|
|
869
|
+
* 1. Extracts the Authorization header (Bearer JWT or API key)
|
|
870
|
+
* 2. Verifies the token and fetches user from the database
|
|
871
|
+
* 3. Builds initiator roles from org memberships
|
|
872
|
+
* 4. Returns an ExecutionContext bound to APPLICATION.READ as a generic operation
|
|
873
|
+
*
|
|
874
|
+
* The returned context carries full identity (userId, roles, orgMemberships)
|
|
875
|
+
* which is sufficient for:
|
|
876
|
+
* - AggregationAuthorizationService (chart queries)
|
|
877
|
+
* - Role-based guards (billing endpoints)
|
|
878
|
+
* - Any service that needs initiatorIds / initiatorRoles
|
|
879
|
+
*
|
|
880
|
+
* @param req - Express Request object with Authorization header
|
|
881
|
+
* @returns ExecutionContext<any> with the caller's identity and roles
|
|
882
|
+
* @throws AUTHENTICATION error if no token, invalid token, or user not found/active
|
|
883
|
+
*/
|
|
884
|
+
public async createExecutionContextForManualController(req: Request): Promise<ExecutionContext<any>> {
|
|
885
|
+
this.logDebug('Creating execution context for manual controller', { url: req.url, method: req.method });
|
|
886
|
+
|
|
887
|
+
// 1. Extract authorization header
|
|
888
|
+
const authHeader = req.headers[WildoHeaderKeys.AUTHORIZATION] as string;
|
|
889
|
+
if (!authHeader) {
|
|
890
|
+
throw this.errorBuilder.buildError(
|
|
891
|
+
ErrorType.AUTHENTICATION,
|
|
892
|
+
undefined,
|
|
893
|
+
{ customMessageReference: ErrorCustomMessageReference.AUTHENTICATION_NO_AUTHENTICATION_PROVIDED },
|
|
894
|
+
);
|
|
895
|
+
}
|
|
896
|
+
|
|
897
|
+
// 2. Get a generic operation for the context (APPLICATION.READ — lightweight, application-scoped)
|
|
898
|
+
const operationPath = this.resourcesRegistryService.getOperationPathDefault(
|
|
899
|
+
CoreResourceType.APPLICATION,
|
|
900
|
+
CoreResourceOperation.READ,
|
|
901
|
+
);
|
|
902
|
+
const operation = this.resourcesRegistryService.getOperationFromPath(operationPath);
|
|
903
|
+
const tempContext = this._getTempExecutionContext(operation);
|
|
904
|
+
|
|
905
|
+
// 3. Handle API key authentication
|
|
906
|
+
if (authHeader.startsWith('sk_org_') || authHeader.startsWith('sk_app_')) {
|
|
907
|
+
// API keys for manual controllers: only app-level keys make sense
|
|
908
|
+
// (org keys require ORGANIZATIONS-scoped operations which we don't have here)
|
|
909
|
+
if (authHeader.startsWith('sk_org_')) {
|
|
910
|
+
throw this.errorBuilder.buildError(
|
|
911
|
+
ErrorType.AUTHENTICATION,
|
|
912
|
+
undefined,
|
|
913
|
+
{
|
|
914
|
+
customMessageReference: ErrorCustomMessageReference.API_ORG_KEY_WRONG_RESOURCE,
|
|
915
|
+
context: { message: 'Organization API keys are not supported for manual controller endpoints.' },
|
|
916
|
+
},
|
|
917
|
+
);
|
|
918
|
+
}
|
|
919
|
+
// App-level API key — validate and build context
|
|
920
|
+
const appApiKeyRepository = this.repositoriesRegistry.getRepository(CoreResourceType.APPLICATION_API_KEYS);
|
|
921
|
+
const appApiKey = await appApiKeyRepository.read<ApiKeyApplication>(tempContext, { keyValue: authHeader });
|
|
922
|
+
|
|
923
|
+
if (!appApiKey || appApiKey.status !== ApiKeyStatus.ACTIVE) {
|
|
924
|
+
throw this.errorBuilder.buildError(
|
|
925
|
+
ErrorType.AUTHENTICATION,
|
|
926
|
+
undefined,
|
|
927
|
+
{ customMessageReference: ErrorCustomMessageReference.AUTHENTICATION_API_KEY_INVALID, context: { scope: 'application' } },
|
|
928
|
+
);
|
|
929
|
+
}
|
|
930
|
+
|
|
931
|
+
const executionContext = new ExecutionContext(
|
|
932
|
+
operation,
|
|
933
|
+
ExecutionContext_ExecutionType.APP_API_KEY,
|
|
934
|
+
new Map(),
|
|
935
|
+
{ applicationApiKeyId: appApiKey._id },
|
|
936
|
+
[{ roles: appApiKey.roles || [], relatedPrimaryScope: ResourcePrimaryScope.APPLICATION, relatedResourceId: appApiKey.applicationId }],
|
|
937
|
+
[],
|
|
938
|
+
);
|
|
939
|
+
await this.populateApplicationIdIfNeeded(executionContext, true);
|
|
940
|
+
return executionContext;
|
|
941
|
+
}
|
|
942
|
+
|
|
943
|
+
// 4. Handle JWT Bearer token
|
|
944
|
+
const token = this.parseBearerToken(authHeader);
|
|
945
|
+
|
|
946
|
+
try {
|
|
947
|
+
const rawDecodedToken = await this.jwtService.verify(token);
|
|
948
|
+
const decodedToken = JwtClaim_App_Auth_Schema.parse(rawDecodedToken);
|
|
949
|
+
// Capture type before narrowing — after exhaustive if-chains, decodedToken becomes `never`
|
|
950
|
+
// but tokenType retains its original union type for the fallback error path.
|
|
951
|
+
const tokenType = decodedToken.type;
|
|
952
|
+
|
|
953
|
+
if (tokenType === ExecutionContext_ExecutionType.USER_REQUEST) {
|
|
954
|
+
const userJwtToken = decodedToken as JwtClaim_App_Auth_UserRequest;
|
|
955
|
+
const iat = userJwtToken.iat as number | undefined;
|
|
956
|
+
if (iat) {
|
|
957
|
+
const invalidBefore = await this.redisService.get<number>(`${AUTH_REDIS_KEYS.TOKEN_INVALID_BEFORE}${userJwtToken.userId}`);
|
|
958
|
+
if (invalidBefore && iat < invalidBefore) {
|
|
959
|
+
throw this.errorBuilder.buildError(ErrorType.AUTHENTICATION, undefined, {
|
|
960
|
+
customMessageReference: ErrorCustomMessageReference.AUTHENTICATION_JWT_TOKEN_FAILED,
|
|
961
|
+
context: { reason: 'token_invalidated' },
|
|
962
|
+
});
|
|
963
|
+
}
|
|
964
|
+
}
|
|
965
|
+
const { initiatorRoles } = await this._fetchUserAndBuildRoles(userJwtToken.userId, tempContext);
|
|
966
|
+
const organizationId = this.resolveManualControllerOrganizationId(req, initiatorRoles);
|
|
967
|
+
|
|
968
|
+
const executionContext = new ExecutionContext(
|
|
969
|
+
operation,
|
|
970
|
+
ExecutionContext_ExecutionType.USER_REQUEST,
|
|
971
|
+
new Map(),
|
|
972
|
+
{
|
|
973
|
+
userId: userJwtToken.userId,
|
|
974
|
+
...(organizationId ? { organizationId } : {}),
|
|
975
|
+
},
|
|
976
|
+
initiatorRoles,
|
|
977
|
+
[],
|
|
978
|
+
undefined, // requestUUID
|
|
979
|
+
0, // subCallDepth
|
|
980
|
+
undefined, // visitedResources
|
|
981
|
+
userJwtToken.activeUserType ?? null,
|
|
982
|
+
);
|
|
983
|
+
await this.populateApplicationIdIfNeeded(executionContext);
|
|
984
|
+
return executionContext;
|
|
985
|
+
}
|
|
986
|
+
|
|
987
|
+
throw this.errorBuilder.buildError(
|
|
988
|
+
ErrorType.AUTHENTICATION,
|
|
989
|
+
undefined,
|
|
990
|
+
{ customMessageReference: ErrorCustomMessageReference.AUTHENTICATION_INVALID_TOKEN, context: { tokenType } },
|
|
991
|
+
);
|
|
992
|
+
} catch (error) {
|
|
993
|
+
if (isWildoBackendError(error)) {
|
|
994
|
+
throw error; // Re-throw engine errors
|
|
995
|
+
}
|
|
996
|
+
throw this.errorBuilder.buildError(
|
|
997
|
+
ErrorType.AUTHENTICATION,
|
|
998
|
+
undefined,
|
|
999
|
+
{ customMessageReference: ErrorCustomMessageReference.AUTHENTICATION_JWT_TOKEN_FAILED, context: { originalError: error instanceof Error ? error.message : 'Unknown error' } },
|
|
1000
|
+
);
|
|
1001
|
+
}
|
|
1002
|
+
}
|
|
1003
|
+
|
|
1004
|
+
/**
|
|
1005
|
+
* Manual endpoints like chart execution are not mounted on resource URLs, so
|
|
1006
|
+
* they do not get organization scope from initiatorInfo / URL-param validation.
|
|
1007
|
+
*
|
|
1008
|
+
* Resolution policy:
|
|
1009
|
+
* - If the request explicitly provides `organizationId`, validate it against
|
|
1010
|
+
* the caller's active organization memberships and use it.
|
|
1011
|
+
* - Otherwise, if the caller belongs to exactly one active organization,
|
|
1012
|
+
* infer that org to preserve the common single-tenant case.
|
|
1013
|
+
* - Otherwise, leave the org undefined and let downstream org-scoped
|
|
1014
|
+
* authorization fail closed instead of widening scope silently.
|
|
1015
|
+
*/
|
|
1016
|
+
private resolveManualControllerOrganizationId(
|
|
1017
|
+
req: Request,
|
|
1018
|
+
initiatorRoles: ExecutionContext_RoleInfo[],
|
|
1019
|
+
): string | undefined {
|
|
1020
|
+
const requestedOrganizationIds = [
|
|
1021
|
+
...new Set(this.getQueryParameterValues(req.query as Record<string, any>, 'organizationId').filter(Boolean)),
|
|
1022
|
+
];
|
|
1023
|
+
|
|
1024
|
+
if (requestedOrganizationIds.length > 1) {
|
|
1025
|
+
throw this.errorBuilder.buildError(
|
|
1026
|
+
ErrorType.VALIDATION,
|
|
1027
|
+
undefined,
|
|
1028
|
+
{
|
|
1029
|
+
customMessageReference: ErrorCustomMessageReference.API_CALL_INITIATOR_PARAMETER_INCONSISTENT,
|
|
1030
|
+
context: {
|
|
1031
|
+
fieldIdentifier: 'organizationId',
|
|
1032
|
+
values: requestedOrganizationIds,
|
|
1033
|
+
sources: {
|
|
1034
|
+
urlValues: ['undefined'],
|
|
1035
|
+
queryValues: requestedOrganizationIds,
|
|
1036
|
+
bodyValues: ['undefined'],
|
|
1037
|
+
tokenValues: ['undefined'],
|
|
1038
|
+
},
|
|
1039
|
+
},
|
|
1040
|
+
},
|
|
1041
|
+
);
|
|
1042
|
+
}
|
|
1043
|
+
|
|
1044
|
+
const membershipOrganizationIds = [
|
|
1045
|
+
...new Set(
|
|
1046
|
+
initiatorRoles
|
|
1047
|
+
.filter((roleInfo) => roleInfo.relatedPrimaryScope === ResourcePrimaryScope.ORGANIZATIONS && !!roleInfo.relatedResourceId)
|
|
1048
|
+
.map((roleInfo) => roleInfo.relatedResourceId as string),
|
|
1049
|
+
),
|
|
1050
|
+
];
|
|
1051
|
+
|
|
1052
|
+
const requestedOrganizationId = requestedOrganizationIds[0];
|
|
1053
|
+
if (requestedOrganizationId) {
|
|
1054
|
+
if (!membershipOrganizationIds.includes(requestedOrganizationId)) {
|
|
1055
|
+
throw this.errorBuilder.buildError(
|
|
1056
|
+
ErrorType.AUTHORIZATION,
|
|
1057
|
+
undefined,
|
|
1058
|
+
{
|
|
1059
|
+
customMessageReference: ErrorCustomMessageReference.AUTHORIZATION,
|
|
1060
|
+
context: {
|
|
1061
|
+
message: 'Manual controller organization scope is not allowed for the authenticated user.',
|
|
1062
|
+
organizationId: requestedOrganizationId,
|
|
1063
|
+
},
|
|
1064
|
+
},
|
|
1065
|
+
);
|
|
1066
|
+
}
|
|
1067
|
+
return requestedOrganizationId;
|
|
1068
|
+
}
|
|
1069
|
+
|
|
1070
|
+
return membershipOrganizationIds.length === 1 ? membershipOrganizationIds[0] : undefined;
|
|
1071
|
+
}
|
|
1072
|
+
|
|
1073
|
+
private _getTempExecutionContext<
|
|
1074
|
+
TCustomOperationEnum extends EnumLikeType | undefined = undefined,
|
|
1075
|
+
TCoreOperationEnum extends Partial<CoreResourceOperation> | undefined = undefined,
|
|
1076
|
+
TMainSchema extends z.ZodTypeAny = z.ZodTypeAny
|
|
1077
|
+
>(
|
|
1078
|
+
operation: ResourceConfiguration_Operation<TCustomOperationEnum, TCoreOperationEnum, TMainSchema>
|
|
1079
|
+
){
|
|
1080
|
+
return new ExecutionContext( operation, ExecutionContext_ExecutionType.INTERNALLY_INITIATED_REQUEST, new Map(), null, [], []);
|
|
1081
|
+
}
|
|
1082
|
+
|
|
1083
|
+
/**
|
|
1084
|
+
* Build relationship contexts from initiator info parameters and extracted values.
|
|
1085
|
+
*
|
|
1086
|
+
* This extracts FK relationship information from URL parameters to enable:
|
|
1087
|
+
* 1. Authorization checks that understand which FK path was used (e.g., assignedToUserId vs createdByUserId)
|
|
1088
|
+
* 2. Repository filtering based on the FK relationship
|
|
1089
|
+
*
|
|
1090
|
+
* @param initiatorInfo The URL initiator info containing parameter definitions
|
|
1091
|
+
* @param extractedValues The extracted parameter values from the request
|
|
1092
|
+
* @returns Array of relationship contexts for the ExecutionContext
|
|
1093
|
+
*/
|
|
1094
|
+
private buildRelationshipContexts(
|
|
1095
|
+
initiatorInfo: ResourceConfiguration_Operation_UrlInitiatorInfo,
|
|
1096
|
+
extractedValues: Record<string, string>
|
|
1097
|
+
): ExecutionContext_RelationshipContext[] {
|
|
1098
|
+
const relationshipContexts: ExecutionContext_RelationshipContext[] = [];
|
|
1099
|
+
|
|
1100
|
+
if (!initiatorInfo.parameters) {
|
|
1101
|
+
return relationshipContexts;
|
|
1102
|
+
}
|
|
1103
|
+
|
|
1104
|
+
for (const param of initiatorInfo.parameters) {
|
|
1105
|
+
const value = extractedValues[param.fieldIdentifier];
|
|
1106
|
+
if (value) {
|
|
1107
|
+
relationshipContexts.push({
|
|
1108
|
+
resourceType: param.resourceType,
|
|
1109
|
+
relationshipField: param.relationshipField,
|
|
1110
|
+
resourceId: value,
|
|
1111
|
+
});
|
|
1112
|
+
}
|
|
1113
|
+
}
|
|
1114
|
+
|
|
1115
|
+
return relationshipContexts;
|
|
1116
|
+
}
|
|
1117
|
+
|
|
1118
|
+
/**
|
|
1119
|
+
* Extract all potential values from URL parameters (req.params)
|
|
1120
|
+
* According to Express.js specification, URL params are always flat key-value pairs
|
|
1121
|
+
* automatically URL-decoded from route parameters like /users/:userId
|
|
1122
|
+
*
|
|
1123
|
+
* Examples:
|
|
1124
|
+
* - Route: /users/:userId → req.params = { userId: '123' }
|
|
1125
|
+
* - Route: /users/:userId/posts/:postId → req.params = { userId: '123', postId: '456' }
|
|
1126
|
+
*/
|
|
1127
|
+
private getUrlParameterValues(params: Record<string, string | undefined>, fieldIdentifier: string): string[] {
|
|
1128
|
+
const values: string[] = [];
|
|
1129
|
+
|
|
1130
|
+
// Direct access to field (URL params are always flat, no nesting)
|
|
1131
|
+
const directValue = params[fieldIdentifier];
|
|
1132
|
+
if (this.isValidParameterValue(directValue)) {
|
|
1133
|
+
values.push(this.safeStringify(directValue));
|
|
1134
|
+
}
|
|
1135
|
+
|
|
1136
|
+
return values;
|
|
1137
|
+
}
|
|
1138
|
+
|
|
1139
|
+
/**
|
|
1140
|
+
* Extract all potential values from query parameters (req.query)
|
|
1141
|
+
* Handles Express.js query serialization via the `qs` library:
|
|
1142
|
+
*
|
|
1143
|
+
* Examples of how Express/qs parses query strings:
|
|
1144
|
+
* - ?name=John → { name: 'John' }
|
|
1145
|
+
* - ?tags=red&tags=blue → { tags: ['red', 'blue'] } (repeated keys = array)
|
|
1146
|
+
* - ?tags=red,blue → { tags: 'red,blue' } (comma-separated = single string)
|
|
1147
|
+
* - ?user[name]=John&user[age]=25 → { user: { name: 'John', age: '25' } }
|
|
1148
|
+
* - ?user[tags]=red&user[tags]=blue → { user: { tags: ['red', 'blue'] } }
|
|
1149
|
+
* - ?items[0]=apple&items[1]=banana → { items: ['apple', 'banana'] }
|
|
1150
|
+
*/
|
|
1151
|
+
private getQueryParameterValues(query: Record<string, any>, fieldIdentifier: string): string[] {
|
|
1152
|
+
const values: string[] = [];
|
|
1153
|
+
|
|
1154
|
+
// Direct access to field
|
|
1155
|
+
const directValue = query[fieldIdentifier];
|
|
1156
|
+
if (this.isValidParameterValue(directValue)) {
|
|
1157
|
+
if (Array.isArray(directValue)) {
|
|
1158
|
+
// Handle arrays created by qs from repeated query params (?key=val1&key=val2)
|
|
1159
|
+
values.push(...directValue.map(v => this.safeStringify(v)).filter(v => v));
|
|
1160
|
+
} else {
|
|
1161
|
+
// Handle single values (including comma-separated strings)
|
|
1162
|
+
values.push(this.safeStringify(directValue));
|
|
1163
|
+
}
|
|
1164
|
+
}
|
|
1165
|
+
|
|
1166
|
+
// Nested object access (e.g., user.id -> query.user?.id)
|
|
1167
|
+
if (fieldIdentifier.includes('.')) {
|
|
1168
|
+
const nestedValue = this.getNestedValue(query, fieldIdentifier);
|
|
1169
|
+
if (this.isValidParameterValue(nestedValue)) {
|
|
1170
|
+
if (Array.isArray(nestedValue)) {
|
|
1171
|
+
// Handle nested arrays like user[tags]=red&user[tags]=blue
|
|
1172
|
+
values.push(...nestedValue.map(v => this.safeStringify(v)).filter(v => v));
|
|
1173
|
+
} else {
|
|
1174
|
+
values.push(this.safeStringify(nestedValue));
|
|
1175
|
+
}
|
|
1176
|
+
}
|
|
1177
|
+
}
|
|
1178
|
+
|
|
1179
|
+
return values;
|
|
1180
|
+
}
|
|
1181
|
+
|
|
1182
|
+
/**
|
|
1183
|
+
* Extract all potential values from body parameters (req.body)
|
|
1184
|
+
* Handles deep object access and arrays according to body parser specifications
|
|
1185
|
+
*
|
|
1186
|
+
* Examples based on body parser type:
|
|
1187
|
+
* - JSON: { "user": { "id": "123", "tags": ["red", "blue"] } }
|
|
1188
|
+
* - URL-encoded: user[id]=123&user[tags]=red&user[tags]=blue (parsed to nested object)
|
|
1189
|
+
* - Form-data: Can include files and nested structures
|
|
1190
|
+
*/
|
|
1191
|
+
private getBodyParameterValues(body: any, fieldIdentifier: string): string[] {
|
|
1192
|
+
const values: string[] = [];
|
|
1193
|
+
|
|
1194
|
+
if (!body || typeof body !== 'object') {
|
|
1195
|
+
return values;
|
|
1196
|
+
}
|
|
1197
|
+
|
|
1198
|
+
// Direct access to field
|
|
1199
|
+
const directValue = body[fieldIdentifier];
|
|
1200
|
+
if (this.isValidParameterValue(directValue)) {
|
|
1201
|
+
if (Array.isArray(directValue)) {
|
|
1202
|
+
values.push(...directValue.map(v => this.safeStringify(v)).filter(v => v));
|
|
1203
|
+
} else {
|
|
1204
|
+
values.push(this.safeStringify(directValue));
|
|
1205
|
+
}
|
|
1206
|
+
}
|
|
1207
|
+
|
|
1208
|
+
// Nested object access (e.g., user.id -> body.user?.id)
|
|
1209
|
+
if (fieldIdentifier.includes('.')) {
|
|
1210
|
+
const nestedValue = this.getNestedValue(body, fieldIdentifier);
|
|
1211
|
+
if (this.isValidParameterValue(nestedValue)) {
|
|
1212
|
+
if (Array.isArray(nestedValue)) {
|
|
1213
|
+
values.push(...nestedValue.map(v => this.safeStringify(v)).filter(v => v));
|
|
1214
|
+
} else {
|
|
1215
|
+
values.push(this.safeStringify(nestedValue));
|
|
1216
|
+
}
|
|
1217
|
+
}
|
|
1218
|
+
}
|
|
1219
|
+
|
|
1220
|
+
return values;
|
|
1221
|
+
}
|
|
1222
|
+
|
|
1223
|
+
/**
|
|
1224
|
+
* Extract all potential values from token context
|
|
1225
|
+
* Handles deep object access if token context contains nested objects
|
|
1226
|
+
*
|
|
1227
|
+
* Token context is application-specific and can contain any structure
|
|
1228
|
+
* depending on how the token was parsed and what data it contains.
|
|
1229
|
+
*
|
|
1230
|
+
* Examples:
|
|
1231
|
+
* - JWT claims: { "userId": "123", "organizationId": "org456" }
|
|
1232
|
+
* - Consumable token data: { "permissions": ["read", "write"], "scope": "user.profile" }
|
|
1233
|
+
*/
|
|
1234
|
+
private getTokenParameterValues(tokenContext: Record<string, any>, fieldIdentifier: string): string[] {
|
|
1235
|
+
const values: string[] = [];
|
|
1236
|
+
|
|
1237
|
+
if (!tokenContext || typeof tokenContext !== 'object') {
|
|
1238
|
+
return values;
|
|
1239
|
+
}
|
|
1240
|
+
|
|
1241
|
+
// Direct access to field
|
|
1242
|
+
const directValue = tokenContext[fieldIdentifier];
|
|
1243
|
+
if (this.isValidParameterValue(directValue)) {
|
|
1244
|
+
if (Array.isArray(directValue)) {
|
|
1245
|
+
values.push(...directValue.map(v => this.safeStringify(v)).filter(v => v));
|
|
1246
|
+
} else {
|
|
1247
|
+
values.push(this.safeStringify(directValue));
|
|
1248
|
+
}
|
|
1249
|
+
}
|
|
1250
|
+
|
|
1251
|
+
// Nested object access (e.g., user.id -> tokenContext.user?.id)
|
|
1252
|
+
if (fieldIdentifier.includes('.')) {
|
|
1253
|
+
const nestedValue = this.getNestedValue(tokenContext, fieldIdentifier);
|
|
1254
|
+
if (this.isValidParameterValue(nestedValue)) {
|
|
1255
|
+
if (Array.isArray(nestedValue)) {
|
|
1256
|
+
values.push(...nestedValue.map(v => this.safeStringify(v)).filter(v => v));
|
|
1257
|
+
} else {
|
|
1258
|
+
values.push(this.safeStringify(nestedValue));
|
|
1259
|
+
}
|
|
1260
|
+
}
|
|
1261
|
+
}
|
|
1262
|
+
|
|
1263
|
+
return values;
|
|
1264
|
+
}
|
|
1265
|
+
|
|
1266
|
+
/**
|
|
1267
|
+
* Get nested value from object using dot notation (e.g., 'user.profile.name')
|
|
1268
|
+
*/
|
|
1269
|
+
private getNestedValue(obj: any, path: string): any {
|
|
1270
|
+
if (!obj || typeof obj !== 'object') {
|
|
1271
|
+
return undefined;
|
|
1272
|
+
}
|
|
1273
|
+
|
|
1274
|
+
const keys = path.split('.');
|
|
1275
|
+
let current = obj;
|
|
1276
|
+
|
|
1277
|
+
for (const key of keys) {
|
|
1278
|
+
if (current === null || current === undefined || typeof current !== 'object') {
|
|
1279
|
+
return undefined;
|
|
1280
|
+
}
|
|
1281
|
+
current = current[key];
|
|
1282
|
+
}
|
|
1283
|
+
|
|
1284
|
+
return current;
|
|
1285
|
+
}
|
|
1286
|
+
|
|
1287
|
+
/**
|
|
1288
|
+
* Check if a parameter value is valid (not null, undefined, or empty string)
|
|
1289
|
+
* According to Express.js specification, these values should be ignored
|
|
1290
|
+
*/
|
|
1291
|
+
private isValidParameterValue(value: any): boolean {
|
|
1292
|
+
return value !== undefined && value !== null && value !== '';
|
|
1293
|
+
}
|
|
1294
|
+
|
|
1295
|
+
/**
|
|
1296
|
+
* Safely convert a value to string, handling edge cases
|
|
1297
|
+
* According to Express.js specification, all parameter values are strings or arrays of strings
|
|
1298
|
+
*/
|
|
1299
|
+
private safeStringify(value: any): string {
|
|
1300
|
+
if (value === null || value === undefined) {
|
|
1301
|
+
return '';
|
|
1302
|
+
}
|
|
1303
|
+
if (typeof value === 'string') {
|
|
1304
|
+
return value;
|
|
1305
|
+
}
|
|
1306
|
+
if (typeof value === 'number' || typeof value === 'boolean') {
|
|
1307
|
+
return String(value);
|
|
1308
|
+
}
|
|
1309
|
+
// For objects, convert to string (though this should be rare in Express params)
|
|
1310
|
+
return String(value);
|
|
1311
|
+
}
|
|
1312
|
+
|
|
1313
|
+
private validateParameterCoherence(
|
|
1314
|
+
req: Request,
|
|
1315
|
+
initiatorInfo: ResourceConfiguration_Operation_UrlInitiatorInfo,
|
|
1316
|
+
tokenContext: Record<string, string>
|
|
1317
|
+
): Record<string, string> {
|
|
1318
|
+
|
|
1319
|
+
this.logDebug('Validating parameter coherence', { parameters: initiatorInfo.parameters?.map(p => p.fieldIdentifier) || [] });
|
|
1320
|
+
|
|
1321
|
+
const initiatorCriticalParamsValue: Record<string, string> = {};
|
|
1322
|
+
|
|
1323
|
+
if (!initiatorInfo.parameters || initiatorInfo.parameters.length === 0) {
|
|
1324
|
+
return initiatorCriticalParamsValue;
|
|
1325
|
+
}
|
|
1326
|
+
|
|
1327
|
+
for (const paramInfo of initiatorInfo.parameters) {
|
|
1328
|
+
const fieldIdentifier = paramInfo.fieldIdentifier;
|
|
1329
|
+
|
|
1330
|
+
// Extract ALL potential values from each source as arrays
|
|
1331
|
+
const urlValues = this.getUrlParameterValues(req.params as Record<string, string | undefined>, fieldIdentifier);
|
|
1332
|
+
const queryValues = this.getQueryParameterValues(req.query, fieldIdentifier);
|
|
1333
|
+
const bodyValues = this.getBodyParameterValues(req.body, fieldIdentifier);
|
|
1334
|
+
const tokenValues = this.getTokenParameterValues(tokenContext, fieldIdentifier);
|
|
1335
|
+
|
|
1336
|
+
const sources = {
|
|
1337
|
+
urlValues: urlValues.length ? urlValues : ['undefined'],
|
|
1338
|
+
queryValues: queryValues.length ? queryValues : ['undefined'],
|
|
1339
|
+
bodyValues: bodyValues.length ? bodyValues : ['undefined'],
|
|
1340
|
+
tokenValues: tokenValues.length ? tokenValues : ['undefined']
|
|
1341
|
+
};
|
|
1342
|
+
|
|
1343
|
+
// Combine all non-empty values from all sources
|
|
1344
|
+
const allValues = [...urlValues, ...queryValues, ...bodyValues, ...tokenValues]
|
|
1345
|
+
.filter(v => v !== null && v !== undefined && v !== '');
|
|
1346
|
+
|
|
1347
|
+
// check if all mandatory parameters are present
|
|
1348
|
+
if (allValues.length === 0) {
|
|
1349
|
+
throw this.errorBuilder.buildError( ErrorType.VALIDATION, undefined,
|
|
1350
|
+
{ customMessageReference: ErrorCustomMessageReference.API_CALL_INITIATOR_PARAMETER_MISSING,
|
|
1351
|
+
context: { fieldIdentifier, sources } } );
|
|
1352
|
+
}
|
|
1353
|
+
|
|
1354
|
+
// Check if all values are the same
|
|
1355
|
+
const uniqueValues = [...new Set(allValues)];
|
|
1356
|
+
if (uniqueValues.length > 1) { // Values are inconsistent across sources
|
|
1357
|
+
throw this.errorBuilder.buildError( ErrorType.VALIDATION, undefined,
|
|
1358
|
+
{ customMessageReference: ErrorCustomMessageReference.API_CALL_INITIATOR_PARAMETER_INCONSISTENT,
|
|
1359
|
+
context: { fieldIdentifier, values: uniqueValues, sources } } );
|
|
1360
|
+
}
|
|
1361
|
+
|
|
1362
|
+
// 🔒 SECURE: Validate parameter format for security-sensitive fields
|
|
1363
|
+
const value = uniqueValues[0];
|
|
1364
|
+
if (value) {
|
|
1365
|
+
this.validateParameterFormat(fieldIdentifier, value, sources);
|
|
1366
|
+
}
|
|
1367
|
+
|
|
1368
|
+
// Store the consistent value
|
|
1369
|
+
if (value) {
|
|
1370
|
+
initiatorCriticalParamsValue[fieldIdentifier] = value;
|
|
1371
|
+
}
|
|
1372
|
+
}
|
|
1373
|
+
|
|
1374
|
+
this.logDebug('Parameter coherence validation successful', { extractedParams: Object.keys(initiatorCriticalParamsValue) });
|
|
1375
|
+
|
|
1376
|
+
return initiatorCriticalParamsValue;
|
|
1377
|
+
}
|
|
1378
|
+
|
|
1379
|
+
|
|
1380
|
+
|
|
1381
|
+
/**
|
|
1382
|
+
* 🔒 SECURE: Validate parameter format for security-sensitive fields
|
|
1383
|
+
*/
|
|
1384
|
+
private validateParameterFormat(fieldIdentifier: string, value: string, sources?: any): void {
|
|
1385
|
+
if (value === 'undefined' || value === null || value === undefined || value === ''){
|
|
1386
|
+
throw this.errorBuilder.buildError( ErrorType.VALIDATION, undefined,
|
|
1387
|
+
{ customMessageReference: ErrorCustomMessageReference.API_CALL_INITIATOR_PARAMETER_MISSING,
|
|
1388
|
+
context: { fieldIdentifier, value, sources } } );
|
|
1389
|
+
}
|
|
1390
|
+
|
|
1391
|
+
// Validate ID formats (should be alphanumeric, hyphens, underscores only)
|
|
1392
|
+
if (fieldIdentifier.toLowerCase().endsWith('id')) {
|
|
1393
|
+
if (!/^[a-zA-Z0-9_-]+$/.test(value)) {
|
|
1394
|
+
throw this.errorBuilder.buildError( ErrorType.VALIDATION, undefined,
|
|
1395
|
+
{ customMessageReference: ErrorCustomMessageReference.API_CALL_INITIATOR_PARAMETER_UNSUPPORTED,
|
|
1396
|
+
context: { fieldIdentifier, value, sources, regexStringForIdFormat: '^[a-zA-Z0-9_-]+$' } } );
|
|
1397
|
+
}
|
|
1398
|
+
}
|
|
1399
|
+
|
|
1400
|
+
if (value.length > 255) {
|
|
1401
|
+
throw this.errorBuilder.buildError( ErrorType.VALIDATION, undefined,
|
|
1402
|
+
{ customMessageReference: ErrorCustomMessageReference.API_CALL_INITIATOR_PARAMETER_UNSUPPORTED,
|
|
1403
|
+
context: { fieldIdentifier, value, sources, maxLength: 255 } } );
|
|
1404
|
+
}
|
|
1405
|
+
}
|
|
1406
|
+
|
|
1407
|
+
private parseBearerToken(authHeader: string): string {
|
|
1408
|
+
const trimmed = authHeader.trim();
|
|
1409
|
+
|
|
1410
|
+
if (!trimmed.toLowerCase().startsWith('bearer ')) {
|
|
1411
|
+
throw this.errorBuilder.buildError( ErrorType.AUTHENTICATION, undefined,
|
|
1412
|
+
{ customMessageReference: ErrorCustomMessageReference.AUTHENTICATION_INVALID_TOKEN, context: { authHeader } } );
|
|
1413
|
+
}
|
|
1414
|
+
|
|
1415
|
+
const token = trimmed.substring(7).trim(); // Remove 'Bearer ' prefix
|
|
1416
|
+
|
|
1417
|
+
if (!token) {
|
|
1418
|
+
throw this.errorBuilder.buildError( ErrorType.AUTHENTICATION, undefined,
|
|
1419
|
+
{ customMessageReference: ErrorCustomMessageReference.AUTHENTICATION_INVALID_TOKEN, context: { authHeader } } );
|
|
1420
|
+
}
|
|
1421
|
+
|
|
1422
|
+
return token;
|
|
1423
|
+
}
|
|
1424
|
+
|
|
1425
|
+
/**
|
|
1426
|
+
* W7.3a: Handle x-anonymous-session header — verify existing session JWT,
|
|
1427
|
+
* validate parameter coherence, and create ANONYMOUS_SESSION execution context.
|
|
1428
|
+
*/
|
|
1429
|
+
private async handleAnonymousSessionAuthentication(
|
|
1430
|
+
sessionToken: string,
|
|
1431
|
+
req: Request,
|
|
1432
|
+
operation: ResourceConfiguration_Operation<any, any, any>,
|
|
1433
|
+
initiatorInfo: ResourceConfiguration_Operation_UrlInitiatorInfo
|
|
1434
|
+
): Promise<ExecutionContext<any>> {
|
|
1435
|
+
|
|
1436
|
+
this.logDebug('Processing anonymous session authentication', { operationId: operation.operationIdentifier });
|
|
1437
|
+
|
|
1438
|
+
if (!this.appConfigService.anonymousSessionsEnabled) {
|
|
1439
|
+
throw this.errorBuilder.buildError(ErrorType.AUTHENTICATION, undefined, {
|
|
1440
|
+
customMessageReference: ErrorCustomMessageReference.AUTHENTICATION_NO_AUTHENTICATION_PROVIDED,
|
|
1441
|
+
context: { message: 'Anonymous sessions are not enabled for this application' },
|
|
1442
|
+
});
|
|
1443
|
+
}
|
|
1444
|
+
|
|
1445
|
+
const operationRoles: string[] = operation.roles ?? [];
|
|
1446
|
+
if (!operationRoles.includes(CORE_APP_ROLES.APP_ANONYMOUS)) {
|
|
1447
|
+
throw this.errorBuilder.buildError(ErrorType.AUTHENTICATION, undefined, {
|
|
1448
|
+
customMessageReference: ErrorCustomMessageReference.AUTHENTICATION_NO_AUTHENTICATION_PROVIDED,
|
|
1449
|
+
context: { message: 'This operation does not accept anonymous access', operationId: operation.operationIdentifier },
|
|
1450
|
+
});
|
|
1451
|
+
}
|
|
1452
|
+
|
|
1453
|
+
const { anonymousUserId } = this.getAnonymousSessionService().verifySessionToken(sessionToken);
|
|
1454
|
+
|
|
1455
|
+
const tokenContext: Record<string, string> = { anonymousUserId };
|
|
1456
|
+
const initiatorCriticalParamsValue = this.validateParameterCoherence(req, initiatorInfo, tokenContext);
|
|
1457
|
+
|
|
1458
|
+
const relationshipContexts = this.buildRelationshipContexts(initiatorInfo, initiatorCriticalParamsValue);
|
|
1459
|
+
|
|
1460
|
+
// Pre-fetch applicationId — the EC constructor requires it for ANONYMOUS_SESSION
|
|
1461
|
+
const applicationId = await this.getApplicationId();
|
|
1462
|
+
|
|
1463
|
+
const initiatorIds: ExecutionContext_InitiatorIds = {
|
|
1464
|
+
anonymousUserId,
|
|
1465
|
+
applicationId,
|
|
1466
|
+
...this.extractInitiatorIds(initiatorCriticalParamsValue),
|
|
1467
|
+
};
|
|
1468
|
+
|
|
1469
|
+
const executionContext = new ExecutionContext(
|
|
1470
|
+
operation,
|
|
1471
|
+
ExecutionContext_ExecutionType.ANONYMOUS_SESSION,
|
|
1472
|
+
new Map(Object.entries(initiatorCriticalParamsValue)),
|
|
1473
|
+
initiatorIds,
|
|
1474
|
+
[{ roles: [CORE_APP_ROLES.APP_ANONYMOUS], relatedPrimaryScope: ResourcePrimaryScope.APPLICATION }],
|
|
1475
|
+
relationshipContexts
|
|
1476
|
+
);
|
|
1477
|
+
|
|
1478
|
+
return executionContext;
|
|
1479
|
+
}
|
|
1480
|
+
|
|
1481
|
+
/**
|
|
1482
|
+
* W7.3a: Handle x-anonymous-session-init header — validate UUID, check feature
|
|
1483
|
+
* flag and operation roles, create ANONYMOUS_SESSION execution context with
|
|
1484
|
+
* anonymousUserCreated flag for the controller to create the AnonymousUser record.
|
|
1485
|
+
*/
|
|
1486
|
+
private async handleAnonymousSessionInit(
|
|
1487
|
+
anonymousUserId: string,
|
|
1488
|
+
req: Request,
|
|
1489
|
+
operation: ResourceConfiguration_Operation<any, any, any>,
|
|
1490
|
+
initiatorInfo: ResourceConfiguration_Operation_UrlInitiatorInfo
|
|
1491
|
+
): Promise<ExecutionContext<any>> {
|
|
1492
|
+
|
|
1493
|
+
this.logDebug('Processing anonymous session init', { anonymousUserId, operationId: operation.operationIdentifier });
|
|
1494
|
+
|
|
1495
|
+
this.validateParameterFormat('anonymousUserId', anonymousUserId);
|
|
1496
|
+
|
|
1497
|
+
if (!this.appConfigService.anonymousSessionsEnabled) {
|
|
1498
|
+
throw this.errorBuilder.buildError(ErrorType.AUTHENTICATION, undefined, {
|
|
1499
|
+
customMessageReference: ErrorCustomMessageReference.AUTHENTICATION_NO_AUTHENTICATION_PROVIDED,
|
|
1500
|
+
context: { message: 'Anonymous sessions are not enabled for this application' },
|
|
1501
|
+
});
|
|
1502
|
+
}
|
|
1503
|
+
|
|
1504
|
+
const operationRoles: string[] = operation.roles ?? [];
|
|
1505
|
+
if (!operationRoles.includes(CORE_APP_ROLES.APP_ANONYMOUS)) {
|
|
1506
|
+
throw this.errorBuilder.buildError(ErrorType.AUTHENTICATION, undefined, {
|
|
1507
|
+
customMessageReference: ErrorCustomMessageReference.AUTHENTICATION_NO_AUTHENTICATION_PROVIDED,
|
|
1508
|
+
context: { message: 'This operation does not accept anonymous access', operationId: operation.operationIdentifier },
|
|
1509
|
+
});
|
|
1510
|
+
}
|
|
1511
|
+
|
|
1512
|
+
const tokenContext: Record<string, string> = { anonymousUserId };
|
|
1513
|
+
const initiatorCriticalParamsValue = this.validateParameterCoherence(req, initiatorInfo, tokenContext);
|
|
1514
|
+
|
|
1515
|
+
const relationshipContexts = this.buildRelationshipContexts(initiatorInfo, initiatorCriticalParamsValue);
|
|
1516
|
+
|
|
1517
|
+
// Pre-fetch applicationId — the EC constructor requires it for ANONYMOUS_SESSION
|
|
1518
|
+
const applicationId = await this.getApplicationId();
|
|
1519
|
+
|
|
1520
|
+
const initiatorIds: ExecutionContext_InitiatorIds = {
|
|
1521
|
+
anonymousUserId,
|
|
1522
|
+
applicationId,
|
|
1523
|
+
...this.extractInitiatorIds(initiatorCriticalParamsValue),
|
|
1524
|
+
};
|
|
1525
|
+
|
|
1526
|
+
const executionContext = new ExecutionContext(
|
|
1527
|
+
operation,
|
|
1528
|
+
ExecutionContext_ExecutionType.ANONYMOUS_SESSION,
|
|
1529
|
+
new Map(Object.entries(initiatorCriticalParamsValue)),
|
|
1530
|
+
initiatorIds,
|
|
1531
|
+
[{ roles: [CORE_APP_ROLES.APP_ANONYMOUS], relatedPrimaryScope: ResourcePrimaryScope.APPLICATION }],
|
|
1532
|
+
relationshipContexts
|
|
1533
|
+
);
|
|
1534
|
+
|
|
1535
|
+
executionContext.setAnonymousUserCreated(true);
|
|
1536
|
+
|
|
1537
|
+
return executionContext;
|
|
1538
|
+
}
|
|
1539
|
+
|
|
1540
|
+
/**
|
|
1541
|
+
* Extract initiator IDs from critical parameters
|
|
1542
|
+
*/
|
|
1543
|
+
private extractInitiatorIds(criticalParams: Record<string, string>): Partial<ExecutionContext_InitiatorIds> {
|
|
1544
|
+
const initiatorIds: Partial<ExecutionContext_InitiatorIds> = {};
|
|
1545
|
+
|
|
1546
|
+
// Map common field identifiers to initiator ID properties
|
|
1547
|
+
if (criticalParams.organizationId) {
|
|
1548
|
+
initiatorIds.organizationId = criticalParams.organizationId;
|
|
1549
|
+
}
|
|
1550
|
+
if (criticalParams.userId) {
|
|
1551
|
+
initiatorIds.userId = criticalParams.userId;
|
|
1552
|
+
}
|
|
1553
|
+
if (criticalParams.applicationId) {
|
|
1554
|
+
initiatorIds.applicationId = criticalParams.applicationId;
|
|
1555
|
+
}
|
|
1556
|
+
return initiatorIds;
|
|
1557
|
+
}
|
|
1558
|
+
|
|
1559
|
+
/**
|
|
1560
|
+
* Handle API key authentication (org and app keys)
|
|
1561
|
+
*/
|
|
1562
|
+
private async handleApiKeyAuthentication<
|
|
1563
|
+
TCustomOperationEnum extends EnumLikeType | undefined = undefined,
|
|
1564
|
+
TCoreOperationEnum extends Partial<CoreResourceOperation> | undefined = undefined,
|
|
1565
|
+
TMainSchema extends z.ZodTypeAny = z.ZodTypeAny
|
|
1566
|
+
>(
|
|
1567
|
+
apiKey: string,
|
|
1568
|
+
req: Request,
|
|
1569
|
+
operation: ResourceConfiguration_Operation<TCustomOperationEnum, TCoreOperationEnum, TMainSchema>,
|
|
1570
|
+
initiatorInfo: ResourceConfiguration_Operation_UrlInitiatorInfo
|
|
1571
|
+
): Promise<ExecutionContext<typeof operation>> {
|
|
1572
|
+
|
|
1573
|
+
this.logDebug('Processing API key authentication', { keyType: apiKey.startsWith('sk_org_') ? 'organization' : 'application' });
|
|
1574
|
+
|
|
1575
|
+
const initiatorCriticalParamsValue = this.validateParameterCoherence(req, initiatorInfo, {});
|
|
1576
|
+
|
|
1577
|
+
// Build relationship contexts from URL parameters
|
|
1578
|
+
const relationshipContexts = this.buildRelationshipContexts(initiatorInfo, initiatorCriticalParamsValue);
|
|
1579
|
+
|
|
1580
|
+
return (apiKey.startsWith('sk_org_'))
|
|
1581
|
+
? await this.handleOrganizationApiKey(apiKey, initiatorCriticalParamsValue, operation, relationshipContexts)
|
|
1582
|
+
: await this.handleApplicationApiKey(apiKey, initiatorCriticalParamsValue, operation, relationshipContexts);
|
|
1583
|
+
}
|
|
1584
|
+
|
|
1585
|
+
/**
|
|
1586
|
+
* Handle organization API key authentication with repository validation
|
|
1587
|
+
*/
|
|
1588
|
+
private async handleOrganizationApiKey<
|
|
1589
|
+
TCustomOperationEnum extends EnumLikeType | undefined = undefined,
|
|
1590
|
+
TCoreOperationEnum extends Partial<CoreResourceOperation> | undefined = undefined,
|
|
1591
|
+
TMainSchema extends z.ZodTypeAny = z.ZodTypeAny
|
|
1592
|
+
>(
|
|
1593
|
+
apiKey: string,
|
|
1594
|
+
initiatorCriticalParamsValue: Record<string, string>,
|
|
1595
|
+
operation: ResourceConfiguration_Operation<TCustomOperationEnum, TCoreOperationEnum, TMainSchema>,
|
|
1596
|
+
relationshipContexts: ExecutionContext_RelationshipContext[]
|
|
1597
|
+
): Promise<ExecutionContext<typeof operation>> {
|
|
1598
|
+
|
|
1599
|
+
this.logDebug('Processing organization API key');
|
|
1600
|
+
|
|
1601
|
+
if(operation.resourcePrimaryScope !== ResourcePrimaryScope.ORGANIZATIONS) {
|
|
1602
|
+
throw this.errorBuilder.buildError( ErrorType.AUTHENTICATION, undefined,
|
|
1603
|
+
{ customMessageReference: ErrorCustomMessageReference.API_ORG_KEY_WRONG_RESOURCE,
|
|
1604
|
+
context: { resourceIdentifier: operation.resourceIdentifier, primaryScope: operation.resourcePrimaryScope } });
|
|
1605
|
+
}
|
|
1606
|
+
|
|
1607
|
+
if (!initiatorCriticalParamsValue.organizationId) {
|
|
1608
|
+
throw this.errorBuilder.buildError( ErrorType.AUTHENTICATION, undefined,
|
|
1609
|
+
{ customMessageReference: ErrorCustomMessageReference.API_ORG_KEY_WITHOUT_ORG_ID,
|
|
1610
|
+
context: { providedParams: Object.keys(initiatorCriticalParamsValue) } });
|
|
1611
|
+
}
|
|
1612
|
+
|
|
1613
|
+
try {
|
|
1614
|
+
// Create a temporary execution context for repository access
|
|
1615
|
+
const tempExecutionContext = this._getTempExecutionContext(operation);
|
|
1616
|
+
|
|
1617
|
+
const orgApiKeyRepository = this.repositoriesRegistry.getRepository(CoreResourceType.ORG_API_KEYS);
|
|
1618
|
+
|
|
1619
|
+
// Validate API key exists and is active
|
|
1620
|
+
const orgApiKey = await orgApiKeyRepository.read<ApiKeyOrganization>(tempExecutionContext, {
|
|
1621
|
+
keyValue: apiKey, // Search by key value
|
|
1622
|
+
organizationId: initiatorCriticalParamsValue.organizationId
|
|
1623
|
+
});
|
|
1624
|
+
|
|
1625
|
+
if (!orgApiKey || orgApiKey.status !== ApiKeyStatus.ACTIVE) {
|
|
1626
|
+
throw this.errorBuilder.buildError( ErrorType.AUTHENTICATION, undefined,
|
|
1627
|
+
{ customMessageReference: ErrorCustomMessageReference.AUTHENTICATION_API_KEY_INVALID,
|
|
1628
|
+
context: { scope: "organization", organizationId: initiatorCriticalParamsValue.organizationId, ...(orgApiKey?.status ? { apiKeyStatus: orgApiKey.status } : {}) } }
|
|
1629
|
+
);
|
|
1630
|
+
}
|
|
1631
|
+
|
|
1632
|
+
// Create execution context with API key info
|
|
1633
|
+
const initiatorIds: ExecutionContext_InitiatorIds = {
|
|
1634
|
+
organizationId: initiatorCriticalParamsValue.organizationId,
|
|
1635
|
+
organizationApiKeyId: orgApiKey._id, // Use database ID, not raw key
|
|
1636
|
+
...this.extractInitiatorIds(initiatorCriticalParamsValue)
|
|
1637
|
+
};
|
|
1638
|
+
|
|
1639
|
+
// Create initial execution context (roles will be validated by AuthorizationsBackendService)
|
|
1640
|
+
const executionContext = new ExecutionContext(
|
|
1641
|
+
operation,
|
|
1642
|
+
ExecutionContext_ExecutionType.ORG_API_KEY,
|
|
1643
|
+
new Map(Object.entries(initiatorCriticalParamsValue)),
|
|
1644
|
+
initiatorIds,
|
|
1645
|
+
[ { roles: orgApiKey.roles || [], relatedPrimaryScope: ResourcePrimaryScope.ORGANIZATIONS, relatedResourceId: orgApiKey.organizationId } ], // Use API key roles as initial roles
|
|
1646
|
+
relationshipContexts
|
|
1647
|
+
);
|
|
1648
|
+
|
|
1649
|
+
|
|
1650
|
+
return executionContext;
|
|
1651
|
+
|
|
1652
|
+
} catch (error) {
|
|
1653
|
+
if (isWildoBackendError(error)) {
|
|
1654
|
+
throw error; // Re-throw our own errors (including WildoError_Backend)
|
|
1655
|
+
}
|
|
1656
|
+
|
|
1657
|
+
throw this.errorBuilder.buildError( ErrorType.AUTHENTICATION, undefined,
|
|
1658
|
+
{ customMessageReference: ErrorCustomMessageReference.AUTHENTICATION_API_KEY_FAILED,
|
|
1659
|
+
context: {
|
|
1660
|
+
organizationId: initiatorCriticalParamsValue.organizationId,
|
|
1661
|
+
scope : "organization",
|
|
1662
|
+
originalError: error instanceof Error ? error.message : 'Unknown error'
|
|
1663
|
+
} });
|
|
1664
|
+
}
|
|
1665
|
+
}
|
|
1666
|
+
|
|
1667
|
+
/**
|
|
1668
|
+
* Handle application API key authentication with repository validation
|
|
1669
|
+
*/
|
|
1670
|
+
private async handleApplicationApiKey<
|
|
1671
|
+
TCustomOperationEnum extends EnumLikeType | undefined = undefined,
|
|
1672
|
+
TCoreOperationEnum extends Partial<CoreResourceOperation> | undefined = undefined,
|
|
1673
|
+
TMainSchema extends z.ZodTypeAny = z.ZodTypeAny
|
|
1674
|
+
>(
|
|
1675
|
+
apiKey: string,
|
|
1676
|
+
initiatorCriticalParamsValue: Record<string, string>,
|
|
1677
|
+
operation: ResourceConfiguration_Operation<TCustomOperationEnum, TCoreOperationEnum, TMainSchema>,
|
|
1678
|
+
relationshipContexts: ExecutionContext_RelationshipContext[]
|
|
1679
|
+
): Promise<ExecutionContext<typeof operation>> {
|
|
1680
|
+
|
|
1681
|
+
this.logDebug('Processing application API key');
|
|
1682
|
+
|
|
1683
|
+
try {
|
|
1684
|
+
// Create a temporary execution context for repository access
|
|
1685
|
+
const tempExecutionContext = this._getTempExecutionContext(operation);
|
|
1686
|
+
|
|
1687
|
+
// Validate API key exists and is active
|
|
1688
|
+
const appApiKeyRepository = this.repositoriesRegistry.getRepository(CoreResourceType.APPLICATION_API_KEYS);
|
|
1689
|
+
const appApiKey = await appApiKeyRepository.read<ApiKeyApplication>(tempExecutionContext, {
|
|
1690
|
+
keyValue: apiKey, // Search by key value
|
|
1691
|
+
});
|
|
1692
|
+
|
|
1693
|
+
if (!appApiKey || appApiKey.status !== ApiKeyStatus.ACTIVE) {
|
|
1694
|
+
throw this.errorBuilder.buildError(ErrorType.AUTHENTICATION, undefined,
|
|
1695
|
+
{ customMessageReference: ErrorCustomMessageReference.AUTHENTICATION_API_KEY_INVALID,
|
|
1696
|
+
context: { scope: "application", ...(appApiKey?.status ? { apiKeyStatus: appApiKey.status } : {}) } } );
|
|
1697
|
+
}
|
|
1698
|
+
|
|
1699
|
+
const initiatorIds: ExecutionContext_InitiatorIds = {
|
|
1700
|
+
applicationApiKeyId: appApiKey._id, // Use database ID, not raw key
|
|
1701
|
+
...this.extractInitiatorIds(initiatorCriticalParamsValue)
|
|
1702
|
+
};
|
|
1703
|
+
|
|
1704
|
+
const executionContext = new ExecutionContext(
|
|
1705
|
+
operation,
|
|
1706
|
+
ExecutionContext_ExecutionType.APP_API_KEY,
|
|
1707
|
+
new Map(Object.entries(initiatorCriticalParamsValue)),
|
|
1708
|
+
initiatorIds,
|
|
1709
|
+
[ { roles: appApiKey.roles || [], relatedPrimaryScope: ResourcePrimaryScope.APPLICATION, relatedResourceId: appApiKey.applicationId } ], // Use API key roles as initial roles
|
|
1710
|
+
relationshipContexts
|
|
1711
|
+
);
|
|
1712
|
+
|
|
1713
|
+
await this.populateApplicationIdIfNeeded(executionContext, true);
|
|
1714
|
+
|
|
1715
|
+
|
|
1716
|
+
return executionContext;
|
|
1717
|
+
|
|
1718
|
+
} catch (error) {
|
|
1719
|
+
if (isWildoBackendError(error)) {
|
|
1720
|
+
throw error;
|
|
1721
|
+
}
|
|
1722
|
+
|
|
1723
|
+
throw this.errorBuilder.buildError( ErrorType.AUTHENTICATION, undefined,
|
|
1724
|
+
{ customMessageReference: ErrorCustomMessageReference.AUTHENTICATION_API_KEY_FAILED,
|
|
1725
|
+
context: {
|
|
1726
|
+
scope: "application",
|
|
1727
|
+
originalError: error instanceof Error ? error.message : 'Unknown error'
|
|
1728
|
+
} } );
|
|
1729
|
+
}
|
|
1730
|
+
}
|
|
1731
|
+
|
|
1732
|
+
/**
|
|
1733
|
+
* Handle JWT bearer token authentication
|
|
1734
|
+
*/
|
|
1735
|
+
private async handleJwtAuthentication<
|
|
1736
|
+
TCustomOperationEnum extends EnumLikeType | undefined = undefined,
|
|
1737
|
+
TCoreOperationEnum extends Partial<CoreResourceOperation> | undefined = undefined,
|
|
1738
|
+
TMainSchema extends z.ZodTypeAny = z.ZodTypeAny,
|
|
1739
|
+
>(
|
|
1740
|
+
token: string,
|
|
1741
|
+
req: Request,
|
|
1742
|
+
operation: ResourceConfiguration_Operation<TCustomOperationEnum, TCoreOperationEnum, TMainSchema>,
|
|
1743
|
+
initiatorInfo: ResourceConfiguration_Operation_UrlInitiatorInfo
|
|
1744
|
+
): Promise<ExecutionContext<typeof operation>> {
|
|
1745
|
+
|
|
1746
|
+
this.logDebug('Processing JWT authentication');
|
|
1747
|
+
|
|
1748
|
+
try {
|
|
1749
|
+
|
|
1750
|
+
const rawDecodedToken = await this.jwtService.verify(token);
|
|
1751
|
+
const decodedToken = JwtClaim_App_Auth_Schema.parse(rawDecodedToken);
|
|
1752
|
+
const tokenType = decodedToken.type;
|
|
1753
|
+
|
|
1754
|
+
const initiatorCriticalParamsValue = this.validateParameterCoherence(req, initiatorInfo, {});
|
|
1755
|
+
|
|
1756
|
+
// Build relationship contexts from URL parameters
|
|
1757
|
+
const relationshipContexts = this.buildRelationshipContexts(initiatorInfo, initiatorCriticalParamsValue);
|
|
1758
|
+
|
|
1759
|
+
if (tokenType === ExecutionContext_ExecutionType.USER_REQUEST) {
|
|
1760
|
+
const userJwtToken = decodedToken as JwtClaim_App_Auth_UserRequest;
|
|
1761
|
+
|
|
1762
|
+
// F1 fix: Reject access tokens issued before a forced invalidation
|
|
1763
|
+
// (e.g., after password reset or refresh token rotation detection).
|
|
1764
|
+
// Without this check, stale access tokens would remain valid for resource
|
|
1765
|
+
// requests until natural expiry, even after invalidateAllTokensForUser().
|
|
1766
|
+
const iat = userJwtToken.iat as number | undefined;
|
|
1767
|
+
if (iat) {
|
|
1768
|
+
const invalidBefore = await this.redisService.get<number>(`${AUTH_REDIS_KEYS.TOKEN_INVALID_BEFORE}${userJwtToken.userId}`);
|
|
1769
|
+
if (invalidBefore && iat < invalidBefore) {
|
|
1770
|
+
throw this.errorBuilder.buildError(ErrorType.AUTHENTICATION, undefined, {
|
|
1771
|
+
customMessageReference: ErrorCustomMessageReference.AUTHENTICATION_JWT_TOKEN_FAILED,
|
|
1772
|
+
context: { reason: 'token_invalidated' },
|
|
1773
|
+
});
|
|
1774
|
+
}
|
|
1775
|
+
}
|
|
1776
|
+
|
|
1777
|
+
return await this.handleUserJwtAuthentication(
|
|
1778
|
+
userJwtToken.userId, initiatorCriticalParamsValue, operation, relationshipContexts,
|
|
1779
|
+
userJwtToken.lastAuthenticatedAt, userJwtToken.activeUserType,
|
|
1780
|
+
);
|
|
1781
|
+
}
|
|
1782
|
+
|
|
1783
|
+
throw this.errorBuilder.buildError( ErrorType.AUTHENTICATION, undefined,
|
|
1784
|
+
{ customMessageReference: ErrorCustomMessageReference.AUTHENTICATION_INVALID_TOKEN,
|
|
1785
|
+
context: { tokenType }} );
|
|
1786
|
+
|
|
1787
|
+
} catch (error) {
|
|
1788
|
+
// Handle JWT verification or validation errors
|
|
1789
|
+
if (isWildoBackendError(error)) {
|
|
1790
|
+
throw error;
|
|
1791
|
+
}
|
|
1792
|
+
|
|
1793
|
+
throw this.errorBuilder.buildError( ErrorType.AUTHENTICATION, undefined,
|
|
1794
|
+
{ customMessageReference: ErrorCustomMessageReference.AUTHENTICATION_JWT_TOKEN_FAILED,
|
|
1795
|
+
context: { originalError: error instanceof Error ? error.message : 'Unknown error', token} });
|
|
1796
|
+
}
|
|
1797
|
+
}
|
|
1798
|
+
|
|
1799
|
+
// =====================================================
|
|
1800
|
+
// SHARED AUTH HELPERS (used by both HTTP and WebSocket)
|
|
1801
|
+
// =====================================================
|
|
1802
|
+
|
|
1803
|
+
/**
|
|
1804
|
+
* Fetch user and build roles - SHARED between HTTP and WebSocket authentication.
|
|
1805
|
+
* This is the single source of truth for user authentication logic.
|
|
1806
|
+
*
|
|
1807
|
+
* @param userId - User ID to authenticate
|
|
1808
|
+
* @param tempContext - Temporary execution context for DB queries
|
|
1809
|
+
* @returns User object and built roles array
|
|
1810
|
+
*/
|
|
1811
|
+
private async _fetchUserAndBuildRoles(
|
|
1812
|
+
userId: string,
|
|
1813
|
+
tempContext: ExecutionContext<any>
|
|
1814
|
+
): Promise<{ user: User; initiatorRoles: ExecutionContext_RoleInfo[]; applicationId: string }> {
|
|
1815
|
+
|
|
1816
|
+
// 1. Fetch and validate user
|
|
1817
|
+
const userRepository = this.repositoriesRegistry.getRepository(CoreResourceType.USERS);
|
|
1818
|
+
const user = await userRepository.read<User>(tempContext, userId);
|
|
1819
|
+
|
|
1820
|
+
if (!user) {
|
|
1821
|
+
throw this.errorBuilder.buildError(ErrorType.AUTHENTICATION, undefined, {
|
|
1822
|
+
customMessageReference: ErrorCustomMessageReference.AUTHENTICATION_USER_NOT_FOUND,
|
|
1823
|
+
context: { userId }
|
|
1824
|
+
});
|
|
1825
|
+
}
|
|
1826
|
+
|
|
1827
|
+
if (user.status !== UserStatus.ACTIVE) {
|
|
1828
|
+
throw this.errorBuilder.buildError(ErrorType.AUTHENTICATION, undefined, {
|
|
1829
|
+
customMessageReference: ErrorCustomMessageReference.AUTHENTICATION_USER_NOT_ACTIVE,
|
|
1830
|
+
context: { userId }
|
|
1831
|
+
});
|
|
1832
|
+
}
|
|
1833
|
+
|
|
1834
|
+
// 2. Fetch organization memberships
|
|
1835
|
+
const orgMemberRepo = this.repositoriesRegistry.getRepository(CoreResourceType.ORGANIZATION_MEMBERS);
|
|
1836
|
+
const membershipsList = await orgMemberRepo.list<OrganizationMember>(tempContext, {
|
|
1837
|
+
userId: userId,
|
|
1838
|
+
status: OrganizationMemberStatus.ACTIVE
|
|
1839
|
+
});
|
|
1840
|
+
|
|
1841
|
+
// Workaround: If organization members only have _id (due to projection issue),
|
|
1842
|
+
// fetch them individually using READ operations to get all fields
|
|
1843
|
+
const memberships = await Promise.all(
|
|
1844
|
+
membershipsList.map(async (member) => {
|
|
1845
|
+
if (member && member.roles && member.organizationId) {
|
|
1846
|
+
return member;
|
|
1847
|
+
}
|
|
1848
|
+
if (member && member._id) {
|
|
1849
|
+
try {
|
|
1850
|
+
const fullMember = await orgMemberRepo.read(tempContext, member._id) as OrganizationMember | null;
|
|
1851
|
+
return fullMember || member;
|
|
1852
|
+
} catch {
|
|
1853
|
+
return member;
|
|
1854
|
+
}
|
|
1855
|
+
}
|
|
1856
|
+
return member;
|
|
1857
|
+
})
|
|
1858
|
+
);
|
|
1859
|
+
|
|
1860
|
+
// 3. Build roles from memberships
|
|
1861
|
+
const initiatorRoles: ExecutionContext_RoleInfo[] = [];
|
|
1862
|
+
for (const membership of memberships) {
|
|
1863
|
+
if (membership && membership.organizationId) {
|
|
1864
|
+
initiatorRoles.push({
|
|
1865
|
+
roles: membership.roles || [],
|
|
1866
|
+
relatedPrimaryScope: ResourcePrimaryScope.ORGANIZATIONS,
|
|
1867
|
+
relatedResourceId: membership.organizationId
|
|
1868
|
+
});
|
|
1869
|
+
}
|
|
1870
|
+
}
|
|
1871
|
+
|
|
1872
|
+
// 4. Add application-level roles if user has any
|
|
1873
|
+
const applicationId = await this.getApplicationId();
|
|
1874
|
+
if (user.appRoles && user.appRoles.length > 0) {
|
|
1875
|
+
initiatorRoles.push({
|
|
1876
|
+
roles: user.appRoles,
|
|
1877
|
+
relatedPrimaryScope: ResourcePrimaryScope.APPLICATION,
|
|
1878
|
+
relatedResourceId: applicationId
|
|
1879
|
+
});
|
|
1880
|
+
}
|
|
1881
|
+
|
|
1882
|
+
return { user, initiatorRoles, applicationId };
|
|
1883
|
+
}
|
|
1884
|
+
|
|
1885
|
+
// =====================================================
|
|
1886
|
+
// HTTP AUTHENTICATION METHODS
|
|
1887
|
+
// =====================================================
|
|
1888
|
+
|
|
1889
|
+
/**
|
|
1890
|
+
* Handle user JWT authentication with user and role validation.
|
|
1891
|
+
* Uses _fetchUserAndBuildRoles() shared helper for DRY.
|
|
1892
|
+
*/
|
|
1893
|
+
private async handleUserJwtAuthentication<
|
|
1894
|
+
TCustomOperationEnum extends EnumLikeType | undefined = undefined,
|
|
1895
|
+
TCoreOperationEnum extends Partial<CoreResourceOperation> | undefined = undefined,
|
|
1896
|
+
TMainSchema extends z.ZodTypeAny = z.ZodTypeAny,
|
|
1897
|
+
>(
|
|
1898
|
+
userId: string,
|
|
1899
|
+
initiatorCriticalParamsValue: Record<string, string>,
|
|
1900
|
+
operation: ResourceConfiguration_Operation<TCustomOperationEnum, TCoreOperationEnum, TMainSchema>,
|
|
1901
|
+
relationshipContexts: ExecutionContext_RelationshipContext[],
|
|
1902
|
+
lastAuthenticatedAt?: number,
|
|
1903
|
+
jwtActiveUserType?: string,
|
|
1904
|
+
): Promise<ExecutionContext<typeof operation>> {
|
|
1905
|
+
|
|
1906
|
+
this.logDebug('Processing user JWT authentication', { userId: userId.substring(0, 8) + '...' });
|
|
1907
|
+
|
|
1908
|
+
// W3.6: Validate URL params don't contradict JWT-derived identity
|
|
1909
|
+
if (initiatorCriticalParamsValue.userId && initiatorCriticalParamsValue.userId !== userId) {
|
|
1910
|
+
throw this.errorBuilder.buildError(ErrorType.AUTHORIZATION, undefined, {
|
|
1911
|
+
context: { message: 'URL userId parameter does not match authenticated user' },
|
|
1912
|
+
});
|
|
1913
|
+
}
|
|
1914
|
+
|
|
1915
|
+
try {
|
|
1916
|
+
const tempExecutionContext = this._getTempExecutionContext(operation);
|
|
1917
|
+
|
|
1918
|
+
// Use shared helper for user fetch and role building
|
|
1919
|
+
const { initiatorRoles } = await this._fetchUserAndBuildRoles(userId, tempExecutionContext);
|
|
1920
|
+
|
|
1921
|
+
// W3.6: JWT-derived values MUST take precedence over URL params to prevent identity spoofing.
|
|
1922
|
+
const initiatorIds: ExecutionContext_InitiatorIds = {
|
|
1923
|
+
...this.extractInitiatorIds(initiatorCriticalParamsValue),
|
|
1924
|
+
userId,
|
|
1925
|
+
};
|
|
1926
|
+
|
|
1927
|
+
const executionContext = new ExecutionContext(
|
|
1928
|
+
operation,
|
|
1929
|
+
ExecutionContext_ExecutionType.USER_REQUEST,
|
|
1930
|
+
new Map(Object.entries(initiatorCriticalParamsValue)),
|
|
1931
|
+
initiatorIds,
|
|
1932
|
+
initiatorRoles,
|
|
1933
|
+
relationshipContexts,
|
|
1934
|
+
undefined, // requestUUID — auto-generated
|
|
1935
|
+
0, // subCallDepth — top-level
|
|
1936
|
+
undefined, // visitedResources
|
|
1937
|
+
jwtActiveUserType ?? null,
|
|
1938
|
+
);
|
|
1939
|
+
|
|
1940
|
+
if (lastAuthenticatedAt !== undefined) {
|
|
1941
|
+
executionContext.setLastAuthenticatedAt(lastAuthenticatedAt);
|
|
1942
|
+
}
|
|
1943
|
+
|
|
1944
|
+
return executionContext;
|
|
1945
|
+
|
|
1946
|
+
} catch (error) {
|
|
1947
|
+
if (isWildoBackendError(error)) {
|
|
1948
|
+
throw error;
|
|
1949
|
+
}
|
|
1950
|
+
|
|
1951
|
+
throw this.errorBuilder.buildError( ErrorType.AUTHENTICATION, undefined,
|
|
1952
|
+
{ customMessageReference: ErrorCustomMessageReference.AUTHENTICATION_JWT_TOKEN_FAILED,
|
|
1953
|
+
context: { originalError: error instanceof Error ? error.message : 'Unknown error', userId } });
|
|
1954
|
+
}
|
|
1955
|
+
}
|
|
1956
|
+
|
|
1957
|
+
// =====================================================
|
|
1958
|
+
// SOCKET AUTHENTICATION METHODS
|
|
1959
|
+
// =====================================================
|
|
1960
|
+
// These methods are factorized with HTTP authentication:
|
|
1961
|
+
// - Same JWT verification (jwtService.verify)
|
|
1962
|
+
// - Same token parsing (JwtClaim_App_Auth_Schema)
|
|
1963
|
+
// - Same user/role extraction (reuses _fetchUserAndBuildRoles)
|
|
1964
|
+
|
|
1965
|
+
/**
|
|
1966
|
+
* Authenticate a socket connection from JWT token.
|
|
1967
|
+
*
|
|
1968
|
+
* FACTORIZATION: Reuses same JWT verification and user/role extraction as HTTP.
|
|
1969
|
+
*
|
|
1970
|
+
* @param token - JWT token from socket handshake
|
|
1971
|
+
* @returns SocketAuthResult with execution type, initiator IDs and roles
|
|
1972
|
+
*/
|
|
1973
|
+
public async authenticateSocketConnection(token: string): Promise<SocketAuthResult> {
|
|
1974
|
+
this.logDebug('Authenticating socket connection');
|
|
1975
|
+
|
|
1976
|
+
// SAME JWT verification as HTTP (jwtService.verify + schema parse)
|
|
1977
|
+
const rawDecodedToken = await this.jwtService.verify(token);
|
|
1978
|
+
const decodedToken = JwtClaim_App_Auth_Schema.parse(rawDecodedToken);
|
|
1979
|
+
const tokenType = decodedToken.type;
|
|
1980
|
+
|
|
1981
|
+
if (tokenType === ExecutionContext_ExecutionType.USER_REQUEST) {
|
|
1982
|
+
const userJwtToken = decodedToken as JwtClaim_App_Auth_UserRequest;
|
|
1983
|
+
|
|
1984
|
+
const iat = userJwtToken.iat as number | undefined;
|
|
1985
|
+
if (iat) {
|
|
1986
|
+
const invalidBefore = await this.redisService.get<number>(`${AUTH_REDIS_KEYS.TOKEN_INVALID_BEFORE}${userJwtToken.userId}`);
|
|
1987
|
+
if (invalidBefore && iat < invalidBefore) {
|
|
1988
|
+
throw this.errorBuilder.buildError(ErrorType.AUTHENTICATION, undefined, {
|
|
1989
|
+
customMessageReference: ErrorCustomMessageReference.AUTHENTICATION_JWT_TOKEN_FAILED,
|
|
1990
|
+
context: { reason: 'token_invalidated' },
|
|
1991
|
+
});
|
|
1992
|
+
}
|
|
1993
|
+
}
|
|
1994
|
+
|
|
1995
|
+
return await this._authenticateUserForSocket(userJwtToken.userId);
|
|
1996
|
+
}
|
|
1997
|
+
|
|
1998
|
+
throw this.errorBuilder.buildError(ErrorType.AUTHENTICATION, undefined, {
|
|
1999
|
+
customMessageReference: ErrorCustomMessageReference.AUTHENTICATION_INVALID_TOKEN,
|
|
2000
|
+
context: { tokenType }
|
|
2001
|
+
});
|
|
2002
|
+
}
|
|
2003
|
+
|
|
2004
|
+
/**
|
|
2005
|
+
* Get auth result for public (unauthenticated) socket connections.
|
|
2006
|
+
*/
|
|
2007
|
+
public getPublicSocketAuth(): SocketAuthResult {
|
|
2008
|
+
return {
|
|
2009
|
+
executionType: ExecutionContext_ExecutionType.PUBLIC_EXECUTION,
|
|
2010
|
+
initiatorIds: null,
|
|
2011
|
+
initiatorRoles: []
|
|
2012
|
+
};
|
|
2013
|
+
}
|
|
2014
|
+
|
|
2015
|
+
/**
|
|
2016
|
+
* Build an ExecutionContext from socket auth info for resource authorization.
|
|
2017
|
+
*
|
|
2018
|
+
* FACTORIZATION: Creates an ExecutionContext with same structure as HTTP requests.
|
|
2019
|
+
* Enables reuse of AuthorizationsBackendService.authorizeInController().
|
|
2020
|
+
*
|
|
2021
|
+
* @param auth - SocketAuthResult from authenticated socket
|
|
2022
|
+
* @param operation - Operation config (already looked up from ResourcesRegistryService)
|
|
2023
|
+
* @param contextResourceIdentifiers - Path context for authorization
|
|
2024
|
+
*/
|
|
2025
|
+
public async buildContextFromSocketAuth<
|
|
2026
|
+
TResourceConfigOperation extends ResourceConfiguration_Operation<any, any, any>
|
|
2027
|
+
>(
|
|
2028
|
+
auth: SocketAuthResult,
|
|
2029
|
+
operation: TResourceConfigOperation,
|
|
2030
|
+
contextResourceIdentifiers: Record<string, string>
|
|
2031
|
+
): Promise<ExecutionContext<TResourceConfigOperation>> {
|
|
2032
|
+
|
|
2033
|
+
this.logDebug('Building execution context from socket auth', {
|
|
2034
|
+
executionType: auth.executionType,
|
|
2035
|
+
resourceType: operation.resourceIdentifier,
|
|
2036
|
+
operationIdentifier: operation.operationIdentifier,
|
|
2037
|
+
contextKeys: Object.keys(contextResourceIdentifiers)
|
|
2038
|
+
});
|
|
2039
|
+
|
|
2040
|
+
// Convert contextResourceIdentifiers to Map for ExecutionContext
|
|
2041
|
+
// This is the SAME format used by HTTP request context extraction
|
|
2042
|
+
const contextMap = new Map<string, string | string[]>();
|
|
2043
|
+
for (const [key, value] of Object.entries(contextResourceIdentifiers)) {
|
|
2044
|
+
contextMap.set(key, value);
|
|
2045
|
+
}
|
|
2046
|
+
|
|
2047
|
+
// Build execution context with socket auth info AND context identifiers
|
|
2048
|
+
// SAME ExecutionContext structure as HTTP - enables reuse of:
|
|
2049
|
+
// - AuthorizationsBackendService.authorizeInController()
|
|
2050
|
+
// - All internal validation methods (validateOperationRoles, validateParentScopeAccess, etc.)
|
|
2051
|
+
const executionContext = new ExecutionContext<TResourceConfigOperation>(
|
|
2052
|
+
operation, // Same: operation config
|
|
2053
|
+
auth.executionType, // Same structure: USER_REQUEST, PUBLIC_EXECUTION
|
|
2054
|
+
contextMap, // Same structure: context resource identifiers
|
|
2055
|
+
auth.initiatorIds ?? {}, // Same structure: ExecutionContext_InitiatorIds
|
|
2056
|
+
auth.initiatorRoles, // Same structure: ExecutionContext_RoleInfo[]
|
|
2057
|
+
[] // relationshipContexts - not needed for socket authorization
|
|
2058
|
+
);
|
|
2059
|
+
|
|
2060
|
+
if (auth.consumableTokenValue) {
|
|
2061
|
+
executionContext.setConsumableTokenValue(auth.consumableTokenValue);
|
|
2062
|
+
}
|
|
2063
|
+
|
|
2064
|
+
// Reuse existing helper to populate applicationId
|
|
2065
|
+
await this.populateApplicationIdIfNeeded(executionContext, false);
|
|
2066
|
+
|
|
2067
|
+
return executionContext;
|
|
2068
|
+
}
|
|
2069
|
+
|
|
2070
|
+
/**
|
|
2071
|
+
* Authenticate user for socket.
|
|
2072
|
+
* Uses _fetchUserAndBuildRoles() shared helper - same logic as HTTP auth.
|
|
2073
|
+
*/
|
|
2074
|
+
private async _authenticateUserForSocket(userId: string): Promise<SocketAuthResult> {
|
|
2075
|
+
this.logDebug('Authenticating user for socket', { userId: userId.substring(0, 8) + '...' });
|
|
2076
|
+
|
|
2077
|
+
// Get temp context for DB queries
|
|
2078
|
+
const appReadOp = this.resourcesRegistryService.getOperationFromPath(
|
|
2079
|
+
this.resourcesRegistryService.getOperationPathDefault(CoreResourceType.APPLICATION, CoreResourceOperation.READ)
|
|
2080
|
+
);
|
|
2081
|
+
const tempContext = this._getTempExecutionContext(appReadOp);
|
|
2082
|
+
|
|
2083
|
+
// Use shared helper - same logic as HTTP auth
|
|
2084
|
+
const { initiatorRoles, applicationId } = await this._fetchUserAndBuildRoles(userId, tempContext);
|
|
2085
|
+
|
|
2086
|
+
return {
|
|
2087
|
+
executionType: ExecutionContext_ExecutionType.USER_REQUEST,
|
|
2088
|
+
initiatorIds: { userId, applicationId },
|
|
2089
|
+
initiatorRoles
|
|
2090
|
+
};
|
|
2091
|
+
}
|
|
2092
|
+
|
|
2093
|
+
/**
|
|
2094
|
+
* Resolve the resource field identifier from the operation.
|
|
2095
|
+
* This is the FK field name used when relating to this resource (e.g., 'todoId' for TODOS).
|
|
2096
|
+
* Used to map token.relatedId to the correct parameter name for coherence validation.
|
|
2097
|
+
*/
|
|
2098
|
+
private resolveResourceFieldIdentifier(operation: ResourceConfiguration_Operation<any, any, any>): string | undefined {
|
|
2099
|
+
return operation.resourceFieldIdentifier as string | undefined;
|
|
2100
|
+
}
|
|
2101
|
+
|
|
2102
|
+
}
|