@wildo-ai/saas-backend-lib 1.1.2 → 1.1.3

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.
Files changed (853) hide show
  1. package/dist/esm/applications/services/worker-remote-client-factory.backend.service.d.ts.map +1 -1
  2. package/dist/esm/applications/services/worker-remote-client-factory.backend.service.js +19 -1
  3. package/dist/esm/applications/services/worker-remote-client-factory.backend.service.js.map +1 -1
  4. package/dist/esm/base-classes/models/manual-controllers.backend.definition.d.ts.map +1 -1
  5. package/dist/esm/base-classes/models/manual-controllers.backend.definition.js +4 -0
  6. package/dist/esm/base-classes/models/manual-controllers.backend.definition.js.map +1 -1
  7. package/dist/esm/base-classes/services/batches/child-lifecycle-teardown.batch.backend.service.d.ts +35 -0
  8. package/dist/esm/base-classes/services/batches/child-lifecycle-teardown.batch.backend.service.d.ts.map +1 -0
  9. package/dist/esm/base-classes/services/batches/child-lifecycle-teardown.batch.backend.service.js +111 -0
  10. package/dist/esm/base-classes/services/batches/child-lifecycle-teardown.batch.backend.service.js.map +1 -0
  11. package/dist/esm/base-classes/services/batches/credential-expiry-sweep.batch.backend.service.d.ts +50 -0
  12. package/dist/esm/base-classes/services/batches/credential-expiry-sweep.batch.backend.service.d.ts.map +1 -0
  13. package/dist/esm/base-classes/services/batches/credential-expiry-sweep.batch.backend.service.js +199 -0
  14. package/dist/esm/base-classes/services/batches/credential-expiry-sweep.batch.backend.service.js.map +1 -0
  15. package/dist/esm/base-classes/services/batches/engine-custom-batch-manifests.d.ts +111 -0
  16. package/dist/esm/base-classes/services/batches/engine-custom-batch-manifests.d.ts.map +1 -1
  17. package/dist/esm/base-classes/services/batches/engine-custom-batch-manifests.js +140 -0
  18. package/dist/esm/base-classes/services/batches/engine-custom-batch-manifests.js.map +1 -1
  19. package/dist/esm/base-classes/services/controllers/controller-resource.backend.service.d.ts.map +1 -1
  20. package/dist/esm/base-classes/services/controllers/controller-resource.backend.service.js +27 -6
  21. package/dist/esm/base-classes/services/controllers/controller-resource.backend.service.js.map +1 -1
  22. package/dist/esm/base-classes/services/repositories/http-api/http-api-provider-access.backend.d.ts +124 -13
  23. package/dist/esm/base-classes/services/repositories/http-api/http-api-provider-access.backend.d.ts.map +1 -1
  24. package/dist/esm/base-classes/services/repositories/http-api/http-api-provider-access.backend.js +207 -21
  25. package/dist/esm/base-classes/services/repositories/http-api/http-api-provider-access.backend.js.map +1 -1
  26. package/dist/esm/base-classes/services/repositories/http-api/http-api-read-client.backend.d.ts +60 -8
  27. package/dist/esm/base-classes/services/repositories/http-api/http-api-read-client.backend.d.ts.map +1 -1
  28. package/dist/esm/base-classes/services/repositories/http-api/http-api-read-client.backend.js +174 -26
  29. package/dist/esm/base-classes/services/repositories/http-api/http-api-read-client.backend.js.map +1 -1
  30. package/dist/esm/base-classes/services/repositories/http-api/http-api-resource-repository.backend.service.d.ts +47 -4
  31. package/dist/esm/base-classes/services/repositories/http-api/http-api-resource-repository.backend.service.d.ts.map +1 -1
  32. package/dist/esm/base-classes/services/repositories/http-api/http-api-resource-repository.backend.service.js +96 -29
  33. package/dist/esm/base-classes/services/repositories/http-api/http-api-resource-repository.backend.service.js.map +1 -1
  34. package/dist/esm/base-classes/services/repositories/http-api/http-api-rest-operation-reference.backend.d.ts +55 -0
  35. package/dist/esm/base-classes/services/repositories/http-api/http-api-rest-operation-reference.backend.d.ts.map +1 -0
  36. package/dist/esm/base-classes/services/repositories/http-api/http-api-rest-operation-reference.backend.js +114 -0
  37. package/dist/esm/base-classes/services/repositories/http-api/http-api-rest-operation-reference.backend.js.map +1 -0
  38. package/dist/esm/base-classes/services/repositories/http-api/http-api-transport.backend.d.ts +89 -14
  39. package/dist/esm/base-classes/services/repositories/http-api/http-api-transport.backend.d.ts.map +1 -1
  40. package/dist/esm/base-classes/services/repositories/http-api/http-api-transport.backend.js +84 -11
  41. package/dist/esm/base-classes/services/repositories/http-api/http-api-transport.backend.js.map +1 -1
  42. package/dist/esm/base-classes/services/repositories/infrastructure-tier-contract.backend.d.ts.map +1 -1
  43. package/dist/esm/base-classes/services/repositories/infrastructure-tier-contract.backend.js +9 -1
  44. package/dist/esm/base-classes/services/repositories/infrastructure-tier-contract.backend.js.map +1 -1
  45. package/dist/esm/base-classes/services/repositories/postgresql-resource-repository.backend.service.d.ts +49 -0
  46. package/dist/esm/base-classes/services/repositories/postgresql-resource-repository.backend.service.d.ts.map +1 -1
  47. package/dist/esm/base-classes/services/repositories/postgresql-resource-repository.backend.service.js +171 -18
  48. package/dist/esm/base-classes/services/repositories/postgresql-resource-repository.backend.service.js.map +1 -1
  49. package/dist/esm/base-classes/services/repositories/repositories-registry-handler.backend.service.d.ts.map +1 -1
  50. package/dist/esm/base-classes/services/repositories/repositories-registry-handler.backend.service.js +23 -3
  51. package/dist/esm/base-classes/services/repositories/repositories-registry-handler.backend.service.js.map +1 -1
  52. package/dist/esm/base-classes/services/repositories/repository-resource.backend.service.d.ts.map +1 -1
  53. package/dist/esm/base-classes/services/repositories/repository-resource.backend.service.js +20 -0
  54. package/dist/esm/base-classes/services/repositories/repository-resource.backend.service.js.map +1 -1
  55. package/dist/esm/base-classes/services/services/resource-operation-custom-implementation-base.backend.service.d.ts +22 -0
  56. package/dist/esm/base-classes/services/services/resource-operation-custom-implementation-base.backend.service.d.ts.map +1 -1
  57. package/dist/esm/base-classes/services/services/resource-operation-custom-implementation-base.backend.service.js.map +1 -1
  58. package/dist/esm/base-classes/services/services/resource-status-transition.custom-impl.backend.service.d.ts.map +1 -1
  59. package/dist/esm/base-classes/services/services/resource-status-transition.custom-impl.backend.service.js +4 -1
  60. package/dist/esm/base-classes/services/services/resource-status-transition.custom-impl.backend.service.js.map +1 -1
  61. package/dist/esm/base-classes/services/services/resource-status-transition.definitions.backend.d.ts +11 -0
  62. package/dist/esm/base-classes/services/services/resource-status-transition.definitions.backend.d.ts.map +1 -1
  63. package/dist/esm/base-classes/services/services/resource-status-transition.definitions.backend.js +39 -5
  64. package/dist/esm/base-classes/services/services/resource-status-transition.definitions.backend.js.map +1 -1
  65. package/dist/esm/base-classes/services/services/services-registry-handler.backend.service.d.ts +181 -2
  66. package/dist/esm/base-classes/services/services/services-registry-handler.backend.service.d.ts.map +1 -1
  67. package/dist/esm/base-classes/services/services/services-registry-handler.backend.service.js +529 -41
  68. package/dist/esm/base-classes/services/services/services-registry-handler.backend.service.js.map +1 -1
  69. package/dist/esm/base-classes/services/services/system-access.backend.service.d.ts +36 -3
  70. package/dist/esm/base-classes/services/services/system-access.backend.service.d.ts.map +1 -1
  71. package/dist/esm/base-classes/services/services/system-access.backend.service.js +70 -8
  72. package/dist/esm/base-classes/services/services/system-access.backend.service.js.map +1 -1
  73. package/dist/esm/billing/batches/billing-reconciliation.batch.backend.service.d.ts +28 -0
  74. package/dist/esm/billing/batches/billing-reconciliation.batch.backend.service.d.ts.map +1 -0
  75. package/dist/esm/billing/batches/billing-reconciliation.batch.backend.service.js +90 -0
  76. package/dist/esm/billing/batches/billing-reconciliation.batch.backend.service.js.map +1 -0
  77. package/dist/esm/billing/batches/usage-flush.batch.backend.service.d.ts +44 -0
  78. package/dist/esm/billing/batches/usage-flush.batch.backend.service.d.ts.map +1 -0
  79. package/dist/esm/billing/batches/usage-flush.batch.backend.service.js +99 -0
  80. package/dist/esm/billing/batches/usage-flush.batch.backend.service.js.map +1 -0
  81. package/dist/esm/billing/models/billing-provider-event-settlement.backend.schemas.d.ts +91 -0
  82. package/dist/esm/billing/models/billing-provider-event-settlement.backend.schemas.d.ts.map +1 -0
  83. package/dist/esm/billing/models/billing-provider-event-settlement.backend.schemas.js +152 -0
  84. package/dist/esm/billing/models/billing-provider-event-settlement.backend.schemas.js.map +1 -0
  85. package/dist/esm/billing/services/back-office/billing-reconciliation.backend.service.d.ts +186 -0
  86. package/dist/esm/billing/services/back-office/billing-reconciliation.backend.service.d.ts.map +1 -0
  87. package/dist/esm/billing/services/back-office/billing-reconciliation.backend.service.js +474 -0
  88. package/dist/esm/billing/services/back-office/billing-reconciliation.backend.service.js.map +1 -0
  89. package/dist/esm/billing/services/back-office/product-catalog-sync.backend.service.d.ts +100 -0
  90. package/dist/esm/billing/services/back-office/product-catalog-sync.backend.service.d.ts.map +1 -1
  91. package/dist/esm/billing/services/back-office/product-catalog-sync.backend.service.js +209 -6
  92. package/dist/esm/billing/services/back-office/product-catalog-sync.backend.service.js.map +1 -1
  93. package/dist/esm/billing/services/back-office/usage-metering.backend.service.d.ts +200 -4
  94. package/dist/esm/billing/services/back-office/usage-metering.backend.service.d.ts.map +1 -1
  95. package/dist/esm/billing/services/back-office/usage-metering.backend.service.js +593 -64
  96. package/dist/esm/billing/services/back-office/usage-metering.backend.service.js.map +1 -1
  97. package/dist/esm/billing/services/billing-adapter-registry.backend.d.ts +36 -0
  98. package/dist/esm/billing/services/billing-adapter-registry.backend.d.ts.map +1 -0
  99. package/dist/esm/billing/services/billing-adapter-registry.backend.js +83 -0
  100. package/dist/esm/billing/services/billing-adapter-registry.backend.js.map +1 -0
  101. package/dist/esm/billing/services/billing-checkout-metadata.backend.utils.d.ts +9 -0
  102. package/dist/esm/billing/services/billing-checkout-metadata.backend.utils.d.ts.map +1 -1
  103. package/dist/esm/billing/services/billing-checkout-metadata.backend.utils.js +11 -1
  104. package/dist/esm/billing/services/billing-checkout-metadata.backend.utils.js.map +1 -1
  105. package/dist/esm/billing/services/custom-impl/billing-account.mutations.custom-impl.backend.service.d.ts.map +1 -1
  106. package/dist/esm/billing/services/custom-impl/billing-account.mutations.custom-impl.backend.service.js +48 -7
  107. package/dist/esm/billing/services/custom-impl/billing-account.mutations.custom-impl.backend.service.js.map +1 -1
  108. package/dist/esm/billing/services/custom-impl/billing-custom-impl-utils.backend.d.ts +38 -1
  109. package/dist/esm/billing/services/custom-impl/billing-custom-impl-utils.backend.d.ts.map +1 -1
  110. package/dist/esm/billing/services/custom-impl/billing-custom-impl-utils.backend.js +67 -2
  111. package/dist/esm/billing/services/custom-impl/billing-custom-impl-utils.backend.js.map +1 -1
  112. package/dist/esm/billing/services/custom-impl/billing-custom-implementations.backend.d.ts +30 -1
  113. package/dist/esm/billing/services/custom-impl/billing-custom-implementations.backend.d.ts.map +1 -1
  114. package/dist/esm/billing/services/custom-impl/billing-custom-implementations.backend.js +43 -1
  115. package/dist/esm/billing/services/custom-impl/billing-custom-implementations.backend.js.map +1 -1
  116. package/dist/esm/billing/services/custom-impl/promotion.custom-ops.custom-impl.backend.service.d.ts +11 -3
  117. package/dist/esm/billing/services/custom-impl/promotion.custom-ops.custom-impl.backend.service.d.ts.map +1 -1
  118. package/dist/esm/billing/services/custom-impl/promotion.custom-ops.custom-impl.backend.service.js +30 -16
  119. package/dist/esm/billing/services/custom-impl/promotion.custom-ops.custom-impl.backend.service.js.map +1 -1
  120. package/dist/esm/billing/services/custom-impl/subscription.mutations.custom-impl.backend.service.d.ts.map +1 -1
  121. package/dist/esm/billing/services/custom-impl/subscription.mutations.custom-impl.backend.service.js +104 -25
  122. package/dist/esm/billing/services/custom-impl/subscription.mutations.custom-impl.backend.service.js.map +1 -1
  123. package/dist/esm/billing/services/stripe-standard-billing-provider.backend.service.d.ts +18 -1
  124. package/dist/esm/billing/services/stripe-standard-billing-provider.backend.service.d.ts.map +1 -1
  125. package/dist/esm/billing/services/stripe-standard-billing-provider.backend.service.js +106 -2
  126. package/dist/esm/billing/services/stripe-standard-billing-provider.backend.service.js.map +1 -1
  127. package/dist/esm/billing/services/webhooks/__tests__/settlement-ledger.test-double.d.ts +52 -0
  128. package/dist/esm/billing/services/webhooks/__tests__/settlement-ledger.test-double.d.ts.map +1 -0
  129. package/dist/esm/billing/services/webhooks/__tests__/settlement-ledger.test-double.js +74 -0
  130. package/dist/esm/billing/services/webhooks/__tests__/settlement-ledger.test-double.js.map +1 -0
  131. package/dist/esm/billing/services/webhooks/billing-webhook-event-router.backend.service.d.ts +104 -11
  132. package/dist/esm/billing/services/webhooks/billing-webhook-event-router.backend.service.d.ts.map +1 -1
  133. package/dist/esm/billing/services/webhooks/billing-webhook-event-router.backend.service.js +260 -26
  134. package/dist/esm/billing/services/webhooks/billing-webhook-event-router.backend.service.js.map +1 -1
  135. package/dist/esm/billing/testing/mock-billing-provider.d.ts +30 -1
  136. package/dist/esm/billing/testing/mock-billing-provider.d.ts.map +1 -1
  137. package/dist/esm/billing/testing/mock-billing-provider.js +25 -0
  138. package/dist/esm/billing/testing/mock-billing-provider.js.map +1 -1
  139. package/dist/esm/compliance/audit-trails/batches/audit-logs-archive.batch.backend.service.js +11 -4
  140. package/dist/esm/compliance/audit-trails/batches/audit-logs-archive.batch.backend.service.js.map +1 -1
  141. package/dist/esm/compliance/audit-trails/services/audit-event-dispatcher.backend.service.d.ts +225 -13
  142. package/dist/esm/compliance/audit-trails/services/audit-event-dispatcher.backend.service.d.ts.map +1 -1
  143. package/dist/esm/compliance/audit-trails/services/audit-event-dispatcher.backend.service.js +340 -62
  144. package/dist/esm/compliance/audit-trails/services/audit-event-dispatcher.backend.service.js.map +1 -1
  145. package/dist/esm/compliance/audit-trails/services/audit-logs.backend.service.d.ts +244 -7
  146. package/dist/esm/compliance/audit-trails/services/audit-logs.backend.service.d.ts.map +1 -1
  147. package/dist/esm/compliance/audit-trails/services/audit-logs.backend.service.js +386 -5
  148. package/dist/esm/compliance/audit-trails/services/audit-logs.backend.service.js.map +1 -1
  149. package/dist/esm/compliance/audit-trails/services/composite-audit-log-sink.backend.d.ts.map +1 -1
  150. package/dist/esm/compliance/audit-trails/services/composite-audit-log-sink.backend.js +7 -1
  151. package/dist/esm/compliance/audit-trails/services/composite-audit-log-sink.backend.js.map +1 -1
  152. package/dist/esm/compliance/audit-trails/services/siem-export-config-cache-invalidation.custom-impl.backend.service.d.ts +6 -2
  153. package/dist/esm/compliance/audit-trails/services/siem-export-config-cache-invalidation.custom-impl.backend.service.d.ts.map +1 -1
  154. package/dist/esm/compliance/audit-trails/services/siem-export-config-cache-invalidation.custom-impl.backend.service.js +31 -9
  155. package/dist/esm/compliance/audit-trails/services/siem-export-config-cache-invalidation.custom-impl.backend.service.js.map +1 -1
  156. package/dist/esm/compliance/audit-trails/services/siem-webhook-delivery.backend.service.d.ts +42 -0
  157. package/dist/esm/compliance/audit-trails/services/siem-webhook-delivery.backend.service.d.ts.map +1 -1
  158. package/dist/esm/compliance/audit-trails/services/siem-webhook-delivery.backend.service.js +57 -1
  159. package/dist/esm/compliance/audit-trails/services/siem-webhook-delivery.backend.service.js.map +1 -1
  160. package/dist/esm/compliance/audit-trails/services/utils/leased-value-cache.backend.utils.d.ts +110 -0
  161. package/dist/esm/compliance/audit-trails/services/utils/leased-value-cache.backend.utils.d.ts.map +1 -0
  162. package/dist/esm/compliance/audit-trails/services/utils/leased-value-cache.backend.utils.js +192 -0
  163. package/dist/esm/compliance/audit-trails/services/utils/leased-value-cache.backend.utils.js.map +1 -0
  164. package/dist/esm/compliance/audit-trails/services/utils/ocsf-activity-mapping.backend.utils.d.ts.map +1 -1
  165. package/dist/esm/compliance/audit-trails/services/utils/ocsf-activity-mapping.backend.utils.js +31 -0
  166. package/dist/esm/compliance/audit-trails/services/utils/ocsf-activity-mapping.backend.utils.js.map +1 -1
  167. package/dist/esm/config/bootstrap/application-runtime-profile.backend.d.ts +5 -0
  168. package/dist/esm/config/bootstrap/application-runtime-profile.backend.d.ts.map +1 -1
  169. package/dist/esm/config/bootstrap/application-runtime-profile.backend.js +6 -0
  170. package/dist/esm/config/bootstrap/application-runtime-profile.backend.js.map +1 -1
  171. package/dist/esm/config/models/app-config.backend.schemas.d.ts +142 -46
  172. package/dist/esm/config/models/app-config.backend.schemas.d.ts.map +1 -1
  173. package/dist/esm/config/models/app-config.backend.schemas.js +121 -12
  174. package/dist/esm/config/models/app-config.backend.schemas.js.map +1 -1
  175. package/dist/esm/config/models/provider-runtime-artifact.backend.schemas.d.ts +38 -15
  176. package/dist/esm/config/models/provider-runtime-artifact.backend.schemas.d.ts.map +1 -1
  177. package/dist/esm/config/models/provider-runtime-artifact.backend.schemas.js +17 -2
  178. package/dist/esm/config/models/provider-runtime-artifact.backend.schemas.js.map +1 -1
  179. package/dist/esm/config/services/app-configuration-loader.backend.service.d.ts +0 -1
  180. package/dist/esm/config/services/app-configuration-loader.backend.service.d.ts.map +1 -1
  181. package/dist/esm/config/services/app-configuration-loader.backend.service.js +68 -76
  182. package/dist/esm/config/services/app-configuration-loader.backend.service.js.map +1 -1
  183. package/dist/esm/config/services/app-configuration.backend.service.d.ts.map +1 -1
  184. package/dist/esm/config/services/app-configuration.backend.service.js +23 -1
  185. package/dist/esm/config/services/app-configuration.backend.service.js.map +1 -1
  186. package/dist/esm/config/services/app-configuration.backend.utils.d.ts +33 -0
  187. package/dist/esm/config/services/app-configuration.backend.utils.d.ts.map +1 -1
  188. package/dist/esm/config/services/app-configuration.backend.utils.js +39 -1
  189. package/dist/esm/config/services/app-configuration.backend.utils.js.map +1 -1
  190. package/dist/esm/config/services/application-startup-config-validator.backend.service.d.ts +25 -0
  191. package/dist/esm/config/services/application-startup-config-validator.backend.service.d.ts.map +1 -1
  192. package/dist/esm/config/services/application-startup-config-validator.backend.service.js +41 -1
  193. package/dist/esm/config/services/application-startup-config-validator.backend.service.js.map +1 -1
  194. package/dist/esm/databases/services/postgresql-schema-plan-diff.backend.d.ts.map +1 -1
  195. package/dist/esm/databases/services/postgresql-schema-plan-diff.backend.js +48 -0
  196. package/dist/esm/databases/services/postgresql-schema-plan-diff.backend.js.map +1 -1
  197. package/dist/esm/errors/services/error-builder.backend.service.d.ts +13 -1
  198. package/dist/esm/errors/services/error-builder.backend.service.d.ts.map +1 -1
  199. package/dist/esm/errors/services/error-builder.backend.service.js +13 -1
  200. package/dist/esm/errors/services/error-builder.backend.service.js.map +1 -1
  201. package/dist/esm/errors/services/error-handler.backend.service.d.ts +70 -7
  202. package/dist/esm/errors/services/error-handler.backend.service.d.ts.map +1 -1
  203. package/dist/esm/errors/services/error-handler.backend.service.js +129 -8
  204. package/dist/esm/errors/services/error-handler.backend.service.js.map +1 -1
  205. package/dist/esm/errors/services/rate-limit.backend.service.d.ts +66 -0
  206. package/dist/esm/errors/services/rate-limit.backend.service.d.ts.map +1 -1
  207. package/dist/esm/errors/services/rate-limit.backend.service.js +102 -25
  208. package/dist/esm/errors/services/rate-limit.backend.service.js.map +1 -1
  209. package/dist/esm/errors/utils/error-log-level-classification.backend.utils.d.ts +5 -0
  210. package/dist/esm/errors/utils/error-log-level-classification.backend.utils.d.ts.map +1 -1
  211. package/dist/esm/errors/utils/error-log-level-classification.backend.utils.js +25 -0
  212. package/dist/esm/errors/utils/error-log-level-classification.backend.utils.js.map +1 -1
  213. package/dist/esm/errors/utils/rate-limit-environment-relaxation.backend.utils.d.ts +33 -0
  214. package/dist/esm/errors/utils/rate-limit-environment-relaxation.backend.utils.d.ts.map +1 -1
  215. package/dist/esm/errors/utils/rate-limit-environment-relaxation.backend.utils.js +40 -0
  216. package/dist/esm/errors/utils/rate-limit-environment-relaxation.backend.utils.js.map +1 -1
  217. package/dist/esm/external-data/external-data-pipeline-run.backend.service.d.ts +59 -2
  218. package/dist/esm/external-data/external-data-pipeline-run.backend.service.d.ts.map +1 -1
  219. package/dist/esm/external-data/external-data-pipeline-run.backend.service.js +52 -17
  220. package/dist/esm/external-data/external-data-pipeline-run.backend.service.js.map +1 -1
  221. package/dist/esm/external-providers/models/provider-selection-resolution-evidence.backend.definitions.d.ts +4 -2
  222. package/dist/esm/external-providers/models/provider-selection-resolution-evidence.backend.definitions.d.ts.map +1 -1
  223. package/dist/esm/external-providers/models/provider-selection-resolution-evidence.backend.definitions.js.map +1 -1
  224. package/dist/esm/external-providers/operations/provider-operation-executor.backend.service.d.ts +256 -0
  225. package/dist/esm/external-providers/operations/provider-operation-executor.backend.service.d.ts.map +1 -0
  226. package/dist/esm/external-providers/operations/provider-operation-executor.backend.service.js +333 -0
  227. package/dist/esm/external-providers/operations/provider-operation-executor.backend.service.js.map +1 -0
  228. package/dist/esm/external-providers/operations/provider-operation-request.backend.d.ts +56 -0
  229. package/dist/esm/external-providers/operations/provider-operation-request.backend.d.ts.map +1 -0
  230. package/dist/esm/external-providers/operations/provider-operation-request.backend.js +211 -0
  231. package/dist/esm/external-providers/operations/provider-operation-request.backend.js.map +1 -0
  232. package/dist/esm/external-providers/operations/provider-request-signing.backend.d.ts +45 -0
  233. package/dist/esm/external-providers/operations/provider-request-signing.backend.d.ts.map +1 -0
  234. package/dist/esm/external-providers/operations/provider-request-signing.backend.js +216 -0
  235. package/dist/esm/external-providers/operations/provider-request-signing.backend.js.map +1 -0
  236. package/dist/esm/external-providers/operations/provider-rest-call-client.backend.d.ts +56 -0
  237. package/dist/esm/external-providers/operations/provider-rest-call-client.backend.d.ts.map +1 -0
  238. package/dist/esm/external-providers/operations/provider-rest-call-client.backend.js +78 -0
  239. package/dist/esm/external-providers/operations/provider-rest-call-client.backend.js.map +1 -0
  240. package/dist/esm/external-providers/services/__tests__/mock-external-providers-registry.service.d.ts +1 -1
  241. package/dist/esm/external-providers/services/__tests__/mock-external-providers-registry.service.d.ts.map +1 -1
  242. package/dist/esm/external-providers/services/__tests__/mock-external-providers-registry.service.js +2 -2
  243. package/dist/esm/external-providers/services/__tests__/mock-external-providers-registry.service.js.map +1 -1
  244. package/dist/esm/external-providers/services/backend-provider-loader.backend.service.d.ts +89 -0
  245. package/dist/esm/external-providers/services/backend-provider-loader.backend.service.d.ts.map +1 -0
  246. package/dist/esm/external-providers/services/backend-provider-loader.backend.service.js +164 -0
  247. package/dist/esm/external-providers/services/backend-provider-loader.backend.service.js.map +1 -0
  248. package/dist/esm/external-providers/services/backend-provider-registry.backend.service.d.ts +26 -27
  249. package/dist/esm/external-providers/services/backend-provider-registry.backend.service.d.ts.map +1 -1
  250. package/dist/esm/external-providers/services/backend-provider-registry.backend.service.js +50 -64
  251. package/dist/esm/external-providers/services/backend-provider-registry.backend.service.js.map +1 -1
  252. package/dist/esm/external-providers/services/document-extraction.backend.service.d.ts.map +1 -1
  253. package/dist/esm/external-providers/services/document-extraction.backend.service.js +3 -3
  254. package/dist/esm/external-providers/services/document-extraction.backend.service.js.map +1 -1
  255. package/dist/esm/external-providers/services/embeddings.backend.service.d.ts.map +1 -1
  256. package/dist/esm/external-providers/services/embeddings.backend.service.js +4 -4
  257. package/dist/esm/external-providers/services/embeddings.backend.service.js.map +1 -1
  258. package/dist/esm/external-providers/services/external-providers-registry.backend.service.d.ts +292 -7
  259. package/dist/esm/external-providers/services/external-providers-registry.backend.service.d.ts.map +1 -1
  260. package/dist/esm/external-providers/services/external-providers-registry.backend.service.js +533 -45
  261. package/dist/esm/external-providers/services/external-providers-registry.backend.service.js.map +1 -1
  262. package/dist/esm/external-providers/services/frontend-bootstrap.backend.service.d.ts.map +1 -1
  263. package/dist/esm/external-providers/services/frontend-bootstrap.backend.service.js +25 -2
  264. package/dist/esm/external-providers/services/frontend-bootstrap.backend.service.js.map +1 -1
  265. package/dist/esm/files/controllers/file.controller.d.ts.map +1 -1
  266. package/dist/esm/files/controllers/file.controller.js +21 -13
  267. package/dist/esm/files/controllers/file.controller.js.map +1 -1
  268. package/dist/esm/files/handlers/resource-file-upload-handler.backend.service.d.ts.map +1 -1
  269. package/dist/esm/files/handlers/resource-file-upload-handler.backend.service.js +39 -15
  270. package/dist/esm/files/handlers/resource-file-upload-handler.backend.service.js.map +1 -1
  271. package/dist/esm/files/services/file-scanning.backend.service.d.ts +94 -9
  272. package/dist/esm/files/services/file-scanning.backend.service.d.ts.map +1 -1
  273. package/dist/esm/files/services/file-scanning.backend.service.js +197 -17
  274. package/dist/esm/files/services/file-scanning.backend.service.js.map +1 -1
  275. package/dist/esm/files/services/file-text-extraction.backend.service.d.ts +60 -1
  276. package/dist/esm/files/services/file-text-extraction.backend.service.d.ts.map +1 -1
  277. package/dist/esm/files/services/file-text-extraction.backend.service.js +167 -8
  278. package/dist/esm/files/services/file-text-extraction.backend.service.js.map +1 -1
  279. package/dist/esm/files/services/file-upload-grant.backend.service.d.ts +53 -2
  280. package/dist/esm/files/services/file-upload-grant.backend.service.d.ts.map +1 -1
  281. package/dist/esm/files/services/file-upload-grant.backend.service.js +127 -3
  282. package/dist/esm/files/services/file-upload-grant.backend.service.js.map +1 -1
  283. package/dist/esm/files/services/files.backend.service.d.ts +68 -0
  284. package/dist/esm/files/services/files.backend.service.d.ts.map +1 -1
  285. package/dist/esm/files/services/files.backend.service.js +175 -5
  286. package/dist/esm/files/services/files.backend.service.js.map +1 -1
  287. package/dist/esm/files/storage/application-storage-key.backend.utils.d.ts +109 -0
  288. package/dist/esm/files/storage/application-storage-key.backend.utils.d.ts.map +1 -0
  289. package/dist/esm/files/storage/application-storage-key.backend.utils.js +123 -0
  290. package/dist/esm/files/storage/application-storage-key.backend.utils.js.map +1 -0
  291. package/dist/esm/files/storage/file-storage-provider.types.d.ts +16 -10
  292. package/dist/esm/files/storage/file-storage-provider.types.d.ts.map +1 -1
  293. package/dist/esm/files/storage/file-storage-provider.types.js.map +1 -1
  294. package/dist/esm/files/storage/local-directory-storage-provider.backend.service.d.ts +67 -8
  295. package/dist/esm/files/storage/local-directory-storage-provider.backend.service.d.ts.map +1 -1
  296. package/dist/esm/files/storage/local-directory-storage-provider.backend.service.js +101 -28
  297. package/dist/esm/files/storage/local-directory-storage-provider.backend.service.js.map +1 -1
  298. package/dist/esm/files/storage/wildo-managed-storage-provider.backend.service.d.ts.map +1 -1
  299. package/dist/esm/files/storage/wildo-managed-storage-provider.backend.service.js +8 -55
  300. package/dist/esm/files/storage/wildo-managed-storage-provider.backend.service.js.map +1 -1
  301. package/dist/esm/files/utils/file-field-schema-path.backend.utils.d.ts.map +1 -1
  302. package/dist/esm/files/utils/file-field-schema-path.backend.utils.js +20 -0
  303. package/dist/esm/files/utils/file-field-schema-path.backend.utils.js.map +1 -1
  304. package/dist/esm/files/utils/office-document-text-extraction.backend.utils.d.ts +86 -0
  305. package/dist/esm/files/utils/office-document-text-extraction.backend.utils.d.ts.map +1 -0
  306. package/dist/esm/files/utils/office-document-text-extraction.backend.utils.js +288 -0
  307. package/dist/esm/files/utils/office-document-text-extraction.backend.utils.js.map +1 -0
  308. package/dist/esm/flows-actors/a2a/batches/a2a-abandoned-task-sweep.batch.backend.service.d.ts +15 -0
  309. package/dist/esm/flows-actors/a2a/batches/a2a-abandoned-task-sweep.batch.backend.service.d.ts.map +1 -1
  310. package/dist/esm/flows-actors/a2a/batches/a2a-abandoned-task-sweep.batch.backend.service.js +76 -5
  311. package/dist/esm/flows-actors/a2a/batches/a2a-abandoned-task-sweep.batch.backend.service.js.map +1 -1
  312. package/dist/esm/flows-actors/a2a/controllers/a2a.controller.d.ts.map +1 -1
  313. package/dist/esm/flows-actors/a2a/controllers/a2a.controller.js +6 -1
  314. package/dist/esm/flows-actors/a2a/controllers/a2a.controller.js.map +1 -1
  315. package/dist/esm/flows-actors/a2a/models/a2a.backend.schemas.d.ts +60 -0
  316. package/dist/esm/flows-actors/a2a/models/a2a.backend.schemas.d.ts.map +1 -1
  317. package/dist/esm/flows-actors/a2a/models/a2a.backend.schemas.js +63 -0
  318. package/dist/esm/flows-actors/a2a/models/a2a.backend.schemas.js.map +1 -1
  319. package/dist/esm/flows-actors/a2a/services/a2a-task-cancellation.backend.service.d.ts +74 -0
  320. package/dist/esm/flows-actors/a2a/services/a2a-task-cancellation.backend.service.d.ts.map +1 -1
  321. package/dist/esm/flows-actors/a2a/services/a2a-task-cancellation.backend.service.js +196 -40
  322. package/dist/esm/flows-actors/a2a/services/a2a-task-cancellation.backend.service.js.map +1 -1
  323. package/dist/esm/flows-actors/a2a/services/a2a-task.backend.service.d.ts +7 -1
  324. package/dist/esm/flows-actors/a2a/services/a2a-task.backend.service.d.ts.map +1 -1
  325. package/dist/esm/flows-actors/a2a/services/a2a-task.backend.service.js +53 -1
  326. package/dist/esm/flows-actors/a2a/services/a2a-task.backend.service.js.map +1 -1
  327. package/dist/esm/flows-actors/a2a/services/a2a-token-budget.backend.service.d.ts +18 -0
  328. package/dist/esm/flows-actors/a2a/services/a2a-token-budget.backend.service.d.ts.map +1 -1
  329. package/dist/esm/flows-actors/a2a/services/a2a-token-budget.backend.service.js +18 -0
  330. package/dist/esm/flows-actors/a2a/services/a2a-token-budget.backend.service.js.map +1 -1
  331. package/dist/esm/flows-actors/a2a/services/a2a.backend.service.d.ts +12 -7
  332. package/dist/esm/flows-actors/a2a/services/a2a.backend.service.d.ts.map +1 -1
  333. package/dist/esm/flows-actors/a2a/services/a2a.backend.service.js.map +1 -1
  334. package/dist/esm/flows-actors/models/agent-catalogs.backend.definitions.d.ts +0 -13
  335. package/dist/esm/flows-actors/models/agent-catalogs.backend.definitions.d.ts.map +1 -1
  336. package/dist/esm/flows-actors/models/agent-catalogs.backend.definitions.js +14 -22
  337. package/dist/esm/flows-actors/models/agent-catalogs.backend.definitions.js.map +1 -1
  338. package/dist/esm/flows-actors/models/core-facets.backend.definitions.d.ts +8 -3
  339. package/dist/esm/flows-actors/models/core-facets.backend.definitions.d.ts.map +1 -1
  340. package/dist/esm/flows-actors/models/core-facets.backend.definitions.js +25 -15
  341. package/dist/esm/flows-actors/models/core-facets.backend.definitions.js.map +1 -1
  342. package/dist/esm/flows-actors/models/flows-actors.backend.schemas.d.ts +13 -1
  343. package/dist/esm/flows-actors/models/flows-actors.backend.schemas.d.ts.map +1 -1
  344. package/dist/esm/flows-actors/models/flows-actors.backend.schemas.js.map +1 -1
  345. package/dist/esm/flows-actors/models/function-tools.backend.definitions.d.ts +88 -8
  346. package/dist/esm/flows-actors/models/function-tools.backend.definitions.d.ts.map +1 -1
  347. package/dist/esm/flows-actors/models/function-tools.backend.definitions.js +333 -31
  348. package/dist/esm/flows-actors/models/function-tools.backend.definitions.js.map +1 -1
  349. package/dist/esm/flows-actors/models/market-generation.actors-system.backend.definitions.d.ts.map +1 -1
  350. package/dist/esm/flows-actors/models/market-generation.actors-system.backend.definitions.js +4 -2
  351. package/dist/esm/flows-actors/models/market-generation.actors-system.backend.definitions.js.map +1 -1
  352. package/dist/esm/flows-actors/models/mcp-client.backend.definitions.d.ts +113 -0
  353. package/dist/esm/flows-actors/models/mcp-client.backend.definitions.d.ts.map +1 -0
  354. package/dist/esm/flows-actors/models/mcp-client.backend.definitions.js +62 -0
  355. package/dist/esm/flows-actors/models/mcp-client.backend.definitions.js.map +1 -0
  356. package/dist/esm/flows-actors/services/actors-system.backend.service.d.ts.map +1 -1
  357. package/dist/esm/flows-actors/services/actors-system.backend.service.js +0 -2
  358. package/dist/esm/flows-actors/services/actors-system.backend.service.js.map +1 -1
  359. package/dist/esm/flows-actors/services/agents.backend.service.d.ts +28 -1
  360. package/dist/esm/flows-actors/services/agents.backend.service.d.ts.map +1 -1
  361. package/dist/esm/flows-actors/services/agents.backend.service.js +204 -18
  362. package/dist/esm/flows-actors/services/agents.backend.service.js.map +1 -1
  363. package/dist/esm/flows-actors/services/conversational-execution.backend.service.d.ts +5 -1
  364. package/dist/esm/flows-actors/services/conversational-execution.backend.service.d.ts.map +1 -1
  365. package/dist/esm/flows-actors/services/conversational-execution.backend.service.js +79 -16
  366. package/dist/esm/flows-actors/services/conversational-execution.backend.service.js.map +1 -1
  367. package/dist/esm/flows-actors/services/flows-actors-registry.service.d.ts +34 -5
  368. package/dist/esm/flows-actors/services/flows-actors-registry.service.d.ts.map +1 -1
  369. package/dist/esm/flows-actors/services/flows-actors-registry.service.js +154 -20
  370. package/dist/esm/flows-actors/services/flows-actors-registry.service.js.map +1 -1
  371. package/dist/esm/flows-actors/services/flows.backend.services.d.ts.map +1 -1
  372. package/dist/esm/flows-actors/services/flows.backend.services.js +27 -23
  373. package/dist/esm/flows-actors/services/flows.backend.services.js.map +1 -1
  374. package/dist/esm/flows-actors/services/llm-observability-agent-call-trace-sink.backend.d.ts.map +1 -1
  375. package/dist/esm/flows-actors/services/llm-observability-agent-call-trace-sink.backend.js +7 -1
  376. package/dist/esm/flows-actors/services/llm-observability-agent-call-trace-sink.backend.js.map +1 -1
  377. package/dist/esm/flows-actors/services/mcp-client.backend.service.d.ts +90 -0
  378. package/dist/esm/flows-actors/services/mcp-client.backend.service.d.ts.map +1 -0
  379. package/dist/esm/flows-actors/services/mcp-client.backend.service.js +368 -0
  380. package/dist/esm/flows-actors/services/mcp-client.backend.service.js.map +1 -0
  381. package/dist/esm/flows-actors/services/prompt-compiler.backend.service.d.ts +9 -5
  382. package/dist/esm/flows-actors/services/prompt-compiler.backend.service.d.ts.map +1 -1
  383. package/dist/esm/flows-actors/services/prompt-compiler.backend.service.js +12 -17
  384. package/dist/esm/flows-actors/services/prompt-compiler.backend.service.js.map +1 -1
  385. package/dist/esm/flows-actors/utils/acp-session-runner.backend.utils.d.ts.map +1 -1
  386. package/dist/esm/flows-actors/utils/acp-session-runner.backend.utils.js +8 -4
  387. package/dist/esm/flows-actors/utils/acp-session-runner.backend.utils.js.map +1 -1
  388. package/dist/esm/flows-actors/utils/meta-workflow-canonical-json.backend.utils.d.ts +0 -207
  389. package/dist/esm/flows-actors/utils/meta-workflow-canonical-json.backend.utils.d.ts.map +1 -1
  390. package/dist/esm/flows-actors/utils/meta-workflow-canonical-json.backend.utils.js +8 -243
  391. package/dist/esm/flows-actors/utils/meta-workflow-canonical-json.backend.utils.js.map +1 -1
  392. package/dist/esm/flows-actors/utils/meta-workflow-structured-generation-plan.backend.utils.d.ts.map +1 -1
  393. package/dist/esm/flows-actors/utils/meta-workflow-structured-generation-plan.backend.utils.js.map +1 -1
  394. package/dist/esm/guidance/services/milestone-evaluator.backend.service.d.ts +9 -14
  395. package/dist/esm/guidance/services/milestone-evaluator.backend.service.d.ts.map +1 -1
  396. package/dist/esm/guidance/services/milestone-evaluator.backend.service.js +18 -89
  397. package/dist/esm/guidance/services/milestone-evaluator.backend.service.js.map +1 -1
  398. package/dist/esm/guidance/services/progression-state-store.backend.service.d.ts +86 -0
  399. package/dist/esm/guidance/services/progression-state-store.backend.service.d.ts.map +1 -0
  400. package/dist/esm/guidance/services/progression-state-store.backend.service.js +155 -0
  401. package/dist/esm/guidance/services/progression-state-store.backend.service.js.map +1 -0
  402. package/dist/esm/i18n/controllers/i18n-controller.backend.service.d.ts +10 -0
  403. package/dist/esm/i18n/controllers/i18n-controller.backend.service.d.ts.map +1 -1
  404. package/dist/esm/i18n/controllers/i18n-controller.backend.service.js +55 -5
  405. package/dist/esm/i18n/controllers/i18n-controller.backend.service.js.map +1 -1
  406. package/dist/esm/index.d.ts +11 -4
  407. package/dist/esm/index.d.ts.map +1 -1
  408. package/dist/esm/index.js +31 -4
  409. package/dist/esm/index.js.map +1 -1
  410. package/dist/esm/inject/models/container.d.ts.map +1 -1
  411. package/dist/esm/inject/models/container.js +78 -10
  412. package/dist/esm/inject/models/container.js.map +1 -1
  413. package/dist/esm/inject/models/service-types.d.ts +17 -3
  414. package/dist/esm/inject/models/service-types.d.ts.map +1 -1
  415. package/dist/esm/inject/models/service-types.js +19 -3
  416. package/dist/esm/inject/models/service-types.js.map +1 -1
  417. package/dist/esm/mcp/controllers/mcp.controller.d.ts.map +1 -1
  418. package/dist/esm/mcp/controllers/mcp.controller.js +20 -0
  419. package/dist/esm/mcp/controllers/mcp.controller.js.map +1 -1
  420. package/dist/esm/mcp/services/mcp-server.backend.service.d.ts +56 -1
  421. package/dist/esm/mcp/services/mcp-server.backend.service.d.ts.map +1 -1
  422. package/dist/esm/mcp/services/mcp-server.backend.service.js +107 -11
  423. package/dist/esm/mcp/services/mcp-server.backend.service.js.map +1 -1
  424. package/dist/esm/mcp/services/mcp-tool-adapter.backend.service.d.ts.map +1 -1
  425. package/dist/esm/mcp/services/mcp-tool-adapter.backend.service.js +22 -0
  426. package/dist/esm/mcp/services/mcp-tool-adapter.backend.service.js.map +1 -1
  427. package/dist/esm/monitoring/analytics/controllers/analytics.backend.controller.d.ts.map +1 -1
  428. package/dist/esm/monitoring/analytics/controllers/analytics.backend.controller.js +49 -4
  429. package/dist/esm/monitoring/analytics/controllers/analytics.backend.controller.js.map +1 -1
  430. package/dist/esm/monitoring/analytics/services/value-moment-definition-registry.backend.service.d.ts +66 -0
  431. package/dist/esm/monitoring/analytics/services/value-moment-definition-registry.backend.service.d.ts.map +1 -0
  432. package/dist/esm/monitoring/analytics/services/value-moment-definition-registry.backend.service.js +199 -0
  433. package/dist/esm/monitoring/analytics/services/value-moment-definition-registry.backend.service.js.map +1 -0
  434. package/dist/esm/monitoring/analytics/services/value-moment-engine.backend.service.d.ts +149 -13
  435. package/dist/esm/monitoring/analytics/services/value-moment-engine.backend.service.d.ts.map +1 -1
  436. package/dist/esm/monitoring/analytics/services/value-moment-engine.backend.service.js +411 -19
  437. package/dist/esm/monitoring/analytics/services/value-moment-engine.backend.service.js.map +1 -1
  438. package/dist/esm/monitoring/analytics/services/value-moment-handler-registry.backend.service.d.ts +11 -2
  439. package/dist/esm/monitoring/analytics/services/value-moment-handler-registry.backend.service.d.ts.map +1 -1
  440. package/dist/esm/monitoring/analytics/services/value-moment-handler-registry.backend.service.js.map +1 -1
  441. package/dist/esm/monitoring/logger/models/logger.backend.schemas.d.ts +28 -9
  442. package/dist/esm/monitoring/logger/models/logger.backend.schemas.d.ts.map +1 -1
  443. package/dist/esm/monitoring/logger/models/logger.backend.schemas.js +30 -10
  444. package/dist/esm/monitoring/logger/models/logger.backend.schemas.js.map +1 -1
  445. package/dist/esm/monitoring/logger/services/logger.service.d.ts +12 -0
  446. package/dist/esm/monitoring/logger/services/logger.service.d.ts.map +1 -1
  447. package/dist/esm/monitoring/logger/services/logger.service.js +52 -11
  448. package/dist/esm/monitoring/logger/services/logger.service.js.map +1 -1
  449. package/dist/esm/monitoring/logger/utils/log-severity-floor.backend.utils.d.ts +62 -0
  450. package/dist/esm/monitoring/logger/utils/log-severity-floor.backend.utils.d.ts.map +1 -0
  451. package/dist/esm/monitoring/logger/utils/log-severity-floor.backend.utils.js +78 -0
  452. package/dist/esm/monitoring/logger/utils/log-severity-floor.backend.utils.js.map +1 -0
  453. package/dist/esm/monitoring/observability/audit-observation-emission.backend.d.ts +309 -0
  454. package/dist/esm/monitoring/observability/audit-observation-emission.backend.d.ts.map +1 -0
  455. package/dist/esm/monitoring/observability/audit-observation-emission.backend.js +385 -0
  456. package/dist/esm/monitoring/observability/audit-observation-emission.backend.js.map +1 -0
  457. package/dist/esm/monitoring/observability/models/observability.backend.schemas.d.ts +1 -0
  458. package/dist/esm/monitoring/observability/models/observability.backend.schemas.d.ts.map +1 -1
  459. package/dist/esm/monitoring/observability/models/observability.backend.schemas.js.map +1 -1
  460. package/dist/esm/monitoring/observability/services/metrics.service.d.ts +21 -0
  461. package/dist/esm/monitoring/observability/services/metrics.service.d.ts.map +1 -1
  462. package/dist/esm/monitoring/observability/services/metrics.service.js +38 -0
  463. package/dist/esm/monitoring/observability/services/metrics.service.js.map +1 -1
  464. package/dist/esm/notifications/email/models/email-context-provider.interface.d.ts +0 -80
  465. package/dist/esm/notifications/email/models/email-context-provider.interface.d.ts.map +0 -1
  466. package/dist/esm/notifications/email/models/email-context-provider.interface.js +0 -25
  467. package/dist/esm/notifications/email/models/email-context-provider.interface.js.map +0 -1
  468. package/dist/esm/notifications/email/services/email-context-provider-registry.backend.service.d.ts +0 -49
  469. package/dist/esm/notifications/email/services/email-context-provider-registry.backend.service.d.ts.map +0 -1
  470. package/dist/esm/notifications/email/services/email-context-provider-registry.backend.service.js +0 -141
  471. package/dist/esm/notifications/email/services/email-context-provider-registry.backend.service.js.map +0 -1
  472. package/dist/esm/notifications/email/services/email-template-compiler.backend.service.d.ts +0 -37
  473. package/dist/esm/notifications/email/services/email-template-compiler.backend.service.d.ts.map +0 -1
  474. package/dist/esm/notifications/email/services/email-template-compiler.backend.service.js +0 -121
  475. package/dist/esm/notifications/email/services/email-template-compiler.backend.service.js.map +0 -1
  476. package/dist/esm/notifications/email/services/email-template-registry.backend.service.d.ts +66 -1
  477. package/dist/esm/notifications/email/services/email-template-registry.backend.service.d.ts.map +1 -1
  478. package/dist/esm/notifications/email/services/email-template-registry.backend.service.js +105 -10
  479. package/dist/esm/notifications/email/services/email-template-registry.backend.service.js.map +1 -1
  480. package/dist/esm/notifications/email/services/email-template-sandbox.backend.service.d.ts +0 -58
  481. package/dist/esm/notifications/email/services/email-template-sandbox.backend.service.d.ts.map +0 -1
  482. package/dist/esm/notifications/email/services/email-template-sandbox.backend.service.js +0 -223
  483. package/dist/esm/notifications/email/services/email-template-sandbox.backend.service.js.map +0 -1
  484. package/dist/esm/notifications/email/services/email-template-validator.backend.service.d.ts.map +1 -1
  485. package/dist/esm/notifications/email/services/email-template-validator.backend.service.js +10 -1
  486. package/dist/esm/notifications/email/services/email-template-validator.backend.service.js.map +1 -1
  487. package/dist/esm/notifications/email/services/email.backend.service.d.ts +60 -4
  488. package/dist/esm/notifications/email/services/email.backend.service.d.ts.map +1 -1
  489. package/dist/esm/notifications/email/services/email.backend.service.js +145 -43
  490. package/dist/esm/notifications/email/services/email.backend.service.js.map +1 -1
  491. package/dist/esm/notifications/email/utils/color-conversion.utils.d.ts +0 -1
  492. package/dist/esm/notifications/email/utils/color-conversion.utils.d.ts.map +1 -1
  493. package/dist/esm/notifications/email/utils/color-conversion.utils.js.map +1 -1
  494. package/dist/esm/notifications/services/notification-badge.backend.service.d.ts +142 -21
  495. package/dist/esm/notifications/services/notification-badge.backend.service.d.ts.map +1 -1
  496. package/dist/esm/notifications/services/notification-badge.backend.service.js +283 -58
  497. package/dist/esm/notifications/services/notification-badge.backend.service.js.map +1 -1
  498. package/dist/esm/notifications/services/notifications-dispatcher.backend.service.d.ts +99 -13
  499. package/dist/esm/notifications/services/notifications-dispatcher.backend.service.d.ts.map +1 -1
  500. package/dist/esm/notifications/services/notifications-dispatcher.backend.service.js +422 -66
  501. package/dist/esm/notifications/services/notifications-dispatcher.backend.service.js.map +1 -1
  502. package/dist/esm/notifications/sms/services/sms.backend.service.d.ts +2 -2
  503. package/dist/esm/notifications/sms/services/sms.backend.service.d.ts.map +1 -1
  504. package/dist/esm/notifications/sms/services/sms.backend.service.js +5 -5
  505. package/dist/esm/notifications/sms/services/sms.backend.service.js.map +1 -1
  506. package/dist/esm/notifications/webhooks/controllers/webhook-auto-controller.backend.service.d.ts +117 -5
  507. package/dist/esm/notifications/webhooks/controllers/webhook-auto-controller.backend.service.d.ts.map +1 -1
  508. package/dist/esm/notifications/webhooks/controllers/webhook-auto-controller.backend.service.js +164 -6
  509. package/dist/esm/notifications/webhooks/controllers/webhook-auto-controller.backend.service.js.map +1 -1
  510. package/dist/esm/notifications/webhooks/outbound/batches/m2m-webhook-delivery.batch.backend.service.d.ts +0 -6
  511. package/dist/esm/notifications/webhooks/outbound/batches/m2m-webhook-delivery.batch.backend.service.d.ts.map +1 -1
  512. package/dist/esm/notifications/webhooks/outbound/batches/m2m-webhook-delivery.batch.backend.service.js +46 -1
  513. package/dist/esm/notifications/webhooks/outbound/batches/m2m-webhook-delivery.batch.backend.service.js.map +1 -1
  514. package/dist/esm/notifications/webhooks/outbound/m2m-webhook-signed-request.backend.utils.d.ts.map +1 -1
  515. package/dist/esm/notifications/webhooks/outbound/m2m-webhook-signed-request.backend.utils.js +16 -6
  516. package/dist/esm/notifications/webhooks/outbound/m2m-webhook-signed-request.backend.utils.js.map +1 -1
  517. package/dist/esm/notifications/webhooks/outbound/services/webhook-config-test-endpoint.custom-impl.backend.service.d.ts.map +1 -1
  518. package/dist/esm/notifications/webhooks/outbound/services/webhook-config-test-endpoint.custom-impl.backend.service.js +12 -12
  519. package/dist/esm/notifications/webhooks/outbound/services/webhook-config-test-endpoint.custom-impl.backend.service.js.map +1 -1
  520. package/dist/esm/notifications/webhooks/services/webhook-handler.backend.service.d.ts +16 -0
  521. package/dist/esm/notifications/webhooks/services/webhook-handler.backend.service.d.ts.map +1 -1
  522. package/dist/esm/notifications/webhooks/services/webhook-handler.backend.service.js +18 -0
  523. package/dist/esm/notifications/webhooks/services/webhook-handler.backend.service.js.map +1 -1
  524. package/dist/esm/organizations/batches/organization-purge.batch.backend.service.d.ts +2 -2
  525. package/dist/esm/organizations/batches/organization-purge.batch.backend.service.js +2 -2
  526. package/dist/esm/organizations/batches/organization-purge.batch.backend.service.js.map +1 -1
  527. package/dist/esm/organizations/services/organization-custom-implementation.backend.service.d.ts.map +1 -1
  528. package/dist/esm/organizations/services/organization-custom-implementation.backend.service.js +63 -2
  529. package/dist/esm/organizations/services/organization-custom-implementation.backend.service.js.map +1 -1
  530. package/dist/esm/queue/adapters/in-memory-queue-adapter.backend.service.d.ts +66 -0
  531. package/dist/esm/queue/adapters/in-memory-queue-adapter.backend.service.d.ts.map +1 -0
  532. package/dist/esm/queue/adapters/in-memory-queue-adapter.backend.service.js +257 -0
  533. package/dist/esm/queue/adapters/in-memory-queue-adapter.backend.service.js.map +1 -0
  534. package/dist/esm/queue/adapters/queue-adapter.backend.binding.d.ts +12 -0
  535. package/dist/esm/queue/adapters/queue-adapter.backend.binding.d.ts.map +1 -0
  536. package/dist/esm/queue/adapters/queue-adapter.backend.binding.js +47 -0
  537. package/dist/esm/queue/adapters/queue-adapter.backend.binding.js.map +1 -0
  538. package/dist/esm/queue/adapters/queue-adapter.backend.interface.d.ts +87 -0
  539. package/dist/esm/queue/adapters/queue-adapter.backend.interface.d.ts.map +1 -0
  540. package/dist/esm/queue/adapters/queue-adapter.backend.interface.js +1 -0
  541. package/dist/esm/queue/adapters/queue-adapter.backend.interface.js.map +1 -0
  542. package/dist/esm/queue/adapters/queue-adapter.backend.options.d.ts +31 -0
  543. package/dist/esm/queue/adapters/queue-adapter.backend.options.d.ts.map +1 -0
  544. package/dist/esm/queue/adapters/queue-adapter.backend.options.js +13 -0
  545. package/dist/esm/queue/adapters/queue-adapter.backend.options.js.map +1 -0
  546. package/dist/esm/queue/adapters/rabbitmq-adapter.backend.service.d.ts +19 -25
  547. package/dist/esm/queue/adapters/rabbitmq-adapter.backend.service.d.ts.map +1 -1
  548. package/dist/esm/queue/adapters/rabbitmq-adapter.backend.service.js +33 -0
  549. package/dist/esm/queue/adapters/rabbitmq-adapter.backend.service.js.map +1 -1
  550. package/dist/esm/queue/domain-queue-consumer.backend.service.d.ts +2 -2
  551. package/dist/esm/queue/domain-queue-consumer.backend.service.d.ts.map +1 -1
  552. package/dist/esm/queue/domain-queue-consumer.backend.service.js +1 -4
  553. package/dist/esm/queue/domain-queue-consumer.backend.service.js.map +1 -1
  554. package/dist/esm/queue/job-consumer.backend.service.d.ts +2 -2
  555. package/dist/esm/queue/job-consumer.backend.service.d.ts.map +1 -1
  556. package/dist/esm/queue/job-consumer.backend.service.js +1 -4
  557. package/dist/esm/queue/job-consumer.backend.service.js.map +1 -1
  558. package/dist/esm/queue/job-executor.backend.service.d.ts +2 -2
  559. package/dist/esm/queue/job-executor.backend.service.d.ts.map +1 -1
  560. package/dist/esm/queue/job-executor.backend.service.js +1 -4
  561. package/dist/esm/queue/job-executor.backend.service.js.map +1 -1
  562. package/dist/esm/queue/queue-monitoring.backend.service.d.ts +8 -4
  563. package/dist/esm/queue/queue-monitoring.backend.service.d.ts.map +1 -1
  564. package/dist/esm/queue/queue-monitoring.backend.service.js +25 -17
  565. package/dist/esm/queue/queue-monitoring.backend.service.js.map +1 -1
  566. package/dist/esm/queue/queue-worker-initializer.backend.service.d.ts +16 -1
  567. package/dist/esm/queue/queue-worker-initializer.backend.service.d.ts.map +1 -1
  568. package/dist/esm/queue/queue-worker-initializer.backend.service.js +16 -1
  569. package/dist/esm/queue/queue-worker-initializer.backend.service.js.map +1 -1
  570. package/dist/esm/queue/queue.backend.service.d.ts +3 -3
  571. package/dist/esm/queue/queue.backend.service.d.ts.map +1 -1
  572. package/dist/esm/queue/queue.backend.service.js +26 -4
  573. package/dist/esm/queue/queue.backend.service.js.map +1 -1
  574. package/dist/esm/queue/worker-shutdown-manager.backend.service.d.ts +2 -2
  575. package/dist/esm/queue/worker-shutdown-manager.backend.service.d.ts.map +1 -1
  576. package/dist/esm/queue/worker-shutdown-manager.backend.service.js +18 -3
  577. package/dist/esm/queue/worker-shutdown-manager.backend.service.js.map +1 -1
  578. package/dist/esm/rag/utils/rag-chunking.backend.utils.d.ts +50 -25
  579. package/dist/esm/rag/utils/rag-chunking.backend.utils.d.ts.map +1 -1
  580. package/dist/esm/rag/utils/rag-chunking.backend.utils.js +147 -39
  581. package/dist/esm/rag/utils/rag-chunking.backend.utils.js.map +1 -1
  582. package/dist/esm/rag/utils/rag-context-assembly.backend.utils.d.ts +12 -3
  583. package/dist/esm/rag/utils/rag-context-assembly.backend.utils.d.ts.map +1 -1
  584. package/dist/esm/rag/utils/rag-context-assembly.backend.utils.js +12 -3
  585. package/dist/esm/rag/utils/rag-context-assembly.backend.utils.js.map +1 -1
  586. package/dist/esm/requests/service/websocket.service.d.ts +9 -0
  587. package/dist/esm/requests/service/websocket.service.d.ts.map +1 -1
  588. package/dist/esm/requests/service/websocket.service.js +32 -8
  589. package/dist/esm/requests/service/websocket.service.js.map +1 -1
  590. package/dist/esm/resources/models/custom-service-implementations.backend.definition.d.ts.map +1 -1
  591. package/dist/esm/resources/models/custom-service-implementations.backend.definition.js +14 -2
  592. package/dist/esm/resources/models/custom-service-implementations.backend.definition.js.map +1 -1
  593. package/dist/esm/resources/models/resources-operations.backend.definitions.d.ts.map +1 -1
  594. package/dist/esm/resources/models/resources-operations.backend.definitions.js +2 -0
  595. package/dist/esm/resources/models/resources-operations.backend.definitions.js.map +1 -1
  596. package/dist/esm/resources/models/resources-relationships.backend.definitions.d.ts.map +1 -1
  597. package/dist/esm/resources/models/resources-relationships.backend.definitions.js +14 -0
  598. package/dist/esm/resources/models/resources-relationships.backend.definitions.js.map +1 -1
  599. package/dist/esm/resources/models/resources-types.backend.schemas.d.ts +2 -1
  600. package/dist/esm/resources/models/resources-types.backend.schemas.d.ts.map +1 -1
  601. package/dist/esm/resources/models/resources-types.backend.schemas.js +8 -0
  602. package/dist/esm/resources/models/resources-types.backend.schemas.js.map +1 -1
  603. package/dist/esm/resources/services/resources-registry.backend.service.d.ts +60 -5
  604. package/dist/esm/resources/services/resources-registry.backend.service.d.ts.map +1 -1
  605. package/dist/esm/resources/services/resources-registry.backend.service.js +90 -6
  606. package/dist/esm/resources/services/resources-registry.backend.service.js.map +1 -1
  607. package/dist/esm/runtime/controllers/health-controller.backend.service.d.ts +36 -3
  608. package/dist/esm/runtime/controllers/health-controller.backend.service.d.ts.map +1 -1
  609. package/dist/esm/runtime/controllers/health-controller.backend.service.js +32 -10
  610. package/dist/esm/runtime/controllers/health-controller.backend.service.js.map +1 -1
  611. package/dist/esm/runtime/domain-module.backend.definitions.d.ts +24 -0
  612. package/dist/esm/runtime/domain-module.backend.definitions.d.ts.map +1 -1
  613. package/dist/esm/runtime/domain-module.backend.definitions.js +24 -0
  614. package/dist/esm/runtime/domain-module.backend.definitions.js.map +1 -1
  615. package/dist/esm/runtime/services/health-readiness-contributor.backend.interface.d.ts +51 -0
  616. package/dist/esm/runtime/services/health-readiness-contributor.backend.interface.d.ts.map +1 -1
  617. package/dist/esm/runtime/services/health-readiness-contributor.backend.interface.js.map +1 -1
  618. package/dist/esm/runtime/services/http-server.backend.service.d.ts +26 -0
  619. package/dist/esm/runtime/services/http-server.backend.service.d.ts.map +1 -1
  620. package/dist/esm/runtime/services/http-server.backend.service.js +181 -1
  621. package/dist/esm/runtime/services/http-server.backend.service.js.map +1 -1
  622. package/dist/esm/runtime/services/start-application.backend.service.d.ts +19 -1
  623. package/dist/esm/runtime/services/start-application.backend.service.d.ts.map +1 -1
  624. package/dist/esm/runtime/services/start-application.backend.service.js +261 -77
  625. package/dist/esm/runtime/services/start-application.backend.service.js.map +1 -1
  626. package/dist/esm/security/api-keys/api-keys.custom-impl.backend.service.d.ts +15 -0
  627. package/dist/esm/security/api-keys/api-keys.custom-impl.backend.service.d.ts.map +1 -1
  628. package/dist/esm/security/api-keys/api-keys.custom-impl.backend.service.js +28 -0
  629. package/dist/esm/security/api-keys/api-keys.custom-impl.backend.service.js.map +1 -1
  630. package/dist/esm/security/authentications/batches/anonymous-session-cleanup.batch.backend.service.d.ts +5 -1
  631. package/dist/esm/security/authentications/batches/anonymous-session-cleanup.batch.backend.service.d.ts.map +1 -1
  632. package/dist/esm/security/authentications/batches/anonymous-session-cleanup.batch.backend.service.js +24 -4
  633. package/dist/esm/security/authentications/batches/anonymous-session-cleanup.batch.backend.service.js.map +1 -1
  634. package/dist/esm/security/authentications/controllers/authentication-controller.backend.service.d.ts.map +1 -1
  635. package/dist/esm/security/authentications/controllers/authentication-controller.backend.service.js +29 -4
  636. package/dist/esm/security/authentications/controllers/authentication-controller.backend.service.js.map +1 -1
  637. package/dist/esm/security/authentications/controllers/oauth-provider-controller.backend.service.d.ts +114 -0
  638. package/dist/esm/security/authentications/controllers/oauth-provider-controller.backend.service.d.ts.map +1 -1
  639. package/dist/esm/security/authentications/controllers/oauth-provider-controller.backend.service.js +354 -3
  640. package/dist/esm/security/authentications/controllers/oauth-provider-controller.backend.service.js.map +1 -1
  641. package/dist/esm/security/authentications/models/cimd.backend.schemas.d.ts +1 -0
  642. package/dist/esm/security/authentications/models/cimd.backend.schemas.d.ts.map +1 -1
  643. package/dist/esm/security/authentications/models/cimd.backend.schemas.js +22 -0
  644. package/dist/esm/security/authentications/models/cimd.backend.schemas.js.map +1 -1
  645. package/dist/esm/security/authentications/models/oauth2-connection.backend.schemas.d.ts +15 -0
  646. package/dist/esm/security/authentications/models/oauth2-connection.backend.schemas.d.ts.map +1 -1
  647. package/dist/esm/security/authentications/models/oauth2-connection.backend.schemas.js.map +1 -1
  648. package/dist/esm/security/authentications/services/admin-config/auth-organization-configuration.service.d.ts +0 -2
  649. package/dist/esm/security/authentications/services/admin-config/auth-organization-configuration.service.d.ts.map +1 -1
  650. package/dist/esm/security/authentications/services/admin-config/auth-organization-configuration.service.js +23 -14
  651. package/dist/esm/security/authentications/services/admin-config/auth-organization-configuration.service.js.map +1 -1
  652. package/dist/esm/security/authentications/services/admin-config/domain-to-org-lookup.backend.service.d.ts +0 -1
  653. package/dist/esm/security/authentications/services/admin-config/domain-to-org-lookup.backend.service.d.ts.map +1 -1
  654. package/dist/esm/security/authentications/services/admin-config/domain-to-org-lookup.backend.service.js +15 -12
  655. package/dist/esm/security/authentications/services/admin-config/domain-to-org-lookup.backend.service.js.map +1 -1
  656. package/dist/esm/security/authentications/services/admin-config/domain-verification.backend.service.d.ts +113 -3
  657. package/dist/esm/security/authentications/services/admin-config/domain-verification.backend.service.d.ts.map +1 -1
  658. package/dist/esm/security/authentications/services/admin-config/domain-verification.backend.service.js +207 -30
  659. package/dist/esm/security/authentications/services/admin-config/domain-verification.backend.service.js.map +1 -1
  660. package/dist/esm/security/authentications/services/admin-config/enterprise-user-provisioning.backend.service.d.ts +95 -2
  661. package/dist/esm/security/authentications/services/admin-config/enterprise-user-provisioning.backend.service.d.ts.map +1 -1
  662. package/dist/esm/security/authentications/services/admin-config/enterprise-user-provisioning.backend.service.js +153 -9
  663. package/dist/esm/security/authentications/services/admin-config/enterprise-user-provisioning.backend.service.js.map +1 -1
  664. package/dist/esm/security/authentications/services/anonymous-session.backend.service.d.ts +190 -0
  665. package/dist/esm/security/authentications/services/anonymous-session.backend.service.d.ts.map +1 -1
  666. package/dist/esm/security/authentications/services/anonymous-session.backend.service.js +377 -53
  667. package/dist/esm/security/authentications/services/anonymous-session.backend.service.js.map +1 -1
  668. package/dist/esm/security/authentications/services/auth-methods/auth-method-management.backend.service.d.ts.map +1 -1
  669. package/dist/esm/security/authentications/services/auth-methods/auth-method-management.backend.service.js +68 -1
  670. package/dist/esm/security/authentications/services/auth-methods/auth-method-management.backend.service.js.map +1 -1
  671. package/dist/esm/security/authentications/services/auth-methods/auth-registration.backend.service.d.ts +41 -0
  672. package/dist/esm/security/authentications/services/auth-methods/auth-registration.backend.service.d.ts.map +1 -1
  673. package/dist/esm/security/authentications/services/auth-methods/auth-registration.backend.service.js +202 -23
  674. package/dist/esm/security/authentications/services/auth-methods/auth-registration.backend.service.js.map +1 -1
  675. package/dist/esm/security/authentications/services/auth-methods/oauth2-authentication.backend.service.d.ts.map +1 -1
  676. package/dist/esm/security/authentications/services/auth-methods/oauth2-authentication.backend.service.js +42 -1
  677. package/dist/esm/security/authentications/services/auth-methods/oauth2-authentication.backend.service.js.map +1 -1
  678. package/dist/esm/security/authentications/services/auth-methods/oauth2-connection-resolver.backend.service.d.ts.map +1 -1
  679. package/dist/esm/security/authentications/services/auth-methods/oauth2-connection-resolver.backend.service.js +34 -4
  680. package/dist/esm/security/authentications/services/auth-methods/oauth2-connection-resolver.backend.service.js.map +1 -1
  681. package/dist/esm/security/authentications/services/auth-methods/webauthn.backend.service.d.ts +29 -5
  682. package/dist/esm/security/authentications/services/auth-methods/webauthn.backend.service.d.ts.map +1 -1
  683. package/dist/esm/security/authentications/services/auth-methods/webauthn.backend.service.js +77 -5
  684. package/dist/esm/security/authentications/services/auth-methods/webauthn.backend.service.js.map +1 -1
  685. package/dist/esm/security/authentications/services/auth-token-issuer.backend.service.d.ts +17 -1
  686. package/dist/esm/security/authentications/services/auth-token-issuer.backend.service.d.ts.map +1 -1
  687. package/dist/esm/security/authentications/services/auth-token-issuer.backend.service.js +49 -17
  688. package/dist/esm/security/authentications/services/auth-token-issuer.backend.service.js.map +1 -1
  689. package/dist/esm/security/authentications/services/authentication-orchestrator.backend.service.d.ts +43 -1
  690. package/dist/esm/security/authentications/services/authentication-orchestrator.backend.service.d.ts.map +1 -1
  691. package/dist/esm/security/authentications/services/authentication-orchestrator.backend.service.js +277 -97
  692. package/dist/esm/security/authentications/services/authentication-orchestrator.backend.service.js.map +1 -1
  693. package/dist/esm/security/authentications/services/cimd-client-metadata.backend.service.d.ts +28 -5
  694. package/dist/esm/security/authentications/services/cimd-client-metadata.backend.service.d.ts.map +1 -1
  695. package/dist/esm/security/authentications/services/cimd-client-metadata.backend.service.js +72 -12
  696. package/dist/esm/security/authentications/services/cimd-client-metadata.backend.service.js.map +1 -1
  697. package/dist/esm/security/authentications/services/custom-impls/auth-custom-implementations.backend.d.ts.map +1 -1
  698. package/dist/esm/security/authentications/services/custom-impls/auth-custom-implementations.backend.js +3 -0
  699. package/dist/esm/security/authentications/services/custom-impls/auth-custom-implementations.backend.js.map +1 -1
  700. package/dist/esm/security/authentications/services/custom-impls/sso-config-domain-verification.custom-impl.backend.service.d.ts +28 -0
  701. package/dist/esm/security/authentications/services/custom-impls/sso-config-domain-verification.custom-impl.backend.service.d.ts.map +1 -0
  702. package/dist/esm/security/authentications/services/custom-impls/sso-config-domain-verification.custom-impl.backend.service.js +283 -0
  703. package/dist/esm/security/authentications/services/custom-impls/sso-config-domain-verification.custom-impl.backend.service.js.map +1 -0
  704. package/dist/esm/security/authentications/services/custom-impls/sso-config.custom-impl.backend.service.d.ts +4 -3
  705. package/dist/esm/security/authentications/services/custom-impls/sso-config.custom-impl.backend.service.d.ts.map +1 -1
  706. package/dist/esm/security/authentications/services/custom-impls/sso-config.custom-impl.backend.service.js +4 -3
  707. package/dist/esm/security/authentications/services/custom-impls/sso-config.custom-impl.backend.service.js.map +1 -1
  708. package/dist/esm/security/authentications/services/oauth-provider-token.backend.service.d.ts +35 -0
  709. package/dist/esm/security/authentications/services/oauth-provider-token.backend.service.d.ts.map +1 -1
  710. package/dist/esm/security/authentications/services/oauth-provider-token.backend.service.js +111 -21
  711. package/dist/esm/security/authentications/services/oauth-provider-token.backend.service.js.map +1 -1
  712. package/dist/esm/security/authentications/services/oidc-authorization-code.backend.service.d.ts +14 -1
  713. package/dist/esm/security/authentications/services/oidc-authorization-code.backend.service.d.ts.map +1 -1
  714. package/dist/esm/security/authentications/services/oidc-authorization-code.backend.service.js +49 -8
  715. package/dist/esm/security/authentications/services/oidc-authorization-code.backend.service.js.map +1 -1
  716. package/dist/esm/security/authentications/services/utils/auth-policy-resolution.backend.utils.d.ts.map +1 -1
  717. package/dist/esm/security/authentications/services/utils/auth-policy-resolution.backend.utils.js +4 -0
  718. package/dist/esm/security/authentications/services/utils/auth-policy-resolution.backend.utils.js.map +1 -1
  719. package/dist/esm/security/authentications/services/utils/auth-user-lookup.backend.service.d.ts.map +1 -1
  720. package/dist/esm/security/authentications/services/utils/auth-user-lookup.backend.service.js +6 -0
  721. package/dist/esm/security/authentications/services/utils/auth-user-lookup.backend.service.js.map +1 -1
  722. package/dist/esm/security/authentications/services/utils/external-turn-rate-limit.backend.utils.d.ts +37 -1
  723. package/dist/esm/security/authentications/services/utils/external-turn-rate-limit.backend.utils.d.ts.map +1 -1
  724. package/dist/esm/security/authentications/services/utils/external-turn-rate-limit.backend.utils.js +51 -0
  725. package/dist/esm/security/authentications/services/utils/external-turn-rate-limit.backend.utils.js.map +1 -1
  726. package/dist/esm/security/authentications/utils/enterprise-sso-enforcement.backend.utils.d.ts +41 -0
  727. package/dist/esm/security/authentications/utils/enterprise-sso-enforcement.backend.utils.d.ts.map +1 -1
  728. package/dist/esm/security/authentications/utils/enterprise-sso-enforcement.backend.utils.js +45 -0
  729. package/dist/esm/security/authentications/utils/enterprise-sso-enforcement.backend.utils.js.map +1 -1
  730. package/dist/esm/security/authorizations/cross-tenant-read-observation.backend.d.ts +116 -0
  731. package/dist/esm/security/authorizations/cross-tenant-read-observation.backend.d.ts.map +1 -0
  732. package/dist/esm/security/authorizations/cross-tenant-read-observation.backend.js +162 -0
  733. package/dist/esm/security/authorizations/cross-tenant-read-observation.backend.js.map +1 -0
  734. package/dist/esm/security/authorizations/organization-owner-floor.backend.utils.d.ts +20 -20
  735. package/dist/esm/security/authorizations/organization-owner-floor.backend.utils.d.ts.map +1 -1
  736. package/dist/esm/security/authorizations/organization-owner-floor.backend.utils.js +27 -28
  737. package/dist/esm/security/authorizations/organization-owner-floor.backend.utils.js.map +1 -1
  738. package/dist/esm/security/authorizations/platform-access-grant-custom-implementation.backend.service.d.ts.map +1 -1
  739. package/dist/esm/security/authorizations/platform-access-grant-custom-implementation.backend.service.js +77 -3
  740. package/dist/esm/security/authorizations/platform-access-grant-custom-implementation.backend.service.js.map +1 -1
  741. package/dist/esm/security/authorizations/role-ceiling.backend.utils.d.ts +4 -0
  742. package/dist/esm/security/authorizations/role-ceiling.backend.utils.d.ts.map +1 -1
  743. package/dist/esm/security/authorizations/role-ceiling.backend.utils.js +4 -0
  744. package/dist/esm/security/authorizations/role-ceiling.backend.utils.js.map +1 -1
  745. package/dist/esm/security/authorizations/role-conferral.backend.utils.d.ts +93 -0
  746. package/dist/esm/security/authorizations/role-conferral.backend.utils.d.ts.map +1 -0
  747. package/dist/esm/security/authorizations/role-conferral.backend.utils.js +95 -0
  748. package/dist/esm/security/authorizations/role-conferral.backend.utils.js.map +1 -0
  749. package/dist/esm/security/authorizations/scope-root-collection-confinement.backend.d.ts +124 -1
  750. package/dist/esm/security/authorizations/scope-root-collection-confinement.backend.d.ts.map +1 -1
  751. package/dist/esm/security/authorizations/scope-root-collection-confinement.backend.js +142 -5
  752. package/dist/esm/security/authorizations/scope-root-collection-confinement.backend.js.map +1 -1
  753. package/dist/esm/security/authorizations/services/authorizations.backend.service.d.ts +74 -8
  754. package/dist/esm/security/authorizations/services/authorizations.backend.service.d.ts.map +1 -1
  755. package/dist/esm/security/authorizations/services/authorizations.backend.service.js +175 -19
  756. package/dist/esm/security/authorizations/services/authorizations.backend.service.js.map +1 -1
  757. package/dist/esm/security/authorizations/super-admin-floor.backend.utils.d.ts +6 -14
  758. package/dist/esm/security/authorizations/super-admin-floor.backend.utils.d.ts.map +1 -1
  759. package/dist/esm/security/authorizations/super-admin-floor.backend.utils.js +13 -22
  760. package/dist/esm/security/authorizations/super-admin-floor.backend.utils.js.map +1 -1
  761. package/dist/esm/security/connected-accounts/connection-target-authorization.backend.d.ts +60 -0
  762. package/dist/esm/security/connected-accounts/connection-target-authorization.backend.d.ts.map +1 -0
  763. package/dist/esm/security/connected-accounts/connection-target-authorization.backend.js +79 -0
  764. package/dist/esm/security/connected-accounts/connection-target-authorization.backend.js.map +1 -0
  765. package/dist/esm/security/connected-accounts/controllers/provider-connection.controller.backend.service.d.ts +161 -0
  766. package/dist/esm/security/connected-accounts/controllers/provider-connection.controller.backend.service.d.ts.map +1 -0
  767. package/dist/esm/security/connected-accounts/controllers/provider-connection.controller.backend.service.js +512 -0
  768. package/dist/esm/security/connected-accounts/controllers/provider-connection.controller.backend.service.js.map +1 -0
  769. package/dist/esm/security/connected-accounts/organization-provider-credential-resolver.port.d.ts +59 -0
  770. package/dist/esm/security/connected-accounts/organization-provider-credential-resolver.port.d.ts.map +1 -0
  771. package/dist/esm/security/connected-accounts/organization-provider-credential-resolver.port.js +22 -0
  772. package/dist/esm/security/connected-accounts/organization-provider-credential-resolver.port.js.map +1 -0
  773. package/dist/esm/security/connected-accounts/provider-oauth2-refresher.port.d.ts +44 -0
  774. package/dist/esm/security/connected-accounts/provider-oauth2-refresher.port.d.ts.map +1 -0
  775. package/dist/esm/security/connected-accounts/provider-oauth2-refresher.port.js +20 -0
  776. package/dist/esm/security/connected-accounts/provider-oauth2-refresher.port.js.map +1 -0
  777. package/dist/esm/security/connected-accounts/services/organization-provider-credential-store.backend.service.d.ts +191 -0
  778. package/dist/esm/security/connected-accounts/services/organization-provider-credential-store.backend.service.d.ts.map +1 -0
  779. package/dist/esm/security/connected-accounts/services/organization-provider-credential-store.backend.service.js +385 -0
  780. package/dist/esm/security/connected-accounts/services/organization-provider-credential-store.backend.service.js.map +1 -0
  781. package/dist/esm/security/connected-accounts/services/organization-provider-credentials.custom-impl.backend.service.d.ts +41 -0
  782. package/dist/esm/security/connected-accounts/services/organization-provider-credentials.custom-impl.backend.service.d.ts.map +1 -0
  783. package/dist/esm/security/connected-accounts/services/organization-provider-credentials.custom-impl.backend.service.js +358 -0
  784. package/dist/esm/security/connected-accounts/services/organization-provider-credentials.custom-impl.backend.service.js.map +1 -0
  785. package/dist/esm/security/connected-accounts/services/provider-oauth2-exchange.backend.d.ts +160 -0
  786. package/dist/esm/security/connected-accounts/services/provider-oauth2-exchange.backend.d.ts.map +1 -0
  787. package/dist/esm/security/connected-accounts/services/provider-oauth2-exchange.backend.js +266 -0
  788. package/dist/esm/security/connected-accounts/services/provider-oauth2-exchange.backend.js.map +1 -0
  789. package/dist/esm/security/connected-accounts/services/provider-oauth2-pending-authorization.backend.service.d.ts +111 -0
  790. package/dist/esm/security/connected-accounts/services/provider-oauth2-pending-authorization.backend.service.d.ts.map +1 -0
  791. package/dist/esm/security/connected-accounts/services/provider-oauth2-pending-authorization.backend.service.js +107 -0
  792. package/dist/esm/security/connected-accounts/services/provider-oauth2-pending-authorization.backend.service.js.map +1 -0
  793. package/dist/esm/security/connected-accounts/services/provider-oauth2-refresher.backend.service.d.ts +54 -0
  794. package/dist/esm/security/connected-accounts/services/provider-oauth2-refresher.backend.service.d.ts.map +1 -0
  795. package/dist/esm/security/connected-accounts/services/provider-oauth2-refresher.backend.service.js +153 -0
  796. package/dist/esm/security/connected-accounts/services/provider-oauth2-refresher.backend.service.js.map +1 -0
  797. package/dist/esm/security/connected-accounts/services/user-provider-credential-store.backend.service.d.ts +195 -0
  798. package/dist/esm/security/connected-accounts/services/user-provider-credential-store.backend.service.d.ts.map +1 -0
  799. package/dist/esm/security/connected-accounts/services/user-provider-credential-store.backend.service.js +387 -0
  800. package/dist/esm/security/connected-accounts/services/user-provider-credential-store.backend.service.js.map +1 -0
  801. package/dist/esm/security/connected-accounts/services/user-provider-credentials.custom-impl.backend.service.d.ts +45 -0
  802. package/dist/esm/security/connected-accounts/services/user-provider-credentials.custom-impl.backend.service.d.ts.map +1 -0
  803. package/dist/esm/security/connected-accounts/services/user-provider-credentials.custom-impl.backend.service.js +291 -0
  804. package/dist/esm/security/connected-accounts/services/user-provider-credentials.custom-impl.backend.service.js.map +1 -0
  805. package/dist/esm/security/connected-accounts/user-provider-credential-resolver.port.d.ts +62 -0
  806. package/dist/esm/security/connected-accounts/user-provider-credential-resolver.port.d.ts.map +1 -0
  807. package/dist/esm/security/connected-accounts/user-provider-credential-resolver.port.js +29 -0
  808. package/dist/esm/security/connected-accounts/user-provider-credential-resolver.port.js.map +1 -0
  809. package/dist/esm/security/connected-accounts/utils/provider-credential-envelope.backend.utils.d.ts +127 -0
  810. package/dist/esm/security/connected-accounts/utils/provider-credential-envelope.backend.utils.d.ts.map +1 -0
  811. package/dist/esm/security/connected-accounts/utils/provider-credential-envelope.backend.utils.js +277 -0
  812. package/dist/esm/security/connected-accounts/utils/provider-credential-envelope.backend.utils.js.map +1 -0
  813. package/dist/esm/security/connected-accounts/utils/stored-credential-value.backend.utils.d.ts +66 -0
  814. package/dist/esm/security/connected-accounts/utils/stored-credential-value.backend.utils.d.ts.map +1 -0
  815. package/dist/esm/security/connected-accounts/utils/stored-credential-value.backend.utils.js +75 -0
  816. package/dist/esm/security/connected-accounts/utils/stored-credential-value.backend.utils.js.map +1 -0
  817. package/dist/esm/security/consumable-tokens/services/consumable-token.backend.service.d.ts +21 -3
  818. package/dist/esm/security/consumable-tokens/services/consumable-token.backend.service.d.ts.map +1 -1
  819. package/dist/esm/security/consumable-tokens/services/consumable-token.backend.service.js +26 -16
  820. package/dist/esm/security/consumable-tokens/services/consumable-token.backend.service.js.map +1 -1
  821. package/dist/esm/security/credential-rotation-grace.backend.utils.d.ts +9 -4
  822. package/dist/esm/security/credential-rotation-grace.backend.utils.d.ts.map +1 -1
  823. package/dist/esm/security/credential-rotation-grace.backend.utils.js +9 -4
  824. package/dist/esm/security/credential-rotation-grace.backend.utils.js.map +1 -1
  825. package/dist/esm/security/oauth-clients/oauth-client-generation.backend.utils.d.ts +26 -0
  826. package/dist/esm/security/oauth-clients/oauth-client-generation.backend.utils.d.ts.map +1 -1
  827. package/dist/esm/security/oauth-clients/oauth-client-generation.backend.utils.js +43 -0
  828. package/dist/esm/security/oauth-clients/oauth-client-generation.backend.utils.js.map +1 -1
  829. package/dist/esm/security/oauth-clients/oauth-clients.custom-impl.backend.service.d.ts +8 -1
  830. package/dist/esm/security/oauth-clients/oauth-clients.custom-impl.backend.service.d.ts.map +1 -1
  831. package/dist/esm/security/oauth-clients/oauth-clients.custom-impl.backend.service.js +49 -0
  832. package/dist/esm/security/oauth-clients/oauth-clients.custom-impl.backend.service.js.map +1 -1
  833. package/dist/esm/security/scim/controllers/scim.backend.controller.d.ts.map +1 -1
  834. package/dist/esm/security/scim/controllers/scim.backend.controller.js +17 -5
  835. package/dist/esm/security/scim/controllers/scim.backend.controller.js.map +1 -1
  836. package/dist/esm/security/scim/models/scim-protocol.backend.schemas.d.ts +67 -29
  837. package/dist/esm/security/scim/models/scim-protocol.backend.schemas.d.ts.map +1 -1
  838. package/dist/esm/security/scim/models/scim-protocol.backend.schemas.js +47 -25
  839. package/dist/esm/security/scim/models/scim-protocol.backend.schemas.js.map +1 -1
  840. package/dist/esm/security/ssrf/outbound-target-guard.backend.utils.d.ts +10 -2
  841. package/dist/esm/security/ssrf/outbound-target-guard.backend.utils.d.ts.map +1 -1
  842. package/dist/esm/security/ssrf/outbound-target-guard.backend.utils.js +10 -2
  843. package/dist/esm/security/ssrf/outbound-target-guard.backend.utils.js.map +1 -1
  844. package/dist/esm/security/ssrf/pinned-outbound-fetch.backend.utils.d.ts +143 -0
  845. package/dist/esm/security/ssrf/pinned-outbound-fetch.backend.utils.d.ts.map +1 -0
  846. package/dist/esm/security/ssrf/pinned-outbound-fetch.backend.utils.js +258 -0
  847. package/dist/esm/security/ssrf/pinned-outbound-fetch.backend.utils.js.map +1 -0
  848. package/dist/esm/users/services/user-read-retained.custom-impl.backend.service.d.ts +39 -0
  849. package/dist/esm/users/services/user-read-retained.custom-impl.backend.service.d.ts.map +1 -0
  850. package/dist/esm/users/services/user-read-retained.custom-impl.backend.service.js +159 -0
  851. package/dist/esm/users/services/user-read-retained.custom-impl.backend.service.js.map +1 -0
  852. package/dist/tsconfig.build.tsbuildinfo +1 -1
  853. package/package.json +11 -9
@@ -13,7 +13,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
13
13
  import 'reflect-metadata';
14
14
  import { randomUUID } from 'node:crypto';
15
15
  import { injectable, inject, optional } from 'inversify';
16
- import { CoreResourceOperation, CoreResourceType, readBulkOperationSelectorIds, stripBulkOperationSelector, composeDefaultOperationResponse, PersistenceAdapter, selectByPersistenceAdapter, ResourcesConfig_OperationPathUtils, ErrorType, ErrorCustomMessageReference, ResourceOperationVariantType, ResourceOperationRiskLevel, ResourceOperationsUtils, DataMode, OPERATION_VARIANT_KEY, ChildLifecycleMode, ChildLifecycleStrategy, buildImpersonalizeScrubPatch, SubjectErasureDisposition, classifySubjectErasureDisposition, isBlockingSubjectErasureDisposition, SubjectExportPurpose, SubjectExportEdgeDisposition, SubjectExportFieldScope, SubjectExportFieldDecisionBasis, compileSubjectExportFieldDecisions, enumerateSubjectExportRelationshipTraversals, isIncludedSubjectExportEdgeDisposition, ResourceSystemAccessMode, ResourceOperation_ServiceRuntimeMode, ExecutionContext_ExecutionType, CoreConsumableTokenTypes, isWildoBackendError, Resources_SharedUtils, ResourceRelationshipBulkAction, ResourceRelationshipBulkActionRequestSchema, ResourceRelationshipBulkClearOperationRequestSchema, ResourceRelationshipBulkCreateOperationRequestSchema, ResourceRelationshipBulkLinkOperationRequestSchema, ResourceRelationshipBulkReplaceOperationRequestSchema, ResourceRelationshipBulkSetOperationRequestSchema, ResourceRelationshipBulkUnlinkOperationRequestSchema, ResourceGeneratedOperationKind, ResourceDataSubjectKind, } from '@wildo-ai/saas-models';
16
+ import { CoreResourceOperation, CoreResourceType, readBulkOperationSelectorIds, stripBulkOperationSelector, composeDefaultOperationResponse, PersistenceAdapter, selectByPersistenceAdapter, ResourcesConfig_OperationPathUtils, ErrorType, ErrorCustomMessageReference, ResourceOperationVariantType, ResourceOperationRiskLevel, ResourceOperationsUtils, DataMode, OPERATION_VARIANT_KEY, ChildLifecycleMode, ChildLifecycleStrategy, buildImpersonalizeScrubPatch, SubjectErasureDisposition, classifySubjectErasureDisposition, isBlockingSubjectErasureDisposition, SubjectExportPurpose, SubjectExportEdgeDisposition, SubjectExportFieldScope, SubjectExportFieldDecisionBasis, compileSubjectExportFieldDecisions, enumerateSubjectExportRelationshipTraversals, isIncludedSubjectExportEdgeDisposition, ResourceSystemAccessMode, ResourceOperation_ServiceRuntimeMode, ExecutionContext_ExecutionType, CoreConsumableTokenTypes, isWildoBackendError, Resources_SharedUtils, ResourceRelationshipBulkAction, ResourceRelationshipBulkActionRequestSchema, ResourceRelationshipBulkClearOperationRequestSchema, ResourceRelationshipBulkCreateOperationRequestSchema, ResourceRelationshipBulkLinkOperationRequestSchema, ResourceRelationshipBulkReplaceOperationRequestSchema, ResourceRelationshipBulkSetOperationRequestSchema, ResourceRelationshipBulkUnlinkOperationRequestSchema, ResourceGeneratedOperationKind, ResourceDataSubjectKind, resolveAuthConfig, } from '@wildo-ai/saas-models';
17
17
  import { getZodObjectShape, isAuditEvidenceField, isZodObject, unwrapSchema } from '@wildo-ai/zod-decorators';
18
18
  import { isWriteIntegrityExemptExecution } from '../../../base-classes/services/repositories/resource-write-integrity.backend.js';
19
19
  import { collectCandidateReadOnlyFields, filterChangedReadOnlyFields, stringifyPersistedValueForCompare } from '../../../base-classes/services/services/read-only-field-change.backend.utils.js';
@@ -21,13 +21,16 @@ import { AuditLogsBackendService } from '../../../compliance/audit-trails/servic
21
21
  import { resolveResourceOperationAuditDecision, resolveResourceOperationFieldEffect, } from '../../../base-classes/services/services/resource-operation-audit-emission.backend.utils.js';
22
22
  import { resolveServerInjectedFieldAllowList } from '../../../base-classes/services/services/resource-operation-server-injected-fields.backend.utils.js';
23
23
  import { buildRetentionMarkerStampPatch } from '../../../compliance/privacy/retention-hide-predicate.backend.js';
24
+ import { CHILD_LIFECYCLE_TEARDOWN_BATCH_REF } from '../../../base-classes/services/batches/engine-custom-batch-manifests.js';
24
25
  import { SAAS_SERVICE_TYPES } from '../../../inject/models/service-types.js';
26
+ import { AuditObservationKind, emitAuditObservation, } from '../../../monitoring/observability/audit-observation-emission.backend.js';
25
27
  import { RepositoriesRegistryHandlerBackendService } from '../../../base-classes/services/repositories/repositories-registry-handler.backend.service.js';
26
28
  import { ResourceOperationHelperBackendService } from '../../../base-classes/services/resource-operations-helper.backend.service.js';
27
29
  import { extractFunctionContextNeeds, ResourcesConfigOperationsDtosBuilderUtils, } from '@wildo-ai/saas-models';
28
30
  import { LoggerService } from '../../../monitoring/logger/services/logger.service.js';
29
31
  import { ErrorBuilderBackendService } from '../../../errors/services/error-builder.backend.service.js';
30
32
  import { describeCaughtError, projectCaughtErrorLogFields } from '../../../errors/utils/error-log-level-classification.backend.utils.js';
33
+ import { resolveActiveMemberOrgIds } from '../../../security/authentications/services/resolve-active-member-orgs.backend.utils.js';
31
34
  import { z } from 'zod';
32
35
  import { PlatformMutualizedHandlerBackendService } from '../../../requests/service/platform-mutualized-handler.backend.service.js';
33
36
  import { ResourcesRegistryBackendService } from '../../../resources/services/resources-registry.backend.service.js';
@@ -62,6 +65,8 @@ import { PdfGenerationOrchestratorBackendService, PdfGenerationRenderPhase } fro
62
65
  import { getConfiguredPrimaryLanguage } from '../../../config/services/app-configuration.backend.utils.js';
63
66
  import { FileGenerationSource } from '@wildo-ai/zod-decorators';
64
67
  import { isUnconfinedScopeRootDirectoryRead } from '../../../security/authorizations/scope-root-collection-confinement.backend.js';
68
+ import { collectCrossTenantReadCrossings } from '../../../security/authorizations/cross-tenant-read-observation.backend.js';
69
+ import { getUsageMeteringService } from '../../../billing/services/custom-impl/billing-custom-implementations.backend.js';
65
70
  /**
66
71
  * Build a fresh input graph for one database-driver transaction attempt.
67
72
  *
@@ -224,12 +229,14 @@ let ServicesRegistryHandlerBackendService = class ServicesRegistryHandlerBackend
224
229
  lifecycleEvaluator;
225
230
  postgreSQLDatabaseService;
226
231
  samlMetadataService;
232
+ workerClientFactory;
227
233
  systemAccessService;
228
234
  subjectSessionRevocation;
229
235
  auditLogsService;
230
236
  ragSourceFieldDetection;
231
237
  ragChunkStore;
232
238
  ragIngestion;
239
+ auditObservationLossMetrics;
233
240
  services;
234
241
  serviceOperationsMap;
235
242
  isInitialized = false;
@@ -261,7 +268,7 @@ let ServicesRegistryHandlerBackendService = class ServicesRegistryHandlerBackend
261
268
  * `prefixCoreOperations` of custom operation impls.
262
269
  */
263
270
  preOperationHooks = new Map();
264
- constructor(repositoriesRegistry, logger, errorBuilder, resourcesRegistry, repositoryHelper, customImplRegistry, resourcePersistenceUnitOfWork, externalApiHandler, platformMutualizedHandler, serverlessServicesHandler, notificationDispatcher, populationService, virtualFieldsService, mongoDBService, fileOperationHandler, fileFieldDetection, executionContextCreator, queueService, featureGate, consumableTokenService, appConfigService, pdfGenerationOrchestrator, guidanceTriggerEvaluator, milestoneEvaluator, lifecycleEvaluator, postgreSQLDatabaseService, samlMetadataService, systemAccessService, subjectSessionRevocation, auditLogsService, ragSourceFieldDetection, ragChunkStore, ragIngestion) {
271
+ constructor(repositoriesRegistry, logger, errorBuilder, resourcesRegistry, repositoryHelper, customImplRegistry, resourcePersistenceUnitOfWork, externalApiHandler, platformMutualizedHandler, serverlessServicesHandler, notificationDispatcher, populationService, virtualFieldsService, mongoDBService, fileOperationHandler, fileFieldDetection, executionContextCreator, queueService, featureGate, consumableTokenService, appConfigService, pdfGenerationOrchestrator, guidanceTriggerEvaluator, milestoneEvaluator, lifecycleEvaluator, postgreSQLDatabaseService, samlMetadataService, workerClientFactory, systemAccessService, subjectSessionRevocation, auditLogsService, ragSourceFieldDetection, ragChunkStore, ragIngestion, auditObservationLossMetrics) {
265
272
  this.repositoriesRegistry = repositoriesRegistry;
266
273
  this.logger = logger;
267
274
  this.errorBuilder = errorBuilder;
@@ -289,12 +296,14 @@ let ServicesRegistryHandlerBackendService = class ServicesRegistryHandlerBackend
289
296
  this.lifecycleEvaluator = lifecycleEvaluator;
290
297
  this.postgreSQLDatabaseService = postgreSQLDatabaseService;
291
298
  this.samlMetadataService = samlMetadataService;
299
+ this.workerClientFactory = workerClientFactory;
292
300
  this.systemAccessService = systemAccessService;
293
301
  this.subjectSessionRevocation = subjectSessionRevocation;
294
302
  this.auditLogsService = auditLogsService;
295
303
  this.ragSourceFieldDetection = ragSourceFieldDetection;
296
304
  this.ragChunkStore = ragChunkStore;
297
305
  this.ragIngestion = ragIngestion;
306
+ this.auditObservationLossMetrics = auditObservationLossMetrics;
298
307
  this.logger = logger;
299
308
  this.errorBuilder = errorBuilder;
300
309
  this.services = new Map();
@@ -316,6 +325,20 @@ let ServicesRegistryHandlerBackendService = class ServicesRegistryHandlerBackend
316
325
  getSystemAccessService() {
317
326
  return this.systemAccessService;
318
327
  }
328
+ /**
329
+ * Exposes backend→worker dispatch to custom-impl utils — the sanctioned way for application code
330
+ * to move work off the request path (#426).
331
+ *
332
+ * A GETTER rather than a `ServiceResourceBackendService` constructor parameter, for exactly the
333
+ * reason `getSystemAccessService` is one: that constructor is invoked POSITIONALLY from
334
+ * `createService` and from focused tests, so a new parameter shifts existing arguments silently.
335
+ *
336
+ * Returns `undefined` only in a minimal container that does not bind the factory; a custom impl
337
+ * that needs one then refuses with its own named message instead of failing at DI time.
338
+ */
339
+ getWorkerClientFactory() {
340
+ return this.workerClientFactory;
341
+ }
319
342
  /**
320
343
  * Exposes the session-revocation port to the per-resource services, whose scrub chokepoint ends an
321
344
  * erased person's sessions. A port rather than a direct dependency because `AuthTokenIssuer` already
@@ -384,6 +407,22 @@ let ServicesRegistryHandlerBackendService = class ServicesRegistryHandlerBackend
384
407
  getAuditLogsService() {
385
408
  return this.auditLogsService;
386
409
  }
410
+ /**
411
+ * The recorder that counts a DROPPED audit observation, for the two seams on
412
+ * `ServiceResourceBackendService` that emit fire-and-forget.
413
+ *
414
+ * A getter for exactly the reason {@link getAuditLogsService} is one: that class's constructor is
415
+ * invoked POSITIONALLY from `createService` and from focused tests, so a new parameter shifts
416
+ * existing arguments silently. The two seams therefore reach BOTH halves of their contract — the
417
+ * sink and the loss counter — through this handler, which is the object they already hold.
418
+ *
419
+ * Returns `undefined` in a minimal container, which degrades a lost observation to the log channel
420
+ * rather than to nothing. It is never a reason to refuse: an observability gap must not be able to
421
+ * fail the read it observes.
422
+ */
423
+ getAuditObservationLossMetricsRecorder() {
424
+ return this.auditObservationLossMetrics;
425
+ }
387
426
  // ================================
388
427
  // Initialization Methods
389
428
  // ================================
@@ -801,6 +840,59 @@ let ServicesRegistryHandlerBackendService = class ServicesRegistryHandlerBackend
801
840
  isInitialized: this.isInitialized
802
841
  };
803
842
  }
843
+ /**
844
+ * The step-up policy for this principal, with the organisation overrides its tenants declare.
845
+ *
846
+ * Returns the RAW user-type policy unchanged — with no I/O — whenever no organisation type in the
847
+ * application overrides step-up, which is the overwhelmingly common case and was the ONLY case
848
+ * before #527. An application that authors the override pays one membership list plus one read per
849
+ * membership, and only on an operation where step-up is already in play.
850
+ *
851
+ * Fails OPEN to the raw policy, deliberately and unlike most guards here: this resolution is a
852
+ * TIGHTENING of an already-enforced gate, so a failed resolve must leave the application-wide
853
+ * requirement standing rather than removing it. Refusing instead would turn one unreadable
854
+ * membership row into a 403 on every operation the user attempts.
855
+ */
856
+ async resolveEffectiveStepUpConfig(executionContext, activeUserType, authPolicy) {
857
+ const rawStepUp = authPolicy?.stepUpAuth;
858
+ if (!activeUserType)
859
+ return rawStepUp;
860
+ const userId = executionContext.initiatorIds?.userId;
861
+ if (!userId)
862
+ return rawStepUp;
863
+ try {
864
+ const activeOrgIds = await resolveActiveMemberOrgIds(this.systemAccessService, userId);
865
+ if (activeOrgIds.length === 0)
866
+ return rawStepUp;
867
+ const config = this.appConfigService.config;
868
+ const organizationTypes = config.organizationTypes ?? {};
869
+ const orgOverrides = [];
870
+ for (const organizationId of activeOrgIds) {
871
+ const organization = await this.systemAccessService.readAsSystem(CoreResourceType.ORGANIZATIONS, organizationId, { suppressSystemAudit: true });
872
+ const overrides = organization?.type ? organizationTypes[organization.type]?.authOverrides : undefined;
873
+ if (overrides)
874
+ orgOverrides.push(overrides);
875
+ }
876
+ if (orgOverrides.length === 0 || !authPolicy || !config.auth)
877
+ return rawStepUp;
878
+ // The canonical multi-org merge — the same `resolveAuthConfig` the login path uses, so a tenant
879
+ // sees ONE most-restrictive answer across every organisation they belong to rather than a
880
+ // per-organisation one this gate would have to choose between.
881
+ return resolveAuthConfig({
882
+ userTypeAuth: authPolicy,
883
+ orgOverrides,
884
+ orgAuthMethodPolicy: config.auth.orgAuthMethodPolicy,
885
+ expandableOrgMethods: config.auth.expandableOrgMethods,
886
+ }).stepUpAuth;
887
+ }
888
+ catch (error) {
889
+ this.logDebug('Step-up org-override resolution failed; falling back to the raw user-type policy', {
890
+ activeUserType,
891
+ ...projectCaughtErrorLogFields(error),
892
+ });
893
+ return rawStepUp;
894
+ }
895
+ }
804
896
  };
805
897
  ServicesRegistryHandlerBackendService = __decorate([
806
898
  injectable(),
@@ -836,18 +928,22 @@ ServicesRegistryHandlerBackendService = __decorate([
836
928
  __param(25, optional()),
837
929
  __param(26, inject(SAAS_SERVICE_TYPES.SAMLMetadataService)),
838
930
  __param(26, optional()),
839
- __param(27, inject(SAAS_SERVICE_TYPES.SystemAccessService)),
931
+ __param(27, inject(SAAS_SERVICE_TYPES.WorkerRemoteClientFactoryService)),
840
932
  __param(27, optional()),
841
- __param(28, inject(SAAS_SERVICE_TYPES.SubjectSessionRevocationService)),
933
+ __param(28, inject(SAAS_SERVICE_TYPES.SystemAccessService)),
842
934
  __param(28, optional()),
843
- __param(29, inject(SAAS_SERVICE_TYPES.AuditLogsService)),
935
+ __param(29, inject(SAAS_SERVICE_TYPES.SubjectSessionRevocationService)),
844
936
  __param(29, optional()),
845
- __param(30, inject(SAAS_SERVICE_TYPES.RagSourceFieldDetectionService)),
937
+ __param(30, inject(SAAS_SERVICE_TYPES.AuditLogsService)),
846
938
  __param(30, optional()),
847
- __param(31, inject(SAAS_SERVICE_TYPES.RagChunkStoreService)),
939
+ __param(31, inject(SAAS_SERVICE_TYPES.RagSourceFieldDetectionService)),
848
940
  __param(31, optional()),
849
- __param(32, inject(SAAS_SERVICE_TYPES.RagIngestionService)),
941
+ __param(32, inject(SAAS_SERVICE_TYPES.RagChunkStoreService)),
850
942
  __param(32, optional()),
943
+ __param(33, inject(SAAS_SERVICE_TYPES.RagIngestionService)),
944
+ __param(33, optional()),
945
+ __param(34, inject(SAAS_SERVICE_TYPES.MetricsService)),
946
+ __param(34, optional()),
851
947
  __metadata("design:paramtypes", [RepositoriesRegistryHandlerBackendService,
852
948
  LoggerService,
853
949
  ErrorBuilderBackendService,
@@ -871,7 +967,7 @@ ServicesRegistryHandlerBackendService = __decorate([
871
967
  GuidanceTriggerEvaluatorBackendService,
872
968
  MilestoneEvaluatorBackendService,
873
969
  LifecycleEvaluatorBackendService,
874
- PostgreSQLDatabaseBackendService, Function, Function, Function, AuditLogsBackendService, Function, Function, Function])
970
+ PostgreSQLDatabaseBackendService, Function, Function, Function, Function, AuditLogsBackendService, Function, Function, Function, Object])
875
971
  ], ServicesRegistryHandlerBackendService);
876
972
  export { ServicesRegistryHandlerBackendService };
877
973
  //============================================================================================================================
@@ -2020,6 +2116,32 @@ export class ServiceResourceBackendService {
2020
2116
  * Failing either trigger throws STEP_UP_REQUIRED (HTTP 403); the frontend HTTP client catches that
2021
2117
  * status, obtains a token through its registered step-up handler, and replays the request.
2022
2118
  */
2119
+ /**
2120
+ * Whether ANY organisation type in this application authors a `stepUpAuth` override.
2121
+ *
2122
+ * A pure fold over static configuration, memoized for the process because application
2123
+ * configuration does not change under a running backend. It is the switch that keeps
2124
+ * `enforceStepUpAuth` free for every application that has not adopted the override (#527): when
2125
+ * this is false, the organisation-merged step-up policy EQUALS the raw user-type policy by
2126
+ * construction, so there is nothing to resolve and nothing to read.
2127
+ */
2128
+ organizationTypesOverrideStepUpAuthCache = undefined;
2129
+ anyOrganizationTypeOverridesStepUpAuth() {
2130
+ /*
2131
+ * `undefined` rather than `null` for "not yet computed", and the difference is not stylistic:
2132
+ * this class is instantiated with `Object.create(prototype)` in its own pin harnesses, which
2133
+ * does NOT run field initializers. A `=== null` guard therefore never matched there, the fold
2134
+ * silently returned `undefined`, and every test took the fast path while appearing to exercise
2135
+ * the switch. Caught by probing the branch rather than by any assertion — the fold was inert in
2136
+ * exactly the harness a future override pin would have been written in.
2137
+ */
2138
+ if (this.organizationTypesOverrideStepUpAuthCache === undefined) {
2139
+ const organizationTypes = this.appConfigService.config?.organizationTypes ?? {};
2140
+ this.organizationTypesOverrideStepUpAuthCache = Object.values(organizationTypes)
2141
+ .some((definition) => definition?.authOverrides?.stepUpAuth !== undefined);
2142
+ }
2143
+ return this.organizationTypesOverrideStepUpAuthCache;
2144
+ }
2023
2145
  async enforceStepUpAuth(coreOperation, executionContext, options, operation) {
2024
2146
  if (executionContext.executionType !== ExecutionContext_ExecutionType.USER_REQUEST)
2025
2147
  return;
@@ -2034,7 +2156,40 @@ export class ServiceResourceBackendService {
2034
2156
  const authPolicy = activeUserType
2035
2157
  ? this.appConfigService.getUserTypeAuthPolicy(activeUserType)
2036
2158
  : undefined;
2037
- const stepUpConfig = authPolicy?.stepUpAuth;
2159
+ /*
2160
+ * The ORGANISATION-MERGED step-up policy, resolved only when an organisation could actually
2161
+ * change the answer (#527).
2162
+ *
2163
+ * Until 2026-09-09 an organisation type could tighten `mfaPolicy` and `passwordPolicy` but not
2164
+ * re-authentication freshness — the override did not exist — so reading the raw user-type policy
2165
+ * here was correct. Now that it does, reading the raw policy would drop a tenant's tightened
2166
+ * window, which is the defect the other three overrides exist to prevent.
2167
+ *
2168
+ * ## Why this is not a per-request read
2169
+ *
2170
+ * This gate runs on EVERY user-request operation, and the exact resolver
2171
+ * (`resolveEffectiveAuthPolicy`) lists the user's memberships and then reads one organisation
2172
+ * PER membership. That is unaffordable here, and the cheap alternative is unavailable: the
2173
+ * execution context carries an `organizationId` but no organisation TYPE, so even the pure
2174
+ * org-type resolver would need a read to find its own input.
2175
+ *
2176
+ * So the cost is made PROPORTIONAL TO USE instead. `anyOrganizationTypeOverridesStepUpAuth` is a
2177
+ * pure fold over static application configuration: when no organisation type in the application
2178
+ * authors a `stepUpAuth` override — the case for every application that has not adopted this —
2179
+ * the merged policy is the raw policy BY CONSTRUCTION, and this gate keeps exactly the zero-I/O
2180
+ * behaviour it had before. Only an application that actually authors the override pays, and only
2181
+ * on the operations where step-up is already in play.
2182
+ */
2183
+ const rawStepUpConfig = authPolicy?.stepUpAuth;
2184
+ /*
2185
+ * The fast path is LOCAL and dependency-free, which is the whole point: an application whose
2186
+ * organisation types author no `stepUpAuth` override cannot have a merged policy that differs
2187
+ * from the raw one, so it never reaches the registry and never performs a read. Every
2188
+ * application behaves exactly as it did before #527 until it adopts the override.
2189
+ */
2190
+ const stepUpConfig = this.anyOrganizationTypeOverridesStepUpAuth()
2191
+ ? await this.servicesRegistry.resolveEffectiveStepUpConfig(executionContext, activeUserType, authPolicy)
2192
+ : rawStepUpConfig;
2038
2193
  // Neither trigger fires → nothing to enforce.
2039
2194
  if (!operationRequiresStepUp && !stepUpConfig?.enabled)
2040
2195
  return;
@@ -2459,7 +2614,32 @@ export class ServiceResourceBackendService {
2459
2614
  || coreOperation === CoreResourceOperation.DELETE
2460
2615
  || coreOperation === CoreResourceOperation.DELETE_MANY;
2461
2616
  const skipCorePersistenceForTargetlessReplace = willReplaceCore && coreMutationRequiresTarget && !target;
2462
- coreState = skipCorePersistenceForTargetlessReplace
2617
+ /*
2618
+ * A CREATE-borrowing REPLACE op must not run the core create either, and for a STRONGER reason
2619
+ * than the targetless case above.
2620
+ *
2621
+ * An op borrows `CoreResourceOperation.CREATE` to obtain the collection-POST route shape — a
2622
+ * request that carries a body but addresses no instance — while its replace impl does the real
2623
+ * work and the core result is discarded. Running the core create anyway has two outcomes, both
2624
+ * wrong, and CREATE is the one verb where neither is a tolerated near-no-op:
2625
+ *
2626
+ * - the op's own narrow request contract does not satisfy the resource's persistence schema,
2627
+ * so the core create fails on missing required fields and the caller gets an opaque
2628
+ * `repository_resource_operation_failed` — the replace handler never runs. This is
2629
+ * `auditLogs | exportAuditLogs`, which had never once succeeded (#319): its request is an
2630
+ * export FILTER, and an audit row's required fields are nothing a filter would carry.
2631
+ * - or the contract happens to satisfy it, and the core create INSERTS A SPURIOUS ROW that is
2632
+ * then thrown away. A phantom write is worse than the failure, because nothing reports it.
2633
+ *
2634
+ * Measured before changing: of the six operations that borrow CREATE, exactly one also declares
2635
+ * REPLACE — so this changes the behaviour of one operation that was unreachable, and forecloses
2636
+ * the phantom write for any future one. The sibling guard above deliberately lists only the
2637
+ * target-requiring mutations; CREATE needs its own condition because it requires no target and
2638
+ * would never satisfy `!target`.
2639
+ */
2640
+ const skipCorePersistenceForCreateBorrowingReplace = willReplaceCore
2641
+ && coreOperation === CoreResourceOperation.CREATE;
2642
+ coreState = skipCorePersistenceForTargetlessReplace || skipCorePersistenceForCreateBorrowingReplace
2463
2643
  ? undefined
2464
2644
  : await this.executeCorePersistenceOperation({
2465
2645
  operation,
@@ -2611,6 +2791,20 @@ export class ServiceResourceBackendService {
2611
2791
  ? currentState.resource
2612
2792
  : currentState;
2613
2793
  await this.dispatchNotifications(executionContext, inputData, notificationCurrentState, transactionallyPreparedTokenGenerationResult, preOperationState);
2794
+ /*
2795
+ * METERED USAGE seam (#415). Sits in this chokepoint for the same reason the RAG ingestion hook
2796
+ * below does: it is the one post-commit point every service-tier write door reaches, so an
2797
+ * operation that consumes a metered product is billed whether it arrived through create, update,
2798
+ * a custom operation, a system write or a nested mutation.
2799
+ *
2800
+ * FIRE-AND-FORGET, like the evaluators above it. The write has already committed, so failing the
2801
+ * caller's operation because a usage row could not be written would trade a billing gap for an
2802
+ * outage — and the metering service already refuses in silence with a warning naming the product.
2803
+ *
2804
+ * `getUsageMeteringService()` returns null when billing is not configured, so an application
2805
+ * without billing pays one null check per write and the whole path is inert.
2806
+ */
2807
+ this.recordDeclaredMeteredUsage(executionContext, notificationCurrentState);
2614
2808
  // RAG INGESTION seam — the service-tier CHANGED-FIELD hook (plan §3.c / H1). Sits in THIS
2615
2809
  // chokepoint because it is the one post-commit point every service-tier write door reaches
2616
2810
  // (create/createMany/update/updateMany, system writes, custom operations, nested mutations, on
@@ -3180,6 +3374,7 @@ export class ServiceResourceBackendService {
3180
3374
  serverlessServicesHandler: this.serverlessServicesHandler,
3181
3375
  executionContextCreator: this.executionContextCreator,
3182
3376
  systemAccessService: this.servicesRegistry.getSystemAccessService?.(),
3377
+ workerClientFactory: this.servicesRegistry.getWorkerClientFactory?.(),
3183
3378
  samlMetadataService: this.servicesRegistry.getSamlMetadataService?.(),
3184
3379
  objectContext: {
3185
3380
  parents: computationContext.objectContext?.parents || {},
@@ -3543,10 +3738,10 @@ export class ServiceResourceBackendService {
3543
3738
  // 2. The validation doesn't check if the user has permission to link the specific
3544
3739
  // file - only that the file exists and is in UPLOADED status.
3545
3740
  //
3546
- // 3. For PostgreSQL resources, file metadata lookup still uses MongoDB,
3547
- // which could have latency implications.
3548
- //
3549
- // See: .cursor/plans for file/storage context
3741
+ // 3. File metadata is no longer pinned to MongoDB: FILES declares no
3742
+ // `persistenceAdapter` and follows the application's default, so on a
3743
+ // PostgreSQL application this lookup is a PostgreSQL read on the same
3744
+ // adapter as the parent row. Do not reason from a cross-adapter lookup here.
3550
3745
  // ============================================================================
3551
3746
  const generatedPdfMaterializations = [];
3552
3747
  let enrichedData;
@@ -3882,6 +4077,7 @@ export class ServiceResourceBackendService {
3882
4077
  // 3. Apply business context enrichment
3883
4078
  const enrichedResult = await this.enrichBusinessContext(CoreResourceOperation.READ, processedResult, executionContext);
3884
4079
  this.logDebug('Read business operation completed', { dataMode });
4080
+ this.recordCrossTenantReadAccess(operation, executionContext, CoreResourceOperation.READ, enrichedResult);
3885
4081
  return enrichedResult;
3886
4082
  }
3887
4083
  async update(operation, executionContext, id_or_ids_or_filter, data, options) {
@@ -4052,7 +4248,7 @@ export class ServiceResourceBackendService {
4052
4248
  },
4053
4249
  });
4054
4250
  }
4055
- this.assertGeneratedFileMaterializationCommitsWithRow(resourceType, executionContext, 'Generated PDF regenerate is not yet supported for PostgreSQL-backed resources because FILES metadata is Mongo-backed and cannot be swapped atomically with the parent row.', { fieldName });
4251
+ this.assertGeneratedFileMaterializationCommitsWithRow(resourceType, executionContext, 'Generated PDF regenerate requires the replacement file metadata to be swapped in the same transaction as the parent row, and this resource does not resolve to the same persistence adapter as the FILES resource, so that boundary cannot commit atomically. FILES follows the application default adapter; see resourceAdapterMap for the adapters involved.', { fieldName });
4056
4252
  const generated = await this.pdfGenerationOrchestrator.generateForField({
4057
4253
  resourceType,
4058
4254
  parentRecord: currentObject,
@@ -4542,6 +4738,7 @@ export class ServiceResourceBackendService {
4542
4738
  const enrichedData = await Promise.all(processedData.map((item) => this.enrichBusinessContext(CoreResourceOperation.LIST, item, executionContext)));
4543
4739
  this.logDebug('List business operation completed (paginated)', { count: enrichedData.length, pagination: result.pagination, dataMode });
4544
4740
  this.recordPlatformDirectoryAccess(operation, executionContext, CoreResourceOperation.LIST, enrichedData.length);
4741
+ this.recordCrossTenantReadAccess(operation, executionContext, CoreResourceOperation.LIST, enrichedData);
4545
4742
  return { data: enrichedData, pagination: result.pagination };
4546
4743
  }
4547
4744
  else {
@@ -4551,6 +4748,7 @@ export class ServiceResourceBackendService {
4551
4748
  const enrichedData = await Promise.all(processedData.map((item) => this.enrichBusinessContext(CoreResourceOperation.LIST, item, executionContext)));
4552
4749
  this.logDebug('List business operation completed (raw)', { count: enrichedData.length, dataMode });
4553
4750
  this.recordPlatformDirectoryAccess(operation, executionContext, CoreResourceOperation.LIST, enrichedData.length);
4751
+ this.recordCrossTenantReadAccess(operation, executionContext, CoreResourceOperation.LIST, enrichedData);
4554
4752
  return enrichedData;
4555
4753
  }
4556
4754
  }
@@ -4575,6 +4773,19 @@ export class ServiceResourceBackendService {
4575
4773
  * down, and a fail-closed variant would hand anyone a way to disable an administrative surface by
4576
4774
  * breaking the sink. Feature-detected against the service so a partial DI binding (unit suites,
4577
4775
  * minimal containers) cannot turn an observation into a crash.
4776
+ *
4777
+ * ## The drop is COUNTED
4778
+ *
4779
+ * Emission goes through {@link emitAuditObservation}, so an observation that never reaches the
4780
+ * pipeline lands on `audit_observation_dropped_total` rather than nowhere. The feature detection
4781
+ * therefore decides an ARGUMENT: handing the seam `undefined` is how this site reports
4782
+ * `SERVICE_UNAVAILABLE`, and an early return there would restore the silence — which is the whole
4783
+ * defect, because an empty directory-access trail reads as "nobody enumerated anything".
4784
+ *
4785
+ * Both suppressions above stay ABOVE that emission and are deliberately NOT counted: an unknown
4786
+ * resource configuration and a read the confinement authority DID confine are cases where nothing
4787
+ * was owed. Counting them would fire the loss signal on correct behaviour, and a signal that fires
4788
+ * on correct behaviour is one operators learn to ignore.
4578
4789
  */
4579
4790
  recordPlatformDirectoryAccess(operation, executionContext, executedCoreOperation, returnedCount) {
4580
4791
  try {
@@ -4591,19 +4802,134 @@ export class ServiceResourceBackendService {
4591
4802
  }))
4592
4803
  return;
4593
4804
  const auditLogsService = this.servicesRegistry?.getAuditLogsService?.();
4594
- if (typeof auditLogsService?.logPlatformDirectoryAccess !== 'function')
4805
+ const emitter = typeof auditLogsService?.logPlatformDirectoryAccess === 'function'
4806
+ ? auditLogsService
4807
+ : undefined;
4808
+ emitAuditObservation({
4809
+ observation: AuditObservationKind.PLATFORM_DIRECTORY_ACCESS,
4810
+ emit: emitter
4811
+ ? () => emitter.logPlatformDirectoryAccess({
4812
+ resourceType: String(operation.resourceIdentifier),
4813
+ operationIdentifier: String(operation.operationIdentifier),
4814
+ variantType: operation.variantType,
4815
+ variantKey: operation.variantKey,
4816
+ returnedCount,
4817
+ initiatorRoles: (executionContext.initiatorRoles ?? []).flatMap((roleInfo) => roleInfo.roles ?? []),
4818
+ executionType: executionContext.executionType,
4819
+ actorUserId: executionContext.initiatorIds?.userId,
4820
+ applicationId: executionContext.initiatorIds?.applicationId,
4821
+ }, executionContext)
4822
+ : undefined,
4823
+ metricsResolver: () => this.servicesRegistry?.getAuditObservationLossMetricsRecorder?.(),
4824
+ logger: this.logger,
4825
+ // The SIZE is what the lost row was for — an operator who opened the directory and one who
4826
+ // exported it produce the same record without it, so it belongs in the loss line too.
4827
+ context: {
4828
+ observedResourceType: String(operation.resourceIdentifier),
4829
+ observedOperationIdentifier: String(operation.operationIdentifier),
4830
+ observedReturnedCount: returnedCount,
4831
+ observedActorUserId: executionContext.initiatorIds?.userId,
4832
+ },
4833
+ });
4834
+ }
4835
+ catch {
4836
+ /* observation only */
4837
+ }
4838
+ }
4839
+ /**
4840
+ * Record a READ that crossed the tenant boundary — one row per TENANT reached.
4841
+ *
4842
+ * assurance-control: WILDO.ACCESS.CROSS_TENANT_ADMINISTRATION — an operator read of another
4843
+ * tenant's rows leaves evidence in that tenant's own trail.
4844
+ *
4845
+ * ## Why here, and not in the authorizer
4846
+ *
4847
+ * `authorizeOrganizations` emits the same event, but it only runs for ORGANIZATIONS-scoped
4848
+ * resources and it decides on ONE fetched row. An APPLICATION-scoped door returns a SET whose rows
4849
+ * belong to many tenants, and the authorizer never sees it. This seam has the operation, the
4850
+ * execution context and the rows, and is adapter-neutral — the same three reasons
4851
+ * {@link recordPlatformDirectoryAccess} sits here.
4852
+ *
4853
+ * ## Fire-and-forget, deliberately
4854
+ *
4855
+ * No `await`, and the rejection is swallowed — the same contract as its two siblings. An operator's
4856
+ * read must not fail because the audit sink is down, and a fail-closed variant would hand anyone a
4857
+ * way to disable an administrative surface by breaking the sink.
4858
+ *
4859
+ * The service is also feature-DETECTED, matching its two siblings. Stated honestly: the outer
4860
+ * `catch` below would contain an absent-method `TypeError` anyway, so this check is defence in
4861
+ * depth rather than the only thing standing between a partial DI binding (unit suites, minimal
4862
+ * containers, a host binding an older audit service) and a thrown observer. What it buys is that
4863
+ * such a binding is a NO-OP rather than an exception path — a swallowed `TypeError` looks exactly
4864
+ * like a swallowed real defect. An observer must never be able to fail the request it observes.
4865
+ *
4866
+ * ## The drop is COUNTED, on the SAME member as the authorizer's half
4867
+ *
4868
+ * Emission goes through {@link emitAuditObservation} under
4869
+ * `AuditObservationKind.CROSS_TENANT_ADMINISTRATIVE_ACCESS` — the member the per-instance gate
4870
+ * already uses, deliberately. A member names the EVIDENCE rather than the emitter, so *how much
4871
+ * cross-tenant evidence did we lose?* stays one number instead of a sum somebody has to remember
4872
+ * to widen. WHICH door dropped it is in the loss line's context.
4873
+ *
4874
+ * One observation per CROSSING, so a lost set of ten tenants counts ten — the loss signal is then
4875
+ * proportional to the evidence actually lost rather than to the number of reads. `crossings.length
4876
+ * === 0` stays ABOVE it: no crossing is nothing owed, not a loss.
4877
+ */
4878
+ recordCrossTenantReadAccess(operation, executionContext, executedCoreOperation, rows) {
4879
+ try {
4880
+ const resourceConfiguration = this.resourcesRegistry?.getResourceConfiguration?.(operation.resourceIdentifier);
4881
+ if (!resourceConfiguration)
4595
4882
  return;
4596
- void auditLogsService.logPlatformDirectoryAccess({
4597
- resourceType: String(operation.resourceIdentifier),
4598
- operationIdentifier: String(operation.operationIdentifier),
4599
- variantType: operation.variantType,
4600
- variantKey: operation.variantKey,
4601
- returnedCount,
4602
- initiatorRoles: (executionContext.initiatorRoles ?? []).flatMap((roleInfo) => roleInfo.roles ?? []),
4603
- executionType: executionContext.executionType,
4604
- actorUserId: executionContext.initiatorIds?.userId,
4605
- applicationId: executionContext.initiatorIds?.applicationId,
4606
- }, executionContext).catch(() => { });
4883
+ const crossings = collectCrossTenantReadCrossings({
4884
+ executionContext: executionContext,
4885
+ // The EXECUTED variant, for both halves of the decision — see the authority's JSDoc. Reading
4886
+ // enrolment from here and `admissionDeclared` from anywhere else is how the trail would come
4887
+ // to describe a read the observation never actually admitted.
4888
+ operation: operation,
4889
+ resourceConfiguration: resourceConfiguration,
4890
+ executedCoreOperation,
4891
+ rows,
4892
+ });
4893
+ if (crossings.length === 0)
4894
+ return;
4895
+ const auditLogsService = this.servicesRegistry?.getAuditLogsService?.();
4896
+ const emitter = typeof auditLogsService?.logCrossTenantAdministrativeAccess === 'function'
4897
+ ? auditLogsService
4898
+ : undefined;
4899
+ const initiatorRoles = (executionContext.initiatorRoles ?? []).flatMap((roleInfo) => roleInfo.roles ?? []);
4900
+ for (const crossing of crossings) {
4901
+ emitAuditObservation({
4902
+ observation: AuditObservationKind.CROSS_TENANT_ADMINISTRATIVE_ACCESS,
4903
+ emit: emitter
4904
+ ? () => emitter.logCrossTenantAdministrativeAccess({
4905
+ operatorUserId: executionContext.initiatorIds?.userId,
4906
+ targetOrganizationId: crossing.targetOrganizationId,
4907
+ resourceType: String(operation.resourceIdentifier),
4908
+ operationIdentifier: String(operation.operationIdentifier),
4909
+ variantType: operation.variantType,
4910
+ variantKey: operation.variantKey,
4911
+ targetResourceIds: crossing.targetResourceIds.length > 0 ? crossing.targetResourceIds : undefined,
4912
+ authorizingGrantId: executionContext.authorizingPlatformAccessGrantId,
4913
+ // Always true by construction — only a DECLARED crossing is observed, so the trail never
4914
+ // describes a completed read with the token that means "attempted and refused". Read from
4915
+ // the operation rather than hard-coded, so the two can never drift apart.
4916
+ admissionDeclared: operation.admitsCrossTenantPlatformAdministration === true,
4917
+ initiatorRoles,
4918
+ executionType: executionContext.executionType,
4919
+ })
4920
+ : undefined,
4921
+ metricsResolver: () => this.servicesRegistry?.getAuditObservationLossMetricsRecorder?.(),
4922
+ logger: this.logger,
4923
+ // The operator and the TENANT reached are the two identities the audit row would have
4924
+ // carried, and the pair a reviewer needs to reconstruct one lost crossing.
4925
+ context: {
4926
+ observedResourceType: String(operation.resourceIdentifier),
4927
+ observedOperationIdentifier: String(operation.operationIdentifier),
4928
+ observedTargetOrganizationId: crossing.targetOrganizationId,
4929
+ observedOperatorUserId: executionContext.initiatorIds?.userId,
4930
+ },
4931
+ });
4932
+ }
4607
4933
  }
4608
4934
  catch {
4609
4935
  /* observation only */
@@ -4628,6 +4954,34 @@ export class ServiceResourceBackendService {
4628
4954
  // 4. Return result with enriched data (transformation happens in doOperation)
4629
4955
  const processedResult = { ...result, data: enrichedData };
4630
4956
  this.logDebug('Search business operation completed', { count: enrichedData.length });
4957
+ // SEARCH is a directory enumeration exactly as LIST is, and it was the site this invariant
4958
+ // MISSED. `SCOPE_ROOT_CONFINED_OPERATIONS` names SEARCH, the event schema's own
4959
+ // `operationIdentifier` JSDoc names `search` as a collection verb it carries, and
4960
+ // `isUnconfinedScopeRootDirectoryRead` answers `true` for it — only this seam never asked.
4961
+ //
4962
+ // The cost was not theoretical and lands on the widest read in the system. `users search admin`
4963
+ // is THE operator directory surface (it is the one that declares `searchableFields`,
4964
+ // `filterFields`, `sortFields` and a 200-row page, and it is what an admin UI's user list is
4965
+ // built on), while `users list admin` is the unparameterised sibling. So the verb an operator
4966
+ // actually reaches for left nothing behind, and an empty directory-access trail reads as
4967
+ // "nobody enumerated anything" — the precise failure the event exists to prevent. The collection
4968
+ // EXPORT door inherits the fix for free: it pages through this same seam.
4969
+ //
4970
+ // It survived because the e2e lane DRIVES this exact call (`platform-directory-access.e2e.ts`
4971
+ // D-1g) to prove a pagination ceiling, and asserts the audit row only for LIST — an exercised
4972
+ // site with no assertion on it. `.claude/rules/invariant-call-site-enumeration.md`.
4973
+ //
4974
+ // `operation`, not `resolvedOperation`, matching the LIST seam and the sibling recorder one line
4975
+ // below. Two conventions for "which operation object" in one file is how a trail and a gate come
4976
+ // to disagree about which variant ran.
4977
+ //
4978
+ // COUNT is still deliberately NOT recorded, and that is unchanged: `returnedCount` means rows the
4979
+ // caller RECEIVED, and a COUNT returns none while disclosing a size. Recording 0 would be false
4980
+ // and recording the total would redefine the field. Should a count ever be treated as a
4981
+ // disclosure it needs an event carrying a number, which is the same conclusion the cross-tenant
4982
+ // read observation reached for its own COUNT exclusion.
4983
+ this.recordPlatformDirectoryAccess(operation, executionContext, CoreResourceOperation.SEARCH, enrichedData.length);
4984
+ this.recordCrossTenantReadAccess(operation, executionContext, CoreResourceOperation.SEARCH, enrichedData);
4631
4985
  return processedResult;
4632
4986
  }
4633
4987
  async count(operation, executionContext, filter, options) {
@@ -5908,7 +6262,7 @@ export class ServiceResourceBackendService {
5908
6262
  if (this.getGeneratedPdfFileFields(resourceType).length === 0) {
5909
6263
  return;
5910
6264
  }
5911
- this.assertGeneratedFileMaterializationCommitsWithRow(resourceType, executionContext, 'Generated PDF creation is not yet supported for PostgreSQL-backed resources because FILES metadata is Mongo-backed and cannot be committed atomically with the parent row.');
6265
+ this.assertGeneratedFileMaterializationCommitsWithRow(resourceType, executionContext, 'Generated PDF creation requires the file metadata to be committed in the same transaction as the parent row, and this resource does not resolve to the same persistence adapter as the FILES resource, so that boundary cannot commit atomically. FILES follows the application default adapter; see resourceAdapterMap for the adapters involved.');
5912
6266
  }
5913
6267
  async materializeGeneratedPdfFieldsForCreate(data, resourceType, executionContext, options) {
5914
6268
  const generatedPdfFields = this.getGeneratedPdfFileFields(resourceType);
@@ -8311,20 +8665,118 @@ export class ServiceResourceBackendService {
8311
8665
  return rows;
8312
8666
  return rows.map((row) => this.omitPathsFromValue(row, excludedPaths));
8313
8667
  }
8668
+ /**
8669
+ * Defer one relationship edge's teardown onto the custom-batch queue — the runtime behind
8670
+ * `ChildLifecycleMode.LAZY` (#427).
8671
+ *
8672
+ * ## What is deferred is the WHOLE teardown, not a delete
8673
+ *
8674
+ * The job carries the two resource types and the parent ids; it carries no rows, no relationship
8675
+ * object and no child ids. `runDeferredChildLifecycleTeardown` re-derives the edge from the
8676
+ * PARENT'S CURRENT CONFIGURATION at consumption time and calls `deleteChildrenImmediate` — the
8677
+ * same method IMMEDIATE mode calls. That is deliberate and it is what makes the mode honest:
8678
+ *
8679
+ * - **rag-removal-gate: INHERITED.** The chunk removal is the last step of that method
8680
+ * (`runRagChunkRemovalForDeletedRows`), so a deferred teardown cannot skip it without the
8681
+ * immediate one skipping it too. The obligation this method's previous comment handed to
8682
+ * "whoever implements it" is discharged by not having a second implementation at all.
8683
+ * - grandchild recursion, file orchestration and the repository delete come along for the same
8684
+ * reason.
8685
+ * - discovery happens LATER, against the rows that exist then — which is the point of LAZY. A
8686
+ * job carrying a child-id list would have frozen the answer at enqueue time.
8687
+ *
8688
+ * ## Enqueue failure is FATAL to the parent delete, on purpose
8689
+ *
8690
+ * If the job cannot be published, this throws and the parent's delete fails. The alternative —
8691
+ * log and continue — leaves orphaned children with no record that anything is owed, which is
8692
+ * exactly the silent data problem the fail-closed refusal here used to prevent. LAZY moves WHEN
8693
+ * the teardown happens; it does not make it optional.
8694
+ */
8314
8695
  async queueChildDeletion(relationship, parentIds, executionContext) {
8315
- // rag-removal-gate: N/A — LAZY cascade deletion is UNIMPLEMENTED (this method only throws).
8316
- // Whoever implements it inherits the chunk-removal obligation: the deferred teardown must call
8317
- // runRagChunkRemovalForDeletedRows for the child rows it eventually deletes, exactly as
8318
- // deleteChildrenImmediate does — a queued delete that skips it strands the children's chunks
8319
- // until the backstop sweep.
8320
- throw this.errorBuilder.buildError(ErrorType.INTERNAL, executionContext, {
8321
- customMessageReference: ErrorCustomMessageReference.SERVICE_RESOURCE_OPERATION_FAILED,
8322
- context: {
8323
- message: 'LAZY cascade mode requires queue system integration. Queue system implementation pending. See Phase 6.1-6.2 for implementation details.',
8324
- relationship: relationship.resourceType2,
8325
- parentIds,
8326
- },
8696
+ const childResourceType = relationship.resourceType2;
8697
+ const parentResourceType = this.resourceConfiguration.resourceIdentifier;
8698
+ if (!this.queueService) {
8699
+ throw this.errorBuilder.buildError(ErrorType.CONFIGURATION, executionContext, {
8700
+ customMessageReference: ErrorCustomMessageReference.SERVICE_RESOURCE_OPERATION_FAILED,
8701
+ context: {
8702
+ message: 'LAZY child lifecycle requires the queue service, which is not bound in this runtime. '
8703
+ + 'Declare the relationship with ChildLifecycleMode.IMMEDIATE, or run this operation in a '
8704
+ + 'host that has the queue.',
8705
+ parentResourceType,
8706
+ childResourceType,
8707
+ },
8708
+ });
8709
+ }
8710
+ const enqueued = await this.queueService.enqueueCustomBatch(CHILD_LIFECYCLE_TEARDOWN_BATCH_REF, {
8711
+ parentResourceType,
8712
+ childResourceType,
8713
+ parentIds,
8327
8714
  });
8715
+ this.logDebug('Child lifecycle teardown deferred to the queue', {
8716
+ jobId: enqueued.jobId,
8717
+ parentResourceType,
8718
+ childResourceType,
8719
+ parentIdsCount: parentIds.length,
8720
+ });
8721
+ // TRUE per the dispatcher's `@returns` contract: this edge was processed. The erasure receipt
8722
+ // reads that as "the teardown ran", which for LAZY means "the teardown is owed and recorded",
8723
+ // and the job is durable with a dead-letter queue behind it.
8724
+ return true;
8725
+ }
8726
+ /**
8727
+ * Run a deferred child-lifecycle teardown — the consumer half of {@link queueChildDeletion} (#427).
8728
+ *
8729
+ * Public because the custom-batch executor is the caller and it reaches this service through
8730
+ * `ServicesRegistryHandlerBackendService.getService(parentResourceType)`. It is the ONLY public
8731
+ * entry to the cascade, and it re-checks the configuration rather than trusting the job:
8732
+ *
8733
+ * - the edge must still exist on the parent and still declare `onParentDelete.enabled`;
8734
+ * - it must still be `DELETE` + `LAZY`.
8735
+ *
8736
+ * A configuration that changed between enqueue and consumption therefore does NOT get the old
8737
+ * behaviour replayed. Refusing is right rather than adapting: if the edge became IMMEDIATE the
8738
+ * parent delete that would have run it is already gone, and if it became
8739
+ * IMPERSONALIZE_AND_RETAIN then hard-deleting the children is precisely the data loss the retain
8740
+ * strategy exists to prevent.
8741
+ */
8742
+ async runDeferredChildLifecycleTeardown(args) {
8743
+ const { childResourceType, parentIds, executionContext } = args;
8744
+ const parentResourceType = this.resourceConfiguration.resourceIdentifier;
8745
+ const childRelationships = getChildDirectionRelationships(this.resourceConfiguration.resourceRelationships);
8746
+ const relationship = childRelationships.find((candidate) => String(candidate.resourceType2) === String(childResourceType)
8747
+ && this.getResolvedLifecycleOnParentDelete(candidate)?.enabled === true);
8748
+ if (!relationship) {
8749
+ throw this.errorBuilder.buildError(ErrorType.CONFIGURATION, executionContext, {
8750
+ customMessageReference: ErrorCustomMessageReference.SERVICE_RESOURCE_OPERATION_FAILED,
8751
+ context: {
8752
+ message: 'Deferred child teardown names an edge this parent no longer declares with an enabled '
8753
+ + 'onParentDelete lifecycle. Refusing rather than replaying the configuration the job was '
8754
+ + 'enqueued under.',
8755
+ parentResourceType,
8756
+ childResourceType,
8757
+ },
8758
+ });
8759
+ }
8760
+ const lifecycleConfig = this.getResolvedLifecycleOnParentDelete(relationship);
8761
+ const strategy = lifecycleConfig.strategy || ChildLifecycleStrategy.DELETE;
8762
+ const mode = lifecycleConfig.mode || ChildLifecycleMode.IMMEDIATE;
8763
+ if (strategy !== ChildLifecycleStrategy.DELETE || mode !== ChildLifecycleMode.LAZY) {
8764
+ throw this.errorBuilder.buildError(ErrorType.CONFIGURATION, executionContext, {
8765
+ customMessageReference: ErrorCustomMessageReference.SERVICE_RESOURCE_OPERATION_FAILED,
8766
+ context: {
8767
+ message: 'Deferred child teardown is no longer the configured behaviour for this edge. Refusing: '
8768
+ + 'hard-deleting children whose edge now declares IMPERSONALIZE_AND_RETAIN is the data '
8769
+ + 'loss that strategy exists to prevent.',
8770
+ parentResourceType,
8771
+ childResourceType,
8772
+ strategy,
8773
+ mode,
8774
+ },
8775
+ });
8776
+ }
8777
+ // The SAME method IMMEDIATE mode calls. Depth starts at 0 with the edge's own budget, so the
8778
+ // grandchild recursion behaves exactly as it would have on the request path.
8779
+ return await this.deleteChildrenImmediate(relationship, [...parentIds], executionContext, 0, lifecycleConfig.maxDepth || 1, new Set());
8328
8780
  }
8329
8781
  /**
8330
8782
  * Execute additional post-operation logic (non-cascading)
@@ -8417,5 +8869,41 @@ export class ServiceResourceBackendService {
8417
8869
  logDebug: this.logDebug,
8418
8870
  }, executionContext, inputData, currentResult, tokenGenerationResult, previousState);
8419
8871
  }
8872
+ /**
8873
+ * Record the metered usage an operation DECLARES, if any (#415).
8874
+ *
8875
+ * Reads `recordsUsage` off `executionContext.operation`, which by this point is the variant-resolved
8876
+ * operation — the same guarantee `dispatchNotifications` relies on for its own authored config.
8877
+ *
8878
+ * The metering service is reached through a module-level getter rather than injection, because it
8879
+ * injects THIS class and the container cannot resolve that cycle. See `setUsageMeteringService`.
8880
+ */
8881
+ recordDeclaredMeteredUsage(executionContext, operationResult) {
8882
+ const declaration = executionContext.operation?.recordsUsage;
8883
+ if (!declaration)
8884
+ return;
8885
+ const usageMetering = getUsageMeteringService();
8886
+ if (!usageMetering) {
8887
+ // Declared but unbillable: the operation says it consumes a metered product and the application
8888
+ // has no billing provider. Loud, because it is an authoring error that costs revenue silently —
8889
+ // every call of this operation consumes something nobody will ever be charged for.
8890
+ this.logger.warn('Operation declares metered usage but billing is not configured; nothing recorded', {
8891
+ productKey: declaration.productKey,
8892
+ resourceIdentifier: executionContext.operation?.resourceIdentifier,
8893
+ operationIdentifier: executionContext.operation?.operationIdentifier,
8894
+ });
8895
+ return;
8896
+ }
8897
+ setImmediate(() => {
8898
+ void usageMetering
8899
+ .recordDeclaredOperationUsage(declaration, executionContext, operationResult)
8900
+ .catch((error) => {
8901
+ this.logger.error('Failed to record declared metered usage', {
8902
+ ...projectCaughtErrorLogFields(error),
8903
+ productKey: declaration.productKey,
8904
+ });
8905
+ });
8906
+ });
8907
+ }
8420
8908
  }
8421
8909
  //# sourceMappingURL=services-registry-handler.backend.service.js.map