@wildo-ai/saas-backend-lib 1.1.1 → 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 (972) 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 +14 -3
  20. package/dist/esm/base-classes/services/controllers/controller-resource.backend.service.d.ts.map +1 -1
  21. package/dist/esm/base-classes/services/controllers/controller-resource.backend.service.js +138 -24
  22. package/dist/esm/base-classes/services/controllers/controller-resource.backend.service.js.map +1 -1
  23. package/dist/esm/base-classes/services/controllers/controllers-registry-handler.backend.service.d.ts +3 -1
  24. package/dist/esm/base-classes/services/controllers/controllers-registry-handler.backend.service.d.ts.map +1 -1
  25. package/dist/esm/base-classes/services/controllers/controllers-registry-handler.backend.service.js +8 -3
  26. package/dist/esm/base-classes/services/controllers/controllers-registry-handler.backend.service.js.map +1 -1
  27. package/dist/esm/base-classes/services/repositories/field-clearing-partition.backend.d.ts +11 -0
  28. package/dist/esm/base-classes/services/repositories/field-clearing-partition.backend.d.ts.map +1 -1
  29. package/dist/esm/base-classes/services/repositories/field-clearing-partition.backend.js +11 -2
  30. package/dist/esm/base-classes/services/repositories/field-clearing-partition.backend.js.map +1 -1
  31. package/dist/esm/base-classes/services/repositories/http-api/http-api-provider-access.backend.d.ts +124 -13
  32. package/dist/esm/base-classes/services/repositories/http-api/http-api-provider-access.backend.d.ts.map +1 -1
  33. package/dist/esm/base-classes/services/repositories/http-api/http-api-provider-access.backend.js +207 -21
  34. package/dist/esm/base-classes/services/repositories/http-api/http-api-provider-access.backend.js.map +1 -1
  35. package/dist/esm/base-classes/services/repositories/http-api/http-api-read-client.backend.d.ts +60 -8
  36. package/dist/esm/base-classes/services/repositories/http-api/http-api-read-client.backend.d.ts.map +1 -1
  37. package/dist/esm/base-classes/services/repositories/http-api/http-api-read-client.backend.js +174 -26
  38. package/dist/esm/base-classes/services/repositories/http-api/http-api-read-client.backend.js.map +1 -1
  39. package/dist/esm/base-classes/services/repositories/http-api/http-api-resource-repository.backend.service.d.ts +48 -4
  40. package/dist/esm/base-classes/services/repositories/http-api/http-api-resource-repository.backend.service.d.ts.map +1 -1
  41. package/dist/esm/base-classes/services/repositories/http-api/http-api-resource-repository.backend.service.js +102 -30
  42. package/dist/esm/base-classes/services/repositories/http-api/http-api-resource-repository.backend.service.js.map +1 -1
  43. package/dist/esm/base-classes/services/repositories/http-api/http-api-rest-operation-reference.backend.d.ts +55 -0
  44. package/dist/esm/base-classes/services/repositories/http-api/http-api-rest-operation-reference.backend.d.ts.map +1 -0
  45. package/dist/esm/base-classes/services/repositories/http-api/http-api-rest-operation-reference.backend.js +114 -0
  46. package/dist/esm/base-classes/services/repositories/http-api/http-api-rest-operation-reference.backend.js.map +1 -0
  47. package/dist/esm/base-classes/services/repositories/http-api/http-api-transport.backend.d.ts +89 -14
  48. package/dist/esm/base-classes/services/repositories/http-api/http-api-transport.backend.d.ts.map +1 -1
  49. package/dist/esm/base-classes/services/repositories/http-api/http-api-transport.backend.js +84 -11
  50. package/dist/esm/base-classes/services/repositories/http-api/http-api-transport.backend.js.map +1 -1
  51. package/dist/esm/base-classes/services/repositories/http-api/odata-query-compiler.backend.d.ts.map +1 -1
  52. package/dist/esm/base-classes/services/repositories/http-api/odata-query-compiler.backend.js +16 -0
  53. package/dist/esm/base-classes/services/repositories/http-api/odata-query-compiler.backend.js.map +1 -1
  54. package/dist/esm/base-classes/services/repositories/infrastructure-tier-contract.backend.d.ts +20 -6
  55. package/dist/esm/base-classes/services/repositories/infrastructure-tier-contract.backend.d.ts.map +1 -1
  56. package/dist/esm/base-classes/services/repositories/infrastructure-tier-contract.backend.js +96 -32
  57. package/dist/esm/base-classes/services/repositories/infrastructure-tier-contract.backend.js.map +1 -1
  58. package/dist/esm/base-classes/services/repositories/introspection/introspection-resource-repository.backend.service.d.ts +3 -1
  59. package/dist/esm/base-classes/services/repositories/introspection/introspection-resource-repository.backend.service.d.ts.map +1 -1
  60. package/dist/esm/base-classes/services/repositories/introspection/introspection-resource-repository.backend.service.js +32 -7
  61. package/dist/esm/base-classes/services/repositories/introspection/introspection-resource-repository.backend.service.js.map +1 -1
  62. package/dist/esm/base-classes/services/repositories/introspection/introspection-resource-source.backend.port.d.ts +8 -5
  63. package/dist/esm/base-classes/services/repositories/introspection/introspection-resource-source.backend.port.d.ts.map +1 -1
  64. package/dist/esm/base-classes/services/repositories/introspection/introspection-resource-source.backend.port.js.map +1 -1
  65. package/dist/esm/base-classes/services/repositories/postgresql-resource-repository.backend.service.d.ts +80 -0
  66. package/dist/esm/base-classes/services/repositories/postgresql-resource-repository.backend.service.d.ts.map +1 -1
  67. package/dist/esm/base-classes/services/repositories/postgresql-resource-repository.backend.service.js +298 -23
  68. package/dist/esm/base-classes/services/repositories/postgresql-resource-repository.backend.service.js.map +1 -1
  69. package/dist/esm/base-classes/services/repositories/repositories-registry-handler.backend.service.d.ts +71 -1
  70. package/dist/esm/base-classes/services/repositories/repositories-registry-handler.backend.service.d.ts.map +1 -1
  71. package/dist/esm/base-classes/services/repositories/repositories-registry-handler.backend.service.js +85 -5
  72. package/dist/esm/base-classes/services/repositories/repositories-registry-handler.backend.service.js.map +1 -1
  73. package/dist/esm/base-classes/services/repositories/repository-resource.backend.service.d.ts +21 -0
  74. package/dist/esm/base-classes/services/repositories/repository-resource.backend.service.d.ts.map +1 -1
  75. package/dist/esm/base-classes/services/repositories/repository-resource.backend.service.js +146 -4
  76. package/dist/esm/base-classes/services/repositories/repository-resource.backend.service.js.map +1 -1
  77. package/dist/esm/base-classes/services/services/resource-operation-custom-implementation-base.backend.service.d.ts +22 -0
  78. package/dist/esm/base-classes/services/services/resource-operation-custom-implementation-base.backend.service.d.ts.map +1 -1
  79. package/dist/esm/base-classes/services/services/resource-operation-custom-implementation-base.backend.service.js.map +1 -1
  80. package/dist/esm/base-classes/services/services/resource-operation-implementation-coverage.backend.utils.d.ts +3 -26
  81. package/dist/esm/base-classes/services/services/resource-operation-implementation-coverage.backend.utils.d.ts.map +1 -1
  82. package/dist/esm/base-classes/services/services/resource-operation-implementation-coverage.backend.utils.js +3 -68
  83. package/dist/esm/base-classes/services/services/resource-operation-implementation-coverage.backend.utils.js.map +1 -1
  84. package/dist/esm/base-classes/services/services/resource-status-transition.custom-impl.backend.service.d.ts.map +1 -1
  85. package/dist/esm/base-classes/services/services/resource-status-transition.custom-impl.backend.service.js +4 -1
  86. package/dist/esm/base-classes/services/services/resource-status-transition.custom-impl.backend.service.js.map +1 -1
  87. package/dist/esm/base-classes/services/services/resource-status-transition.definitions.backend.d.ts +11 -0
  88. package/dist/esm/base-classes/services/services/resource-status-transition.definitions.backend.d.ts.map +1 -1
  89. package/dist/esm/base-classes/services/services/resource-status-transition.definitions.backend.js +39 -5
  90. package/dist/esm/base-classes/services/services/resource-status-transition.definitions.backend.js.map +1 -1
  91. package/dist/esm/base-classes/services/services/services-registry-handler.backend.service.d.ts +181 -2
  92. package/dist/esm/base-classes/services/services/services-registry-handler.backend.service.d.ts.map +1 -1
  93. package/dist/esm/base-classes/services/services/services-registry-handler.backend.service.js +533 -43
  94. package/dist/esm/base-classes/services/services/services-registry-handler.backend.service.js.map +1 -1
  95. package/dist/esm/base-classes/services/services/system-access.backend.service.d.ts +36 -3
  96. package/dist/esm/base-classes/services/services/system-access.backend.service.d.ts.map +1 -1
  97. package/dist/esm/base-classes/services/services/system-access.backend.service.js +70 -8
  98. package/dist/esm/base-classes/services/services/system-access.backend.service.js.map +1 -1
  99. package/dist/esm/billing/batches/billing-reconciliation.batch.backend.service.d.ts +28 -0
  100. package/dist/esm/billing/batches/billing-reconciliation.batch.backend.service.d.ts.map +1 -0
  101. package/dist/esm/billing/batches/billing-reconciliation.batch.backend.service.js +90 -0
  102. package/dist/esm/billing/batches/billing-reconciliation.batch.backend.service.js.map +1 -0
  103. package/dist/esm/billing/batches/usage-flush.batch.backend.service.d.ts +44 -0
  104. package/dist/esm/billing/batches/usage-flush.batch.backend.service.d.ts.map +1 -0
  105. package/dist/esm/billing/batches/usage-flush.batch.backend.service.js +99 -0
  106. package/dist/esm/billing/batches/usage-flush.batch.backend.service.js.map +1 -0
  107. package/dist/esm/billing/models/billing-provider-event-settlement.backend.schemas.d.ts +91 -0
  108. package/dist/esm/billing/models/billing-provider-event-settlement.backend.schemas.d.ts.map +1 -0
  109. package/dist/esm/billing/models/billing-provider-event-settlement.backend.schemas.js +152 -0
  110. package/dist/esm/billing/models/billing-provider-event-settlement.backend.schemas.js.map +1 -0
  111. package/dist/esm/billing/services/back-office/billing-reconciliation.backend.service.d.ts +186 -0
  112. package/dist/esm/billing/services/back-office/billing-reconciliation.backend.service.d.ts.map +1 -0
  113. package/dist/esm/billing/services/back-office/billing-reconciliation.backend.service.js +474 -0
  114. package/dist/esm/billing/services/back-office/billing-reconciliation.backend.service.js.map +1 -0
  115. package/dist/esm/billing/services/back-office/product-catalog-sync.backend.service.d.ts +100 -0
  116. package/dist/esm/billing/services/back-office/product-catalog-sync.backend.service.d.ts.map +1 -1
  117. package/dist/esm/billing/services/back-office/product-catalog-sync.backend.service.js +209 -6
  118. package/dist/esm/billing/services/back-office/product-catalog-sync.backend.service.js.map +1 -1
  119. package/dist/esm/billing/services/back-office/usage-metering.backend.service.d.ts +200 -4
  120. package/dist/esm/billing/services/back-office/usage-metering.backend.service.d.ts.map +1 -1
  121. package/dist/esm/billing/services/back-office/usage-metering.backend.service.js +593 -64
  122. package/dist/esm/billing/services/back-office/usage-metering.backend.service.js.map +1 -1
  123. package/dist/esm/billing/services/billing-adapter-registry.backend.d.ts +36 -0
  124. package/dist/esm/billing/services/billing-adapter-registry.backend.d.ts.map +1 -0
  125. package/dist/esm/billing/services/billing-adapter-registry.backend.js +83 -0
  126. package/dist/esm/billing/services/billing-adapter-registry.backend.js.map +1 -0
  127. package/dist/esm/billing/services/billing-checkout-metadata.backend.utils.d.ts +9 -0
  128. package/dist/esm/billing/services/billing-checkout-metadata.backend.utils.d.ts.map +1 -1
  129. package/dist/esm/billing/services/billing-checkout-metadata.backend.utils.js +11 -1
  130. package/dist/esm/billing/services/billing-checkout-metadata.backend.utils.js.map +1 -1
  131. package/dist/esm/billing/services/custom-impl/billing-account.mutations.custom-impl.backend.service.d.ts.map +1 -1
  132. package/dist/esm/billing/services/custom-impl/billing-account.mutations.custom-impl.backend.service.js +54 -13
  133. package/dist/esm/billing/services/custom-impl/billing-account.mutations.custom-impl.backend.service.js.map +1 -1
  134. package/dist/esm/billing/services/custom-impl/billing-custom-impl-utils.backend.d.ts +38 -1
  135. package/dist/esm/billing/services/custom-impl/billing-custom-impl-utils.backend.d.ts.map +1 -1
  136. package/dist/esm/billing/services/custom-impl/billing-custom-impl-utils.backend.js +67 -2
  137. package/dist/esm/billing/services/custom-impl/billing-custom-impl-utils.backend.js.map +1 -1
  138. package/dist/esm/billing/services/custom-impl/billing-custom-implementations.backend.d.ts +30 -1
  139. package/dist/esm/billing/services/custom-impl/billing-custom-implementations.backend.d.ts.map +1 -1
  140. package/dist/esm/billing/services/custom-impl/billing-custom-implementations.backend.js +43 -1
  141. package/dist/esm/billing/services/custom-impl/billing-custom-implementations.backend.js.map +1 -1
  142. package/dist/esm/billing/services/custom-impl/promotion.custom-ops.custom-impl.backend.service.d.ts +11 -3
  143. package/dist/esm/billing/services/custom-impl/promotion.custom-ops.custom-impl.backend.service.d.ts.map +1 -1
  144. package/dist/esm/billing/services/custom-impl/promotion.custom-ops.custom-impl.backend.service.js +30 -16
  145. package/dist/esm/billing/services/custom-impl/promotion.custom-ops.custom-impl.backend.service.js.map +1 -1
  146. package/dist/esm/billing/services/custom-impl/subscription.mutations.custom-impl.backend.service.d.ts.map +1 -1
  147. package/dist/esm/billing/services/custom-impl/subscription.mutations.custom-impl.backend.service.js +104 -25
  148. package/dist/esm/billing/services/custom-impl/subscription.mutations.custom-impl.backend.service.js.map +1 -1
  149. package/dist/esm/billing/services/stripe-standard-billing-provider.backend.service.d.ts +18 -1
  150. package/dist/esm/billing/services/stripe-standard-billing-provider.backend.service.d.ts.map +1 -1
  151. package/dist/esm/billing/services/stripe-standard-billing-provider.backend.service.js +106 -2
  152. package/dist/esm/billing/services/stripe-standard-billing-provider.backend.service.js.map +1 -1
  153. package/dist/esm/billing/services/webhooks/__tests__/settlement-ledger.test-double.d.ts +52 -0
  154. package/dist/esm/billing/services/webhooks/__tests__/settlement-ledger.test-double.d.ts.map +1 -0
  155. package/dist/esm/billing/services/webhooks/__tests__/settlement-ledger.test-double.js +74 -0
  156. package/dist/esm/billing/services/webhooks/__tests__/settlement-ledger.test-double.js.map +1 -0
  157. package/dist/esm/billing/services/webhooks/billing-webhook-event-router.backend.service.d.ts +104 -11
  158. package/dist/esm/billing/services/webhooks/billing-webhook-event-router.backend.service.d.ts.map +1 -1
  159. package/dist/esm/billing/services/webhooks/billing-webhook-event-router.backend.service.js +260 -26
  160. package/dist/esm/billing/services/webhooks/billing-webhook-event-router.backend.service.js.map +1 -1
  161. package/dist/esm/billing/testing/mock-billing-provider.d.ts +30 -1
  162. package/dist/esm/billing/testing/mock-billing-provider.d.ts.map +1 -1
  163. package/dist/esm/billing/testing/mock-billing-provider.js +25 -0
  164. package/dist/esm/billing/testing/mock-billing-provider.js.map +1 -1
  165. package/dist/esm/compliance/audit-trails/batches/audit-logs-archive.batch.backend.service.js +11 -4
  166. package/dist/esm/compliance/audit-trails/batches/audit-logs-archive.batch.backend.service.js.map +1 -1
  167. package/dist/esm/compliance/audit-trails/services/audit-event-dispatcher.backend.service.d.ts +263 -13
  168. package/dist/esm/compliance/audit-trails/services/audit-event-dispatcher.backend.service.d.ts.map +1 -1
  169. package/dist/esm/compliance/audit-trails/services/audit-event-dispatcher.backend.service.js +376 -58
  170. package/dist/esm/compliance/audit-trails/services/audit-event-dispatcher.backend.service.js.map +1 -1
  171. package/dist/esm/compliance/audit-trails/services/audit-logs.backend.service.d.ts +264 -7
  172. package/dist/esm/compliance/audit-trails/services/audit-logs.backend.service.d.ts.map +1 -1
  173. package/dist/esm/compliance/audit-trails/services/audit-logs.backend.service.js +414 -5
  174. package/dist/esm/compliance/audit-trails/services/audit-logs.backend.service.js.map +1 -1
  175. package/dist/esm/compliance/audit-trails/services/composite-audit-log-sink.backend.d.ts.map +1 -1
  176. package/dist/esm/compliance/audit-trails/services/composite-audit-log-sink.backend.js +7 -1
  177. package/dist/esm/compliance/audit-trails/services/composite-audit-log-sink.backend.js.map +1 -1
  178. package/dist/esm/compliance/audit-trails/services/siem-export-config-cache-invalidation.custom-impl.backend.service.d.ts +16 -0
  179. package/dist/esm/compliance/audit-trails/services/siem-export-config-cache-invalidation.custom-impl.backend.service.d.ts.map +1 -0
  180. package/dist/esm/compliance/audit-trails/services/siem-export-config-cache-invalidation.custom-impl.backend.service.js +140 -0
  181. package/dist/esm/compliance/audit-trails/services/siem-export-config-cache-invalidation.custom-impl.backend.service.js.map +1 -0
  182. package/dist/esm/compliance/audit-trails/services/siem-webhook-delivery.backend.service.d.ts +42 -0
  183. package/dist/esm/compliance/audit-trails/services/siem-webhook-delivery.backend.service.d.ts.map +1 -1
  184. package/dist/esm/compliance/audit-trails/services/siem-webhook-delivery.backend.service.js +65 -6
  185. package/dist/esm/compliance/audit-trails/services/siem-webhook-delivery.backend.service.js.map +1 -1
  186. package/dist/esm/compliance/audit-trails/services/utils/leased-value-cache.backend.utils.d.ts +110 -0
  187. package/dist/esm/compliance/audit-trails/services/utils/leased-value-cache.backend.utils.d.ts.map +1 -0
  188. package/dist/esm/compliance/audit-trails/services/utils/leased-value-cache.backend.utils.js +192 -0
  189. package/dist/esm/compliance/audit-trails/services/utils/leased-value-cache.backend.utils.js.map +1 -0
  190. package/dist/esm/compliance/audit-trails/services/utils/ocsf-activity-mapping.backend.utils.d.ts.map +1 -1
  191. package/dist/esm/compliance/audit-trails/services/utils/ocsf-activity-mapping.backend.utils.js +45 -0
  192. package/dist/esm/compliance/audit-trails/services/utils/ocsf-activity-mapping.backend.utils.js.map +1 -1
  193. package/dist/esm/config/bootstrap/application-runtime-profile.backend.d.ts +5 -0
  194. package/dist/esm/config/bootstrap/application-runtime-profile.backend.d.ts.map +1 -1
  195. package/dist/esm/config/bootstrap/application-runtime-profile.backend.js +6 -0
  196. package/dist/esm/config/bootstrap/application-runtime-profile.backend.js.map +1 -1
  197. package/dist/esm/config/custom/application-config-controller.backend.service.d.ts.map +1 -1
  198. package/dist/esm/config/custom/application-config-controller.backend.service.js +7 -1
  199. package/dist/esm/config/custom/application-config-controller.backend.service.js.map +1 -1
  200. package/dist/esm/config/models/app-config.backend.schemas.d.ts +146 -46
  201. package/dist/esm/config/models/app-config.backend.schemas.d.ts.map +1 -1
  202. package/dist/esm/config/models/app-config.backend.schemas.js +121 -12
  203. package/dist/esm/config/models/app-config.backend.schemas.js.map +1 -1
  204. package/dist/esm/config/models/provider-runtime-artifact.backend.schemas.d.ts +38 -15
  205. package/dist/esm/config/models/provider-runtime-artifact.backend.schemas.d.ts.map +1 -1
  206. package/dist/esm/config/models/provider-runtime-artifact.backend.schemas.js +17 -2
  207. package/dist/esm/config/models/provider-runtime-artifact.backend.schemas.js.map +1 -1
  208. package/dist/esm/config/services/app-configuration-loader.backend.service.d.ts +0 -1
  209. package/dist/esm/config/services/app-configuration-loader.backend.service.d.ts.map +1 -1
  210. package/dist/esm/config/services/app-configuration-loader.backend.service.js +68 -76
  211. package/dist/esm/config/services/app-configuration-loader.backend.service.js.map +1 -1
  212. package/dist/esm/config/services/app-configuration.backend.service.d.ts.map +1 -1
  213. package/dist/esm/config/services/app-configuration.backend.service.js +23 -1
  214. package/dist/esm/config/services/app-configuration.backend.service.js.map +1 -1
  215. package/dist/esm/config/services/app-configuration.backend.utils.d.ts +43 -1
  216. package/dist/esm/config/services/app-configuration.backend.utils.d.ts.map +1 -1
  217. package/dist/esm/config/services/app-configuration.backend.utils.js +52 -3
  218. package/dist/esm/config/services/app-configuration.backend.utils.js.map +1 -1
  219. package/dist/esm/config/services/application-startup-config-validator.backend.service.d.ts +25 -0
  220. package/dist/esm/config/services/application-startup-config-validator.backend.service.d.ts.map +1 -1
  221. package/dist/esm/config/services/application-startup-config-validator.backend.service.js +41 -1
  222. package/dist/esm/config/services/application-startup-config-validator.backend.service.js.map +1 -1
  223. package/dist/esm/data-seeding/services/shared/data-seed-scope-iteration.shared.utils.d.ts +2 -2
  224. package/dist/esm/data-seeding/services/shared/data-seed-scope-iteration.shared.utils.js +2 -2
  225. package/dist/esm/data-seeding/services/shared/data-seed-scope-iteration.shared.utils.js.map +1 -1
  226. package/dist/esm/databases/models/filter.backend.schemas.js +2 -2
  227. package/dist/esm/databases/models/filter.backend.schemas.js.map +1 -1
  228. package/dist/esm/databases/services/aggregation/aggregation-authorization.backend.service.d.ts.map +1 -1
  229. package/dist/esm/databases/services/aggregation/aggregation-authorization.backend.service.js +20 -1
  230. package/dist/esm/databases/services/aggregation/aggregation-authorization.backend.service.js.map +1 -1
  231. package/dist/esm/databases/services/postgresql-schema-plan-diff.backend.d.ts.map +1 -1
  232. package/dist/esm/databases/services/postgresql-schema-plan-diff.backend.js +48 -0
  233. package/dist/esm/databases/services/postgresql-schema-plan-diff.backend.js.map +1 -1
  234. package/dist/esm/databases/services/redis.service.d.ts +27 -0
  235. package/dist/esm/databases/services/redis.service.d.ts.map +1 -1
  236. package/dist/esm/databases/services/redis.service.js +29 -0
  237. package/dist/esm/databases/services/redis.service.js.map +1 -1
  238. package/dist/esm/errors/services/error-builder.backend.service.d.ts +13 -1
  239. package/dist/esm/errors/services/error-builder.backend.service.d.ts.map +1 -1
  240. package/dist/esm/errors/services/error-builder.backend.service.js +13 -1
  241. package/dist/esm/errors/services/error-builder.backend.service.js.map +1 -1
  242. package/dist/esm/errors/services/error-handler.backend.service.d.ts +70 -7
  243. package/dist/esm/errors/services/error-handler.backend.service.d.ts.map +1 -1
  244. package/dist/esm/errors/services/error-handler.backend.service.js +134 -8
  245. package/dist/esm/errors/services/error-handler.backend.service.js.map +1 -1
  246. package/dist/esm/errors/services/rate-limit.backend.service.d.ts +66 -0
  247. package/dist/esm/errors/services/rate-limit.backend.service.d.ts.map +1 -1
  248. package/dist/esm/errors/services/rate-limit.backend.service.js +102 -25
  249. package/dist/esm/errors/services/rate-limit.backend.service.js.map +1 -1
  250. package/dist/esm/errors/utils/error-log-level-classification.backend.utils.d.ts +5 -0
  251. package/dist/esm/errors/utils/error-log-level-classification.backend.utils.d.ts.map +1 -1
  252. package/dist/esm/errors/utils/error-log-level-classification.backend.utils.js +25 -0
  253. package/dist/esm/errors/utils/error-log-level-classification.backend.utils.js.map +1 -1
  254. package/dist/esm/errors/utils/rate-limit-environment-relaxation.backend.utils.d.ts +33 -0
  255. package/dist/esm/errors/utils/rate-limit-environment-relaxation.backend.utils.d.ts.map +1 -1
  256. package/dist/esm/errors/utils/rate-limit-environment-relaxation.backend.utils.js +40 -0
  257. package/dist/esm/errors/utils/rate-limit-environment-relaxation.backend.utils.js.map +1 -1
  258. package/dist/esm/external-data/controllers/external-data-admin.backend.contracts.d.ts +41 -0
  259. package/dist/esm/external-data/controllers/external-data-admin.backend.contracts.d.ts.map +1 -0
  260. package/dist/esm/external-data/controllers/external-data-admin.backend.contracts.js +40 -0
  261. package/dist/esm/external-data/controllers/external-data-admin.backend.contracts.js.map +1 -0
  262. package/dist/esm/external-data/controllers/external-data-admin.backend.controller.d.ts +64 -0
  263. package/dist/esm/external-data/controllers/external-data-admin.backend.controller.d.ts.map +1 -0
  264. package/dist/esm/external-data/controllers/external-data-admin.backend.controller.js +193 -0
  265. package/dist/esm/external-data/controllers/external-data-admin.backend.controller.js.map +1 -0
  266. package/dist/esm/external-data/external-data-pipeline-run.backend.service.d.ts +72 -4
  267. package/dist/esm/external-data/external-data-pipeline-run.backend.service.d.ts.map +1 -1
  268. package/dist/esm/external-data/external-data-pipeline-run.backend.service.js +60 -19
  269. package/dist/esm/external-data/external-data-pipeline-run.backend.service.js.map +1 -1
  270. package/dist/esm/external-data/external-data-transform.backend.d.ts.map +1 -1
  271. package/dist/esm/external-data/external-data-transform.backend.js +7 -1
  272. package/dist/esm/external-data/external-data-transform.backend.js.map +1 -1
  273. package/dist/esm/external-data/models/external-data-pipeline-state.backend.schemas.d.ts +2 -0
  274. package/dist/esm/external-data/models/external-data-pipeline-state.backend.schemas.d.ts.map +1 -1
  275. package/dist/esm/external-data/models/external-data-pipeline-state.backend.schemas.js +13 -0
  276. package/dist/esm/external-data/models/external-data-pipeline-state.backend.schemas.js.map +1 -1
  277. package/dist/esm/external-providers/models/provider-selection-resolution-evidence.backend.definitions.d.ts +4 -2
  278. package/dist/esm/external-providers/models/provider-selection-resolution-evidence.backend.definitions.d.ts.map +1 -1
  279. package/dist/esm/external-providers/models/provider-selection-resolution-evidence.backend.definitions.js.map +1 -1
  280. package/dist/esm/external-providers/operations/provider-operation-executor.backend.service.d.ts +256 -0
  281. package/dist/esm/external-providers/operations/provider-operation-executor.backend.service.d.ts.map +1 -0
  282. package/dist/esm/external-providers/operations/provider-operation-executor.backend.service.js +333 -0
  283. package/dist/esm/external-providers/operations/provider-operation-executor.backend.service.js.map +1 -0
  284. package/dist/esm/external-providers/operations/provider-operation-request.backend.d.ts +56 -0
  285. package/dist/esm/external-providers/operations/provider-operation-request.backend.d.ts.map +1 -0
  286. package/dist/esm/external-providers/operations/provider-operation-request.backend.js +211 -0
  287. package/dist/esm/external-providers/operations/provider-operation-request.backend.js.map +1 -0
  288. package/dist/esm/external-providers/operations/provider-request-signing.backend.d.ts +45 -0
  289. package/dist/esm/external-providers/operations/provider-request-signing.backend.d.ts.map +1 -0
  290. package/dist/esm/external-providers/operations/provider-request-signing.backend.js +216 -0
  291. package/dist/esm/external-providers/operations/provider-request-signing.backend.js.map +1 -0
  292. package/dist/esm/external-providers/operations/provider-rest-call-client.backend.d.ts +56 -0
  293. package/dist/esm/external-providers/operations/provider-rest-call-client.backend.d.ts.map +1 -0
  294. package/dist/esm/external-providers/operations/provider-rest-call-client.backend.js +78 -0
  295. package/dist/esm/external-providers/operations/provider-rest-call-client.backend.js.map +1 -0
  296. package/dist/esm/external-providers/services/__tests__/mock-external-providers-registry.service.d.ts +1 -1
  297. package/dist/esm/external-providers/services/__tests__/mock-external-providers-registry.service.d.ts.map +1 -1
  298. package/dist/esm/external-providers/services/__tests__/mock-external-providers-registry.service.js +2 -2
  299. package/dist/esm/external-providers/services/__tests__/mock-external-providers-registry.service.js.map +1 -1
  300. package/dist/esm/external-providers/services/backend-provider-loader.backend.service.d.ts +89 -0
  301. package/dist/esm/external-providers/services/backend-provider-loader.backend.service.d.ts.map +1 -0
  302. package/dist/esm/external-providers/services/backend-provider-loader.backend.service.js +164 -0
  303. package/dist/esm/external-providers/services/backend-provider-loader.backend.service.js.map +1 -0
  304. package/dist/esm/external-providers/services/backend-provider-registry.backend.service.d.ts +26 -27
  305. package/dist/esm/external-providers/services/backend-provider-registry.backend.service.d.ts.map +1 -1
  306. package/dist/esm/external-providers/services/backend-provider-registry.backend.service.js +50 -64
  307. package/dist/esm/external-providers/services/backend-provider-registry.backend.service.js.map +1 -1
  308. package/dist/esm/external-providers/services/document-extraction.backend.service.d.ts.map +1 -1
  309. package/dist/esm/external-providers/services/document-extraction.backend.service.js +3 -3
  310. package/dist/esm/external-providers/services/document-extraction.backend.service.js.map +1 -1
  311. package/dist/esm/external-providers/services/embeddings.backend.service.d.ts.map +1 -1
  312. package/dist/esm/external-providers/services/embeddings.backend.service.js +4 -4
  313. package/dist/esm/external-providers/services/embeddings.backend.service.js.map +1 -1
  314. package/dist/esm/external-providers/services/external-providers-registry.backend.service.d.ts +306 -7
  315. package/dist/esm/external-providers/services/external-providers-registry.backend.service.d.ts.map +1 -1
  316. package/dist/esm/external-providers/services/external-providers-registry.backend.service.js +539 -45
  317. package/dist/esm/external-providers/services/external-providers-registry.backend.service.js.map +1 -1
  318. package/dist/esm/external-providers/services/frontend-bootstrap.backend.service.d.ts.map +1 -1
  319. package/dist/esm/external-providers/services/frontend-bootstrap.backend.service.js +25 -2
  320. package/dist/esm/external-providers/services/frontend-bootstrap.backend.service.js.map +1 -1
  321. package/dist/esm/files/controllers/file.controller.d.ts +24 -1
  322. package/dist/esm/files/controllers/file.controller.d.ts.map +1 -1
  323. package/dist/esm/files/controllers/file.controller.js +83 -11
  324. package/dist/esm/files/controllers/file.controller.js.map +1 -1
  325. package/dist/esm/files/handlers/file-upload-route-locals.backend.types.d.ts +17 -0
  326. package/dist/esm/files/handlers/file-upload-route-locals.backend.types.d.ts.map +1 -0
  327. package/dist/esm/files/handlers/file-upload-route-locals.backend.types.js +1 -0
  328. package/dist/esm/files/handlers/file-upload-route-locals.backend.types.js.map +1 -0
  329. package/dist/esm/files/handlers/resource-file-upload-handler.backend.service.d.ts +5 -1
  330. package/dist/esm/files/handlers/resource-file-upload-handler.backend.service.d.ts.map +1 -1
  331. package/dist/esm/files/handlers/resource-file-upload-handler.backend.service.js +76 -13
  332. package/dist/esm/files/handlers/resource-file-upload-handler.backend.service.js.map +1 -1
  333. package/dist/esm/files/services/file-operation-handler.backend.service.d.ts +18 -0
  334. package/dist/esm/files/services/file-operation-handler.backend.service.d.ts.map +1 -1
  335. package/dist/esm/files/services/file-operation-handler.backend.service.js +36 -28
  336. package/dist/esm/files/services/file-operation-handler.backend.service.js.map +1 -1
  337. package/dist/esm/files/services/file-scanning.backend.service.d.ts +94 -9
  338. package/dist/esm/files/services/file-scanning.backend.service.d.ts.map +1 -1
  339. package/dist/esm/files/services/file-scanning.backend.service.js +197 -17
  340. package/dist/esm/files/services/file-scanning.backend.service.js.map +1 -1
  341. package/dist/esm/files/services/file-text-extraction.backend.service.d.ts +60 -1
  342. package/dist/esm/files/services/file-text-extraction.backend.service.d.ts.map +1 -1
  343. package/dist/esm/files/services/file-text-extraction.backend.service.js +167 -8
  344. package/dist/esm/files/services/file-text-extraction.backend.service.js.map +1 -1
  345. package/dist/esm/files/services/file-upload-grant.backend.service.d.ts +214 -0
  346. package/dist/esm/files/services/file-upload-grant.backend.service.d.ts.map +1 -0
  347. package/dist/esm/files/services/file-upload-grant.backend.service.js +566 -0
  348. package/dist/esm/files/services/file-upload-grant.backend.service.js.map +1 -0
  349. package/dist/esm/files/services/files.backend.service.d.ts +87 -0
  350. package/dist/esm/files/services/files.backend.service.d.ts.map +1 -1
  351. package/dist/esm/files/services/files.backend.service.js +252 -19
  352. package/dist/esm/files/services/files.backend.service.js.map +1 -1
  353. package/dist/esm/files/storage/application-storage-key.backend.utils.d.ts +109 -0
  354. package/dist/esm/files/storage/application-storage-key.backend.utils.d.ts.map +1 -0
  355. package/dist/esm/files/storage/application-storage-key.backend.utils.js +123 -0
  356. package/dist/esm/files/storage/application-storage-key.backend.utils.js.map +1 -0
  357. package/dist/esm/files/storage/file-storage-provider.types.d.ts +16 -10
  358. package/dist/esm/files/storage/file-storage-provider.types.d.ts.map +1 -1
  359. package/dist/esm/files/storage/file-storage-provider.types.js.map +1 -1
  360. package/dist/esm/files/storage/local-directory-storage-provider.backend.service.d.ts +67 -8
  361. package/dist/esm/files/storage/local-directory-storage-provider.backend.service.d.ts.map +1 -1
  362. package/dist/esm/files/storage/local-directory-storage-provider.backend.service.js +101 -28
  363. package/dist/esm/files/storage/local-directory-storage-provider.backend.service.js.map +1 -1
  364. package/dist/esm/files/storage/wildo-managed-storage-provider.backend.service.d.ts.map +1 -1
  365. package/dist/esm/files/storage/wildo-managed-storage-provider.backend.service.js +8 -55
  366. package/dist/esm/files/storage/wildo-managed-storage-provider.backend.service.js.map +1 -1
  367. package/dist/esm/files/utils/file-field-schema-path.backend.utils.d.ts.map +1 -1
  368. package/dist/esm/files/utils/file-field-schema-path.backend.utils.js +20 -0
  369. package/dist/esm/files/utils/file-field-schema-path.backend.utils.js.map +1 -1
  370. package/dist/esm/files/utils/file-uploader.utils.d.ts.map +1 -1
  371. package/dist/esm/files/utils/file-uploader.utils.js +12 -0
  372. package/dist/esm/files/utils/file-uploader.utils.js.map +1 -1
  373. package/dist/esm/files/utils/office-document-text-extraction.backend.utils.d.ts +86 -0
  374. package/dist/esm/files/utils/office-document-text-extraction.backend.utils.d.ts.map +1 -0
  375. package/dist/esm/files/utils/office-document-text-extraction.backend.utils.js +288 -0
  376. package/dist/esm/files/utils/office-document-text-extraction.backend.utils.js.map +1 -0
  377. package/dist/esm/flows-actors/a2a/batches/a2a-abandoned-task-sweep.batch.backend.service.d.ts +15 -0
  378. package/dist/esm/flows-actors/a2a/batches/a2a-abandoned-task-sweep.batch.backend.service.d.ts.map +1 -1
  379. package/dist/esm/flows-actors/a2a/batches/a2a-abandoned-task-sweep.batch.backend.service.js +76 -5
  380. package/dist/esm/flows-actors/a2a/batches/a2a-abandoned-task-sweep.batch.backend.service.js.map +1 -1
  381. package/dist/esm/flows-actors/a2a/controllers/a2a.controller.d.ts.map +1 -1
  382. package/dist/esm/flows-actors/a2a/controllers/a2a.controller.js +6 -1
  383. package/dist/esm/flows-actors/a2a/controllers/a2a.controller.js.map +1 -1
  384. package/dist/esm/flows-actors/a2a/models/a2a.backend.schemas.d.ts +60 -0
  385. package/dist/esm/flows-actors/a2a/models/a2a.backend.schemas.d.ts.map +1 -1
  386. package/dist/esm/flows-actors/a2a/models/a2a.backend.schemas.js +63 -0
  387. package/dist/esm/flows-actors/a2a/models/a2a.backend.schemas.js.map +1 -1
  388. package/dist/esm/flows-actors/a2a/services/a2a-task-cancellation.backend.service.d.ts +74 -0
  389. package/dist/esm/flows-actors/a2a/services/a2a-task-cancellation.backend.service.d.ts.map +1 -1
  390. package/dist/esm/flows-actors/a2a/services/a2a-task-cancellation.backend.service.js +200 -44
  391. package/dist/esm/flows-actors/a2a/services/a2a-task-cancellation.backend.service.js.map +1 -1
  392. package/dist/esm/flows-actors/a2a/services/a2a-task.backend.service.d.ts +7 -1
  393. package/dist/esm/flows-actors/a2a/services/a2a-task.backend.service.d.ts.map +1 -1
  394. package/dist/esm/flows-actors/a2a/services/a2a-task.backend.service.js +53 -1
  395. package/dist/esm/flows-actors/a2a/services/a2a-task.backend.service.js.map +1 -1
  396. package/dist/esm/flows-actors/a2a/services/a2a-token-budget.backend.service.d.ts +18 -0
  397. package/dist/esm/flows-actors/a2a/services/a2a-token-budget.backend.service.d.ts.map +1 -1
  398. package/dist/esm/flows-actors/a2a/services/a2a-token-budget.backend.service.js +18 -0
  399. package/dist/esm/flows-actors/a2a/services/a2a-token-budget.backend.service.js.map +1 -1
  400. package/dist/esm/flows-actors/a2a/services/a2a.backend.service.d.ts +12 -7
  401. package/dist/esm/flows-actors/a2a/services/a2a.backend.service.d.ts.map +1 -1
  402. package/dist/esm/flows-actors/a2a/services/a2a.backend.service.js.map +1 -1
  403. package/dist/esm/flows-actors/models/agent-catalogs.backend.definitions.d.ts +0 -13
  404. package/dist/esm/flows-actors/models/agent-catalogs.backend.definitions.d.ts.map +1 -1
  405. package/dist/esm/flows-actors/models/agent-catalogs.backend.definitions.js +14 -22
  406. package/dist/esm/flows-actors/models/agent-catalogs.backend.definitions.js.map +1 -1
  407. package/dist/esm/flows-actors/models/core-facets.backend.definitions.d.ts +8 -3
  408. package/dist/esm/flows-actors/models/core-facets.backend.definitions.d.ts.map +1 -1
  409. package/dist/esm/flows-actors/models/core-facets.backend.definitions.js +25 -15
  410. package/dist/esm/flows-actors/models/core-facets.backend.definitions.js.map +1 -1
  411. package/dist/esm/flows-actors/models/flows-actors.backend.schemas.d.ts +13 -1
  412. package/dist/esm/flows-actors/models/flows-actors.backend.schemas.d.ts.map +1 -1
  413. package/dist/esm/flows-actors/models/flows-actors.backend.schemas.js.map +1 -1
  414. package/dist/esm/flows-actors/models/function-tools.backend.definitions.d.ts +88 -8
  415. package/dist/esm/flows-actors/models/function-tools.backend.definitions.d.ts.map +1 -1
  416. package/dist/esm/flows-actors/models/function-tools.backend.definitions.js +333 -31
  417. package/dist/esm/flows-actors/models/function-tools.backend.definitions.js.map +1 -1
  418. package/dist/esm/flows-actors/models/market-generation.actors-system.backend.definitions.d.ts.map +1 -1
  419. package/dist/esm/flows-actors/models/market-generation.actors-system.backend.definitions.js +4 -2
  420. package/dist/esm/flows-actors/models/market-generation.actors-system.backend.definitions.js.map +1 -1
  421. package/dist/esm/flows-actors/models/mcp-client.backend.definitions.d.ts +113 -0
  422. package/dist/esm/flows-actors/models/mcp-client.backend.definitions.d.ts.map +1 -0
  423. package/dist/esm/flows-actors/models/mcp-client.backend.definitions.js +62 -0
  424. package/dist/esm/flows-actors/models/mcp-client.backend.definitions.js.map +1 -0
  425. package/dist/esm/flows-actors/services/actors-system.backend.service.d.ts.map +1 -1
  426. package/dist/esm/flows-actors/services/actors-system.backend.service.js +0 -2
  427. package/dist/esm/flows-actors/services/actors-system.backend.service.js.map +1 -1
  428. package/dist/esm/flows-actors/services/agents.backend.service.d.ts +107 -1
  429. package/dist/esm/flows-actors/services/agents.backend.service.d.ts.map +1 -1
  430. package/dist/esm/flows-actors/services/agents.backend.service.js +519 -56
  431. package/dist/esm/flows-actors/services/agents.backend.service.js.map +1 -1
  432. package/dist/esm/flows-actors/services/conversational-execution.backend.service.d.ts +5 -1
  433. package/dist/esm/flows-actors/services/conversational-execution.backend.service.d.ts.map +1 -1
  434. package/dist/esm/flows-actors/services/conversational-execution.backend.service.js +79 -16
  435. package/dist/esm/flows-actors/services/conversational-execution.backend.service.js.map +1 -1
  436. package/dist/esm/flows-actors/services/flows-actors-registry.service.d.ts +34 -5
  437. package/dist/esm/flows-actors/services/flows-actors-registry.service.d.ts.map +1 -1
  438. package/dist/esm/flows-actors/services/flows-actors-registry.service.js +154 -20
  439. package/dist/esm/flows-actors/services/flows-actors-registry.service.js.map +1 -1
  440. package/dist/esm/flows-actors/services/flows.backend.services.d.ts.map +1 -1
  441. package/dist/esm/flows-actors/services/flows.backend.services.js +27 -23
  442. package/dist/esm/flows-actors/services/flows.backend.services.js.map +1 -1
  443. package/dist/esm/flows-actors/services/llm-observability-agent-call-trace-sink.backend.d.ts.map +1 -1
  444. package/dist/esm/flows-actors/services/llm-observability-agent-call-trace-sink.backend.js +7 -1
  445. package/dist/esm/flows-actors/services/llm-observability-agent-call-trace-sink.backend.js.map +1 -1
  446. package/dist/esm/flows-actors/services/mcp-client.backend.service.d.ts +90 -0
  447. package/dist/esm/flows-actors/services/mcp-client.backend.service.d.ts.map +1 -0
  448. package/dist/esm/flows-actors/services/mcp-client.backend.service.js +368 -0
  449. package/dist/esm/flows-actors/services/mcp-client.backend.service.js.map +1 -0
  450. package/dist/esm/flows-actors/services/prompt-compiler.backend.service.d.ts +9 -5
  451. package/dist/esm/flows-actors/services/prompt-compiler.backend.service.d.ts.map +1 -1
  452. package/dist/esm/flows-actors/services/prompt-compiler.backend.service.js +12 -17
  453. package/dist/esm/flows-actors/services/prompt-compiler.backend.service.js.map +1 -1
  454. package/dist/esm/flows-actors/utils/acp-session-runner.backend.utils.d.ts +151 -41
  455. package/dist/esm/flows-actors/utils/acp-session-runner.backend.utils.d.ts.map +1 -1
  456. package/dist/esm/flows-actors/utils/acp-session-runner.backend.utils.js +308 -143
  457. package/dist/esm/flows-actors/utils/acp-session-runner.backend.utils.js.map +1 -1
  458. package/dist/esm/flows-actors/utils/meta-workflow-canonical-json.backend.utils.d.ts +0 -207
  459. package/dist/esm/flows-actors/utils/meta-workflow-canonical-json.backend.utils.d.ts.map +1 -1
  460. package/dist/esm/flows-actors/utils/meta-workflow-canonical-json.backend.utils.js +8 -243
  461. package/dist/esm/flows-actors/utils/meta-workflow-canonical-json.backend.utils.js.map +1 -1
  462. package/dist/esm/flows-actors/utils/meta-workflow-structured-generation-plan.backend.utils.d.ts.map +1 -1
  463. package/dist/esm/flows-actors/utils/meta-workflow-structured-generation-plan.backend.utils.js.map +1 -1
  464. package/dist/esm/guidance/services/milestone-evaluator.backend.service.d.ts +9 -14
  465. package/dist/esm/guidance/services/milestone-evaluator.backend.service.d.ts.map +1 -1
  466. package/dist/esm/guidance/services/milestone-evaluator.backend.service.js +18 -89
  467. package/dist/esm/guidance/services/milestone-evaluator.backend.service.js.map +1 -1
  468. package/dist/esm/guidance/services/progression-state-store.backend.service.d.ts +86 -0
  469. package/dist/esm/guidance/services/progression-state-store.backend.service.d.ts.map +1 -0
  470. package/dist/esm/guidance/services/progression-state-store.backend.service.js +155 -0
  471. package/dist/esm/guidance/services/progression-state-store.backend.service.js.map +1 -0
  472. package/dist/esm/i18n/controllers/i18n-controller.backend.service.d.ts +10 -0
  473. package/dist/esm/i18n/controllers/i18n-controller.backend.service.d.ts.map +1 -1
  474. package/dist/esm/i18n/controllers/i18n-controller.backend.service.js +55 -5
  475. package/dist/esm/i18n/controllers/i18n-controller.backend.service.js.map +1 -1
  476. package/dist/esm/index.d.ts +15 -5
  477. package/dist/esm/index.d.ts.map +1 -1
  478. package/dist/esm/index.js +45 -5
  479. package/dist/esm/index.js.map +1 -1
  480. package/dist/esm/inject/models/container.d.ts.map +1 -1
  481. package/dist/esm/inject/models/container.js +82 -10
  482. package/dist/esm/inject/models/container.js.map +1 -1
  483. package/dist/esm/inject/models/service-types.d.ts +20 -3
  484. package/dist/esm/inject/models/service-types.d.ts.map +1 -1
  485. package/dist/esm/inject/models/service-types.js +21 -3
  486. package/dist/esm/inject/models/service-types.js.map +1 -1
  487. package/dist/esm/mcp/controllers/mcp.controller.d.ts.map +1 -1
  488. package/dist/esm/mcp/controllers/mcp.controller.js +32 -4
  489. package/dist/esm/mcp/controllers/mcp.controller.js.map +1 -1
  490. package/dist/esm/mcp/models/mcp-tool.backend.schemas.d.ts +34 -0
  491. package/dist/esm/mcp/models/mcp-tool.backend.schemas.d.ts.map +1 -1
  492. package/dist/esm/mcp/models/mcp-tool.backend.schemas.js +42 -0
  493. package/dist/esm/mcp/models/mcp-tool.backend.schemas.js.map +1 -1
  494. package/dist/esm/mcp/services/mcp-server.backend.service.d.ts +84 -1
  495. package/dist/esm/mcp/services/mcp-server.backend.service.d.ts.map +1 -1
  496. package/dist/esm/mcp/services/mcp-server.backend.service.js +235 -11
  497. package/dist/esm/mcp/services/mcp-server.backend.service.js.map +1 -1
  498. package/dist/esm/mcp/services/mcp-tool-adapter.backend.service.d.ts +64 -2
  499. package/dist/esm/mcp/services/mcp-tool-adapter.backend.service.d.ts.map +1 -1
  500. package/dist/esm/mcp/services/mcp-tool-adapter.backend.service.js +152 -6
  501. package/dist/esm/mcp/services/mcp-tool-adapter.backend.service.js.map +1 -1
  502. package/dist/esm/monitoring/analytics/controllers/analytics.backend.controller.d.ts.map +1 -1
  503. package/dist/esm/monitoring/analytics/controllers/analytics.backend.controller.js +49 -4
  504. package/dist/esm/monitoring/analytics/controllers/analytics.backend.controller.js.map +1 -1
  505. package/dist/esm/monitoring/analytics/services/value-moment-definition-registry.backend.service.d.ts +66 -0
  506. package/dist/esm/monitoring/analytics/services/value-moment-definition-registry.backend.service.d.ts.map +1 -0
  507. package/dist/esm/monitoring/analytics/services/value-moment-definition-registry.backend.service.js +199 -0
  508. package/dist/esm/monitoring/analytics/services/value-moment-definition-registry.backend.service.js.map +1 -0
  509. package/dist/esm/monitoring/analytics/services/value-moment-engine.backend.service.d.ts +149 -13
  510. package/dist/esm/monitoring/analytics/services/value-moment-engine.backend.service.d.ts.map +1 -1
  511. package/dist/esm/monitoring/analytics/services/value-moment-engine.backend.service.js +411 -19
  512. package/dist/esm/monitoring/analytics/services/value-moment-engine.backend.service.js.map +1 -1
  513. package/dist/esm/monitoring/analytics/services/value-moment-handler-registry.backend.service.d.ts +11 -2
  514. package/dist/esm/monitoring/analytics/services/value-moment-handler-registry.backend.service.d.ts.map +1 -1
  515. package/dist/esm/monitoring/analytics/services/value-moment-handler-registry.backend.service.js.map +1 -1
  516. package/dist/esm/monitoring/logger/models/logger.backend.schemas.d.ts +28 -9
  517. package/dist/esm/monitoring/logger/models/logger.backend.schemas.d.ts.map +1 -1
  518. package/dist/esm/monitoring/logger/models/logger.backend.schemas.js +30 -10
  519. package/dist/esm/monitoring/logger/models/logger.backend.schemas.js.map +1 -1
  520. package/dist/esm/monitoring/logger/services/logger.service.d.ts +12 -0
  521. package/dist/esm/monitoring/logger/services/logger.service.d.ts.map +1 -1
  522. package/dist/esm/monitoring/logger/services/logger.service.js +52 -11
  523. package/dist/esm/monitoring/logger/services/logger.service.js.map +1 -1
  524. package/dist/esm/monitoring/logger/utils/log-severity-floor.backend.utils.d.ts +62 -0
  525. package/dist/esm/monitoring/logger/utils/log-severity-floor.backend.utils.d.ts.map +1 -0
  526. package/dist/esm/monitoring/logger/utils/log-severity-floor.backend.utils.js +78 -0
  527. package/dist/esm/monitoring/logger/utils/log-severity-floor.backend.utils.js.map +1 -0
  528. package/dist/esm/monitoring/observability/audit-observation-emission.backend.d.ts +309 -0
  529. package/dist/esm/monitoring/observability/audit-observation-emission.backend.d.ts.map +1 -0
  530. package/dist/esm/monitoring/observability/audit-observation-emission.backend.js +385 -0
  531. package/dist/esm/monitoring/observability/audit-observation-emission.backend.js.map +1 -0
  532. package/dist/esm/monitoring/observability/models/observability.backend.schemas.d.ts +1 -0
  533. package/dist/esm/monitoring/observability/models/observability.backend.schemas.d.ts.map +1 -1
  534. package/dist/esm/monitoring/observability/models/observability.backend.schemas.js.map +1 -1
  535. package/dist/esm/monitoring/observability/services/metrics.service.d.ts +21 -0
  536. package/dist/esm/monitoring/observability/services/metrics.service.d.ts.map +1 -1
  537. package/dist/esm/monitoring/observability/services/metrics.service.js +38 -0
  538. package/dist/esm/monitoring/observability/services/metrics.service.js.map +1 -1
  539. package/dist/esm/notifications/email/models/email-context-provider.interface.d.ts +0 -80
  540. package/dist/esm/notifications/email/models/email-context-provider.interface.d.ts.map +0 -1
  541. package/dist/esm/notifications/email/models/email-context-provider.interface.js +0 -25
  542. package/dist/esm/notifications/email/models/email-context-provider.interface.js.map +0 -1
  543. package/dist/esm/notifications/email/services/email-context-provider-registry.backend.service.d.ts +0 -49
  544. package/dist/esm/notifications/email/services/email-context-provider-registry.backend.service.d.ts.map +0 -1
  545. package/dist/esm/notifications/email/services/email-context-provider-registry.backend.service.js +0 -141
  546. package/dist/esm/notifications/email/services/email-context-provider-registry.backend.service.js.map +0 -1
  547. package/dist/esm/notifications/email/services/email-template-compiler.backend.service.d.ts +0 -37
  548. package/dist/esm/notifications/email/services/email-template-compiler.backend.service.d.ts.map +0 -1
  549. package/dist/esm/notifications/email/services/email-template-compiler.backend.service.js +0 -121
  550. package/dist/esm/notifications/email/services/email-template-compiler.backend.service.js.map +0 -1
  551. package/dist/esm/notifications/email/services/email-template-registry.backend.service.d.ts +66 -1
  552. package/dist/esm/notifications/email/services/email-template-registry.backend.service.d.ts.map +1 -1
  553. package/dist/esm/notifications/email/services/email-template-registry.backend.service.js +105 -10
  554. package/dist/esm/notifications/email/services/email-template-registry.backend.service.js.map +1 -1
  555. package/dist/esm/notifications/email/services/email-template-sandbox.backend.service.d.ts +0 -58
  556. package/dist/esm/notifications/email/services/email-template-sandbox.backend.service.d.ts.map +0 -1
  557. package/dist/esm/notifications/email/services/email-template-sandbox.backend.service.js +0 -223
  558. package/dist/esm/notifications/email/services/email-template-sandbox.backend.service.js.map +0 -1
  559. package/dist/esm/notifications/email/services/email-template-validator.backend.service.d.ts.map +1 -1
  560. package/dist/esm/notifications/email/services/email-template-validator.backend.service.js +10 -1
  561. package/dist/esm/notifications/email/services/email-template-validator.backend.service.js.map +1 -1
  562. package/dist/esm/notifications/email/services/email.backend.service.d.ts +60 -4
  563. package/dist/esm/notifications/email/services/email.backend.service.d.ts.map +1 -1
  564. package/dist/esm/notifications/email/services/email.backend.service.js +145 -43
  565. package/dist/esm/notifications/email/services/email.backend.service.js.map +1 -1
  566. package/dist/esm/notifications/email/utils/color-conversion.utils.d.ts +0 -1
  567. package/dist/esm/notifications/email/utils/color-conversion.utils.d.ts.map +1 -1
  568. package/dist/esm/notifications/email/utils/color-conversion.utils.js.map +1 -1
  569. package/dist/esm/notifications/services/notification-badge.backend.service.d.ts +142 -21
  570. package/dist/esm/notifications/services/notification-badge.backend.service.d.ts.map +1 -1
  571. package/dist/esm/notifications/services/notification-badge.backend.service.js +283 -58
  572. package/dist/esm/notifications/services/notification-badge.backend.service.js.map +1 -1
  573. package/dist/esm/notifications/services/notifications-dispatcher.backend.service.d.ts +108 -13
  574. package/dist/esm/notifications/services/notifications-dispatcher.backend.service.d.ts.map +1 -1
  575. package/dist/esm/notifications/services/notifications-dispatcher.backend.service.js +432 -101
  576. package/dist/esm/notifications/services/notifications-dispatcher.backend.service.js.map +1 -1
  577. package/dist/esm/notifications/sms/services/sms.backend.service.d.ts +2 -2
  578. package/dist/esm/notifications/sms/services/sms.backend.service.d.ts.map +1 -1
  579. package/dist/esm/notifications/sms/services/sms.backend.service.js +5 -5
  580. package/dist/esm/notifications/sms/services/sms.backend.service.js.map +1 -1
  581. package/dist/esm/notifications/webhooks/controllers/webhook-auto-controller.backend.service.d.ts +117 -5
  582. package/dist/esm/notifications/webhooks/controllers/webhook-auto-controller.backend.service.d.ts.map +1 -1
  583. package/dist/esm/notifications/webhooks/controllers/webhook-auto-controller.backend.service.js +164 -6
  584. package/dist/esm/notifications/webhooks/controllers/webhook-auto-controller.backend.service.js.map +1 -1
  585. package/dist/esm/notifications/webhooks/outbound/batches/m2m-webhook-delivery.batch.backend.service.d.ts +0 -6
  586. package/dist/esm/notifications/webhooks/outbound/batches/m2m-webhook-delivery.batch.backend.service.d.ts.map +1 -1
  587. package/dist/esm/notifications/webhooks/outbound/batches/m2m-webhook-delivery.batch.backend.service.js +54 -7
  588. package/dist/esm/notifications/webhooks/outbound/batches/m2m-webhook-delivery.batch.backend.service.js.map +1 -1
  589. package/dist/esm/notifications/webhooks/outbound/batches/m2m-webhook-delivery.batch.utils.d.ts +5 -5
  590. package/dist/esm/notifications/webhooks/outbound/batches/m2m-webhook-delivery.batch.utils.d.ts.map +1 -1
  591. package/dist/esm/notifications/webhooks/outbound/batches/m2m-webhook-delivery.batch.utils.js +14 -13
  592. package/dist/esm/notifications/webhooks/outbound/batches/m2m-webhook-delivery.batch.utils.js.map +1 -1
  593. package/dist/esm/notifications/webhooks/outbound/m2m-webhook-signed-request.backend.utils.d.ts +2 -1
  594. package/dist/esm/notifications/webhooks/outbound/m2m-webhook-signed-request.backend.utils.d.ts.map +1 -1
  595. package/dist/esm/notifications/webhooks/outbound/m2m-webhook-signed-request.backend.utils.js +18 -8
  596. package/dist/esm/notifications/webhooks/outbound/m2m-webhook-signed-request.backend.utils.js.map +1 -1
  597. package/dist/esm/notifications/webhooks/outbound/services/webhook-config-test-endpoint.custom-impl.backend.service.d.ts.map +1 -1
  598. package/dist/esm/notifications/webhooks/outbound/services/webhook-config-test-endpoint.custom-impl.backend.service.js +20 -18
  599. package/dist/esm/notifications/webhooks/outbound/services/webhook-config-test-endpoint.custom-impl.backend.service.js.map +1 -1
  600. package/dist/esm/notifications/webhooks/services/webhook-handler.backend.service.d.ts +16 -0
  601. package/dist/esm/notifications/webhooks/services/webhook-handler.backend.service.d.ts.map +1 -1
  602. package/dist/esm/notifications/webhooks/services/webhook-handler.backend.service.js +18 -0
  603. package/dist/esm/notifications/webhooks/services/webhook-handler.backend.service.js.map +1 -1
  604. package/dist/esm/organizations/batches/organization-purge.batch.backend.service.d.ts +2 -2
  605. package/dist/esm/organizations/batches/organization-purge.batch.backend.service.js +2 -2
  606. package/dist/esm/organizations/batches/organization-purge.batch.backend.service.js.map +1 -1
  607. package/dist/esm/organizations/services/organization-custom-implementation.backend.service.d.ts.map +1 -1
  608. package/dist/esm/organizations/services/organization-custom-implementation.backend.service.js +63 -2
  609. package/dist/esm/organizations/services/organization-custom-implementation.backend.service.js.map +1 -1
  610. package/dist/esm/organizations/services/organization-unit-custom-implementation.backend.service.d.ts.map +1 -1
  611. package/dist/esm/organizations/services/organization-unit-custom-implementation.backend.service.js +4 -1
  612. package/dist/esm/organizations/services/organization-unit-custom-implementation.backend.service.js.map +1 -1
  613. package/dist/esm/queue/adapters/in-memory-queue-adapter.backend.service.d.ts +66 -0
  614. package/dist/esm/queue/adapters/in-memory-queue-adapter.backend.service.d.ts.map +1 -0
  615. package/dist/esm/queue/adapters/in-memory-queue-adapter.backend.service.js +257 -0
  616. package/dist/esm/queue/adapters/in-memory-queue-adapter.backend.service.js.map +1 -0
  617. package/dist/esm/queue/adapters/queue-adapter.backend.binding.d.ts +12 -0
  618. package/dist/esm/queue/adapters/queue-adapter.backend.binding.d.ts.map +1 -0
  619. package/dist/esm/queue/adapters/queue-adapter.backend.binding.js +47 -0
  620. package/dist/esm/queue/adapters/queue-adapter.backend.binding.js.map +1 -0
  621. package/dist/esm/queue/adapters/queue-adapter.backend.interface.d.ts +87 -0
  622. package/dist/esm/queue/adapters/queue-adapter.backend.interface.d.ts.map +1 -0
  623. package/dist/esm/queue/adapters/queue-adapter.backend.interface.js +1 -0
  624. package/dist/esm/queue/adapters/queue-adapter.backend.interface.js.map +1 -0
  625. package/dist/esm/queue/adapters/queue-adapter.backend.options.d.ts +31 -0
  626. package/dist/esm/queue/adapters/queue-adapter.backend.options.d.ts.map +1 -0
  627. package/dist/esm/queue/adapters/queue-adapter.backend.options.js +13 -0
  628. package/dist/esm/queue/adapters/queue-adapter.backend.options.js.map +1 -0
  629. package/dist/esm/queue/adapters/rabbitmq-adapter.backend.service.d.ts +19 -25
  630. package/dist/esm/queue/adapters/rabbitmq-adapter.backend.service.d.ts.map +1 -1
  631. package/dist/esm/queue/adapters/rabbitmq-adapter.backend.service.js +33 -0
  632. package/dist/esm/queue/adapters/rabbitmq-adapter.backend.service.js.map +1 -1
  633. package/dist/esm/queue/domain-queue-consumer.backend.service.d.ts +2 -2
  634. package/dist/esm/queue/domain-queue-consumer.backend.service.d.ts.map +1 -1
  635. package/dist/esm/queue/domain-queue-consumer.backend.service.js +1 -4
  636. package/dist/esm/queue/domain-queue-consumer.backend.service.js.map +1 -1
  637. package/dist/esm/queue/job-consumer.backend.service.d.ts +2 -2
  638. package/dist/esm/queue/job-consumer.backend.service.d.ts.map +1 -1
  639. package/dist/esm/queue/job-consumer.backend.service.js +1 -4
  640. package/dist/esm/queue/job-consumer.backend.service.js.map +1 -1
  641. package/dist/esm/queue/job-executor.backend.service.d.ts +2 -2
  642. package/dist/esm/queue/job-executor.backend.service.d.ts.map +1 -1
  643. package/dist/esm/queue/job-executor.backend.service.js +1 -4
  644. package/dist/esm/queue/job-executor.backend.service.js.map +1 -1
  645. package/dist/esm/queue/queue-monitoring.backend.service.d.ts +8 -4
  646. package/dist/esm/queue/queue-monitoring.backend.service.d.ts.map +1 -1
  647. package/dist/esm/queue/queue-monitoring.backend.service.js +25 -17
  648. package/dist/esm/queue/queue-monitoring.backend.service.js.map +1 -1
  649. package/dist/esm/queue/queue-worker-initializer.backend.service.d.ts +16 -1
  650. package/dist/esm/queue/queue-worker-initializer.backend.service.d.ts.map +1 -1
  651. package/dist/esm/queue/queue-worker-initializer.backend.service.js +16 -1
  652. package/dist/esm/queue/queue-worker-initializer.backend.service.js.map +1 -1
  653. package/dist/esm/queue/queue.backend.service.d.ts +3 -3
  654. package/dist/esm/queue/queue.backend.service.d.ts.map +1 -1
  655. package/dist/esm/queue/queue.backend.service.js +26 -4
  656. package/dist/esm/queue/queue.backend.service.js.map +1 -1
  657. package/dist/esm/queue/worker-shutdown-manager.backend.service.d.ts +2 -2
  658. package/dist/esm/queue/worker-shutdown-manager.backend.service.d.ts.map +1 -1
  659. package/dist/esm/queue/worker-shutdown-manager.backend.service.js +18 -3
  660. package/dist/esm/queue/worker-shutdown-manager.backend.service.js.map +1 -1
  661. package/dist/esm/rag/utils/rag-chunking.backend.utils.d.ts +50 -25
  662. package/dist/esm/rag/utils/rag-chunking.backend.utils.d.ts.map +1 -1
  663. package/dist/esm/rag/utils/rag-chunking.backend.utils.js +147 -39
  664. package/dist/esm/rag/utils/rag-chunking.backend.utils.js.map +1 -1
  665. package/dist/esm/rag/utils/rag-context-assembly.backend.utils.d.ts +12 -3
  666. package/dist/esm/rag/utils/rag-context-assembly.backend.utils.d.ts.map +1 -1
  667. package/dist/esm/rag/utils/rag-context-assembly.backend.utils.js +12 -3
  668. package/dist/esm/rag/utils/rag-context-assembly.backend.utils.js.map +1 -1
  669. package/dist/esm/requests/service/websocket.service.d.ts +9 -0
  670. package/dist/esm/requests/service/websocket.service.d.ts.map +1 -1
  671. package/dist/esm/requests/service/websocket.service.js +88 -15
  672. package/dist/esm/requests/service/websocket.service.js.map +1 -1
  673. package/dist/esm/resources/models/custom-service-implementations.backend.definition.d.ts.map +1 -1
  674. package/dist/esm/resources/models/custom-service-implementations.backend.definition.js +16 -2
  675. package/dist/esm/resources/models/custom-service-implementations.backend.definition.js.map +1 -1
  676. package/dist/esm/resources/models/resources-operations.backend.definitions.d.ts.map +1 -1
  677. package/dist/esm/resources/models/resources-operations.backend.definitions.js +2 -0
  678. package/dist/esm/resources/models/resources-operations.backend.definitions.js.map +1 -1
  679. package/dist/esm/resources/models/resources-relationships.backend.definitions.d.ts.map +1 -1
  680. package/dist/esm/resources/models/resources-relationships.backend.definitions.js +14 -0
  681. package/dist/esm/resources/models/resources-relationships.backend.definitions.js.map +1 -1
  682. package/dist/esm/resources/models/resources-types.backend.schemas.d.ts +2 -1
  683. package/dist/esm/resources/models/resources-types.backend.schemas.d.ts.map +1 -1
  684. package/dist/esm/resources/models/resources-types.backend.schemas.js +8 -0
  685. package/dist/esm/resources/models/resources-types.backend.schemas.js.map +1 -1
  686. package/dist/esm/resources/services/resource-id.backend.service.js +3 -3
  687. package/dist/esm/resources/services/resource-id.backend.service.js.map +1 -1
  688. package/dist/esm/resources/services/resources-registry.backend.service.d.ts +60 -5
  689. package/dist/esm/resources/services/resources-registry.backend.service.d.ts.map +1 -1
  690. package/dist/esm/resources/services/resources-registry.backend.service.js +91 -7
  691. package/dist/esm/resources/services/resources-registry.backend.service.js.map +1 -1
  692. package/dist/esm/runtime/controllers/health-controller.backend.service.d.ts +36 -3
  693. package/dist/esm/runtime/controllers/health-controller.backend.service.d.ts.map +1 -1
  694. package/dist/esm/runtime/controllers/health-controller.backend.service.js +32 -10
  695. package/dist/esm/runtime/controllers/health-controller.backend.service.js.map +1 -1
  696. package/dist/esm/runtime/domain-module.backend.definitions.d.ts +24 -0
  697. package/dist/esm/runtime/domain-module.backend.definitions.d.ts.map +1 -1
  698. package/dist/esm/runtime/domain-module.backend.definitions.js +24 -0
  699. package/dist/esm/runtime/domain-module.backend.definitions.js.map +1 -1
  700. package/dist/esm/runtime/services/execution-context-creator.backend.service.d.ts.map +1 -1
  701. package/dist/esm/runtime/services/execution-context-creator.backend.service.js +13 -7
  702. package/dist/esm/runtime/services/execution-context-creator.backend.service.js.map +1 -1
  703. package/dist/esm/runtime/services/health-readiness-contributor.backend.interface.d.ts +51 -0
  704. package/dist/esm/runtime/services/health-readiness-contributor.backend.interface.d.ts.map +1 -1
  705. package/dist/esm/runtime/services/health-readiness-contributor.backend.interface.js.map +1 -1
  706. package/dist/esm/runtime/services/http-server.backend.service.d.ts +26 -0
  707. package/dist/esm/runtime/services/http-server.backend.service.d.ts.map +1 -1
  708. package/dist/esm/runtime/services/http-server.backend.service.js +181 -1
  709. package/dist/esm/runtime/services/http-server.backend.service.js.map +1 -1
  710. package/dist/esm/runtime/services/start-application.backend.service.d.ts +47 -1
  711. package/dist/esm/runtime/services/start-application.backend.service.d.ts.map +1 -1
  712. package/dist/esm/runtime/services/start-application.backend.service.js +343 -77
  713. package/dist/esm/runtime/services/start-application.backend.service.js.map +1 -1
  714. package/dist/esm/security/api-keys/api-keys.custom-impl.backend.service.d.ts +15 -0
  715. package/dist/esm/security/api-keys/api-keys.custom-impl.backend.service.d.ts.map +1 -1
  716. package/dist/esm/security/api-keys/api-keys.custom-impl.backend.service.js +28 -0
  717. package/dist/esm/security/api-keys/api-keys.custom-impl.backend.service.js.map +1 -1
  718. package/dist/esm/security/authentications/batches/anonymous-session-cleanup.batch.backend.service.d.ts +5 -1
  719. package/dist/esm/security/authentications/batches/anonymous-session-cleanup.batch.backend.service.d.ts.map +1 -1
  720. package/dist/esm/security/authentications/batches/anonymous-session-cleanup.batch.backend.service.js +24 -4
  721. package/dist/esm/security/authentications/batches/anonymous-session-cleanup.batch.backend.service.js.map +1 -1
  722. package/dist/esm/security/authentications/controllers/authentication-controller.backend.service.d.ts.map +1 -1
  723. package/dist/esm/security/authentications/controllers/authentication-controller.backend.service.js +29 -4
  724. package/dist/esm/security/authentications/controllers/authentication-controller.backend.service.js.map +1 -1
  725. package/dist/esm/security/authentications/controllers/oauth-provider-controller.backend.service.d.ts +114 -0
  726. package/dist/esm/security/authentications/controllers/oauth-provider-controller.backend.service.d.ts.map +1 -1
  727. package/dist/esm/security/authentications/controllers/oauth-provider-controller.backend.service.js +354 -3
  728. package/dist/esm/security/authentications/controllers/oauth-provider-controller.backend.service.js.map +1 -1
  729. package/dist/esm/security/authentications/models/cimd.backend.schemas.d.ts +1 -0
  730. package/dist/esm/security/authentications/models/cimd.backend.schemas.d.ts.map +1 -1
  731. package/dist/esm/security/authentications/models/cimd.backend.schemas.js +22 -0
  732. package/dist/esm/security/authentications/models/cimd.backend.schemas.js.map +1 -1
  733. package/dist/esm/security/authentications/models/jwt.backend.schemas.d.ts +3 -23
  734. package/dist/esm/security/authentications/models/jwt.backend.schemas.d.ts.map +1 -1
  735. package/dist/esm/security/authentications/models/jwt.backend.schemas.js +20 -45
  736. package/dist/esm/security/authentications/models/jwt.backend.schemas.js.map +1 -1
  737. package/dist/esm/security/authentications/models/oauth2-connection.backend.schemas.d.ts +15 -0
  738. package/dist/esm/security/authentications/models/oauth2-connection.backend.schemas.d.ts.map +1 -1
  739. package/dist/esm/security/authentications/models/oauth2-connection.backend.schemas.js.map +1 -1
  740. package/dist/esm/security/authentications/services/admin-config/auth-organization-configuration.service.d.ts +0 -2
  741. package/dist/esm/security/authentications/services/admin-config/auth-organization-configuration.service.d.ts.map +1 -1
  742. package/dist/esm/security/authentications/services/admin-config/auth-organization-configuration.service.js +23 -14
  743. package/dist/esm/security/authentications/services/admin-config/auth-organization-configuration.service.js.map +1 -1
  744. package/dist/esm/security/authentications/services/admin-config/domain-to-org-lookup.backend.service.d.ts +0 -1
  745. package/dist/esm/security/authentications/services/admin-config/domain-to-org-lookup.backend.service.d.ts.map +1 -1
  746. package/dist/esm/security/authentications/services/admin-config/domain-to-org-lookup.backend.service.js +15 -12
  747. package/dist/esm/security/authentications/services/admin-config/domain-to-org-lookup.backend.service.js.map +1 -1
  748. package/dist/esm/security/authentications/services/admin-config/domain-verification.backend.service.d.ts +113 -3
  749. package/dist/esm/security/authentications/services/admin-config/domain-verification.backend.service.d.ts.map +1 -1
  750. package/dist/esm/security/authentications/services/admin-config/domain-verification.backend.service.js +207 -30
  751. package/dist/esm/security/authentications/services/admin-config/domain-verification.backend.service.js.map +1 -1
  752. package/dist/esm/security/authentications/services/admin-config/enterprise-user-provisioning.backend.service.d.ts +95 -2
  753. package/dist/esm/security/authentications/services/admin-config/enterprise-user-provisioning.backend.service.d.ts.map +1 -1
  754. package/dist/esm/security/authentications/services/admin-config/enterprise-user-provisioning.backend.service.js +153 -9
  755. package/dist/esm/security/authentications/services/admin-config/enterprise-user-provisioning.backend.service.js.map +1 -1
  756. package/dist/esm/security/authentications/services/anonymous-session.backend.service.d.ts +190 -0
  757. package/dist/esm/security/authentications/services/anonymous-session.backend.service.d.ts.map +1 -1
  758. package/dist/esm/security/authentications/services/anonymous-session.backend.service.js +377 -53
  759. package/dist/esm/security/authentications/services/anonymous-session.backend.service.js.map +1 -1
  760. package/dist/esm/security/authentications/services/auth-methods/auth-method-management.backend.service.d.ts +9 -1
  761. package/dist/esm/security/authentications/services/auth-methods/auth-method-management.backend.service.d.ts.map +1 -1
  762. package/dist/esm/security/authentications/services/auth-methods/auth-method-management.backend.service.js +77 -2
  763. package/dist/esm/security/authentications/services/auth-methods/auth-method-management.backend.service.js.map +1 -1
  764. package/dist/esm/security/authentications/services/auth-methods/auth-mfa.backend.service.d.ts.map +1 -1
  765. package/dist/esm/security/authentications/services/auth-methods/auth-mfa.backend.service.js +5 -3
  766. package/dist/esm/security/authentications/services/auth-methods/auth-mfa.backend.service.js.map +1 -1
  767. package/dist/esm/security/authentications/services/auth-methods/auth-registration.backend.service.d.ts +41 -0
  768. package/dist/esm/security/authentications/services/auth-methods/auth-registration.backend.service.d.ts.map +1 -1
  769. package/dist/esm/security/authentications/services/auth-methods/auth-registration.backend.service.js +202 -23
  770. package/dist/esm/security/authentications/services/auth-methods/auth-registration.backend.service.js.map +1 -1
  771. package/dist/esm/security/authentications/services/auth-methods/oauth2-authentication.backend.service.d.ts.map +1 -1
  772. package/dist/esm/security/authentications/services/auth-methods/oauth2-authentication.backend.service.js +42 -1
  773. package/dist/esm/security/authentications/services/auth-methods/oauth2-authentication.backend.service.js.map +1 -1
  774. package/dist/esm/security/authentications/services/auth-methods/oauth2-connection-resolver.backend.service.d.ts.map +1 -1
  775. package/dist/esm/security/authentications/services/auth-methods/oauth2-connection-resolver.backend.service.js +34 -4
  776. package/dist/esm/security/authentications/services/auth-methods/oauth2-connection-resolver.backend.service.js.map +1 -1
  777. package/dist/esm/security/authentications/services/auth-methods/webauthn.backend.service.d.ts +29 -5
  778. package/dist/esm/security/authentications/services/auth-methods/webauthn.backend.service.d.ts.map +1 -1
  779. package/dist/esm/security/authentications/services/auth-methods/webauthn.backend.service.js +77 -5
  780. package/dist/esm/security/authentications/services/auth-methods/webauthn.backend.service.js.map +1 -1
  781. package/dist/esm/security/authentications/services/auth-token-issuer.backend.service.d.ts +41 -1
  782. package/dist/esm/security/authentications/services/auth-token-issuer.backend.service.d.ts.map +1 -1
  783. package/dist/esm/security/authentications/services/auth-token-issuer.backend.service.js +87 -4
  784. package/dist/esm/security/authentications/services/auth-token-issuer.backend.service.js.map +1 -1
  785. package/dist/esm/security/authentications/services/authentication-orchestrator.backend.service.d.ts +43 -1
  786. package/dist/esm/security/authentications/services/authentication-orchestrator.backend.service.d.ts.map +1 -1
  787. package/dist/esm/security/authentications/services/authentication-orchestrator.backend.service.js +277 -97
  788. package/dist/esm/security/authentications/services/authentication-orchestrator.backend.service.js.map +1 -1
  789. package/dist/esm/security/authentications/services/cimd-client-metadata.backend.service.d.ts +28 -5
  790. package/dist/esm/security/authentications/services/cimd-client-metadata.backend.service.d.ts.map +1 -1
  791. package/dist/esm/security/authentications/services/cimd-client-metadata.backend.service.js +72 -12
  792. package/dist/esm/security/authentications/services/cimd-client-metadata.backend.service.js.map +1 -1
  793. package/dist/esm/security/authentications/services/custom-impls/auth-custom-implementations.backend.d.ts.map +1 -1
  794. package/dist/esm/security/authentications/services/custom-impls/auth-custom-implementations.backend.js +3 -0
  795. package/dist/esm/security/authentications/services/custom-impls/auth-custom-implementations.backend.js.map +1 -1
  796. package/dist/esm/security/authentications/services/custom-impls/sso-config-domain-verification.custom-impl.backend.service.d.ts +28 -0
  797. package/dist/esm/security/authentications/services/custom-impls/sso-config-domain-verification.custom-impl.backend.service.d.ts.map +1 -0
  798. package/dist/esm/security/authentications/services/custom-impls/sso-config-domain-verification.custom-impl.backend.service.js +283 -0
  799. package/dist/esm/security/authentications/services/custom-impls/sso-config-domain-verification.custom-impl.backend.service.js.map +1 -0
  800. package/dist/esm/security/authentications/services/custom-impls/sso-config.custom-impl.backend.service.d.ts +4 -3
  801. package/dist/esm/security/authentications/services/custom-impls/sso-config.custom-impl.backend.service.d.ts.map +1 -1
  802. package/dist/esm/security/authentications/services/custom-impls/sso-config.custom-impl.backend.service.js +4 -3
  803. package/dist/esm/security/authentications/services/custom-impls/sso-config.custom-impl.backend.service.js.map +1 -1
  804. package/dist/esm/security/authentications/services/oauth-provider-token.backend.service.d.ts +35 -0
  805. package/dist/esm/security/authentications/services/oauth-provider-token.backend.service.d.ts.map +1 -1
  806. package/dist/esm/security/authentications/services/oauth-provider-token.backend.service.js +111 -21
  807. package/dist/esm/security/authentications/services/oauth-provider-token.backend.service.js.map +1 -1
  808. package/dist/esm/security/authentications/services/oidc-authorization-code.backend.service.d.ts +14 -1
  809. package/dist/esm/security/authentications/services/oidc-authorization-code.backend.service.d.ts.map +1 -1
  810. package/dist/esm/security/authentications/services/oidc-authorization-code.backend.service.js +49 -8
  811. package/dist/esm/security/authentications/services/oidc-authorization-code.backend.service.js.map +1 -1
  812. package/dist/esm/security/authentications/services/utils/auth-policy-resolution.backend.utils.d.ts.map +1 -1
  813. package/dist/esm/security/authentications/services/utils/auth-policy-resolution.backend.utils.js +4 -0
  814. package/dist/esm/security/authentications/services/utils/auth-policy-resolution.backend.utils.js.map +1 -1
  815. package/dist/esm/security/authentications/services/utils/auth-user-lookup.backend.service.d.ts.map +1 -1
  816. package/dist/esm/security/authentications/services/utils/auth-user-lookup.backend.service.js +6 -0
  817. package/dist/esm/security/authentications/services/utils/auth-user-lookup.backend.service.js.map +1 -1
  818. package/dist/esm/security/authentications/services/utils/external-turn-rate-limit.backend.utils.d.ts +37 -1
  819. package/dist/esm/security/authentications/services/utils/external-turn-rate-limit.backend.utils.d.ts.map +1 -1
  820. package/dist/esm/security/authentications/services/utils/external-turn-rate-limit.backend.utils.js +51 -0
  821. package/dist/esm/security/authentications/services/utils/external-turn-rate-limit.backend.utils.js.map +1 -1
  822. package/dist/esm/security/authentications/utils/enterprise-sso-enforcement.backend.utils.d.ts +41 -0
  823. package/dist/esm/security/authentications/utils/enterprise-sso-enforcement.backend.utils.d.ts.map +1 -1
  824. package/dist/esm/security/authentications/utils/enterprise-sso-enforcement.backend.utils.js +45 -0
  825. package/dist/esm/security/authentications/utils/enterprise-sso-enforcement.backend.utils.js.map +1 -1
  826. package/dist/esm/security/authorizations/cross-tenant-read-observation.backend.d.ts +116 -0
  827. package/dist/esm/security/authorizations/cross-tenant-read-observation.backend.d.ts.map +1 -0
  828. package/dist/esm/security/authorizations/cross-tenant-read-observation.backend.js +162 -0
  829. package/dist/esm/security/authorizations/cross-tenant-read-observation.backend.js.map +1 -0
  830. package/dist/esm/security/authorizations/initiator-organization-confinement.backend.d.ts.map +1 -1
  831. package/dist/esm/security/authorizations/initiator-organization-confinement.backend.js +24 -1
  832. package/dist/esm/security/authorizations/initiator-organization-confinement.backend.js.map +1 -1
  833. package/dist/esm/security/authorizations/organization-owner-floor.backend.utils.d.ts +20 -20
  834. package/dist/esm/security/authorizations/organization-owner-floor.backend.utils.d.ts.map +1 -1
  835. package/dist/esm/security/authorizations/organization-owner-floor.backend.utils.js +27 -28
  836. package/dist/esm/security/authorizations/organization-owner-floor.backend.utils.js.map +1 -1
  837. package/dist/esm/security/authorizations/platform-access-grant-custom-implementation.backend.service.d.ts.map +1 -1
  838. package/dist/esm/security/authorizations/platform-access-grant-custom-implementation.backend.service.js +77 -3
  839. package/dist/esm/security/authorizations/platform-access-grant-custom-implementation.backend.service.js.map +1 -1
  840. package/dist/esm/security/authorizations/privileged-access-review.backend.utils.d.ts +117 -0
  841. package/dist/esm/security/authorizations/privileged-access-review.backend.utils.d.ts.map +1 -0
  842. package/dist/esm/security/authorizations/privileged-access-review.backend.utils.js +104 -0
  843. package/dist/esm/security/authorizations/privileged-access-review.backend.utils.js.map +1 -0
  844. package/dist/esm/security/authorizations/role-ceiling.backend.utils.d.ts +4 -0
  845. package/dist/esm/security/authorizations/role-ceiling.backend.utils.d.ts.map +1 -1
  846. package/dist/esm/security/authorizations/role-ceiling.backend.utils.js +4 -0
  847. package/dist/esm/security/authorizations/role-ceiling.backend.utils.js.map +1 -1
  848. package/dist/esm/security/authorizations/role-conferral.backend.utils.d.ts +93 -0
  849. package/dist/esm/security/authorizations/role-conferral.backend.utils.d.ts.map +1 -0
  850. package/dist/esm/security/authorizations/role-conferral.backend.utils.js +95 -0
  851. package/dist/esm/security/authorizations/role-conferral.backend.utils.js.map +1 -0
  852. package/dist/esm/security/authorizations/scope-root-collection-confinement.backend.d.ts +124 -1
  853. package/dist/esm/security/authorizations/scope-root-collection-confinement.backend.d.ts.map +1 -1
  854. package/dist/esm/security/authorizations/scope-root-collection-confinement.backend.js +142 -5
  855. package/dist/esm/security/authorizations/scope-root-collection-confinement.backend.js.map +1 -1
  856. package/dist/esm/security/authorizations/services/authorizations.backend.service.d.ts +175 -14
  857. package/dist/esm/security/authorizations/services/authorizations.backend.service.d.ts.map +1 -1
  858. package/dist/esm/security/authorizations/services/authorizations.backend.service.js +385 -49
  859. package/dist/esm/security/authorizations/services/authorizations.backend.service.js.map +1 -1
  860. package/dist/esm/security/authorizations/super-admin-floor.backend.utils.d.ts +6 -14
  861. package/dist/esm/security/authorizations/super-admin-floor.backend.utils.d.ts.map +1 -1
  862. package/dist/esm/security/authorizations/super-admin-floor.backend.utils.js +13 -22
  863. package/dist/esm/security/authorizations/super-admin-floor.backend.utils.js.map +1 -1
  864. package/dist/esm/security/connected-accounts/connection-target-authorization.backend.d.ts +60 -0
  865. package/dist/esm/security/connected-accounts/connection-target-authorization.backend.d.ts.map +1 -0
  866. package/dist/esm/security/connected-accounts/connection-target-authorization.backend.js +79 -0
  867. package/dist/esm/security/connected-accounts/connection-target-authorization.backend.js.map +1 -0
  868. package/dist/esm/security/connected-accounts/controllers/provider-connection.controller.backend.service.d.ts +161 -0
  869. package/dist/esm/security/connected-accounts/controllers/provider-connection.controller.backend.service.d.ts.map +1 -0
  870. package/dist/esm/security/connected-accounts/controllers/provider-connection.controller.backend.service.js +512 -0
  871. package/dist/esm/security/connected-accounts/controllers/provider-connection.controller.backend.service.js.map +1 -0
  872. package/dist/esm/security/connected-accounts/organization-provider-credential-resolver.port.d.ts +59 -0
  873. package/dist/esm/security/connected-accounts/organization-provider-credential-resolver.port.d.ts.map +1 -0
  874. package/dist/esm/security/connected-accounts/organization-provider-credential-resolver.port.js +22 -0
  875. package/dist/esm/security/connected-accounts/organization-provider-credential-resolver.port.js.map +1 -0
  876. package/dist/esm/security/connected-accounts/provider-oauth2-refresher.port.d.ts +44 -0
  877. package/dist/esm/security/connected-accounts/provider-oauth2-refresher.port.d.ts.map +1 -0
  878. package/dist/esm/security/connected-accounts/provider-oauth2-refresher.port.js +20 -0
  879. package/dist/esm/security/connected-accounts/provider-oauth2-refresher.port.js.map +1 -0
  880. package/dist/esm/security/connected-accounts/services/organization-provider-credential-store.backend.service.d.ts +191 -0
  881. package/dist/esm/security/connected-accounts/services/organization-provider-credential-store.backend.service.d.ts.map +1 -0
  882. package/dist/esm/security/connected-accounts/services/organization-provider-credential-store.backend.service.js +385 -0
  883. package/dist/esm/security/connected-accounts/services/organization-provider-credential-store.backend.service.js.map +1 -0
  884. package/dist/esm/security/connected-accounts/services/organization-provider-credentials.custom-impl.backend.service.d.ts +41 -0
  885. package/dist/esm/security/connected-accounts/services/organization-provider-credentials.custom-impl.backend.service.d.ts.map +1 -0
  886. package/dist/esm/security/connected-accounts/services/organization-provider-credentials.custom-impl.backend.service.js +358 -0
  887. package/dist/esm/security/connected-accounts/services/organization-provider-credentials.custom-impl.backend.service.js.map +1 -0
  888. package/dist/esm/security/connected-accounts/services/provider-oauth2-exchange.backend.d.ts +160 -0
  889. package/dist/esm/security/connected-accounts/services/provider-oauth2-exchange.backend.d.ts.map +1 -0
  890. package/dist/esm/security/connected-accounts/services/provider-oauth2-exchange.backend.js +266 -0
  891. package/dist/esm/security/connected-accounts/services/provider-oauth2-exchange.backend.js.map +1 -0
  892. package/dist/esm/security/connected-accounts/services/provider-oauth2-pending-authorization.backend.service.d.ts +111 -0
  893. package/dist/esm/security/connected-accounts/services/provider-oauth2-pending-authorization.backend.service.d.ts.map +1 -0
  894. package/dist/esm/security/connected-accounts/services/provider-oauth2-pending-authorization.backend.service.js +107 -0
  895. package/dist/esm/security/connected-accounts/services/provider-oauth2-pending-authorization.backend.service.js.map +1 -0
  896. package/dist/esm/security/connected-accounts/services/provider-oauth2-refresher.backend.service.d.ts +54 -0
  897. package/dist/esm/security/connected-accounts/services/provider-oauth2-refresher.backend.service.d.ts.map +1 -0
  898. package/dist/esm/security/connected-accounts/services/provider-oauth2-refresher.backend.service.js +153 -0
  899. package/dist/esm/security/connected-accounts/services/provider-oauth2-refresher.backend.service.js.map +1 -0
  900. package/dist/esm/security/connected-accounts/services/user-provider-credential-store.backend.service.d.ts +195 -0
  901. package/dist/esm/security/connected-accounts/services/user-provider-credential-store.backend.service.d.ts.map +1 -0
  902. package/dist/esm/security/connected-accounts/services/user-provider-credential-store.backend.service.js +387 -0
  903. package/dist/esm/security/connected-accounts/services/user-provider-credential-store.backend.service.js.map +1 -0
  904. package/dist/esm/security/connected-accounts/services/user-provider-credentials.custom-impl.backend.service.d.ts +45 -0
  905. package/dist/esm/security/connected-accounts/services/user-provider-credentials.custom-impl.backend.service.d.ts.map +1 -0
  906. package/dist/esm/security/connected-accounts/services/user-provider-credentials.custom-impl.backend.service.js +291 -0
  907. package/dist/esm/security/connected-accounts/services/user-provider-credentials.custom-impl.backend.service.js.map +1 -0
  908. package/dist/esm/security/connected-accounts/user-provider-credential-resolver.port.d.ts +62 -0
  909. package/dist/esm/security/connected-accounts/user-provider-credential-resolver.port.d.ts.map +1 -0
  910. package/dist/esm/security/connected-accounts/user-provider-credential-resolver.port.js +29 -0
  911. package/dist/esm/security/connected-accounts/user-provider-credential-resolver.port.js.map +1 -0
  912. package/dist/esm/security/connected-accounts/utils/provider-credential-envelope.backend.utils.d.ts +127 -0
  913. package/dist/esm/security/connected-accounts/utils/provider-credential-envelope.backend.utils.d.ts.map +1 -0
  914. package/dist/esm/security/connected-accounts/utils/provider-credential-envelope.backend.utils.js +277 -0
  915. package/dist/esm/security/connected-accounts/utils/provider-credential-envelope.backend.utils.js.map +1 -0
  916. package/dist/esm/security/connected-accounts/utils/stored-credential-value.backend.utils.d.ts +66 -0
  917. package/dist/esm/security/connected-accounts/utils/stored-credential-value.backend.utils.d.ts.map +1 -0
  918. package/dist/esm/security/connected-accounts/utils/stored-credential-value.backend.utils.js +75 -0
  919. package/dist/esm/security/connected-accounts/utils/stored-credential-value.backend.utils.js.map +1 -0
  920. package/dist/esm/security/consumable-tokens/batches/consumable-tokens-cleanup.batch.backend.service.d.ts +18 -1
  921. package/dist/esm/security/consumable-tokens/batches/consumable-tokens-cleanup.batch.backend.service.d.ts.map +1 -1
  922. package/dist/esm/security/consumable-tokens/batches/consumable-tokens-cleanup.batch.backend.service.js +110 -74
  923. package/dist/esm/security/consumable-tokens/batches/consumable-tokens-cleanup.batch.backend.service.js.map +1 -1
  924. package/dist/esm/security/consumable-tokens/consumable-token-models.exports.d.ts +22 -0
  925. package/dist/esm/security/consumable-tokens/consumable-token-models.exports.d.ts.map +1 -0
  926. package/dist/esm/security/consumable-tokens/consumable-token-models.exports.js +22 -0
  927. package/dist/esm/security/consumable-tokens/consumable-token-models.exports.js.map +1 -0
  928. package/dist/esm/security/consumable-tokens/models/consumable-tokens.backend.resources-config.schemas.d.ts +17 -3
  929. package/dist/esm/security/consumable-tokens/models/consumable-tokens.backend.resources-config.schemas.d.ts.map +1 -1
  930. package/dist/esm/security/consumable-tokens/models/consumable-tokens.backend.resources-config.schemas.js +12 -0
  931. package/dist/esm/security/consumable-tokens/models/consumable-tokens.backend.resources-config.schemas.js.map +1 -1
  932. package/dist/esm/security/consumable-tokens/services/consumable-token.backend.service.d.ts +41 -3
  933. package/dist/esm/security/consumable-tokens/services/consumable-token.backend.service.d.ts.map +1 -1
  934. package/dist/esm/security/consumable-tokens/services/consumable-token.backend.service.js +83 -20
  935. package/dist/esm/security/consumable-tokens/services/consumable-token.backend.service.js.map +1 -1
  936. package/dist/esm/security/credential-rotation-grace.backend.utils.d.ts +9 -4
  937. package/dist/esm/security/credential-rotation-grace.backend.utils.d.ts.map +1 -1
  938. package/dist/esm/security/credential-rotation-grace.backend.utils.js +9 -4
  939. package/dist/esm/security/credential-rotation-grace.backend.utils.js.map +1 -1
  940. package/dist/esm/security/jwt/services/jwt.backend.service.d.ts.map +1 -1
  941. package/dist/esm/security/jwt/services/jwt.backend.service.js +1 -18
  942. package/dist/esm/security/jwt/services/jwt.backend.service.js.map +1 -1
  943. package/dist/esm/security/oauth-clients/oauth-client-generation.backend.utils.d.ts +26 -0
  944. package/dist/esm/security/oauth-clients/oauth-client-generation.backend.utils.d.ts.map +1 -1
  945. package/dist/esm/security/oauth-clients/oauth-client-generation.backend.utils.js +43 -0
  946. package/dist/esm/security/oauth-clients/oauth-client-generation.backend.utils.js.map +1 -1
  947. package/dist/esm/security/oauth-clients/oauth-clients.custom-impl.backend.service.d.ts +8 -1
  948. package/dist/esm/security/oauth-clients/oauth-clients.custom-impl.backend.service.d.ts.map +1 -1
  949. package/dist/esm/security/oauth-clients/oauth-clients.custom-impl.backend.service.js +49 -0
  950. package/dist/esm/security/oauth-clients/oauth-clients.custom-impl.backend.service.js.map +1 -1
  951. package/dist/esm/security/scim/controllers/scim.backend.controller.d.ts.map +1 -1
  952. package/dist/esm/security/scim/controllers/scim.backend.controller.js +17 -5
  953. package/dist/esm/security/scim/controllers/scim.backend.controller.js.map +1 -1
  954. package/dist/esm/security/scim/models/scim-protocol.backend.schemas.d.ts +67 -29
  955. package/dist/esm/security/scim/models/scim-protocol.backend.schemas.d.ts.map +1 -1
  956. package/dist/esm/security/scim/models/scim-protocol.backend.schemas.js +47 -25
  957. package/dist/esm/security/scim/models/scim-protocol.backend.schemas.js.map +1 -1
  958. package/dist/esm/security/ssrf/outbound-target-guard.backend.utils.d.ts +10 -2
  959. package/dist/esm/security/ssrf/outbound-target-guard.backend.utils.d.ts.map +1 -1
  960. package/dist/esm/security/ssrf/outbound-target-guard.backend.utils.js +10 -2
  961. package/dist/esm/security/ssrf/outbound-target-guard.backend.utils.js.map +1 -1
  962. package/dist/esm/security/ssrf/pinned-outbound-fetch.backend.utils.d.ts +143 -0
  963. package/dist/esm/security/ssrf/pinned-outbound-fetch.backend.utils.d.ts.map +1 -0
  964. package/dist/esm/security/ssrf/pinned-outbound-fetch.backend.utils.js +258 -0
  965. package/dist/esm/security/ssrf/pinned-outbound-fetch.backend.utils.js.map +1 -0
  966. package/dist/esm/users/services/user-read-retained.custom-impl.backend.service.d.ts +39 -0
  967. package/dist/esm/users/services/user-read-retained.custom-impl.backend.service.d.ts.map +1 -0
  968. package/dist/esm/users/services/user-read-retained.custom-impl.backend.service.js +159 -0
  969. package/dist/esm/users/services/user-read-retained.custom-impl.backend.service.js.map +1 -0
  970. package/dist/tsconfig.build.tsbuildinfo +1 -1
  971. package/package.json +17 -9
  972. package/dist/esm/.builder.pid +0 -9
@@ -1 +1 @@
1
- {"version":3,"file":"file-operation-handler.backend.service.js","sourceRoot":"","sources":["../../../../../src/files/services/file-operation-handler.backend.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;;;;;;;;;;;;;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAgB,SAAS,EAAE,2BAA2B,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACzG,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AAEpF,OAAO,EAAE,0BAA0B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C,YAAY,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC;YACvD,YAAY,CAAC,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC;YACvD,KAAK,CAAC,IAAI,CAAC,EAAE,aAAa,EAAE,QAAQ,EAAE,aAAa,EAAE,QAAQ,EAAE,CAAC,CAAC;QACnE,CAAC;QAED,MAAM,yBAAyB,GAC7B,YAAY,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,aAAa,CAAC;YAC7D,YAAY,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;QAEhE,OAAO,YAAY,CAAC,MAAM,GAAG,CAAC,IAAI,YAAY,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC1D,KAAK,CAAC,IAAI,CAAC;gBACT,aAAa,EAAE,YAAY,CAAC,KAAK,EAAE;gBACnC,aAAa,EAAE,YAAY,CAAC,KAAK,EAAE;aACpC,CAAC,CAAC;QACL,CAAC;QAED,OAAO;YACL,KAAK;YACL,yBAAyB;SAC1B,CAAC;IACJ,CAAC;CACF,CAAA;AAxmCY,kCAAkC;IAD9C,UAAU,EAAE;IAKR,WAAA,MAAM,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAA;IAEjC,WAAA,MAAM,CAAC,kBAAkB,CAAC,mBAAmB,CAAC,CAAA;IAE9C,WAAA,MAAM,CAAC,kBAAkB,CAAC,yBAAyB,CAAC,CAAA;IAEpD,WAAA,MAAM,CAAC,kBAAkB,CAAC,mBAAmB,CAAC,CAAA;+CAHhB,0BAA0B;QAEpB,gCAAgC;QAEtC,mBAAmB;GAXzC,kCAAkC,CAwmC9C","sourcesContent":["/**\n * File Operation Handler Backend Service\n *\n * Handles file field operations during resource CRUD operations.\n * Validates and processes file fields when resources are created, updated, or deleted.\n *\n * Features:\n * - File validation before resource creation/update\n * - File linking/unlinking during resource operations\n * - Cascade behavior on resource deletion\n * - Idempotent operations (safe to retry)\n */\n\nimport { injectable, inject } from 'inversify';\nimport { ResourceType, ErrorType, ErrorCustomMessageReference, FileStatus } from '@wildo-ai/saas-models';\nimport { FileGenerationSource } from '@wildo-ai/zod-decorators';\nimport { SAAS_SERVICE_TYPES } from '~wildo-backend-lib/inject/models/service-types';\nimport type { LoggerService } from '~wildo-backend-lib/monitoring/logger/services/logger.service';\nimport { ErrorBuilderBackendService } from '~wildo-backend-lib/errors/services/error-builder.backend.service';\nimport { projectCaughtErrorLogFields } from '~wildo-backend-lib/errors/utils/error-log-level-classification.backend.utils';\nimport { FileFieldDetectionBackendService, FileFieldMetadata } from './file-field-detection.backend.service';\nimport { FilesBackendService } from './files.backend.service';\nimport { ExecutionContext } from '~wildo-backend-lib/runtime/models/execution-context.backend.schemas';\nimport { RepositoryOptions } from '~wildo-backend-lib/base-classes/models/repositories.backend.schemas';\nimport { File } from '@wildo-ai/saas-models';\nimport { validateFileId, validateResourceType, validateResourceId, validateFieldName } from '~wildo-backend-lib/files/utils/file-validation.utils';\nimport {\n enumerateFileFieldValueOccurrences,\n hasExplicitCanonicalFieldMutation,\n mergeEffectiveResourceState,\n type FileFieldValueOccurrence,\n} from '~wildo-backend-lib/files/utils/file-field-schema-path.backend.utils';\n\ninterface FileFieldWriteProcessingOptions {\n /**\n * Internal-only escape hatch for framework materializers. Public write DTOs\n * still fail closed for generated PDF fields; only the exact generated\n * field/file-id pairs created by the service registry are accepted here.\n */\n frameworkGeneratedPdfFileIdsByField?: Record<string, readonly string[]>;\n}\n\n@injectable()\nexport class FileOperationHandlerBackendService {\n protected logDebug: (message: string, context?: Record<string, unknown>) => void;\n\n constructor(\n @inject(SAAS_SERVICE_TYPES.Logger)\n private readonly logger: LoggerService,\n @inject(SAAS_SERVICE_TYPES.ErrorBuilderService)\n private readonly errorBuilder: ErrorBuilderBackendService,\n @inject(SAAS_SERVICE_TYPES.FileFieldDetectionService)\n private readonly fileFieldDetection: FileFieldDetectionBackendService,\n @inject(SAAS_SERVICE_TYPES.FilesBackendService)\n private readonly filesService: FilesBackendService,\n ) {\n this.logDebug = this.logger.debugByType('FileOperationHandlerBackendService');\n this.logger.setDebugTypeLogging('FileOperationHandlerBackendService', false);\n }\n\n private isGeneratedPdfFileField(fileField: FileFieldMetadata): boolean {\n return fileField.fileMetadata.generation?.source === FileGenerationSource.PDF_TEMPLATE;\n }\n\n /**\n * Best-effort cleanup for the previous generated PDF after REGENERATE.\n *\n * The parent field already points at the newly rendered file when this runs.\n * A cleanup failure must not roll back a successful regeneration; the normal\n * file cleanup path can still pick up the stale generated file later.\n */\n async softDeleteGeneratedFileReplacement(params: {\n fileId: string | undefined;\n replacementFileId: string;\n fieldName: string;\n executionContext: ExecutionContext<any>;\n options?: RepositoryOptions;\n }): Promise<void> {\n if (!params.fileId || params.fileId === params.replacementFileId) {\n return;\n }\n\n try {\n await this.filesService.deleteFile(\n params.fileId,\n params.executionContext,\n params.options,\n );\n } catch (error) {\n this.logger.warn('Failed to soft-delete replaced generated PDF file', {\n fileId: params.fileId,\n replacementFileId: params.replacementFileId,\n fieldName: params.fieldName,\n ...projectCaughtErrorLogFields(error),\n });\n }\n }\n\n private assertGeneratedFileFieldNotUserSupplied(params: {\n data: Record<string, any>;\n fileField: FileFieldMetadata;\n occurrences: FileFieldValueOccurrence[];\n resourceType: ResourceType;\n executionContext: ExecutionContext<any>;\n processingOptions?: FileFieldWriteProcessingOptions;\n }): void {\n if (\n !this.isGeneratedPdfFileField(params.fileField)\n || (\n params.occurrences.length === 0\n && !hasExplicitCanonicalFieldMutation(params.data, params.fileField.fieldName)\n )\n ) {\n return;\n }\n\n const allowedFileIds = params.processingOptions?.frameworkGeneratedPdfFileIdsByField?.[params.fileField.fieldName];\n if (allowedFileIds && params.occurrences.length > 0) {\n const allowed = new Set(allowedFileIds);\n const submittedFileIds = params.occurrences.flatMap((occurrence) =>\n this.extractFileIds(occurrence.value, params.executionContext, true),\n );\n if (submittedFileIds.length > 0 && submittedFileIds.every((fileId) => allowed.has(fileId))) {\n return;\n }\n }\n\n throw this.errorBuilder.buildError(\n ErrorType.BUSINESS_RULE,\n params.executionContext,\n {\n customMessageReference: ErrorCustomMessageReference.FILE_GENERATED_FIELD_NOT_WRITABLE,\n context: {\n // diagnostic (log-only)\n fieldName: params.fileField.fieldName,\n resourceType: params.resourceType,\n },\n }\n );\n }\n\n /**\n * Validate file fields before resource creation.\n * Ensures files exist, are in UPLOADED status, and are ready to be linked.\n *\n * @param data - Resource data being created\n * @param resourceType - Resource type\n * @param executionContext - Execution context\n * @param options - Repository options (for transaction support)\n * @throws Error if validation fails (fail fast before resource creation)\n */\n async validateFileFieldsForCreate(\n data: Record<string, any>,\n resourceType: ResourceType,\n executionContext: ExecutionContext<any>,\n options?: RepositoryOptions,\n processingOptions?: FileFieldWriteProcessingOptions,\n ): Promise<void> {\n // Validate inputs (CRITICAL: Prevents invalid data propagation)\n validateResourceType(resourceType, this.errorBuilder, executionContext, 'resourceType');\n\n // Check if resource has file fields\n if (!this.fileFieldDetection.hasFileFields(resourceType)) {\n return;\n }\n\n const fileFields = this.fileFieldDetection.detectFileFields(resourceType);\n\n this.logDebug('Validating file fields for CREATE', {\n resourceType,\n fileFieldsCount: fileFields.length,\n });\n\n // Collect all fileIds to validate\n const fileIdsToValidate: string[] = [];\n\n for (const fileField of fileFields) {\n const occurrences = enumerateFileFieldValueOccurrences(data, fileField.fieldName);\n this.assertGeneratedFileFieldNotUserSupplied({\n data,\n fileField,\n occurrences,\n resourceType,\n executionContext,\n processingOptions,\n });\n\n for (const occurrence of occurrences) {\n const fieldFileIds = this.extractFileIds(occurrence.value, executionContext, true);\n\n // F4-01: Enforce maxFiles constraint per concrete occurrence\n const { maxFiles, multiple } = fileField.fileMetadata;\n if (multiple && maxFiles !== undefined && fieldFileIds.length > maxFiles) {\n throw this.errorBuilder.buildError(\n ErrorType.BUSINESS_RULE,\n executionContext,\n {\n customMessageReference: ErrorCustomMessageReference.FILE_TOO_MANY_FILES,\n context: {\n // diagnostic (log-only)\n fieldName: fileField.fieldName,\n runtimeFieldPath: occurrence.runtimeFieldPath,\n resourceType,\n maxFiles,\n receivedCount: fieldFileIds.length,\n },\n }\n );\n }\n\n fileIdsToValidate.push(...fieldFileIds);\n }\n }\n\n // Validate each file\n for (const fileId of fileIdsToValidate) {\n // Validate fileId format (CRITICAL: Prevents query injection and database errors)\n validateFileId(fileId, this.errorBuilder, executionContext, 'fileId');\n\n const file = await this.filesService.getFile(fileId, executionContext, options);\n\n if (!file) {\n throw this.errorBuilder.buildError(\n ErrorType.NOT_FOUND,\n executionContext,\n {\n customMessageReference: ErrorCustomMessageReference.FILE_NOT_FOUND,\n context: {\n // diagnostic (log-only)\n fileId,\n resourceType,\n },\n }\n );\n }\n\n // Verify file is in UPLOADED status (ready to be linked)\n if (file.status !== FileStatus.UPLOADED) {\n throw this.errorBuilder.buildError(\n ErrorType.BUSINESS_RULE,\n executionContext,\n {\n customMessageReference: ErrorCustomMessageReference.FILE_NOT_IN_UPLOADED_STATUS,\n context: {\n // diagnostic (log-only)\n fileId,\n fileStatus: file.status,\n resourceType,\n expectedStatus: FileStatus.UPLOADED,\n },\n }\n );\n }\n\n // Note: uploadContext validation can be added in Phase 2 if needed\n // For now, we only validate that file is UPLOADED\n }\n\n this.logDebug('File fields validation for CREATE completed', {\n resourceType,\n validatedFilesCount: fileIdsToValidate.length,\n });\n }\n\n /**\n * Process file fields after resource creation.\n * Links files to the newly created resource.\n *\n * @param data - Resource data that was created\n * @param resourceType - Resource type\n * @param resourceId - ID of the created resource\n * @param executionContext - Execution context\n */\n /**\n * Strip the PARENT resource's optimistic-lock version from options before any\n * child-file write.\n *\n * When a resource CREATE/UPDATE links/unlinks a `z_file()` field, the file is a\n * SEPARATE document with its own `_version_db_doc` lifecycle. If the parent request\n * carried an `If-Match` header, its `ifMatchVersion` must NOT fence the file update:\n * the repository would add a `{ _version_db_doc: <parentVersion> }` filter to the\n * FILE query, which (mis)matches the file by the PARENT's version and yields a\n * spurious `version_conflict` (the avatar-save 409: parent `If-Match: 0` leaking onto\n * the internal `files | update`). The transaction context is preserved so the file\n * write still participates in the parent's atomic boundary.\n */\n private stripParentVersionFence(options?: RepositoryOptions): RepositoryOptions | undefined {\n if (!options || options.ifMatchVersion === undefined) return options;\n const { ifMatchVersion: _parentVersionFence, ...fileWriteOptions } = options;\n return fileWriteOptions;\n }\n\n async processFileFieldsForCreate(\n data: Record<string, any>,\n resourceType: ResourceType,\n resourceId: string,\n executionContext: ExecutionContext<any>,\n options?: RepositoryOptions,\n processingOptions?: FileFieldWriteProcessingOptions,\n ): Promise<void> {\n // Validate inputs (CRITICAL: Prevents invalid data propagation)\n validateResourceType(resourceType, this.errorBuilder, executionContext, 'resourceType');\n validateResourceId(resourceId, this.errorBuilder, executionContext, 'resourceId');\n\n // A child-file link/unlink must not inherit the parent's optimistic-lock version.\n options = this.stripParentVersionFence(options);\n\n // Check if resource has file fields\n if (!this.fileFieldDetection.hasFileFields(resourceType)) {\n return;\n }\n\n const fileFields = this.fileFieldDetection.detectFileFields(resourceType);\n\n this.logDebug('Processing file fields for CREATE', {\n resourceType,\n resourceId,\n fileFieldsCount: fileFields.length,\n });\n\n // Process each file field\n for (const fileField of fileFields) {\n const submittedOccurrences = enumerateFileFieldValueOccurrences(data, fileField.fieldName);\n this.assertGeneratedFileFieldNotUserSupplied({\n data,\n fileField,\n occurrences: submittedOccurrences,\n resourceType,\n executionContext,\n processingOptions,\n });\n if (\n this.isGeneratedPdfFileField(fileField)\n && !processingOptions?.frameworkGeneratedPdfFileIdsByField?.[fileField.fieldName]\n ) {\n continue;\n }\n const occurrences = enumerateFileFieldValueOccurrences(data, fileField.fieldName);\n\n for (const occurrence of occurrences) {\n const fieldFileIds = this.extractFileIds(occurrence.value, executionContext, true);\n for (const fileId of fieldFileIds) {\n await this.linkFileToResource(\n fileId,\n resourceType,\n resourceId,\n fileField.fieldName,\n executionContext,\n options\n );\n }\n }\n }\n\n this.logDebug('File fields processing for CREATE completed', {\n resourceType,\n resourceId,\n });\n }\n\n /**\n * Process file fields after resource update.\n * Unlinks old files and links new files.\n * Validates new files BEFORE unlinking old ones (fail fast).\n *\n * Note: This method handles partial updates correctly. If a file field is not present\n * in `data`, it is treated as unchanged (not removed). Only explicit changes to file\n * field values trigger unlinking/linking operations.\n *\n * @param data - Updated resource data (may be partial update - only changed fields)\n * @param existingResource - Existing resource before update (complete state)\n * @param resourceType - Resource type\n * @param resourceId - Resource ID\n * @param executionContext - Execution context\n */\n async processFileFieldsForUpdate(\n data: Record<string, any>,\n existingResource: Record<string, any>,\n resourceType: ResourceType,\n resourceId: string,\n executionContext: ExecutionContext<any>,\n options?: RepositoryOptions,\n processingOptions?: FileFieldWriteProcessingOptions,\n ): Promise<void> {\n // Validate inputs (CRITICAL: Prevents invalid data propagation)\n validateResourceType(resourceType, this.errorBuilder, executionContext, 'resourceType');\n validateResourceId(resourceId, this.errorBuilder, executionContext, 'resourceId');\n\n // A child-file link/unlink must not inherit the parent's optimistic-lock version.\n options = this.stripParentVersionFence(options);\n\n // Check if resource has file fields\n if (!this.fileFieldDetection.hasFileFields(resourceType)) {\n return;\n }\n\n const fileFields = this.fileFieldDetection.detectFileFields(resourceType);\n const effectiveNewResource = mergeEffectiveResourceState(existingResource, data) as Record<string, any>;\n\n this.logDebug('Processing file fields for UPDATE', {\n resourceType,\n resourceId,\n fileFieldsCount: fileFields.length,\n });\n\n // Process each file field\n for (const fileField of fileFields) {\n const submittedOccurrences = enumerateFileFieldValueOccurrences(data, fileField.fieldName);\n this.assertGeneratedFileFieldNotUserSupplied({\n data,\n fileField,\n occurrences: submittedOccurrences,\n resourceType,\n executionContext,\n processingOptions,\n });\n if (\n this.isGeneratedPdfFileField(fileField)\n && !processingOptions?.frameworkGeneratedPdfFileIdsByField?.[fileField.fieldName]\n ) {\n continue;\n }\n const oldOccurrences = this.prepareOccurrences(\n enumerateFileFieldValueOccurrences(existingResource, fileField.fieldName),\n executionContext,\n false,\n );\n const newOccurrences = this.prepareOccurrences(\n enumerateFileFieldValueOccurrences(effectiveNewResource, fileField.fieldName),\n executionContext,\n true,\n );\n\n const occurrencePairs = this.matchOccurrences(oldOccurrences, newOccurrences);\n if (occurrencePairs.requiresAmbiguousFallback && fileField.fileMetadata.overridable === false) {\n throw this.errorBuilder.buildError(\n ErrorType.BUSINESS_RULE,\n executionContext,\n {\n customMessageReference: ErrorCustomMessageReference.FILE_NESTED_UPDATE_AMBIGUOUS,\n context: {\n // diagnostic (log-only)\n fieldName: fileField.fieldName,\n resourceType,\n resourceId,\n },\n }\n );\n }\n\n for (const pair of occurrencePairs.pairs) {\n const oldFileIds = pair.oldOccurrence?.fileIds ?? [];\n const newFileIds = pair.newOccurrence?.fileIds ?? [];\n const oldSet = new Set(oldFileIds);\n const newSet = new Set(newFileIds);\n const hasChanged =\n oldSet.size !== newSet.size ||\n !oldFileIds.every(id => newSet.has(id)) ||\n !newFileIds.every(id => oldSet.has(id));\n\n if (!hasChanged) {\n continue;\n }\n\n const runtimeFieldPath = pair.newOccurrence?.occurrence.runtimeFieldPath\n ?? pair.oldOccurrence?.occurrence.runtimeFieldPath;\n\n // F4-02: Enforce overridable constraint\n const { overridable, multiple, maxFiles } = fileField.fileMetadata;\n if (overridable === false) {\n const removedFileIds = oldFileIds.filter(id => !newSet.has(id));\n\n if (!multiple) {\n if (removedFileIds.length > 0) {\n throw this.errorBuilder.buildError(\n ErrorType.BUSINESS_RULE,\n executionContext,\n {\n customMessageReference: ErrorCustomMessageReference.FILE_FIELD_NOT_OVERRIDABLE,\n context: {\n // diagnostic (log-only)\n fieldName: fileField.fieldName,\n runtimeFieldPath,\n resourceType,\n resourceId,\n },\n }\n );\n }\n } else if (removedFileIds.length > 0) {\n throw this.errorBuilder.buildError(\n ErrorType.BUSINESS_RULE,\n executionContext,\n {\n customMessageReference: ErrorCustomMessageReference.FILE_FIELD_NOT_OVERRIDABLE,\n context: {\n // diagnostic (log-only)\n fieldName: fileField.fieldName,\n runtimeFieldPath,\n resourceType,\n resourceId,\n removedFileIds,\n },\n }\n );\n }\n }\n\n if (multiple && maxFiles !== undefined && newFileIds.length > maxFiles) {\n throw this.errorBuilder.buildError(\n ErrorType.BUSINESS_RULE,\n executionContext,\n {\n customMessageReference: ErrorCustomMessageReference.FILE_TOO_MANY_FILES,\n context: {\n // diagnostic (log-only)\n fieldName: fileField.fieldName,\n runtimeFieldPath,\n resourceType,\n resourceId,\n maxFiles,\n newTotal: newFileIds.length,\n },\n }\n );\n }\n\n for (const fileId of newFileIds) {\n if (!oldSet.has(fileId)) {\n // New file - validate fileId format (CRITICAL: Prevents query injection and database errors)\n validateFileId(fileId, this.errorBuilder, executionContext, 'fileId');\n\n const file = await this.filesService.getFile(fileId, executionContext, options);\n\n if (!file) {\n throw this.errorBuilder.buildError(\n ErrorType.NOT_FOUND,\n executionContext,\n {\n customMessageReference: ErrorCustomMessageReference.FILE_NOT_FOUND,\n context: {\n // diagnostic (log-only)\n fileId,\n resourceType,\n resourceId,\n runtimeFieldPath,\n },\n }\n );\n }\n\n if (file.status !== FileStatus.UPLOADED) {\n throw this.errorBuilder.buildError(\n ErrorType.BUSINESS_RULE,\n executionContext,\n {\n customMessageReference: ErrorCustomMessageReference.FILE_NOT_IN_UPLOADED_STATUS,\n context: {\n // diagnostic (log-only)\n fileId,\n fileStatus: file.status,\n runtimeFieldPath,\n resourceType,\n resourceId,\n expectedStatus: FileStatus.UPLOADED,\n },\n }\n );\n }\n }\n }\n\n for (const oldFileId of oldFileIds) {\n if (!newSet.has(oldFileId)) {\n // File removed - unlink it\n await this.unlinkFileFromResource(\n oldFileId,\n fileField.fieldName,\n executionContext,\n options\n );\n }\n }\n\n for (const newFileId of newFileIds) {\n if (!oldSet.has(newFileId)) {\n // New file - link it\n await this.linkFileToResource(\n newFileId,\n resourceType,\n resourceId,\n fileField.fieldName,\n executionContext,\n options\n );\n }\n }\n }\n }\n\n this.logDebug('File fields processing for UPDATE completed', {\n resourceType,\n resourceId,\n });\n }\n\n /**\n * Process file fields before resource deletion.\n * Applies onParentDelete behavior to all linked files.\n *\n * @param resourceType - Resource type being deleted\n * @param resourceId - Resource ID being deleted\n * @param executionContext - Execution context\n */\n /**\n * Carry the owner ALREADY VERIFIED by `listFilesForResource` (which authorized each returned file\n * against the parent resource's derived scope) onto the options used for the subsequent delete/erase,\n * so the deletion gate (`getFile`'s per-file authorize) checks against that owner rather than the\n * identity-less system-cascade EC — which would otherwise DENY the subject's own file and abort the\n * erasure. Never widens access: `authorizeFileAccess` still matches this against the file's own scope.\n */\n private withAuthoritativeFileScope(options: RepositoryOptions | undefined, file: File): RepositoryOptions {\n return {\n ...(options ?? {}),\n authoritativeFileScope: {\n applicationId: file.applicationId,\n organizationId: file.organizationId,\n userId: file.userId,\n },\n };\n }\n\n async processFileFieldsForDelete(\n resourceType: ResourceType,\n resourceId: string,\n executionContext: ExecutionContext<any>,\n options?: RepositoryOptions\n ): Promise<void> {\n // A child-file cleanup must not inherit the parent's optimistic-lock version.\n options = this.stripParentVersionFence(options);\n\n // Check if resource has file fields\n if (!this.fileFieldDetection.hasFileFields(resourceType)) {\n return;\n }\n\n const fileFields = this.fileFieldDetection.detectFileFields(resourceType);\n\n this.logDebug('Processing file fields for DELETE', {\n resourceType,\n resourceId,\n fileFieldsCount: fileFields.length,\n });\n\n // Get all files linked to this resource\n const linkedFiles = await this.filesService.listFilesForResource(\n resourceType,\n resourceId,\n undefined, // fieldName - undefined means all fields\n executionContext,\n options\n );\n\n // Process each file based on onParentDelete behavior from field metadata\n for (const file of linkedFiles) {\n // Forward the owner `listFilesForResource` already verified for THIS file to the deletion gate,\n // so a system-cascade teardown (identity-less EC) does not deny the subject's own file.\n const teardownOptions = this.withAuthoritativeFileScope(options, file);\n if (!file.linkedFieldName) {\n this.logger.warn('Linked file missing linkedFieldName during parent delete; defaulting to cascade cleanup', {\n fileId: file.fileId,\n resourceType,\n resourceId,\n });\n await this.applyOnParentDeleteBehavior(\n file.fileId,\n 'cascade',\n executionContext,\n teardownOptions\n );\n continue;\n }\n\n const fileField = this.fileFieldDetection.getFileFieldMetadata(\n resourceType,\n file.linkedFieldName\n );\n\n if (!fileField) {\n // Field not found - use default cascade behavior\n await this.applyOnParentDeleteBehavior(\n file.fileId,\n 'cascade',\n executionContext,\n teardownOptions\n );\n continue;\n }\n\n const onParentDelete = fileField.fileMetadata.onParentDelete || 'cascade';\n\n await this.applyOnParentDeleteBehavior(\n file.fileId,\n onParentDelete,\n executionContext,\n teardownOptions\n );\n }\n\n this.logDebug('File fields processing for DELETE completed', {\n resourceType,\n resourceId,\n processedFilesCount: linkedFiles.length,\n });\n }\n\n /**\n * Process file fields when a resource row is IMPERSONALIZED-AND-RETAINED (gate **G-FILE**).\n *\n * The row survives for a legal/audit obligation, so this is NOT the delete cascade — but \"keep the\n * record\" must not become \"keep the personal data\". A field-level scrub cannot reach inside a stored\n * blob (a passport scan stays a passport scan however the row is rewritten), so for a file field the\n * only real erasure is deleting the file.\n *\n * Which files? Exactly the ones whose field the author marked personal with `.impersonalizeWith()` —\n * the SAME author-responsibility contract as ordinary fields, reusing the same vocabulary rather\n * than inventing a second axis. The caller passes the scrub patch's field names:\n * - field IS scrubbed (REMOVE) ⇒ delete the file. The scrub patch nulls the pointer in the same\n * write, so the retained row keeps no dangling reference.\n * - field NOT scrubbed (KEEP / untreated) ⇒ leave the file. This is how a legally-required artifact\n * (an invoice PDF that IS the retained record) survives the erasure.\n *\n * Why deletion is required rather than relying on the row being hidden: the resource-scoped serve\n * route inherits the parent's READ authorization, so a hidden retained row already blocks it — but\n * the GLOBAL `/files/:fileId` route (direct / consumable-token / public-share) is explicitly NOT\n * resource-scoped and re-checks only the file's OWN scope. A file left ACTIVE therefore stays\n * reachable there even though its parent row is invisible.\n *\n * Erasure here goes through `FilesBackendService.eraseFile`, NOT `deleteFile`: besides marking the\n * file DELETED it scrubs the file row's OWN personal data (`originalFilename`, `uploadedBy`) in the\n * same write. Without that, the row's metadata stayed readable on the global metadata route for the\n * weeks until physical cleanup — an \"erasure\" that leaked `passport-jane-doe.pdf` the whole time. A\n * lifecycle delete deliberately keeps that provenance; a privacy erasure must not.\n *\n * Physical storage cleanup stays with the existing cleanup batch, so an erasure never mixes a DB\n * rollback with non-transactional storage side effects.\n *\n * ## The MIDDLE state — keep-but-hide — is deliberately NOT built (decided 2026-08-09)\n *\n * There are only two outcomes above, and the consequence of the second is worth stating plainly: a KEEP\n * file stays ORDINARILY READABLE to the file's own scope (its organization) through the global route,\n * indefinitely, even though its parent row is now invisible. A third state — retained but reachable only\n * through the audited see-through door, mirroring the parent row's posture — was considered and refused\n * for three reasons, in order of weight:\n *\n * 1. **It would contradict a decision already taken.** The concrete case that motivates it is the\n * invoice PDF, and the billing retention decision was explicitly \"retained as audit material, and\n * invoices stay VISIBLE\" for ordinary accounting. Hiding retained invoice documents would reverse\n * that, and the sibling ruling on invoice URLs went the same way: keep the document, close the\n * ordinary door only where the document is not itself the record.\n * 2. **A hiding door is worthless without its reading door, and shipping one alone is worse than\n * neither.** Withholding the file without also building an audited retrieval primitive would make\n * the legally-required artifact unreachable by ANYONE — destroying the very access the retention\n * obligation exists to preserve. (Same pairing rule as the cross-tenant repair doors: a marking\n * door without its release door is a one-way door calling itself a window.)\n * 3. **No shipped resource needs it.** The author already controls both ends per field: mark the field\n * and the file is erased, leave it and the file survives. The gap is only the middle, and nothing in\n * the tree declares a file field that is simultaneously personal, legally required, and must stop\n * being ordinarily visible.\n *\n * **What would trigger building it:** a resource declaring exactly that combination. The shape is then a\n * new `FileStatus` member excluded from `FILE_DOWNLOADABLE_STATUSES` and added to\n * `FILE_METADATA_WITHHELD_STATUSES`, a `FILE_STATUS_TRANSITIONS` entry, and — non-optional — an audited\n * see-through retrieval primitive alongside it. Do not add the status without the door.\n */\n async processFileFieldsForImpersonalize(\n resourceType: ResourceType,\n resourceId: string,\n scrubbedFieldNames: readonly string[],\n executionContext: ExecutionContext<any>,\n options?: RepositoryOptions\n ): Promise<void> {\n options = this.stripParentVersionFence(options);\n\n if (scrubbedFieldNames.length === 0 || !this.fileFieldDetection.hasFileFields(resourceType)) {\n return;\n }\n\n const scrubbedFields = new Set(scrubbedFieldNames);\n const linkedFiles = await this.filesService.listFilesForResource(\n resourceType,\n resourceId,\n undefined, // all fields — we filter by treatment below\n executionContext,\n options\n );\n\n let erasedCount = 0;\n let unattributableCount = 0;\n for (const file of linkedFiles) {\n // Fail-closed on an unattributable file: without `linkedFieldName` we cannot tell whether its\n // field was marked personal, and silently keeping it risks retaining an erased subject's\n // document. The delete cascade defaults such a file to cleanup for the same reason.\n const isUnattributable = !file.linkedFieldName;\n const isScrubbedField = isUnattributable || scrubbedFields.has(file.linkedFieldName!);\n if (!isScrubbedField) {\n continue;\n }\n if (isUnattributable) {\n /**\n * WARN, not debug: this is an irreversible deletion taken on a GUESS.\n *\n * The fail-closed default is right — a file we cannot attribute might be the erased subject's\n * passport scan — but it can equally destroy a file the retention obligation existed to KEEP\n * (an invoice PDF whose link lost its field name). Either way the cause is upstream metadata,\n * so it has to be visible: the sibling delete cascade has warned here since before this path\n * existed, and this one erased silently. Same decision, same audibility.\n */\n unattributableCount += 1;\n this.logger.warn(\n '[Retention] Erasing a linked file with no `linkedFieldName` during impersonalize — it cannot '\n + 'be attributed to a field, so the fail-closed default deletes it. If this file was meant to '\n + 'be RETAINED, its link metadata is the defect.',\n { resourceType, resourceId, fileId: file.fileId },\n );\n }\n // Forward the owner `listFilesForResource` already verified for THIS file to the deletion gate,\n // so a system-cascade (identity-less EC) impersonalize erase does not deny the subject's own file.\n await this.filesService.eraseFile(file.fileId, executionContext, this.withAuthoritativeFileScope(options, file));\n erasedCount++;\n }\n\n this.logDebug('File fields processing for IMPERSONALIZE completed', {\n resourceType,\n resourceId,\n linkedFilesCount: linkedFiles.length,\n erasedCount,\n retainedCount: linkedFiles.length - erasedCount,\n unattributableCount,\n });\n }\n\n /**\n * Extract file IDs from field value (handles single file or array).\n *\n * @param fieldValue - The raw field value from the resource object\n * @param executionContext - Current execution context\n * @param strict - When true (user input / new values), throws on invalid fileIds.\n * When false (existing DB data), silently filters and logs warnings.\n */\n private extractFileIds(fieldValue: any, executionContext?: ExecutionContext<any>, strict: boolean = false): string[] {\n if (fieldValue === null || fieldValue === undefined) {\n return [];\n }\n\n if (typeof fieldValue === 'object' && !Array.isArray(fieldValue)) {\n if ('fileId' in fieldValue) {\n return this.extractFileIds((fieldValue as { fileId?: unknown }).fileId, executionContext, strict);\n }\n\n if ('fileIds' in fieldValue) {\n return this.extractFileIds((fieldValue as { fileIds?: unknown }).fileIds, executionContext, strict);\n }\n }\n\n if (Array.isArray(fieldValue)) {\n const validFileIds: string[] = [];\n for (const fileId of fieldValue) {\n if (typeof fileId !== 'string' || fileId.trim() === '') {\n if (strict) {\n throw this.errorBuilder.buildError(\n ErrorType.VALIDATION,\n executionContext,\n {\n customMessageReference: ErrorCustomMessageReference.FILE_ID_VALIDATION_FAILED,\n context: {\n // diagnostic (log-only)\n fileId,\n receivedType: typeof fileId,\n },\n }\n );\n }\n continue;\n }\n try {\n validateFileId(fileId, this.errorBuilder, executionContext, 'fileId');\n validFileIds.push(fileId);\n } catch (error) {\n if (strict) {\n throw error; // Re-throw in strict mode — user provided invalid input\n }\n // Tolerant mode: filter out and warn (handles corrupt DB data gracefully)\n this.logger.warn('Invalid fileId filtered out during extraction', {\n fileId,\n ...projectCaughtErrorLogFields(error),\n });\n }\n }\n return validFileIds;\n }\n\n if (typeof fieldValue === 'string' && fieldValue.trim() !== '') {\n try {\n validateFileId(fieldValue, this.errorBuilder, executionContext, 'fileId');\n return [fieldValue];\n } catch (error) {\n if (strict) {\n throw error;\n }\n this.logger.warn('Invalid fileId filtered out during extraction', {\n fileId: fieldValue,\n ...projectCaughtErrorLogFields(error),\n });\n return [];\n }\n }\n\n if (strict && fieldValue !== null && fieldValue !== undefined) {\n throw this.errorBuilder.buildError(\n ErrorType.VALIDATION,\n executionContext,\n {\n customMessageReference: ErrorCustomMessageReference.FILE_FIELD_VALUE_INVALID,\n context: {\n // diagnostic (log-only)\n receivedType: typeof fieldValue,\n },\n }\n );\n }\n\n return [];\n }\n\n /**\n * Link a file to a resource.\n * Handles race conditions (idempotent - safe to call multiple times).\n */\n private async linkFileToResource(\n fileId: string,\n resourceType: ResourceType,\n resourceId: string,\n fieldName: string,\n executionContext: ExecutionContext<any>,\n options?: RepositoryOptions\n ): Promise<void> {\n // Validate inputs (CRITICAL: Prevents query injection and database errors)\n validateFileId(fileId, this.errorBuilder, executionContext, 'fileId');\n validateResourceType(resourceType, this.errorBuilder, executionContext, 'resourceType');\n validateResourceId(resourceId, this.errorBuilder, executionContext, 'resourceId');\n validateFieldName(fieldName, this.errorBuilder, executionContext, 'fieldName');\n\n // Check if file is already linked to the same resource (idempotent check - before calling service)\n // This prevents unnecessary service calls and handles idempotent cases early\n const file = await this.filesService.getFile(fileId, executionContext, options);\n if (file &&\n file.status === FileStatus.LINKED &&\n file.linkedResourceType === resourceType &&\n file.linkedResourceId === resourceId &&\n file.linkedFieldName === fieldName) {\n // Already linked to same resource - skip (idempotent)\n this.logDebug('File already linked to same resource, skipping', {\n fileId,\n resourceType,\n resourceId,\n fieldName,\n });\n return;\n }\n\n // Link file - errors propagate to fail the transaction (Decision 2.2: Option A)\n // FilesBackendService.linkFileToResource() handles idempotent cases internally (returns existing file)\n // All other errors (NOT_FOUND, BUSINESS_RULE, INTERNAL) should fail the operation\n await this.filesService.linkFileToResource(\n fileId,\n resourceType,\n resourceId,\n fieldName,\n executionContext,\n options\n );\n }\n\n /**\n * Unlink a file from a resource.\n * Applies onParentDelete behavior.\n */\n private async unlinkFileFromResource(\n fileId: string,\n fieldName: string,\n executionContext: ExecutionContext<any>,\n options?: RepositoryOptions\n ): Promise<void> {\n // Validate fileId format (CRITICAL: Prevents query injection and database errors)\n validateFileId(fileId, this.errorBuilder, executionContext, 'fileId');\n\n const file = await this.filesService.getFile(fileId, executionContext, options);\n if (!file || file.status !== FileStatus.LINKED) {\n // Already unlinked or doesn't exist - skip (idempotent)\n return;\n }\n\n // Unlink file (sets status to ORPHANED)\n await this.filesService.unlinkFileFromResource(fileId, executionContext, options);\n }\n\n /**\n * Apply onParentDelete behavior to a file.\n *\n * @param fileId - File ID\n * @param behavior - Behavior: 'cascade', 'soft-delete', or 'orphan'\n * @param executionContext - Execution context\n */\n private async applyOnParentDeleteBehavior(\n fileId: string,\n behavior: 'cascade' | 'soft-delete' | 'orphan',\n executionContext: ExecutionContext<any>,\n options?: RepositoryOptions\n ): Promise<void> {\n this.logDebug('Applying onParentDelete behavior', {\n fileId,\n behavior,\n });\n\n switch (behavior) {\n case 'cascade':\n // Cascade now marks the file as DELETED only. Physical storage cleanup is\n // intentionally deferred to the cleanup batch so resource deletes never\n // mix Mongo rollback with non-transactional storage side effects.\n await this.filesService.deleteFile(fileId, executionContext, options);\n break;\n\n case 'soft-delete':\n // Soft delete: update status to DELETED\n await this.filesService.deleteFile(fileId, executionContext, options);\n break;\n\n case 'orphan':\n // Unlink: clear parent fields, set status to ORPHANED\n await this.filesService.unlinkFileFromResource(fileId, executionContext, options);\n break;\n\n default:\n // Default to cascade\n await this.filesService.deleteFile(fileId, executionContext, options);\n }\n }\n\n private prepareOccurrences(\n occurrences: FileFieldValueOccurrence[],\n executionContext: ExecutionContext<any>,\n strict: boolean,\n ): Array<{\n occurrence: FileFieldValueOccurrence;\n fileIds: string[];\n signature: string;\n }> {\n return occurrences.map((occurrence) => {\n const fileIds = this.extractFileIds(occurrence.value, executionContext, strict);\n return {\n occurrence,\n fileIds,\n signature: JSON.stringify([...fileIds].sort()),\n };\n });\n }\n\n private matchOccurrences(\n oldOccurrences: Array<{\n occurrence: FileFieldValueOccurrence;\n fileIds: string[];\n signature: string;\n }>,\n newOccurrences: Array<{\n occurrence: FileFieldValueOccurrence;\n fileIds: string[];\n signature: string;\n }>,\n ): {\n pairs: Array<{\n oldOccurrence?: {\n occurrence: FileFieldValueOccurrence;\n fileIds: string[];\n signature: string;\n };\n newOccurrence?: {\n occurrence: FileFieldValueOccurrence;\n fileIds: string[];\n signature: string;\n };\n }>;\n requiresAmbiguousFallback: boolean;\n } {\n const pairs: Array<{\n oldOccurrence?: {\n occurrence: FileFieldValueOccurrence;\n fileIds: string[];\n signature: string;\n };\n newOccurrence?: {\n occurrence: FileFieldValueOccurrence;\n fileIds: string[];\n signature: string;\n };\n }> = [];\n\n const remainingOld = [...oldOccurrences];\n const remainingNew = [...newOccurrences];\n\n const stableIds = new Set(\n [...remainingOld, ...remainingNew]\n .map((entry) => entry.occurrence.ownerStableId)\n .filter((value): value is string => typeof value === 'string' && value.trim() !== ''),\n );\n\n for (const stableId of stableIds) {\n const oldMatches = remainingOld.filter((entry) => entry.occurrence.ownerStableId === stableId);\n const newMatches = remainingNew.filter((entry) => entry.occurrence.ownerStableId === stableId);\n\n while (oldMatches.length > 0 && newMatches.length > 0) {\n const oldEntry = oldMatches.shift()!;\n const newEntry = newMatches.shift()!;\n remainingOld.splice(remainingOld.indexOf(oldEntry), 1);\n remainingNew.splice(remainingNew.indexOf(newEntry), 1);\n pairs.push({ oldOccurrence: oldEntry, newOccurrence: newEntry });\n }\n }\n\n const oldSignatureBuckets = new Map<string, typeof remainingOld>();\n for (const entry of remainingOld) {\n if (entry.occurrence.ownerStableId) {\n continue;\n }\n const bucket = oldSignatureBuckets.get(entry.signature) ?? [];\n bucket.push(entry);\n oldSignatureBuckets.set(entry.signature, bucket);\n }\n\n for (const newEntry of [...remainingNew]) {\n if (newEntry.occurrence.ownerStableId) {\n continue;\n }\n\n const bucket = oldSignatureBuckets.get(newEntry.signature);\n const oldEntry = bucket?.shift();\n if (!oldEntry) {\n continue;\n }\n\n remainingOld.splice(remainingOld.indexOf(oldEntry), 1);\n remainingNew.splice(remainingNew.indexOf(newEntry), 1);\n pairs.push({ oldOccurrence: oldEntry, newOccurrence: newEntry });\n }\n\n const requiresAmbiguousFallback =\n remainingOld.some((entry) => !entry.occurrence.ownerStableId) &&\n remainingNew.some((entry) => !entry.occurrence.ownerStableId);\n\n while (remainingOld.length > 0 || remainingNew.length > 0) {\n pairs.push({\n oldOccurrence: remainingOld.shift(),\n newOccurrence: remainingNew.shift(),\n });\n }\n\n return {\n pairs,\n requiresAmbiguousFallback,\n };\n }\n}\n"]}
1
+ {"version":3,"file":"file-operation-handler.backend.service.js","sourceRoot":"","sources":["../../../../../src/files/services/file-operation-handler.backend.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;;;;;;;;;;;;;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAgB,SAAS,EAAE,2BAA2B,EAAE,UAAU,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AACjI,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AAEpF,OAAO,EAAE,0BAA0B,EAAE,MAAM,kEAAkE,CAAC;AAC9G,OAAO,EAAE,2BAA2B,EAAE,MAAM,8EAA8E,CAAC;AAC3H,OAAO,EAAE,gCAAgC,EAAqB,MAAM,wCAAwC,CAAC;AAC7G,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAI9D,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,sDAAsD,CAAC;AACnJ,OAAO,EACL,kCAAkC,EAClC,iCAAiC,EACjC,2BAA2B,GAE5B,MAAM,qEAAqE,CAAC;AAYtE,IAAM,kCAAkC,GAAxC,MAAM,kCAAkC;IAK1B;IAEA;IAEA;IAEA;IAVT,QAAQ,CAA+D;IAEjF,YAEmB,MAAqB,EAErB,YAAwC,EAExC,kBAAoD,EAEpD,YAAiC;QANjC,WAAM,GAAN,MAAM,CAAe;QAErB,iBAAY,GAAZ,YAAY,CAA4B;QAExC,uBAAkB,GAAl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AG,CAAC,EAAE,CAAC;YAC1D,KAAK,CAAC,IAAI,CAAC;gBACT,aAAa,EAAE,YAAY,CAAC,KAAK,EAAE;gBACnC,aAAa,EAAE,YAAY,CAAC,KAAK,EAAE;aACpC,CAAC,CAAC;QACL,CAAC;QAED,OAAO;YACL,KAAK;YACL,yBAAyB;SAC1B,CAAC;IACJ,CAAC;CACF,CAAA;AAjnCY,kCAAkC;IAD9C,UAAU,EAAE;IAKR,WAAA,MAAM,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAA;IAEjC,WAAA,MAAM,CAAC,kBAAkB,CAAC,mBAAmB,CAAC,CAAA;IAE9C,WAAA,MAAM,CAAC,kBAAkB,CAAC,yBAAyB,CAAC,CAAA;IAEpD,WAAA,MAAM,CAAC,kBAAkB,CAAC,mBAAmB,CAAC,CAAA;+CAHhB,0BAA0B;QAEpB,gCAAgC;QAEtC,mBAAmB;GAXzC,kCAAkC,CAinC9C","sourcesContent":["/**\n * File Operation Handler Backend Service\n *\n * Handles file field operations during resource CRUD operations.\n * Validates and processes file fields when resources are created, updated, or deleted.\n *\n * Features:\n * - File validation before resource creation/update\n * - File linking/unlinking during resource operations\n * - Cascade behavior on resource deletion\n * - Idempotent operations (safe to retry)\n */\n\nimport { injectable, inject } from 'inversify';\nimport { ResourceType, ErrorType, ErrorCustomMessageReference, FileStatus, FILE_LINKABLE_STATUSES } from '@wildo-ai/saas-models';\nimport { FileGenerationSource } from '@wildo-ai/zod-decorators';\nimport { SAAS_SERVICE_TYPES } from '~wildo-backend-lib/inject/models/service-types';\nimport type { LoggerService } from '~wildo-backend-lib/monitoring/logger/services/logger.service';\nimport { ErrorBuilderBackendService } from '~wildo-backend-lib/errors/services/error-builder.backend.service';\nimport { projectCaughtErrorLogFields } from '~wildo-backend-lib/errors/utils/error-log-level-classification.backend.utils';\nimport { FileFieldDetectionBackendService, FileFieldMetadata } from './file-field-detection.backend.service';\nimport { FilesBackendService } from './files.backend.service';\nimport { ExecutionContext } from '~wildo-backend-lib/runtime/models/execution-context.backend.schemas';\nimport { RepositoryOptions } from '~wildo-backend-lib/base-classes/models/repositories.backend.schemas';\nimport { File } from '@wildo-ai/saas-models';\nimport { validateFileId, validateResourceType, validateResourceId, validateFieldName } from '~wildo-backend-lib/files/utils/file-validation.utils';\nimport {\n enumerateFileFieldValueOccurrences,\n hasExplicitCanonicalFieldMutation,\n mergeEffectiveResourceState,\n type FileFieldValueOccurrence,\n} from '~wildo-backend-lib/files/utils/file-field-schema-path.backend.utils';\n\ninterface FileFieldWriteProcessingOptions {\n /**\n * Internal-only escape hatch for framework materializers. Public write DTOs\n * still fail closed for generated PDF fields; only the exact generated\n * field/file-id pairs created by the service registry are accepted here.\n */\n frameworkGeneratedPdfFileIdsByField?: Record<string, readonly string[]>;\n}\n\n@injectable()\nexport class FileOperationHandlerBackendService {\n protected logDebug: (message: string, context?: Record<string, unknown>) => void;\n\n constructor(\n @inject(SAAS_SERVICE_TYPES.Logger)\n private readonly logger: LoggerService,\n @inject(SAAS_SERVICE_TYPES.ErrorBuilderService)\n private readonly errorBuilder: ErrorBuilderBackendService,\n @inject(SAAS_SERVICE_TYPES.FileFieldDetectionService)\n private readonly fileFieldDetection: FileFieldDetectionBackendService,\n @inject(SAAS_SERVICE_TYPES.FilesBackendService)\n private readonly filesService: FilesBackendService,\n ) {\n this.logDebug = this.logger.debugByType('FileOperationHandlerBackendService');\n this.logger.setDebugTypeLogging('FileOperationHandlerBackendService', false);\n }\n\n private isGeneratedPdfFileField(fileField: FileFieldMetadata): boolean {\n return fileField.fileMetadata.generation?.source === FileGenerationSource.PDF_TEMPLATE;\n }\n\n /**\n * The ONE place that decides whether a file's status admits linking (issue #320).\n *\n * Both link-time validators (CREATE and UPDATE) used to compare against the literal\n * `FileStatus.UPLOADED`, so a file the scanner had certified `CLEAN` — a status\n * `FILE_STATUS_TRANSITIONS` explicitly allows to become `LINKED` — was refused with an error\n * naming `UPLOADED` as the expected state. Whether a scanned file could be attached depended on\n * beating the scanner. The admitted set now comes from `FILE_LINKABLE_STATUSES`, the single copy\n * shared with `FilesBackendService.linkFileToResource`.\n *\n * `SCANNING` is named separately: the file is not wrong, it is not yet KNOWN to be safe, so the\n * caller must learn to retry rather than re-upload. Every other non-linkable status (PENDING,\n * FAILED, DELETED, ORPHANED, INFECTED, QUARANTINED, and LINKED-to-something-else, which\n * `linkFileToResource` distinguishes further) is a terminal refusal for this write.\n *\n * @param diagnostics - log-only context; never rendered to the caller.\n */\n private assertFileLinkable(\n file: Pick<File, 'status'>,\n executionContext: ExecutionContext<any>,\n diagnostics: Record<string, unknown>,\n ): void {\n if (FILE_LINKABLE_STATUSES.has(file.status)) {\n return;\n }\n throw this.errorBuilder.buildError(\n ErrorType.BUSINESS_RULE,\n executionContext,\n {\n customMessageReference: file.status === FileStatus.SCANNING\n ? ErrorCustomMessageReference.FILE_SCAN_IN_PROGRESS\n : ErrorCustomMessageReference.FILE_NOT_LINKABLE,\n context: {\n // diagnostic (log-only)\n ...diagnostics,\n fileStatus: file.status,\n linkableStatuses: [...FILE_LINKABLE_STATUSES],\n },\n }\n );\n }\n\n /**\n * Best-effort cleanup for the previous generated PDF after REGENERATE.\n *\n * The parent field already points at the newly rendered file when this runs.\n * A cleanup failure must not roll back a successful regeneration; the normal\n * file cleanup path can still pick up the stale generated file later.\n */\n async softDeleteGeneratedFileReplacement(params: {\n fileId: string | undefined;\n replacementFileId: string;\n fieldName: string;\n executionContext: ExecutionContext<any>;\n options?: RepositoryOptions;\n }): Promise<void> {\n if (!params.fileId || params.fileId === params.replacementFileId) {\n return;\n }\n\n try {\n await this.filesService.deleteFile(\n params.fileId,\n params.executionContext,\n params.options,\n );\n } catch (error) {\n this.logger.warn('Failed to soft-delete replaced generated PDF file', {\n fileId: params.fileId,\n replacementFileId: params.replacementFileId,\n fieldName: params.fieldName,\n ...projectCaughtErrorLogFields(error),\n });\n }\n }\n\n private assertGeneratedFileFieldNotUserSupplied(params: {\n data: Record<string, any>;\n fileField: FileFieldMetadata;\n occurrences: FileFieldValueOccurrence[];\n resourceType: ResourceType;\n executionContext: ExecutionContext<any>;\n processingOptions?: FileFieldWriteProcessingOptions;\n }): void {\n if (\n !this.isGeneratedPdfFileField(params.fileField)\n || (\n params.occurrences.length === 0\n && !hasExplicitCanonicalFieldMutation(params.data, params.fileField.fieldName)\n )\n ) {\n return;\n }\n\n const allowedFileIds = params.processingOptions?.frameworkGeneratedPdfFileIdsByField?.[params.fileField.fieldName];\n if (allowedFileIds && params.occurrences.length > 0) {\n const allowed = new Set(allowedFileIds);\n const submittedFileIds = params.occurrences.flatMap((occurrence) =>\n this.extractFileIds(occurrence.value, params.executionContext, true),\n );\n if (submittedFileIds.length > 0 && submittedFileIds.every((fileId) => allowed.has(fileId))) {\n return;\n }\n }\n\n throw this.errorBuilder.buildError(\n ErrorType.BUSINESS_RULE,\n params.executionContext,\n {\n customMessageReference: ErrorCustomMessageReference.FILE_GENERATED_FIELD_NOT_WRITABLE,\n context: {\n // diagnostic (log-only)\n fieldName: params.fileField.fieldName,\n resourceType: params.resourceType,\n },\n }\n );\n }\n\n /**\n * Validate file fields before resource creation.\n * Ensures files exist, are in UPLOADED status, and are ready to be linked.\n *\n * @param data - Resource data being created\n * @param resourceType - Resource type\n * @param executionContext - Execution context\n * @param options - Repository options (for transaction support)\n * @throws Error if validation fails (fail fast before resource creation)\n */\n async validateFileFieldsForCreate(\n data: Record<string, any>,\n resourceType: ResourceType,\n executionContext: ExecutionContext<any>,\n options?: RepositoryOptions,\n processingOptions?: FileFieldWriteProcessingOptions,\n ): Promise<void> {\n // Validate inputs (CRITICAL: Prevents invalid data propagation)\n validateResourceType(resourceType, this.errorBuilder, executionContext, 'resourceType');\n\n // Check if resource has file fields\n if (!this.fileFieldDetection.hasFileFields(resourceType)) {\n return;\n }\n\n const fileFields = this.fileFieldDetection.detectFileFields(resourceType);\n\n this.logDebug('Validating file fields for CREATE', {\n resourceType,\n fileFieldsCount: fileFields.length,\n });\n\n // Collect all fileIds to validate\n const fileIdsToValidate: string[] = [];\n\n for (const fileField of fileFields) {\n const occurrences = enumerateFileFieldValueOccurrences(data, fileField.fieldName);\n this.assertGeneratedFileFieldNotUserSupplied({\n data,\n fileField,\n occurrences,\n resourceType,\n executionContext,\n processingOptions,\n });\n\n for (const occurrence of occurrences) {\n const fieldFileIds = this.extractFileIds(occurrence.value, executionContext, true);\n\n // F4-01: Enforce maxFiles constraint per concrete occurrence\n const { maxFiles, multiple } = fileField.fileMetadata;\n if (multiple && maxFiles !== undefined && fieldFileIds.length > maxFiles) {\n throw this.errorBuilder.buildError(\n ErrorType.BUSINESS_RULE,\n executionContext,\n {\n customMessageReference: ErrorCustomMessageReference.FILE_TOO_MANY_FILES,\n context: {\n // diagnostic (log-only)\n fieldName: fileField.fieldName,\n runtimeFieldPath: occurrence.runtimeFieldPath,\n resourceType,\n maxFiles,\n receivedCount: fieldFileIds.length,\n },\n }\n );\n }\n\n fileIdsToValidate.push(...fieldFileIds);\n }\n }\n\n // Validate each file\n for (const fileId of fileIdsToValidate) {\n // Validate fileId format (CRITICAL: Prevents query injection and database errors)\n validateFileId(fileId, this.errorBuilder, executionContext, 'fileId');\n\n const file = await this.filesService.getFile(fileId, executionContext, options);\n\n if (!file) {\n throw this.errorBuilder.buildError(\n ErrorType.NOT_FOUND,\n executionContext,\n {\n customMessageReference: ErrorCustomMessageReference.FILE_NOT_FOUND,\n context: {\n // diagnostic (log-only)\n fileId,\n resourceType,\n },\n }\n );\n }\n\n this.assertFileLinkable(file, executionContext, { fileId, resourceType });\n\n // Note: uploadContext validation can be added in Phase 2 if needed\n // For now, we only validate that file is UPLOADED\n }\n\n this.logDebug('File fields validation for CREATE completed', {\n resourceType,\n validatedFilesCount: fileIdsToValidate.length,\n });\n }\n\n /**\n * Process file fields after resource creation.\n * Links files to the newly created resource.\n *\n * @param data - Resource data that was created\n * @param resourceType - Resource type\n * @param resourceId - ID of the created resource\n * @param executionContext - Execution context\n */\n /**\n * Strip the PARENT resource's optimistic-lock version from options before any\n * child-file write.\n *\n * When a resource CREATE/UPDATE links/unlinks a `z_file()` field, the file is a\n * SEPARATE document with its own `_version_db_doc` lifecycle. If the parent request\n * carried an `If-Match` header, its `ifMatchVersion` must NOT fence the file update:\n * the repository would add a `{ _version_db_doc: <parentVersion> }` filter to the\n * FILE query, which (mis)matches the file by the PARENT's version and yields a\n * spurious `version_conflict` (the avatar-save 409: parent `If-Match: 0` leaking onto\n * the internal `files | update`). The transaction context is preserved so the file\n * write still participates in the parent's atomic boundary.\n */\n private stripParentVersionFence(options?: RepositoryOptions): RepositoryOptions | undefined {\n if (!options || options.ifMatchVersion === undefined) return options;\n const { ifMatchVersion: _parentVersionFence, ...fileWriteOptions } = options;\n return fileWriteOptions;\n }\n\n async processFileFieldsForCreate(\n data: Record<string, any>,\n resourceType: ResourceType,\n resourceId: string,\n executionContext: ExecutionContext<any>,\n options?: RepositoryOptions,\n processingOptions?: FileFieldWriteProcessingOptions,\n ): Promise<void> {\n // Validate inputs (CRITICAL: Prevents invalid data propagation)\n validateResourceType(resourceType, this.errorBuilder, executionContext, 'resourceType');\n validateResourceId(resourceId, this.errorBuilder, executionContext, 'resourceId');\n\n // A child-file link/unlink must not inherit the parent's optimistic-lock version.\n options = this.stripParentVersionFence(options);\n\n // Check if resource has file fields\n if (!this.fileFieldDetection.hasFileFields(resourceType)) {\n return;\n }\n\n const fileFields = this.fileFieldDetection.detectFileFields(resourceType);\n\n this.logDebug('Processing file fields for CREATE', {\n resourceType,\n resourceId,\n fileFieldsCount: fileFields.length,\n });\n\n // Process each file field\n for (const fileField of fileFields) {\n const submittedOccurrences = enumerateFileFieldValueOccurrences(data, fileField.fieldName);\n this.assertGeneratedFileFieldNotUserSupplied({\n data,\n fileField,\n occurrences: submittedOccurrences,\n resourceType,\n executionContext,\n processingOptions,\n });\n if (\n this.isGeneratedPdfFileField(fileField)\n && !processingOptions?.frameworkGeneratedPdfFileIdsByField?.[fileField.fieldName]\n ) {\n continue;\n }\n const occurrences = enumerateFileFieldValueOccurrences(data, fileField.fieldName);\n\n for (const occurrence of occurrences) {\n const fieldFileIds = this.extractFileIds(occurrence.value, executionContext, true);\n for (const fileId of fieldFileIds) {\n await this.linkFileToResource(\n fileId,\n resourceType,\n resourceId,\n fileField.fieldName,\n executionContext,\n options\n );\n }\n }\n }\n\n this.logDebug('File fields processing for CREATE completed', {\n resourceType,\n resourceId,\n });\n }\n\n /**\n * Process file fields after resource update.\n * Unlinks old files and links new files.\n * Validates new files BEFORE unlinking old ones (fail fast).\n *\n * Note: This method handles partial updates correctly. If a file field is not present\n * in `data`, it is treated as unchanged (not removed). Only explicit changes to file\n * field values trigger unlinking/linking operations.\n *\n * @param data - Updated resource data (may be partial update - only changed fields)\n * @param existingResource - Existing resource before update (complete state)\n * @param resourceType - Resource type\n * @param resourceId - Resource ID\n * @param executionContext - Execution context\n */\n async processFileFieldsForUpdate(\n data: Record<string, any>,\n existingResource: Record<string, any>,\n resourceType: ResourceType,\n resourceId: string,\n executionContext: ExecutionContext<any>,\n options?: RepositoryOptions,\n processingOptions?: FileFieldWriteProcessingOptions,\n ): Promise<void> {\n // Validate inputs (CRITICAL: Prevents invalid data propagation)\n validateResourceType(resourceType, this.errorBuilder, executionContext, 'resourceType');\n validateResourceId(resourceId, this.errorBuilder, executionContext, 'resourceId');\n\n // A child-file link/unlink must not inherit the parent's optimistic-lock version.\n options = this.stripParentVersionFence(options);\n\n // Check if resource has file fields\n if (!this.fileFieldDetection.hasFileFields(resourceType)) {\n return;\n }\n\n const fileFields = this.fileFieldDetection.detectFileFields(resourceType);\n const effectiveNewResource = mergeEffectiveResourceState(existingResource, data) as Record<string, any>;\n\n this.logDebug('Processing file fields for UPDATE', {\n resourceType,\n resourceId,\n fileFieldsCount: fileFields.length,\n });\n\n // Process each file field\n for (const fileField of fileFields) {\n const submittedOccurrences = enumerateFileFieldValueOccurrences(data, fileField.fieldName);\n this.assertGeneratedFileFieldNotUserSupplied({\n data,\n fileField,\n occurrences: submittedOccurrences,\n resourceType,\n executionContext,\n processingOptions,\n });\n if (\n this.isGeneratedPdfFileField(fileField)\n && !processingOptions?.frameworkGeneratedPdfFileIdsByField?.[fileField.fieldName]\n ) {\n continue;\n }\n const oldOccurrences = this.prepareOccurrences(\n enumerateFileFieldValueOccurrences(existingResource, fileField.fieldName),\n executionContext,\n false,\n );\n const newOccurrences = this.prepareOccurrences(\n enumerateFileFieldValueOccurrences(effectiveNewResource, fileField.fieldName),\n executionContext,\n true,\n );\n\n const occurrencePairs = this.matchOccurrences(oldOccurrences, newOccurrences);\n if (occurrencePairs.requiresAmbiguousFallback && fileField.fileMetadata.overridable === false) {\n throw this.errorBuilder.buildError(\n ErrorType.BUSINESS_RULE,\n executionContext,\n {\n customMessageReference: ErrorCustomMessageReference.FILE_NESTED_UPDATE_AMBIGUOUS,\n context: {\n // diagnostic (log-only)\n fieldName: fileField.fieldName,\n resourceType,\n resourceId,\n },\n }\n );\n }\n\n for (const pair of occurrencePairs.pairs) {\n const oldFileIds = pair.oldOccurrence?.fileIds ?? [];\n const newFileIds = pair.newOccurrence?.fileIds ?? [];\n const oldSet = new Set(oldFileIds);\n const newSet = new Set(newFileIds);\n const hasChanged =\n oldSet.size !== newSet.size ||\n !oldFileIds.every(id => newSet.has(id)) ||\n !newFileIds.every(id => oldSet.has(id));\n\n if (!hasChanged) {\n continue;\n }\n\n const runtimeFieldPath = pair.newOccurrence?.occurrence.runtimeFieldPath\n ?? pair.oldOccurrence?.occurrence.runtimeFieldPath;\n\n // F4-02: Enforce overridable constraint\n const { overridable, multiple, maxFiles } = fileField.fileMetadata;\n if (overridable === false) {\n const removedFileIds = oldFileIds.filter(id => !newSet.has(id));\n\n if (!multiple) {\n if (removedFileIds.length > 0) {\n throw this.errorBuilder.buildError(\n ErrorType.BUSINESS_RULE,\n executionContext,\n {\n customMessageReference: ErrorCustomMessageReference.FILE_FIELD_NOT_OVERRIDABLE,\n context: {\n // diagnostic (log-only)\n fieldName: fileField.fieldName,\n runtimeFieldPath,\n resourceType,\n resourceId,\n },\n }\n );\n }\n } else if (removedFileIds.length > 0) {\n throw this.errorBuilder.buildError(\n ErrorType.BUSINESS_RULE,\n executionContext,\n {\n customMessageReference: ErrorCustomMessageReference.FILE_FIELD_NOT_OVERRIDABLE,\n context: {\n // diagnostic (log-only)\n fieldName: fileField.fieldName,\n runtimeFieldPath,\n resourceType,\n resourceId,\n removedFileIds,\n },\n }\n );\n }\n }\n\n if (multiple && maxFiles !== undefined && newFileIds.length > maxFiles) {\n throw this.errorBuilder.buildError(\n ErrorType.BUSINESS_RULE,\n executionContext,\n {\n customMessageReference: ErrorCustomMessageReference.FILE_TOO_MANY_FILES,\n context: {\n // diagnostic (log-only)\n fieldName: fileField.fieldName,\n runtimeFieldPath,\n resourceType,\n resourceId,\n maxFiles,\n newTotal: newFileIds.length,\n },\n }\n );\n }\n\n for (const fileId of newFileIds) {\n if (!oldSet.has(fileId)) {\n // New file - validate fileId format (CRITICAL: Prevents query injection and database errors)\n validateFileId(fileId, this.errorBuilder, executionContext, 'fileId');\n\n const file = await this.filesService.getFile(fileId, executionContext, options);\n\n if (!file) {\n throw this.errorBuilder.buildError(\n ErrorType.NOT_FOUND,\n executionContext,\n {\n customMessageReference: ErrorCustomMessageReference.FILE_NOT_FOUND,\n context: {\n // diagnostic (log-only)\n fileId,\n resourceType,\n resourceId,\n runtimeFieldPath,\n },\n }\n );\n }\n\n this.assertFileLinkable(file, executionContext, { fileId, runtimeFieldPath, resourceType, resourceId });\n }\n }\n\n for (const oldFileId of oldFileIds) {\n if (!newSet.has(oldFileId)) {\n // File removed - unlink it\n await this.unlinkFileFromResource(\n oldFileId,\n fileField.fieldName,\n executionContext,\n options\n );\n }\n }\n\n for (const newFileId of newFileIds) {\n if (!oldSet.has(newFileId)) {\n // New file - link it\n await this.linkFileToResource(\n newFileId,\n resourceType,\n resourceId,\n fileField.fieldName,\n executionContext,\n options\n );\n }\n }\n }\n }\n\n this.logDebug('File fields processing for UPDATE completed', {\n resourceType,\n resourceId,\n });\n }\n\n /**\n * Process file fields before resource deletion.\n * Applies onParentDelete behavior to all linked files.\n *\n * @param resourceType - Resource type being deleted\n * @param resourceId - Resource ID being deleted\n * @param executionContext - Execution context\n */\n /**\n * Carry the owner ALREADY VERIFIED by `listFilesForResource` (which authorized each returned file\n * against the parent resource's derived scope) onto the options used for the subsequent delete/erase,\n * so the deletion gate (`getFile`'s per-file authorize) checks against that owner rather than the\n * identity-less system-cascade EC — which would otherwise DENY the subject's own file and abort the\n * erasure. Never widens access: `authorizeFileAccess` still matches this against the file's own scope.\n */\n private withAuthoritativeFileScope(options: RepositoryOptions | undefined, file: File): RepositoryOptions {\n return {\n ...(options ?? {}),\n authoritativeFileScope: {\n applicationId: file.applicationId,\n organizationId: file.organizationId,\n userId: file.userId,\n },\n };\n }\n\n async processFileFieldsForDelete(\n resourceType: ResourceType,\n resourceId: string,\n executionContext: ExecutionContext<any>,\n options?: RepositoryOptions\n ): Promise<void> {\n // A child-file cleanup must not inherit the parent's optimistic-lock version.\n options = this.stripParentVersionFence(options);\n\n // Check if resource has file fields\n if (!this.fileFieldDetection.hasFileFields(resourceType)) {\n return;\n }\n\n const fileFields = this.fileFieldDetection.detectFileFields(resourceType);\n\n this.logDebug('Processing file fields for DELETE', {\n resourceType,\n resourceId,\n fileFieldsCount: fileFields.length,\n });\n\n // Get all files linked to this resource\n const linkedFiles = await this.filesService.listFilesForResource(\n resourceType,\n resourceId,\n undefined, // fieldName - undefined means all fields\n executionContext,\n options\n );\n\n // Process each file based on onParentDelete behavior from field metadata\n for (const file of linkedFiles) {\n // Forward the owner `listFilesForResource` already verified for THIS file to the deletion gate,\n // so a system-cascade teardown (identity-less EC) does not deny the subject's own file.\n const teardownOptions = this.withAuthoritativeFileScope(options, file);\n if (!file.linkedFieldName) {\n this.logger.warn('Linked file missing linkedFieldName during parent delete; defaulting to cascade cleanup', {\n fileId: file.fileId,\n resourceType,\n resourceId,\n });\n await this.applyOnParentDeleteBehavior(\n file.fileId,\n 'cascade',\n executionContext,\n teardownOptions\n );\n continue;\n }\n\n const fileField = this.fileFieldDetection.getFileFieldMetadata(\n resourceType,\n file.linkedFieldName\n );\n\n if (!fileField) {\n // Field not found - use default cascade behavior\n await this.applyOnParentDeleteBehavior(\n file.fileId,\n 'cascade',\n executionContext,\n teardownOptions\n );\n continue;\n }\n\n const onParentDelete = fileField.fileMetadata.onParentDelete || 'cascade';\n\n await this.applyOnParentDeleteBehavior(\n file.fileId,\n onParentDelete,\n executionContext,\n teardownOptions\n );\n }\n\n this.logDebug('File fields processing for DELETE completed', {\n resourceType,\n resourceId,\n processedFilesCount: linkedFiles.length,\n });\n }\n\n /**\n * Process file fields when a resource row is IMPERSONALIZED-AND-RETAINED (gate **G-FILE**).\n *\n * The row survives for a legal/audit obligation, so this is NOT the delete cascade — but \"keep the\n * record\" must not become \"keep the personal data\". A field-level scrub cannot reach inside a stored\n * blob (a passport scan stays a passport scan however the row is rewritten), so for a file field the\n * only real erasure is deleting the file.\n *\n * Which files? Exactly the ones whose field the author marked personal with `.impersonalizeWith()` —\n * the SAME author-responsibility contract as ordinary fields, reusing the same vocabulary rather\n * than inventing a second axis. The caller passes the scrub patch's field names:\n * - field IS scrubbed (REMOVE) ⇒ delete the file. The scrub patch nulls the pointer in the same\n * write, so the retained row keeps no dangling reference.\n * - field NOT scrubbed (KEEP / untreated) ⇒ leave the file. This is how a legally-required artifact\n * (an invoice PDF that IS the retained record) survives the erasure.\n *\n * Why deletion is required rather than relying on the row being hidden: the resource-scoped serve\n * route inherits the parent's READ authorization, so a hidden retained row already blocks it — but\n * the GLOBAL `/files/:fileId` route (direct / consumable-token / public-share) is explicitly NOT\n * resource-scoped and re-checks only the file's OWN scope. A file left ACTIVE therefore stays\n * reachable there even though its parent row is invisible.\n *\n * Erasure here goes through `FilesBackendService.eraseFile`, NOT `deleteFile`: besides marking the\n * file DELETED it scrubs the file row's OWN personal data (`originalFilename`, `uploadedBy`) in the\n * same write. Without that, the row's metadata stayed readable on the global metadata route for the\n * weeks until physical cleanup — an \"erasure\" that leaked `passport-jane-doe.pdf` the whole time. A\n * lifecycle delete deliberately keeps that provenance; a privacy erasure must not.\n *\n * Physical storage cleanup stays with the existing cleanup batch, so an erasure never mixes a DB\n * rollback with non-transactional storage side effects.\n *\n * ## The MIDDLE state — keep-but-hide — is deliberately NOT built (decided 2026-08-09)\n *\n * There are only two outcomes above, and the consequence of the second is worth stating plainly: a KEEP\n * file stays ORDINARILY READABLE to the file's own scope (its organization) through the global route,\n * indefinitely, even though its parent row is now invisible. A third state — retained but reachable only\n * through the audited see-through door, mirroring the parent row's posture — was considered and refused\n * for three reasons, in order of weight:\n *\n * 1. **It would contradict a decision already taken.** The concrete case that motivates it is the\n * invoice PDF, and the billing retention decision was explicitly \"retained as audit material, and\n * invoices stay VISIBLE\" for ordinary accounting. Hiding retained invoice documents would reverse\n * that, and the sibling ruling on invoice URLs went the same way: keep the document, close the\n * ordinary door only where the document is not itself the record.\n * 2. **A hiding door is worthless without its reading door, and shipping one alone is worse than\n * neither.** Withholding the file without also building an audited retrieval primitive would make\n * the legally-required artifact unreachable by ANYONE — destroying the very access the retention\n * obligation exists to preserve. (Same pairing rule as the cross-tenant repair doors: a marking\n * door without its release door is a one-way door calling itself a window.)\n * 3. **No shipped resource needs it.** The author already controls both ends per field: mark the field\n * and the file is erased, leave it and the file survives. The gap is only the middle, and nothing in\n * the tree declares a file field that is simultaneously personal, legally required, and must stop\n * being ordinarily visible.\n *\n * **What would trigger building it:** a resource declaring exactly that combination. The shape is then a\n * new `FileStatus` member excluded from `FILE_DOWNLOADABLE_STATUSES` and added to\n * `FILE_METADATA_WITHHELD_STATUSES`, a `FILE_STATUS_TRANSITIONS` entry, and — non-optional — an audited\n * see-through retrieval primitive alongside it. Do not add the status without the door.\n */\n async processFileFieldsForImpersonalize(\n resourceType: ResourceType,\n resourceId: string,\n scrubbedFieldNames: readonly string[],\n executionContext: ExecutionContext<any>,\n options?: RepositoryOptions\n ): Promise<void> {\n options = this.stripParentVersionFence(options);\n\n if (scrubbedFieldNames.length === 0 || !this.fileFieldDetection.hasFileFields(resourceType)) {\n return;\n }\n\n const scrubbedFields = new Set(scrubbedFieldNames);\n const linkedFiles = await this.filesService.listFilesForResource(\n resourceType,\n resourceId,\n undefined, // all fields — we filter by treatment below\n executionContext,\n options\n );\n\n let erasedCount = 0;\n let unattributableCount = 0;\n for (const file of linkedFiles) {\n // Fail-closed on an unattributable file: without `linkedFieldName` we cannot tell whether its\n // field was marked personal, and silently keeping it risks retaining an erased subject's\n // document. The delete cascade defaults such a file to cleanup for the same reason.\n const isUnattributable = !file.linkedFieldName;\n const isScrubbedField = isUnattributable || scrubbedFields.has(file.linkedFieldName!);\n if (!isScrubbedField) {\n continue;\n }\n if (isUnattributable) {\n /**\n * WARN, not debug: this is an irreversible deletion taken on a GUESS.\n *\n * The fail-closed default is right — a file we cannot attribute might be the erased subject's\n * passport scan — but it can equally destroy a file the retention obligation existed to KEEP\n * (an invoice PDF whose link lost its field name). Either way the cause is upstream metadata,\n * so it has to be visible: the sibling delete cascade has warned here since before this path\n * existed, and this one erased silently. Same decision, same audibility.\n */\n unattributableCount += 1;\n this.logger.warn(\n '[Retention] Erasing a linked file with no `linkedFieldName` during impersonalize — it cannot '\n + 'be attributed to a field, so the fail-closed default deletes it. If this file was meant to '\n + 'be RETAINED, its link metadata is the defect.',\n { resourceType, resourceId, fileId: file.fileId },\n );\n }\n // Forward the owner `listFilesForResource` already verified for THIS file to the deletion gate,\n // so a system-cascade (identity-less EC) impersonalize erase does not deny the subject's own file.\n await this.filesService.eraseFile(file.fileId, executionContext, this.withAuthoritativeFileScope(options, file));\n erasedCount++;\n }\n\n this.logDebug('File fields processing for IMPERSONALIZE completed', {\n resourceType,\n resourceId,\n linkedFilesCount: linkedFiles.length,\n erasedCount,\n retainedCount: linkedFiles.length - erasedCount,\n unattributableCount,\n });\n }\n\n /**\n * Extract file IDs from field value (handles single file or array).\n *\n * @param fieldValue - The raw field value from the resource object\n * @param executionContext - Current execution context\n * @param strict - When true (user input / new values), throws on invalid fileIds.\n * When false (existing DB data), silently filters and logs warnings.\n */\n private extractFileIds(fieldValue: any, executionContext?: ExecutionContext<any>, strict: boolean = false): string[] {\n if (fieldValue === null || fieldValue === undefined) {\n return [];\n }\n\n if (typeof fieldValue === 'object' && !Array.isArray(fieldValue)) {\n if ('fileId' in fieldValue) {\n return this.extractFileIds((fieldValue as { fileId?: unknown }).fileId, executionContext, strict);\n }\n\n if ('fileIds' in fieldValue) {\n return this.extractFileIds((fieldValue as { fileIds?: unknown }).fileIds, executionContext, strict);\n }\n }\n\n if (Array.isArray(fieldValue)) {\n const validFileIds: string[] = [];\n for (const fileId of fieldValue) {\n if (typeof fileId !== 'string' || fileId.trim() === '') {\n if (strict) {\n throw this.errorBuilder.buildError(\n ErrorType.VALIDATION,\n executionContext,\n {\n customMessageReference: ErrorCustomMessageReference.FILE_ID_VALIDATION_FAILED,\n context: {\n // diagnostic (log-only)\n fileId,\n receivedType: typeof fileId,\n },\n }\n );\n }\n continue;\n }\n try {\n validateFileId(fileId, this.errorBuilder, executionContext, 'fileId');\n validFileIds.push(fileId);\n } catch (error) {\n if (strict) {\n throw error; // Re-throw in strict mode — user provided invalid input\n }\n // Tolerant mode: filter out and warn (handles corrupt DB data gracefully)\n this.logger.warn('Invalid fileId filtered out during extraction', {\n fileId,\n ...projectCaughtErrorLogFields(error),\n });\n }\n }\n return validFileIds;\n }\n\n if (typeof fieldValue === 'string' && fieldValue.trim() !== '') {\n try {\n validateFileId(fieldValue, this.errorBuilder, executionContext, 'fileId');\n return [fieldValue];\n } catch (error) {\n if (strict) {\n throw error;\n }\n this.logger.warn('Invalid fileId filtered out during extraction', {\n fileId: fieldValue,\n ...projectCaughtErrorLogFields(error),\n });\n return [];\n }\n }\n\n if (strict && fieldValue !== null && fieldValue !== undefined) {\n throw this.errorBuilder.buildError(\n ErrorType.VALIDATION,\n executionContext,\n {\n customMessageReference: ErrorCustomMessageReference.FILE_FIELD_VALUE_INVALID,\n context: {\n // diagnostic (log-only)\n receivedType: typeof fieldValue,\n },\n }\n );\n }\n\n return [];\n }\n\n /**\n * Link a file to a resource.\n * Handles race conditions (idempotent - safe to call multiple times).\n */\n private async linkFileToResource(\n fileId: string,\n resourceType: ResourceType,\n resourceId: string,\n fieldName: string,\n executionContext: ExecutionContext<any>,\n options?: RepositoryOptions\n ): Promise<void> {\n // Validate inputs (CRITICAL: Prevents query injection and database errors)\n validateFileId(fileId, this.errorBuilder, executionContext, 'fileId');\n validateResourceType(resourceType, this.errorBuilder, executionContext, 'resourceType');\n validateResourceId(resourceId, this.errorBuilder, executionContext, 'resourceId');\n validateFieldName(fieldName, this.errorBuilder, executionContext, 'fieldName');\n\n // Check if file is already linked to the same resource (idempotent check - before calling service)\n // This prevents unnecessary service calls and handles idempotent cases early\n const file = await this.filesService.getFile(fileId, executionContext, options);\n if (file &&\n file.status === FileStatus.LINKED &&\n file.linkedResourceType === resourceType &&\n file.linkedResourceId === resourceId &&\n file.linkedFieldName === fieldName) {\n // Already linked to same resource - skip (idempotent)\n this.logDebug('File already linked to same resource, skipping', {\n fileId,\n resourceType,\n resourceId,\n fieldName,\n });\n return;\n }\n\n // Link file - errors propagate to fail the transaction (Decision 2.2: Option A)\n // FilesBackendService.linkFileToResource() handles idempotent cases internally (returns existing file)\n // All other errors (NOT_FOUND, BUSINESS_RULE, INTERNAL) should fail the operation\n await this.filesService.linkFileToResource(\n fileId,\n resourceType,\n resourceId,\n fieldName,\n executionContext,\n options\n );\n }\n\n /**\n * Unlink a file from a resource.\n * Applies onParentDelete behavior.\n */\n private async unlinkFileFromResource(\n fileId: string,\n fieldName: string,\n executionContext: ExecutionContext<any>,\n options?: RepositoryOptions\n ): Promise<void> {\n // Validate fileId format (CRITICAL: Prevents query injection and database errors)\n validateFileId(fileId, this.errorBuilder, executionContext, 'fileId');\n\n const file = await this.filesService.getFile(fileId, executionContext, options);\n if (!file || file.status !== FileStatus.LINKED) {\n // Already unlinked or doesn't exist - skip (idempotent)\n return;\n }\n\n // Unlink file (sets status to ORPHANED)\n await this.filesService.unlinkFileFromResource(fileId, executionContext, options);\n }\n\n /**\n * Apply onParentDelete behavior to a file.\n *\n * @param fileId - File ID\n * @param behavior - Behavior: 'cascade', 'soft-delete', or 'orphan'\n * @param executionContext - Execution context\n */\n private async applyOnParentDeleteBehavior(\n fileId: string,\n behavior: 'cascade' | 'soft-delete' | 'orphan',\n executionContext: ExecutionContext<any>,\n options?: RepositoryOptions\n ): Promise<void> {\n this.logDebug('Applying onParentDelete behavior', {\n fileId,\n behavior,\n });\n\n switch (behavior) {\n case 'cascade':\n // Cascade now marks the file as DELETED only. Physical storage cleanup is\n // intentionally deferred to the cleanup batch so resource deletes never\n // mix Mongo rollback with non-transactional storage side effects.\n await this.filesService.deleteFile(fileId, executionContext, options);\n break;\n\n case 'soft-delete':\n // Soft delete: update status to DELETED\n await this.filesService.deleteFile(fileId, executionContext, options);\n break;\n\n case 'orphan':\n // Unlink: clear parent fields, set status to ORPHANED\n await this.filesService.unlinkFileFromResource(fileId, executionContext, options);\n break;\n\n default:\n // Default to cascade\n await this.filesService.deleteFile(fileId, executionContext, options);\n }\n }\n\n private prepareOccurrences(\n occurrences: FileFieldValueOccurrence[],\n executionContext: ExecutionContext<any>,\n strict: boolean,\n ): Array<{\n occurrence: FileFieldValueOccurrence;\n fileIds: string[];\n signature: string;\n }> {\n return occurrences.map((occurrence) => {\n const fileIds = this.extractFileIds(occurrence.value, executionContext, strict);\n return {\n occurrence,\n fileIds,\n signature: JSON.stringify([...fileIds].sort()),\n };\n });\n }\n\n private matchOccurrences(\n oldOccurrences: Array<{\n occurrence: FileFieldValueOccurrence;\n fileIds: string[];\n signature: string;\n }>,\n newOccurrences: Array<{\n occurrence: FileFieldValueOccurrence;\n fileIds: string[];\n signature: string;\n }>,\n ): {\n pairs: Array<{\n oldOccurrence?: {\n occurrence: FileFieldValueOccurrence;\n fileIds: string[];\n signature: string;\n };\n newOccurrence?: {\n occurrence: FileFieldValueOccurrence;\n fileIds: string[];\n signature: string;\n };\n }>;\n requiresAmbiguousFallback: boolean;\n } {\n const pairs: Array<{\n oldOccurrence?: {\n occurrence: FileFieldValueOccurrence;\n fileIds: string[];\n signature: string;\n };\n newOccurrence?: {\n occurrence: FileFieldValueOccurrence;\n fileIds: string[];\n signature: string;\n };\n }> = [];\n\n const remainingOld = [...oldOccurrences];\n const remainingNew = [...newOccurrences];\n\n const stableIds = new Set(\n [...remainingOld, ...remainingNew]\n .map((entry) => entry.occurrence.ownerStableId)\n .filter((value): value is string => typeof value === 'string' && value.trim() !== ''),\n );\n\n for (const stableId of stableIds) {\n const oldMatches = remainingOld.filter((entry) => entry.occurrence.ownerStableId === stableId);\n const newMatches = remainingNew.filter((entry) => entry.occurrence.ownerStableId === stableId);\n\n while (oldMatches.length > 0 && newMatches.length > 0) {\n const oldEntry = oldMatches.shift()!;\n const newEntry = newMatches.shift()!;\n remainingOld.splice(remainingOld.indexOf(oldEntry), 1);\n remainingNew.splice(remainingNew.indexOf(newEntry), 1);\n pairs.push({ oldOccurrence: oldEntry, newOccurrence: newEntry });\n }\n }\n\n const oldSignatureBuckets = new Map<string, typeof remainingOld>();\n for (const entry of remainingOld) {\n if (entry.occurrence.ownerStableId) {\n continue;\n }\n const bucket = oldSignatureBuckets.get(entry.signature) ?? [];\n bucket.push(entry);\n oldSignatureBuckets.set(entry.signature, bucket);\n }\n\n for (const newEntry of [...remainingNew]) {\n if (newEntry.occurrence.ownerStableId) {\n continue;\n }\n\n const bucket = oldSignatureBuckets.get(newEntry.signature);\n const oldEntry = bucket?.shift();\n if (!oldEntry) {\n continue;\n }\n\n remainingOld.splice(remainingOld.indexOf(oldEntry), 1);\n remainingNew.splice(remainingNew.indexOf(newEntry), 1);\n pairs.push({ oldOccurrence: oldEntry, newOccurrence: newEntry });\n }\n\n const requiresAmbiguousFallback =\n remainingOld.some((entry) => !entry.occurrence.ownerStableId) &&\n remainingNew.some((entry) => !entry.occurrence.ownerStableId);\n\n while (remainingOld.length > 0 || remainingNew.length > 0) {\n pairs.push({\n oldOccurrence: remainingOld.shift(),\n newOccurrence: remainingNew.shift(),\n });\n }\n\n return {\n pairs,\n requiresAmbiguousFallback,\n };\n }\n}\n"]}
@@ -11,16 +11,33 @@
11
11
  * 5. Processes combined results (CLEAN / INFECTED)
12
12
  * 6. Quarantines infected files
13
13
  *
14
- * Scanning is **optimistic**: the upload response returns immediately
15
- * with status UPLOADED. The file becomes downloadable only after
16
- * transitioning to CLEAN (when scanning is enabled). If scanning is
17
- * disabled, the file stays at UPLOADED and remains downloadable.
14
+ * Scanning is **fail-closed at the gate, asynchronous in the pipeline** (#433). The upload handler
15
+ * AWAITS `initiateScan`, which awaits the UPLOADED -> SCANNING transition and only then fires the
16
+ * pipeline — so the upload response costs one status write, not a scan, and the file is already
17
+ * non-downloadable when the caller is told the upload succeeded. It becomes downloadable when the
18
+ * result handler transitions it to CLEAN.
19
+ *
20
+ * This paragraph used to say the response "returns immediately with status UPLOADED", and that was
21
+ * the defect: UPLOADED is a downloadable status, so a field declaring `scanPolicy: 'required'` had
22
+ * a window in which unscanned bytes were servable. If scanning is not required for the field, the
23
+ * file stays at UPLOADED and remains downloadable — that half is unchanged and deliberate.
18
24
  *
19
25
  * Configuration:
20
- * - Global: `appConfig.files.scanning.enabled` (default: false)
21
- * - Per-field: `z_file({ scanPolicy: 'required' | 'skip' })` overrides global
26
+ * - Application-wide: DERIVED, not declared. Scanning is on for a field that states no policy of its
27
+ * own exactly when a scanner is reachable — `fileScanning.antivirus` (seeded from `CLAMAV_HOST`) or
28
+ * `fileScanning.yara` both enabled and reachable (`YARA_ENABLED` + `YARA_HOST`). Provisioning the
29
+ * sidecar IS the application-level opt-in; there is no separate on/off flag. See
30
+ * {@link FileScanningBackendService.isGlobalScanningEnabled} for why it is derived rather than declared.
31
+ * - Per-field: `z_file({ scanPolicy: 'required' | 'skip' })` overrides that, in both directions.
32
+ *
33
+ * These two lines used to name `appConfig.files.scanning.enabled`, a configuration path no schema has
34
+ * ever declared — so the application-wide half was documented, cast through `any`, and dead.
35
+ *
36
+ * A scan that was REQUESTED and finds no scanner now FAILS the file rather than passing it; the tail of
37
+ * `executeScan` carries the reasoning.
22
38
  */
23
39
  import type { FileSchemaMetadata } from '@wildo-ai/zod-decorators';
40
+ import type { AuditLogsBackendService } from '../../compliance/audit-trails/services/audit-logs.backend.service';
24
41
  import type { LoggerService } from '../../monitoring/logger/services/logger.service';
25
42
  import { ErrorBuilderBackendService } from '../../errors/services/error-builder.backend.service';
26
43
  import { ExecutionContext } from '../../runtime/models/execution-context.backend.schemas';
@@ -39,19 +56,72 @@ export declare class FileScanningBackendService {
39
56
  private readonly clamavScanner;
40
57
  private readonly yaraScanner;
41
58
  private readonly fileStorageRouter;
59
+ private readonly auditLogsService?;
42
60
  protected logDebug: (message: string, context?: Record<string, unknown>) => void;
43
61
  private readonly onCleanCallbacks;
44
- constructor(logger: LoggerService, errorBuilder: ErrorBuilderBackendService, filesService: FilesBackendService, appConfigService: AppConfigurationService, clamavScanner: ClamAVScannerBackendService, yaraScanner: YaraScannerBackendService, fileStorageRouter: FileStorageRouterBackendService);
62
+ constructor(logger: LoggerService, errorBuilder: ErrorBuilderBackendService, filesService: FilesBackendService, appConfigService: AppConfigurationService, clamavScanner: ClamAVScannerBackendService, yaraScanner: YaraScannerBackendService, fileStorageRouter: FileStorageRouterBackendService, auditLogsService?: AuditLogsBackendService);
45
63
  /**
46
64
  * Determine whether a file should be scanned after upload.
47
65
  *
48
66
  * Resolution order:
49
67
  * 1. Per-field `z_file({ scanPolicy })` wins if set
50
- * 2. Falls back to global `appConfig.files.scanning.enabled`
68
+ * 2. Falls back to the application-wide answer, {@link isGlobalScanningEnabled}
69
+ *
70
+ * assurance-control: WILDO.SECURITY.INGESTED_CONTENT_INSPECTION — whether ingested content is
71
+ * inspected is a declared decision, per field and then per application, rather than an implicit one.
72
+ *
73
+ * The per-APPLICATION half of that claim was false until 2026-09-09: step 2 read a configuration path
74
+ * no schema declares, so it answered `false` in every application ever built and `scanPolicy` was the
75
+ * only reachable declaration. It is true now because the application-wide answer is DERIVED from the
76
+ * scanner topology the operator provisions — a declaration made by supplying `CLAMAV_HOST`, and
77
+ * refused a default. Nothing here is implicit in either direction: a field can still override, and a
78
+ * requested scan with no scanner refuses rather than passing (see the tail of `executeScan`).
51
79
  */
52
80
  shouldScan(fileMetadata?: FileSchemaMetadata): boolean;
53
81
  /**
54
- * Check if global scanning is enabled in the app configuration.
82
+ * Whether scanning is on APPLICATION-WIDE, for a file field that states no `scanPolicy` of its own.
83
+ *
84
+ * DERIVED from the platform-injected `fileScanning` topology: a scanner being reachable IS the
85
+ * application-level opt-in.
86
+ *
87
+ * ## What this replaced
88
+ *
89
+ * `(this.appConfigService.config as Record<string, any>)?.files?.scanning?.enabled === true`. The
90
+ * `any` cast is the tell — `AppConfigurationSchema` declares no `files` section, `z.object` strips
91
+ * unknown keys, so the parsed configuration could never carry that path and the expression was
92
+ * `undefined === true` for every application, for the whole life of the flag. The service's own
93
+ * docstring documented it as the global switch.
94
+ *
95
+ * ## Why DERIVED rather than declared
96
+ *
97
+ * Adding an `enabled` boolean to `AppConfiguration_FileScanningSchema` was the other candidate and is
98
+ * rejected on three counts:
99
+ *
100
+ * - **the answer already exists.** `fileScanning` is a mutation-boundary-PROTECTED section
101
+ * (`APP_CONFIG_MUTATION_BOUNDARY_RULES` in `app-config.backend-authored.definitions.ts`: "file-scanning
102
+ * sidecar topology and its platform-level opt-in are env/bootstrap-owned"), so an application cannot
103
+ * author it. A boolean would have to be seeded from a NEW environment key sitting beside the host key
104
+ * that already says the same thing — a second source of truth that can disagree with the first;
105
+ * - **it matches the convention of the thing it gates.** ClamAV has no enable flag anywhere in this
106
+ * subsystem: `ClamAVScannerBackendService.isConfigured()` states "presence of a host IS the opt-in",
107
+ * and `buildFileServicesTopologyFromEnvironment` refuses to emit a plausible default host for exactly
108
+ * that reason;
109
+ * - **it closes the hole the repair would otherwise open.** A separate boolean makes "globally on, no
110
+ * scanner reachable" a REPRESENTABLE state, and that state is precisely the one the pipeline used to
111
+ * answer with a CLEAN verdict. Derived, the state cannot exist: the switch is on only when something
112
+ * can actually run. The runtime refusal in `executeScan` stays regardless, because `scanPolicy:
113
+ * 'required'` reaches the same tail without consulting this switch at all.
114
+ *
115
+ * The two predicates are the pipeline's OWN — `executeScan` gates its two layers on exactly
116
+ * `clamavScanner.isConfigured()` and `yaraScanner.isEnabled()` — so the switch and the pipeline cannot
117
+ * come to different conclusions about whether a scan is possible. Note `isEnabled()` is already the
118
+ * conjunction of YARA's two independent axes (opted in AND reachable), which is why the "enabled but
119
+ * unreachable" misconfiguration does not read as an application-wide opt-in here; the startup validator
120
+ * reports it as its own issue instead.
121
+ *
122
+ * The `isInitialized()` guard stays: both scanner reads deliberately throw
123
+ * `app_configuration_not_initialized` rather than softening to `false`, and a scan decision taken before
124
+ * configuration has landed is not a decision.
55
125
  */
56
126
  isGlobalScanningEnabled(): boolean;
57
127
  /**
@@ -88,6 +158,21 @@ export declare class FileScanningBackendService {
88
158
  * - ERROR: transition to FAILED (retryable via re-scan)
89
159
  */
90
160
  handleScanResult(fileId: string, result: FileScanResult, executionContext: ExecutionContext<any>): Promise<void>;
161
+ /**
162
+ * Write the scan outcome to the audit trail (#506).
163
+ *
164
+ * Best-effort and never throwing: the file's status transition is the enforcement, and an audit
165
+ * store being unavailable must not convert a successful quarantine into an exception that leaves
166
+ * the caller believing the scan failed.
167
+ *
168
+ * A CLEAN verdict is deliberately NOT audited. Every upload is scanned, so a clean row per upload
169
+ * would be the highest-volume event in the trail and would bury the two that matter — and the
170
+ * upload itself is already recorded by `FILE_UPLOAD_GRANT_REDEEMED`. What is added here is the
171
+ * conclusion an operator would want to be alerted on.
172
+ */
173
+ private recordScanOutcomeAudit;
174
+ /** The status the FILES row actually carries after the transition, or `unknown` if it cannot be read. */
175
+ private resolveRecordedFileStatus;
91
176
  /**
92
177
  * Quarantine an infected file.
93
178
  *
@@ -1 +1 @@
1
- {"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AAM,EAAE,aAAa,EAErB,YAAY,EAAE,0BAA0B,EAExC,YAAY,EAAE,mBAAmB,EAEjC,gBAAgB,EAAE,uBAAuB,EAEzC,aAAa,EAAE,2BAA2B,EAE1C,WAAW,EAAE,yBAAyB,EAEtC,iBAAiB,EAAE,+BAA+B;IAKrE;;;;;;OAMG;IACH,UAAU,CAAC,YAAY,CAAC,EAAE,kBAAkB,GAAG,OAAO;IAStD;;OAEG;IACH,uBAAuB,IAAI,OAAO;IAMlC;;;;;;;;;;;;;OAaG;IACG,YAAY,CAChB,MAAM,EAAE,MAAM,EACd,gBAAgB,EAAE,gBAAgB,CAAC,GAAG,CAAC,EACvC,OAAO,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAC5B,OAAO,CAAC,IAAI,CAAC;IAsChB;;;;;;;;;OASG;YACW,WAAW;IA0HzB;;;;;;OAMG;IACG,gBAAgB,CACpB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,cAAc,EACtB,gBAAgB,EAAE,gBAAgB,CAAC,GAAG,CAAC,GACtC,OAAO,CAAC,IAAI,CAAC;IAmEhB;;;;;;OAMG;YACW,sBAAsB;CAsBrC"}
1
+ {"version":3,"file":"file-scanning.backend.service.d.ts","sourceRoot":"","sources":["../../../../../src/files/services/file-scanning.backend.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AASH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAEnE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,gFAAgF,CAAC;AAC9H,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8DAA8D,CAAC;AAClG,OAAO,EAAE,0BAA0B,EAAE,MAAM,kEAAkE,CAAC;AAE9G,OAAO,EAAE,gBAAgB,EAAE,MAAM,qEAAqE,CAAC;AACvG,OAAO,EAAE,mBAAmB,EAAE,MAAM,yDAAyD,CAAC;AAC9F,OAAO,EAA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