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

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 (265) hide show
  1. package/dist/esm/base-classes/services/controllers/controller-resource.backend.service.d.ts +14 -3
  2. package/dist/esm/base-classes/services/controllers/controller-resource.backend.service.d.ts.map +1 -1
  3. package/dist/esm/base-classes/services/controllers/controller-resource.backend.service.js +115 -22
  4. package/dist/esm/base-classes/services/controllers/controller-resource.backend.service.js.map +1 -1
  5. package/dist/esm/base-classes/services/controllers/controllers-registry-handler.backend.service.d.ts +3 -1
  6. package/dist/esm/base-classes/services/controllers/controllers-registry-handler.backend.service.d.ts.map +1 -1
  7. package/dist/esm/base-classes/services/controllers/controllers-registry-handler.backend.service.js +8 -3
  8. package/dist/esm/base-classes/services/controllers/controllers-registry-handler.backend.service.js.map +1 -1
  9. package/dist/esm/base-classes/services/repositories/field-clearing-partition.backend.d.ts +11 -0
  10. package/dist/esm/base-classes/services/repositories/field-clearing-partition.backend.d.ts.map +1 -1
  11. package/dist/esm/base-classes/services/repositories/field-clearing-partition.backend.js +11 -2
  12. package/dist/esm/base-classes/services/repositories/field-clearing-partition.backend.js.map +1 -1
  13. package/dist/esm/base-classes/services/repositories/http-api/http-api-resource-repository.backend.service.d.ts +1 -0
  14. package/dist/esm/base-classes/services/repositories/http-api/http-api-resource-repository.backend.service.d.ts.map +1 -1
  15. package/dist/esm/base-classes/services/repositories/http-api/http-api-resource-repository.backend.service.js +6 -1
  16. package/dist/esm/base-classes/services/repositories/http-api/http-api-resource-repository.backend.service.js.map +1 -1
  17. package/dist/esm/base-classes/services/repositories/http-api/odata-query-compiler.backend.d.ts.map +1 -1
  18. package/dist/esm/base-classes/services/repositories/http-api/odata-query-compiler.backend.js +16 -0
  19. package/dist/esm/base-classes/services/repositories/http-api/odata-query-compiler.backend.js.map +1 -1
  20. package/dist/esm/base-classes/services/repositories/infrastructure-tier-contract.backend.d.ts +20 -6
  21. package/dist/esm/base-classes/services/repositories/infrastructure-tier-contract.backend.d.ts.map +1 -1
  22. package/dist/esm/base-classes/services/repositories/infrastructure-tier-contract.backend.js +88 -32
  23. package/dist/esm/base-classes/services/repositories/infrastructure-tier-contract.backend.js.map +1 -1
  24. package/dist/esm/base-classes/services/repositories/introspection/introspection-resource-repository.backend.service.d.ts +3 -1
  25. package/dist/esm/base-classes/services/repositories/introspection/introspection-resource-repository.backend.service.d.ts.map +1 -1
  26. package/dist/esm/base-classes/services/repositories/introspection/introspection-resource-repository.backend.service.js +32 -7
  27. package/dist/esm/base-classes/services/repositories/introspection/introspection-resource-repository.backend.service.js.map +1 -1
  28. package/dist/esm/base-classes/services/repositories/introspection/introspection-resource-source.backend.port.d.ts +8 -5
  29. package/dist/esm/base-classes/services/repositories/introspection/introspection-resource-source.backend.port.d.ts.map +1 -1
  30. package/dist/esm/base-classes/services/repositories/introspection/introspection-resource-source.backend.port.js.map +1 -1
  31. package/dist/esm/base-classes/services/repositories/postgresql-resource-repository.backend.service.d.ts +31 -0
  32. package/dist/esm/base-classes/services/repositories/postgresql-resource-repository.backend.service.d.ts.map +1 -1
  33. package/dist/esm/base-classes/services/repositories/postgresql-resource-repository.backend.service.js +127 -5
  34. package/dist/esm/base-classes/services/repositories/postgresql-resource-repository.backend.service.js.map +1 -1
  35. package/dist/esm/base-classes/services/repositories/repositories-registry-handler.backend.service.d.ts +71 -1
  36. package/dist/esm/base-classes/services/repositories/repositories-registry-handler.backend.service.d.ts.map +1 -1
  37. package/dist/esm/base-classes/services/repositories/repositories-registry-handler.backend.service.js +62 -2
  38. package/dist/esm/base-classes/services/repositories/repositories-registry-handler.backend.service.js.map +1 -1
  39. package/dist/esm/base-classes/services/repositories/repository-resource.backend.service.d.ts +21 -0
  40. package/dist/esm/base-classes/services/repositories/repository-resource.backend.service.d.ts.map +1 -1
  41. package/dist/esm/base-classes/services/repositories/repository-resource.backend.service.js +126 -4
  42. package/dist/esm/base-classes/services/repositories/repository-resource.backend.service.js.map +1 -1
  43. package/dist/esm/base-classes/services/services/resource-operation-implementation-coverage.backend.utils.d.ts +3 -26
  44. package/dist/esm/base-classes/services/services/resource-operation-implementation-coverage.backend.utils.d.ts.map +1 -1
  45. package/dist/esm/base-classes/services/services/resource-operation-implementation-coverage.backend.utils.js +3 -68
  46. package/dist/esm/base-classes/services/services/resource-operation-implementation-coverage.backend.utils.js.map +1 -1
  47. package/dist/esm/base-classes/services/services/services-registry-handler.backend.service.d.ts.map +1 -1
  48. package/dist/esm/base-classes/services/services/services-registry-handler.backend.service.js +4 -2
  49. package/dist/esm/base-classes/services/services/services-registry-handler.backend.service.js.map +1 -1
  50. package/dist/esm/billing/services/custom-impl/billing-account.mutations.custom-impl.backend.service.js +6 -6
  51. package/dist/esm/billing/services/custom-impl/billing-account.mutations.custom-impl.backend.service.js.map +1 -1
  52. package/dist/esm/compliance/audit-trails/services/audit-event-dispatcher.backend.service.d.ts +38 -0
  53. package/dist/esm/compliance/audit-trails/services/audit-event-dispatcher.backend.service.d.ts.map +1 -1
  54. package/dist/esm/compliance/audit-trails/services/audit-event-dispatcher.backend.service.js +40 -0
  55. package/dist/esm/compliance/audit-trails/services/audit-event-dispatcher.backend.service.js.map +1 -1
  56. package/dist/esm/compliance/audit-trails/services/audit-logs.backend.service.d.ts +20 -0
  57. package/dist/esm/compliance/audit-trails/services/audit-logs.backend.service.d.ts.map +1 -1
  58. package/dist/esm/compliance/audit-trails/services/audit-logs.backend.service.js +28 -0
  59. package/dist/esm/compliance/audit-trails/services/audit-logs.backend.service.js.map +1 -1
  60. package/dist/esm/compliance/audit-trails/services/siem-export-config-cache-invalidation.custom-impl.backend.service.d.ts +12 -0
  61. package/dist/esm/compliance/audit-trails/services/siem-export-config-cache-invalidation.custom-impl.backend.service.d.ts.map +1 -0
  62. package/dist/esm/compliance/audit-trails/services/siem-export-config-cache-invalidation.custom-impl.backend.service.js +118 -0
  63. package/dist/esm/compliance/audit-trails/services/siem-export-config-cache-invalidation.custom-impl.backend.service.js.map +1 -0
  64. package/dist/esm/compliance/audit-trails/services/siem-webhook-delivery.backend.service.d.ts.map +1 -1
  65. package/dist/esm/compliance/audit-trails/services/siem-webhook-delivery.backend.service.js +8 -5
  66. package/dist/esm/compliance/audit-trails/services/siem-webhook-delivery.backend.service.js.map +1 -1
  67. package/dist/esm/compliance/audit-trails/services/utils/ocsf-activity-mapping.backend.utils.d.ts.map +1 -1
  68. package/dist/esm/compliance/audit-trails/services/utils/ocsf-activity-mapping.backend.utils.js +14 -0
  69. package/dist/esm/compliance/audit-trails/services/utils/ocsf-activity-mapping.backend.utils.js.map +1 -1
  70. package/dist/esm/config/custom/application-config-controller.backend.service.d.ts.map +1 -1
  71. package/dist/esm/config/custom/application-config-controller.backend.service.js +7 -1
  72. package/dist/esm/config/custom/application-config-controller.backend.service.js.map +1 -1
  73. package/dist/esm/config/models/app-config.backend.schemas.d.ts +4 -0
  74. package/dist/esm/config/models/app-config.backend.schemas.d.ts.map +1 -1
  75. package/dist/esm/config/services/app-configuration.backend.utils.d.ts +10 -1
  76. package/dist/esm/config/services/app-configuration.backend.utils.d.ts.map +1 -1
  77. package/dist/esm/config/services/app-configuration.backend.utils.js +13 -2
  78. package/dist/esm/config/services/app-configuration.backend.utils.js.map +1 -1
  79. package/dist/esm/data-seeding/services/shared/data-seed-scope-iteration.shared.utils.d.ts +2 -2
  80. package/dist/esm/data-seeding/services/shared/data-seed-scope-iteration.shared.utils.js +2 -2
  81. package/dist/esm/data-seeding/services/shared/data-seed-scope-iteration.shared.utils.js.map +1 -1
  82. package/dist/esm/databases/models/filter.backend.schemas.js +2 -2
  83. package/dist/esm/databases/models/filter.backend.schemas.js.map +1 -1
  84. package/dist/esm/databases/services/aggregation/aggregation-authorization.backend.service.d.ts.map +1 -1
  85. package/dist/esm/databases/services/aggregation/aggregation-authorization.backend.service.js +20 -1
  86. package/dist/esm/databases/services/aggregation/aggregation-authorization.backend.service.js.map +1 -1
  87. package/dist/esm/databases/services/redis.service.d.ts +27 -0
  88. package/dist/esm/databases/services/redis.service.d.ts.map +1 -1
  89. package/dist/esm/databases/services/redis.service.js +29 -0
  90. package/dist/esm/databases/services/redis.service.js.map +1 -1
  91. package/dist/esm/errors/services/error-handler.backend.service.d.ts.map +1 -1
  92. package/dist/esm/errors/services/error-handler.backend.service.js +5 -0
  93. package/dist/esm/errors/services/error-handler.backend.service.js.map +1 -1
  94. package/dist/esm/external-data/controllers/external-data-admin.backend.contracts.d.ts +41 -0
  95. package/dist/esm/external-data/controllers/external-data-admin.backend.contracts.d.ts.map +1 -0
  96. package/dist/esm/external-data/controllers/external-data-admin.backend.contracts.js +40 -0
  97. package/dist/esm/external-data/controllers/external-data-admin.backend.contracts.js.map +1 -0
  98. package/dist/esm/external-data/controllers/external-data-admin.backend.controller.d.ts +64 -0
  99. package/dist/esm/external-data/controllers/external-data-admin.backend.controller.d.ts.map +1 -0
  100. package/dist/esm/external-data/controllers/external-data-admin.backend.controller.js +193 -0
  101. package/dist/esm/external-data/controllers/external-data-admin.backend.controller.js.map +1 -0
  102. package/dist/esm/external-data/external-data-pipeline-run.backend.service.d.ts +13 -2
  103. package/dist/esm/external-data/external-data-pipeline-run.backend.service.d.ts.map +1 -1
  104. package/dist/esm/external-data/external-data-pipeline-run.backend.service.js +8 -2
  105. package/dist/esm/external-data/external-data-pipeline-run.backend.service.js.map +1 -1
  106. package/dist/esm/external-data/external-data-transform.backend.d.ts.map +1 -1
  107. package/dist/esm/external-data/external-data-transform.backend.js +7 -1
  108. package/dist/esm/external-data/external-data-transform.backend.js.map +1 -1
  109. package/dist/esm/external-data/models/external-data-pipeline-state.backend.schemas.d.ts +2 -0
  110. package/dist/esm/external-data/models/external-data-pipeline-state.backend.schemas.d.ts.map +1 -1
  111. package/dist/esm/external-data/models/external-data-pipeline-state.backend.schemas.js +13 -0
  112. package/dist/esm/external-data/models/external-data-pipeline-state.backend.schemas.js.map +1 -1
  113. package/dist/esm/external-providers/services/external-providers-registry.backend.service.d.ts +14 -0
  114. package/dist/esm/external-providers/services/external-providers-registry.backend.service.d.ts.map +1 -1
  115. package/dist/esm/external-providers/services/external-providers-registry.backend.service.js +6 -0
  116. package/dist/esm/external-providers/services/external-providers-registry.backend.service.js.map +1 -1
  117. package/dist/esm/files/controllers/file.controller.d.ts +24 -1
  118. package/dist/esm/files/controllers/file.controller.d.ts.map +1 -1
  119. package/dist/esm/files/controllers/file.controller.js +66 -2
  120. package/dist/esm/files/controllers/file.controller.js.map +1 -1
  121. package/dist/esm/files/handlers/file-upload-route-locals.backend.types.d.ts +17 -0
  122. package/dist/esm/files/handlers/file-upload-route-locals.backend.types.d.ts.map +1 -0
  123. package/dist/esm/files/handlers/file-upload-route-locals.backend.types.js +1 -0
  124. package/dist/esm/files/handlers/file-upload-route-locals.backend.types.js.map +1 -0
  125. package/dist/esm/files/handlers/resource-file-upload-handler.backend.service.d.ts +5 -1
  126. package/dist/esm/files/handlers/resource-file-upload-handler.backend.service.d.ts.map +1 -1
  127. package/dist/esm/files/handlers/resource-file-upload-handler.backend.service.js +42 -3
  128. package/dist/esm/files/handlers/resource-file-upload-handler.backend.service.js.map +1 -1
  129. package/dist/esm/files/services/file-operation-handler.backend.service.d.ts +18 -0
  130. package/dist/esm/files/services/file-operation-handler.backend.service.d.ts.map +1 -1
  131. package/dist/esm/files/services/file-operation-handler.backend.service.js +36 -28
  132. package/dist/esm/files/services/file-operation-handler.backend.service.js.map +1 -1
  133. package/dist/esm/files/services/file-upload-grant.backend.service.d.ts +163 -0
  134. package/dist/esm/files/services/file-upload-grant.backend.service.d.ts.map +1 -0
  135. package/dist/esm/files/services/file-upload-grant.backend.service.js +442 -0
  136. package/dist/esm/files/services/file-upload-grant.backend.service.js.map +1 -0
  137. package/dist/esm/files/services/files.backend.service.d.ts +19 -0
  138. package/dist/esm/files/services/files.backend.service.d.ts.map +1 -1
  139. package/dist/esm/files/services/files.backend.service.js +78 -15
  140. package/dist/esm/files/services/files.backend.service.js.map +1 -1
  141. package/dist/esm/files/utils/file-uploader.utils.d.ts.map +1 -1
  142. package/dist/esm/files/utils/file-uploader.utils.js +12 -0
  143. package/dist/esm/files/utils/file-uploader.utils.js.map +1 -1
  144. package/dist/esm/flows-actors/a2a/services/a2a-task-cancellation.backend.service.js +5 -5
  145. package/dist/esm/flows-actors/a2a/services/a2a-task-cancellation.backend.service.js.map +1 -1
  146. package/dist/esm/flows-actors/services/agents.backend.service.d.ts +79 -0
  147. package/dist/esm/flows-actors/services/agents.backend.service.d.ts.map +1 -1
  148. package/dist/esm/flows-actors/services/agents.backend.service.js +319 -42
  149. package/dist/esm/flows-actors/services/agents.backend.service.js.map +1 -1
  150. package/dist/esm/flows-actors/utils/acp-session-runner.backend.utils.d.ts +151 -41
  151. package/dist/esm/flows-actors/utils/acp-session-runner.backend.utils.d.ts.map +1 -1
  152. package/dist/esm/flows-actors/utils/acp-session-runner.backend.utils.js +300 -139
  153. package/dist/esm/flows-actors/utils/acp-session-runner.backend.utils.js.map +1 -1
  154. package/dist/esm/index.d.ts +4 -1
  155. package/dist/esm/index.d.ts.map +1 -1
  156. package/dist/esm/index.js +14 -1
  157. package/dist/esm/index.js.map +1 -1
  158. package/dist/esm/inject/models/container.d.ts.map +1 -1
  159. package/dist/esm/inject/models/container.js +4 -0
  160. package/dist/esm/inject/models/container.js.map +1 -1
  161. package/dist/esm/inject/models/service-types.d.ts +3 -0
  162. package/dist/esm/inject/models/service-types.d.ts.map +1 -1
  163. package/dist/esm/inject/models/service-types.js +2 -0
  164. package/dist/esm/inject/models/service-types.js.map +1 -1
  165. package/dist/esm/mcp/controllers/mcp.controller.d.ts.map +1 -1
  166. package/dist/esm/mcp/controllers/mcp.controller.js +12 -4
  167. package/dist/esm/mcp/controllers/mcp.controller.js.map +1 -1
  168. package/dist/esm/mcp/models/mcp-tool.backend.schemas.d.ts +34 -0
  169. package/dist/esm/mcp/models/mcp-tool.backend.schemas.d.ts.map +1 -1
  170. package/dist/esm/mcp/models/mcp-tool.backend.schemas.js +42 -0
  171. package/dist/esm/mcp/models/mcp-tool.backend.schemas.js.map +1 -1
  172. package/dist/esm/mcp/services/mcp-server.backend.service.d.ts +29 -1
  173. package/dist/esm/mcp/services/mcp-server.backend.service.d.ts.map +1 -1
  174. package/dist/esm/mcp/services/mcp-server.backend.service.js +131 -3
  175. package/dist/esm/mcp/services/mcp-server.backend.service.js.map +1 -1
  176. package/dist/esm/mcp/services/mcp-tool-adapter.backend.service.d.ts +64 -2
  177. package/dist/esm/mcp/services/mcp-tool-adapter.backend.service.d.ts.map +1 -1
  178. package/dist/esm/mcp/services/mcp-tool-adapter.backend.service.js +130 -6
  179. package/dist/esm/mcp/services/mcp-tool-adapter.backend.service.js.map +1 -1
  180. package/dist/esm/notifications/services/notifications-dispatcher.backend.service.d.ts +9 -0
  181. package/dist/esm/notifications/services/notifications-dispatcher.backend.service.d.ts.map +1 -1
  182. package/dist/esm/notifications/services/notifications-dispatcher.backend.service.js +11 -36
  183. package/dist/esm/notifications/services/notifications-dispatcher.backend.service.js.map +1 -1
  184. package/dist/esm/notifications/webhooks/outbound/batches/m2m-webhook-delivery.batch.backend.service.d.ts.map +1 -1
  185. package/dist/esm/notifications/webhooks/outbound/batches/m2m-webhook-delivery.batch.backend.service.js +9 -7
  186. package/dist/esm/notifications/webhooks/outbound/batches/m2m-webhook-delivery.batch.backend.service.js.map +1 -1
  187. package/dist/esm/notifications/webhooks/outbound/batches/m2m-webhook-delivery.batch.utils.d.ts +5 -5
  188. package/dist/esm/notifications/webhooks/outbound/batches/m2m-webhook-delivery.batch.utils.d.ts.map +1 -1
  189. package/dist/esm/notifications/webhooks/outbound/batches/m2m-webhook-delivery.batch.utils.js +14 -13
  190. package/dist/esm/notifications/webhooks/outbound/batches/m2m-webhook-delivery.batch.utils.js.map +1 -1
  191. package/dist/esm/notifications/webhooks/outbound/m2m-webhook-signed-request.backend.utils.d.ts +2 -1
  192. package/dist/esm/notifications/webhooks/outbound/m2m-webhook-signed-request.backend.utils.d.ts.map +1 -1
  193. package/dist/esm/notifications/webhooks/outbound/m2m-webhook-signed-request.backend.utils.js +2 -2
  194. package/dist/esm/notifications/webhooks/outbound/m2m-webhook-signed-request.backend.utils.js.map +1 -1
  195. package/dist/esm/notifications/webhooks/outbound/services/webhook-config-test-endpoint.custom-impl.backend.service.d.ts.map +1 -1
  196. package/dist/esm/notifications/webhooks/outbound/services/webhook-config-test-endpoint.custom-impl.backend.service.js +9 -7
  197. package/dist/esm/notifications/webhooks/outbound/services/webhook-config-test-endpoint.custom-impl.backend.service.js.map +1 -1
  198. package/dist/esm/organizations/services/organization-unit-custom-implementation.backend.service.d.ts.map +1 -1
  199. package/dist/esm/organizations/services/organization-unit-custom-implementation.backend.service.js +4 -1
  200. package/dist/esm/organizations/services/organization-unit-custom-implementation.backend.service.js.map +1 -1
  201. package/dist/esm/requests/service/websocket.service.d.ts.map +1 -1
  202. package/dist/esm/requests/service/websocket.service.js +56 -7
  203. package/dist/esm/requests/service/websocket.service.js.map +1 -1
  204. package/dist/esm/resources/models/custom-service-implementations.backend.definition.d.ts.map +1 -1
  205. package/dist/esm/resources/models/custom-service-implementations.backend.definition.js +2 -0
  206. package/dist/esm/resources/models/custom-service-implementations.backend.definition.js.map +1 -1
  207. package/dist/esm/resources/services/resource-id.backend.service.js +3 -3
  208. package/dist/esm/resources/services/resource-id.backend.service.js.map +1 -1
  209. package/dist/esm/resources/services/resources-registry.backend.service.js +1 -1
  210. package/dist/esm/resources/services/resources-registry.backend.service.js.map +1 -1
  211. package/dist/esm/runtime/services/execution-context-creator.backend.service.d.ts.map +1 -1
  212. package/dist/esm/runtime/services/execution-context-creator.backend.service.js +13 -7
  213. package/dist/esm/runtime/services/execution-context-creator.backend.service.js.map +1 -1
  214. package/dist/esm/runtime/services/start-application.backend.service.d.ts +28 -0
  215. package/dist/esm/runtime/services/start-application.backend.service.d.ts.map +1 -1
  216. package/dist/esm/runtime/services/start-application.backend.service.js +82 -0
  217. package/dist/esm/runtime/services/start-application.backend.service.js.map +1 -1
  218. package/dist/esm/security/authentications/models/jwt.backend.schemas.d.ts +3 -23
  219. package/dist/esm/security/authentications/models/jwt.backend.schemas.d.ts.map +1 -1
  220. package/dist/esm/security/authentications/models/jwt.backend.schemas.js +20 -45
  221. package/dist/esm/security/authentications/models/jwt.backend.schemas.js.map +1 -1
  222. package/dist/esm/security/authentications/services/auth-methods/auth-method-management.backend.service.d.ts +9 -1
  223. package/dist/esm/security/authentications/services/auth-methods/auth-method-management.backend.service.d.ts.map +1 -1
  224. package/dist/esm/security/authentications/services/auth-methods/auth-method-management.backend.service.js +9 -1
  225. package/dist/esm/security/authentications/services/auth-methods/auth-method-management.backend.service.js.map +1 -1
  226. package/dist/esm/security/authentications/services/auth-methods/auth-mfa.backend.service.d.ts.map +1 -1
  227. package/dist/esm/security/authentications/services/auth-methods/auth-mfa.backend.service.js +5 -3
  228. package/dist/esm/security/authentications/services/auth-methods/auth-mfa.backend.service.js.map +1 -1
  229. package/dist/esm/security/authentications/services/auth-token-issuer.backend.service.d.ts +25 -1
  230. package/dist/esm/security/authentications/services/auth-token-issuer.backend.service.d.ts.map +1 -1
  231. package/dist/esm/security/authentications/services/auth-token-issuer.backend.service.js +55 -4
  232. package/dist/esm/security/authentications/services/auth-token-issuer.backend.service.js.map +1 -1
  233. package/dist/esm/security/authorizations/initiator-organization-confinement.backend.d.ts.map +1 -1
  234. package/dist/esm/security/authorizations/initiator-organization-confinement.backend.js +24 -1
  235. package/dist/esm/security/authorizations/initiator-organization-confinement.backend.js.map +1 -1
  236. package/dist/esm/security/authorizations/privileged-access-review.backend.utils.d.ts +117 -0
  237. package/dist/esm/security/authorizations/privileged-access-review.backend.utils.d.ts.map +1 -0
  238. package/dist/esm/security/authorizations/privileged-access-review.backend.utils.js +104 -0
  239. package/dist/esm/security/authorizations/privileged-access-review.backend.utils.js.map +1 -0
  240. package/dist/esm/security/authorizations/services/authorizations.backend.service.d.ts +101 -6
  241. package/dist/esm/security/authorizations/services/authorizations.backend.service.d.ts.map +1 -1
  242. package/dist/esm/security/authorizations/services/authorizations.backend.service.js +210 -30
  243. package/dist/esm/security/authorizations/services/authorizations.backend.service.js.map +1 -1
  244. package/dist/esm/security/consumable-tokens/batches/consumable-tokens-cleanup.batch.backend.service.d.ts +18 -1
  245. package/dist/esm/security/consumable-tokens/batches/consumable-tokens-cleanup.batch.backend.service.d.ts.map +1 -1
  246. package/dist/esm/security/consumable-tokens/batches/consumable-tokens-cleanup.batch.backend.service.js +110 -74
  247. package/dist/esm/security/consumable-tokens/batches/consumable-tokens-cleanup.batch.backend.service.js.map +1 -1
  248. package/dist/esm/security/consumable-tokens/consumable-token-models.exports.d.ts +22 -0
  249. package/dist/esm/security/consumable-tokens/consumable-token-models.exports.d.ts.map +1 -0
  250. package/dist/esm/security/consumable-tokens/consumable-token-models.exports.js +22 -0
  251. package/dist/esm/security/consumable-tokens/consumable-token-models.exports.js.map +1 -0
  252. package/dist/esm/security/consumable-tokens/models/consumable-tokens.backend.resources-config.schemas.d.ts +17 -3
  253. package/dist/esm/security/consumable-tokens/models/consumable-tokens.backend.resources-config.schemas.d.ts.map +1 -1
  254. package/dist/esm/security/consumable-tokens/models/consumable-tokens.backend.resources-config.schemas.js +12 -0
  255. package/dist/esm/security/consumable-tokens/models/consumable-tokens.backend.resources-config.schemas.js.map +1 -1
  256. package/dist/esm/security/consumable-tokens/services/consumable-token.backend.service.d.ts +20 -0
  257. package/dist/esm/security/consumable-tokens/services/consumable-token.backend.service.d.ts.map +1 -1
  258. package/dist/esm/security/consumable-tokens/services/consumable-token.backend.service.js +58 -5
  259. package/dist/esm/security/consumable-tokens/services/consumable-token.backend.service.js.map +1 -1
  260. package/dist/esm/security/jwt/services/jwt.backend.service.d.ts.map +1 -1
  261. package/dist/esm/security/jwt/services/jwt.backend.service.js +1 -18
  262. package/dist/esm/security/jwt/services/jwt.backend.service.js.map +1 -1
  263. package/dist/tsconfig.build.tsbuildinfo +1 -1
  264. package/package.json +15 -9
  265. package/dist/esm/.builder.pid +0 -9
@@ -1 +1 @@
1
- {"version":3,"file":"ocsf-activity-mapping.backend.utils.js","sourceRoot":"","sources":["../../../../../../../src/compliance/audit-trails/services/utils/ocsf-activity-mapping.backend.utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAEH,OAAO,EAAsB,UAAU,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAC;AACnJ,OAAO,EAAE,4BAA4B,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAEhG,oFAAoF;AACpF,MAAM,CAAN,IAAY,kBAKX;AALD,WAAY,kBAAkB;IAC5B,uCAAuC;IACvC,iEAAW,CAAA;IACX,6EAA6E;IAC7E,8DAAU,CAAA;AACZ,CAAC,EALW,kBAAkB,KAAlB,kBAAkB,QAK7B;AAED,sEAAsE;AACtE,MAAM,CAAN,IAAY,0BAQX;AARD,WAAY,0BAA0B;IACpC,8HAA8H;IAC9H,6EAAS,CAAA;IACT,6DAA6D;IAC7D,+EAAU,CAAA;IACV,mHAAmH;IACnH,iFAAW,CAAA;IACX,8EAAU,CAAA;AACZ,CAAC,EARW,0BAA0B,KAA1B,0BAA0B,QAQrC;AAED,oEAAoE;AACpE,MAAM,CAAN,IAAY,eAOX;AAPD,WAAY,eAAe;IACzB,yDAAU,CAAA;IACV,uFAAuF;IACvF,qDAAQ,CAAA;IACR,yDAAU,CAAA;IACV,yDAAU,CAAA;IACV,wDAAU,CAAA;AACZ,CAAC,EAPW,eAAe,KAAf,eAAe,QAO1B;AAED,yEAAyE;AACzE,MAAM,CAAN,IAAY,4BAiBX;AAjBD,WAAY,4BAA4B;IACtC,mFAAU,CAAA;IACV,+EAAQ,CAAA;IACR,mFAAU,CAAA;IACV,mFAAU,CAAA;IACV,+EAAQ,CAAA;IACR,sEAAsE;IACtE,mFAAU,CAAA;IACV,uFAAY,CAAA;IACZ,mFAAU,CAAA;IACV,qFAAW,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WAAW,CAAU,CAAC;AAE7G;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,UAAU,qBAAqB,CAAC,SAAkB,EAAE,QAAgB;IACxE,IAAI,SAAS,KAAK,IAAI,IAAI,OAAO,SAAS,KAAK,QAAQ;QAAE,OAAO,QAAQ,CAAC;IACzE,MAAM,MAAM,GAAG,SAA8C,CAAC;IAC9D,KAAK,MAAM,GAAG,IAAI,6BAA6B,EAAE,CAAC;QAChD,MAAM,SAAS,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;QAC9B,IAAI,OAAO,SAAS,KAAK,QAAQ;YAAE,SAAS;QAC5C,MAAM,MAAM,GAAG,mCAAmC,CAAC,SAAkC,CAAC,CAAC;QACvF,IAAI,MAAM,KAAK,SAAS;YAAE,OAAO,MAAM,CAAC;IAC1C,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC","sourcesContent":["/**\n * OCSF `activity_id` — the normalised verb, resolved per Wildo audit event type.\n *\n * Until this table existed every OCSF document we emitted carried `activity_id: 0` (Unknown), which\n * also pinned `type_uid` to `class_uid * 100`. That is the single largest fidelity loss in the OCSF\n * projection: `activity_id` is the axis OCSF uses to separate events WITHIN a class, so collapsing it\n * makes a logon indistinguishable from a logoff to any consumer that groups by `type_uid`.\n *\n * ## Three values, three different claims\n *\n * | Value | Means | When we use it |\n * |---|---|---|\n * | a specific member | the published description matches this event | the description matched — never the caption alone |\n * | `OTHER` (99) | in the class's domain, absent from its enum | with `activity_name` carrying our event type, which is what the schema asks for |\n * | `UNKNOWN` (0) | we cannot say | application-defined event types the engine cannot enumerate |\n *\n * `OTHER` is not a shrug. The schema defines it as \"the event activity is not mapped. See the\n * `activity_name` attribute, which contains a data source specific value\" — so it is a positive\n * statement plus an obligation, and it strictly beats `UNKNOWN` for any event we understand.\n *\n * ## Read descriptions, not captions\n *\n * Authentication's `Authentication Ticket` (3), `Service Ticket Request` (4) and `Service Ticket\n * Renew` (5) read like a natural home for OAuth token issuance and refresh. Their descriptions are\n * explicitly **Kerberos** (\"A Kerberos service ticket was renewed\"), so every OAuth token event here\n * is `OTHER` instead. Mapping those from the captions would have been a fabrication that validated\n * perfectly.\n *\n * ## A structural observation, deliberately NOT acted on here\n *\n * A Wildo event's audit CATEGORY selects the OCSF class, and for several events the natural activity\n * exists in a DIFFERENT class than the category picks: `USER_PASSWORD_CHANGED`, `USER_MFA_ENABLED`,\n * `USER_ACCOUNT_LOCKED` and friends are `AUTHENTICATION` (class 3002), while `Password Change` (8),\n * `Enable MFA Factors` (12) and `Lock` (6) are published by `user_management` (3007). Those rows are\n * `OTHER` with the mismatch named on each. Re-categorising them would change SIEM category filtering\n * for existing tenants, so it is a product decision, not a mapping fix.\n *\n * spec-cite: OCSF schema 1.9.0 — `schema.ocsf.io/api/1.9.0/classes/{authentication,api_activity,\n * entity_management,user_management}`, the `activity_id` enum and `activity_name` attribute of each.\n */\n\nimport { AuditEventCategory, AuthMethod, CoreAuditableEventType, CoreResourceOperation, getAuditEventClassification } from '@wildo-ai/saas-models';\nimport { OCSF_CLASS_BY_AUDIT_CATEGORY, OcsfClassUid } from './ocsf-class-mapping.backend.utils';\n\n/** `0` and `99` mean the same thing in every OCSF class, so they are named once. */\nexport enum OcsfCommonActivity {\n /** \"The event activity is unknown.\" */\n UNKNOWN = 0,\n /** \"The event activity is not mapped. See the `activity_name` attribute…\" */\n OTHER = 99,\n}\n\n/** Published `activity_id` members of class 3002 (authentication). */\nexport enum OcsfAuthenticationActivity {\n /** \"A new logon session was requested.\" Includes FAILED attempts — the verb is the request; the outcome rides `status_id`. */\n LOGON = 1,\n /** \"A logon session was terminated and no longer exists.\" */\n LOGOFF = 2,\n /** \"A preauthentication stage was engaged.\" Covers issuing an OTP or magic link: a stage BEFORE authentication. */\n PREAUTH = 6,\n OTHER = 99,\n}\n\n/** Published `activity_id` members of class 6003 (api_activity). */\nexport enum OcsfApiActivity {\n CREATE = 1,\n /** \"Read\" — the only CRUD verb our authorization/data-access events reliably carry. */\n READ = 2,\n UPDATE = 3,\n DELETE = 4,\n OTHER = 99,\n}\n\n/** Published `activity_id` members of class 3004 (entity_management). */\nexport enum OcsfEntityManagementActivity {\n CREATE = 1,\n READ = 2,\n UPDATE = 3,\n DELETE = 4,\n MOVE = 5,\n /** \"Enroll an existing managed entity.\" A member joining a tenant. */\n ENROLL = 6,\n UNENROLL = 7,\n ENABLE = 8,\n DISABLE = 9,\n ACTIVATE = 10,\n DEACTIVATE = 11,\n SUSPEND = 12,\n /** \"Resume (unsuspend) an existing managed entity.\" SUSPENDED is the only state our activate runs from. */\n RESUME = 13,\n OTHER = 99,\n}\n\n/** Published `activity_id` members of class 3007 (user_management). */\nexport enum OcsfUserManagementActivity {\n CREATE = 1,\n UPDATE = 2,\n DELETE = 3,\n ENABLE = 4,\n DISABLE = 5,\n LOCK = 6,\n UNLOCK = 7,\n PASSWORD_CHANGE = 8,\n PASSWORD_RESET = 9,\n ATTACH_POLICIES = 10,\n DETACH_POLICIES = 11,\n ENABLE_MFA_FACTORS = 12,\n DISABLE_MFA_FACTORS = 13,\n ASSIGN_PRIVILEGES = 14,\n REMOVE_PRIVILEGES = 15,\n ASSIGN_ROLES = 16,\n REMOVE_ROLES = 17,\n ADD_PROGRAMMATIC_CREDENTIALS = 18,\n REMOVE_PROGRAMMATIC_CREDENTIALS = 19,\n OTHER = 99,\n}\n\n/**\n * Every published activity id, per class — the membership check's source of truth.\n *\n * An activity number is only meaningful WITH its class: `1` is `Logon` in 3002 and `Create` in 6003.\n * So a row that assigns the right number under the wrong class is silently wrong, and nothing about\n * the emitted document would look malformed. {@link assertActivitiesBelongToTheirClass} closes that.\n */\nconst PUBLISHED_ACTIVITIES_BY_CLASS: Readonly<Record<OcsfClassUid, ReadonlySet<number>>> = {\n [OcsfClassUid.AUTHENTICATION]: new Set(Object.values(OcsfAuthenticationActivity).filter((v): v is number => typeof v === 'number')),\n [OcsfClassUid.API_ACTIVITY]: new Set(Object.values(OcsfApiActivity).filter((v): v is number => typeof v === 'number')),\n [OcsfClassUid.ENTITY_MANAGEMENT]: new Set(Object.values(OcsfEntityManagementActivity).filter((v): v is number => typeof v === 'number')),\n [OcsfClassUid.USER_MANAGEMENT]: new Set(Object.values(OcsfUserManagementActivity).filter((v): v is number => typeof v === 'number')),\n};\n\n/**\n * The activity each core audit event resolves to.\n *\n * **Total over `CoreAuditableEventType`**, so a new core event type cannot be added without deciding\n * its activity — the same shape the classification map now has, and for the same reason: an open set\n * silently defaulting is how `activity_id` stayed `Unknown` for every event in the first place.\n */\nexport const OCSF_ACTIVITY_BY_EVENT_TYPE: Readonly<Record<CoreAuditableEventType, number>> = {\n\n // ── AUTHENTICATION ──\n [CoreAuditableEventType.EMERGENCY_ACCESS_USED]: OcsfAuthenticationActivity.OTHER,\n [CoreAuditableEventType.MACHINE_AUTH_FAILED]: OcsfAuthenticationActivity.LOGON,\n [CoreAuditableEventType.MACHINE_AUTH_SUCCESS]: OcsfAuthenticationActivity.LOGON,\n [CoreAuditableEventType.OAUTH_CIMD_CLIENT_REFUSED]: OcsfAuthenticationActivity.OTHER,\n [CoreAuditableEventType.OAUTH_CODE_EXCHANGE_FAILED]: OcsfAuthenticationActivity.OTHER,\n [CoreAuditableEventType.OAUTH_DYNAMIC_CLIENT_REGISTERED]: OcsfAuthenticationActivity.OTHER,\n [CoreAuditableEventType.OAUTH_TOKEN_REFRESHED]: OcsfAuthenticationActivity.OTHER,\n [CoreAuditableEventType.OAUTH_TOKEN_REVOKED]: OcsfAuthenticationActivity.OTHER,\n // Unlike the token-revoke sibling above (a no-oracle RFC 7009 ATTEMPT → Other), an RP-Initiated Logout\n // terminates a real user SESSION, so it is a genuine OCSF Logoff — matching USER_LOGOUT / SAML_SLO_COMPLETED.\n [CoreAuditableEventType.OAUTH_RP_INITIATED_LOGOUT]: OcsfAuthenticationActivity.LOGOFF,\n [CoreAuditableEventType.ONE_OFF_TOKEN_CREATED]: OcsfAuthenticationActivity.OTHER,\n [CoreAuditableEventType.ONE_OFF_TOKEN_EXCHANGED]: OcsfAuthenticationActivity.OTHER,\n // Admin token-lifecycle, not an OCSF user LOGOFF — Other(99) + activity_name, matching the family.\n [CoreAuditableEventType.ONE_OFF_TOKEN_REVOKED]: OcsfAuthenticationActivity.OTHER,\n [CoreAuditableEventType.SAML_ASSERTION_REPLAY_DETECTED]: OcsfAuthenticationActivity.OTHER,\n [CoreAuditableEventType.SAML_LOGIN_FAILED]: OcsfAuthenticationActivity.LOGON,\n [CoreAuditableEventType.SAML_LOGIN_INITIATED]: OcsfAuthenticationActivity.LOGON,\n [CoreAuditableEventType.SAML_LOGIN_SUCCESS]: OcsfAuthenticationActivity.LOGON,\n [CoreAuditableEventType.SAML_SLO_COMPLETED]: OcsfAuthenticationActivity.LOGOFF,\n [CoreAuditableEventType.SAML_SLO_INITIATED]: OcsfAuthenticationActivity.LOGOFF,\n [CoreAuditableEventType.USER_ACCOUNT_LOCKED]: OcsfAuthenticationActivity.OTHER, // 3007 publishes Lock(6), but this event's category routes it to 3002, which does not\n [CoreAuditableEventType.USER_CROSS_FRONTEND_HANDOFF_ISSUED]: OcsfAuthenticationActivity.OTHER,\n [CoreAuditableEventType.USER_IDENTITY_LINK_REMOVED]: OcsfAuthenticationActivity.OTHER,\n [CoreAuditableEventType.USER_LOGIN]: OcsfAuthenticationActivity.LOGON,\n [CoreAuditableEventType.USER_LOGIN_FAILED]: OcsfAuthenticationActivity.LOGON,\n [CoreAuditableEventType.USER_LOGOUT]: OcsfAuthenticationActivity.LOGOFF,\n [CoreAuditableEventType.USER_MAGIC_LINK_FAILED]: OcsfAuthenticationActivity.LOGON,\n [CoreAuditableEventType.USER_MAGIC_LINK_SENT]: OcsfAuthenticationActivity.PREAUTH,\n [CoreAuditableEventType.USER_MAGIC_LINK_VERIFIED]: OcsfAuthenticationActivity.LOGON,\n [CoreAuditableEventType.USER_MFA_DISABLED]: OcsfAuthenticationActivity.OTHER, // 3007 publishes Disable MFA Factors(13), but this event's category routes it to 3002, which does not\n [CoreAuditableEventType.USER_MFA_EMAIL_OTP_SENT]: OcsfAuthenticationActivity.PREAUTH,\n [CoreAuditableEventType.USER_MFA_ENABLED]: OcsfAuthenticationActivity.OTHER, // 3007 publishes Enable MFA Factors(12), but this event's category routes it to 3002, which does not\n [CoreAuditableEventType.USER_MFA_SETUP_COMPLETED]: OcsfAuthenticationActivity.OTHER,\n [CoreAuditableEventType.USER_MFA_SETUP_STARTED]: OcsfAuthenticationActivity.OTHER,\n [CoreAuditableEventType.USER_PASSKEY_AUTHENTICATION_FAILURE]: OcsfAuthenticationActivity.LOGON,\n [CoreAuditableEventType.USER_PASSKEY_AUTHENTICATION_SUCCESS]: OcsfAuthenticationActivity.LOGON,\n [CoreAuditableEventType.USER_PASSKEY_REGISTERED]: OcsfAuthenticationActivity.OTHER,\n [CoreAuditableEventType.USER_PASSKEY_REMOVED]: OcsfAuthenticationActivity.OTHER,\n [CoreAuditableEventType.USER_PASSWORD_CHANGED]: OcsfAuthenticationActivity.OTHER, // 3007 publishes Password Change(8), but this event's category routes it to 3002, which does not\n [CoreAuditableEventType.USER_PASSWORD_RESET_COMPLETED]: OcsfAuthenticationActivity.OTHER, // 3007 publishes Password Reset(9), but this event's category routes it to 3002, which does not\n [CoreAuditableEventType.USER_PASSWORD_RESET_FORCED]: OcsfAuthenticationActivity.OTHER, // 3007 publishes Password Reset(9), but this event's category routes it to 3002, which does not\n [CoreAuditableEventType.USER_PASSWORD_RESET_REQUESTED]: OcsfAuthenticationActivity.OTHER,\n [CoreAuditableEventType.USER_PASSWORD_SET]: OcsfAuthenticationActivity.OTHER,\n [CoreAuditableEventType.USER_REFRESH_TOKEN_REUSE_DETECTED]: OcsfAuthenticationActivity.OTHER,\n [CoreAuditableEventType.USER_SESSION_EXPIRED]: OcsfAuthenticationActivity.LOGOFF,\n [CoreAuditableEventType.USER_SMS_OTP_FAILED]: OcsfAuthenticationActivity.LOGON,\n [CoreAuditableEventType.USER_SMS_OTP_SENT]: OcsfAuthenticationActivity.PREAUTH,\n [CoreAuditableEventType.USER_SMS_OTP_VERIFIED]: OcsfAuthenticationActivity.LOGON,\n [CoreAuditableEventType.USER_SSO_ENFORCEMENT_BLOCKED]: OcsfAuthenticationActivity.OTHER,\n [CoreAuditableEventType.USER_SSO_LOGIN]: OcsfAuthenticationActivity.LOGON,\n [CoreAuditableEventType.USER_SSO_LOGIN_FAILED]: OcsfAuthenticationActivity.LOGON,\n [CoreAuditableEventType.USER_TOKEN_REFRESHED]: OcsfAuthenticationActivity.OTHER,\n [CoreAuditableEventType.USER_TOTP_DISABLED]: OcsfAuthenticationActivity.OTHER,\n\n // ── AUTHORIZATION ──\n [CoreAuditableEventType.APPLICATION_SUPER_ADMIN_FLOOR_BREACHED]: OcsfApiActivity.OTHER,\n [CoreAuditableEventType.CROSS_TENANT_ADMINISTRATIVE_ACCESS]: OcsfApiActivity.OTHER,\n [CoreAuditableEventType.OAUTH2_PROVIDER_BLOCKED]: OcsfApiActivity.OTHER,\n [CoreAuditableEventType.OAUTH_CONSENT_BINDING_VIOLATION]: OcsfApiActivity.OTHER,\n [CoreAuditableEventType.OAUTH_CONSENT_DENIED]: OcsfApiActivity.OTHER,\n [CoreAuditableEventType.OAUTH_CONSENT_GRANTED]: OcsfApiActivity.OTHER,\n [CoreAuditableEventType.OAUTH_CONSENT_GRANT_PERSISTED]: OcsfApiActivity.OTHER,\n [CoreAuditableEventType.OAUTH_DELEGATED_TOKEN_ISSUED]: OcsfApiActivity.OTHER,\n [CoreAuditableEventType.ORGANIZATION_MEMBER_ROLE_CHANGED]: OcsfApiActivity.OTHER, // a role change is not one of 6003 CRUD verbs\n [CoreAuditableEventType.ORGANIZATION_OWNER_FLOOR_BREACHED]: OcsfApiActivity.OTHER,\n [CoreAuditableEventType.ORGANIZATION_UNIT_MEMBER_REMOVED]: OcsfApiActivity.OTHER,\n [CoreAuditableEventType.ORGANIZATION_UNIT_MEMBER_ROLE_CHANGED]: OcsfApiActivity.OTHER,\n [CoreAuditableEventType.PLATFORM_ACCESS_GRANT_LIFECYCLE]: OcsfApiActivity.OTHER,\n [CoreAuditableEventType.RESOURCE_OPERATION_DENIED]: OcsfApiActivity.OTHER, // the CRUD verb is runtime data (the operation), not derivable from the event type\n [CoreAuditableEventType.RESOURCE_OPERATION_PERFORMED]: OcsfApiActivity.OTHER, // the CRUD verb is runtime data (the operation), not derivable from the event type\n [CoreAuditableEventType.USER_APP_ROLES_CHANGED]: OcsfApiActivity.OTHER, // a role change is not one of 6003 CRUD verbs\n\n // ── DATA_ACCESS ──\n [CoreAuditableEventType.FIELD_ACCESS]: OcsfApiActivity.READ,\n [CoreAuditableEventType.MACHINE_ACCESS]: OcsfApiActivity.OTHER, // names a surface reach (A2A/MCP turn), not a CRUD verb on a resource\n // READ, not OTHER: enumerating a directory IS a read of resource rows, and it is the one case\n // where the CRUD verb IS derivable from the event type — the event only ever names a collection\n // read (list/search/count), never a mutation.\n [CoreAuditableEventType.PLATFORM_DIRECTORY_ACCESS]: OcsfApiActivity.READ,\n [CoreAuditableEventType.RETAINED_DATA_ACCESS]: OcsfApiActivity.READ,\n [CoreAuditableEventType.SUBJECT_DATA_EXPORT]: OcsfApiActivity.READ,\n [CoreAuditableEventType.COLLECTION_DATA_EXPORT]: OcsfApiActivity.READ,\n [CoreAuditableEventType.HTTP_API_READ_THROUGH_ACCESS]: OcsfApiActivity.READ,\n // D6 stance 6b: the declared external-erasure operation DELETED remote rows.\n [CoreAuditableEventType.HTTP_API_EXTERNAL_ERASURE]: OcsfApiActivity.DELETE,\n // D6 stance 6c: nothing was deleted — the event records a deliberate non-action.\n [CoreAuditableEventType.HTTP_API_NON_ERASURE_ACKNOWLEDGED]: OcsfApiActivity.OTHER,\n [CoreAuditableEventType.SYSTEM_CONTEXT_READ]: OcsfApiActivity.READ,\n [CoreAuditableEventType.SYSTEM_CONTEXT_WRITE]: OcsfApiActivity.OTHER, // static fallback only — refined per emission from eventData.operation (CREATE | UPDATE | UPDATE_MANY)\n\n // ── ORG_MANAGEMENT ──\n [CoreAuditableEventType.ORGANIZATION_ACTIVATED]: OcsfEntityManagementActivity.RESUME,\n [CoreAuditableEventType.ORGANIZATION_CREATED]: OcsfEntityManagementActivity.CREATE,\n [CoreAuditableEventType.ORGANIZATION_DELETED]: OcsfEntityManagementActivity.DELETE,\n [CoreAuditableEventType.ORGANIZATION_DELETION_REQUESTED]: OcsfEntityManagementActivity.OTHER, // marks the tenant and opens a window; nothing is deleted yet, so Delete(4) would overstate it\n [CoreAuditableEventType.ORGANIZATION_MEMBER_INVITED]: OcsfEntityManagementActivity.CREATE,\n [CoreAuditableEventType.ORGANIZATION_MEMBER_JOINED]: OcsfEntityManagementActivity.ENROLL,\n [CoreAuditableEventType.ORGANIZATION_MEMBER_REMOVED]: OcsfEntityManagementActivity.UNENROLL,\n [CoreAuditableEventType.ORGANIZATION_MEMBER_STATUS_CHANGED]: OcsfEntityManagementActivity.UPDATE,\n [CoreAuditableEventType.ORGANIZATION_MEMBER_UPDATED]: OcsfEntityManagementActivity.UPDATE,\n [CoreAuditableEventType.ORGANIZATION_NOTIFICATIONS_UPDATED]: OcsfEntityManagementActivity.UPDATE,\n [CoreAuditableEventType.ORGANIZATION_PREFERENCES_UPDATED]: OcsfEntityManagementActivity.UPDATE,\n [CoreAuditableEventType.ORGANIZATION_PROFILE_UPDATED]: OcsfEntityManagementActivity.UPDATE,\n [CoreAuditableEventType.ORGANIZATION_RESTORED]: OcsfEntityManagementActivity.OTHER, // un-deletion has no 3004 member; Resume(13) is unsuspend and Activate(10) is a transient engine state\n [CoreAuditableEventType.ORGANIZATION_SIEM_EXPORT_CONFIGURED]: OcsfEntityManagementActivity.UPDATE,\n [CoreAuditableEventType.ORGANIZATION_SSO_CONFIGURATION_CHANGED]: OcsfEntityManagementActivity.UPDATE,\n // An application authentication-policy change is a configuration entity being UPDATED — the same\n // OCSF shape as the SSO / SIEM / SCIM configuration-change siblings around it. (Confirmed by the\n // session that added the event: UPDATE is the intended activity.)\n [CoreAuditableEventType.APPLICATION_AUTH_POLICY_CHANGED]: OcsfEntityManagementActivity.UPDATE,\n [CoreAuditableEventType.ORGANIZATION_SUSPENDED]: OcsfEntityManagementActivity.SUSPEND,\n [CoreAuditableEventType.ORGANIZATION_UNIT_UPDATED]: OcsfEntityManagementActivity.UPDATE,\n [CoreAuditableEventType.ORGANIZATION_UPDATED]: OcsfEntityManagementActivity.UPDATE,\n [CoreAuditableEventType.SAML_CERT_EXPIRING]: OcsfEntityManagementActivity.OTHER,\n [CoreAuditableEventType.SAML_METADATA_PARSED]: OcsfEntityManagementActivity.OTHER,\n [CoreAuditableEventType.SCIM_PROVISIONING_CONFIG_UPDATED]: OcsfEntityManagementActivity.UPDATE,\n [CoreAuditableEventType.SCIM_PROVISIONING_FAILED]: OcsfEntityManagementActivity.OTHER,\n [CoreAuditableEventType.SCIM_TOKEN_CREATED]: OcsfEntityManagementActivity.CREATE,\n [CoreAuditableEventType.SCIM_TOKEN_GENERATED]: OcsfEntityManagementActivity.CREATE,\n [CoreAuditableEventType.SCIM_TOKEN_REVOKED]: OcsfEntityManagementActivity.DELETE,\n [CoreAuditableEventType.SCIM_TOKEN_ROTATED]: OcsfEntityManagementActivity.UPDATE,\n [CoreAuditableEventType.WEBHOOK_ENDPOINT_TEST_DISPATCHED]: OcsfEntityManagementActivity.OTHER,\n\n // ── USER_LIFECYCLE ──\n [CoreAuditableEventType.RESOURCE_STATUS_TRANSITION_PERFORMED]: OcsfUserManagementActivity.OTHER,\n [CoreAuditableEventType.SAML_EMAIL_CHANGED]: OcsfUserManagementActivity.UPDATE,\n [CoreAuditableEventType.SCIM_USER_DEACTIVATED]: OcsfUserManagementActivity.DISABLE,\n [CoreAuditableEventType.SCIM_USER_PROVISIONED]: OcsfUserManagementActivity.CREATE,\n [CoreAuditableEventType.SCIM_USER_UPDATED]: OcsfUserManagementActivity.UPDATE,\n [CoreAuditableEventType.USER_CREATED]: OcsfUserManagementActivity.CREATE,\n [CoreAuditableEventType.USER_DELETED]: OcsfUserManagementActivity.DELETE,\n [CoreAuditableEventType.USER_EMAIL_VERIFIED]: OcsfUserManagementActivity.UPDATE,\n [CoreAuditableEventType.USER_PHONE_VERIFICATION_FAILED]: OcsfUserManagementActivity.OTHER,\n [CoreAuditableEventType.USER_PHONE_VERIFIED]: OcsfUserManagementActivity.UPDATE,\n [CoreAuditableEventType.USER_REGISTERED]: OcsfUserManagementActivity.CREATE,\n [CoreAuditableEventType.USER_UPDATED]: OcsfUserManagementActivity.UPDATE,\n [CoreAuditableEventType.USER_VERIFICATION_EMAIL_RESENT]: OcsfUserManagementActivity.OTHER,\n};\n\n/**\n * Fail at module load if any row assigns an activity its own class does not publish.\n *\n * This is the check the table exists to make possible. Activity numbers are class-scoped and collide\n * across classes, so a misfiled row produces a document that is structurally valid, schema-conformant,\n * and semantically wrong — the failure mode nothing downstream can catch.\n */\nfunction assertActivitiesBelongToTheirClass(): void {\n const offenders: string[] = [];\n for (const [eventType, activityId] of Object.entries(OCSF_ACTIVITY_BY_EVENT_TYPE)) {\n const category = getAuditEventClassification(eventType).category;\n const descriptor = OCSF_CLASS_BY_AUDIT_CATEGORY[category as AuditEventCategory];\n if (!PUBLISHED_ACTIVITIES_BY_CLASS[descriptor.classUid].has(activityId)) {\n offenders.push(`${eventType} → activity ${activityId} is not published by class ${descriptor.classUid}`);\n }\n }\n if (offenders.length > 0) {\n throw new Error(`OCSF activity mapping assigns activities their class does not publish:\\n ${offenders.join('\\n ')}`);\n }\n}\nassertActivitiesBelongToTheirClass();\n\n/**\n * Resolve the OCSF activity for an event type.\n *\n * Application-defined event types are ordinary strings the engine cannot enumerate, so they resolve to\n * `UNKNOWN` — the one case where \"we cannot say\" is the truthful answer.\n */\nexport function resolveOcsfActivityId(eventType: string): number {\n return OCSF_ACTIVITY_BY_EVENT_TYPE[eventType as CoreAuditableEventType] ?? OcsfCommonActivity.UNKNOWN;\n}\n\n/**\n * The `activity_name` companion for an `OTHER` assignment, or `undefined` when the activity is specific.\n *\n * The schema's own definition of `OTHER` points the reader at `activity_name`, so emitting `OTHER`\n * without it discards the very information the value promises is available.\n *\n * Takes the RESOLVED activity rather than re-deriving it from the event type. That distinction became\n * load-bearing when 6003 gained runtime refinement: an event whose TABLE entry is `Other` but whose\n * refined activity is `Update` must NOT carry `activity_name`, and a version of this that re-derived\n * from the event type would have emitted both — a specific activity plus a companion asserting it was\n * unmapped. Two ways to answer one question is the drift this contract exists to prevent.\n */\nexport function resolveOcsfActivityName(activityId: number, eventType: string): string | undefined {\n return activityId === OcsfCommonActivity.OTHER ? eventType : undefined;\n}\n\n/**\n * OCSF `auth_protocol_id` — the NORMALISED authentication protocol.\n *\n * spec-cite: OCSF 1.9.0 — `schema.ocsf.io/api/1.9.0/classes/authentication`, the `auth_protocol_id`\n * enum. `auth_protocol` is documented as \"the authentication protocol as defined by the caption of\n * `auth_protocol_id`. In the case of Other, it is defined by the event source.\"\n */\nexport enum OcsfAuthProtocolId {\n UNKNOWN = 0,\n NTLM = 1,\n KERBEROS = 2,\n DIGEST = 3,\n OPENID = 4,\n SAML = 5,\n OAUTH_2_0 = 6,\n PAP = 7,\n CHAP = 8,\n EAP = 9,\n RADIUS = 10,\n BASIC_AUTHENTICATION = 11,\n LDAP = 12,\n OTHER = 99,\n}\n\n/** The published CAPTION for each id — what `auth_protocol` must carry when the id is not `Other`. */\nconst OCSF_AUTH_PROTOCOL_CAPTION: Readonly<Record<OcsfAuthProtocolId, string>> = {\n [OcsfAuthProtocolId.UNKNOWN]: 'Unknown',\n [OcsfAuthProtocolId.NTLM]: 'NTLM',\n [OcsfAuthProtocolId.KERBEROS]: 'Kerberos',\n [OcsfAuthProtocolId.DIGEST]: 'Digest',\n [OcsfAuthProtocolId.OPENID]: 'OpenID',\n [OcsfAuthProtocolId.SAML]: 'SAML',\n [OcsfAuthProtocolId.OAUTH_2_0]: 'OAUTH 2.0',\n [OcsfAuthProtocolId.PAP]: 'PAP',\n [OcsfAuthProtocolId.CHAP]: 'CHAP',\n [OcsfAuthProtocolId.EAP]: 'EAP',\n [OcsfAuthProtocolId.RADIUS]: 'RADIUS',\n [OcsfAuthProtocolId.BASIC_AUTHENTICATION]: 'Basic Authentication',\n [OcsfAuthProtocolId.LDAP]: 'LDAP',\n [OcsfAuthProtocolId.OTHER]: 'Other',\n};\n\n/**\n * The `AuthMethod` members that ARE a protocol OCSF normalises. Everything else resolves to `Other`.\n *\n * Deliberately partial. Three members are absent for a reason, and each absence is a decision:\n *\n * - `PASSWORD` is NOT `Basic Authentication` (11). Basic Auth is an HTTP transport scheme (RFC 7617);\n * a user typing a password into a form is not that, and the resemblance is only in the English word.\n * - `MAGIC_LINK`, `TOTP`, `SMS_OTP`, `EMAIL_OTP` and `PASSKEY` name no protocol in the published enum.\n * WebAuthn/FIDO2 in particular is absent from OCSF 1.9.0 — mapping a passkey to `Other` is the\n * accurate answer, not a shortfall.\n * - `EXTERNAL_OAUTH2` DOES map: it is OAuth 2.0 by construction.\n *\n * The `ORG_` prefix on the SSO members is SCOPE, not protocol — an organization-restricted SAML login\n * is still SAML — so those normalise cleanly.\n */\nconst OCSF_AUTH_PROTOCOL_BY_AUTH_METHOD: Readonly<Partial<Record<AuthMethod, OcsfAuthProtocolId>>> = {\n [AuthMethod.ORG_SAML]: OcsfAuthProtocolId.SAML,\n [AuthMethod.ORG_OPENID_CONNECT]: OcsfAuthProtocolId.OPENID,\n [AuthMethod.EXTERNAL_OAUTH2]: OcsfAuthProtocolId.OAUTH_2_0,\n};\n\n/** `auth_protocol` + `auth_protocol_id`, resolved together because the schema couples them. */\nexport interface OcsfAuthProtocol {\n readonly protocol: string;\n readonly protocolId: OcsfAuthProtocolId;\n}\n\n/**\n * Resolve the OCSF protocol pair for an envelope's `authMethod`.\n *\n * The two attributes are resolved TOGETHER because the schema defines one in terms of the other: when\n * the id is normalised, the string must be that id's published caption; only under `Other` may the\n * string be the producer's own value. Returning them separately invites the pairing to drift, which is\n * exactly how this shipped wrong the first time (`org_saml` with no id at all).\n *\n * `authMethod` is an OPEN string on the envelope — applications define their own — so anything outside\n * the framework's own `AuthMethod` vocabulary lands on `Other` carrying its raw value, which is\n * precisely what `Other` is for.\n */\nexport function resolveOcsfAuthProtocol(authMethod: string): OcsfAuthProtocol {\n const normalised = OCSF_AUTH_PROTOCOL_BY_AUTH_METHOD[authMethod as AuthMethod];\n return normalised === undefined\n ? { protocol: authMethod, protocolId: OcsfAuthProtocolId.OTHER }\n : { protocol: OCSF_AUTH_PROTOCOL_CAPTION[normalised], protocolId: normalised };\n}\n\n/**\n * The CRUD verb an API Activity (6003) event performed, mapped from the framework's core operation.\n *\n * spec-cite: OCSF 1.9.0 — `api_activity.activity_id` enum: 0 Unknown, 1 Create, 2 Read, 3 Update,\n * 4 Delete, 99 Other.\n *\n * The bulk forms collapse onto their singular verb: OCSF's activity names WHAT was done, and the\n * cardinality is carried separately by the envelope (`isBulkOperation` / `affectedRecordCount`).\n * `COUNT` is a Read — it answers a question about existing rows without changing any.\n */\nconst OCSF_API_ACTIVITY_BY_CORE_OPERATION: Readonly<Record<CoreResourceOperation, OcsfApiActivity>> = {\n [CoreResourceOperation.CREATE]: OcsfApiActivity.CREATE,\n [CoreResourceOperation.CREATE_MANY]: OcsfApiActivity.CREATE,\n [CoreResourceOperation.READ]: OcsfApiActivity.READ,\n [CoreResourceOperation.LIST]: OcsfApiActivity.READ,\n [CoreResourceOperation.SEARCH]: OcsfApiActivity.READ,\n [CoreResourceOperation.COUNT]: OcsfApiActivity.READ,\n [CoreResourceOperation.UPDATE]: OcsfApiActivity.UPDATE,\n [CoreResourceOperation.UPDATE_MANY]: OcsfApiActivity.UPDATE,\n [CoreResourceOperation.DELETE]: OcsfApiActivity.DELETE,\n [CoreResourceOperation.DELETE_MANY]: OcsfApiActivity.DELETE,\n};\n\n/**\n * The `eventData` keys that can name a 6003 event's CRUD verb, in precedence order.\n *\n * Three keys rather than one because the emitters spell it differently and each is authoritative for\n * its own event: `resourceOperationLike` is the core semantics a CUSTOM verb borrows (a `suspend`\n * behaving as an `update`), `operationIdentifier` is the verb on resource-operation and field-access\n * events, and `operation` is what `logSystemContextWrite` records — typed `CREATE | UPDATE |\n * UPDATE_MANY`, so it always resolves.\n *\n * Enumerated by the QUESTION (\"what names the verb on a 6003 event?\") rather than by one emitter's\n * field name, which is how `operation` was missed on the first pass.\n */\nconst OCSF_API_VERB_EVENT_DATA_KEYS = ['resourceOperationLike', 'operationIdentifier', 'operation'] as const;\n\n/**\n * Refine a 6003 event's `activity_id` from RUNTIME data, when the event type alone cannot say.\n *\n * Class 6003 is organised around the CRUD axis, and the resource-operation events (`performed` /\n * `denied`) are the bulk of what we route there — yet the event TYPE is the same string for a create\n * and a delete. So the table maps them to `Other`, and every authorization event landed in one\n * undifferentiated bucket: the same collapse `activity_id` being pinned to `Unknown` used to cause,\n * surviving one layer down after that was fixed.\n *\n * The verb is in the envelope — under one of {@link OCSF_API_VERB_EVENT_DATA_KEYS}, in that precedence\n * order. Anything else (a custom verb borrowing nothing) keeps `Other`, where `activity_name` already\n * carries the event type.\n *\n * Two consequences that are DECISIONS, not side effects:\n *\n * - **`FIELD_ACCESS` refines away from its static `Read`.** It carries `operationIdentifier`, so a\n * secret exposed during a create now reads as Create(1). That is correct: 6003's activity names what\n * the API CALL did, and the field-access nature rides `metadata.event_code`. The static `Read` remains\n * the fallback for an emission that names no operation.\n * - **`SYSTEM_CONTEXT_WRITE` stops being `Other`.** Its table comment says \"neither Create nor Update is\n * true of every emission\" — true of a STATIC mapping and not a permanent conclusion, because at\n * runtime `operation` says exactly which. This matters more than most: it is the ACL-bypass write.\n */\nexport function refineOcsfApiActivity(eventData: unknown, fallback: number): number {\n if (eventData === null || typeof eventData !== 'object') return fallback;\n const record = eventData as Readonly<Record<string, unknown>>;\n for (const key of OCSF_API_VERB_EVENT_DATA_KEYS) {\n const candidate = record[key];\n if (typeof candidate !== 'string') continue;\n const mapped = OCSF_API_ACTIVITY_BY_CORE_OPERATION[candidate as CoreResourceOperation];\n if (mapped !== undefined) return mapped;\n }\n return fallback;\n}\n"]}
1
+ {"version":3,"file":"ocsf-activity-mapping.backend.utils.js","sourceRoot":"","sources":["../../../../../../../src/compliance/audit-trails/services/utils/ocsf-activity-mapping.backend.utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAEH,OAAO,EAAsB,UAAU,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAC;AACnJ,OAAO,EAAE,4BAA4B,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAEhG,oFAAoF;AACpF,MAAM,CAAN,IAAY,kBAKX;AALD,WAAY,kBAAkB;IAC5B,uCAAuC;IACvC,iEAAW,CAAA;IACX,6EAA6E;IAC7E,8DAAU,CAAA;AACZ,CAAC,EALW,kBAAkB,KAAlB,kBAAkB,QAK7B;AAED,sEAAsE;AACtE,MAAM,CAAN,IAAY,0BAQX;AARD,WAAY,0BAA0B;IACpC,8HAA8H;IAC9H,6EAAS,CAAA;IACT,6DAA6D;IAC7D,+EAAU,CAAA;IACV,mHAAmH;IACnH,iFAAW,CAAA;IACX,8EAAU,CAAA;AACZ,CAAC,EARW,0BAA0B,KAA1B,0BAA0B,QAQrC;AAED,oEAAoE;AACpE,MAAM,CAAN,IAAY,eAOX;AAPD,WAAY,eAAe;IACzB,yDAAU,CAAA;IACV,uFAAuF;IACvF,qDAAQ,CAAA;IACR,yDAAU,CAAA;IACV,yDAAU,CAAA;IACV,wDAAU,CAAA;AACZ,CAAC,EAPW,eAAe,KAAf,eAAe,QAO1B;AAED,yEAAyE;AACzE,MAAM,CAAN,IAAY,4BAiBX;AAjBD,WAAY,4BAA4B;IACtC,mFAAU,CAAA;IACV,+EAAQ,CAAA;IACR,mFAAU,CAAA;IACV,mFAAU,CAAA;IACV,+EAAQ,CAAA;IACR,sEAAsE;IACtE,mFAAU,CAAA;IACV,uFAAY,CAAA;IACZ,mFAAU,CAAA;IACV,qFAAW,CAAA;IACX,wFAAa,CAAA;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AC,EAAE,eAAe,CAAC,MAAM;IACtD,CAAC,qBAAqB,CAAC,WAAW,CAAC,EAAE,eAAe,CAAC,MAAM;IAC3D,CAAC,qBAAqB,CAAC,MAAM,CAAC,EAAE,eAAe,CAAC,MAAM;IACtD,CAAC,qBAAqB,CAAC,WAAW,CAAC,EAAE,eAAe,CAAC,MAAM;CAC5D,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,MAAM,6BAA6B,GAAG,CAAC,uBAAuB,EAAE,qBAAqB,EAAE,WAAW,CAAU,CAAC;AAE7G;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,UAAU,qBAAqB,CAAC,SAAkB,EAAE,QAAgB;IACxE,IAAI,SAAS,KAAK,IAAI,IAAI,OAAO,SAAS,KAAK,QAAQ;QAAE,OAAO,QAAQ,CAAC;IACzE,MAAM,MAAM,GAAG,SAA8C,CAAC;IAC9D,KAAK,MAAM,GAAG,IAAI,6BAA6B,EAAE,CAAC;QAChD,MAAM,SAAS,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;QAC9B,IAAI,OAAO,SAAS,KAAK,QAAQ;YAAE,SAAS;QAC5C,MAAM,MAAM,GAAG,mCAAmC,CAAC,SAAkC,CAAC,CAAC;QACvF,IAAI,MAAM,KAAK,SAAS;YAAE,OAAO,MAAM,CAAC;IAC1C,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC","sourcesContent":["/**\n * OCSF `activity_id` — the normalised verb, resolved per Wildo audit event type.\n *\n * Until this table existed every OCSF document we emitted carried `activity_id: 0` (Unknown), which\n * also pinned `type_uid` to `class_uid * 100`. That is the single largest fidelity loss in the OCSF\n * projection: `activity_id` is the axis OCSF uses to separate events WITHIN a class, so collapsing it\n * makes a logon indistinguishable from a logoff to any consumer that groups by `type_uid`.\n *\n * ## Three values, three different claims\n *\n * | Value | Means | When we use it |\n * |---|---|---|\n * | a specific member | the published description matches this event | the description matched — never the caption alone |\n * | `OTHER` (99) | in the class's domain, absent from its enum | with `activity_name` carrying our event type, which is what the schema asks for |\n * | `UNKNOWN` (0) | we cannot say | application-defined event types the engine cannot enumerate |\n *\n * `OTHER` is not a shrug. The schema defines it as \"the event activity is not mapped. See the\n * `activity_name` attribute, which contains a data source specific value\" — so it is a positive\n * statement plus an obligation, and it strictly beats `UNKNOWN` for any event we understand.\n *\n * ## Read descriptions, not captions\n *\n * Authentication's `Authentication Ticket` (3), `Service Ticket Request` (4) and `Service Ticket\n * Renew` (5) read like a natural home for OAuth token issuance and refresh. Their descriptions are\n * explicitly **Kerberos** (\"A Kerberos service ticket was renewed\"), so every OAuth token event here\n * is `OTHER` instead. Mapping those from the captions would have been a fabrication that validated\n * perfectly.\n *\n * ## A structural observation, deliberately NOT acted on here\n *\n * A Wildo event's audit CATEGORY selects the OCSF class, and for several events the natural activity\n * exists in a DIFFERENT class than the category picks: `USER_PASSWORD_CHANGED`, `USER_MFA_ENABLED`,\n * `USER_ACCOUNT_LOCKED` and friends are `AUTHENTICATION` (class 3002), while `Password Change` (8),\n * `Enable MFA Factors` (12) and `Lock` (6) are published by `user_management` (3007). Those rows are\n * `OTHER` with the mismatch named on each. Re-categorising them would change SIEM category filtering\n * for existing tenants, so it is a product decision, not a mapping fix.\n *\n * spec-cite: OCSF schema 1.9.0 — `schema.ocsf.io/api/1.9.0/classes/{authentication,api_activity,\n * entity_management,user_management}`, the `activity_id` enum and `activity_name` attribute of each.\n */\n\nimport { AuditEventCategory, AuthMethod, CoreAuditableEventType, CoreResourceOperation, getAuditEventClassification } from '@wildo-ai/saas-models';\nimport { OCSF_CLASS_BY_AUDIT_CATEGORY, OcsfClassUid } from './ocsf-class-mapping.backend.utils';\n\n/** `0` and `99` mean the same thing in every OCSF class, so they are named once. */\nexport enum OcsfCommonActivity {\n /** \"The event activity is unknown.\" */\n UNKNOWN = 0,\n /** \"The event activity is not mapped. See the `activity_name` attribute…\" */\n OTHER = 99,\n}\n\n/** Published `activity_id` members of class 3002 (authentication). */\nexport enum OcsfAuthenticationActivity {\n /** \"A new logon session was requested.\" Includes FAILED attempts — the verb is the request; the outcome rides `status_id`. */\n LOGON = 1,\n /** \"A logon session was terminated and no longer exists.\" */\n LOGOFF = 2,\n /** \"A preauthentication stage was engaged.\" Covers issuing an OTP or magic link: a stage BEFORE authentication. */\n PREAUTH = 6,\n OTHER = 99,\n}\n\n/** Published `activity_id` members of class 6003 (api_activity). */\nexport enum OcsfApiActivity {\n CREATE = 1,\n /** \"Read\" — the only CRUD verb our authorization/data-access events reliably carry. */\n READ = 2,\n UPDATE = 3,\n DELETE = 4,\n OTHER = 99,\n}\n\n/** Published `activity_id` members of class 3004 (entity_management). */\nexport enum OcsfEntityManagementActivity {\n CREATE = 1,\n READ = 2,\n UPDATE = 3,\n DELETE = 4,\n MOVE = 5,\n /** \"Enroll an existing managed entity.\" A member joining a tenant. */\n ENROLL = 6,\n UNENROLL = 7,\n ENABLE = 8,\n DISABLE = 9,\n ACTIVATE = 10,\n DEACTIVATE = 11,\n SUSPEND = 12,\n /** \"Resume (unsuspend) an existing managed entity.\" SUSPENDED is the only state our activate runs from. */\n RESUME = 13,\n OTHER = 99,\n}\n\n/** Published `activity_id` members of class 3007 (user_management). */\nexport enum OcsfUserManagementActivity {\n CREATE = 1,\n UPDATE = 2,\n DELETE = 3,\n ENABLE = 4,\n DISABLE = 5,\n LOCK = 6,\n UNLOCK = 7,\n PASSWORD_CHANGE = 8,\n PASSWORD_RESET = 9,\n ATTACH_POLICIES = 10,\n DETACH_POLICIES = 11,\n ENABLE_MFA_FACTORS = 12,\n DISABLE_MFA_FACTORS = 13,\n ASSIGN_PRIVILEGES = 14,\n REMOVE_PRIVILEGES = 15,\n ASSIGN_ROLES = 16,\n REMOVE_ROLES = 17,\n ADD_PROGRAMMATIC_CREDENTIALS = 18,\n REMOVE_PROGRAMMATIC_CREDENTIALS = 19,\n OTHER = 99,\n}\n\n/**\n * Every published activity id, per class — the membership check's source of truth.\n *\n * An activity number is only meaningful WITH its class: `1` is `Logon` in 3002 and `Create` in 6003.\n * So a row that assigns the right number under the wrong class is silently wrong, and nothing about\n * the emitted document would look malformed. {@link assertActivitiesBelongToTheirClass} closes that.\n */\nconst PUBLISHED_ACTIVITIES_BY_CLASS: Readonly<Record<OcsfClassUid, ReadonlySet<number>>> = {\n [OcsfClassUid.AUTHENTICATION]: new Set(Object.values(OcsfAuthenticationActivity).filter((v): v is number => typeof v === 'number')),\n [OcsfClassUid.API_ACTIVITY]: new Set(Object.values(OcsfApiActivity).filter((v): v is number => typeof v === 'number')),\n [OcsfClassUid.ENTITY_MANAGEMENT]: new Set(Object.values(OcsfEntityManagementActivity).filter((v): v is number => typeof v === 'number')),\n [OcsfClassUid.USER_MANAGEMENT]: new Set(Object.values(OcsfUserManagementActivity).filter((v): v is number => typeof v === 'number')),\n};\n\n/**\n * The activity each core audit event resolves to.\n *\n * **Total over `CoreAuditableEventType`**, so a new core event type cannot be added without deciding\n * its activity — the same shape the classification map now has, and for the same reason: an open set\n * silently defaulting is how `activity_id` stayed `Unknown` for every event in the first place.\n */\nexport const OCSF_ACTIVITY_BY_EVENT_TYPE: Readonly<Record<CoreAuditableEventType, number>> = {\n\n // ── AUTHENTICATION ──\n [CoreAuditableEventType.EMERGENCY_ACCESS_USED]: OcsfAuthenticationActivity.OTHER,\n [CoreAuditableEventType.MACHINE_AUTH_FAILED]: OcsfAuthenticationActivity.LOGON,\n [CoreAuditableEventType.MACHINE_AUTH_SUCCESS]: OcsfAuthenticationActivity.LOGON,\n [CoreAuditableEventType.OAUTH_CIMD_CLIENT_REFUSED]: OcsfAuthenticationActivity.OTHER,\n [CoreAuditableEventType.OAUTH_CODE_EXCHANGE_FAILED]: OcsfAuthenticationActivity.OTHER,\n [CoreAuditableEventType.OAUTH_DYNAMIC_CLIENT_REGISTERED]: OcsfAuthenticationActivity.OTHER,\n [CoreAuditableEventType.OAUTH_TOKEN_REFRESHED]: OcsfAuthenticationActivity.OTHER,\n [CoreAuditableEventType.OAUTH_TOKEN_REVOKED]: OcsfAuthenticationActivity.OTHER,\n // Unlike the token-revoke sibling above (a no-oracle RFC 7009 ATTEMPT → Other), an RP-Initiated Logout\n // terminates a real user SESSION, so it is a genuine OCSF Logoff — matching USER_LOGOUT / SAML_SLO_COMPLETED.\n [CoreAuditableEventType.OAUTH_RP_INITIATED_LOGOUT]: OcsfAuthenticationActivity.LOGOFF,\n [CoreAuditableEventType.ONE_OFF_TOKEN_CREATED]: OcsfAuthenticationActivity.OTHER,\n [CoreAuditableEventType.ONE_OFF_TOKEN_EXCHANGED]: OcsfAuthenticationActivity.OTHER,\n // Admin token-lifecycle, not an OCSF user LOGOFF — Other(99) + activity_name, matching the family.\n [CoreAuditableEventType.ONE_OFF_TOKEN_REVOKED]: OcsfAuthenticationActivity.OTHER,\n [CoreAuditableEventType.SAML_ASSERTION_REPLAY_DETECTED]: OcsfAuthenticationActivity.OTHER,\n [CoreAuditableEventType.SAML_LOGIN_FAILED]: OcsfAuthenticationActivity.LOGON,\n [CoreAuditableEventType.SAML_LOGIN_INITIATED]: OcsfAuthenticationActivity.LOGON,\n [CoreAuditableEventType.SAML_LOGIN_SUCCESS]: OcsfAuthenticationActivity.LOGON,\n [CoreAuditableEventType.SAML_SLO_COMPLETED]: OcsfAuthenticationActivity.LOGOFF,\n [CoreAuditableEventType.SAML_SLO_INITIATED]: OcsfAuthenticationActivity.LOGOFF,\n [CoreAuditableEventType.USER_ACCOUNT_LOCKED]: OcsfAuthenticationActivity.OTHER, // 3007 publishes Lock(6), but this event's category routes it to 3002, which does not\n [CoreAuditableEventType.USER_CROSS_FRONTEND_HANDOFF_ISSUED]: OcsfAuthenticationActivity.OTHER,\n [CoreAuditableEventType.USER_IDENTITY_LINK_REMOVED]: OcsfAuthenticationActivity.OTHER,\n [CoreAuditableEventType.USER_LOGIN]: OcsfAuthenticationActivity.LOGON,\n [CoreAuditableEventType.USER_LOGIN_FAILED]: OcsfAuthenticationActivity.LOGON,\n [CoreAuditableEventType.USER_LOGOUT]: OcsfAuthenticationActivity.LOGOFF,\n [CoreAuditableEventType.USER_MAGIC_LINK_FAILED]: OcsfAuthenticationActivity.LOGON,\n [CoreAuditableEventType.USER_MAGIC_LINK_SENT]: OcsfAuthenticationActivity.PREAUTH,\n [CoreAuditableEventType.USER_MAGIC_LINK_VERIFIED]: OcsfAuthenticationActivity.LOGON,\n [CoreAuditableEventType.USER_MFA_DISABLED]: OcsfAuthenticationActivity.OTHER, // 3007 publishes Disable MFA Factors(13), but this event's category routes it to 3002, which does not\n [CoreAuditableEventType.USER_MFA_EMAIL_OTP_SENT]: OcsfAuthenticationActivity.PREAUTH,\n [CoreAuditableEventType.USER_MFA_ENABLED]: OcsfAuthenticationActivity.OTHER, // 3007 publishes Enable MFA Factors(12), but this event's category routes it to 3002, which does not\n [CoreAuditableEventType.USER_MFA_SETUP_COMPLETED]: OcsfAuthenticationActivity.OTHER,\n [CoreAuditableEventType.USER_MFA_SETUP_STARTED]: OcsfAuthenticationActivity.OTHER,\n [CoreAuditableEventType.USER_PASSKEY_AUTHENTICATION_FAILURE]: OcsfAuthenticationActivity.LOGON,\n [CoreAuditableEventType.USER_PASSKEY_AUTHENTICATION_SUCCESS]: OcsfAuthenticationActivity.LOGON,\n [CoreAuditableEventType.USER_PASSKEY_REGISTERED]: OcsfAuthenticationActivity.OTHER,\n [CoreAuditableEventType.USER_PASSKEY_REMOVED]: OcsfAuthenticationActivity.OTHER,\n [CoreAuditableEventType.USER_PASSWORD_CHANGED]: OcsfAuthenticationActivity.OTHER, // 3007 publishes Password Change(8), but this event's category routes it to 3002, which does not\n [CoreAuditableEventType.USER_PASSWORD_RESET_COMPLETED]: OcsfAuthenticationActivity.OTHER, // 3007 publishes Password Reset(9), but this event's category routes it to 3002, which does not\n [CoreAuditableEventType.USER_PASSWORD_RESET_FORCED]: OcsfAuthenticationActivity.OTHER, // 3007 publishes Password Reset(9), but this event's category routes it to 3002, which does not\n [CoreAuditableEventType.USER_PASSWORD_RESET_REQUESTED]: OcsfAuthenticationActivity.OTHER,\n [CoreAuditableEventType.USER_PASSWORD_SET]: OcsfAuthenticationActivity.OTHER,\n [CoreAuditableEventType.USER_REFRESH_TOKEN_REUSE_DETECTED]: OcsfAuthenticationActivity.OTHER,\n [CoreAuditableEventType.USER_SESSION_EXPIRED]: OcsfAuthenticationActivity.LOGOFF,\n /*\n * LOGOFF, like the expiry above: the session is terminated and no longer exists, which is what the\n * OCSF verb states. The DIFFERENCE between the two — time elapsed versus a cap displacing a live\n * chain — is not expressible in `activity_id`, so it rides the typed eventData and the WARNING\n * severity instead. Mapping it to OTHER would have lost the one thing a SIEM correlates on.\n */\n [CoreAuditableEventType.USER_SESSION_EVICTED]: OcsfAuthenticationActivity.LOGOFF,\n [CoreAuditableEventType.USER_SMS_OTP_FAILED]: OcsfAuthenticationActivity.LOGON,\n [CoreAuditableEventType.USER_SMS_OTP_SENT]: OcsfAuthenticationActivity.PREAUTH,\n [CoreAuditableEventType.USER_SMS_OTP_VERIFIED]: OcsfAuthenticationActivity.LOGON,\n [CoreAuditableEventType.USER_SSO_ENFORCEMENT_BLOCKED]: OcsfAuthenticationActivity.OTHER,\n [CoreAuditableEventType.USER_SSO_LOGIN]: OcsfAuthenticationActivity.LOGON,\n [CoreAuditableEventType.USER_SSO_LOGIN_FAILED]: OcsfAuthenticationActivity.LOGON,\n [CoreAuditableEventType.USER_TOKEN_REFRESHED]: OcsfAuthenticationActivity.OTHER,\n [CoreAuditableEventType.USER_TOTP_DISABLED]: OcsfAuthenticationActivity.OTHER,\n\n // ── AUTHORIZATION ──\n // A file upload grant delegates one upload under the minter's authority; issuing/revoking it is not\n // one of 6003's CRUD verbs on a resource.\n [CoreAuditableEventType.FILE_UPLOAD_GRANT_ISSUED]: OcsfApiActivity.OTHER,\n [CoreAuditableEventType.FILE_UPLOAD_GRANT_REVOKED]: OcsfApiActivity.OTHER,\n [CoreAuditableEventType.APPLICATION_SUPER_ADMIN_FLOOR_BREACHED]: OcsfApiActivity.OTHER,\n [CoreAuditableEventType.CROSS_TENANT_ADMINISTRATIVE_ACCESS]: OcsfApiActivity.OTHER,\n [CoreAuditableEventType.OAUTH2_PROVIDER_BLOCKED]: OcsfApiActivity.OTHER,\n [CoreAuditableEventType.OAUTH_CONSENT_BINDING_VIOLATION]: OcsfApiActivity.OTHER,\n [CoreAuditableEventType.OAUTH_CONSENT_DENIED]: OcsfApiActivity.OTHER,\n [CoreAuditableEventType.OAUTH_CONSENT_GRANTED]: OcsfApiActivity.OTHER,\n [CoreAuditableEventType.OAUTH_CONSENT_GRANT_PERSISTED]: OcsfApiActivity.OTHER,\n [CoreAuditableEventType.OAUTH_DELEGATED_TOKEN_ISSUED]: OcsfApiActivity.OTHER,\n [CoreAuditableEventType.ORGANIZATION_MEMBER_ROLE_CHANGED]: OcsfApiActivity.OTHER, // a role change is not one of 6003 CRUD verbs\n [CoreAuditableEventType.ORGANIZATION_OWNER_FLOOR_BREACHED]: OcsfApiActivity.OTHER,\n [CoreAuditableEventType.ORGANIZATION_UNIT_MEMBER_REMOVED]: OcsfApiActivity.OTHER,\n [CoreAuditableEventType.ORGANIZATION_UNIT_MEMBER_ROLE_CHANGED]: OcsfApiActivity.OTHER,\n [CoreAuditableEventType.PLATFORM_ACCESS_GRANT_LIFECYCLE]: OcsfApiActivity.OTHER,\n [CoreAuditableEventType.RESOURCE_OPERATION_DENIED]: OcsfApiActivity.OTHER, // the CRUD verb is runtime data (the operation), not derivable from the event type\n [CoreAuditableEventType.RESOURCE_OPERATION_PERFORMED]: OcsfApiActivity.OTHER, // the CRUD verb is runtime data (the operation), not derivable from the event type\n [CoreAuditableEventType.USER_APP_ROLES_CHANGED]: OcsfApiActivity.OTHER, // a role change is not one of 6003 CRUD verbs\n\n // ── DATA_ACCESS ──\n [CoreAuditableEventType.FIELD_ACCESS]: OcsfApiActivity.READ,\n // CREATE, not OTHER: redeeming a grant IS the creation of one FILES row — the one DATA_ACCESS event\n // whose CRUD verb is derivable from the type, like PLATFORM_DIRECTORY_ACCESS below.\n [CoreAuditableEventType.FILE_UPLOAD_GRANT_REDEEMED]: OcsfApiActivity.CREATE,\n [CoreAuditableEventType.MACHINE_ACCESS]: OcsfApiActivity.OTHER, // names a surface reach (A2A/MCP turn), not a CRUD verb on a resource\n // READ, not OTHER: enumerating a directory IS a read of resource rows, and it is the one case\n // where the CRUD verb IS derivable from the event type — the event only ever names a collection\n // read (list/search/count), never a mutation.\n [CoreAuditableEventType.PLATFORM_DIRECTORY_ACCESS]: OcsfApiActivity.READ,\n [CoreAuditableEventType.RETAINED_DATA_ACCESS]: OcsfApiActivity.READ,\n [CoreAuditableEventType.SUBJECT_DATA_EXPORT]: OcsfApiActivity.READ,\n [CoreAuditableEventType.COLLECTION_DATA_EXPORT]: OcsfApiActivity.READ,\n [CoreAuditableEventType.HTTP_API_READ_THROUGH_ACCESS]: OcsfApiActivity.READ,\n // D6 stance 6b: the declared external-erasure operation DELETED remote rows.\n [CoreAuditableEventType.HTTP_API_EXTERNAL_ERASURE]: OcsfApiActivity.DELETE,\n // D6 stance 6c: nothing was deleted — the event records a deliberate non-action.\n [CoreAuditableEventType.HTTP_API_NON_ERASURE_ACKNOWLEDGED]: OcsfApiActivity.OTHER,\n [CoreAuditableEventType.SYSTEM_CONTEXT_READ]: OcsfApiActivity.READ,\n [CoreAuditableEventType.SYSTEM_CONTEXT_WRITE]: OcsfApiActivity.OTHER, // static fallback only — refined per emission from eventData.operation (CREATE | UPDATE | UPDATE_MANY)\n\n // ── ORG_MANAGEMENT ──\n [CoreAuditableEventType.ORGANIZATION_ACTIVATED]: OcsfEntityManagementActivity.RESUME,\n [CoreAuditableEventType.ORGANIZATION_CREATED]: OcsfEntityManagementActivity.CREATE,\n [CoreAuditableEventType.ORGANIZATION_DELETED]: OcsfEntityManagementActivity.DELETE,\n [CoreAuditableEventType.ORGANIZATION_DELETION_REQUESTED]: OcsfEntityManagementActivity.OTHER, // marks the tenant and opens a window; nothing is deleted yet, so Delete(4) would overstate it\n [CoreAuditableEventType.ORGANIZATION_MEMBER_INVITED]: OcsfEntityManagementActivity.CREATE,\n [CoreAuditableEventType.ORGANIZATION_MEMBER_JOINED]: OcsfEntityManagementActivity.ENROLL,\n [CoreAuditableEventType.ORGANIZATION_MEMBER_REMOVED]: OcsfEntityManagementActivity.UNENROLL,\n [CoreAuditableEventType.ORGANIZATION_MEMBER_STATUS_CHANGED]: OcsfEntityManagementActivity.UPDATE,\n [CoreAuditableEventType.ORGANIZATION_MEMBER_UPDATED]: OcsfEntityManagementActivity.UPDATE,\n [CoreAuditableEventType.ORGANIZATION_NOTIFICATIONS_UPDATED]: OcsfEntityManagementActivity.UPDATE,\n [CoreAuditableEventType.ORGANIZATION_PREFERENCES_UPDATED]: OcsfEntityManagementActivity.UPDATE,\n [CoreAuditableEventType.ORGANIZATION_PROFILE_UPDATED]: OcsfEntityManagementActivity.UPDATE,\n [CoreAuditableEventType.ORGANIZATION_RESTORED]: OcsfEntityManagementActivity.OTHER, // un-deletion has no 3004 member; Resume(13) is unsuspend and Activate(10) is a transient engine state\n [CoreAuditableEventType.ORGANIZATION_SIEM_EXPORT_CONFIGURED]: OcsfEntityManagementActivity.UPDATE,\n [CoreAuditableEventType.ORGANIZATION_SSO_CONFIGURATION_CHANGED]: OcsfEntityManagementActivity.UPDATE,\n // An application authentication-policy change is a configuration entity being UPDATED — the same\n // OCSF shape as the SSO / SIEM / SCIM configuration-change siblings around it. (Confirmed by the\n // session that added the event: UPDATE is the intended activity.)\n [CoreAuditableEventType.APPLICATION_AUTH_POLICY_CHANGED]: OcsfEntityManagementActivity.UPDATE,\n [CoreAuditableEventType.ORGANIZATION_SUSPENDED]: OcsfEntityManagementActivity.SUSPEND,\n [CoreAuditableEventType.ORGANIZATION_UNIT_UPDATED]: OcsfEntityManagementActivity.UPDATE,\n [CoreAuditableEventType.ORGANIZATION_UPDATED]: OcsfEntityManagementActivity.UPDATE,\n [CoreAuditableEventType.SAML_CERT_EXPIRING]: OcsfEntityManagementActivity.OTHER,\n [CoreAuditableEventType.SAML_METADATA_PARSED]: OcsfEntityManagementActivity.OTHER,\n [CoreAuditableEventType.SCIM_PROVISIONING_CONFIG_UPDATED]: OcsfEntityManagementActivity.UPDATE,\n [CoreAuditableEventType.SCIM_PROVISIONING_FAILED]: OcsfEntityManagementActivity.OTHER,\n [CoreAuditableEventType.SCIM_TOKEN_CREATED]: OcsfEntityManagementActivity.CREATE,\n [CoreAuditableEventType.SCIM_TOKEN_GENERATED]: OcsfEntityManagementActivity.CREATE,\n [CoreAuditableEventType.SCIM_TOKEN_REVOKED]: OcsfEntityManagementActivity.DELETE,\n [CoreAuditableEventType.SCIM_TOKEN_ROTATED]: OcsfEntityManagementActivity.UPDATE,\n [CoreAuditableEventType.WEBHOOK_ENDPOINT_TEST_DISPATCHED]: OcsfEntityManagementActivity.OTHER,\n\n // ── USER_LIFECYCLE ──\n [CoreAuditableEventType.RESOURCE_STATUS_TRANSITION_PERFORMED]: OcsfUserManagementActivity.OTHER,\n [CoreAuditableEventType.SAML_EMAIL_CHANGED]: OcsfUserManagementActivity.UPDATE,\n [CoreAuditableEventType.SCIM_USER_DEACTIVATED]: OcsfUserManagementActivity.DISABLE,\n [CoreAuditableEventType.SCIM_USER_PROVISIONED]: OcsfUserManagementActivity.CREATE,\n [CoreAuditableEventType.SCIM_USER_UPDATED]: OcsfUserManagementActivity.UPDATE,\n [CoreAuditableEventType.USER_CREATED]: OcsfUserManagementActivity.CREATE,\n [CoreAuditableEventType.USER_DELETED]: OcsfUserManagementActivity.DELETE,\n [CoreAuditableEventType.USER_EMAIL_VERIFIED]: OcsfUserManagementActivity.UPDATE,\n [CoreAuditableEventType.USER_PHONE_VERIFICATION_FAILED]: OcsfUserManagementActivity.OTHER,\n [CoreAuditableEventType.USER_PHONE_VERIFIED]: OcsfUserManagementActivity.UPDATE,\n [CoreAuditableEventType.USER_REGISTERED]: OcsfUserManagementActivity.CREATE,\n [CoreAuditableEventType.USER_UPDATED]: OcsfUserManagementActivity.UPDATE,\n [CoreAuditableEventType.USER_VERIFICATION_EMAIL_RESENT]: OcsfUserManagementActivity.OTHER,\n};\n\n/**\n * Fail at module load if any row assigns an activity its own class does not publish.\n *\n * This is the check the table exists to make possible. Activity numbers are class-scoped and collide\n * across classes, so a misfiled row produces a document that is structurally valid, schema-conformant,\n * and semantically wrong — the failure mode nothing downstream can catch.\n */\nfunction assertActivitiesBelongToTheirClass(): void {\n const offenders: string[] = [];\n for (const [eventType, activityId] of Object.entries(OCSF_ACTIVITY_BY_EVENT_TYPE)) {\n const category = getAuditEventClassification(eventType).category;\n const descriptor = OCSF_CLASS_BY_AUDIT_CATEGORY[category as AuditEventCategory];\n if (!PUBLISHED_ACTIVITIES_BY_CLASS[descriptor.classUid].has(activityId)) {\n offenders.push(`${eventType} → activity ${activityId} is not published by class ${descriptor.classUid}`);\n }\n }\n if (offenders.length > 0) {\n throw new Error(`OCSF activity mapping assigns activities their class does not publish:\\n ${offenders.join('\\n ')}`);\n }\n}\nassertActivitiesBelongToTheirClass();\n\n/**\n * Resolve the OCSF activity for an event type.\n *\n * Application-defined event types are ordinary strings the engine cannot enumerate, so they resolve to\n * `UNKNOWN` — the one case where \"we cannot say\" is the truthful answer.\n */\nexport function resolveOcsfActivityId(eventType: string): number {\n return OCSF_ACTIVITY_BY_EVENT_TYPE[eventType as CoreAuditableEventType] ?? OcsfCommonActivity.UNKNOWN;\n}\n\n/**\n * The `activity_name` companion for an `OTHER` assignment, or `undefined` when the activity is specific.\n *\n * The schema's own definition of `OTHER` points the reader at `activity_name`, so emitting `OTHER`\n * without it discards the very information the value promises is available.\n *\n * Takes the RESOLVED activity rather than re-deriving it from the event type. That distinction became\n * load-bearing when 6003 gained runtime refinement: an event whose TABLE entry is `Other` but whose\n * refined activity is `Update` must NOT carry `activity_name`, and a version of this that re-derived\n * from the event type would have emitted both — a specific activity plus a companion asserting it was\n * unmapped. Two ways to answer one question is the drift this contract exists to prevent.\n */\nexport function resolveOcsfActivityName(activityId: number, eventType: string): string | undefined {\n return activityId === OcsfCommonActivity.OTHER ? eventType : undefined;\n}\n\n/**\n * OCSF `auth_protocol_id` — the NORMALISED authentication protocol.\n *\n * spec-cite: OCSF 1.9.0 — `schema.ocsf.io/api/1.9.0/classes/authentication`, the `auth_protocol_id`\n * enum. `auth_protocol` is documented as \"the authentication protocol as defined by the caption of\n * `auth_protocol_id`. In the case of Other, it is defined by the event source.\"\n */\nexport enum OcsfAuthProtocolId {\n UNKNOWN = 0,\n NTLM = 1,\n KERBEROS = 2,\n DIGEST = 3,\n OPENID = 4,\n SAML = 5,\n OAUTH_2_0 = 6,\n PAP = 7,\n CHAP = 8,\n EAP = 9,\n RADIUS = 10,\n BASIC_AUTHENTICATION = 11,\n LDAP = 12,\n OTHER = 99,\n}\n\n/** The published CAPTION for each id — what `auth_protocol` must carry when the id is not `Other`. */\nconst OCSF_AUTH_PROTOCOL_CAPTION: Readonly<Record<OcsfAuthProtocolId, string>> = {\n [OcsfAuthProtocolId.UNKNOWN]: 'Unknown',\n [OcsfAuthProtocolId.NTLM]: 'NTLM',\n [OcsfAuthProtocolId.KERBEROS]: 'Kerberos',\n [OcsfAuthProtocolId.DIGEST]: 'Digest',\n [OcsfAuthProtocolId.OPENID]: 'OpenID',\n [OcsfAuthProtocolId.SAML]: 'SAML',\n [OcsfAuthProtocolId.OAUTH_2_0]: 'OAUTH 2.0',\n [OcsfAuthProtocolId.PAP]: 'PAP',\n [OcsfAuthProtocolId.CHAP]: 'CHAP',\n [OcsfAuthProtocolId.EAP]: 'EAP',\n [OcsfAuthProtocolId.RADIUS]: 'RADIUS',\n [OcsfAuthProtocolId.BASIC_AUTHENTICATION]: 'Basic Authentication',\n [OcsfAuthProtocolId.LDAP]: 'LDAP',\n [OcsfAuthProtocolId.OTHER]: 'Other',\n};\n\n/**\n * The `AuthMethod` members that ARE a protocol OCSF normalises. Everything else resolves to `Other`.\n *\n * Deliberately partial. Three members are absent for a reason, and each absence is a decision:\n *\n * - `PASSWORD` is NOT `Basic Authentication` (11). Basic Auth is an HTTP transport scheme (RFC 7617);\n * a user typing a password into a form is not that, and the resemblance is only in the English word.\n * - `MAGIC_LINK`, `TOTP`, `SMS_OTP`, `EMAIL_OTP` and `PASSKEY` name no protocol in the published enum.\n * WebAuthn/FIDO2 in particular is absent from OCSF 1.9.0 — mapping a passkey to `Other` is the\n * accurate answer, not a shortfall.\n * - `EXTERNAL_OAUTH2` DOES map: it is OAuth 2.0 by construction.\n *\n * The `ORG_` prefix on the SSO members is SCOPE, not protocol — an organization-restricted SAML login\n * is still SAML — so those normalise cleanly.\n */\nconst OCSF_AUTH_PROTOCOL_BY_AUTH_METHOD: Readonly<Partial<Record<AuthMethod, OcsfAuthProtocolId>>> = {\n [AuthMethod.ORG_SAML]: OcsfAuthProtocolId.SAML,\n [AuthMethod.ORG_OPENID_CONNECT]: OcsfAuthProtocolId.OPENID,\n [AuthMethod.EXTERNAL_OAUTH2]: OcsfAuthProtocolId.OAUTH_2_0,\n};\n\n/** `auth_protocol` + `auth_protocol_id`, resolved together because the schema couples them. */\nexport interface OcsfAuthProtocol {\n readonly protocol: string;\n readonly protocolId: OcsfAuthProtocolId;\n}\n\n/**\n * Resolve the OCSF protocol pair for an envelope's `authMethod`.\n *\n * The two attributes are resolved TOGETHER because the schema defines one in terms of the other: when\n * the id is normalised, the string must be that id's published caption; only under `Other` may the\n * string be the producer's own value. Returning them separately invites the pairing to drift, which is\n * exactly how this shipped wrong the first time (`org_saml` with no id at all).\n *\n * `authMethod` is an OPEN string on the envelope — applications define their own — so anything outside\n * the framework's own `AuthMethod` vocabulary lands on `Other` carrying its raw value, which is\n * precisely what `Other` is for.\n */\nexport function resolveOcsfAuthProtocol(authMethod: string): OcsfAuthProtocol {\n const normalised = OCSF_AUTH_PROTOCOL_BY_AUTH_METHOD[authMethod as AuthMethod];\n return normalised === undefined\n ? { protocol: authMethod, protocolId: OcsfAuthProtocolId.OTHER }\n : { protocol: OCSF_AUTH_PROTOCOL_CAPTION[normalised], protocolId: normalised };\n}\n\n/**\n * The CRUD verb an API Activity (6003) event performed, mapped from the framework's core operation.\n *\n * spec-cite: OCSF 1.9.0 — `api_activity.activity_id` enum: 0 Unknown, 1 Create, 2 Read, 3 Update,\n * 4 Delete, 99 Other.\n *\n * The bulk forms collapse onto their singular verb: OCSF's activity names WHAT was done, and the\n * cardinality is carried separately by the envelope (`isBulkOperation` / `affectedRecordCount`).\n * `COUNT` is a Read — it answers a question about existing rows without changing any.\n */\nconst OCSF_API_ACTIVITY_BY_CORE_OPERATION: Readonly<Record<CoreResourceOperation, OcsfApiActivity>> = {\n [CoreResourceOperation.CREATE]: OcsfApiActivity.CREATE,\n [CoreResourceOperation.CREATE_MANY]: OcsfApiActivity.CREATE,\n [CoreResourceOperation.READ]: OcsfApiActivity.READ,\n [CoreResourceOperation.LIST]: OcsfApiActivity.READ,\n [CoreResourceOperation.SEARCH]: OcsfApiActivity.READ,\n [CoreResourceOperation.COUNT]: OcsfApiActivity.READ,\n [CoreResourceOperation.UPDATE]: OcsfApiActivity.UPDATE,\n [CoreResourceOperation.UPDATE_MANY]: OcsfApiActivity.UPDATE,\n [CoreResourceOperation.DELETE]: OcsfApiActivity.DELETE,\n [CoreResourceOperation.DELETE_MANY]: OcsfApiActivity.DELETE,\n};\n\n/**\n * The `eventData` keys that can name a 6003 event's CRUD verb, in precedence order.\n *\n * Three keys rather than one because the emitters spell it differently and each is authoritative for\n * its own event: `resourceOperationLike` is the core semantics a CUSTOM verb borrows (a `suspend`\n * behaving as an `update`), `operationIdentifier` is the verb on resource-operation and field-access\n * events, and `operation` is what `logSystemContextWrite` records — typed `CREATE | UPDATE |\n * UPDATE_MANY`, so it always resolves.\n *\n * Enumerated by the QUESTION (\"what names the verb on a 6003 event?\") rather than by one emitter's\n * field name, which is how `operation` was missed on the first pass.\n */\nconst OCSF_API_VERB_EVENT_DATA_KEYS = ['resourceOperationLike', 'operationIdentifier', 'operation'] as const;\n\n/**\n * Refine a 6003 event's `activity_id` from RUNTIME data, when the event type alone cannot say.\n *\n * Class 6003 is organised around the CRUD axis, and the resource-operation events (`performed` /\n * `denied`) are the bulk of what we route there — yet the event TYPE is the same string for a create\n * and a delete. So the table maps them to `Other`, and every authorization event landed in one\n * undifferentiated bucket: the same collapse `activity_id` being pinned to `Unknown` used to cause,\n * surviving one layer down after that was fixed.\n *\n * The verb is in the envelope — under one of {@link OCSF_API_VERB_EVENT_DATA_KEYS}, in that precedence\n * order. Anything else (a custom verb borrowing nothing) keeps `Other`, where `activity_name` already\n * carries the event type.\n *\n * Two consequences that are DECISIONS, not side effects:\n *\n * - **`FIELD_ACCESS` refines away from its static `Read`.** It carries `operationIdentifier`, so a\n * secret exposed during a create now reads as Create(1). That is correct: 6003's activity names what\n * the API CALL did, and the field-access nature rides `metadata.event_code`. The static `Read` remains\n * the fallback for an emission that names no operation.\n * - **`SYSTEM_CONTEXT_WRITE` stops being `Other`.** Its table comment says \"neither Create nor Update is\n * true of every emission\" — true of a STATIC mapping and not a permanent conclusion, because at\n * runtime `operation` says exactly which. This matters more than most: it is the ACL-bypass write.\n */\nexport function refineOcsfApiActivity(eventData: unknown, fallback: number): number {\n if (eventData === null || typeof eventData !== 'object') return fallback;\n const record = eventData as Readonly<Record<string, unknown>>;\n for (const key of OCSF_API_VERB_EVENT_DATA_KEYS) {\n const candidate = record[key];\n if (typeof candidate !== 'string') continue;\n const mapped = OCSF_API_ACTIVITY_BY_CORE_OPERATION[candidate as CoreResourceOperation];\n if (mapped !== undefined) return mapped;\n }\n return fallback;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"application-config-controller.backend.service.d.ts","sourceRoot":"","sources":["../../../../../src/config/custom/application-config-controller.backend.service.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAG1B,OAAO,EAAE,gCAAgC,EAAE,MAAM,0FAA0F,CAAC;AAC5I,OAAO,EAAE,uBAAuB,EAAE,MAAM,sEAAsE,CAAC;AAE/G,OAAO,EAAE,aAAa,EAAE,MAAM,8DAA8D,CAAC;AAC7F,OAAO,EAAE,0BAA0B,EAAE,MAAM,kEAAkE,CAAC;AAC9G,OAAO,EAAE,mBAAmB,EAAE,MAAM,kEAAkE,CAAC;AAEvG,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,mFAAmF,CAAC;AAUzI;;;;;;;;;;GAUG;AAEH,qBACa,yCAA0C,SAAQ,gCAAgC;IAE7F,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAA0B;IAC3D,OAAO,CAAC,QAAQ,CAAC,wBAAwB,CAAkC;gBAItC,MAAM,EAAE,aAAa,EACR,YAAY,EAAE,0BAA0B,EACxC,YAAY,EAAE,mBAAmB,EACpC,gBAAgB,EAAE,uBAAuB,EAC1B,wBAAwB,EAAE,+BAA+B;IAOvH;;OAEG;IACH,SAAS,CAAC,WAAW,IAAI,IAAI;IAO7B;;;OAGG;YACW,oBAAoB;CAsEnC"}
1
+ {"version":3,"file":"application-config-controller.backend.service.d.ts","sourceRoot":"","sources":["../../../../../src/config/custom/application-config-controller.backend.service.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAG1B,OAAO,EAAE,gCAAgC,EAAE,MAAM,0FAA0F,CAAC;AAC5I,OAAO,EAAE,uBAAuB,EAAE,MAAM,sEAAsE,CAAC;AAE/G,OAAO,EAAE,aAAa,EAAE,MAAM,8DAA8D,CAAC;AAC7F,OAAO,EAAE,0BAA0B,EAAE,MAAM,kEAAkE,CAAC;AAC9G,OAAO,EAAE,mBAAmB,EAAE,MAAM,kEAAkE,CAAC;AAEvG,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,mFAAmF,CAAC;AAUzI;;;;;;;;;;GAUG;AAEH,qBACa,yCAA0C,SAAQ,gCAAgC;IAE7F,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAA0B;IAC3D,OAAO,CAAC,QAAQ,CAAC,wBAAwB,CAAkC;gBAItC,MAAM,EAAE,aAAa,EACR,YAAY,EAAE,0BAA0B,EACxC,YAAY,EAAE,mBAAmB,EACpC,gBAAgB,EAAE,uBAAuB,EAC1B,wBAAwB,EAAE,+BAA+B;IAOvH;;OAEG;IACH,SAAS,CAAC,WAAW,IAAI,IAAI;IAO7B;;;OAGG;YACW,oBAAoB;CA+EnC"}
@@ -78,7 +78,13 @@ let ApplicationConfigControllerBackendService = class ApplicationConfigControlle
78
78
  }
79
79
  // The shared projection remains frontend-service agnostic, but the caller
80
80
  // must prove it is requesting config for a declared frontend surface.
81
- const sharedConfig = ApplicationUtils.toAppConfiguration_Shared(backendConfig);
81
+ /*
82
+ * The application id rides along so the client can name the `app` room for an
83
+ * APPLICATION-scoped resource. Nothing else published it — not this payload, not the access
84
+ * token — so a client could be confirmed in `org`/`user` rooms while the server pushed that
85
+ * resource's changes to `app`, and receive nothing (issue #283).
86
+ */
87
+ const sharedConfig = ApplicationUtils.toAppConfiguration_Shared(backendConfig, this.appConfigService.isInitialized() ? this.appConfigService.applicationId : undefined);
82
88
  const frontendType = backendConfig.frontendServices?.[frontendServiceName]?.frontendType;
83
89
  const frontendProvidersPayload = frontendType
84
90
  ? await this.frontendBootstrapService.buildPayload({
@@ -1 +1 @@
1
- {"version":3,"file":"application-config-controller.backend.service.js","sourceRoot":"","sources":["../../../../../src/config/custom/application-config-controller.backend.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAE/C,OAAO,EAAE,gCAAgC,EAAE,MAAM,0FAA0F,CAAC;AAC5I,OAAO,EAAE,uBAAuB,EAAE,MAAM,sEAAsE,CAAC;AAC/G,OAAO,EAAE,gBAAgB,EAAE,MAAM,oEAAoE,CAAC;AACtG,OAAO,EAAE,aAAa,EAAE,MAAM,8DAA8D,CAAC;AAC7F,OAAO,EAAE,0BAA0B,EAAE,MAAM,kEAAkE,CAAC;AAC9G,OAAO,EAAE,mBAAmB,EAAE,MAAM,kEAAkE,CAAC;AACvG,OAAO,EAAE,mBAAmB,EAAE,M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B,CAAC,CAAA;IAC9C,WAAA,MAAM,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,CAAA;IAC3C,WAAA,MAAM,CAAC,kBAAkB,CAAC,+BAA+B,CAAC,CAAA;qCAJhB,aAAa;QACM,0BAA0B;QAC1B,mBAAmB;QAClB,uBAAuB;GAV7E,yCAAyC,CAsGrD","sourcesContent":["import 'reflect-metadata';\nimport { injectable, inject } from 'inversify';\nimport { Request, Response, NextFunction } from 'express';\nimport { AbstractControllerBackendService } from '~wildo-backend-lib/base-classes/services/controllers/abstract-controller.backend.service';\nimport { AppConfigurationService } from '~wildo-backend-lib/config/services/app-configuration.backend.service';\nimport { ApplicationUtils } from '~wildo-backend-lib/config/services/app-configuration.backend.utils';\nimport { LoggerService } from '~wildo-backend-lib/monitoring/logger/services/logger.service';\nimport { ErrorBuilderBackendService } from '~wildo-backend-lib/errors/services/error-builder.backend.service';\nimport { ErrorHandlerService } from '~wildo-backend-lib/errors/services/error-handler.backend.service';\nimport { describeCaughtError } from '~wildo-backend-lib/errors/utils/error-log-level-classification.backend.utils';\nimport type { FrontendBootstrapBackendService } from '~wildo-backend-lib/external-providers/services/frontend-bootstrap.backend.service';\nimport { SAAS_SERVICE_TYPES } from '~wildo-backend-lib/inject/models/service-types';\nimport {\n AppConfiguration_FrontendBootstrapResponse_Schema,\n MANUAL_CONTROLLER_ROUTES_URLS,\n ManualControllerRouteKey,\n ErrorType,\n ErrorCustomMessageReference,\n} from '@wildo-ai/saas-models';\n\n/**\n * Application Config Controller Backend Service\n *\n * Provides HTTP endpoints for serving application configuration\n * to frontend applications. Transforms backend config to frontend-safe\n * shared configuration using ApplicationUtils.\n *\n * Endpoints:\n * - GET /application-config?frontendServiceName=<name> - Returns frontend-safe application configuration\n * Requires the query parameter to match a configured frontend service identity\n */\n\n@injectable()\nexport class ApplicationConfigControllerBackendService extends AbstractControllerBackendService {\n\n private readonly appConfigService: AppConfigurationService;\n private readonly frontendBootstrapService: FrontendBootstrapBackendService;\n\n\n constructor(\n @inject(SAAS_SERVICE_TYPES.Logger) logger: LoggerService,\n @inject(SAAS_SERVICE_TYPES.ErrorBuilderService) errorBuilder: ErrorBuilderBackendService,\n @inject(SAAS_SERVICE_TYPES.ErrorHandlerService) errorHandler: ErrorHandlerService,\n @inject(SAAS_SERVICE_TYPES.AppConfigService) appConfigService: AppConfigurationService,\n @inject(SAAS_SERVICE_TYPES.FrontendBootstrapBackendService) frontendBootstrapService: FrontendBootstrapBackendService,\n ) {\n super(logger, errorBuilder, errorHandler, 'ApplicationConfigController');\n this.appConfigService = appConfigService;\n this.frontendBootstrapService = frontendBootstrapService;\n }\n\n /**\n * Setup routes for application config endpoints\n */\n protected setupRoutes(): void {\n // GET /application-config?frontendServiceName=<name> - Get frontend-safe application configuration\n this.router.get(MANUAL_CONTROLLER_ROUTES_URLS[ManualControllerRouteKey.APPLICATION_CONFIG_GET], this.asyncHandler(this.getApplicationConfig.bind(this)));\n\n this.logRouteRegistration('GET', MANUAL_CONTROLLER_ROUTES_URLS[ManualControllerRouteKey.APPLICATION_CONFIG_GET], 'Get frontend-safe application configuration (requires frontendServiceName query param)');\n }\n\n /**\n * Get application configuration for frontends\n * @param frontendServiceName - Frontend service identity from query parameter (required)\n */\n private async getApplicationConfig(req: Request, res: Response, next: NextFunction): Promise<void> {\n try {\n // Extract and validate frontendServiceName query parameter\n const frontendServiceNameParam = req.query.frontendServiceName as string;\n\n if (!frontendServiceNameParam) {\n this.logDebug('Missing frontendServiceName query parameter');\n const error = this.errorBuilder.buildError( ErrorType.VALIDATION, undefined,\n { customMessageReference: ErrorCustomMessageReference.APP_CONFIGURATION_FRONTEND_SERVICE_REQUIRED } );\n return this.jsonError(res, error);\n }\n\n const frontendServiceName = frontendServiceNameParam as string;\n\n this.logDebug('Getting application configuration for frontend', { frontendServiceName });\n\n // Get the backend application configuration\n const backendConfig = this.appConfigService.config;\n if (!backendConfig.frontendServices?.[frontendServiceName]) {\n const error = this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.APP_CONFIGURATION_UNKNOWN_FRONTEND_SERVICE,\n context: {\n // diagnostic (log-only)\n frontendServiceName,\n availableFrontendServices: Object.keys(backendConfig.frontendServices ?? {}),\n },\n });\n return this.jsonError(res, error);\n }\n\n // The shared projection remains frontend-service agnostic, but the caller\n // must prove it is requesting config for a declared frontend surface.\n const sharedConfig = ApplicationUtils.toAppConfiguration_Shared(backendConfig);\n const frontendType =\n backendConfig.frontendServices?.[frontendServiceName]?.frontendType;\n const frontendProvidersPayload = frontendType\n ? await this.frontendBootstrapService.buildPayload({\n frontendType,\n frontendServiceName,\n })\n : { frontendProviders: { providers: {} } };\n const frontendConfig = AppConfiguration_FrontendBootstrapResponse_Schema.parse({\n ...sharedConfig,\n ...frontendProvidersPayload,\n });\n\n this.logDebug('Application configuration transformed for frontend', {\n frontendServiceName,\n hasAppIdentity: !!frontendConfig.appIdentity,\n hasAppPreferences: !!frontendConfig.appPreferences,\n hasRuntime: !!frontendConfig.runtime,\n hasAuth: !!frontendConfig.auth,\n hasCompliance: !!frontendConfig.compliance,\n hasApiJwtPublicKey: !!frontendConfig.apiJwtPublicKey,\n endpointsCount: Object.keys(frontendConfig.runtime?.endPoints || {}).length,\n frontendProvidersCount: Object.keys(frontendConfig.frontendProviders?.providers || {}).length,\n });\n\n // Send successful response\n this.jsonSuccess(res, frontendConfig);\n\n } catch (error) {\n this.logDebug('Failed to get application configuration', {\n error: describeCaughtError(error)\n });\n\n // Error will be handled by the unified error handler middleware\n throw error;\n }\n }\n}\n"]}
1
+ {"version":3,"file":"application-config-controller.backend.service.js","sourceRoot":"","sources":["../../../../../src/config/custom/application-config-controller.backend.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAE/C,OAAO,EAAE,gCAAgC,EAAE,MAAM,0FAA0F,CAAC;AAC5I,OA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,CAAC;QAExC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,CAAC,QAAQ,CAAC,yCAAyC,EAAE;gBACvD,KAAK,EAAE,mBAAmB,CAAC,KAAK,CAAC;aAClC,CAAC,CAAC;YAEH,gEAAgE;YAChE,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC;CACF,CAAA;AA/GY,yCAAyC;IADrD,UAAU,EAAE;IAQR,WAAA,MAAM,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAA;IACjC,WAAA,MAAM,CAAC,kBAAkB,CAAC,mBAAmB,CAAC,CAAA;IAC9C,WAAA,MAAM,CAAC,kBAAkB,CAAC,mBAAmB,CAAC,CAAA;IAC9C,WAAA,MAAM,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,CAAA;IAC3C,WAAA,MAAM,CAAC,kBAAkB,CAAC,+BAA+B,CAAC,CAAA;qCAJhB,aAAa;QACM,0BAA0B;QAC1B,mBAAmB;QAClB,uBAAuB;GAV7E,yCAAyC,CA+GrD","sourcesContent":["import 'reflect-metadata';\nimport { injectable, inject } from 'inversify';\nimport { Request, Response, NextFunction } from 'express';\nimport { AbstractControllerBackendService } from '~wildo-backend-lib/base-classes/services/controllers/abstract-controller.backend.service';\nimport { AppConfigurationService } from '~wildo-backend-lib/config/services/app-configuration.backend.service';\nimport { ApplicationUtils } from '~wildo-backend-lib/config/services/app-configuration.backend.utils';\nimport { LoggerService } from '~wildo-backend-lib/monitoring/logger/services/logger.service';\nimport { ErrorBuilderBackendService } from '~wildo-backend-lib/errors/services/error-builder.backend.service';\nimport { ErrorHandlerService } from '~wildo-backend-lib/errors/services/error-handler.backend.service';\nimport { describeCaughtError } from '~wildo-backend-lib/errors/utils/error-log-level-classification.backend.utils';\nimport type { FrontendBootstrapBackendService } from '~wildo-backend-lib/external-providers/services/frontend-bootstrap.backend.service';\nimport { SAAS_SERVICE_TYPES } from '~wildo-backend-lib/inject/models/service-types';\nimport {\n AppConfiguration_FrontendBootstrapResponse_Schema,\n MANUAL_CONTROLLER_ROUTES_URLS,\n ManualControllerRouteKey,\n ErrorType,\n ErrorCustomMessageReference,\n} from '@wildo-ai/saas-models';\n\n/**\n * Application Config Controller Backend Service\n *\n * Provides HTTP endpoints for serving application configuration\n * to frontend applications. Transforms backend config to frontend-safe\n * shared configuration using ApplicationUtils.\n *\n * Endpoints:\n * - GET /application-config?frontendServiceName=<name> - Returns frontend-safe application configuration\n * Requires the query parameter to match a configured frontend service identity\n */\n\n@injectable()\nexport class ApplicationConfigControllerBackendService extends AbstractControllerBackendService {\n\n private readonly appConfigService: AppConfigurationService;\n private readonly frontendBootstrapService: FrontendBootstrapBackendService;\n\n\n constructor(\n @inject(SAAS_SERVICE_TYPES.Logger) logger: LoggerService,\n @inject(SAAS_SERVICE_TYPES.ErrorBuilderService) errorBuilder: ErrorBuilderBackendService,\n @inject(SAAS_SERVICE_TYPES.ErrorHandlerService) errorHandler: ErrorHandlerService,\n @inject(SAAS_SERVICE_TYPES.AppConfigService) appConfigService: AppConfigurationService,\n @inject(SAAS_SERVICE_TYPES.FrontendBootstrapBackendService) frontendBootstrapService: FrontendBootstrapBackendService,\n ) {\n super(logger, errorBuilder, errorHandler, 'ApplicationConfigController');\n this.appConfigService = appConfigService;\n this.frontendBootstrapService = frontendBootstrapService;\n }\n\n /**\n * Setup routes for application config endpoints\n */\n protected setupRoutes(): void {\n // GET /application-config?frontendServiceName=<name> - Get frontend-safe application configuration\n this.router.get(MANUAL_CONTROLLER_ROUTES_URLS[ManualControllerRouteKey.APPLICATION_CONFIG_GET], this.asyncHandler(this.getApplicationConfig.bind(this)));\n\n this.logRouteRegistration('GET', MANUAL_CONTROLLER_ROUTES_URLS[ManualControllerRouteKey.APPLICATION_CONFIG_GET], 'Get frontend-safe application configuration (requires frontendServiceName query param)');\n }\n\n /**\n * Get application configuration for frontends\n * @param frontendServiceName - Frontend service identity from query parameter (required)\n */\n private async getApplicationConfig(req: Request, res: Response, next: NextFunction): Promise<void> {\n try {\n // Extract and validate frontendServiceName query parameter\n const frontendServiceNameParam = req.query.frontendServiceName as string;\n\n if (!frontendServiceNameParam) {\n this.logDebug('Missing frontendServiceName query parameter');\n const error = this.errorBuilder.buildError( ErrorType.VALIDATION, undefined,\n { customMessageReference: ErrorCustomMessageReference.APP_CONFIGURATION_FRONTEND_SERVICE_REQUIRED } );\n return this.jsonError(res, error);\n }\n\n const frontendServiceName = frontendServiceNameParam as string;\n\n this.logDebug('Getting application configuration for frontend', { frontendServiceName });\n\n // Get the backend application configuration\n const backendConfig = this.appConfigService.config;\n if (!backendConfig.frontendServices?.[frontendServiceName]) {\n const error = this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {\n customMessageReference: ErrorCustomMessageReference.APP_CONFIGURATION_UNKNOWN_FRONTEND_SERVICE,\n context: {\n // diagnostic (log-only)\n frontendServiceName,\n availableFrontendServices: Object.keys(backendConfig.frontendServices ?? {}),\n },\n });\n return this.jsonError(res, error);\n }\n\n // The shared projection remains frontend-service agnostic, but the caller\n // must prove it is requesting config for a declared frontend surface.\n /*\n * The application id rides along so the client can name the `app` room for an\n * APPLICATION-scoped resource. Nothing else published it — not this payload, not the access\n * token — so a client could be confirmed in `org`/`user` rooms while the server pushed that\n * resource's changes to `app`, and receive nothing (issue #283).\n */\n const sharedConfig = ApplicationUtils.toAppConfiguration_Shared(\n backendConfig,\n this.appConfigService.isInitialized() ? this.appConfigService.applicationId : undefined,\n );\n const frontendType =\n backendConfig.frontendServices?.[frontendServiceName]?.frontendType;\n const frontendProvidersPayload = frontendType\n ? await this.frontendBootstrapService.buildPayload({\n frontendType,\n frontendServiceName,\n })\n : { frontendProviders: { providers: {} } };\n const frontendConfig = AppConfiguration_FrontendBootstrapResponse_Schema.parse({\n ...sharedConfig,\n ...frontendProvidersPayload,\n });\n\n this.logDebug('Application configuration transformed for frontend', {\n frontendServiceName,\n hasAppIdentity: !!frontendConfig.appIdentity,\n hasAppPreferences: !!frontendConfig.appPreferences,\n hasRuntime: !!frontendConfig.runtime,\n hasAuth: !!frontendConfig.auth,\n hasCompliance: !!frontendConfig.compliance,\n hasApiJwtPublicKey: !!frontendConfig.apiJwtPublicKey,\n endpointsCount: Object.keys(frontendConfig.runtime?.endPoints || {}).length,\n frontendProvidersCount: Object.keys(frontendConfig.frontendProviders?.providers || {}).length,\n });\n\n // Send successful response\n this.jsonSuccess(res, frontendConfig);\n\n } catch (error) {\n this.logDebug('Failed to get application configuration', {\n error: describeCaughtError(error)\n });\n\n // Error will be handled by the unified error handler middleware\n throw error;\n }\n }\n}\n"]}
@@ -205,6 +205,7 @@ export declare const AppConfiguration_AppIdentity_Schema: z.ZodObject<{
205
205
  displayName: z.ZodOptional<z.ZodString>;
206
206
  description: z.ZodOptional<z.ZodString>;
207
207
  version: z.ZodString;
208
+ applicationId: z.ZodOptional<z.ZodString>;
208
209
  }, z.core.$strip>;
209
210
  export declare const AppConfiguration_AppPreferencesLanguage_Schema: z.ZodObject<{
210
211
  defaultLanguage: z.ZodDefault<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodEnum<typeof import("@wildo-ai/presets-components-models").AvailableLanguage>>>;
@@ -579,6 +580,7 @@ export declare const _AppConfiguration_AppManagedConfiguration_Schema: z.ZodObje
579
580
  displayName: z.ZodOptional<z.ZodString>;
580
581
  description: z.ZodOptional<z.ZodString>;
581
582
  version: z.ZodString;
583
+ applicationId: z.ZodOptional<z.ZodString>;
582
584
  }, z.core.$strip>;
583
585
  brandAssets: z.ZodOptional<z.ZodArray<z.ZodObject<{
584
586
  composition: z.ZodEnum<typeof import("@wildo-ai/saas-models").BrandAssetComposition>;
@@ -1232,6 +1234,7 @@ export declare const _AppConfiguration_Shape: {
1232
1234
  displayName: z.ZodOptional<z.ZodString>;
1233
1235
  description: z.ZodOptional<z.ZodString>;
1234
1236
  version: z.ZodString;
1237
+ applicationId: z.ZodOptional<z.ZodString>;
1235
1238
  }, z.core.$strip>;
1236
1239
  brandAssets: z.ZodOptional<z.ZodArray<z.ZodObject<{
1237
1240
  composition: z.ZodEnum<typeof import("@wildo-ai/saas-models").BrandAssetComposition>;
@@ -1742,6 +1745,7 @@ export declare const AppConfiguration_PreOverrideSeed_Schema: z.ZodObject<{
1742
1745
  displayName: z.ZodOptional<z.ZodString>;
1743
1746
  description: z.ZodOptional<z.ZodString>;
1744
1747
  version: z.ZodString;
1748
+ applicationId: z.ZodOptional<z.ZodString>;
1745
1749
  }, z.core.$strip>;
1746
1750
  brandAssets: z.ZodOptional<z.ZodArray<z.ZodObject<{
1747
1751
  composition: z.ZodEnum<typeof import("@wildo-ai/saas-models").BrandAssetComposition>;
@@ -1 +1 @@
1
- {"version":3,"file":"app-config.backend.schemas.d.ts","sourceRoot":"","sources":["../../../../../src/config/models/app-config.backend.schemas.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAUL,gBAAgB,EAKhB,kBAAkB,EAClB,gBAAgB,EAChB,iBAAiB,EAGlB,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,mBAAmB,EAA6B,MAAM,qEAAqE,CAAC;AA6DrI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,MAAM,WAAW,4BAA4B;IAC3C,cAAc,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,EAAE,CAAC;QAAC,KAAK,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;IACrD;2EACuE;IACvE,cAAc,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;IACvC;;;;;;;OAOG;IACH,IAAI,CAAC,EAAE,0BAA0B,CAAC;IAClC,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,8BAA8B;IACzC,0FAA0F;;IAE1F,sEAAsE;;CAE9D,CAAC;AAEX,MAAM,MAAM,0BAA0B,GAAG,CAAC,OA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CAAC;AACvG,MAAM,MAAM,wCAAwC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gDAAgD,CAAC,CAAC;AACxH,MAAM,MAAM,6CAA6C,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qDAAqD,CAAC,CAAC;AAClI,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mCAAmC,CAAC,CAAC;AAC5F,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8CAA8C,CAAC,CAAC"}
1
+ {"version":3,"file":"app-config.backend.schemas.d.ts","sourceRoot":"","sources":["../../../../../src/config/models/app-config.backend.schemas.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAUL,gBAAgB,EAKhB,kBAAkB,EAClB,gBAAgB,EAChB,iBAAiB,EAGlB,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,mBAAmB,EAA6B,MAAM,qEAAqE,CAAC;AA6DrI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,MAAM,WAAW,4BAA4B;IAC3C,cAAc,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,EAAE,CAAC;QAAC,KAAK,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;IACrD;2EACuE;IACvE,cAAc,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;IACvC;;;;;;;OAOG;IACH,IAAI,CAAC,EAAE,0BAA0B,CAAC;IAClC,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,8BAA8B;IACzC,0FAA0F;;IAE1F,sEAAsE;;CAE9D,CAAC;AAEX,MAAM,MAAM,0BAA0B,GAAG,CAAC,OAAO,8BAA8B,CAAC,CAAC,MAAM,OAAO,8BAA8B,CAAC,CAAC;AAS9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CAAC,OAAO,gDAAgD,CAAC,CAAC;AACxH,MAAM,MAAM,6CAA6C,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qDAAqD,CAAC,CAAC;AAClI,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mCAAmC,CAAC,CAAC;AAC5F,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8CAA8C,CAAC,CAAC"}
@@ -42,6 +42,15 @@ export declare class ApplicationUtils {
42
42
  * Filters out private/backend-only runtime endpoints and preserves only app-owned
43
43
  * frontend service entries keyed by frontend service identity.
44
44
  */
45
- static toAppConfiguration_Shared(config: AppConfiguration): AppConfiguration_Shared;
45
+ static toAppConfiguration_Shared(config: AppConfiguration,
46
+ /**
47
+ * The application's own id, which the AUTHORED configuration does not carry — it is runtime
48
+ * identity, resolved at startup, not something an application declares about itself. Passed in
49
+ * rather than read here so this projection stays a pure function of its input.
50
+ *
51
+ * Optional so every existing caller and fixture keeps working; an absent id simply leaves the
52
+ * field off, which is the pre-existing behaviour.
53
+ */
54
+ applicationId?: string): AppConfiguration_Shared;
46
55
  }
47
56
  //# sourceMappingURL=app-configuration.backend.utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"app-configuration.backend.utils.d.ts","sourceRoot":"","sources":["../../../../../src/config/services/app-configuration.backend.utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,gBAAgB,EAAE,MAAM,6DAA6D,CAAC;AAC/F,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AAIzE,MAAM,WAAW,6BAA6B;IAC5C,cAAc,CAAC,EAAE;QACf,SAAS,CAAC,EAAE;YACV,eAAe,CAAC,EAAE,MAAM,GAAG,iBAAiB,CAAC;YAC7C,gBAAgB,CAAC,EAAE,MAAM,GAAG,iBAAiB,CAAC;SAC/C,CAAC;KACH,CAAC;CACH;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,6BAA6B,GAAG,IAAI,GAAG,SAAS,GACvD,iBAAiB,CAOnB;AAED;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAC3C,MAAM,EAAE,6BAA6B,GAAG,IAAI,GAAG,SAAS,GACvD,iBAAiB,CAOnB;AAkBD,qBAAa,gBAAgB;IAC3B;;;;OAIG;IACH,MAAM,CAAC,yBAAyB,CAAC,MAAM,EAAE,gBAAgB,GAAG,uBAAuB;CA8EpF"}
1
+ {"version":3,"file":"app-configuration.backend.utils.d.ts","sourceRoot":"","sources":["../../../../../src/config/services/app-configuration.backend.utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,gBAAgB,EAAE,MAAM,6DAA6D,CAAC;AAC/F,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AAIzE,MAAM,WAAW,6BAA6B;IAC5C,cAAc,CAAC,EAAE;QACf,SAAS,CAAC,EAAE;YACV,eAAe,CAAC,EAAE,MAAM,GAAG,iBAAiB,CAAC;YAC7C,gBAAgB,CAAC,EAAE,MAAM,GAAG,iBAAiB,CAAC;SAC/C,CAAC;KACH,CAAC;CACH;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,6BAA6B,GAAG,IAAI,GAAG,SAAS,GACvD,iBAAiB,CAOnB;AAED;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAC3C,MAAM,EAAE,6BAA6B,GAAG,IAAI,GAAG,SAAS,GACvD,iBAAiB,CAOnB;AAkBD,qBAAa,gBAAgB;IAC3B;;;;OAIG;IACH,MAAM,CAAC,yBAAyB,CAC9B,MAAM,EAAE,gBAAgB;IACxB;;;;;;;OAOG;IACH,aAAa,CAAC,EAAE,MAAM,GACrB,uBAAuB;CAgF3B"}
@@ -59,7 +59,16 @@ export class ApplicationUtils {
59
59
  * Filters out private/backend-only runtime endpoints and preserves only app-owned
60
60
  * frontend service entries keyed by frontend service identity.
61
61
  */
62
- static toAppConfiguration_Shared(config) {
62
+ static toAppConfiguration_Shared(config,
63
+ /**
64
+ * The application's own id, which the AUTHORED configuration does not carry — it is runtime
65
+ * identity, resolved at startup, not something an application declares about itself. Passed in
66
+ * rather than read here so this projection stays a pure function of its input.
67
+ *
68
+ * Optional so every existing caller and fixture keeps working; an absent id simply leaves the
69
+ * field off, which is the pre-existing behaviour.
70
+ */
71
+ applicationId) {
63
72
  const { appIdentity, brandAssets, appPreferences, runtime, auth, userTypes, frontendServices, organizationTypes, compliance, billing, analytics, lifecycle, } = config;
64
73
  const runtime_endPoints = runtime.endPoints;
65
74
  // Keep only shared endpoints by excluding platform-private keys.
@@ -88,7 +97,9 @@ export class ApplicationUtils {
88
97
  return [typeName, { ...typeDef, auth: frontendAuth }];
89
98
  }));
90
99
  return {
91
- appIdentity,
100
+ // The id is MERGED here rather than declared upstream: `appIdentity` is authored by the
101
+ // application, and this is runtime identity the client needs to name its own scope room.
102
+ appIdentity: applicationId ? { ...appIdentity, applicationId } : appIdentity,
92
103
  brandAssets,
93
104
  appPreferences,
94
105
  runtime: {
@@ -1 +1 @@
1
- {"version":3,"file":"app-configuration.backend.utils.js","sourceRoot":"","sources":["../../../../../src/config/services/app-configuration.backend.utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,wEAAwE,CAAC;AAGxG,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AACzE,OAAO,EAAE,uBAAuB,EAAE,MAAM,qEAAqE,CAAC;AAC9G,OAAO,EAAE,kCAAkC,EAAE,MAAM,uFAAuF,CAAC;AAW3I;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,4BAA4B,CAC1C,MAAwD;IAExD,MAAM,U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C,MAAM,eAAe,GAAG,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC,cAAc,CAAC,sBAAsB,CAAC,CAAC;QAEpF,6DAA6D;QAC7D,2FAA2F;QAC3F,MAAM,EACJ,qBAAqB,EAAE,6BAA6B,EACpD,eAAe,EACf,kBAAkB,EAAE,cAAc,EAAE,oBAAoB,EAAE,eAAe,EACzE,GAAG,UAAU,EACd,GAAG,IAAI,CAAC;QAET,8FAA8F;QAC9F,MAAM,iBAAiB,GAAG,MAAM,CAAC,WAAW,CAC1C,MAAM,CAAC,OAAO,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,QAAQ,EAAE,OAAO,CAAC,EAAE,EAAE;YAC1D,IAAI,CAAC,OAAO,EAAE,IAAI;gBAAE,OAAO,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;YAC/C,MAAM,EAAE,aAAa,EAAE,GAAG,EAAE,qBAAqB,EAAE,IAAI,EAAE,GAAG,YAAY,EAAE,GAAG,OAAO,CAAC,IAAW,CAAC;YACjG,OAAO,CAAC,QAAQ,EAAE,EAAE,GAAG,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC,CAAC;QACxD,CAAC,CAAC,CACH,CAAC;QAEF,OAAO;YACL,WAAW;YACX,WAAW;YACX,cAAc;YACd,OAAO,EAAE;gBACP,SAAS,EAAE,qCAAqC;aACjD;YACD,IAAI,EAAE;gBACJ,GAAG,UAAU;gBACb,qBAAqB,EAAE,gCAAgC,CAAC,IAAI,CAAC;aAC9D;YACD,SAAS,EAAE,iBAAiB;YAC5B,gBAAgB;YAChB,iBAAiB;YACjB,UAAU;YACV,OAAO;YACP,SAAS;YACT,SAAS;YACT,eAAe;SAChB,CAAC;IACJ,CAAC;CAEF","sourcesContent":["/**\n * Frontend Configuration Transformers Service\n *\n * Backend service to transform complete backend application configuration\n * into frontend-safe subsets for API endpoints.\n */\n\nimport { JwtPrivateKeys } from '~wildo-backend-lib/security/authentications/models/jwt.backend.schemas';\nimport { AppConfiguration } from '~wildo-backend-lib/config/models/app-config.backend.schemas';\nimport type { AppConfiguration_Shared } from '@wildo-ai/saas-models';\nimport { AvailableLanguage } from '@wildo-ai/saas-models/public-runtime';\nimport { PlatformApplicationType } from '~wildo-backend-lib/applications/models/applications.backend.schemas';\nimport { isEnabledSocialOAuth2LoginProvider } from '~wildo-backend-lib/security/authentications/utils/social-oauth2-purpose.backend.utils';\n\nexport interface AppPrimaryLanguageConfigShape {\n appPreferences?: {\n languages?: {\n defaultLanguage?: string | AvailableLanguage;\n fallbackLanguage?: string | AvailableLanguage;\n };\n };\n}\n\n/**\n * Resolve the SaaS application's authoring / primary locale from the\n * canonical app-config path.\n *\n * This is the single source of truth for generation-time label ownership:\n * app-label labellize, app-label translate, and email-label generation all\n * derive their primary locale from\n * `appPreferences.languages.defaultLanguage`.\n *\n * Runtime consumers may still serve ORG / user-selected locales from the\n * enabled-languages set, but when a pipeline needs \"the locale this SaaS owns\n * natively\", this helper is the contract.\n */\nexport function getConfiguredPrimaryLanguage(\n config: AppPrimaryLanguageConfigShape | null | undefined,\n): AvailableLanguage {\n const configured = config?.appPreferences?.languages?.defaultLanguage;\n if (configured !== undefined && !Object.values(AvailableLanguage).includes(configured as AvailableLanguage)) {\n throw new Error(`Invalid app primary language \"${String(configured)}\". Configure appPreferences.languages.defaultLanguage with a valid AvailableLanguage.`);\n }\n const found = Object.values(AvailableLanguage).find((value) => value === configured);\n return found ?? AvailableLanguage.EN;\n}\n\n/**\n * Resolve the runtime fallback locale from app config.\n *\n * If the configured fallback is absent or invalid, fall back to the configured\n * primary locale so backend runtime consumers never invent a separate default.\n */\nexport function getConfiguredFallbackLanguage(\n config: AppPrimaryLanguageConfigShape | null | undefined,\n): AvailableLanguage {\n const configured = config?.appPreferences?.languages?.fallbackLanguage;\n if (configured !== undefined && !Object.values(AvailableLanguage).includes(configured as AvailableLanguage)) {\n throw new Error(`Invalid app fallback language \"${String(configured)}\". Configure appPreferences.languages.fallbackLanguage with a valid AvailableLanguage.`);\n }\n const found = Object.values(AvailableLanguage).find((value) => value === configured);\n return found ?? getConfiguredPrimaryLanguage(config);\n}\n\nfunction buildPublicSocialOAuth2Providers(\n auth: AppConfiguration['auth'] | null | undefined,\n): Record<string, { displayName?: string }> {\n return Object.fromEntries(\n Object.entries(auth?.socialOAuth2Providers ?? {})\n .filter(([, providerConfig]) => isEnabledSocialOAuth2LoginProvider(providerConfig))\n .map(([providerRef, providerConfig]) => [\n providerRef,\n {\n displayName: providerConfig?.displayName,\n },\n ]),\n );\n}\n\n\nexport class ApplicationUtils {\n /**\n * Transforms backend application configuration to a frontend-safe shared payload.\n * Filters out private/backend-only runtime endpoints and preserves only app-owned\n * frontend service entries keyed by frontend service identity.\n */\n static toAppConfiguration_Shared(config: AppConfiguration): AppConfiguration_Shared {\n const {\n appIdentity,\n brandAssets,\n appPreferences,\n runtime,\n auth,\n userTypes,\n frontendServices,\n organizationTypes,\n compliance,\n billing,\n analytics,\n lifecycle,\n } = config;\n\n const runtime_endPoints = runtime.endPoints;\n\n // Keep only shared endpoints by excluding platform-private keys.\n // Config-defined frontend service endpoints pass through automatically.\n const platformTypes = new Set<string>(Object.values(PlatformApplicationType));\n const runtime_endPoints_frontend = Object.keys(runtime_endPoints).reduce((acc, key) => {\n if (!platformTypes.has(key)) {\n acc[key] = runtime_endPoints[key];\n }\n return acc;\n }, {} as typeof runtime_endPoints);\n\n // For frontend, expose only publicUrl; explicitly drop internalUrl\n const runtime_endPoints_frontend_publicOnly = Object.fromEntries(\n Object.entries(runtime_endPoints_frontend).map(([appKey, urls]) => [\n appKey,\n { publicUrl: urls?.publicUrl },\n ])\n ) as typeof runtime_endPoints_frontend;\n\n const apiJwtPublicKey = config.jwt.publicKey[JwtPrivateKeys.APPLICATION_AUTH_TOKEN];\n\n // Strip backend-only auth fields before sending to frontend.\n // Same pattern as runtime (stripping appCustomRoot, internalUrl, platform-only endpoints).\n const {\n socialOAuth2Providers: _privateSocialOAuth2Providers,\n passwordHashing,\n passkeyOperational, otpOperational, magicLinkOperational, totpOperational,\n ...sharedAuth\n } = auth;\n\n // W6.9: Strip backend-only fields from per-user-type auth policies before frontend projection\n const strippedUserTypes = Object.fromEntries(\n Object.entries(userTypes ?? {}).map(([typeName, typeDef]) => {\n if (!typeDef?.auth) return [typeName, typeDef];\n const { lockoutPolicy: _lp, maxConcurrentSessions: _mcs, ...frontendAuth } = typeDef.auth as any;\n return [typeName, { ...typeDef, auth: frontendAuth }];\n }),\n );\n\n return {\n appIdentity,\n brandAssets,\n appPreferences,\n runtime: {\n endPoints: runtime_endPoints_frontend_publicOnly\n },\n auth: {\n ...sharedAuth,\n socialOAuth2Providers: buildPublicSocialOAuth2Providers(auth),\n },\n userTypes: strippedUserTypes,\n frontendServices,\n organizationTypes,\n compliance,\n billing,\n analytics,\n lifecycle,\n apiJwtPublicKey,\n };\n }\n\n}\n"]}
1
+ {"version":3,"file":"app-configuration.backend.utils.js","sourceRoot":"","sources":["../../../../../src/config/services/app-configuration.backend.utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,wEAAwE,CAAC;AAGxG,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AACzE,OAAO,EAAE,uBAAuB,EAAE,MAAM,qEAAqE,CAAC;AAC9G,OAAO,EAAE,kCAAkC,EAAE,MAAM,uFAAuF,CAAC;AAW3I;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,4BAA4B,CAC1C,MAAwD;IAExD,MAAM,UAAU,GAAG,MAAM,EAAE,cAAc,EAAE,SAAS,EAAE,eAAe,CAAC;IACtE,IAAI,UAAU,KAAK,SAAS,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC,QAAQ,CAAC,UAA+B,CAAC,EAAE,CAAC;QAC5G,MAAM,IAAI,KAAK,CAAC,iCAAiC,MAAM,CAAC,UAAU,CAAC,uFAAuF,CAAC,CA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,GAAG,UAAU,EACd,GAAG,IAAI,CAAC;QAET,8FAA8F;QAC9F,MAAM,iBAAiB,GAAG,MAAM,CAAC,WAAW,CAC1C,MAAM,CAAC,OAAO,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,QAAQ,EAAE,OAAO,CAAC,EAAE,EAAE;YAC1D,IAAI,CAAC,OAAO,EAAE,IAAI;gBAAE,OAAO,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;YAC/C,MAAM,EAAE,aAAa,EAAE,GAAG,EAAE,qBAAqB,EAAE,IAAI,EAAE,GAAG,YAAY,EAAE,GAAG,OAAO,CAAC,IAAW,CAAC;YACjG,OAAO,CAAC,QAAQ,EAAE,EAAE,GAAG,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC,CAAC;QACxD,CAAC,CAAC,CACH,CAAC;QAEF,OAAO;YACL,wFAAwF;YACxF,yFAAyF;YACzF,WAAW,EAAE,aAAa,CAAC,CAAC,CAAC,EAAE,GAAG,WAAW,EAAE,aAAa,EAAE,CAAC,CAAC,CAAC,WAAW;YAC5E,WAAW;YACX,cAAc;YACd,OAAO,EAAE;gBACP,SAAS,EAAE,qCAAqC;aACjD;YACD,IAAI,EAAE;gBACJ,GAAG,UAAU;gBACb,qBAAqB,EAAE,gCAAgC,CAAC,IAAI,CAAC;aAC9D;YACD,SAAS,EAAE,iBAAiB;YAC5B,gBAAgB;YAChB,iBAAiB;YACjB,UAAU;YACV,OAAO;YACP,SAAS;YACT,SAAS;YACT,eAAe;SAChB,CAAC;IACJ,CAAC;CAEF","sourcesContent":["/**\n * Frontend Configuration Transformers Service\n *\n * Backend service to transform complete backend application configuration\n * into frontend-safe subsets for API endpoints.\n */\n\nimport { JwtPrivateKeys } from '~wildo-backend-lib/security/authentications/models/jwt.backend.schemas';\nimport { AppConfiguration } from '~wildo-backend-lib/config/models/app-config.backend.schemas';\nimport type { AppConfiguration_Shared } from '@wildo-ai/saas-models';\nimport { AvailableLanguage } from '@wildo-ai/saas-models/public-runtime';\nimport { PlatformApplicationType } from '~wildo-backend-lib/applications/models/applications.backend.schemas';\nimport { isEnabledSocialOAuth2LoginProvider } from '~wildo-backend-lib/security/authentications/utils/social-oauth2-purpose.backend.utils';\n\nexport interface AppPrimaryLanguageConfigShape {\n appPreferences?: {\n languages?: {\n defaultLanguage?: string | AvailableLanguage;\n fallbackLanguage?: string | AvailableLanguage;\n };\n };\n}\n\n/**\n * Resolve the SaaS application's authoring / primary locale from the\n * canonical app-config path.\n *\n * This is the single source of truth for generation-time label ownership:\n * app-label labellize, app-label translate, and email-label generation all\n * derive their primary locale from\n * `appPreferences.languages.defaultLanguage`.\n *\n * Runtime consumers may still serve ORG / user-selected locales from the\n * enabled-languages set, but when a pipeline needs \"the locale this SaaS owns\n * natively\", this helper is the contract.\n */\nexport function getConfiguredPrimaryLanguage(\n config: AppPrimaryLanguageConfigShape | null | undefined,\n): AvailableLanguage {\n const configured = config?.appPreferences?.languages?.defaultLanguage;\n if (configured !== undefined && !Object.values(AvailableLanguage).includes(configured as AvailableLanguage)) {\n throw new Error(`Invalid app primary language \"${String(configured)}\". Configure appPreferences.languages.defaultLanguage with a valid AvailableLanguage.`);\n }\n const found = Object.values(AvailableLanguage).find((value) => value === configured);\n return found ?? AvailableLanguage.EN;\n}\n\n/**\n * Resolve the runtime fallback locale from app config.\n *\n * If the configured fallback is absent or invalid, fall back to the configured\n * primary locale so backend runtime consumers never invent a separate default.\n */\nexport function getConfiguredFallbackLanguage(\n config: AppPrimaryLanguageConfigShape | null | undefined,\n): AvailableLanguage {\n const configured = config?.appPreferences?.languages?.fallbackLanguage;\n if (configured !== undefined && !Object.values(AvailableLanguage).includes(configured as AvailableLanguage)) {\n throw new Error(`Invalid app fallback language \"${String(configured)}\". Configure appPreferences.languages.fallbackLanguage with a valid AvailableLanguage.`);\n }\n const found = Object.values(AvailableLanguage).find((value) => value === configured);\n return found ?? getConfiguredPrimaryLanguage(config);\n}\n\nfunction buildPublicSocialOAuth2Providers(\n auth: AppConfiguration['auth'] | null | undefined,\n): Record<string, { displayName?: string }> {\n return Object.fromEntries(\n Object.entries(auth?.socialOAuth2Providers ?? {})\n .filter(([, providerConfig]) => isEnabledSocialOAuth2LoginProvider(providerConfig))\n .map(([providerRef, providerConfig]) => [\n providerRef,\n {\n displayName: providerConfig?.displayName,\n },\n ]),\n );\n}\n\n\nexport class ApplicationUtils {\n /**\n * Transforms backend application configuration to a frontend-safe shared payload.\n * Filters out private/backend-only runtime endpoints and preserves only app-owned\n * frontend service entries keyed by frontend service identity.\n */\n static toAppConfiguration_Shared(\n config: AppConfiguration,\n /**\n * The application's own id, which the AUTHORED configuration does not carry — it is runtime\n * identity, resolved at startup, not something an application declares about itself. Passed in\n * rather than read here so this projection stays a pure function of its input.\n *\n * Optional so every existing caller and fixture keeps working; an absent id simply leaves the\n * field off, which is the pre-existing behaviour.\n */\n applicationId?: string,\n ): AppConfiguration_Shared {\n const {\n appIdentity,\n brandAssets,\n appPreferences,\n runtime,\n auth,\n userTypes,\n frontendServices,\n organizationTypes,\n compliance,\n billing,\n analytics,\n lifecycle,\n } = config;\n\n const runtime_endPoints = runtime.endPoints;\n\n // Keep only shared endpoints by excluding platform-private keys.\n // Config-defined frontend service endpoints pass through automatically.\n const platformTypes = new Set<string>(Object.values(PlatformApplicationType));\n const runtime_endPoints_frontend = Object.keys(runtime_endPoints).reduce((acc, key) => {\n if (!platformTypes.has(key)) {\n acc[key] = runtime_endPoints[key];\n }\n return acc;\n }, {} as typeof runtime_endPoints);\n\n // For frontend, expose only publicUrl; explicitly drop internalUrl\n const runtime_endPoints_frontend_publicOnly = Object.fromEntries(\n Object.entries(runtime_endPoints_frontend).map(([appKey, urls]) => [\n appKey,\n { publicUrl: urls?.publicUrl },\n ])\n ) as typeof runtime_endPoints_frontend;\n\n const apiJwtPublicKey = config.jwt.publicKey[JwtPrivateKeys.APPLICATION_AUTH_TOKEN];\n\n // Strip backend-only auth fields before sending to frontend.\n // Same pattern as runtime (stripping appCustomRoot, internalUrl, platform-only endpoints).\n const {\n socialOAuth2Providers: _privateSocialOAuth2Providers,\n passwordHashing,\n passkeyOperational, otpOperational, magicLinkOperational, totpOperational,\n ...sharedAuth\n } = auth;\n\n // W6.9: Strip backend-only fields from per-user-type auth policies before frontend projection\n const strippedUserTypes = Object.fromEntries(\n Object.entries(userTypes ?? {}).map(([typeName, typeDef]) => {\n if (!typeDef?.auth) return [typeName, typeDef];\n const { lockoutPolicy: _lp, maxConcurrentSessions: _mcs, ...frontendAuth } = typeDef.auth as any;\n return [typeName, { ...typeDef, auth: frontendAuth }];\n }),\n );\n\n return {\n // The id is MERGED here rather than declared upstream: `appIdentity` is authored by the\n // application, and this is runtime identity the client needs to name its own scope room.\n appIdentity: applicationId ? { ...appIdentity, applicationId } : appIdentity,\n brandAssets,\n appPreferences,\n runtime: {\n endPoints: runtime_endPoints_frontend_publicOnly\n },\n auth: {\n ...sharedAuth,\n socialOAuth2Providers: buildPublicSocialOAuth2Providers(auth),\n },\n userTypes: strippedUserTypes,\n frontendServices,\n organizationTypes,\n compliance,\n billing,\n analytics,\n lifecycle,\n apiJwtPublicKey,\n };\n }\n\n}\n"]}
@@ -69,7 +69,7 @@ import type { DataSeedScopeResolverRegistryBackendService } from '../../../data-
69
69
  import { DataSeedScopeIterationStrategy } from '../../../data-seeding/models/data-seed.shared.schemas';
70
70
  /**
71
71
  * Page size for resource-table walks. Matches the schema cap on
72
- * `Resouces_PaginationRequestSchema.limit` (`max(100)`), which is the largest
72
+ * `Resources_PaginationRequestSchema.limit` (`max(100)`), which is the largest
73
73
  * value `repo.list({ paginated: true })` will accept. Going larger would be
74
74
  * silently rejected by the pagination Zod parse.
75
75
  */
@@ -159,7 +159,7 @@ export declare function iterateGlobal(): AsyncGenerator<DataSeedScopeIterationIt
159
159
  * the `DataSeedScopeIterationItem` union and instead consumes the bare
160
160
  * `{ relatedId }` form directly.
161
161
  *
162
- * Pagination is page-based (matches the `Resouces_PaginationRequestSchema`
162
+ * Pagination is page-based (matches the `Resources_PaginationRequestSchema`
163
163
  * `{ page, limit }` shape) — NOT skip-based. A page slip caused by
164
164
  * concurrent inserts/deletes is acceptable for cron seeding (the next tick
165
165
  * picks up the missed row); cursor-based stable pagination would add
@@ -69,7 +69,7 @@ import { DataSeedScopeIterationStrategy } from '../../../data-seeding/models/dat
69
69
  // --------------------------------------------------------------------------
70
70
  /**
71
71
  * Page size for resource-table walks. Matches the schema cap on
72
- * `Resouces_PaginationRequestSchema.limit` (`max(100)`), which is the largest
72
+ * `Resources_PaginationRequestSchema.limit` (`max(100)`), which is the largest
73
73
  * value `repo.list({ paginated: true })` will accept. Going larger would be
74
74
  * silently rejected by the pagination Zod parse.
75
75
  */
@@ -106,7 +106,7 @@ export async function* iterateGlobal() {
106
106
  * the `DataSeedScopeIterationItem` union and instead consumes the bare
107
107
  * `{ relatedId }` form directly.
108
108
  *
109
- * Pagination is page-based (matches the `Resouces_PaginationRequestSchema`
109
+ * Pagination is page-based (matches the `Resources_PaginationRequestSchema`
110
110
  * `{ page, limit }` shape) — NOT skip-based. A page slip caused by
111
111
  * concurrent inserts/deletes is acceptable for cron seeding (the next tick
112
112
  * picks up the missed row); cursor-based stable pagination would add