@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
@@ -0,0 +1,266 @@
1
+ /**
2
+ * The OAuth2 authorization-code exchange, as three pure-ish functions.
3
+ *
4
+ * This is the half of the connect flow that has no HTTP route, no session and no database: build the
5
+ * URL a person is sent to, turn the code they come back with into a grant, and renew a grant that is
6
+ * about to expire. The route, the state record and the store are a thin shell around it.
7
+ *
8
+ * Written as functions over an explicit contract rather than as a service with injected collaborators
9
+ * for one reason: every interesting failure here is a WRONG STRING — a placeholder that was never
10
+ * resolved, a scope set that silently shrank, a redirect URI that does not match the one registered.
11
+ * Those are answerable by a unit test only if the inputs are arguments, and they are the failures
12
+ * that reach a person as "the vendor says no" with nothing local to look at.
13
+ *
14
+ * ## What this deliberately does NOT do
15
+ *
16
+ * It does not store anything, does not read a credential, and does not decide WHO may connect. The
17
+ * connection target (whose account is being connected) and its admissibility are decided before this
18
+ * is reached, by the same two gates every other credential path goes through.
19
+ *
20
+ * assurance-control: WILDO.IDENTITY.DELEGATED_AUTHORIZATION — the authorization exchange by which a
21
+ * principal grants this application access to a third party on their behalf.
22
+ */
23
+ import { createHash, randomBytes, timingSafeEqual } from 'node:crypto';
24
+ import { ProviderStoredCredentialKind } from '@wildo-ai/saas-models';
25
+ /** Raised when an exchange cannot be built or completed. Never carries a token or a client secret. */
26
+ export class ProviderOAuth2ExchangeError extends Error {
27
+ /**
28
+ * The vendor's own OAuth2 error code, when the failure was one the vendor NAMED.
29
+ *
30
+ * Carried structurally rather than only inside the message, because one caller has to act on it
31
+ * differently from every other failure: a grant the vendor has permanently rejected must stop
32
+ * presenting itself as a working connection, while a token endpoint that was merely unreachable
33
+ * must not. Both arrive here as the same class, and a message substring is not something to branch
34
+ * a person's account state on.
35
+ *
36
+ * Absent for transport failures, unparseable bodies and bare HTTP statuses — cases where the
37
+ * vendor said nothing about the grant, and where assuming anything about it would be a guess.
38
+ */
39
+ oauth2ErrorCode;
40
+ constructor(message, oauth2ErrorCode) {
41
+ super(message);
42
+ this.name = 'ProviderOAuth2ExchangeError';
43
+ this.oauth2ErrorCode = oauth2ErrorCode;
44
+ }
45
+ }
46
+ /**
47
+ * Is this failure the vendor saying the grant itself is finished?
48
+ *
49
+ * TRUE for exactly one code. `invalid_grant` is defined as an authorization grant or refresh token
50
+ * that is invalid, expired, revoked, or was issued to another client — every one of which is
51
+ * permanent for THIS connection and none of which a retry improves.
52
+ * spec-cite: RFC 6749 §5.2 (invalid_grant).
53
+ *
54
+ * Deliberately NOT `invalid_client`, and that exclusion is the substantive half. `invalid_client`
55
+ * means the APPLICATION's own registration was rejected — a wrong client secret, a deleted vendor
56
+ * app — which is an operator's problem affecting every connection at once. Treating it as a dead
57
+ * grant would mark every person's account invalid and invite them all to reconnect, which cannot
58
+ * work and would blame them for a misconfiguration they cannot see.
59
+ *
60
+ * Also FALSE for every failure the vendor did not name: a transport error, a non-JSON body, a bare
61
+ * 500. A vendor that was unreachable has said nothing about the grant, and a connection must not be
62
+ * retired on our inability to ask.
63
+ */
64
+ export function providerOAuth2GrantWasPermanentlyRejected(error) {
65
+ return error instanceof ProviderOAuth2ExchangeError && error.oauth2ErrorCode === 'invalid_grant';
66
+ }
67
+ export function createProviderOAuth2Pkce() {
68
+ // 32 bytes base64url is 43 characters — the minimum the specification allows for a verifier, and
69
+ // the length every major vendor's documentation uses.
70
+ // spec-cite: RFC 7636 §4.1 (code_verifier: 43–128 characters).
71
+ const verifier = randomBytes(32).toString('base64url');
72
+ return {
73
+ verifier,
74
+ challenge: createHash('sha256').update(verifier).digest('base64url'),
75
+ method: 'S256',
76
+ };
77
+ }
78
+ /**
79
+ * Compare two opaque values in constant time.
80
+ *
81
+ * Used for the `state` echo. A plain `===` leaks the position of the first differing byte through
82
+ * timing, and `state` is the CSRF defence for the whole flow: an attacker who can guess it can graft
83
+ * their own authorization code onto somebody else's connect attempt.
84
+ */
85
+ export function providerOAuth2ValuesMatch(left, right) {
86
+ const a = Buffer.from(left, 'utf8');
87
+ const b = Buffer.from(right, 'utf8');
88
+ if (a.length !== b.length)
89
+ return false;
90
+ return timingSafeEqual(a, b);
91
+ }
92
+ /** A fresh, unguessable `state` for one authorization attempt. */
93
+ export function createProviderOAuth2State() {
94
+ return randomBytes(32).toString('base64url');
95
+ }
96
+ /**
97
+ * Resolve the `{placeholder}` holes an endpoint carries from the connection's own parameters.
98
+ *
99
+ * REFUSES on a missing value rather than leaving the brace in place. A URL still carrying
100
+ * `{tenantId}` is not a URL: it would be sent to the person's browser, fail to resolve as a
101
+ * hostname, and present as "the vendor is down" — a very long way from "nobody asked which
102
+ * directory". 21 of the 96 vendors that recovered both endpoints are in this population.
103
+ */
104
+ export function resolveEndpointPlaceholders(url, connectionParameters, providerRef) {
105
+ return url.replace(/\{([A-Za-z_][A-Za-z0-9_]*)\}/g, (_match, name) => {
106
+ const value = connectionParameters[name];
107
+ if (value === undefined || value === '') {
108
+ throw new ProviderOAuth2ExchangeError(`Provider '${providerRef}' needs a value for '${name}' before its OAuth2 endpoints are usable — `
109
+ + `'${url}' still carries the placeholder. This is a fact about the ACCOUNT being connected `
110
+ + '(which cloud, which directory, which region), so it is asked for at connect time and is not '
111
+ + 'application configuration.');
112
+ }
113
+ return encodeURIComponent(value);
114
+ });
115
+ }
116
+ /**
117
+ * The URL a person is sent to in order to grant access.
118
+ *
119
+ * Query parameters are MERGED into whatever the vendor's own authorize URL already carries rather
120
+ * than appended blindly. That is not tidiness: Slack's catalogue-declared authorize URL arrives with
121
+ * a `?user_scope=…` query string baked in, so appending `?client_id=…` would produce a URL with two
122
+ * `?` and a vendor that rejects it. One vendor of 129 does this today, which is exactly the kind of
123
+ * single-instance shape that a naive concatenation gets wrong forever.
124
+ */
125
+ export function buildProviderOAuth2AuthorizeUrl(input) {
126
+ const resolved = resolveEndpointPlaceholders(input.oauth2.authorizeUrl, input.connectionParameters ?? {}, input.providerRef);
127
+ let url;
128
+ try {
129
+ url = new URL(resolved);
130
+ }
131
+ catch {
132
+ throw new ProviderOAuth2ExchangeError(`Provider '${input.providerRef}' declares an authorize URL that is not a URL: '${resolved}'. `
133
+ + 'Correct it in the provider\'s authored supplement rather than at the call site.');
134
+ }
135
+ const scopes = input.scopes ?? input.oauth2.scopes ?? [];
136
+ url.searchParams.set('response_type', 'code');
137
+ url.searchParams.set('client_id', input.clientId);
138
+ url.searchParams.set('redirect_uri', input.redirectUri);
139
+ url.searchParams.set('state', input.state);
140
+ url.searchParams.set('code_challenge', input.pkce.challenge);
141
+ url.searchParams.set('code_challenge_method', input.pkce.method);
142
+ if (scopes.length > 0) {
143
+ // Space-delimited, which is the specification's encoding; `URLSearchParams` percent-encodes the
144
+ // spaces. Vendors that want commas are a per-vendor deviation and belong in an authored
145
+ // supplement, not in a guess here.
146
+ // spec-cite: RFC 6749 §3.3 (scope is expressed as a list of space-delimited strings).
147
+ url.searchParams.set('scope', scopes.join(' '));
148
+ }
149
+ return url.toString();
150
+ }
151
+ /**
152
+ * Turn the authorization code into a grant.
153
+ *
154
+ * The client credentials go in the BODY (`client_secret_post`) rather than a Basic header. Both are
155
+ * specified and a server must support Basic, but the body form is what every major vendor's own
156
+ * documentation shows and what their sandboxes accept; a vendor that requires Basic is a per-vendor
157
+ * deviation for an authored supplement.
158
+ * spec-cite: RFC 6749 §2.3.1 (client_secret_basic is required of servers; the body form is permitted).
159
+ */
160
+ export async function exchangeProviderOAuth2Code(input) {
161
+ return postToTokenEndpoint(input, {
162
+ grant_type: 'authorization_code',
163
+ code: input.code,
164
+ redirect_uri: input.redirectUri,
165
+ code_verifier: input.pkceVerifier,
166
+ });
167
+ }
168
+ /**
169
+ * Renew a grant that is expiring.
170
+ *
171
+ * Carries the PREVIOUS grant's refresh token forward when the vendor does not return a new one.
172
+ * That is the difference between a connection that survives and one that dies on its second
173
+ * refresh: some vendors rotate the refresh token on every use and return the replacement, and
174
+ * others return only an access token and expect the original refresh token to be reused. Dropping
175
+ * it in the second case leaves a grant that cannot be refreshed again, and the failure arrives an
176
+ * hour later with nothing pointing at this function.
177
+ * spec-cite: RFC 6749 §6 (the authorization server MAY issue a new refresh token).
178
+ */
179
+ export async function refreshProviderOAuth2Grant(input) {
180
+ if (input.grant.refreshToken === undefined) {
181
+ throw new ProviderOAuth2ExchangeError(`The stored grant for provider '${input.providerRef}' has no refresh token, so it cannot be renewed. `
182
+ + 'Reconnect the account. This is not a fault: several vendors issue non-expiring tokens with no '
183
+ + 'refresh, and a grant that reaches here has both an expiry and no way to renew it.');
184
+ }
185
+ const renewed = await postToTokenEndpoint(input, {
186
+ grant_type: 'refresh_token',
187
+ refresh_token: input.grant.refreshToken,
188
+ });
189
+ return {
190
+ ...renewed,
191
+ refreshToken: renewed.refreshToken ?? input.grant.refreshToken,
192
+ // The vendor need not restate the account or the scopes on a refresh; losing them would make a
193
+ // renewed connection describe itself less well than a fresh one.
194
+ accountRef: renewed.accountRef ?? input.grant.accountRef,
195
+ grantedScopes: renewed.grantedScopes ?? input.grant.grantedScopes,
196
+ };
197
+ }
198
+ async function postToTokenEndpoint(input, parameters) {
199
+ const tokenUrl = resolveEndpointPlaceholders(input.oauth2.tokenUrl, input.connectionParameters ?? {}, input.providerRef);
200
+ const body = new URLSearchParams({
201
+ ...parameters,
202
+ client_id: input.clientId,
203
+ client_secret: input.clientSecret,
204
+ });
205
+ const doFetch = input.fetchImpl ?? fetch;
206
+ let response;
207
+ try {
208
+ response = await doFetch(tokenUrl, {
209
+ method: 'POST',
210
+ headers: {
211
+ 'content-type': 'application/x-www-form-urlencoded',
212
+ // Several vendors default to form-encoded responses without it, and one that does is
213
+ // indistinguishable from a malformed body at the parse below.
214
+ accept: 'application/json',
215
+ },
216
+ body: body.toString(),
217
+ });
218
+ }
219
+ catch (error) {
220
+ throw new ProviderOAuth2ExchangeError(`Could not reach the token endpoint for provider '${input.providerRef}' at ${tokenUrl}: `
221
+ + `${error instanceof Error ? error.message : 'unknown transport failure'}.`);
222
+ }
223
+ const text = await response.text();
224
+ let payload;
225
+ try {
226
+ payload = JSON.parse(text);
227
+ }
228
+ catch {
229
+ throw new ProviderOAuth2ExchangeError(`Provider '${input.providerRef}' answered its token endpoint with a non-JSON body (HTTP ${response.status}). `
230
+ + 'The body is not reproduced here because a token endpoint\'s response carries credentials.');
231
+ }
232
+ // An OAuth2 error can arrive with HTTP 200 — several vendors do this, Slack among them — so the
233
+ // status is not the authority on whether the exchange succeeded. Checking only `response.ok`
234
+ // would treat `{"ok":false,"error":"invalid_code"}` as a grant and store a row with no token.
235
+ if (typeof payload.error === 'string') {
236
+ throw new ProviderOAuth2ExchangeError(`Provider '${input.providerRef}' refused the token exchange: ${payload.error}`
237
+ + `${typeof payload.error_description === 'string' ? ` — ${payload.error_description}` : ''}.`,
238
+ // The one failure the vendor NAMED. Carried structurally so a caller can tell a dead grant
239
+ // from an unreachable endpoint without matching on prose.
240
+ payload.error);
241
+ }
242
+ if (!response.ok) {
243
+ throw new ProviderOAuth2ExchangeError(`Provider '${input.providerRef}' answered HTTP ${response.status} to the token exchange with no error code.`);
244
+ }
245
+ if (typeof payload.access_token !== 'string' || payload.access_token.length === 0) {
246
+ throw new ProviderOAuth2ExchangeError(`Provider '${input.providerRef}' answered the token exchange without an access token. `
247
+ + 'Storing the response would create a connection that cannot authenticate anything.');
248
+ }
249
+ return {
250
+ kind: ProviderStoredCredentialKind.OAUTH2_GRANT,
251
+ accessToken: payload.access_token,
252
+ refreshToken: typeof payload.refresh_token === 'string' && payload.refresh_token.length > 0
253
+ ? payload.refresh_token
254
+ : undefined,
255
+ expiresAt: typeof payload.expires_in === 'number' && Number.isFinite(payload.expires_in)
256
+ ? new Date(Date.now() + payload.expires_in * 1000).toISOString()
257
+ : undefined,
258
+ // What the vendor actually GRANTED, which is not always what was asked for. Space-delimited per
259
+ // the specification; a vendor returning a comma-separated string is a per-vendor deviation.
260
+ // spec-cite: RFC 6749 §5.1 (scope, present if different from the one requested).
261
+ grantedScopes: typeof payload.scope === 'string' && payload.scope.length > 0
262
+ ? payload.scope.split(/\s+/).filter((scope) => scope.length > 0)
263
+ : undefined,
264
+ };
265
+ }
266
+ //# sourceMappingURL=provider-oauth2-exchange.backend.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provider-oauth2-exchange.backend.js","sourceRoot":"","sources":["../../../../../../src/security/connected-accounts/services/provider-oauth2-exchange.backend.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAGvE,OAAO,EAAE,4BAA4B,EAA4B,MAAM,uBAAuB,CAAC;AAE/F,sGAAsG;AACtG,MAAM,OAAO,2BAA4B,SAAQ,KAAK;IACpD;;;;;;;;;;;OAWG;IACa,eAAe,CAAU;IAEzC,YAAY,OAAe,EAAE,eAAwB;QACnD,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,6BAA6B,CAAC;QAC1C,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;IACzC,CAAC;CACF;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,yCAAyC,CAAC,KAAc;IACtE,OAAO,KAAK,YAAY,2BAA2B,IAAI,KAAK,CAAC,eAAe,KAAK,eAAe,CAAC;AACnG,CAAC;AAiBD,MAAM,UAAU,wBAAwB;IACtC,iGAAiG;IACjG,sDAAsD;IACtD,+DAA+D;IAC/D,MAAM,QAAQ,GAAG,WAAW,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;IACvD,OAAO;QACL,QAAQ;QACR,SAAS,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC;QACpE,MAAM,EAAE,MAAM;KACf,CAAC;AACJ,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,yBAAyB,CAAC,IAAY,EAAE,KAAa;IACnE,MAAM,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IACpC,MAAM,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IACrC,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM;QAAE,OAAO,KAAK,CAAC;IACxC,OAAO,eAAe,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAC/B,CAAC;AAED,kEAAkE;AAClE,MAAM,UAAU,yBAAyB;IACvC,OAAO,WAAW,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;AAC/C,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,2BAA2B,CACzC,GAAW,EACX,oBAAsD,EACtD,WAAmB;IAEnB,OAAO,GAAG,CAAC,OAAO,CAAC,+BAA+B,EAAE,CAAC,MAAM,EAAE,IAAY,EAAE,EAAE;QAC3E,MAAM,KAAK,GAAG,oBAAoB,CAAC,IAAI,CAAC,CAAC;QACzC,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,EAAE,EAAE,CAAC;YACxC,MAAM,IAAI,2BAA2B,CACnC,aAAa,WAAW,wBAAwB,IAAI,6CAA6C;kBAC/F,IAAI,GAAG,oFAAoF;kBAC3F,8FAA8F;kBAC9F,4BAA4B,CAC/B,CAAC;QACJ,CAAC;QACD,OAAO,kBAAkB,CAAC,KAAK,CAAC,CAAC;IACnC,CAAC,CAAC,CAAC;AACL,CAAC;AAsBD;;;;;;;;GAQG;AACH,MAAM,UAAU,+BAA+B,CAAC,KAA6B;IAC3E,MAAM,QAAQ,GAAG,2BAA2B,CAC1C,KAAK,CAAC,MAAM,CAAC,YAAY,EACzB,KAAK,CAAC,oBAAoB,IAAI,EAAE,EAChC,KAAK,CAAC,WAAW,CAClB,CAAC;IAEF,IAAI,GAAQ,CAAC;IACb,IAAI,CAAC;QACH,GAAG,GAAG,IAAI,GAAG,CAAC,QAAQ,CAAC,CAAC;IAC1B,CAAC;IAAC,MAAM,CAAC;QACP,MAAM,IAAI,2BAA2B,CACnC,aAAa,KAAK,CAAC,WAAW,mDAAmD,QAAQ,KAAK;cAC5F,iFAAiF,CACpF,CAAC;IACJ,CAAC;IAED,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,MAAM,CAAC,MAAM,IAAI,EAAE,CAAC;IACzD,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC;IAC9C,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,WAAW,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC;IAClD,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,cAAc,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC;IACxD,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,OAAO,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;IAC3C,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,gBAAgB,EAAE,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAC7D,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,uBAAuB,EAAE,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACjE,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACtB,gGAAgG;QAChG,wFAAwF;QACxF,mCAAmC;QACnC,sFAAsF;QACtF,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;IAClD,CAAC;IACD,OAAO,GAAG,CAAC,QAAQ,EAAE,CAAC;AACxB,CAAC;AAsBD;;;;;;;;GAQG;AACH,MAAM,CAAC,KAAK,UAAU,0BAA0B,CAC9C,KAAkH;IAElH,OAAO,mBAAmB,CAAC,KAAK,EAAE;QAChC,UAAU,EAAE,oBAAoB;QAChC,IAAI,EAAE,KAAK,CAAC,IAAI;QAChB,YAAY,EAAE,KAAK,CAAC,WAAW;QAC/B,aAAa,EAAE,KAAK,CAAC,YAAY;KAClC,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,CAAC,KAAK,UAAU,0BAA0B,CAC9C,KAAmE;IAEnE,IAAI,KAAK,CAAC,KAAK,CAAC,YAAY,KAAK,SAAS,EAAE,CAAC;QAC3C,MAAM,IAAI,2BAA2B,CACnC,kCAAkC,KAAK,CAAC,WAAW,mDAAmD;cACpG,gGAAgG;cAChG,mFAAmF,CACtF,CAAC;IACJ,CAAC;IACD,MAAM,OAAO,GAAG,MAAM,mBAAmB,CAAC,KAAK,EAAE;QAC/C,UAAU,EAAE,eAAe;QAC3B,aAAa,EAAE,KAAK,CAAC,KAAK,CAAC,YAAY;KACxC,CAAC,CAAC;IACH,OAAO;QACL,GAAG,OAAO;QACV,YAAY,EAAE,OAAO,CAAC,YAAY,IAAI,KAAK,CAAC,KAAK,CAAC,YAAY;QAC9D,+FAA+F;QAC/F,iEAAiE;QACjE,UAAU,EAAE,OAAO,CAAC,UAAU,IAAI,KAAK,CAAC,KAAK,CAAC,UAAU;QACxD,aAAa,EAAE,OAAO,CAAC,aAAa,IAAI,KAAK,CAAC,KAAK,CAAC,aAAa;KAClE,CAAC;AACJ,CAAC;AAED,KAAK,UAAU,mBAAmB,CAChC,KAAyB,EACzB,UAA4C;IAE5C,MAAM,QAAQ,GAAG,2BAA2B,CAC1C,KAAK,CAAC,MAAM,CAAC,QAAQ,EACrB,KAAK,CAAC,oBAAoB,IAAI,EAAE,EAChC,KAAK,CAAC,WAAW,CAClB,CAAC;IAEF,MAAM,IAAI,GAAG,IAAI,eAAe,CAAC;QAC/B,GAAG,UAAU;QACb,SAAS,EAAE,KAAK,CAAC,QAAQ;QACzB,aAAa,EAAE,KAAK,CAAC,YAAY;KAClC,CAAC,CAAC;IAEH,MAAM,OAAO,GAAG,KAAK,CAAC,SAAS,IAAI,KAAK,CAAC;IACzC,IAAI,QAAkB,CAAC;IACvB,IAAI,CAAC;QACH,QAAQ,GAAG,MAAM,OAAO,CAAC,QAAQ,EAAE;YACjC,MAAM,EAAE,MAAM;YACd,OAAO,EAAE;gBACP,cAAc,EAAE,mCAAmC;gBACnD,qFAAqF;gBACrF,8DAA8D;gBAC9D,MAAM,EAAE,kBAAkB;aAC3B;YACD,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE;SACtB,CAAC,CAAC;IACL,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,IAAI,2BAA2B,CACnC,oDAAoD,KAAK,CAAC,WAAW,QAAQ,QAAQ,IAAI;cACvF,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,2BAA2B,GAAG,CAC7E,CAAC;IACJ,CAAC;IAED,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;IACnC,IAAI,OAA8B,CAAC;IACnC,IAAI,CAAC;QACH,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAA0B,CAAC;IACtD,CAAC;IAAC,MAAM,CAAC;QACP,MAAM,IAAI,2BAA2B,CACnC,aAAa,KAAK,CAAC,WAAW,4DAA4D,QAAQ,CAAC,MAAM,KAAK;cAC5G,2FAA2F,CAC9F,CAAC;IACJ,CAAC;IAED,gGAAgG;IAChG,6FAA6F;IAC7F,8FAA8F;IAC9F,IAAI,OAAO,OAAO,CAAC,KAAK,KAAK,QAAQ,EAAE,CAAC;QACtC,MAAM,IAAI,2BAA2B,CACnC,aAAa,KAAK,CAAC,WAAW,iCAAiC,OAAO,CAAC,KAAK,EAAE;cAC5E,GAAG,OAAO,OAAO,CAAC,iBAAiB,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,OAAO,CAAC,iBAAiB,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG;QAC9F,2FAA2F;QAC3F,0DAA0D;QAC1D,OAAO,CAAC,KAAK,CACd,CAAC;IACJ,CAAC;IACD,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;QACjB,MAAM,IAAI,2BAA2B,CACnC,aAAa,KAAK,CAAC,WAAW,mBAAmB,QAAQ,CAAC,MAAM,4CAA4C,CAC7G,CAAC;IACJ,CAAC;IACD,IAAI,OAAO,OAAO,CAAC,YAAY,KAAK,QAAQ,IAAI,OAAO,CAAC,YAAY,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAClF,MAAM,IAAI,2BAA2B,CACnC,aAAa,KAAK,CAAC,WAAW,yDAAyD;cACrF,mFAAmF,CACtF,CAAC;IACJ,CAAC;IAED,OAAO;QACL,IAAI,EAAE,4BAA4B,CAAC,YAAY;QAC/C,WAAW,EAAE,OAAO,CAAC,YAAY;QACjC,YAAY,EAAE,OAAO,OAAO,CAAC,aAAa,KAAK,QAAQ,IAAI,OAAO,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC;YACzF,CAAC,CAAC,OAAO,CAAC,aAAa;YACvB,CAAC,CAAC,SAAS;QACb,SAAS,EAAE,OAAO,OAAO,CAAC,UAAU,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,UAAU,CAAC;YACtF,CAAC,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,CAAC,WAAW,EAAE;YAChE,CAAC,CAAC,SAAS;QACb,gGAAgG;QAChG,4FAA4F;QAC5F,iFAAiF;QACjF,aAAa,EAAE,OAAO,OAAO,CAAC,KAAK,KAAK,QAAQ,IAAI,OAAO,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC;YAC1E,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;YAChE,CAAC,CAAC,SAAS;KACd,CAAC;AACJ,CAAC","sourcesContent":["/**\n * The OAuth2 authorization-code exchange, as three pure-ish functions.\n *\n * This is the half of the connect flow that has no HTTP route, no session and no database: build the\n * URL a person is sent to, turn the code they come back with into a grant, and renew a grant that is\n * about to expire. The route, the state record and the store are a thin shell around it.\n *\n * Written as functions over an explicit contract rather than as a service with injected collaborators\n * for one reason: every interesting failure here is a WRONG STRING — a placeholder that was never\n * resolved, a scope set that silently shrank, a redirect URI that does not match the one registered.\n * Those are answerable by a unit test only if the inputs are arguments, and they are the failures\n * that reach a person as \"the vendor says no\" with nothing local to look at.\n *\n * ## What this deliberately does NOT do\n *\n * It does not store anything, does not read a credential, and does not decide WHO may connect. The\n * connection target (whose account is being connected) and its admissibility are decided before this\n * is reached, by the same two gates every other credential path goes through.\n *\n * assurance-control: WILDO.IDENTITY.DELEGATED_AUTHORIZATION — the authorization exchange by which a\n * principal grants this application access to a third party on their behalf.\n */\n\nimport { createHash, randomBytes, timingSafeEqual } from 'node:crypto';\n\nimport type { ProviderRestOAuth2 } from '@wildo-ai/external-connectors-models';\nimport { ProviderStoredCredentialKind, type ProviderOAuth2Grant } from '@wildo-ai/saas-models';\n\n/** Raised when an exchange cannot be built or completed. Never carries a token or a client secret. */\nexport class ProviderOAuth2ExchangeError extends Error {\n /**\n * The vendor's own OAuth2 error code, when the failure was one the vendor NAMED.\n *\n * Carried structurally rather than only inside the message, because one caller has to act on it\n * differently from every other failure: a grant the vendor has permanently rejected must stop\n * presenting itself as a working connection, while a token endpoint that was merely unreachable\n * must not. Both arrive here as the same class, and a message substring is not something to branch\n * a person's account state on.\n *\n * Absent for transport failures, unparseable bodies and bare HTTP statuses — cases where the\n * vendor said nothing about the grant, and where assuming anything about it would be a guess.\n */\n public readonly oauth2ErrorCode?: string;\n\n constructor(message: string, oauth2ErrorCode?: string) {\n super(message);\n this.name = 'ProviderOAuth2ExchangeError';\n this.oauth2ErrorCode = oauth2ErrorCode;\n }\n}\n\n/**\n * Is this failure the vendor saying the grant itself is finished?\n *\n * TRUE for exactly one code. `invalid_grant` is defined as an authorization grant or refresh token\n * that is invalid, expired, revoked, or was issued to another client — every one of which is\n * permanent for THIS connection and none of which a retry improves.\n * spec-cite: RFC 6749 §5.2 (invalid_grant).\n *\n * Deliberately NOT `invalid_client`, and that exclusion is the substantive half. `invalid_client`\n * means the APPLICATION's own registration was rejected — a wrong client secret, a deleted vendor\n * app — which is an operator's problem affecting every connection at once. Treating it as a dead\n * grant would mark every person's account invalid and invite them all to reconnect, which cannot\n * work and would blame them for a misconfiguration they cannot see.\n *\n * Also FALSE for every failure the vendor did not name: a transport error, a non-JSON body, a bare\n * 500. A vendor that was unreachable has said nothing about the grant, and a connection must not be\n * retired on our inability to ask.\n */\nexport function providerOAuth2GrantWasPermanentlyRejected(error: unknown): boolean {\n return error instanceof ProviderOAuth2ExchangeError && error.oauth2ErrorCode === 'invalid_grant';\n}\n\n/**\n * The PKCE pair for one authorization attempt.\n *\n * PKCE is applied to EVERY exchange, including confidential-client ones that hold a secret, and that\n * is a deliberate default rather than a requirement of the grant type. It costs one hash and it\n * closes authorization-code interception, which is reachable here because the code arrives on a\n * redirect through the person's own browser — a channel this application does not control.\n * spec-cite: RFC 7636 §4.1–4.2 (code_verifier, code_challenge, S256).\n */\nexport interface ProviderOAuth2Pkce {\n readonly verifier: string;\n readonly challenge: string;\n readonly method: 'S256';\n}\n\nexport function createProviderOAuth2Pkce(): ProviderOAuth2Pkce {\n // 32 bytes base64url is 43 characters — the minimum the specification allows for a verifier, and\n // the length every major vendor's documentation uses.\n // spec-cite: RFC 7636 §4.1 (code_verifier: 43–128 characters).\n const verifier = randomBytes(32).toString('base64url');\n return {\n verifier,\n challenge: createHash('sha256').update(verifier).digest('base64url'),\n method: 'S256',\n };\n}\n\n/**\n * Compare two opaque values in constant time.\n *\n * Used for the `state` echo. A plain `===` leaks the position of the first differing byte through\n * timing, and `state` is the CSRF defence for the whole flow: an attacker who can guess it can graft\n * their own authorization code onto somebody else's connect attempt.\n */\nexport function providerOAuth2ValuesMatch(left: string, right: string): boolean {\n const a = Buffer.from(left, 'utf8');\n const b = Buffer.from(right, 'utf8');\n if (a.length !== b.length) return false;\n return timingSafeEqual(a, b);\n}\n\n/** A fresh, unguessable `state` for one authorization attempt. */\nexport function createProviderOAuth2State(): string {\n return randomBytes(32).toString('base64url');\n}\n\n/**\n * Resolve the `{placeholder}` holes an endpoint carries from the connection's own parameters.\n *\n * REFUSES on a missing value rather than leaving the brace in place. A URL still carrying\n * `{tenantId}` is not a URL: it would be sent to the person's browser, fail to resolve as a\n * hostname, and present as \"the vendor is down\" — a very long way from \"nobody asked which\n * directory\". 21 of the 96 vendors that recovered both endpoints are in this population.\n */\nexport function resolveEndpointPlaceholders(\n url: string,\n connectionParameters: Readonly<Record<string, string>>,\n providerRef: string,\n): string {\n return url.replace(/\\{([A-Za-z_][A-Za-z0-9_]*)\\}/g, (_match, name: string) => {\n const value = connectionParameters[name];\n if (value === undefined || value === '') {\n throw new ProviderOAuth2ExchangeError(\n `Provider '${providerRef}' needs a value for '${name}' before its OAuth2 endpoints are usable — `\n + `'${url}' still carries the placeholder. This is a fact about the ACCOUNT being connected `\n + '(which cloud, which directory, which region), so it is asked for at connect time and is not '\n + 'application configuration.',\n );\n }\n return encodeURIComponent(value);\n });\n}\n\nexport interface BuildAuthorizeUrlInput {\n readonly oauth2: ProviderRestOAuth2;\n readonly providerRef: string;\n readonly clientId: string;\n /** Where the vendor sends the person back. Must be byte-identical to what is registered there. */\n readonly redirectUri: string;\n readonly state: string;\n readonly pkce: ProviderOAuth2Pkce;\n /** Values for the endpoints' `{placeholders}`, supplied by whoever is connecting. */\n readonly connectionParameters?: Readonly<Record<string, string>>;\n /**\n * Scopes to request. Falls back to the vendor's own catalogue-declared set.\n *\n * Overridable because the catalogue's set is what the SOURCE asked for across every action it\n * described, which is routinely broader than one application needs — and an over-broad consent\n * screen is a thing a person refuses.\n */\n readonly scopes?: readonly string[];\n}\n\n/**\n * The URL a person is sent to in order to grant access.\n *\n * Query parameters are MERGED into whatever the vendor's own authorize URL already carries rather\n * than appended blindly. That is not tidiness: Slack's catalogue-declared authorize URL arrives with\n * a `?user_scope=…` query string baked in, so appending `?client_id=…` would produce a URL with two\n * `?` and a vendor that rejects it. One vendor of 129 does this today, which is exactly the kind of\n * single-instance shape that a naive concatenation gets wrong forever.\n */\nexport function buildProviderOAuth2AuthorizeUrl(input: BuildAuthorizeUrlInput): string {\n const resolved = resolveEndpointPlaceholders(\n input.oauth2.authorizeUrl,\n input.connectionParameters ?? {},\n input.providerRef,\n );\n\n let url: URL;\n try {\n url = new URL(resolved);\n } catch {\n throw new ProviderOAuth2ExchangeError(\n `Provider '${input.providerRef}' declares an authorize URL that is not a URL: '${resolved}'. `\n + 'Correct it in the provider\\'s authored supplement rather than at the call site.',\n );\n }\n\n const scopes = input.scopes ?? input.oauth2.scopes ?? [];\n url.searchParams.set('response_type', 'code');\n url.searchParams.set('client_id', input.clientId);\n url.searchParams.set('redirect_uri', input.redirectUri);\n url.searchParams.set('state', input.state);\n url.searchParams.set('code_challenge', input.pkce.challenge);\n url.searchParams.set('code_challenge_method', input.pkce.method);\n if (scopes.length > 0) {\n // Space-delimited, which is the specification's encoding; `URLSearchParams` percent-encodes the\n // spaces. Vendors that want commas are a per-vendor deviation and belong in an authored\n // supplement, not in a guess here.\n // spec-cite: RFC 6749 §3.3 (scope is expressed as a list of space-delimited strings).\n url.searchParams.set('scope', scopes.join(' '));\n }\n return url.toString();\n}\n\n/** What a token endpoint gives back, before it becomes a stored grant. */\ninterface TokenEndpointResponse {\n readonly access_token?: unknown;\n readonly refresh_token?: unknown;\n readonly expires_in?: unknown;\n readonly scope?: unknown;\n readonly token_type?: unknown;\n readonly error?: unknown;\n readonly error_description?: unknown;\n}\n\nexport interface TokenExchangeInput {\n readonly oauth2: ProviderRestOAuth2;\n readonly providerRef: string;\n readonly clientId: string;\n readonly clientSecret: string;\n readonly connectionParameters?: Readonly<Record<string, string>>;\n readonly fetchImpl?: typeof fetch;\n}\n\n/**\n * Turn the authorization code into a grant.\n *\n * The client credentials go in the BODY (`client_secret_post`) rather than a Basic header. Both are\n * specified and a server must support Basic, but the body form is what every major vendor's own\n * documentation shows and what their sandboxes accept; a vendor that requires Basic is a per-vendor\n * deviation for an authored supplement.\n * spec-cite: RFC 6749 §2.3.1 (client_secret_basic is required of servers; the body form is permitted).\n */\nexport async function exchangeProviderOAuth2Code(\n input: TokenExchangeInput & { readonly code: string; readonly redirectUri: string; readonly pkceVerifier: string },\n): Promise<ProviderOAuth2Grant> {\n return postToTokenEndpoint(input, {\n grant_type: 'authorization_code',\n code: input.code,\n redirect_uri: input.redirectUri,\n code_verifier: input.pkceVerifier,\n });\n}\n\n/**\n * Renew a grant that is expiring.\n *\n * Carries the PREVIOUS grant's refresh token forward when the vendor does not return a new one.\n * That is the difference between a connection that survives and one that dies on its second\n * refresh: some vendors rotate the refresh token on every use and return the replacement, and\n * others return only an access token and expect the original refresh token to be reused. Dropping\n * it in the second case leaves a grant that cannot be refreshed again, and the failure arrives an\n * hour later with nothing pointing at this function.\n * spec-cite: RFC 6749 §6 (the authorization server MAY issue a new refresh token).\n */\nexport async function refreshProviderOAuth2Grant(\n input: TokenExchangeInput & { readonly grant: ProviderOAuth2Grant },\n): Promise<ProviderOAuth2Grant> {\n if (input.grant.refreshToken === undefined) {\n throw new ProviderOAuth2ExchangeError(\n `The stored grant for provider '${input.providerRef}' has no refresh token, so it cannot be renewed. `\n + 'Reconnect the account. This is not a fault: several vendors issue non-expiring tokens with no '\n + 'refresh, and a grant that reaches here has both an expiry and no way to renew it.',\n );\n }\n const renewed = await postToTokenEndpoint(input, {\n grant_type: 'refresh_token',\n refresh_token: input.grant.refreshToken,\n });\n return {\n ...renewed,\n refreshToken: renewed.refreshToken ?? input.grant.refreshToken,\n // The vendor need not restate the account or the scopes on a refresh; losing them would make a\n // renewed connection describe itself less well than a fresh one.\n accountRef: renewed.accountRef ?? input.grant.accountRef,\n grantedScopes: renewed.grantedScopes ?? input.grant.grantedScopes,\n };\n}\n\nasync function postToTokenEndpoint(\n input: TokenExchangeInput,\n parameters: Readonly<Record<string, string>>,\n): Promise<ProviderOAuth2Grant> {\n const tokenUrl = resolveEndpointPlaceholders(\n input.oauth2.tokenUrl,\n input.connectionParameters ?? {},\n input.providerRef,\n );\n\n const body = new URLSearchParams({\n ...parameters,\n client_id: input.clientId,\n client_secret: input.clientSecret,\n });\n\n const doFetch = input.fetchImpl ?? fetch;\n let response: Response;\n try {\n response = await doFetch(tokenUrl, {\n method: 'POST',\n headers: {\n 'content-type': 'application/x-www-form-urlencoded',\n // Several vendors default to form-encoded responses without it, and one that does is\n // indistinguishable from a malformed body at the parse below.\n accept: 'application/json',\n },\n body: body.toString(),\n });\n } catch (error) {\n throw new ProviderOAuth2ExchangeError(\n `Could not reach the token endpoint for provider '${input.providerRef}' at ${tokenUrl}: `\n + `${error instanceof Error ? error.message : 'unknown transport failure'}.`,\n );\n }\n\n const text = await response.text();\n let payload: TokenEndpointResponse;\n try {\n payload = JSON.parse(text) as TokenEndpointResponse;\n } catch {\n throw new ProviderOAuth2ExchangeError(\n `Provider '${input.providerRef}' answered its token endpoint with a non-JSON body (HTTP ${response.status}). `\n + 'The body is not reproduced here because a token endpoint\\'s response carries credentials.',\n );\n }\n\n // An OAuth2 error can arrive with HTTP 200 — several vendors do this, Slack among them — so the\n // status is not the authority on whether the exchange succeeded. Checking only `response.ok`\n // would treat `{\"ok\":false,\"error\":\"invalid_code\"}` as a grant and store a row with no token.\n if (typeof payload.error === 'string') {\n throw new ProviderOAuth2ExchangeError(\n `Provider '${input.providerRef}' refused the token exchange: ${payload.error}`\n + `${typeof payload.error_description === 'string' ? ` — ${payload.error_description}` : ''}.`,\n // The one failure the vendor NAMED. Carried structurally so a caller can tell a dead grant\n // from an unreachable endpoint without matching on prose.\n payload.error,\n );\n }\n if (!response.ok) {\n throw new ProviderOAuth2ExchangeError(\n `Provider '${input.providerRef}' answered HTTP ${response.status} to the token exchange with no error code.`,\n );\n }\n if (typeof payload.access_token !== 'string' || payload.access_token.length === 0) {\n throw new ProviderOAuth2ExchangeError(\n `Provider '${input.providerRef}' answered the token exchange without an access token. `\n + 'Storing the response would create a connection that cannot authenticate anything.',\n );\n }\n\n return {\n kind: ProviderStoredCredentialKind.OAUTH2_GRANT,\n accessToken: payload.access_token,\n refreshToken: typeof payload.refresh_token === 'string' && payload.refresh_token.length > 0\n ? payload.refresh_token\n : undefined,\n expiresAt: typeof payload.expires_in === 'number' && Number.isFinite(payload.expires_in)\n ? new Date(Date.now() + payload.expires_in * 1000).toISOString()\n : undefined,\n // What the vendor actually GRANTED, which is not always what was asked for. Space-delimited per\n // the specification; a vendor returning a comma-separated string is a per-vendor deviation.\n // spec-cite: RFC 6749 §5.1 (scope, present if different from the one requested).\n grantedScopes: typeof payload.scope === 'string' && payload.scope.length > 0\n ? payload.scope.split(/\\s+/).filter((scope) => scope.length > 0)\n : undefined,\n };\n}\n"]}
@@ -0,0 +1,111 @@
1
+ /**
2
+ * The record of ONE in-flight authorization attempt, from the redirect out to the callback back.
3
+ *
4
+ * ## Why this is ephemeral state and not a resource
5
+ *
6
+ * It exists for the seconds a person spends on a vendor's consent screen and is worthless
7
+ * afterwards. Deleting the whole store costs those people one retry and nothing else — the test
8
+ * `one-source-of-truth.md` applies: losing it costs TIME, never TRUTH, so it is a cache and must not
9
+ * become a table. A resource would also mean three migrations, a retention policy and an erasure
10
+ * question, for data whose correct lifetime is ten minutes.
11
+ *
12
+ * ## Single-use BY CONSTRUCTION, not by a flag
13
+ *
14
+ * Consumption is `GETDEL` — one round trip that returns the record and removes it atomically. So a
15
+ * replayed callback finds nothing, and there is no window in which two concurrent callbacks both
16
+ * read a record and both proceed. A `consumed: true` flag would have that window, and the attack it
17
+ * opens is real: an authorization code delivered twice is how a stolen code gets grafted onto a
18
+ * legitimate attempt.
19
+ *
20
+ * ## What it holds, and what it must never hold
21
+ *
22
+ * It holds the PKCE verifier, which is a secret for the length of the flow, and the connection
23
+ * target — whose account is being connected. It holds no token, because none exists yet.
24
+ *
25
+ * The TARGET is here rather than in the callback's query string for the reason the whole `state`
26
+ * mechanism exists: everything that comes back from the vendor arrives through the person's own
27
+ * browser and is therefore attacker-controllable. A callback that read the owner from its own URL
28
+ * would let somebody choose whose account a grant is stored against.
29
+ *
30
+ * assurance-control: WILDO.IDENTITY.DELEGATED_AUTHORIZATION — the authorization attempt is bound to
31
+ * the principal who started it.
32
+ */
33
+ import type { ExternalProvider_ConnectionTarget } from '@wildo-ai/external-connectors-models';
34
+ import type { RedisService } from '../../../databases/services/redis.service';
35
+ import type { LoggerService } from '../../../monitoring/logger/services/logger.service';
36
+ /**
37
+ * Ten minutes.
38
+ *
39
+ * Long enough for somebody to read a consent screen, find the right account and sign in to the
40
+ * vendor if they were signed out. Short enough that an abandoned attempt — and the PKCE verifier
41
+ * inside it — does not sit in the cache for a day. Every major vendor's own authorization codes
42
+ * expire in this range, so a longer window would keep a record whose code is already dead.
43
+ */
44
+ export declare const PROVIDER_OAUTH2_PENDING_TTL_SECONDS = 600;
45
+ export interface ProviderOAuth2PendingAuthorization {
46
+ /** Which provider is being connected. */
47
+ readonly providerRef: string;
48
+ /** The slot in the provider's secrets contract this grant will satisfy. */
49
+ readonly secretSlug: string;
50
+ /** WHOSE account is being connected. Never read back from the callback's URL. */
51
+ readonly target: ExternalProvider_ConnectionTarget;
52
+ /** The PKCE verifier, presented at the token exchange. Secret for the life of the record. */
53
+ readonly pkceVerifier: string;
54
+ /** The redirect URI sent at authorize; re-sent at the exchange and verified by the vendor. */
55
+ readonly redirectUri: string;
56
+ /** Values for the endpoints' `{placeholders}`, needed again to build the token URL. */
57
+ readonly connectionParameters?: Readonly<Record<string, string>>;
58
+ /**
59
+ * Who started the attempt, for the audit trail and for the callback's own authorization check.
60
+ *
61
+ * The callback re-checks that the person completing the flow is the person who began it. Without
62
+ * it, somebody who obtained a valid `state` could complete a connection while signed in as
63
+ * themselves and have the grant stored against the original initiator's target.
64
+ */
65
+ readonly initiatedByUserId?: string;
66
+ /**
67
+ * WHICH frontend the person came from, so the callback can send them back to it.
68
+ *
69
+ * Captured at START and carried here because the two legs reach the backend differently: the start
70
+ * leg is a FETCH from the application and carries Wildo's own headers, while the callback is a
71
+ * BROWSER NAVIGATION arriving from the vendor with none of them. Resolving the return URL at the
72
+ * callback from a header would therefore resolve nothing, and answering the browser with JSON —
73
+ * which this flow did until the omission was noticed — shows a person a raw payload instead of
74
+ * their settings screen.
75
+ *
76
+ * Optional because a caller that omits the header still gets a working CONNECTION; it only loses
77
+ * the redirect home, which is a worse experience rather than a broken one.
78
+ */
79
+ readonly frontendServiceName?: string;
80
+ /** When it was started, as an ISO instant — so an audit event can state how long consent took. */
81
+ readonly startedAt: string;
82
+ }
83
+ export declare class ProviderOAuth2PendingAuthorizationBackendService {
84
+ private readonly redis;
85
+ private readonly logger;
86
+ constructor(redis: RedisService, logger: LoggerService);
87
+ /**
88
+ * Remember one attempt against its `state`.
89
+ *
90
+ * The `state` IS the key. It is 32 random bytes, so it is unguessable, and using it directly means
91
+ * there is no second identifier that could get out of step with the one the vendor echoes back.
92
+ */
93
+ remember(state: string, pending: ProviderOAuth2PendingAuthorization): Promise<void>;
94
+ /**
95
+ * Take the attempt, removing it in the same round trip.
96
+ *
97
+ * `null` covers three situations a caller must treat identically — expired, already used, or never
98
+ * existed — and they MUST NOT be distinguished in any answer that reaches a browser. Telling an
99
+ * attacker that a `state` was valid but expired confirms they hold a real one.
100
+ */
101
+ consume(state: string): Promise<ProviderOAuth2PendingAuthorization | null>;
102
+ /**
103
+ * Namespaced, so nothing else in the cache can be addressed by supplying a crafted `state`.
104
+ *
105
+ * The state is used verbatim rather than hashed: it is already high-entropy and opaque, and
106
+ * hashing would only obscure which record a diagnostic is about while protecting nothing that the
107
+ * TTL does not already bound.
108
+ */
109
+ private keyFor;
110
+ }
111
+ //# sourceMappingURL=provider-oauth2-pending-authorization.backend.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provider-oauth2-pending-authorization.backend.service.d.ts","sourceRoot":"","sources":["../../../../../../src/security/connected-accounts/services/provider-oauth2-pending-authorization.backend.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAGH,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,sCAAsC,CAAC;AAG9F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qDAAqD,CAAC;AACxF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8DAA8D,CAAC;AAElG;;;;;;;GAOG;AACH,eAAO,MAAM,mCAAmC,MAAM,CAAC;AAIvD,MAAM,WAAW,kCAAkC;IACjD,yCAAyC;IACzC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,2EAA2E;IAC3E,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,iFAAiF;IACjF,QAAQ,CAAC,MAAM,EAAE,iCAAiC,CAAC;IACnD,6FAA6F;IAC7F,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,8FAA8F;IAC9F,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,uFAAuF;IACvF,QAAQ,CAAC,oBAAoB,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACjE;;;;;;OAMG;IACH,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IACpC;;;;;;;;;;;;OAYG;IACH,QAAQ,CAAC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IACtC,kGAAkG;IAClG,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B;AAED,qBACa,gDAAgD;IAEhB,OAAO,CAAC,QAAQ,CAAC,KAAK;IAC5B,OAAO,CAAC,QAAQ,CAAC,MAAM;gBADA,KAAK,EAAE,YAAY,EACzB,MAAM,EAAE,aAAa;IAG3E;;;;;OAKG;IACU,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,kCAAkC,GAAG,OAAO,CAAC,IAAI,CAAC;IAUhG;;;;;;OAMG;IACU,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,kCAAkC,GAAG,IAAI,CAAC;IAIvF;;;;;;OAMG;IACH,OAAO,CAAC,MAAM;CAGf"}
@@ -0,0 +1,107 @@
1
+ /**
2
+ * The record of ONE in-flight authorization attempt, from the redirect out to the callback back.
3
+ *
4
+ * ## Why this is ephemeral state and not a resource
5
+ *
6
+ * It exists for the seconds a person spends on a vendor's consent screen and is worthless
7
+ * afterwards. Deleting the whole store costs those people one retry and nothing else — the test
8
+ * `one-source-of-truth.md` applies: losing it costs TIME, never TRUTH, so it is a cache and must not
9
+ * become a table. A resource would also mean three migrations, a retention policy and an erasure
10
+ * question, for data whose correct lifetime is ten minutes.
11
+ *
12
+ * ## Single-use BY CONSTRUCTION, not by a flag
13
+ *
14
+ * Consumption is `GETDEL` — one round trip that returns the record and removes it atomically. So a
15
+ * replayed callback finds nothing, and there is no window in which two concurrent callbacks both
16
+ * read a record and both proceed. A `consumed: true` flag would have that window, and the attack it
17
+ * opens is real: an authorization code delivered twice is how a stolen code gets grafted onto a
18
+ * legitimate attempt.
19
+ *
20
+ * ## What it holds, and what it must never hold
21
+ *
22
+ * It holds the PKCE verifier, which is a secret for the length of the flow, and the connection
23
+ * target — whose account is being connected. It holds no token, because none exists yet.
24
+ *
25
+ * The TARGET is here rather than in the callback's query string for the reason the whole `state`
26
+ * mechanism exists: everything that comes back from the vendor arrives through the person's own
27
+ * browser and is therefore attacker-controllable. A callback that read the owner from its own URL
28
+ * would let somebody choose whose account a grant is stored against.
29
+ *
30
+ * assurance-control: WILDO.IDENTITY.DELEGATED_AUTHORIZATION — the authorization attempt is bound to
31
+ * the principal who started it.
32
+ */
33
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
34
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
35
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
36
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
37
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
38
+ };
39
+ var __metadata = (this && this.__metadata) || function (k, v) {
40
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
41
+ };
42
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
43
+ return function (target, key) { decorator(target, key, paramIndex); }
44
+ };
45
+ import { inject, injectable } from 'inversify';
46
+ import { SAAS_SERVICE_TYPES } from '../../../inject/models/service-types.js';
47
+ /**
48
+ * Ten minutes.
49
+ *
50
+ * Long enough for somebody to read a consent screen, find the right account and sign in to the
51
+ * vendor if they were signed out. Short enough that an abandoned attempt — and the PKCE verifier
52
+ * inside it — does not sit in the cache for a day. Every major vendor's own authorization codes
53
+ * expire in this range, so a longer window would keep a record whose code is already dead.
54
+ */
55
+ export const PROVIDER_OAUTH2_PENDING_TTL_SECONDS = 600;
56
+ const KEY_PREFIX = 'oauth2-connect';
57
+ let ProviderOAuth2PendingAuthorizationBackendService = class ProviderOAuth2PendingAuthorizationBackendService {
58
+ redis;
59
+ logger;
60
+ constructor(redis, logger) {
61
+ this.redis = redis;
62
+ this.logger = logger;
63
+ }
64
+ /**
65
+ * Remember one attempt against its `state`.
66
+ *
67
+ * The `state` IS the key. It is 32 random bytes, so it is unguessable, and using it directly means
68
+ * there is no second identifier that could get out of step with the one the vendor echoes back.
69
+ */
70
+ async remember(state, pending) {
71
+ await this.redis.set(this.keyFor(state), pending, { ttl: PROVIDER_OAUTH2_PENDING_TTL_SECONDS });
72
+ this.logger.debug?.('[oauth2-connect] authorization attempt recorded', {
73
+ providerRef: pending.providerRef,
74
+ ownerScope: pending.target.ownerScope,
75
+ // Never the state and never the verifier: both are secrets for the life of the record, and a
76
+ // debug log is the one place a secret most often escapes.
77
+ });
78
+ }
79
+ /**
80
+ * Take the attempt, removing it in the same round trip.
81
+ *
82
+ * `null` covers three situations a caller must treat identically — expired, already used, or never
83
+ * existed — and they MUST NOT be distinguished in any answer that reaches a browser. Telling an
84
+ * attacker that a `state` was valid but expired confirms they hold a real one.
85
+ */
86
+ async consume(state) {
87
+ return this.redis.getDel(this.keyFor(state));
88
+ }
89
+ /**
90
+ * Namespaced, so nothing else in the cache can be addressed by supplying a crafted `state`.
91
+ *
92
+ * The state is used verbatim rather than hashed: it is already high-entropy and opaque, and
93
+ * hashing would only obscure which record a diagnostic is about while protecting nothing that the
94
+ * TTL does not already bound.
95
+ */
96
+ keyFor(state) {
97
+ return `${KEY_PREFIX}:${state}`;
98
+ }
99
+ };
100
+ ProviderOAuth2PendingAuthorizationBackendService = __decorate([
101
+ injectable(),
102
+ __param(0, inject(SAAS_SERVICE_TYPES.RedisService)),
103
+ __param(1, inject(SAAS_SERVICE_TYPES.Logger)),
104
+ __metadata("design:paramtypes", [Function, Function])
105
+ ], ProviderOAuth2PendingAuthorizationBackendService);
106
+ export { ProviderOAuth2PendingAuthorizationBackendService };
107
+ //# sourceMappingURL=provider-oauth2-pending-authorization.backend.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provider-oauth2-pending-authorization.backend.service.js","sourceRoot":"","sources":["../../../../../../src/security/connected-accounts/services/provider-oauth2-pending-authorization.backend.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;;;;;;;;;;;;;AAEH,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAG/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AAIpF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,mCAAmC,GAAG,GAAG,CAAC;AAEvD,MAAM,UAAU,GAAG,gBAAgB,CAAC;AA0C7B,IAAM,gDAAgD,GAAtD,MAAM,gDAAgD;IAEC;IACN;IAFtD,YAC4D,KAAmB,EACzB,MAAqB;QADf,UAAK,GAAL,KAAK,CAAc;QACzB,WAAM,GAAN,MAAM,CAAe;IACxE,CAAC;IAEJ;;;;;OAKG;IACI,KAAK,CAAC,QAAQ,CAAC,KAAa,EAAE,OAA2C;QAC9E,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,OAAO,EAAE,EAAE,GAAG,EAAE,mCAAmC,EAAE,CAAC,CAAC;QAChG,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,iDAAiD,EAAE;YACrE,WAAW,EAAE,OAAO,CAAC,WAAW;YAChC,UAAU,EAAE,OAAO,CAAC,MAAM,CAAC,UAAU;YACrC,6FAA6F;YAC7F,0DAA0D;SAC3D,CAAC,CAAC;IACL,CAAC;IAED;;;;;;OAMG;IACI,KAAK,CAAC,OAAO,CAAC,KAAa;QAChC,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAqC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;IACnF,CAAC;IAED;;;;;;OAMG;IACK,MAAM,CAAC,KAAa;QAC1B,OAAO,GAAG,UAAU,IAAI,KAAK,EAAE,CAAC;IAClC,CAAC;CACF,CAAA;AA3CY,gDAAgD;IAD5D,UAAU,EAAE;IAGR,WAAA,MAAM,CAAC,kBAAkB,CAAC,YAAY,CAAC,CAAA;IACvC,WAAA,MAAM,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAA;;GAHzB,gDAAgD,CA2C5D","sourcesContent":["/**\n * The record of ONE in-flight authorization attempt, from the redirect out to the callback back.\n *\n * ## Why this is ephemeral state and not a resource\n *\n * It exists for the seconds a person spends on a vendor's consent screen and is worthless\n * afterwards. Deleting the whole store costs those people one retry and nothing else — the test\n * `one-source-of-truth.md` applies: losing it costs TIME, never TRUTH, so it is a cache and must not\n * become a table. A resource would also mean three migrations, a retention policy and an erasure\n * question, for data whose correct lifetime is ten minutes.\n *\n * ## Single-use BY CONSTRUCTION, not by a flag\n *\n * Consumption is `GETDEL` — one round trip that returns the record and removes it atomically. So a\n * replayed callback finds nothing, and there is no window in which two concurrent callbacks both\n * read a record and both proceed. A `consumed: true` flag would have that window, and the attack it\n * opens is real: an authorization code delivered twice is how a stolen code gets grafted onto a\n * legitimate attempt.\n *\n * ## What it holds, and what it must never hold\n *\n * It holds the PKCE verifier, which is a secret for the length of the flow, and the connection\n * target — whose account is being connected. It holds no token, because none exists yet.\n *\n * The TARGET is here rather than in the callback's query string for the reason the whole `state`\n * mechanism exists: everything that comes back from the vendor arrives through the person's own\n * browser and is therefore attacker-controllable. A callback that read the owner from its own URL\n * would let somebody choose whose account a grant is stored against.\n *\n * assurance-control: WILDO.IDENTITY.DELEGATED_AUTHORIZATION — the authorization attempt is bound to\n * the principal who started it.\n */\n\nimport { inject, injectable } from 'inversify';\nimport type { ExternalProvider_ConnectionTarget } from '@wildo-ai/external-connectors-models';\n\nimport { SAAS_SERVICE_TYPES } from '~wildo-backend-lib/inject/models/service-types';\nimport type { RedisService } from '~wildo-backend-lib/databases/services/redis.service';\nimport type { LoggerService } from '~wildo-backend-lib/monitoring/logger/services/logger.service';\n\n/**\n * Ten minutes.\n *\n * Long enough for somebody to read a consent screen, find the right account and sign in to the\n * vendor if they were signed out. Short enough that an abandoned attempt — and the PKCE verifier\n * inside it — does not sit in the cache for a day. Every major vendor's own authorization codes\n * expire in this range, so a longer window would keep a record whose code is already dead.\n */\nexport const PROVIDER_OAUTH2_PENDING_TTL_SECONDS = 600;\n\nconst KEY_PREFIX = 'oauth2-connect';\n\nexport interface ProviderOAuth2PendingAuthorization {\n /** Which provider is being connected. */\n readonly providerRef: string;\n /** The slot in the provider's secrets contract this grant will satisfy. */\n readonly secretSlug: string;\n /** WHOSE account is being connected. Never read back from the callback's URL. */\n readonly target: ExternalProvider_ConnectionTarget;\n /** The PKCE verifier, presented at the token exchange. Secret for the life of the record. */\n readonly pkceVerifier: string;\n /** The redirect URI sent at authorize; re-sent at the exchange and verified by the vendor. */\n readonly redirectUri: string;\n /** Values for the endpoints' `{placeholders}`, needed again to build the token URL. */\n readonly connectionParameters?: Readonly<Record<string, string>>;\n /**\n * Who started the attempt, for the audit trail and for the callback's own authorization check.\n *\n * The callback re-checks that the person completing the flow is the person who began it. Without\n * it, somebody who obtained a valid `state` could complete a connection while signed in as\n * themselves and have the grant stored against the original initiator's target.\n */\n readonly initiatedByUserId?: string;\n /**\n * WHICH frontend the person came from, so the callback can send them back to it.\n *\n * Captured at START and carried here because the two legs reach the backend differently: the start\n * leg is a FETCH from the application and carries Wildo's own headers, while the callback is a\n * BROWSER NAVIGATION arriving from the vendor with none of them. Resolving the return URL at the\n * callback from a header would therefore resolve nothing, and answering the browser with JSON —\n * which this flow did until the omission was noticed — shows a person a raw payload instead of\n * their settings screen.\n *\n * Optional because a caller that omits the header still gets a working CONNECTION; it only loses\n * the redirect home, which is a worse experience rather than a broken one.\n */\n readonly frontendServiceName?: string;\n /** When it was started, as an ISO instant — so an audit event can state how long consent took. */\n readonly startedAt: string;\n}\n\n@injectable()\nexport class ProviderOAuth2PendingAuthorizationBackendService {\n constructor(\n @inject(SAAS_SERVICE_TYPES.RedisService) private readonly redis: RedisService,\n @inject(SAAS_SERVICE_TYPES.Logger) private readonly logger: LoggerService,\n ) {}\n\n /**\n * Remember one attempt against its `state`.\n *\n * The `state` IS the key. It is 32 random bytes, so it is unguessable, and using it directly means\n * there is no second identifier that could get out of step with the one the vendor echoes back.\n */\n public async remember(state: string, pending: ProviderOAuth2PendingAuthorization): Promise<void> {\n await this.redis.set(this.keyFor(state), pending, { ttl: PROVIDER_OAUTH2_PENDING_TTL_SECONDS });\n this.logger.debug?.('[oauth2-connect] authorization attempt recorded', {\n providerRef: pending.providerRef,\n ownerScope: pending.target.ownerScope,\n // Never the state and never the verifier: both are secrets for the life of the record, and a\n // debug log is the one place a secret most often escapes.\n });\n }\n\n /**\n * Take the attempt, removing it in the same round trip.\n *\n * `null` covers three situations a caller must treat identically — expired, already used, or never\n * existed — and they MUST NOT be distinguished in any answer that reaches a browser. Telling an\n * attacker that a `state` was valid but expired confirms they hold a real one.\n */\n public async consume(state: string): Promise<ProviderOAuth2PendingAuthorization | null> {\n return this.redis.getDel<ProviderOAuth2PendingAuthorization>(this.keyFor(state));\n }\n\n /**\n * Namespaced, so nothing else in the cache can be addressed by supplying a crafted `state`.\n *\n * The state is used verbatim rather than hashed: it is already high-entropy and opaque, and\n * hashing would only obscure which record a diagnostic is about while protecting nothing that the\n * TTL does not already bound.\n */\n private keyFor(state: string): string {\n return `${KEY_PREFIX}:${state}`;\n }\n}\n"]}
@@ -0,0 +1,54 @@
1
+ /**
2
+ * The token refresher — the port implementation over the provider registry.
3
+ *
4
+ * It reads the provider's OAuth2 contract and the application's client registration, performs the
5
+ * refresh exchange, and hands the renewed grant back. It persists nothing: the store that asked owns
6
+ * the table.
7
+ *
8
+ * ## Single-flight, and why it is not an optimisation
9
+ *
10
+ * Concurrent calls for the SAME connection collapse onto one exchange. Skipping this would be a
11
+ * correctness defect, not a performance one, for vendors that ROTATE the refresh token: two
12
+ * simultaneous refreshes both present the same refresh token, the vendor issues two grants and
13
+ * invalidates the first, and whichever write lands second stores a token the vendor has already
14
+ * revoked. The connection then fails on its next call, with two successful-looking refreshes in the
15
+ * log and nothing saying which one broke it.
16
+ *
17
+ * ## What it does NOT cover, stated rather than implied
18
+ *
19
+ * The flight is IN-PROCESS. Two backend instances refreshing the same connection at the same instant
20
+ * still race, and against a rotating vendor one of them still loses. Closing that needs a
21
+ * distributed lock, which is a Redis round trip on a path that runs before every outbound call — a
22
+ * cost worth paying only once a real deployment shows the collision. The narrower in-process case is
23
+ * the common one by a wide margin, because a burst of calls for one connection almost always arrives
24
+ * at one instance.
25
+ *
26
+ * assurance-control: WILDO.IDENTITY.DELEGATED_AUTHORIZATION — delegated authority is renewed without
27
+ * a new act of consent, so the renewal is bounded by what the original grant carried.
28
+ */
29
+ import type { ProviderOAuth2Grant } from '@wildo-ai/saas-models';
30
+ import type { LoggerService } from '../../../monitoring/logger/services/logger.service';
31
+ import type { ExternalProvidersRegistryBackendService } from '../../../external-providers/services/external-providers-registry.backend.service';
32
+ import type { ProviderOAuth2RefreshRequest, ProviderOAuth2RefresherPort } from '../provider-oauth2-refresher.port';
33
+ export declare class ProviderOAuth2RefresherBackendService implements ProviderOAuth2RefresherPort {
34
+ private readonly logger;
35
+ private readonly externalProvidersRegistry;
36
+ /**
37
+ * One in-flight exchange per connection, keyed by the whole identity.
38
+ *
39
+ * Entries are removed in a `finally`, so a failed refresh does not wedge the connection — the next
40
+ * call starts a fresh attempt rather than awaiting a promise that already rejected.
41
+ */
42
+ private readonly inFlight;
43
+ constructor(logger: LoggerService, externalProvidersRegistry: ExternalProvidersRegistryBackendService);
44
+ refreshGrant(request: ProviderOAuth2RefreshRequest): Promise<ProviderOAuth2Grant>;
45
+ private performRefresh;
46
+ /**
47
+ * The whole connection identity, so two owners of the same provider never share a flight.
48
+ *
49
+ * Keying on the provider alone would make one tenant's refresh satisfy another's call and return
50
+ * the wrong account's token — the exact cross-owner substitution the resolution path refuses.
51
+ */
52
+ private flightKeyFor;
53
+ }
54
+ //# sourceMappingURL=provider-oauth2-refresher.backend.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provider-oauth2-refresher.backend.service.d.ts","sourceRoot":"","sources":["../../../../../../src/security/connected-accounts/services/provider-oauth2-refresher.backend.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAIH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAGjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8DAA8D,CAAC;AAClG,OAAO,KAAK,EAAE,uCAAuC,EAAE,MAAM,4FAA4F,CAAC;AAO1J,OAAO,KAAK,EACV,4BAA4B,EAC5B,2BAA2B,EAC5B,MAAM,mCAAmC,CAAC;AAE3C,qBACa,qCAAsC,YAAW,2BAA2B;IAUlD,OAAO,CAAC,QAAQ,CAAC,MAAM;IAE1D,OAAO,CAAC,QAAQ,CAAC,yBAAyB;IAX5C;;;;;OAKG;IACH,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAmD;gBAGtB,MAAM,EAAE,aAAa,EAExD,yBAAyB,EAAE,uCAAuC;IAGxE,YAAY,CAAC,OAAO,EAAE,4BAA4B,GAAG,OAAO,CAAC,mBAAmB,CAAC;YAkBhF,cAAc;IAoE5B;;;;;OAKG;IACH,OAAO,CAAC,YAAY;CASrB"}