@wildo-ai/saas-backend-lib 1.1.12 → 1.1.13

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 (226) hide show
  1. package/dist/esm/base-classes/models/manual-controllers.backend.definition.d.ts.map +1 -1
  2. package/dist/esm/base-classes/models/manual-controllers.backend.definition.js +2 -0
  3. package/dist/esm/base-classes/models/manual-controllers.backend.definition.js.map +1 -1
  4. package/dist/esm/base-classes/services/repositories/stored-field-omission.backend.d.ts +4 -0
  5. package/dist/esm/base-classes/services/repositories/stored-field-omission.backend.d.ts.map +1 -1
  6. package/dist/esm/base-classes/services/repositories/stored-field-omission.backend.js +20 -5
  7. package/dist/esm/base-classes/services/repositories/stored-field-omission.backend.js.map +1 -1
  8. package/dist/esm/base-classes/services/services/resource-operation-custom-implementation-registry.backend.service.d.ts +3 -0
  9. package/dist/esm/base-classes/services/services/resource-operation-custom-implementation-registry.backend.service.d.ts.map +1 -1
  10. package/dist/esm/base-classes/services/services/resource-operation-custom-implementation-registry.backend.service.js +10 -1
  11. package/dist/esm/base-classes/services/services/resource-operation-custom-implementation-registry.backend.service.js.map +1 -1
  12. package/dist/esm/base-classes/services/services/resource-operation-custom-implementation.factory.backend.d.ts +22 -0
  13. package/dist/esm/base-classes/services/services/resource-operation-custom-implementation.factory.backend.d.ts.map +1 -1
  14. package/dist/esm/base-classes/services/services/resource-operation-custom-implementation.factory.backend.js +25 -1
  15. package/dist/esm/base-classes/services/services/resource-operation-custom-implementation.factory.backend.js.map +1 -1
  16. package/dist/esm/base-classes/services/services/resource-operation-transaction-persistence.backend.utils.d.ts +38 -3
  17. package/dist/esm/base-classes/services/services/resource-operation-transaction-persistence.backend.utils.d.ts.map +1 -1
  18. package/dist/esm/base-classes/services/services/resource-operation-transaction-persistence.backend.utils.js +68 -5
  19. package/dist/esm/base-classes/services/services/resource-operation-transaction-persistence.backend.utils.js.map +1 -1
  20. package/dist/esm/base-classes/services/services/resource-status-transition.custom-impl.backend.service.d.ts +2 -2
  21. package/dist/esm/base-classes/services/services/resource-status-transition.custom-impl.backend.service.d.ts.map +1 -1
  22. package/dist/esm/base-classes/services/services/resource-status-transition.custom-impl.backend.service.js +6 -3
  23. package/dist/esm/base-classes/services/services/resource-status-transition.custom-impl.backend.service.js.map +1 -1
  24. package/dist/esm/base-classes/services/services/services-registry-handler.backend.service.d.ts +83 -0
  25. package/dist/esm/base-classes/services/services/services-registry-handler.backend.service.d.ts.map +1 -1
  26. package/dist/esm/base-classes/services/services/services-registry-handler.backend.service.js +217 -14
  27. package/dist/esm/base-classes/services/services/services-registry-handler.backend.service.js.map +1 -1
  28. package/dist/esm/compliance/approval-seals/approval-seal-currency.backend.d.ts +32 -0
  29. package/dist/esm/compliance/approval-seals/approval-seal-currency.backend.d.ts.map +1 -0
  30. package/dist/esm/compliance/approval-seals/approval-seal-currency.backend.js +36 -0
  31. package/dist/esm/compliance/approval-seals/approval-seal-currency.backend.js.map +1 -0
  32. package/dist/esm/compliance/approval-seals/approval-seal-on-record.backend.d.ts +38 -0
  33. package/dist/esm/compliance/approval-seals/approval-seal-on-record.backend.d.ts.map +1 -0
  34. package/dist/esm/compliance/approval-seals/approval-seal-on-record.backend.js +83 -0
  35. package/dist/esm/compliance/approval-seals/approval-seal-on-record.backend.js.map +1 -0
  36. package/dist/esm/compliance/approval-seals/approval-seal-presentation-read.backend.d.ts +36 -0
  37. package/dist/esm/compliance/approval-seals/approval-seal-presentation-read.backend.d.ts.map +1 -0
  38. package/dist/esm/compliance/approval-seals/approval-seal-presentation-read.backend.js +51 -0
  39. package/dist/esm/compliance/approval-seals/approval-seal-presentation-read.backend.js.map +1 -0
  40. package/dist/esm/compliance/approval-seals/approval-seal-relay-store.backend.d.ts +46 -0
  41. package/dist/esm/compliance/approval-seals/approval-seal-relay-store.backend.d.ts.map +1 -1
  42. package/dist/esm/compliance/approval-seals/approval-seal-relay-store.backend.js +68 -0
  43. package/dist/esm/compliance/approval-seals/approval-seal-relay-store.backend.js.map +1 -1
  44. package/dist/esm/compliance/approval-seals/approval-seal-store.backend.d.ts +27 -0
  45. package/dist/esm/compliance/approval-seals/approval-seal-store.backend.d.ts.map +1 -1
  46. package/dist/esm/compliance/approval-seals/approval-seal-store.backend.js +42 -3
  47. package/dist/esm/compliance/approval-seals/approval-seal-store.backend.js.map +1 -1
  48. package/dist/esm/compliance/approval-seals/approval-seals-admin.backend.contracts.d.ts +26 -1
  49. package/dist/esm/compliance/approval-seals/approval-seals-admin.backend.contracts.d.ts.map +1 -1
  50. package/dist/esm/compliance/approval-seals/approval-seals-admin.backend.contracts.js +10 -0
  51. package/dist/esm/compliance/approval-seals/approval-seals-admin.backend.contracts.js.map +1 -1
  52. package/dist/esm/compliance/approval-seals/approval-seals-admin.backend.controller.d.ts +10 -1
  53. package/dist/esm/compliance/approval-seals/approval-seals-admin.backend.controller.d.ts.map +1 -1
  54. package/dist/esm/compliance/approval-seals/approval-seals-admin.backend.controller.js +60 -28
  55. package/dist/esm/compliance/approval-seals/approval-seals-admin.backend.controller.js.map +1 -1
  56. package/dist/esm/compliance/approval-seals/approval-seals-on-record.backend.controller.d.ts +90 -0
  57. package/dist/esm/compliance/approval-seals/approval-seals-on-record.backend.controller.d.ts.map +1 -0
  58. package/dist/esm/compliance/approval-seals/approval-seals-on-record.backend.controller.js +373 -0
  59. package/dist/esm/compliance/approval-seals/approval-seals-on-record.backend.controller.js.map +1 -0
  60. package/dist/esm/compliance/approval-seals/decision-presentation.backend.d.ts +29 -2
  61. package/dist/esm/compliance/approval-seals/decision-presentation.backend.d.ts.map +1 -1
  62. package/dist/esm/compliance/approval-seals/decision-presentation.backend.js +40 -3
  63. package/dist/esm/compliance/approval-seals/decision-presentation.backend.js.map +1 -1
  64. package/dist/esm/compliance/electronic-signatures/pdf-signature-structure.backend.d.ts.map +1 -1
  65. package/dist/esm/compliance/electronic-signatures/pdf-signature-structure.backend.js +34 -6
  66. package/dist/esm/compliance/electronic-signatures/pdf-signature-structure.backend.js.map +1 -1
  67. package/dist/esm/compliance/electronic-signatures/signature-request-evidence-files.backend.d.ts +30 -6
  68. package/dist/esm/compliance/electronic-signatures/signature-request-evidence-files.backend.d.ts.map +1 -1
  69. package/dist/esm/compliance/electronic-signatures/signature-request-evidence-files.backend.js +67 -22
  70. package/dist/esm/compliance/electronic-signatures/signature-request-evidence-files.backend.js.map +1 -1
  71. package/dist/esm/compliance/electronic-signatures/signature-request-poll.batch.backend.service.d.ts.map +1 -1
  72. package/dist/esm/compliance/electronic-signatures/signature-request-poll.batch.backend.service.js +18 -1
  73. package/dist/esm/compliance/electronic-signatures/signature-request-poll.batch.backend.service.js.map +1 -1
  74. package/dist/esm/compliance/electronic-signatures/signature-requests.backend.service.d.ts +66 -1
  75. package/dist/esm/compliance/electronic-signatures/signature-requests.backend.service.d.ts.map +1 -1
  76. package/dist/esm/compliance/electronic-signatures/signature-requests.backend.service.js +161 -14
  77. package/dist/esm/compliance/electronic-signatures/signature-requests.backend.service.js.map +1 -1
  78. package/dist/esm/compliance/electronic-signatures/signed-document-validation.backend.d.ts +47 -0
  79. package/dist/esm/compliance/electronic-signatures/signed-document-validation.backend.d.ts.map +1 -1
  80. package/dist/esm/compliance/electronic-signatures/signed-document-validation.backend.js.map +1 -1
  81. package/dist/esm/external-providers/services/content-safety.backend.service.d.ts +27 -2
  82. package/dist/esm/external-providers/services/content-safety.backend.service.d.ts.map +1 -1
  83. package/dist/esm/external-providers/services/content-safety.backend.service.js +46 -1
  84. package/dist/esm/external-providers/services/content-safety.backend.service.js.map +1 -1
  85. package/dist/esm/external-providers/services/embeddings.backend.service.d.ts.map +1 -1
  86. package/dist/esm/external-providers/services/embeddings.backend.service.js +2 -0
  87. package/dist/esm/external-providers/services/embeddings.backend.service.js.map +1 -1
  88. package/dist/esm/external-providers/services/external-providers-registry.backend.service.d.ts +11 -0
  89. package/dist/esm/external-providers/services/external-providers-registry.backend.service.d.ts.map +1 -1
  90. package/dist/esm/external-providers/services/external-providers-registry.backend.service.js +23 -0
  91. package/dist/esm/external-providers/services/external-providers-registry.backend.service.js.map +1 -1
  92. package/dist/esm/external-providers/services/provider-service-account-token.backend.d.ts +19 -1
  93. package/dist/esm/external-providers/services/provider-service-account-token.backend.d.ts.map +1 -1
  94. package/dist/esm/external-providers/services/provider-service-account-token.backend.js +41 -1
  95. package/dist/esm/external-providers/services/provider-service-account-token.backend.js.map +1 -1
  96. package/dist/esm/files/utils/file-parent-read-context.backend.d.ts +27 -2
  97. package/dist/esm/files/utils/file-parent-read-context.backend.d.ts.map +1 -1
  98. package/dist/esm/files/utils/file-parent-read-context.backend.js +23 -4
  99. package/dist/esm/files/utils/file-parent-read-context.backend.js.map +1 -1
  100. package/dist/esm/flows-actors/content-guardrails/classifier-availability.backend.utils.d.ts +26 -0
  101. package/dist/esm/flows-actors/content-guardrails/classifier-availability.backend.utils.d.ts.map +1 -1
  102. package/dist/esm/flows-actors/content-guardrails/classifier-availability.backend.utils.js +100 -8
  103. package/dist/esm/flows-actors/content-guardrails/classifier-availability.backend.utils.js.map +1 -1
  104. package/dist/esm/flows-actors/content-guardrails/record-owner-policy.backend.d.ts +3 -1
  105. package/dist/esm/flows-actors/content-guardrails/record-owner-policy.backend.d.ts.map +1 -1
  106. package/dist/esm/flows-actors/content-guardrails/record-owner-policy.backend.js +8 -2
  107. package/dist/esm/flows-actors/content-guardrails/record-owner-policy.backend.js.map +1 -1
  108. package/dist/esm/flows-actors/models/function-tools.backend.definitions.d.ts +43 -0
  109. package/dist/esm/flows-actors/models/function-tools.backend.definitions.d.ts.map +1 -1
  110. package/dist/esm/flows-actors/models/function-tools.backend.definitions.js +37 -0
  111. package/dist/esm/flows-actors/models/function-tools.backend.definitions.js.map +1 -1
  112. package/dist/esm/flows-actors/services/agent-work-decisions.backend.service.d.ts +7 -0
  113. package/dist/esm/flows-actors/services/agent-work-decisions.backend.service.d.ts.map +1 -1
  114. package/dist/esm/flows-actors/services/agent-work-decisions.backend.service.js +8 -3
  115. package/dist/esm/flows-actors/services/agent-work-decisions.backend.service.js.map +1 -1
  116. package/dist/esm/flows-actors/services/agents.backend.service.d.ts +31 -6
  117. package/dist/esm/flows-actors/services/agents.backend.service.d.ts.map +1 -1
  118. package/dist/esm/flows-actors/services/agents.backend.service.js +78 -30
  119. package/dist/esm/flows-actors/services/agents.backend.service.js.map +1 -1
  120. package/dist/esm/flows-actors/services/autonomous-agent-turn.backend.service.d.ts.map +1 -1
  121. package/dist/esm/flows-actors/services/autonomous-agent-turn.backend.service.js +4 -0
  122. package/dist/esm/flows-actors/services/autonomous-agent-turn.backend.service.js.map +1 -1
  123. package/dist/esm/flows-actors/services/conversational-execution.backend.service.d.ts +28 -2
  124. package/dist/esm/flows-actors/services/conversational-execution.backend.service.d.ts.map +1 -1
  125. package/dist/esm/flows-actors/services/conversational-execution.backend.service.js +132 -22
  126. package/dist/esm/flows-actors/services/conversational-execution.backend.service.js.map +1 -1
  127. package/dist/esm/flows-actors/services/flow-actor-executions.custom-impl.backend.service.d.ts.map +1 -1
  128. package/dist/esm/flows-actors/services/flow-actor-executions.custom-impl.backend.service.js +12 -8
  129. package/dist/esm/flows-actors/services/flow-actor-executions.custom-impl.backend.service.js.map +1 -1
  130. package/dist/esm/flows-actors/services/flows-actors-registry.service.d.ts +5 -0
  131. package/dist/esm/flows-actors/services/flows-actors-registry.service.d.ts.map +1 -1
  132. package/dist/esm/flows-actors/services/flows-actors-registry.service.js +18 -2
  133. package/dist/esm/flows-actors/services/flows-actors-registry.service.js.map +1 -1
  134. package/dist/esm/flows-actors/utils/acp-session-runner.backend.utils.d.ts +33 -0
  135. package/dist/esm/flows-actors/utils/acp-session-runner.backend.utils.d.ts.map +1 -1
  136. package/dist/esm/flows-actors/utils/acp-session-runner.backend.utils.js +58 -0
  137. package/dist/esm/flows-actors/utils/acp-session-runner.backend.utils.js.map +1 -1
  138. package/dist/esm/inbound/services/inbound-delivery-dispatch.backend.service.d.ts +12 -1
  139. package/dist/esm/inbound/services/inbound-delivery-dispatch.backend.service.d.ts.map +1 -1
  140. package/dist/esm/inbound/services/inbound-delivery-dispatch.backend.service.js +23 -4
  141. package/dist/esm/inbound/services/inbound-delivery-dispatch.backend.service.js.map +1 -1
  142. package/dist/esm/inbound/services/inbound-delivery-receiver.backend.service.d.ts +12 -1
  143. package/dist/esm/inbound/services/inbound-delivery-receiver.backend.service.d.ts.map +1 -1
  144. package/dist/esm/inbound/services/inbound-delivery-receiver.backend.service.js +55 -17
  145. package/dist/esm/inbound/services/inbound-delivery-receiver.backend.service.js.map +1 -1
  146. package/dist/esm/inbound/services/inbound-delivery-store.backend.service.d.ts +22 -1
  147. package/dist/esm/inbound/services/inbound-delivery-store.backend.service.d.ts.map +1 -1
  148. package/dist/esm/inbound/services/inbound-delivery-store.backend.service.js +52 -9
  149. package/dist/esm/inbound/services/inbound-delivery-store.backend.service.js.map +1 -1
  150. package/dist/esm/inbound/services/inbound-delivery-stored-body.backend.service.d.ts +79 -0
  151. package/dist/esm/inbound/services/inbound-delivery-stored-body.backend.service.d.ts.map +1 -0
  152. package/dist/esm/inbound/services/inbound-delivery-stored-body.backend.service.js +211 -0
  153. package/dist/esm/inbound/services/inbound-delivery-stored-body.backend.service.js.map +1 -0
  154. package/dist/esm/inbound/services/inbound-delivery-subject-erasure-severance.backend.d.ts +2 -2
  155. package/dist/esm/inbound/services/inbound-delivery-subject-erasure-severance.backend.d.ts.map +1 -1
  156. package/dist/esm/inbound/services/inbound-delivery-subject-erasure-severance.backend.js +9 -1
  157. package/dist/esm/inbound/services/inbound-delivery-subject-erasure-severance.backend.js.map +1 -1
  158. package/dist/esm/index.d.ts +1 -0
  159. package/dist/esm/index.d.ts.map +1 -1
  160. package/dist/esm/index.js +1 -0
  161. package/dist/esm/index.js.map +1 -1
  162. package/dist/esm/inject/models/container.d.ts.map +1 -1
  163. package/dist/esm/inject/models/container.js +6 -0
  164. package/dist/esm/inject/models/container.js.map +1 -1
  165. package/dist/esm/inject/models/service-types.d.ts +5 -0
  166. package/dist/esm/inject/models/service-types.d.ts.map +1 -1
  167. package/dist/esm/inject/models/service-types.js +3 -0
  168. package/dist/esm/inject/models/service-types.js.map +1 -1
  169. package/dist/esm/monitoring/observability/models/observability.backend.schemas.d.ts +5 -0
  170. package/dist/esm/monitoring/observability/models/observability.backend.schemas.d.ts.map +1 -1
  171. package/dist/esm/monitoring/observability/models/observability.backend.schemas.js.map +1 -1
  172. package/dist/esm/monitoring/observability/services/metrics.service.d.ts +34 -1
  173. package/dist/esm/monitoring/observability/services/metrics.service.d.ts.map +1 -1
  174. package/dist/esm/monitoring/observability/services/metrics.service.js +49 -0
  175. package/dist/esm/monitoring/observability/services/metrics.service.js.map +1 -1
  176. package/dist/esm/notifications/webhooks/controllers/webhook-auto-controller.backend.service.d.ts +6 -1
  177. package/dist/esm/notifications/webhooks/controllers/webhook-auto-controller.backend.service.d.ts.map +1 -1
  178. package/dist/esm/notifications/webhooks/controllers/webhook-auto-controller.backend.service.js +15 -4
  179. package/dist/esm/notifications/webhooks/controllers/webhook-auto-controller.backend.service.js.map +1 -1
  180. package/dist/esm/notifications/webhooks/outbound/services/m2m-webhook-delivery-log.custom-impl.backend.service.d.ts.map +1 -1
  181. package/dist/esm/notifications/webhooks/outbound/services/m2m-webhook-delivery-log.custom-impl.backend.service.js +3 -1
  182. package/dist/esm/notifications/webhooks/outbound/services/m2m-webhook-delivery-log.custom-impl.backend.service.js.map +1 -1
  183. package/dist/esm/runtime/services/http-server.backend.service.d.ts +3 -1
  184. package/dist/esm/runtime/services/http-server.backend.service.d.ts.map +1 -1
  185. package/dist/esm/runtime/services/http-server.backend.service.js +11 -3
  186. package/dist/esm/runtime/services/http-server.backend.service.js.map +1 -1
  187. package/dist/esm/runtime/services/utils/inbound-endpoint-raw-body.backend.utils.d.ts +22 -0
  188. package/dist/esm/runtime/services/utils/inbound-endpoint-raw-body.backend.utils.d.ts.map +1 -1
  189. package/dist/esm/runtime/services/utils/inbound-endpoint-raw-body.backend.utils.js +54 -0
  190. package/dist/esm/runtime/services/utils/inbound-endpoint-raw-body.backend.utils.js.map +1 -1
  191. package/dist/esm/security/authentications/services/auth-methods/auth-password-reset.backend.service.d.ts +51 -0
  192. package/dist/esm/security/authentications/services/auth-methods/auth-password-reset.backend.service.d.ts.map +1 -1
  193. package/dist/esm/security/authentications/services/auth-methods/auth-password-reset.backend.service.js +87 -15
  194. package/dist/esm/security/authentications/services/auth-methods/auth-password-reset.backend.service.js.map +1 -1
  195. package/dist/esm/security/authentications/services/custom-impls/siem-delivery-dlq.custom-impl.backend.service.d.ts.map +1 -1
  196. package/dist/esm/security/authentications/services/custom-impls/siem-delivery-dlq.custom-impl.backend.service.js +5 -2
  197. package/dist/esm/security/authentications/services/custom-impls/siem-delivery-dlq.custom-impl.backend.service.js.map +1 -1
  198. package/dist/esm/security/authentications/services/custom-impls/sso-config-domain-verification.custom-impl.backend.service.d.ts.map +1 -1
  199. package/dist/esm/security/authentications/services/custom-impls/sso-config-domain-verification.custom-impl.backend.service.js +65 -24
  200. package/dist/esm/security/authentications/services/custom-impls/sso-config-domain-verification.custom-impl.backend.service.js.map +1 -1
  201. package/dist/esm/security/authorizations/super-admin-floor.backend.utils.d.ts +64 -1
  202. package/dist/esm/security/authorizations/super-admin-floor.backend.utils.d.ts.map +1 -1
  203. package/dist/esm/security/authorizations/super-admin-floor.backend.utils.js +84 -2
  204. package/dist/esm/security/authorizations/super-admin-floor.backend.utils.js.map +1 -1
  205. package/dist/esm/security/oauth-clients/oauth-clients.custom-impl.backend.service.d.ts +14 -0
  206. package/dist/esm/security/oauth-clients/oauth-clients.custom-impl.backend.service.d.ts.map +1 -1
  207. package/dist/esm/security/oauth-clients/oauth-clients.custom-impl.backend.service.js +13 -5
  208. package/dist/esm/security/oauth-clients/oauth-clients.custom-impl.backend.service.js.map +1 -1
  209. package/dist/esm/users/services/anonymous-consent.custom-impl.backend.service.d.ts.map +1 -1
  210. package/dist/esm/users/services/anonymous-consent.custom-impl.backend.service.js +6 -2
  211. package/dist/esm/users/services/anonymous-consent.custom-impl.backend.service.js.map +1 -1
  212. package/dist/esm/users/services/user-force-password-reset.custom-impl.backend.service.d.ts +7 -0
  213. package/dist/esm/users/services/user-force-password-reset.custom-impl.backend.service.d.ts.map +1 -1
  214. package/dist/esm/users/services/user-force-password-reset.custom-impl.backend.service.js +65 -20
  215. package/dist/esm/users/services/user-force-password-reset.custom-impl.backend.service.js.map +1 -1
  216. package/dist/esm/users/services/user-role-administration.custom-impl.backend.service.d.ts.map +1 -1
  217. package/dist/esm/users/services/user-role-administration.custom-impl.backend.service.js +11 -4
  218. package/dist/esm/users/services/user-role-administration.custom-impl.backend.service.js.map +1 -1
  219. package/dist/esm/users/services/user-self-custom-implementations.backend.d.ts.map +1 -1
  220. package/dist/esm/users/services/user-self-custom-implementations.backend.js +4 -2
  221. package/dist/esm/users/services/user-self-custom-implementations.backend.js.map +1 -1
  222. package/dist/esm/users/services/user-super-admin-floor.custom-impl.backend.service.d.ts.map +1 -1
  223. package/dist/esm/users/services/user-super-admin-floor.custom-impl.backend.service.js +16 -0
  224. package/dist/esm/users/services/user-super-admin-floor.custom-impl.backend.service.js.map +1 -1
  225. package/dist/tsconfig.build.tsbuildinfo +1 -1
  226. package/package.json +10 -10
@@ -1 +1 @@
1
- {"version":3,"file":"manual-controllers.backend.definition.d.ts","sourceRoot":"","sources":["../../../../src/base-classes/models/manual-controllers.backend.definition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,gCAAgC,EAAE,MAAM,0FAA0F,CAAC;AAsC5I,MAAM,WAAW,wBAAwB;IACrC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,4BAA4B,CAAC,EAAE,OAAO,CAAC;CAC1C;AAED;;;GAGG;AACH,wBAAgB,2BAA2B,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,wBAAwB,GAAG,gCAAgC,EAAE,CA8FxI"}
1
+ {"version":3,"file":"manual-controllers.backend.definition.d.ts","sourceRoot":"","sources":["../../../../src/base-classes/models/manual-controllers.backend.definition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,gCAAgC,EAAE,MAAM,0FAA0F,CAAC;AAuC5I,MAAM,WAAW,wBAAwB;IACrC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,4BAA4B,CAAC,EAAE,OAAO,CAAC;CAC1C;AAED;;;GAGG;AACH,wBAAgB,2BAA2B,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,wBAAwB,GAAG,gCAAgC,EAAE,CAgGxI"}
@@ -62,6 +62,8 @@ export function getManualControllersBackend(container, options) {
62
62
  // The keys that verify this application's approval seals, and the compromised ones (#2891). Unconditional: key
63
63
  // management is always enabled, and an application that has sealed nothing answers an empty set.
64
64
  container.get(SAAS_SERVICE_TYPES.ApprovalSealKeysController),
65
+ // A record's view of the approval seal it stores (#2913). Unconditional: a record that stores none is never asked.
66
+ container.get(SAAS_SERVICE_TYPES.ApprovalSealsOnRecordController),
65
67
  // Usage-flush evidence (`evidence-requirement:usage-flush-run-record` C3). Unconditional: with billing
66
68
  // off it measures no store and says so.
67
69
  container.get(SAAS_SERVICE_TYPES.UsageFlushEvidenceController),
@@ -1 +1 @@
1
- {"version":3,"file":"manual-controllers.backend.definition.js","sourceRoot":"","sources":["../../../../src/base-classes/models/manual-controllers.backend.definition.ts"],"names":[],"mappings":"AAqCA,OAAO,EAAE,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AAOpF;;;GAGG;AACH,MAAM,UAAU,2BAA2B,CAAC,SAAoB,EAAE,OAAkC;IAChG,uGAAuG;IACvG,MAAM,WAAW,GAAuC;QACpD,SAAS,CAAC,GAAG,CAA4C,kBAAkB,CAAC,2BAA2B,CAAC;QACxG,SAAS,CAAC,GAAG,CAAyC,kBAAkB,CAAC,wBAAwB,CAAC;QAClG,SAAS,CAAC,GAAG,C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I,CACZ,SAAS,CAAC,GAAG,CAA6B,kBAAkB,CAAC,mBAAmB,CAAC,CACpF,CAAC;IACN,CAAC;IAED,4FAA4F;IAC5F,IAAI,OAAO,EAAE,4BAA4B,EAAE,CAAC;QACxC,WAAW,CAAC,IAAI,CACZ,SAAS,CAAC,GAAG,CAA+B,kBAAkB,CAAC,cAAc,CAAC,CACjF,CAAC;IACN,CAAC;IAED,OAAO,WAAW,CAAC;AACvB,CAAC","sourcesContent":["import { Container } from 'inversify';\nimport { AbstractControllerBackendService } from \"~wildo-backend-lib/base-classes/services/controllers/abstract-controller.backend.service\";\nimport { ApplicationConfigControllerBackendService } from \"~wildo-backend-lib/config/custom/application-config-controller.backend.service\";\nimport { AuthenticationControllerBackendService } from \"~wildo-backend-lib/security/authentications/controllers/authentication-controller.backend.service\";\nimport { OAuthProviderControllerBackendService } from \"~wildo-backend-lib/security/authentications/controllers/oauth-provider-controller.backend.service\";\nimport { I18nControllerBackendService } from \"~wildo-backend-lib/i18n/controllers/i18n-controller.backend.service\";\nimport { FlowsActorsControllerBackendService } from \"~wildo-backend-lib/flows-actors/controllers/flows-actors.controller\";\n// === A2A (external actor exposure) ===\nimport { A2AControllerBackendService } from \"~wildo-backend-lib/flows-actors/a2a/controllers/a2a.controller\";\nimport { MCPControllerBackendService } from \"~wildo-backend-lib/mcp/controllers/mcp.controller\";\nimport { FileController } from \"~wildo-backend-lib/files/controllers/file.controller\";\nimport { FeaturesControllerBackendService } from \"~wildo-backend-lib/features/controllers/features.backend.controller\";\nimport { SubmissionChallengeControllerBackendService } from \"~wildo-backend-lib/security/submission-challenge/submission-challenge.backend.controller\";\nimport { CspViolationReportsControllerBackendService } from \"~wildo-backend-lib/monitoring/csp-violation-reports/csp-violation-reports.backend.controller\";\nimport { ChartControllerBackendService } from \"~wildo-backend-lib/charts/controllers/chart.backend.controller\";\nimport { SubjectErasureLaneEvidenceControllerBackendService } from '~wildo-backend-lib/compliance/privacy/controllers/subject-erasure-lane-evidence.backend.controller';\nimport { DataSubjectRequestDownloadControllerBackendService } from '~wildo-backend-lib/compliance/privacy/controllers/data-subject-request-download.backend.controller';\nimport { ProviderCallEvidenceControllerBackendService } from '~wildo-backend-lib/flows-actors/controllers/provider-call-evidence.backend.controller';\nimport { AgentOperationEvidenceControllerBackendService } from '~wildo-backend-lib/flows-actors/controllers/agent-operation-evidence.backend.controller';\nimport { AgentBehaviorReportEvidenceControllerBackendService } from '~wildo-backend-lib/flows-actors/controllers/agent-behavior-report-evidence.backend.controller';\nimport { ModelCostSummaryControllerBackendService } from '~wildo-backend-lib/flows-actors/controllers/model-cost-summary.backend.controller';\nimport { RepresentativeActivityControllerBackendService } from '~wildo-backend-lib/compliance/audit-trails/controllers/representative-activity.backend.controller';\nimport { AgentWorkDecisionsControllerBackendService } from '~wildo-backend-lib/flows-actors/controllers/agent-work-decisions.backend.controller';\nimport { RetentionEnforcementEvidenceControllerBackendService } from '~wildo-backend-lib/compliance/privacy/controllers/retention-enforcement-evidence.backend.controller';\nimport { ApprovalSealKeysControllerBackendService } from '~wildo-backend-lib/security/crypto-keys/approval-seal-keys.backend.controller';\nimport { UsageFlushEvidenceControllerBackendService } from '~wildo-backend-lib/billing/controllers/usage-flush-evidence.backend.controller';\nimport { ProviderComplianceStateEvidenceControllerBackendService } from '~wildo-backend-lib/external-providers/controllers/provider-compliance-state-evidence.backend.controller';\nimport { ScheduledEvidenceCoverageControllerBackendService } from '~wildo-backend-lib/compliance/privacy/controllers/scheduled-evidence-coverage.backend.controller';\nimport { ResourceOperationJobStatusControllerBackendService } from '~wildo-backend-lib/queue/controllers/resource-operation-job-status.backend.controller';\nimport { GovernedDocumentAcceptanceControllerBackendService } from '~wildo-backend-lib/compliance/documents/controllers/governed-document-acceptance.backend.controller';\nimport { AnalyticsBackendController } from \"~wildo-backend-lib/monitoring/analytics/controllers/analytics.backend.controller\";\nimport { WebhookAutoControllerBackendService } from \"~wildo-backend-lib/notifications/webhooks/controllers/webhook-auto-controller.backend.service\";\nimport { SCIMControllerBackendService } from \"~wildo-backend-lib/security/scim/controllers/scim.backend.controller\";\nimport { AuthMethodManagementControllerBackendService } from \"~wildo-backend-lib/security/authentications/controllers/auth-method-management-controller.backend.service\";\nimport { ProviderConnectionControllerBackendService } from \"~wildo-backend-lib/security/connected-accounts/controllers/provider-connection.controller.backend.service\";\nimport { ProviderOperationControllerBackendService } from \"~wildo-backend-lib/external-providers/operations/controllers/provider-operation.controller.backend.service\";\n\nimport { SAAS_SERVICE_TYPES } from \"~wildo-backend-lib/inject/models/service-types\";\n\nexport interface ManualControllersOptions {\n analyticsEnabled?: boolean;\n directoryProvisioningEnabled?: boolean;\n}\n\n/**\n * Get manual controllers from initialized container\n * Must be called after container is fully initialized\n */\nexport function getManualControllersBackend(container: Container, options?: ManualControllersOptions): AbstractControllerBackendService[] {\n // Note: HealthController is NOT included here - it's mounted at root level by HttpServerBackendService\n const controllers: AbstractControllerBackendService[] = [\n container.get<ApplicationConfigControllerBackendService>(SAAS_SERVICE_TYPES.ApplicationConfigController),\n container.get<AuthenticationControllerBackendService>(SAAS_SERVICE_TYPES.AuthenticationController),\n container.get<OAuthProviderControllerBackendService>(SAAS_SERVICE_TYPES.OAuthProviderController),\n container.get<AuthMethodManagementControllerBackendService>(SAAS_SERVICE_TYPES.AuthMethodManagementController),\n // Connecting a third-party account. Unconditional: an application that declares no OAuth2\n // provider simply has nothing to connect, and the routes answer PROVIDER_NOT_CONNECTABLE —\n // which is a better answer than a route that does not exist, because it names why.\n container.get<ProviderConnectionControllerBackendService>(SAAS_SERVICE_TYPES.ProviderConnectionController),\n // A signed-in person's browser triggering a declared provider operation (#367). Unconditional for the\n // same reason as the connection routes: an application that declares no browser-reachable operation\n // gets a door that refuses everything, by name, which says more than a route that does not exist.\n container.get<ProviderOperationControllerBackendService>(SAAS_SERVICE_TYPES.ProviderOperationController),\n container.get<I18nControllerBackendService>(SAAS_SERVICE_TYPES.I18nController),\n container.get<FlowsActorsControllerBackendService>(SAAS_SERVICE_TYPES.FlowsActorsController),\n // === A2A (external actor exposure) ===\n container.get<A2AControllerBackendService>(SAAS_SERVICE_TYPES.A2AController),\n container.get<MCPControllerBackendService>(SAAS_SERVICE_TYPES.MCPController),\n container.get<FileController>(SAAS_SERVICE_TYPES.FileController),\n container.get<FeaturesControllerBackendService>(SAAS_SERVICE_TYPES.FeaturesController),\n // A proof-of-work challenge for a public submission (#1735). Unconditional: an application with no captcha\n // provider never asks for one, and a challenge grants nothing until it is solved and spent on one submission.\n container.get<SubmissionChallengeControllerBackendService>(SAAS_SERVICE_TYPES.SubmissionChallengeController),\n // Where browsers report Content-Security-Policy violations (#2867). Unconditional: every frontend policy the\n // framework composes names this route, so an application that never reports simply receives nothing.\n container.get<CspViolationReportsControllerBackendService>(SAAS_SERVICE_TYPES.CspViolationReportsController),\n container.get<ChartControllerBackendService>(SAAS_SERVICE_TYPES.ChartController),\n // Assurance evidence for the subject-erasure lane (#269), the engine's `dataSubjectRequests` in every\n // application since #2296. Unconditional: a backend with no lane gets `laneDeclared: false`, which says\n // it predates that resource and says more than a route that does not exist.\n container.get<SubjectErasureLaneEvidenceControllerBackendService>(SAAS_SERVICE_TYPES.SubjectErasureLaneEvidenceController),\n // A person downloading the copy of their data their own request answers (#2296). Unconditional, like the request\n // lane itself, which every application carries.\n container.get<DataSubjectRequestDownloadControllerBackendService>(SAAS_SERVICE_TYPES.DataSubjectRequestDownloadController),\n // Provider-call evidence (`evidence-requirement:outbound-call-record` C2). Unconditional: an application\n // that makes no provider call answers zero calls, which is itself the measurement.\n container.get<ProviderCallEvidenceControllerBackendService>(SAAS_SERVICE_TYPES.ProviderCallEvidenceController),\n // Agent-operation evidence (#2841). Unconditional: an application whose agents made no call answers zero\n // operations, which is itself the measurement.\n container.get<AgentOperationEvidenceControllerBackendService>(SAAS_SERVICE_TYPES.AgentOperationEvidenceController),\n // Agent behaviour report evidence (#2842). Unconditional: an application nobody reported answers zero reports,\n // which is itself the measurement.\n container.get<AgentBehaviorReportEvidenceControllerBackendService>(SAAS_SERVICE_TYPES.AgentBehaviorReportEvidenceController),\n // Cost per case (#1598). Unconditional: an application with no model calls answers empty groups.\n container.get<ModelCostSummaryControllerBackendService>(SAAS_SERVICE_TYPES.ModelCostSummaryController),\n // What a representing organization's own people did in the organizations it represents (#2874). Unconditional:\n // an organization that represents in no kind is refused, and one with no representative activity answers no rows.\n container.get<RepresentativeActivityControllerBackendService>(SAAS_SERVICE_TYPES.RepresentativeActivityController),\n // Deciders' decisions on agents' proposals (#1599): the override rate and the authorised evaluation export.\n // Unconditional: an application with no agent answers empty groups, and an export with no authorisation is refused.\n container.get<AgentWorkDecisionsControllerBackendService>(SAAS_SERVICE_TYPES.AgentWorkDecisionsController),\n // Retention-enforcement evidence (`evidence-requirement:retention-window-declaration` C1, #1636).\n // Unconditional: an application whose sweep has not run answers an empty window, which is the measurement.\n container.get<RetentionEnforcementEvidenceControllerBackendService>(SAAS_SERVICE_TYPES.RetentionEnforcementEvidenceController),\n // The keys that verify this application's approval seals, and the compromised ones (#2891). Unconditional: key\n // management is always enabled, and an application that has sealed nothing answers an empty set.\n container.get<ApprovalSealKeysControllerBackendService>(SAAS_SERVICE_TYPES.ApprovalSealKeysController),\n // Usage-flush evidence (`evidence-requirement:usage-flush-run-record` C3). Unconditional: with billing\n // off it measures no store and says so.\n container.get<UsageFlushEvidenceControllerBackendService>(SAAS_SERVICE_TYPES.UsageFlushEvidenceController),\n // Provider compliance-state evidence (#298, `evidence-requirement:tamper-evident-audit-store-account`). Unconditional:\n // an application declaring no provider answers no snapshot, and one that cannot be asked is listed as ABSENT.\n container.get<ProviderComplianceStateEvidenceControllerBackendService>(SAAS_SERVICE_TYPES.ProviderComplianceStateEvidenceController),\n // Scheduled-run coverage (#1029). The assessment had no caller at all outside its tests: its\n // stores are REPOSITORY_ONLY, so nothing outside this process could reach it.\n container.get<ScheduledEvidenceCoverageControllerBackendService>(SAAS_SERVICE_TYPES.ScheduledEvidenceCoverageController),\n // Background-operation status (#2185): the `Location` every `202 Accepted` names. Unconditional: an application\n // with no background operation has no job to read, and the route answers 404 for every id.\n container.get<ResourceOperationJobStatusControllerBackendService>(SAAS_SERVICE_TYPES.ResourceOperationJobStatusController),\n // A signed-in person's own governed-document acceptances (#1258). Unconditional: an application\n // that declares no release asking for acceptance answers `owed: []` without reading the store, which\n // is the right answer and costs nothing (R12).\n container.get<GovernedDocumentAcceptanceControllerBackendService>(SAAS_SERVICE_TYPES.GovernedDocumentAcceptanceController),\n // Webhook auto-controller — auto-discovers providers with WEBHOOK_ORIGINATOR protocol\n container.get<WebhookAutoControllerBackendService>(SAAS_SERVICE_TYPES.WebhookAutoController),\n ];\n\n // Analytics controller — only included when analytics is enabled\n if (options?.analyticsEnabled) {\n controllers.push(\n container.get<AnalyticsBackendController>(SAAS_SERVICE_TYPES.AnalyticsController),\n );\n }\n\n // SCIM controller — only included when directory provisioning is enabled (Critical Note #9)\n if (options?.directoryProvisioningEnabled) {\n controllers.push(\n container.get<SCIMControllerBackendService>(SAAS_SERVICE_TYPES.SCIMController),\n );\n }\n\n return controllers;\n}\n"]}
1
+ {"version":3,"file":"manual-controllers.backend.definition.js","sourceRoot":"","sources":["../../../../src/base-classes/models/manual-controllers.backend.definition.ts"],"names":[],"mappings":"AAsCA,OAAO,EAAE,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AAOpF;;;GAGG;AACH,MAAM,UAAU,2BAA2B,CAAC,SAAoB,EAAE,OAAkC;IAChG,uGAAuG;IACvG,MAAM,WAAW,GAAuC;QACpD,SAAS,CAAC,GAAG,CAA4C,kBAAkB,CAAC,2BAA2B,CAAC;QACxG,SAAS,CAAC,GAAG,CAAyC,kBAAkB,CAAC,wBAAwB,CAAC;QAClG,SAAS,CAAC,GAAG,CAAwC,kBAAkB,CAAC,uBAAuB,CAAC;QAChG,SAAS,CAAC,GAAG,CAA+C,kBAAkB,CAAC,8BAA8B,CAAC;QAC9G,0FAA0F;QAC1F,2FAA2F;QAC3F,mFAAmF;QACnF,SAAS,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CAAC;IAED,4FAA4F;IAC5F,IAAI,OAAO,EAAE,4BAA4B,EAAE,CAAC;QACxC,WAAW,CAAC,IAAI,CACZ,SAAS,CAAC,GAAG,CAA+B,kBAAkB,CAAC,cAAc,CAAC,CACjF,CAAC;IACN,CAAC;IAED,OAAO,WAAW,CAAC;AACvB,CAAC","sourcesContent":["import { Container } from 'inversify';\nimport { AbstractControllerBackendService } from \"~wildo-backend-lib/base-classes/services/controllers/abstract-controller.backend.service\";\nimport { ApplicationConfigControllerBackendService } from \"~wildo-backend-lib/config/custom/application-config-controller.backend.service\";\nimport { AuthenticationControllerBackendService } from \"~wildo-backend-lib/security/authentications/controllers/authentication-controller.backend.service\";\nimport { OAuthProviderControllerBackendService } from \"~wildo-backend-lib/security/authentications/controllers/oauth-provider-controller.backend.service\";\nimport { I18nControllerBackendService } from \"~wildo-backend-lib/i18n/controllers/i18n-controller.backend.service\";\nimport { FlowsActorsControllerBackendService } from \"~wildo-backend-lib/flows-actors/controllers/flows-actors.controller\";\n// === A2A (external actor exposure) ===\nimport { A2AControllerBackendService } from \"~wildo-backend-lib/flows-actors/a2a/controllers/a2a.controller\";\nimport { MCPControllerBackendService } from \"~wildo-backend-lib/mcp/controllers/mcp.controller\";\nimport { FileController } from \"~wildo-backend-lib/files/controllers/file.controller\";\nimport { FeaturesControllerBackendService } from \"~wildo-backend-lib/features/controllers/features.backend.controller\";\nimport { SubmissionChallengeControllerBackendService } from \"~wildo-backend-lib/security/submission-challenge/submission-challenge.backend.controller\";\nimport { CspViolationReportsControllerBackendService } from \"~wildo-backend-lib/monitoring/csp-violation-reports/csp-violation-reports.backend.controller\";\nimport { ChartControllerBackendService } from \"~wildo-backend-lib/charts/controllers/chart.backend.controller\";\nimport { SubjectErasureLaneEvidenceControllerBackendService } from '~wildo-backend-lib/compliance/privacy/controllers/subject-erasure-lane-evidence.backend.controller';\nimport { DataSubjectRequestDownloadControllerBackendService } from '~wildo-backend-lib/compliance/privacy/controllers/data-subject-request-download.backend.controller';\nimport { ProviderCallEvidenceControllerBackendService } from '~wildo-backend-lib/flows-actors/controllers/provider-call-evidence.backend.controller';\nimport { AgentOperationEvidenceControllerBackendService } from '~wildo-backend-lib/flows-actors/controllers/agent-operation-evidence.backend.controller';\nimport { AgentBehaviorReportEvidenceControllerBackendService } from '~wildo-backend-lib/flows-actors/controllers/agent-behavior-report-evidence.backend.controller';\nimport { ModelCostSummaryControllerBackendService } from '~wildo-backend-lib/flows-actors/controllers/model-cost-summary.backend.controller';\nimport { RepresentativeActivityControllerBackendService } from '~wildo-backend-lib/compliance/audit-trails/controllers/representative-activity.backend.controller';\nimport { AgentWorkDecisionsControllerBackendService } from '~wildo-backend-lib/flows-actors/controllers/agent-work-decisions.backend.controller';\nimport { RetentionEnforcementEvidenceControllerBackendService } from '~wildo-backend-lib/compliance/privacy/controllers/retention-enforcement-evidence.backend.controller';\nimport { ApprovalSealKeysControllerBackendService } from '~wildo-backend-lib/security/crypto-keys/approval-seal-keys.backend.controller';\nimport { ApprovalSealsOnRecordControllerBackendService } from '~wildo-backend-lib/compliance/approval-seals/approval-seals-on-record.backend.controller';\nimport { UsageFlushEvidenceControllerBackendService } from '~wildo-backend-lib/billing/controllers/usage-flush-evidence.backend.controller';\nimport { ProviderComplianceStateEvidenceControllerBackendService } from '~wildo-backend-lib/external-providers/controllers/provider-compliance-state-evidence.backend.controller';\nimport { ScheduledEvidenceCoverageControllerBackendService } from '~wildo-backend-lib/compliance/privacy/controllers/scheduled-evidence-coverage.backend.controller';\nimport { ResourceOperationJobStatusControllerBackendService } from '~wildo-backend-lib/queue/controllers/resource-operation-job-status.backend.controller';\nimport { GovernedDocumentAcceptanceControllerBackendService } from '~wildo-backend-lib/compliance/documents/controllers/governed-document-acceptance.backend.controller';\nimport { AnalyticsBackendController } from \"~wildo-backend-lib/monitoring/analytics/controllers/analytics.backend.controller\";\nimport { WebhookAutoControllerBackendService } from \"~wildo-backend-lib/notifications/webhooks/controllers/webhook-auto-controller.backend.service\";\nimport { SCIMControllerBackendService } from \"~wildo-backend-lib/security/scim/controllers/scim.backend.controller\";\nimport { AuthMethodManagementControllerBackendService } from \"~wildo-backend-lib/security/authentications/controllers/auth-method-management-controller.backend.service\";\nimport { ProviderConnectionControllerBackendService } from \"~wildo-backend-lib/security/connected-accounts/controllers/provider-connection.controller.backend.service\";\nimport { ProviderOperationControllerBackendService } from \"~wildo-backend-lib/external-providers/operations/controllers/provider-operation.controller.backend.service\";\n\nimport { SAAS_SERVICE_TYPES } from \"~wildo-backend-lib/inject/models/service-types\";\n\nexport interface ManualControllersOptions {\n analyticsEnabled?: boolean;\n directoryProvisioningEnabled?: boolean;\n}\n\n/**\n * Get manual controllers from initialized container\n * Must be called after container is fully initialized\n */\nexport function getManualControllersBackend(container: Container, options?: ManualControllersOptions): AbstractControllerBackendService[] {\n // Note: HealthController is NOT included here - it's mounted at root level by HttpServerBackendService\n const controllers: AbstractControllerBackendService[] = [\n container.get<ApplicationConfigControllerBackendService>(SAAS_SERVICE_TYPES.ApplicationConfigController),\n container.get<AuthenticationControllerBackendService>(SAAS_SERVICE_TYPES.AuthenticationController),\n container.get<OAuthProviderControllerBackendService>(SAAS_SERVICE_TYPES.OAuthProviderController),\n container.get<AuthMethodManagementControllerBackendService>(SAAS_SERVICE_TYPES.AuthMethodManagementController),\n // Connecting a third-party account. Unconditional: an application that declares no OAuth2\n // provider simply has nothing to connect, and the routes answer PROVIDER_NOT_CONNECTABLE —\n // which is a better answer than a route that does not exist, because it names why.\n container.get<ProviderConnectionControllerBackendService>(SAAS_SERVICE_TYPES.ProviderConnectionController),\n // A signed-in person's browser triggering a declared provider operation (#367). Unconditional for the\n // same reason as the connection routes: an application that declares no browser-reachable operation\n // gets a door that refuses everything, by name, which says more than a route that does not exist.\n container.get<ProviderOperationControllerBackendService>(SAAS_SERVICE_TYPES.ProviderOperationController),\n container.get<I18nControllerBackendService>(SAAS_SERVICE_TYPES.I18nController),\n container.get<FlowsActorsControllerBackendService>(SAAS_SERVICE_TYPES.FlowsActorsController),\n // === A2A (external actor exposure) ===\n container.get<A2AControllerBackendService>(SAAS_SERVICE_TYPES.A2AController),\n container.get<MCPControllerBackendService>(SAAS_SERVICE_TYPES.MCPController),\n container.get<FileController>(SAAS_SERVICE_TYPES.FileController),\n container.get<FeaturesControllerBackendService>(SAAS_SERVICE_TYPES.FeaturesController),\n // A proof-of-work challenge for a public submission (#1735). Unconditional: an application with no captcha\n // provider never asks for one, and a challenge grants nothing until it is solved and spent on one submission.\n container.get<SubmissionChallengeControllerBackendService>(SAAS_SERVICE_TYPES.SubmissionChallengeController),\n // Where browsers report Content-Security-Policy violations (#2867). Unconditional: every frontend policy the\n // framework composes names this route, so an application that never reports simply receives nothing.\n container.get<CspViolationReportsControllerBackendService>(SAAS_SERVICE_TYPES.CspViolationReportsController),\n container.get<ChartControllerBackendService>(SAAS_SERVICE_TYPES.ChartController),\n // Assurance evidence for the subject-erasure lane (#269), the engine's `dataSubjectRequests` in every\n // application since #2296. Unconditional: a backend with no lane gets `laneDeclared: false`, which says\n // it predates that resource and says more than a route that does not exist.\n container.get<SubjectErasureLaneEvidenceControllerBackendService>(SAAS_SERVICE_TYPES.SubjectErasureLaneEvidenceController),\n // A person downloading the copy of their data their own request answers (#2296). Unconditional, like the request\n // lane itself, which every application carries.\n container.get<DataSubjectRequestDownloadControllerBackendService>(SAAS_SERVICE_TYPES.DataSubjectRequestDownloadController),\n // Provider-call evidence (`evidence-requirement:outbound-call-record` C2). Unconditional: an application\n // that makes no provider call answers zero calls, which is itself the measurement.\n container.get<ProviderCallEvidenceControllerBackendService>(SAAS_SERVICE_TYPES.ProviderCallEvidenceController),\n // Agent-operation evidence (#2841). Unconditional: an application whose agents made no call answers zero\n // operations, which is itself the measurement.\n container.get<AgentOperationEvidenceControllerBackendService>(SAAS_SERVICE_TYPES.AgentOperationEvidenceController),\n // Agent behaviour report evidence (#2842). Unconditional: an application nobody reported answers zero reports,\n // which is itself the measurement.\n container.get<AgentBehaviorReportEvidenceControllerBackendService>(SAAS_SERVICE_TYPES.AgentBehaviorReportEvidenceController),\n // Cost per case (#1598). Unconditional: an application with no model calls answers empty groups.\n container.get<ModelCostSummaryControllerBackendService>(SAAS_SERVICE_TYPES.ModelCostSummaryController),\n // What a representing organization's own people did in the organizations it represents (#2874). Unconditional:\n // an organization that represents in no kind is refused, and one with no representative activity answers no rows.\n container.get<RepresentativeActivityControllerBackendService>(SAAS_SERVICE_TYPES.RepresentativeActivityController),\n // Deciders' decisions on agents' proposals (#1599): the override rate and the authorised evaluation export.\n // Unconditional: an application with no agent answers empty groups, and an export with no authorisation is refused.\n container.get<AgentWorkDecisionsControllerBackendService>(SAAS_SERVICE_TYPES.AgentWorkDecisionsController),\n // Retention-enforcement evidence (`evidence-requirement:retention-window-declaration` C1, #1636).\n // Unconditional: an application whose sweep has not run answers an empty window, which is the measurement.\n container.get<RetentionEnforcementEvidenceControllerBackendService>(SAAS_SERVICE_TYPES.RetentionEnforcementEvidenceController),\n // The keys that verify this application's approval seals, and the compromised ones (#2891). Unconditional: key\n // management is always enabled, and an application that has sealed nothing answers an empty set.\n container.get<ApprovalSealKeysControllerBackendService>(SAAS_SERVICE_TYPES.ApprovalSealKeysController),\n // A record's view of the approval seal it stores (#2913). Unconditional: a record that stores none is never asked.\n container.get<ApprovalSealsOnRecordControllerBackendService>(SAAS_SERVICE_TYPES.ApprovalSealsOnRecordController),\n // Usage-flush evidence (`evidence-requirement:usage-flush-run-record` C3). Unconditional: with billing\n // off it measures no store and says so.\n container.get<UsageFlushEvidenceControllerBackendService>(SAAS_SERVICE_TYPES.UsageFlushEvidenceController),\n // Provider compliance-state evidence (#298, `evidence-requirement:tamper-evident-audit-store-account`). Unconditional:\n // an application declaring no provider answers no snapshot, and one that cannot be asked is listed as ABSENT.\n container.get<ProviderComplianceStateEvidenceControllerBackendService>(SAAS_SERVICE_TYPES.ProviderComplianceStateEvidenceController),\n // Scheduled-run coverage (#1029). The assessment had no caller at all outside its tests: its\n // stores are REPOSITORY_ONLY, so nothing outside this process could reach it.\n container.get<ScheduledEvidenceCoverageControllerBackendService>(SAAS_SERVICE_TYPES.ScheduledEvidenceCoverageController),\n // Background-operation status (#2185): the `Location` every `202 Accepted` names. Unconditional: an application\n // with no background operation has no job to read, and the route answers 404 for every id.\n container.get<ResourceOperationJobStatusControllerBackendService>(SAAS_SERVICE_TYPES.ResourceOperationJobStatusController),\n // A signed-in person's own governed-document acceptances (#1258). Unconditional: an application\n // that declares no release asking for acceptance answers `owed: []` without reading the store, which\n // is the right answer and costs nothing (R12).\n container.get<GovernedDocumentAcceptanceControllerBackendService>(SAAS_SERVICE_TYPES.GovernedDocumentAcceptanceController),\n // Webhook auto-controller — auto-discovers providers with WEBHOOK_ORIGINATOR protocol\n container.get<WebhookAutoControllerBackendService>(SAAS_SERVICE_TYPES.WebhookAutoController),\n ];\n\n // Analytics controller — only included when analytics is enabled\n if (options?.analyticsEnabled) {\n controllers.push(\n container.get<AnalyticsBackendController>(SAAS_SERVICE_TYPES.AnalyticsController),\n );\n }\n\n // SCIM controller — only included when directory provisioning is enabled (Critical Note #9)\n if (options?.directoryProvisioningEnabled) {\n controllers.push(\n container.get<SCIMControllerBackendService>(SAAS_SERVICE_TYPES.SCIMController),\n );\n }\n\n return controllers;\n}\n"]}
@@ -10,6 +10,10 @@ export declare function mongoExclusionProjection(paths: readonly string[] | unde
10
10
  /**
11
11
  * The row without the dotted paths. Copies only the objects along each path, so the row it was given is never changed;
12
12
  * a path whose parent is absent or not an object leaves the row as it is.
13
+ *
14
+ * A path that passes through an ARRAY applies to each object element of it, and leaves its other elements as they are:
15
+ * that is what MongoDB's exclusion projection does with the same path (`standaloneTasks.input.baseline.files` reaches
16
+ * into every task of an execution row), so the two adapters return the same rows (#3204).
13
17
  */
14
18
  export declare function withoutStoredPaths<T>(row: T, paths: readonly string[] | undefined): T;
15
19
  //# sourceMappingURL=stored-field-omission.backend.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"stored-field-omission.backend.d.ts","sourceRoot":"","sources":["../../../../../src/base-classes/services/repositories/stored-field-omission.backend.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,mGAAmG;AACnG,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,GAAG,SAAS,CAG5G;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,GAAG,CAAC,CAoBrF"}
1
+ {"version":3,"file":"stored-field-omission.backend.d.ts","sourceRoot":"","sources":["../../../../../src/base-classes/services/repositories/stored-field-omission.backend.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,mGAAmG;AACnG,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,GAAG,SAAS,CAG5G;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,GAAG,CAAC,CA8BrF"}
@@ -14,6 +14,10 @@ export function mongoExclusionProjection(paths) {
14
14
  /**
15
15
  * The row without the dotted paths. Copies only the objects along each path, so the row it was given is never changed;
16
16
  * a path whose parent is absent or not an object leaves the row as it is.
17
+ *
18
+ * A path that passes through an ARRAY applies to each object element of it, and leaves its other elements as they are:
19
+ * that is what MongoDB's exclusion projection does with the same path (`standaloneTasks.input.baseline.files` reaches
20
+ * into every task of an execution row), so the two adapters return the same rows (#3204).
17
21
  */
18
22
  export function withoutStoredPaths(row, paths) {
19
23
  if (paths === undefined || paths.length === 0 || row === null || typeof row !== 'object')
@@ -21,7 +25,20 @@ export function withoutStoredPaths(row, paths) {
21
25
  let result = row;
22
26
  for (const path of paths) {
23
27
  const segments = path.split('.');
24
- const omit = (node, depth) => {
28
+ const omitFrom = (value, depth) => {
29
+ if (Array.isArray(value)) {
30
+ let changed = false;
31
+ const elements = value.map((element) => {
32
+ const next = omitFrom(element, depth);
33
+ if (next !== element)
34
+ changed = true;
35
+ return next;
36
+ });
37
+ return changed ? elements : value;
38
+ }
39
+ if (value === null || typeof value !== 'object')
40
+ return value;
41
+ const node = value;
25
42
  const key = segments[depth];
26
43
  if (!(key in node))
27
44
  return node;
@@ -30,12 +47,10 @@ export function withoutStoredPaths(row, paths) {
30
47
  return rest;
31
48
  }
32
49
  const child = node[key];
33
- if (child === null || typeof child !== 'object' || Array.isArray(child))
34
- return node;
35
- const nextChild = omit(child, depth + 1);
50
+ const nextChild = omitFrom(child, depth + 1);
36
51
  return nextChild === child ? node : { ...node, [key]: nextChild };
37
52
  };
38
- result = omit(result, 0);
53
+ result = omitFrom(result, 0);
39
54
  }
40
55
  return result;
41
56
  }
@@ -1 +1 @@
1
- {"version":3,"file":"stored-field-omission.backend.js","sourceRoot":"","sources":["../../../../../src/base-classes/services/repositories/stored-field-omission.backend.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,mGAAmG;AACnG,MAAM,UAAU,wBAAwB,CAAC,KAAoC;IAC3E,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,SAAS,CAAC;IAChE,OAAO,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,CAAU,CAAC,CAAC,CAAC,CAAC;AACrE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,kBAAkB,CAAI,GAAM,EAAE,KAAoC;IAChF,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,IAAI,GAAG,KAAK,IAAI,IAAI,OAAO,GAAG,KAAK,QAAQ;QAAE,OAAO,GAAG,CAAC;IACrG,IAAI,MAAM,GAAG,GAAyC,CAAC;IACvD,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACjC,MAAM,IAAI,GAAG,CAAC,IAA6B,EAAE,KAAa,EAA2B,EAAE;YACrF,MAAM,GAAG,GAAG,QAAQ,CAAC,KAAK,CAAE,CAAC;YAC7B,IAAI,CAAC,CAAC,GAAG,IAAI,IAAI,CAAC;gBAAE,OAAO,IAAI,CAAC;YAChC,IAAI,KAAK,KAAK,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBAClC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,GAAG,IAAI,CAAC;gBAC1C,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;YACxB,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;gBAAE,OAAO,IAAI,CAAC;YACrF,MAAM,SAAS,GAAG,IAAI,CAAC,KAAgC,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC;YACpE,OAAO,SAAS,KAAK,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,CAAC,GAAG,CAAC,EAAE,SAAS,EAAE,CAAC;QACpE,CAAC,CAAC;QACF,MAAM,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;IAC3B,CAAC;IACD,OAAO,MAAsB,CAAC;AAChC,CAAC","sourcesContent":["/**\n * The STORED fields a LIST or a raw-filter read leaves out (`RepositoryOptions.omitStoredFields`, #3204), applied identically\n * by both adapters.\n *\n * MongoDB leaves the paths out at the query ({@link mongoExclusionProjection}); PostgreSQL removes them from each row it\n * read ({@link withoutStoredPaths}), so the two return the same rows. See the option's JSDoc for why the option exists.\n */\n\n/** A MongoDB projection that excludes every path, or `undefined` when there is none to exclude. */\nexport function mongoExclusionProjection(paths: readonly string[] | undefined): Record<string, 0> | undefined {\n if (paths === undefined || paths.length === 0) return undefined;\n return Object.fromEntries(paths.map((path) => [path, 0 as const]));\n}\n\n/**\n * The row without the dotted paths. Copies only the objects along each path, so the row it was given is never changed;\n * a path whose parent is absent or not an object leaves the row as it is.\n */\nexport function withoutStoredPaths<T>(row: T, paths: readonly string[] | undefined): T {\n if (paths === undefined || paths.length === 0 || row === null || typeof row !== 'object') return row;\n let result = row as unknown as Record<string, unknown>;\n for (const path of paths) {\n const segments = path.split('.');\n const omit = (node: Record<string, unknown>, depth: number): Record<string, unknown> => {\n const key = segments[depth]!;\n if (!(key in node)) return node;\n if (depth === segments.length - 1) {\n const { [key]: _omitted, ...rest } = node;\n return rest;\n }\n const child = node[key];\n if (child === null || typeof child !== 'object' || Array.isArray(child)) return node;\n const nextChild = omit(child as Record<string, unknown>, depth + 1);\n return nextChild === child ? node : { ...node, [key]: nextChild };\n };\n result = omit(result, 0);\n }\n return result as unknown as T;\n}\n"]}
1
+ {"version":3,"file":"stored-field-omission.backend.js","sourceRoot":"","sources":["../../../../../src/base-classes/services/repositories/stored-field-omission.backend.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,mGAAmG;AACnG,MAAM,UAAU,wBAAwB,CAAC,KAAoC;IAC3E,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,SAAS,CAAC;IAChE,OAAO,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,CAAU,CAAC,CAAC,CAAC,CAAC;AACrE,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,kBAAkB,CAAI,GAAM,EAAE,KAAoC;IAChF,IAAI,KAAK,KAAK,SAAS,IA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AK,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;YACxB,MAAM,SAAS,GAAG,QAAQ,CAAC,KAAK,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC;YAC7C,OAAO,SAAS,KAAK,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,CAAC,GAAG,CAAC,EAAE,SAAS,EAAE,CAAC;QACpE,CAAC,CAAC;QACF,MAAM,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,CAA4B,CAAC;IAC1D,CAAC;IACD,OAAO,MAAsB,CAAC;AAChC,CAAC","sourcesContent":["/**\n * The STORED fields a LIST or a raw-filter read leaves out (`RepositoryOptions.omitStoredFields`, #3204), applied identically\n * by both adapters.\n *\n * MongoDB leaves the paths out at the query ({@link mongoExclusionProjection}); PostgreSQL removes them from each row it\n * read ({@link withoutStoredPaths}), so the two return the same rows. See the option's JSDoc for why the option exists.\n */\n\n/** A MongoDB projection that excludes every path, or `undefined` when there is none to exclude. */\nexport function mongoExclusionProjection(paths: readonly string[] | undefined): Record<string, 0> | undefined {\n if (paths === undefined || paths.length === 0) return undefined;\n return Object.fromEntries(paths.map((path) => [path, 0 as const]));\n}\n\n/**\n * The row without the dotted paths. Copies only the objects along each path, so the row it was given is never changed;\n * a path whose parent is absent or not an object leaves the row as it is.\n *\n * A path that passes through an ARRAY applies to each object element of it, and leaves its other elements as they are:\n * that is what MongoDB's exclusion projection does with the same path (`standaloneTasks.input.baseline.files` reaches\n * into every task of an execution row), so the two adapters return the same rows (#3204).\n */\nexport function withoutStoredPaths<T>(row: T, paths: readonly string[] | undefined): T {\n if (paths === undefined || paths.length === 0 || row === null || typeof row !== 'object') return row;\n let result = row as unknown as Record<string, unknown>;\n for (const path of paths) {\n const segments = path.split('.');\n const omitFrom = (value: unknown, depth: number): unknown => {\n if (Array.isArray(value)) {\n let changed = false;\n const elements = value.map((element) => {\n const next = omitFrom(element, depth);\n if (next !== element) changed = true;\n return next;\n });\n return changed ? elements : value;\n }\n if (value === null || typeof value !== 'object') return value;\n const node = value as Record<string, unknown>;\n const key = segments[depth]!;\n if (!(key in node)) return node;\n if (depth === segments.length - 1) {\n const { [key]: _omitted, ...rest } = node;\n return rest;\n }\n const child = node[key];\n const nextChild = omitFrom(child, depth + 1);\n return nextChild === child ? node : { ...node, [key]: nextChild };\n };\n result = omitFrom(result, 0) as Record<string, unknown>;\n }\n return result as unknown as T;\n}\n"]}
@@ -76,6 +76,8 @@ export interface ResourceOperationCustomImplementationRegistration {
76
76
  coreWritePinsRowVersion?: true;
77
77
  /** #2297: whether the hooks may run inside the transaction that keeps the audit row. See {@link ResourceCustomServiceImplementationHookTransactionPosture}. */
78
78
  hookTransactionPosture?: ResourceCustomServiceImplementationHookTransactionPosture;
79
+ /** #2297 wave 4: the most rows one attempt of this REPLACE writes on a multi-row verb. See `assertValidResourceCustomImplementationMaximumRowsWrittenPerAttempt`. */
80
+ maximumRowsWrittenPerAttempt?: number;
79
81
  }
80
82
  type ResourceOperationCustomImplementationRegistrationOptions = {
81
83
  reconcileScheduled?: ResourceScheduledReconciler;
@@ -89,6 +91,7 @@ type ResourceOperationCustomImplementationRegistrationOptions = {
89
91
  coreWritePrecondition?: AdmissionWritePrecondition;
90
92
  coreWritePinsRowVersion?: true;
91
93
  hookTransactionPosture?: ResourceCustomServiceImplementationHookTransactionPosture;
94
+ maximumRowsWrittenPerAttempt?: number;
92
95
  } & ResourceCustomServiceImplementationTransactionalCoreConfiguration;
93
96
  export declare class ResourceOperationCustomImplementationRegistryBackendService {
94
97
  private readonly resourcesRegistryService;
@@ -1 +1 @@
1
- {"version":3,"file":"resource-operation-custom-implementation-registry.backend.service.d.ts","sourceRoot":"","sources":["../../../../../src/base-classes/services/services/resource-operation-custom-implementation-registry.backend.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAsB,MAAM,WAAW,CAAC;AAC1D,OAAO,EAAsC,iDAAiD,EAAE,2CAA2C,EAAg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iDAAiD,EACvD,MAAM,EAAE,aAAa,GACpB,iDAAiD,EAAE;IAiCtD;;;OAGG;IACI,kBAAkB,CACvB,aAAa,EAAE,iDAAiD,EAAE,EAClE,IAAI,EAAE,iDAAiD,EACvD,MAAM,EAAE,aAAa,GACpB,iDAAiD,GAAG,SAAS;CAkBjE"}
1
+ {"version":3,"file":"resource-operation-custom-implementation-registry.backend.service.d.ts","sourceRoot":"","sources":["../../../../../src/base-classes/services/services/resource-operation-custom-implementation-registry.backend.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAsB,MAAM,WAAW,CAAC;AAC1D,OAAO,EAAsC,iDAAiD,EAAE,2CAA2C,EAAgC,MAAM,uBAAuB,CAAC;AACzM,OAAO,KAAK,EAAE,+BAA+B,EAAE,mCAAmC,EAAE,MAAM,uBAAuB,CAAC;AAClH,OAAO,KAAK,EAAE,yCAAyC,EAAE,MAAM,iEAAiE,CAAC;AACjI,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EASL,KAAK,sDAAsD,EAC3D,KAAK,yDAAyD,EAC9D,KAAK,2DAA2D,EAChE,KAAK,oEAAoE,EACzE,KAAK,yEAAyE,EAC9E,KAAK,iEAAiE,EACtE,KAAK,2BAA2B,EAChC,KAAK,kDAAkD,EACxD,MAAM,4DAA4D,CAAC;AACpE,OAAO,KAAK,EACV,0CAA0C,EAC3C,MAAM,4DAA4D,CAAC;AAGpE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,kFAAkF,CAAC;AAEnI,OAAO,EAAE,+BAA+B,EAAE,MAAM,0EAA0E,CAAC;AAC3H,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8DAA8D,CAAC;AAElG;;;;;;GAMG;AACH,MAAM,MAAM,kBAAkB,GAAG,OAAO,CAAC,MAAM,CAC7C,iDAAiD,EACjD;IAAE,gBAAgB,EAAE,OAAO,CAAA;CAAE,CAC9B,CAAC,CAAC;AAEH;;;;;GAKG;AAC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U,CAAC,EAClE,IAAI,EAAE,yCAAyC,CAAC,MAAM,EAAE,OAAO,CAAC,EAChE,OAAO,CAAC,EAAE,wDAAwD,GACjE,IAAI;IAMP,OAAO,CAAC,2BAA2B;IA6GnC,OAAO,CAAC,kBAAkB;IAiD1B;;OAEG;IACI,4BAA4B,CAAC,SAAS,EAAE,+BAA+B,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,UAAU,CAAC,GAAG,iDAAiD,EAAE;IAO5J,uGAAuG;IAChG,sBAAsB,CAAC,SAAS,EAAE,+BAA+B,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,UAAU,CAAC,GAAG,2BAA2B,GAAG,SAAS;IAI1I;;;;;;;;OAQG;IACI,2BAA2B,CAChC,aAAa,EAAE,iDAAiD,EAAE,EAClE,IAAI,EAAE,iDAAiD,EACvD,MAAM,EAAE,aAAa,GACpB,iDAAiD,EAAE;IAiCtD;;;OAGG;IACI,kBAAkB,CACvB,aAAa,EAAE,iDAAiD,EAAE,EAClE,IAAI,EAAE,iDAAiD,EACvD,MAAM,EAAE,aAAa,GACpB,iDAAiD,GAAG,SAAS;CAkBjE"}
@@ -12,8 +12,9 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
12
12
  };
13
13
  import { Container, inject, injectable } from 'inversify';
14
14
  import { ResourcesConfig_OperationPathUtils, ResourceOperation_CustomServiceImplementationMode, ResourceOperation_PostCommitEffectOwnership, ResourceOperationVariantType } from '@wildo-ai/saas-models';
15
- import { assertValidResourceCustomImplementationAuthoritativeFields, assertValidResourceCustomImplementationHookTransactionPosture, assertValidResourceCustomImplementationOperationAuditOwnership, assertValidResourceCustomImplementationPostCommitEffectOwnership, assertValidResourceCustomImplementationTransactionalCoreConfiguration, assertCoreWriteRuns, freezeCoreWritePrecondition, } from './resource-operation-custom-implementation.factory.backend.js';
15
+ import { assertValidResourceCustomImplementationAuthoritativeFields, assertValidResourceCustomImplementationHookTransactionPosture, assertValidResourceCustomImplementationMaximumRowsWrittenPerAttempt, assertValidResourceCustomImplementationOperationAuditOwnership, assertValidResourceCustomImplementationPostCommitEffectOwnership, assertValidResourceCustomImplementationTransactionalCoreConfiguration, assertCoreWriteRuns, freezeCoreWritePrecondition, } from './resource-operation-custom-implementation.factory.backend.js';
16
16
  import { SAAS_SERVICE_TYPES } from '../../../inject/models/service-types.js';
17
+ import { MULTI_ROW_WRITE_ROWS_PER_TRANSACTION } from './resource-operation-transaction-persistence.backend.utils.js';
17
18
  import { describeCaughtError } from '../../../errors/utils/error-log-level-classification.backend.utils.js';
18
19
  import { ResourcesRegistryBackendService } from '../../../resources/services/resources-registry.backend.service.js';
19
20
  /**
@@ -238,6 +239,13 @@ let ResourceOperationCustomImplementationRegistryBackendService = class Resource
238
239
  modes: implementation.getPlaceholders(),
239
240
  hookTransactionPosture: options?.hookTransactionPosture,
240
241
  });
242
+ assertValidResourceCustomImplementationMaximumRowsWrittenPerAttempt({
243
+ operationPathKey,
244
+ debugLabel,
245
+ modes: implementation.getPlaceholders(),
246
+ maximumRowsWrittenPerAttempt: options?.maximumRowsWrittenPerAttempt,
247
+ rowsPerTransactionBound: MULTI_ROW_WRITE_ROWS_PER_TRANSACTION,
248
+ });
241
249
  const transactionalCore = authoredTransactionalCore === true;
242
250
  // A registration can arrive through erased JavaScript without passing the factory, so a non-function is refused
243
251
  // here rather than skipped: a target authority that silently did not run would admit everyone it exists to refuse.
@@ -270,6 +278,7 @@ let ResourceOperationCustomImplementationRegistryBackendService = class Resource
270
278
  : {}),
271
279
  ...(options?.coreWritePinsRowVersion ? { coreWritePinsRowVersion: assertCoreWriteRuns(operationPathKey, debugLabel, implementation.getPlaceholders()) } : {}),
272
280
  ...(options?.hookTransactionPosture !== undefined ? { hookTransactionPosture: options.hookTransactionPosture } : {}),
281
+ ...(options?.maximumRowsWrittenPerAttempt !== undefined ? { maximumRowsWrittenPerAttempt: options.maximumRowsWrittenPerAttempt } : {}),
273
282
  };
274
283
  return registration;
275
284
  }
@@ -1 +1 @@
1
- {"version":3,"file":"resource-operation-custom-implementation-registry.backend.service.js","sourceRoot":"","sources":["../../../../../src/base-classes/services/services/resource-operation-custom-implementation-registry.backend.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAC1D,OAAO,EAAE,kCAAkC,EAAE,iDAAiD,EAAE,2CAA2C,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAC;AAIzM,OAAO,EACL,0DAA0D,EAC1D,6DAA6D,EAC7D,8DAA8D,EAC9D,gEAAgE,EAChE,qEAAqE,EACrE,mBAAmB,EACnB,2BAA2B,GAS5B,MAAM,4DAA4D,CAAC;AAIpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AAEpF,OAAO,EAAE,mBAAmB,EAAE,MAAM,8EAA8E,CAAC;AACnH,OAAO,EAAE,+BAA+B,EAAE,MAAM,0EAA0E,CAAC;AA0F3H;;;;;;;;;GASG;AACH,SAAS,oBAAoB,CAC3B,SAAkE,EAClE,aAA2E;IAE3E,MAAM,YAAY,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC,YAAY,EAAE,EAAE,CACvD,YAAY,CAAC,cAAc,CAAC,eAAe,EAAE,CAAC,QAAQ,CAAC,iDAAiD,CAAC,YAAY,CAAC,CAAC,CAAC;IAC1H,IAAI,CAAC,YAAY;QAAE,OAAO,SAAS,CAAC;IACpC,MAAM,QAAQ,GAAG;QACf,GAAG,CAAE,SAAwD,CAAC,iBAAiB,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QACrH,GAAG,CAAE,SAAuD,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;KACnH,CAAC;IACF,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC;QAA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esContent":["import { Container, inject, injectable } from 'inversify';\nimport { ResourcesConfig_OperationPathUtils, ResourceOperation_CustomServiceImplementationMode, ResourceOperation_PostCommitEffectOwnership, ResourceOperationVariantType } from '@wildo-ai/saas-models';\nimport type { ResourceConfiguration_Operation, ResourceConfiguration_OperationPath } from '@wildo-ai/saas-models';\nimport type { ResourceOperationCustomImplementationBase } from './resource-operation-custom-implementation-base.backend.service';\nimport { z } from 'zod';\nimport {\n assertValidResourceCustomImplementationAuthoritativeFields,\n assertValidResourceCustomImplementationHookTransactionPosture,\n assertValidResourceCustomImplementationOperationAuditOwnership,\n assertValidResourceCustomImplementationPostCommitEffectOwnership,\n assertValidResourceCustomImplementationTransactionalCoreConfiguration,\n assertCoreWriteRuns,\n freezeCoreWritePrecondition,\n type ResourceCustomServiceImplementationAuthoritativeFields,\n type ResourceCustomServiceImplementationHookTransactionPosture,\n type ResourceCustomServiceImplementationOwnsOperationAuditRecord,\n type ResourceCustomServiceImplementationTransactionalCoreConflictResolver,\n type ResourceCustomServiceImplementationTransactionalCoreCommitOutcomeResolver,\n type ResourceCustomServiceImplementationTransactionalCoreConfiguration,\n type ResourceScheduledReconciler,\n type ResourceCustomServiceImplementationTargetAuthority,\n} from './resource-operation-custom-implementation.factory.backend';\nimport type {\n ResourceCustomServiceImplementationFactory,\n} from './resource-operation-custom-implementation.factory.backend';\nimport { SAAS_SERVICE_TYPES } from '~wildo-backend-lib/inject/models/service-types';\nimport type { AdmissionWritePrecondition } from '~wildo-backend-lib/base-classes/utils/admission-write-precondition.backend.utils';\nimport { describeCaughtError } from '~wildo-backend-lib/errors/utils/error-log-level-classification.backend.utils';\nimport { ResourcesRegistryBackendService } from '~wildo-backend-lib/resources/services/resources-registry.backend.service';\nimport type { LoggerService } from '~wildo-backend-lib/monitoring/logger/services/logger.service';\n\n/**\n * Per-mode override configuration.\n * When `overrideExisting` is `true` for a given mode, the highest-priority\n * registration with that flag wins and all other registrations for that mode\n * are discarded. A runtime warning is emitted if multiple registrations\n * declare `overrideExisting` for the same mode.\n */\nexport type ModeOverrideConfig = Partial<Record<\n ResourceOperation_CustomServiceImplementationMode,\n { overrideExisting: boolean }\n>>;\n\n/**\n * A single registration entry in the multi-registration registry.\n *\n * Each factory produces one of these. Multiple registrations can exist\n * per operation path key — resolution is per-mode at orchestration time.\n */\nexport interface ResourceOperationCustomImplementationRegistration {\n reconcileScheduled?: ResourceScheduledReconciler;\n /** Who may act on the operation's single target, before any state refusal or hook. See {@link ResourceCustomServiceImplementationTargetAuthority}. */\n authorizeTarget?: ResourceCustomServiceImplementationTargetAuthority;\n /**\n * Type-erased implementation reference. The registry stores heterogeneous\n * implementations with different Zod schema types — type safety is enforced\n * at the factory creation site, not in the registry.\n */\n implementation: ResourceOperationCustomImplementationBase<any, any>;\n /** Lower number = higher priority. Default: 100. */\n priority: number;\n /** Per-mode override configuration. Default: all modes are chainable. */\n modeOverrides?: ModeOverrideConfig;\n /**\n * Human-readable label for debug logging and runtime warnings.\n * Fallback: `{operationPathKey}@{priority}`.\n */\n debugLabel: string;\n /** Whether this registration requires an atomic PREFIX/core/REPLACE/POSTFIX phase. */\n transactionalCore: boolean;\n /**\n * Additional named resource participants for the owned transaction. The\n * operation resource itself is included by the framework.\n */\n transactionParticipants?: Readonly<Record<string, string>>;\n transactionalCoreConflictResolver?: ResourceCustomServiceImplementationTransactionalCoreConflictResolver;\n /** #2820: the read-back asked when this registration's owned transaction committed and then threw. */\n transactionalCoreCommitOutcomeResolver?: ResourceCustomServiceImplementationTransactionalCoreCommitOutcomeResolver;\n /**\n * Fields whose value this registration's PREFIX hook owns, always carried past the repository's\n * strict `requestDto` re-parse with the POST-prefix value. See\n * {@link ResourceCustomServiceImplementationAuthoritativeFields} for why the allow-list cannot be\n * inferred from the payload diff alone.\n */\n authoritativeFields?: ResourceCustomServiceImplementationAuthoritativeFields;\n /**\n * Who delivers the occurrence's audit row and notifications. Normalized to `FRAMEWORK` when not authored. See\n * {@link ResourceOperation_PostCommitEffectOwnership}.\n */\n postCommitEffectOwnership: ResourceOperation_PostCommitEffectOwnership;\n /**\n * `true` when this registration's `overrideAll` records the operation's `RESOURCE_OPERATION_PERFORMED` row itself, so the\n * framework records none after it returns (#3151). See {@link ResourceCustomServiceImplementationOwnsOperationAuditRecord}.\n */\n ownsOperationAuditRecord?: ResourceCustomServiceImplementationOwnsOperationAuditRecord;\n /** #2543: what the row must still hold for the core write to land. See the factory result's `coreWritePrecondition`. */\n coreWritePrecondition?: AdmissionWritePrecondition;\n /** #3279: the core write lands only on the row at the version the hooks read. See the factory result's field. */\n coreWritePinsRowVersion?: true;\n /** #2297: whether the hooks may run inside the transaction that keeps the audit row. See {@link ResourceCustomServiceImplementationHookTransactionPosture}. */\n hookTransactionPosture?: ResourceCustomServiceImplementationHookTransactionPosture;\n}\n\ntype ResourceOperationCustomImplementationRegistrationOptions = {\n reconcileScheduled?: ResourceScheduledReconciler;\n authorizeTarget?: ResourceCustomServiceImplementationTargetAuthority;\n priority?: number;\n modeOverrides?: ModeOverrideConfig;\n debugLabel?: string;\n authoritativeFields?: ResourceCustomServiceImplementationAuthoritativeFields;\n postCommitEffectOwnership?: ResourceOperation_PostCommitEffectOwnership;\n ownsOperationAuditRecord?: ResourceCustomServiceImplementationOwnsOperationAuditRecord;\n coreWritePrecondition?: AdmissionWritePrecondition;\n coreWritePinsRowVersion?: true;\n hookTransactionPosture?: ResourceCustomServiceImplementationHookTransactionPosture;\n }\n & ResourceCustomServiceImplementationTransactionalCoreConfiguration;\n\n/**\n * Why an operation's declared notifications would never be sent, or `undefined` when they would (#2715 review H1).\n *\n * An OVERRIDE_ALL implementation replaces the whole framework pipeline and returns before its post-commit step, which is\n * the only place `userNotifications` and `m2mNotifications` are dispatched. (The resource-operation audit row is the\n * exception: the framework records it after `overrideAll` returns, #3151.) An operation declaring notifications and\n * implemented that way therefore told nobody, with no warning: the operator release shipped exactly so, its email\n * resolving in every application and never sent. Refused at startup beside the other \"registered but never runs\"\n * shapes; the remedy is a PREFIX / POSTFIX implementation over the framework's core, which keeps the post-commit step.\n */\nfunction inertNotificationsOf(\n operation: ResourceConfiguration_Operation<any, any, z.ZodTypeAny>,\n registrations: readonly ResourceOperationCustomImplementationRegistration[],\n): string | undefined {\n const overridesAll = registrations.some((registration) =>\n registration.implementation.getPlaceholders().includes(ResourceOperation_CustomServiceImplementationMode.OVERRIDE_ALL));\n if (!overridesAll) return undefined;\n const declared = [\n ...((operation as { userNotifications?: readonly unknown[] }).userNotifications?.length ? ['userNotifications'] : []),\n ...((operation as { m2mNotifications?: readonly unknown[] }).m2mNotifications?.length ? ['m2mNotifications'] : []),\n ];\n if (declared.length === 0) return undefined;\n return `declares ${declared.join(' and ')} but is implemented OVERRIDE_ALL, which returns before the framework's `\n + 'post-commit step, the only place notifications are sent: they would never leave. Implement it with PREFIX / '\n + 'POSTFIX over the framework core, or drop the declaration.';\n}\n\n@injectable()\nexport class ResourceOperationCustomImplementationRegistryBackendService {\n constructor(\n @inject(SAAS_SERVICE_TYPES.ResourceRegistryService) private readonly resourcesRegistryService: ResourcesRegistryBackendService,\n @inject(SAAS_SERVICE_TYPES.Container) private readonly container: Container,\n ) {}\n\n private registry = new Map<string, ResourceOperationCustomImplementationRegistration[]>();\n\n public initialize(implementationsFactories: ResourceCustomServiceImplementationFactory[]): void {\n const nextRegistry = new Map<string, ResourceOperationCustomImplementationRegistration[]>();\n\n for (const factory of implementationsFactories) {\n const result = factory(this.resourcesRegistryService, this.container);\n const registration = this.createValidatedRegistration(\n result.operationPathKey,\n result.implementation,\n result,\n );\n this.appendRegistration(nextRegistry, result.operationPathKey, registration);\n }\n\n this.assertRegistrationsResolveToConfiguredOperations(nextRegistry);\n\n // Publish the next registry only after every factory has passed validation.\n // A rejected startup configuration must not leave a partially initialized\n // registry visible to callers that inspect or retry initialization.\n this.registry = nextRegistry;\n }\n\n /**\n * Fails startup when a registration's operation-path key cannot resolve to an\n * operation the resource configuration actually declares.\n *\n * Custom implementations are addressed by an EXACT operation-path key that embeds\n * `variantType`, `isOperationDefault` / `variantKey` and the bulk flag\n * ({@link ResourcesConfig_OperationPathUtils.createOperationPathKey}), and dispatch\n * is a plain `Map.get(key)` in {@link getRegistrationsForOperation} with no fallback\n * and no near-miss diagnostic. A registration whose authored identity drifts from the\n * configured one is therefore not a degraded match — it is unreachable code that never\n * runs, produces no warning, and no error. That is precisely how commit 623c5aee\n * orphaned the billing-account CREATE prefix by moving the configured variant from\n * `REPOSITORY_ONLY` to `INTERNAL_CALL`: `provider.createCustomer()` silently stopped\n * running and accounts were persisted with no `providerCustomerId`.\n *\n * Only a resource that IS in the registry can be judged. A resource absent from the\n * registry is the normal feature-gated case, not drift: `start-application` computes\n * `excludedResourceTypes` and strips billing resources when billing is disabled,\n * lifecycle resources when lifecycle is disabled, and the scope variants outside\n * `billing.enabledScopes` — while `CoreBackend_ServiceImplementationsFactories`\n * registers those domains' implementations unconditionally. Skipping absent resources\n * keeps this guard closed on the failure it exists to catch without wedging startup\n * for every app that runs without billing or lifecycle.\n *\n * All violations are aggregated into a single throw so one boot surfaces the whole\n * drift set rather than one entry per restart.\n */\n private assertRegistrationsResolveToConfiguredOperations(registry: ReadonlyMap<string, ResourceOperationCustomImplementationRegistration[]>): void {\n const configuredResourceTypes = new Set(\n Object.keys(this.resourcesRegistryService.getResourcesRegistry().resourceConfigurations),\n );\n const violations: string[] = [];\n\n for (const [operationPathKey, registrations] of registry) {\n const operationPath = ResourcesConfig_OperationPathUtils.parseOperationPathKey(operationPathKey);\n\n // A REPOSITORY_ONLY registration is unreachable even when the configuration\n // declares that variant, so identity matching alone cannot clear it. Custom\n // implementations execute inside the service tier, and `doOperation` throws\n // outright on a REPOSITORY_ONLY operation — the tier is never entered. Such a\n // registration is dead by construction rather than by drift, which is why it is\n // rejected ahead of the configuration lookup and independently of whether the\n // resource is feature-gated in this application.\n //\n // The same asymmetry bites the producer side: `getServiceOperationPathDefault`,\n // behind every `*AsSystem` call, resolves INTERNAL_CALL / API_CALL defaults and\n // skips a REPOSITORY_ONLY-only op — so a resource whose writes are REPOSITORY_ONLY\n // cannot be written through the service tier at all. Declare the write variant\n // INTERNAL_CALL (no HTTP route: only API_CALL variants register routes) to get a\n // reachable service transport without adding public surface.\n if (operationPath.variantType === ResourceOperationVariantType.REPOSITORY_ONLY) {\n violations.push(\n `\"${operationPathKey}\" [${registrations.map((r) => r.debugLabel).join(', ')}] — `\n + 'custom implementations cannot run on a REPOSITORY_ONLY operation: they execute in the '\n + 'service tier, which rejects that variant. Register on the INTERNAL_CALL / API_CALL '\n + 'variant the operation actually exposes, or drop the registration.',\n );\n continue;\n }\n\n // Feature-gated away for this application — nothing to reconcile against.\n if (!configuredResourceTypes.has(String(operationPath.resourceIdentifier))) continue;\n\n // `findOperationFromPath` throws on an ambiguous configuration (two operations\n // sharing one identity). That is a genuine configuration break for exactly these\n // registrations, so it is reported here rather than escaping as a bare lookup\n // failure detached from the custom implementations it breaks.\n let matched: unknown;\n try {\n matched = this.resourcesRegistryService.findOperationFromPath(operationPath);\n } catch (error) {\n violations.push(\n `\"${operationPathKey}\" [${registrations.map((r) => r.debugLabel).join(', ')}] — `\n + `operation lookup failed: ${describeCaughtError(error)}`,\n );\n continue;\n }\n\n if (matched) {\n // A LOOSE match is not enough (#1717). Dispatch looks registrations up by the key of the CONFIGURED\n // operation (`getRegistrationsForOperation`), so a registration whose key differs — most often one\n // that omits `isOperationDefault` and so registers under `noVariantKey` while the default variant\n // dispatches under `isDefault` — matches here and is never looked up. It loaded, it passed this\n // guard, and it never ran: that is how a retention clock stayed null on a live stack.\n const dispatchKey = ResourcesConfig_OperationPathUtils.createOperationPathKeyFromOperation(matched as never);\n if (dispatchKey === operationPathKey) {\n const inert = inertNotificationsOf(matched as ResourceConfiguration_Operation<any, any, z.ZodTypeAny>, registrations);\n if (inert) violations.push(`\"${operationPathKey}\" [${registrations.map((r) => r.debugLabel).join(', ')}] — ${inert}`);\n continue;\n }\n violations.push(\n `\"${operationPathKey}\" [${registrations.map((r) => r.debugLabel).join(', ')}] — `\n + `matches the configured operation \"${dispatchKey}\" but is registered under a DIFFERENT key, so dispatch `\n + 'never finds it. Declare the variant identity exactly as configured (a default variant needs '\n + '`isOperationDefault: true`; a keyed one needs its `variantKey`).',\n );\n continue;\n }\n\n const declaredVariants = this.describeConfiguredOperationVariants(operationPath);\n violations.push(\n `\"${operationPathKey}\" [${registrations.map((r) => r.debugLabel).join(', ')}] — `\n + `resource \"${String(operationPath.resourceIdentifier)}\" declares no operation with this exact identity. `\n + (declaredVariants.length > 0\n ? `Operation \"${String(operationPath.operationIdentifier)}\" is configured as: ${declaredVariants.join(', ')}.`\n : `Operation \"${String(operationPath.operationIdentifier)}\" is not configured on this resource at all.`),\n );\n }\n\n if (violations.length > 0) {\n throw new Error(\n `[CustomImpl] ${violations.length} custom-implementation registration(s) do not match any configured `\n + `operation and would never execute. Align each registration's operationPath with the resource `\n + `configuration (the variantType is part of the resolution key):\\n`\n + violations.map((violation) => ` • ${violation}`).join('\\n'),\n );\n }\n }\n\n /**\n * The operation-path keys the resource configuration actually declares for the same\n * operation identifier. Turns \"no match\" into an actionable diff — the drift is almost\n * always a single field of the identity tuple, and naming the configured alternatives\n * is what makes the failure self-fixing.\n */\n private describeConfiguredOperationVariants(operationPath: ResourceConfiguration_OperationPath<any, any>): string[] {\n const configuration = this.resourcesRegistryService\n .getResourcesRegistry()\n .resourceConfigurations[operationPath.resourceIdentifier as string];\n\n return (configuration?.operations ?? [])\n .filter((operation: ResourceConfiguration_Operation<any, any, z.ZodTypeAny>) =>\n operation.operationIdentifier === operationPath.operationIdentifier)\n .map((operation: ResourceConfiguration_Operation<any, any, z.ZodTypeAny>) =>\n `\"${ResourcesConfig_OperationPathUtils.createOperationPathKeyFromOperation(operation as never)}\"`);\n }\n\n public clear(): void {\n this.registry.clear();\n }\n\n public registerByOperationPath<\n TInput extends z.ZodSchema | undefined = (z.ZodAny | undefined),\n TOutput extends z.ZodSchema = z.ZodAny,\n >(\n operationPath: ResourceConfiguration_OperationPath<any, any>,\n impl: ResourceOperationCustomImplementationBase<TInput, TOutput>,\n options?: ResourceOperationCustomImplementationRegistrationOptions,\n ): void {\n const key = ResourcesConfig_OperationPathUtils.createOperationPathKey(operationPath);\n const registration = this.createValidatedRegistration(key, impl, options);\n this.appendRegistration(this.registry, key, registration);\n }\n\n public registerByOperation<\n TInput extends z.ZodSchema | undefined = (z.ZodAny | undefined),\n TOutput extends z.ZodSchema = z.ZodAny,\n >(\n operation: ResourceConfiguration_Operation<any, any, z.ZodTypeAny>,\n impl: ResourceOperationCustomImplementationBase<TInput, TOutput>,\n options?: ResourceOperationCustomImplementationRegistrationOptions,\n ): void {\n const key = ResourcesConfig_OperationPathUtils.createOperationPathKeyFromOperation(operation as any);\n const registration = this.createValidatedRegistration(key, impl, options);\n this.appendRegistration(this.registry, key, registration);\n }\n\n private createValidatedRegistration(\n operationPathKey: string,\n implementation: ResourceOperationCustomImplementationBase<any, any>,\n options?: ResourceOperationCustomImplementationRegistrationOptions,\n ): ResourceOperationCustomImplementationRegistration {\n const authoredTransactionalCore: unknown =\n options?.transactionalCore === undefined\n ? false\n : options.transactionalCore;\n const debugLabel = options?.debugLabel ?? `${operationPathKey}@${options?.priority ?? 100}`;\n\n // Validate the authored value before normalization or copying. Spreading an\n // erased `undefined`, `null`, array, or class instance would otherwise turn\n // a malformed declaration into an apparently valid `{}` and advertise an\n // atomicity contract the author never actually declared.\n assertValidResourceCustomImplementationTransactionalCoreConfiguration({\n operationPathKey,\n debugLabel,\n modes: implementation.getPlaceholders(),\n transactionalCore: authoredTransactionalCore,\n transactionParticipants: options?.transactionParticipants,\n transactionalCoreConflictResolver:\n options?.transactionalCoreConflictResolver,\n transactionalCoreCommitOutcomeResolver:\n options?.transactionalCoreCommitOutcomeResolver,\n });\n\n // Same fail-before-registration discipline as the transactional-core check above: a\n // declaration that cannot take effect (no PREFIX handler) is an authoring error, and letting\n // it register silently is precisely the class of silence this contract removes.\n assertValidResourceCustomImplementationAuthoritativeFields({\n operationPathKey,\n debugLabel,\n modes: implementation.getPlaceholders(),\n authoritativeFields: options?.authoritativeFields,\n });\n\n // Validated here as well as in the factory, like the checks above: a registration can arrive through\n // `register`/`registerByOperation` or erased JavaScript without ever passing the factory.\n assertValidResourceCustomImplementationPostCommitEffectOwnership({\n operationPathKey,\n debugLabel,\n transactionalCore: authoredTransactionalCore,\n postCommitEffectOwnership: options?.postCommitEffectOwnership,\n });\n\n assertValidResourceCustomImplementationOperationAuditOwnership({\n operationPathKey,\n debugLabel,\n modes: implementation.getPlaceholders(),\n ownsOperationAuditRecord: options?.ownsOperationAuditRecord,\n });\n\n // #2297: refused when it cannot mean anything, like the declarations above (a registration may arrive without the factory).\n assertValidResourceCustomImplementationHookTransactionPosture({\n operationPathKey,\n debugLabel,\n modes: implementation.getPlaceholders(),\n hookTransactionPosture: options?.hookTransactionPosture,\n });\n\n const transactionalCore = authoredTransactionalCore === true;\n // A registration can arrive through erased JavaScript without passing the factory, so a non-function is refused\n // here rather than skipped: a target authority that silently did not run would admit everyone it exists to refuse.\n if (options?.authorizeTarget !== undefined && typeof options.authorizeTarget !== 'function') {\n throw new Error(`[CustomImpl] Target authority for \"${operationPathKey}\" (${debugLabel}) must be a function.`);\n }\n const registration: ResourceOperationCustomImplementationRegistration = {\n reconcileScheduled: options?.reconcileScheduled,\n ...(options?.authorizeTarget ? { authorizeTarget: options.authorizeTarget } : {}),\n implementation,\n priority: options?.priority ?? 100,\n modeOverrides: options?.modeOverrides,\n debugLabel,\n authoritativeFields: options?.authoritativeFields\n ? Object.freeze([...options.authoritativeFields])\n : undefined,\n transactionalCore,\n transactionParticipants:\n transactionalCore\n ? Object.freeze({\n ...(options?.transactionParticipants as Readonly<\n Record<string, string>\n >),\n })\n : undefined,\n transactionalCoreConflictResolver: options?.transactionalCoreConflictResolver,\n transactionalCoreCommitOutcomeResolver: options?.transactionalCoreCommitOutcomeResolver,\n postCommitEffectOwnership: options?.postCommitEffectOwnership ?? ResourceOperation_PostCommitEffectOwnership.FRAMEWORK,\n ...(options?.ownsOperationAuditRecord ? { ownsOperationAuditRecord: true as const } : {}),\n // Validated here too: a registration can arrive through `register`/`registerByOperation` without the factory.\n ...(options?.coreWritePrecondition\n ? { coreWritePrecondition: freezeCoreWritePrecondition(options.coreWritePrecondition, operationPathKey, debugLabel, implementation.getPlaceholders()) }\n : {}),\n ...(options?.coreWritePinsRowVersion ? { coreWritePinsRowVersion: assertCoreWriteRuns(operationPathKey, debugLabel, implementation.getPlaceholders()) } : {}),\n ...(options?.hookTransactionPosture !== undefined ? { hookTransactionPosture: options.hookTransactionPosture } : {}),\n };\n\n return registration;\n }\n\n private appendRegistration(\n registry: Map<string, ResourceOperationCustomImplementationRegistration[]>,\n operationPathKey: string,\n registration: ResourceOperationCustomImplementationRegistration,\n ): void {\n const existing = registry.get(operationPathKey);\n const nextRegistrations = existing\n ? [...existing, registration]\n : [registration];\n if (nextRegistrations.filter((candidate) => candidate.reconcileScheduled !== undefined).length > 1) {\n throw new Error(`[CustomImpl] Scheduled operation \"${operationPathKey}\" has multiple reconciliation owners. Declare one owner for the entire operation.`);\n }\n // Two registrations owning one operation's post-commit effects would each owe them, or each assume the other enqueued\n // them (#535). The registration set makes this a static fact, so it is refused here, at startup, rather than first\n // surfacing on a request; `doOperation` repeats the check per occurrence for registrations that bypass this registry.\n if (nextRegistrations.filter((candidate) => candidate.postCommitEffectOwnership === ResourceOperation_PostCommitEffectOwnership.IMPLEMENTATION_OUTBOX).length > 1) {\n throw new Error(`[CustomImpl] Operation \"${operationPathKey}\" has multiple post-commit effect owners (IMPLEMENTATION_OUTBOX). Declare one owner for the operation's effects.`);\n }\n if (registration.reconcileScheduled !== undefined && typeof registration.reconcileScheduled !== 'function') {\n throw new Error(`[CustomImpl] Scheduled reconciliation for \"${operationPathKey}\" must be a function.`);\n }\n if (registration.reconcileScheduled !== undefined) {\n const path = ResourcesConfig_OperationPathUtils.parseOperationPathKey(operationPathKey);\n if (path.variantType !== ResourceOperationVariantType.CRON_JOB && path.variantType !== ResourceOperationVariantType.BATCH_JOB) {\n throw new Error(`[CustomImpl] Scheduled reconciliation for \"${operationPathKey}\" requires a CRON_JOB or BATCH_JOB variant.`);\n }\n }\n const transactionalRegistrations = nextRegistrations\n .filter((candidate) => candidate.transactionalCore);\n const overrideAllRegistrations = nextRegistrations\n .filter((candidate) => candidate.implementation.getPlaceholders()\n .includes(ResourceOperation_CustomServiceImplementationMode.OVERRIDE_ALL));\n if (\n transactionalRegistrations.length > 0\n && overrideAllRegistrations.length > 0\n ) {\n throw new Error(\n `[CustomImpl] Invalid transactional-core configuration on operation \"${operationPathKey}\": `\n + `transactionalCore registration(s) [${transactionalRegistrations\n .map((candidate) => candidate.debugLabel).join(', ')}] cannot coexist with `\n + `OVERRIDE_ALL registration(s) [${overrideAllRegistrations\n .map((candidate) => candidate.debugLabel).join(', ')}] because OVERRIDE_ALL `\n + 'returns before the framework core transaction.',\n );\n }\n\n registry.set(operationPathKey, nextRegistrations);\n }\n\n /**\n * Returns all registrations for the given operation, sorted by priority (ascending = highest first).\n */\n public getRegistrationsForOperation(operation: ResourceConfiguration_Operation<any, any, z.ZodTypeAny>): ResourceOperationCustomImplementationRegistration[] {\n const key = ResourcesConfig_OperationPathUtils.createOperationPathKeyFromOperation(operation as any);\n const registrations = this.registry.get(key);\n if (!registrations || registrations.length === 0) return [];\n return [...registrations].sort((a, b) => a.priority - b.priority);\n }\n\n /** Resolves the single explicitly registered owner, without applying execution-hook priority rules. */\n public getScheduledReconciler(operation: ResourceConfiguration_Operation<any, any, z.ZodTypeAny>): ResourceScheduledReconciler | undefined {\n return this.getRegistrationsForOperation(operation).find((registration) => registration.reconcileScheduled !== undefined)?.reconcileScheduled;\n }\n\n /**\n * Resolves which registrations should execute for a specific mode.\n *\n * - Filters to registrations whose implementation declares the given mode in `getPlaceholders()`\n * - If any registration declares `modeOverrides[mode].overrideExisting = true`, the\n * highest-priority override wins and ALL other registrations for this mode are suppressed\n * (runtime warning logged for both multiple overrides and suppressed non-override registrations)\n * - Otherwise returns all candidates sorted by priority (ascending — lower number runs first)\n */\n public resolveRegistrationsForMode(\n registrations: ResourceOperationCustomImplementationRegistration[],\n mode: ResourceOperation_CustomServiceImplementationMode,\n logger: LoggerService,\n ): ResourceOperationCustomImplementationRegistration[] {\n const candidates = registrations\n .filter(r => r.implementation.getPlaceholders().includes(mode))\n .sort((a, b) => a.priority - b.priority);\n\n if (candidates.length === 0) return [];\n\n const overrides = candidates.filter(r =>\n r.modeOverrides?.[mode]?.overrideExisting === true\n );\n\n if (overrides.length > 1) {\n logger.warn(\n `[CustomImpl] Multiple overrideExisting=true for mode ${mode}: ` +\n `${overrides.map(r => r.debugLabel).join(', ')}. ` +\n `Using highest priority (${overrides[0].debugLabel}). This is likely a misconfiguration.`\n );\n }\n\n if (overrides.length >= 1) {\n const suppressed = candidates.filter(r => !overrides.includes(r));\n if (suppressed.length > 0) {\n logger.warn(\n `[CustomImpl] overrideExisting=true for mode ${mode} (${overrides[0].debugLabel}) ` +\n `is suppressing ${suppressed.length} registration(s): ${suppressed.map(r => r.debugLabel).join(', ')}`\n );\n }\n return [overrides[0]];\n }\n\n return candidates;\n }\n\n /**\n * For single-owner modes (OVERRIDE_ALL, REPLACE_CORE_OPERARTIONS), resolves to the\n * single highest-priority registration. Warns if multiple registrations declare the mode.\n */\n public resolveSingleOwner(\n registrations: ResourceOperationCustomImplementationRegistration[],\n mode: ResourceOperation_CustomServiceImplementationMode,\n logger: LoggerService,\n ): ResourceOperationCustomImplementationRegistration | undefined {\n const candidates = registrations\n .filter(r => r.implementation.getPlaceholders().includes(mode))\n .sort((a, b) => a.priority - b.priority);\n\n if (candidates.length === 0) return undefined;\n\n if (candidates.length > 1) {\n logger.warn(\n `[CustomImpl] Multiple registrations for single-owner mode ${mode}: ` +\n `${candidates.map(r => r.debugLabel).join(', ')}. ` +\n `Using highest priority (${candidates[0].debugLabel}).`\n );\n }\n\n return candidates[0];\n }\n\n}\n"]}
1
+ {"version":3,"file":"resource-operation-custom-implementation-registry.backend.service.js","sourceRoot":"","sources":["../../../../../src/base-classes/services/services/resource-operation-custom-implementation-registry.backend.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAC1D,OAAO,EAAE,kCAAkC,EAAE,iDAAiD,EAAE,2CAA2C,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAC;AAIzM,OAAO,EACL,0DAA0D,EAC1D,6DAA6D,EAC7D,mEAAmE,EACnE,8DAA8D,EAC9D,gEAAgE,EAChE,qEAAqE,EACrE,mBAAmB,EACnB,2BAA2B,GAS5B,MAAM,4DAA4D,CAAC;AAIpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AACpF,OAAO,EAAE,oCAAoC,EAAE,MAAM,4DAA4D,CAAC;AAElH,OAAO,EAAE,mBAAmB,EAAE,MAAM,8EAA8E,CAAC;AACnH,OAAO,EAAE,+BAA+B,EAAE,MAAM,0EAA0E,CAAC;AA6F3H;;;;;;;;;GASG;AACH,SAAS,oBAAoB,CAC3B,SAAkE,EAClE,aAA2E;IAE3E,MAAM,YAAY,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC,YAAY,EAAE,EAAE,CACvD,YAAY,CAAC,cAAc,CAAC,eAAe,EAAE,CAAC,QAAQ,CAAC,iDAAiD,CAAC,YAAY,CAAC,CAAC,CAAC;IAC1H,IAAI,CAAC,YAAY;QAAE,OAAO,SAAS,CAAC;IACpC,MAAM,QAAQ,GAAG;QACf,GAAG,CAAE,SAAwD,CAAC,iBAAiB,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QACrH,GAAG,CAAE,SAAuD,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;KACnH,CAAC;IACF,IAAI,QA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;gBACnD,2BAA2B,UAAU,CAAC,CAAC,CAAC,CAAC,UAAU,IAAI,CACxD,CAAC;QACJ,CAAC;QAED,OAAO,UAAU,CAAC,CAAC,CAAC,CAAC;IACvB,CAAC;CAEF,CAAA;AAzbY,2DAA2D;IADvE,UAAU,EAAE;IAGR,WAAA,MAAM,CAAC,kBAAkB,CAAC,uBAAuB,CAAC,CAAA;IAClD,WAAA,MAAM,CAAC,kBAAkB,CAAC,SAAS,CAAC,CAAA;qCAD0D,+BAA+B;QAC5D,SAAS;GAHlE,2DAA2D,CAybvE","sourcesContent":["import { Container, inject, injectable } from 'inversify';\nimport { ResourcesConfig_OperationPathUtils, ResourceOperation_CustomServiceImplementationMode, ResourceOperation_PostCommitEffectOwnership, ResourceOperationVariantType } from '@wildo-ai/saas-models';\nimport type { ResourceConfiguration_Operation, ResourceConfiguration_OperationPath } from '@wildo-ai/saas-models';\nimport type { ResourceOperationCustomImplementationBase } from './resource-operation-custom-implementation-base.backend.service';\nimport { z } from 'zod';\nimport {\n assertValidResourceCustomImplementationAuthoritativeFields,\n assertValidResourceCustomImplementationHookTransactionPosture,\n assertValidResourceCustomImplementationMaximumRowsWrittenPerAttempt,\n assertValidResourceCustomImplementationOperationAuditOwnership,\n assertValidResourceCustomImplementationPostCommitEffectOwnership,\n assertValidResourceCustomImplementationTransactionalCoreConfiguration,\n assertCoreWriteRuns,\n freezeCoreWritePrecondition,\n type ResourceCustomServiceImplementationAuthoritativeFields,\n type ResourceCustomServiceImplementationHookTransactionPosture,\n type ResourceCustomServiceImplementationOwnsOperationAuditRecord,\n type ResourceCustomServiceImplementationTransactionalCoreConflictResolver,\n type ResourceCustomServiceImplementationTransactionalCoreCommitOutcomeResolver,\n type ResourceCustomServiceImplementationTransactionalCoreConfiguration,\n type ResourceScheduledReconciler,\n type ResourceCustomServiceImplementationTargetAuthority,\n} from './resource-operation-custom-implementation.factory.backend';\nimport type {\n ResourceCustomServiceImplementationFactory,\n} from './resource-operation-custom-implementation.factory.backend';\nimport { SAAS_SERVICE_TYPES } from '~wildo-backend-lib/inject/models/service-types';\nimport { MULTI_ROW_WRITE_ROWS_PER_TRANSACTION } from './resource-operation-transaction-persistence.backend.utils';\nimport type { AdmissionWritePrecondition } from '~wildo-backend-lib/base-classes/utils/admission-write-precondition.backend.utils';\nimport { describeCaughtError } from '~wildo-backend-lib/errors/utils/error-log-level-classification.backend.utils';\nimport { ResourcesRegistryBackendService } from '~wildo-backend-lib/resources/services/resources-registry.backend.service';\nimport type { LoggerService } from '~wildo-backend-lib/monitoring/logger/services/logger.service';\n\n/**\n * Per-mode override configuration.\n * When `overrideExisting` is `true` for a given mode, the highest-priority\n * registration with that flag wins and all other registrations for that mode\n * are discarded. A runtime warning is emitted if multiple registrations\n * declare `overrideExisting` for the same mode.\n */\nexport type ModeOverrideConfig = Partial<Record<\n ResourceOperation_CustomServiceImplementationMode,\n { overrideExisting: boolean }\n>>;\n\n/**\n * A single registration entry in the multi-registration registry.\n *\n * Each factory produces one of these. Multiple registrations can exist\n * per operation path key — resolution is per-mode at orchestration time.\n */\nexport interface ResourceOperationCustomImplementationRegistration {\n reconcileScheduled?: ResourceScheduledReconciler;\n /** Who may act on the operation's single target, before any state refusal or hook. See {@link ResourceCustomServiceImplementationTargetAuthority}. */\n authorizeTarget?: ResourceCustomServiceImplementationTargetAuthority;\n /**\n * Type-erased implementation reference. The registry stores heterogeneous\n * implementations with different Zod schema types — type safety is enforced\n * at the factory creation site, not in the registry.\n */\n implementation: ResourceOperationCustomImplementationBase<any, any>;\n /** Lower number = higher priority. Default: 100. */\n priority: number;\n /** Per-mode override configuration. Default: all modes are chainable. */\n modeOverrides?: ModeOverrideConfig;\n /**\n * Human-readable label for debug logging and runtime warnings.\n * Fallback: `{operationPathKey}@{priority}`.\n */\n debugLabel: string;\n /** Whether this registration requires an atomic PREFIX/core/REPLACE/POSTFIX phase. */\n transactionalCore: boolean;\n /**\n * Additional named resource participants for the owned transaction. The\n * operation resource itself is included by the framework.\n */\n transactionParticipants?: Readonly<Record<string, string>>;\n transactionalCoreConflictResolver?: ResourceCustomServiceImplementationTransactionalCoreConflictResolver;\n /** #2820: the read-back asked when this registration's owned transaction committed and then threw. */\n transactionalCoreCommitOutcomeResolver?: ResourceCustomServiceImplementationTransactionalCoreCommitOutcomeResolver;\n /**\n * Fields whose value this registration's PREFIX hook owns, always carried past the repository's\n * strict `requestDto` re-parse with the POST-prefix value. See\n * {@link ResourceCustomServiceImplementationAuthoritativeFields} for why the allow-list cannot be\n * inferred from the payload diff alone.\n */\n authoritativeFields?: ResourceCustomServiceImplementationAuthoritativeFields;\n /**\n * Who delivers the occurrence's audit row and notifications. Normalized to `FRAMEWORK` when not authored. See\n * {@link ResourceOperation_PostCommitEffectOwnership}.\n */\n postCommitEffectOwnership: ResourceOperation_PostCommitEffectOwnership;\n /**\n * `true` when this registration's `overrideAll` records the operation's `RESOURCE_OPERATION_PERFORMED` row itself, so the\n * framework records none after it returns (#3151). See {@link ResourceCustomServiceImplementationOwnsOperationAuditRecord}.\n */\n ownsOperationAuditRecord?: ResourceCustomServiceImplementationOwnsOperationAuditRecord;\n /** #2543: what the row must still hold for the core write to land. See the factory result's `coreWritePrecondition`. */\n coreWritePrecondition?: AdmissionWritePrecondition;\n /** #3279: the core write lands only on the row at the version the hooks read. See the factory result's field. */\n coreWritePinsRowVersion?: true;\n /** #2297: whether the hooks may run inside the transaction that keeps the audit row. See {@link ResourceCustomServiceImplementationHookTransactionPosture}. */\n hookTransactionPosture?: ResourceCustomServiceImplementationHookTransactionPosture;\n /** #2297 wave 4: the most rows one attempt of this REPLACE writes on a multi-row verb. See `assertValidResourceCustomImplementationMaximumRowsWrittenPerAttempt`. */\n maximumRowsWrittenPerAttempt?: number;\n}\n\ntype ResourceOperationCustomImplementationRegistrationOptions = {\n reconcileScheduled?: ResourceScheduledReconciler;\n authorizeTarget?: ResourceCustomServiceImplementationTargetAuthority;\n priority?: number;\n modeOverrides?: ModeOverrideConfig;\n debugLabel?: string;\n authoritativeFields?: ResourceCustomServiceImplementationAuthoritativeFields;\n postCommitEffectOwnership?: ResourceOperation_PostCommitEffectOwnership;\n ownsOperationAuditRecord?: ResourceCustomServiceImplementationOwnsOperationAuditRecord;\n coreWritePrecondition?: AdmissionWritePrecondition;\n coreWritePinsRowVersion?: true;\n hookTransactionPosture?: ResourceCustomServiceImplementationHookTransactionPosture;\n maximumRowsWrittenPerAttempt?: number;\n }\n & ResourceCustomServiceImplementationTransactionalCoreConfiguration;\n\n/**\n * Why an operation's declared notifications would never be sent, or `undefined` when they would (#2715 review H1).\n *\n * An OVERRIDE_ALL implementation replaces the whole framework pipeline and returns before its post-commit step, which is\n * the only place `userNotifications` and `m2mNotifications` are dispatched. (The resource-operation audit row is the\n * exception: the framework records it after `overrideAll` returns, #3151.) An operation declaring notifications and\n * implemented that way therefore told nobody, with no warning: the operator release shipped exactly so, its email\n * resolving in every application and never sent. Refused at startup beside the other \"registered but never runs\"\n * shapes; the remedy is a PREFIX / POSTFIX implementation over the framework's core, which keeps the post-commit step.\n */\nfunction inertNotificationsOf(\n operation: ResourceConfiguration_Operation<any, any, z.ZodTypeAny>,\n registrations: readonly ResourceOperationCustomImplementationRegistration[],\n): string | undefined {\n const overridesAll = registrations.some((registration) =>\n registration.implementation.getPlaceholders().includes(ResourceOperation_CustomServiceImplementationMode.OVERRIDE_ALL));\n if (!overridesAll) return undefined;\n const declared = [\n ...((operation as { userNotifications?: readonly unknown[] }).userNotifications?.length ? ['userNotifications'] : []),\n ...((operation as { m2mNotifications?: readonly unknown[] }).m2mNotifications?.length ? ['m2mNotifications'] : []),\n ];\n if (declared.length === 0) return undefined;\n return `declares ${declared.join(' and ')} but is implemented OVERRIDE_ALL, which returns before the framework's `\n + 'post-commit step, the only place notifications are sent: they would never leave. Implement it with PREFIX / '\n + 'POSTFIX over the framework core, or drop the declaration.';\n}\n\n@injectable()\nexport class ResourceOperationCustomImplementationRegistryBackendService {\n constructor(\n @inject(SAAS_SERVICE_TYPES.ResourceRegistryService) private readonly resourcesRegistryService: ResourcesRegistryBackendService,\n @inject(SAAS_SERVICE_TYPES.Container) private readonly container: Container,\n ) {}\n\n private registry = new Map<string, ResourceOperationCustomImplementationRegistration[]>();\n\n public initialize(implementationsFactories: ResourceCustomServiceImplementationFactory[]): void {\n const nextRegistry = new Map<string, ResourceOperationCustomImplementationRegistration[]>();\n\n for (const factory of implementationsFactories) {\n const result = factory(this.resourcesRegistryService, this.container);\n const registration = this.createValidatedRegistration(\n result.operationPathKey,\n result.implementation,\n result,\n );\n this.appendRegistration(nextRegistry, result.operationPathKey, registration);\n }\n\n this.assertRegistrationsResolveToConfiguredOperations(nextRegistry);\n\n // Publish the next registry only after every factory has passed validation.\n // A rejected startup configuration must not leave a partially initialized\n // registry visible to callers that inspect or retry initialization.\n this.registry = nextRegistry;\n }\n\n /**\n * Fails startup when a registration's operation-path key cannot resolve to an\n * operation the resource configuration actually declares.\n *\n * Custom implementations are addressed by an EXACT operation-path key that embeds\n * `variantType`, `isOperationDefault` / `variantKey` and the bulk flag\n * ({@link ResourcesConfig_OperationPathUtils.createOperationPathKey}), and dispatch\n * is a plain `Map.get(key)` in {@link getRegistrationsForOperation} with no fallback\n * and no near-miss diagnostic. A registration whose authored identity drifts from the\n * configured one is therefore not a degraded match — it is unreachable code that never\n * runs, produces no warning, and no error. That is precisely how commit 623c5aee\n * orphaned the billing-account CREATE prefix by moving the configured variant from\n * `REPOSITORY_ONLY` to `INTERNAL_CALL`: `provider.createCustomer()` silently stopped\n * running and accounts were persisted with no `providerCustomerId`.\n *\n * Only a resource that IS in the registry can be judged. A resource absent from the\n * registry is the normal feature-gated case, not drift: `start-application` computes\n * `excludedResourceTypes` and strips billing resources when billing is disabled,\n * lifecycle resources when lifecycle is disabled, and the scope variants outside\n * `billing.enabledScopes` — while `CoreBackend_ServiceImplementationsFactories`\n * registers those domains' implementations unconditionally. Skipping absent resources\n * keeps this guard closed on the failure it exists to catch without wedging startup\n * for every app that runs without billing or lifecycle.\n *\n * All violations are aggregated into a single throw so one boot surfaces the whole\n * drift set rather than one entry per restart.\n */\n private assertRegistrationsResolveToConfiguredOperations(registry: ReadonlyMap<string, ResourceOperationCustomImplementationRegistration[]>): void {\n const configuredResourceTypes = new Set(\n Object.keys(this.resourcesRegistryService.getResourcesRegistry().resourceConfigurations),\n );\n const violations: string[] = [];\n\n for (const [operationPathKey, registrations] of registry) {\n const operationPath = ResourcesConfig_OperationPathUtils.parseOperationPathKey(operationPathKey);\n\n // A REPOSITORY_ONLY registration is unreachable even when the configuration\n // declares that variant, so identity matching alone cannot clear it. Custom\n // implementations execute inside the service tier, and `doOperation` throws\n // outright on a REPOSITORY_ONLY operation — the tier is never entered. Such a\n // registration is dead by construction rather than by drift, which is why it is\n // rejected ahead of the configuration lookup and independently of whether the\n // resource is feature-gated in this application.\n //\n // The same asymmetry bites the producer side: `getServiceOperationPathDefault`,\n // behind every `*AsSystem` call, resolves INTERNAL_CALL / API_CALL defaults and\n // skips a REPOSITORY_ONLY-only op — so a resource whose writes are REPOSITORY_ONLY\n // cannot be written through the service tier at all. Declare the write variant\n // INTERNAL_CALL (no HTTP route: only API_CALL variants register routes) to get a\n // reachable service transport without adding public surface.\n if (operationPath.variantType === ResourceOperationVariantType.REPOSITORY_ONLY) {\n violations.push(\n `\"${operationPathKey}\" [${registrations.map((r) => r.debugLabel).join(', ')}] — `\n + 'custom implementations cannot run on a REPOSITORY_ONLY operation: they execute in the '\n + 'service tier, which rejects that variant. Register on the INTERNAL_CALL / API_CALL '\n + 'variant the operation actually exposes, or drop the registration.',\n );\n continue;\n }\n\n // Feature-gated away for this application — nothing to reconcile against.\n if (!configuredResourceTypes.has(String(operationPath.resourceIdentifier))) continue;\n\n // `findOperationFromPath` throws on an ambiguous configuration (two operations\n // sharing one identity). That is a genuine configuration break for exactly these\n // registrations, so it is reported here rather than escaping as a bare lookup\n // failure detached from the custom implementations it breaks.\n let matched: unknown;\n try {\n matched = this.resourcesRegistryService.findOperationFromPath(operationPath);\n } catch (error) {\n violations.push(\n `\"${operationPathKey}\" [${registrations.map((r) => r.debugLabel).join(', ')}] — `\n + `operation lookup failed: ${describeCaughtError(error)}`,\n );\n continue;\n }\n\n if (matched) {\n // A LOOSE match is not enough (#1717). Dispatch looks registrations up by the key of the CONFIGURED\n // operation (`getRegistrationsForOperation`), so a registration whose key differs — most often one\n // that omits `isOperationDefault` and so registers under `noVariantKey` while the default variant\n // dispatches under `isDefault` — matches here and is never looked up. It loaded, it passed this\n // guard, and it never ran: that is how a retention clock stayed null on a live stack.\n const dispatchKey = ResourcesConfig_OperationPathUtils.createOperationPathKeyFromOperation(matched as never);\n if (dispatchKey === operationPathKey) {\n const inert = inertNotificationsOf(matched as ResourceConfiguration_Operation<any, any, z.ZodTypeAny>, registrations);\n if (inert) violations.push(`\"${operationPathKey}\" [${registrations.map((r) => r.debugLabel).join(', ')}] — ${inert}`);\n continue;\n }\n violations.push(\n `\"${operationPathKey}\" [${registrations.map((r) => r.debugLabel).join(', ')}] — `\n + `matches the configured operation \"${dispatchKey}\" but is registered under a DIFFERENT key, so dispatch `\n + 'never finds it. Declare the variant identity exactly as configured (a default variant needs '\n + '`isOperationDefault: true`; a keyed one needs its `variantKey`).',\n );\n continue;\n }\n\n const declaredVariants = this.describeConfiguredOperationVariants(operationPath);\n violations.push(\n `\"${operationPathKey}\" [${registrations.map((r) => r.debugLabel).join(', ')}] — `\n + `resource \"${String(operationPath.resourceIdentifier)}\" declares no operation with this exact identity. `\n + (declaredVariants.length > 0\n ? `Operation \"${String(operationPath.operationIdentifier)}\" is configured as: ${declaredVariants.join(', ')}.`\n : `Operation \"${String(operationPath.operationIdentifier)}\" is not configured on this resource at all.`),\n );\n }\n\n if (violations.length > 0) {\n throw new Error(\n `[CustomImpl] ${violations.length} custom-implementation registration(s) do not match any configured `\n + `operation and would never execute. Align each registration's operationPath with the resource `\n + `configuration (the variantType is part of the resolution key):\\n`\n + violations.map((violation) => ` • ${violation}`).join('\\n'),\n );\n }\n }\n\n /**\n * The operation-path keys the resource configuration actually declares for the same\n * operation identifier. Turns \"no match\" into an actionable diff — the drift is almost\n * always a single field of the identity tuple, and naming the configured alternatives\n * is what makes the failure self-fixing.\n */\n private describeConfiguredOperationVariants(operationPath: ResourceConfiguration_OperationPath<any, any>): string[] {\n const configuration = this.resourcesRegistryService\n .getResourcesRegistry()\n .resourceConfigurations[operationPath.resourceIdentifier as string];\n\n return (configuration?.operations ?? [])\n .filter((operation: ResourceConfiguration_Operation<any, any, z.ZodTypeAny>) =>\n operation.operationIdentifier === operationPath.operationIdentifier)\n .map((operation: ResourceConfiguration_Operation<any, any, z.ZodTypeAny>) =>\n `\"${ResourcesConfig_OperationPathUtils.createOperationPathKeyFromOperation(operation as never)}\"`);\n }\n\n public clear(): void {\n this.registry.clear();\n }\n\n public registerByOperationPath<\n TInput extends z.ZodSchema | undefined = (z.ZodAny | undefined),\n TOutput extends z.ZodSchema = z.ZodAny,\n >(\n operationPath: ResourceConfiguration_OperationPath<any, any>,\n impl: ResourceOperationCustomImplementationBase<TInput, TOutput>,\n options?: ResourceOperationCustomImplementationRegistrationOptions,\n ): void {\n const key = ResourcesConfig_OperationPathUtils.createOperationPathKey(operationPath);\n const registration = this.createValidatedRegistration(key, impl, options);\n this.appendRegistration(this.registry, key, registration);\n }\n\n public registerByOperation<\n TInput extends z.ZodSchema | undefined = (z.ZodAny | undefined),\n TOutput extends z.ZodSchema = z.ZodAny,\n >(\n operation: ResourceConfiguration_Operation<any, any, z.ZodTypeAny>,\n impl: ResourceOperationCustomImplementationBase<TInput, TOutput>,\n options?: ResourceOperationCustomImplementationRegistrationOptions,\n ): void {\n const key = ResourcesConfig_OperationPathUtils.createOperationPathKeyFromOperation(operation as any);\n const registration = this.createValidatedRegistration(key, impl, options);\n this.appendRegistration(this.registry, key, registration);\n }\n\n private createValidatedRegistration(\n operationPathKey: string,\n implementation: ResourceOperationCustomImplementationBase<any, any>,\n options?: ResourceOperationCustomImplementationRegistrationOptions,\n ): ResourceOperationCustomImplementationRegistration {\n const authoredTransactionalCore: unknown =\n options?.transactionalCore === undefined\n ? false\n : options.transactionalCore;\n const debugLabel = options?.debugLabel ?? `${operationPathKey}@${options?.priority ?? 100}`;\n\n // Validate the authored value before normalization or copying. Spreading an\n // erased `undefined`, `null`, array, or class instance would otherwise turn\n // a malformed declaration into an apparently valid `{}` and advertise an\n // atomicity contract the author never actually declared.\n assertValidResourceCustomImplementationTransactionalCoreConfiguration({\n operationPathKey,\n debugLabel,\n modes: implementation.getPlaceholders(),\n transactionalCore: authoredTransactionalCore,\n transactionParticipants: options?.transactionParticipants,\n transactionalCoreConflictResolver:\n options?.transactionalCoreConflictResolver,\n transactionalCoreCommitOutcomeResolver:\n options?.transactionalCoreCommitOutcomeResolver,\n });\n\n // Same fail-before-registration discipline as the transactional-core check above: a\n // declaration that cannot take effect (no PREFIX handler) is an authoring error, and letting\n // it register silently is precisely the class of silence this contract removes.\n assertValidResourceCustomImplementationAuthoritativeFields({\n operationPathKey,\n debugLabel,\n modes: implementation.getPlaceholders(),\n authoritativeFields: options?.authoritativeFields,\n });\n\n // Validated here as well as in the factory, like the checks above: a registration can arrive through\n // `register`/`registerByOperation` or erased JavaScript without ever passing the factory.\n assertValidResourceCustomImplementationPostCommitEffectOwnership({\n operationPathKey,\n debugLabel,\n transactionalCore: authoredTransactionalCore,\n postCommitEffectOwnership: options?.postCommitEffectOwnership,\n });\n\n assertValidResourceCustomImplementationOperationAuditOwnership({\n operationPathKey,\n debugLabel,\n modes: implementation.getPlaceholders(),\n ownsOperationAuditRecord: options?.ownsOperationAuditRecord,\n });\n\n // #2297: refused when it cannot mean anything, like the declarations above (a registration may arrive without the factory).\n assertValidResourceCustomImplementationHookTransactionPosture({\n operationPathKey,\n debugLabel,\n modes: implementation.getPlaceholders(),\n hookTransactionPosture: options?.hookTransactionPosture,\n });\n assertValidResourceCustomImplementationMaximumRowsWrittenPerAttempt({\n operationPathKey,\n debugLabel,\n modes: implementation.getPlaceholders(),\n maximumRowsWrittenPerAttempt: options?.maximumRowsWrittenPerAttempt,\n rowsPerTransactionBound: MULTI_ROW_WRITE_ROWS_PER_TRANSACTION,\n });\n\n const transactionalCore = authoredTransactionalCore === true;\n // A registration can arrive through erased JavaScript without passing the factory, so a non-function is refused\n // here rather than skipped: a target authority that silently did not run would admit everyone it exists to refuse.\n if (options?.authorizeTarget !== undefined && typeof options.authorizeTarget !== 'function') {\n throw new Error(`[CustomImpl] Target authority for \"${operationPathKey}\" (${debugLabel}) must be a function.`);\n }\n const registration: ResourceOperationCustomImplementationRegistration = {\n reconcileScheduled: options?.reconcileScheduled,\n ...(options?.authorizeTarget ? { authorizeTarget: options.authorizeTarget } : {}),\n implementation,\n priority: options?.priority ?? 100,\n modeOverrides: options?.modeOverrides,\n debugLabel,\n authoritativeFields: options?.authoritativeFields\n ? Object.freeze([...options.authoritativeFields])\n : undefined,\n transactionalCore,\n transactionParticipants:\n transactionalCore\n ? Object.freeze({\n ...(options?.transactionParticipants as Readonly<\n Record<string, string>\n >),\n })\n : undefined,\n transactionalCoreConflictResolver: options?.transactionalCoreConflictResolver,\n transactionalCoreCommitOutcomeResolver: options?.transactionalCoreCommitOutcomeResolver,\n postCommitEffectOwnership: options?.postCommitEffectOwnership ?? ResourceOperation_PostCommitEffectOwnership.FRAMEWORK,\n ...(options?.ownsOperationAuditRecord ? { ownsOperationAuditRecord: true as const } : {}),\n // Validated here too: a registration can arrive through `register`/`registerByOperation` without the factory.\n ...(options?.coreWritePrecondition\n ? { coreWritePrecondition: freezeCoreWritePrecondition(options.coreWritePrecondition, operationPathKey, debugLabel, implementation.getPlaceholders()) }\n : {}),\n ...(options?.coreWritePinsRowVersion ? { coreWritePinsRowVersion: assertCoreWriteRuns(operationPathKey, debugLabel, implementation.getPlaceholders()) } : {}),\n ...(options?.hookTransactionPosture !== undefined ? { hookTransactionPosture: options.hookTransactionPosture } : {}),\n ...(options?.maximumRowsWrittenPerAttempt !== undefined ? { maximumRowsWrittenPerAttempt: options.maximumRowsWrittenPerAttempt } : {}),\n };\n\n return registration;\n }\n\n private appendRegistration(\n registry: Map<string, ResourceOperationCustomImplementationRegistration[]>,\n operationPathKey: string,\n registration: ResourceOperationCustomImplementationRegistration,\n ): void {\n const existing = registry.get(operationPathKey);\n const nextRegistrations = existing\n ? [...existing, registration]\n : [registration];\n if (nextRegistrations.filter((candidate) => candidate.reconcileScheduled !== undefined).length > 1) {\n throw new Error(`[CustomImpl] Scheduled operation \"${operationPathKey}\" has multiple reconciliation owners. Declare one owner for the entire operation.`);\n }\n // Two registrations owning one operation's post-commit effects would each owe them, or each assume the other enqueued\n // them (#535). The registration set makes this a static fact, so it is refused here, at startup, rather than first\n // surfacing on a request; `doOperation` repeats the check per occurrence for registrations that bypass this registry.\n if (nextRegistrations.filter((candidate) => candidate.postCommitEffectOwnership === ResourceOperation_PostCommitEffectOwnership.IMPLEMENTATION_OUTBOX).length > 1) {\n throw new Error(`[CustomImpl] Operation \"${operationPathKey}\" has multiple post-commit effect owners (IMPLEMENTATION_OUTBOX). Declare one owner for the operation's effects.`);\n }\n if (registration.reconcileScheduled !== undefined && typeof registration.reconcileScheduled !== 'function') {\n throw new Error(`[CustomImpl] Scheduled reconciliation for \"${operationPathKey}\" must be a function.`);\n }\n if (registration.reconcileScheduled !== undefined) {\n const path = ResourcesConfig_OperationPathUtils.parseOperationPathKey(operationPathKey);\n if (path.variantType !== ResourceOperationVariantType.CRON_JOB && path.variantType !== ResourceOperationVariantType.BATCH_JOB) {\n throw new Error(`[CustomImpl] Scheduled reconciliation for \"${operationPathKey}\" requires a CRON_JOB or BATCH_JOB variant.`);\n }\n }\n const transactionalRegistrations = nextRegistrations\n .filter((candidate) => candidate.transactionalCore);\n const overrideAllRegistrations = nextRegistrations\n .filter((candidate) => candidate.implementation.getPlaceholders()\n .includes(ResourceOperation_CustomServiceImplementationMode.OVERRIDE_ALL));\n if (\n transactionalRegistrations.length > 0\n && overrideAllRegistrations.length > 0\n ) {\n throw new Error(\n `[CustomImpl] Invalid transactional-core configuration on operation \"${operationPathKey}\": `\n + `transactionalCore registration(s) [${transactionalRegistrations\n .map((candidate) => candidate.debugLabel).join(', ')}] cannot coexist with `\n + `OVERRIDE_ALL registration(s) [${overrideAllRegistrations\n .map((candidate) => candidate.debugLabel).join(', ')}] because OVERRIDE_ALL `\n + 'returns before the framework core transaction.',\n );\n }\n\n registry.set(operationPathKey, nextRegistrations);\n }\n\n /**\n * Returns all registrations for the given operation, sorted by priority (ascending = highest first).\n */\n public getRegistrationsForOperation(operation: ResourceConfiguration_Operation<any, any, z.ZodTypeAny>): ResourceOperationCustomImplementationRegistration[] {\n const key = ResourcesConfig_OperationPathUtils.createOperationPathKeyFromOperation(operation as any);\n const registrations = this.registry.get(key);\n if (!registrations || registrations.length === 0) return [];\n return [...registrations].sort((a, b) => a.priority - b.priority);\n }\n\n /** Resolves the single explicitly registered owner, without applying execution-hook priority rules. */\n public getScheduledReconciler(operation: ResourceConfiguration_Operation<any, any, z.ZodTypeAny>): ResourceScheduledReconciler | undefined {\n return this.getRegistrationsForOperation(operation).find((registration) => registration.reconcileScheduled !== undefined)?.reconcileScheduled;\n }\n\n /**\n * Resolves which registrations should execute for a specific mode.\n *\n * - Filters to registrations whose implementation declares the given mode in `getPlaceholders()`\n * - If any registration declares `modeOverrides[mode].overrideExisting = true`, the\n * highest-priority override wins and ALL other registrations for this mode are suppressed\n * (runtime warning logged for both multiple overrides and suppressed non-override registrations)\n * - Otherwise returns all candidates sorted by priority (ascending — lower number runs first)\n */\n public resolveRegistrationsForMode(\n registrations: ResourceOperationCustomImplementationRegistration[],\n mode: ResourceOperation_CustomServiceImplementationMode,\n logger: LoggerService,\n ): ResourceOperationCustomImplementationRegistration[] {\n const candidates = registrations\n .filter(r => r.implementation.getPlaceholders().includes(mode))\n .sort((a, b) => a.priority - b.priority);\n\n if (candidates.length === 0) return [];\n\n const overrides = candidates.filter(r =>\n r.modeOverrides?.[mode]?.overrideExisting === true\n );\n\n if (overrides.length > 1) {\n logger.warn(\n `[CustomImpl] Multiple overrideExisting=true for mode ${mode}: ` +\n `${overrides.map(r => r.debugLabel).join(', ')}. ` +\n `Using highest priority (${overrides[0].debugLabel}). This is likely a misconfiguration.`\n );\n }\n\n if (overrides.length >= 1) {\n const suppressed = candidates.filter(r => !overrides.includes(r));\n if (suppressed.length > 0) {\n logger.warn(\n `[CustomImpl] overrideExisting=true for mode ${mode} (${overrides[0].debugLabel}) ` +\n `is suppressing ${suppressed.length} registration(s): ${suppressed.map(r => r.debugLabel).join(', ')}`\n );\n }\n return [overrides[0]];\n }\n\n return candidates;\n }\n\n /**\n * For single-owner modes (OVERRIDE_ALL, REPLACE_CORE_OPERARTIONS), resolves to the\n * single highest-priority registration. Warns if multiple registrations declare the mode.\n */\n public resolveSingleOwner(\n registrations: ResourceOperationCustomImplementationRegistration[],\n mode: ResourceOperation_CustomServiceImplementationMode,\n logger: LoggerService,\n ): ResourceOperationCustomImplementationRegistration | undefined {\n const candidates = registrations\n .filter(r => r.implementation.getPlaceholders().includes(mode))\n .sort((a, b) => a.priority - b.priority);\n\n if (candidates.length === 0) return undefined;\n\n if (candidates.length > 1) {\n logger.warn(\n `[CustomImpl] Multiple registrations for single-owner mode ${mode}: ` +\n `${candidates.map(r => r.debugLabel).join(', ')}. ` +\n `Using highest priority (${candidates[0].debugLabel}).`\n );\n }\n\n return candidates[0];\n }\n\n}\n"]}
@@ -354,6 +354,8 @@ type ResourceCustomServiceImplementationFactoryResultBase = {
354
354
  /** @wildo_source:part:end saas.backend.custom-operation.core-write-precondition */
355
355
  /** Whether this registration's hooks may run inside the transaction that keeps the operation's audit row. See {@link ResourceCustomServiceImplementationHookTransactionPosture}. */
356
356
  hookTransactionPosture?: ResourceCustomServiceImplementationHookTransactionPosture;
357
+ /** The most rows of its resource one attempt of this REPLACE writes on a multi-row verb. See {@link assertValidResourceCustomImplementationMaximumRowsWrittenPerAttempt}. */
358
+ maximumRowsWrittenPerAttempt?: number;
357
359
  };
358
360
  /** @wildo_source:part:start saas.backend.custom-operation.hook-transaction-posture facet:layer:backend facet:family:custom-implementation facet:audience:app-developer */
359
361
  /**
@@ -398,6 +400,24 @@ export declare function assertValidResourceCustomImplementationHookTransactionPo
398
400
  modes: readonly ResourceOperation_CustomServiceImplementationMode[];
399
401
  hookTransactionPosture: unknown;
400
402
  }): void;
403
+ /**
404
+ * `maximumRowsWrittenPerAttempt` (#2297 wave 4): on a multi-row verb (`UPDATE_MANY` / `DELETE_MANY`) whose REPLACE handler
405
+ * performs the write itself, the most rows of the operation's resource one attempt writes. The framework cannot chunk a
406
+ * selection a hook makes, so this declaration is what bounds such a write's transaction: declared within
407
+ * `MULTI_ROW_WRITE_ROWS_PER_TRANSACTION`, beside `hookTransactionPosture: RUNS_INSIDE_TRANSACTION`, the write is made
408
+ * transactional and its audit row is kept through a crash. Declare it only when the handler cannot write more by
409
+ * construction (a single-row update by a unique key, a page it bounds itself), and say why at the declaration.
410
+ *
411
+ * Refused unless it is a positive integer within the bound, and on a registration that does not REPLACE the core write
412
+ * (the framework's own write is bounded by chunking instead, and a bound on a hook that does not write would bound nothing).
413
+ */
414
+ export declare function assertValidResourceCustomImplementationMaximumRowsWrittenPerAttempt(params: {
415
+ operationPathKey: string;
416
+ debugLabel?: string;
417
+ modes: readonly ResourceOperation_CustomServiceImplementationMode[];
418
+ maximumRowsWrittenPerAttempt: unknown;
419
+ rowsPerTransactionBound: number;
420
+ }): void;
401
421
  /**
402
422
  * Declares that an `overrideAll` handler records the operation's `RESOURCE_OPERATION_PERFORMED` row itself, so the
403
423
  * framework does not record a second one (#3151).
@@ -496,6 +516,8 @@ export declare function createResourceCustomServiceImplementation<TInput extends
496
516
  coreWritePinsRowVersion?: true;
497
517
  /** #2297: whether the hooks may run inside the transaction that keeps the audit row. See {@link ResourceCustomServiceImplementationHookTransactionPosture}. */
498
518
  hookTransactionPosture?: ResourceCustomServiceImplementationHookTransactionPosture;
519
+ /** #2297 wave 4: the most rows one attempt of this REPLACE writes on a multi-row verb. See {@link assertValidResourceCustomImplementationMaximumRowsWrittenPerAttempt}. */
520
+ maximumRowsWrittenPerAttempt?: number;
499
521
  } & ResourceCustomServiceImplementationTransactionalCoreConfiguration): ResourceCustomServiceImplementationFactoryResult & {
500
522
  implementation: ResourceOperationCustomImplementationBase<TInput, TOutput>;
501
523
  };
@@ -1 +1 @@
1
- {"version":3,"file":"resource-operation-custom-implementation.factory.backend.d.ts","sourceRoot":"","sources":["../../../../../src/base-classes/services/services/resource-operation-custom-implementation.factory.backend.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0F,mCAAmC,EAAE,iDAAiD,EAAE,2CAA2C,EAAsG,MAAM,uBAAuB,CAAC;AACxW,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,kFAAkF,CAAC;AACnI,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qEAAqE,CAAC;AAC5G,OAAO,EAA4D,4CAA4C,EAAE,8CAA8C,EAAE,iDAAiD,EAAE,kDAAkD,EAAE,yCAAyC,EAAE,MAAM,iEAAiE,CAAC;AAC3X,OAAO,EAAE,+BAA+B,EAAE,MAAM,0EAA0E,CAAC;AAC3H,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qEAAqE,CAAC;AAC9G,OAAO,KAAK,EAAE,uBAAuB,EAAE,6BAA6B,EAAE,MAAM,uBAAuB,CAAC;AAEpG;;;;;GAKG;AACH,MAAM,MAAM,2BAA2B,GAAG,CACxC,KAAK,EAAE,OAAO,EACd,gBAAgB,EAAE,gBAAgB,CAAC,GAAG,CAAC,EACvC,gBAAgB,EAAE,uBAAuB,KACtC,OAAO,CAAC,6BAA6B,CAAC,CAAC;AAmB5C,KAAK,eAAe,CAClB,MAAM,SAAS,CAAC,CAAC,SAAS,GAAG,SAAS,GAAG,CAAC,CAAC,MAAM,GAAG,SAAS,EAC7D,O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AsD,CAAC;IAC7E,0HAA0H;IAC1H,yBAAyB,CAAC,EAAE,2CAA2C,CAAC;IACxE,sIAAsI;IACtI,wBAAwB,CAAC,EAAE,2DAA2D,CAAC;IACvF,wHAAwH;IACxH,qBAAqB,CAAC,EAAE,0BAA0B,CAAC;IACnD,iHAAiH;IACjH,uBAAuB,CAAC,EAAE,IAAI,CAAC;IAC/B,+JAA+J;IAC/J,sBAAsB,CAAC,EAAE,yDAAyD,CAAC;CACtF,GAAG,iEAAiE,GAAG,gDAAgD,GAAG;IAAE,cAAc,EAAE,yCAAyC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,CA4UxM;AAED,8HAA8H;AAC9H,wBAAgB,mBAAmB,CACjC,gBAAgB,EAAE,MAAM,EACxB,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,KAAK,EAAE,SAAS,iDAAiD,EAAE,GAClE,IAAI,CAKN;AAED;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CACzC,YAAY,EAAE,0BAA0B,EACxC,gBAAgB,EAAE,MAAM,EACxB,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,KAAK,EAAE,SAAS,iDAAiD,EAAE,GAClE,0BAA0B,CAmB5B"}
1
+ {"version":3,"file":"resource-operation-custom-implementation.factory.backend.d.ts","sourceRoot":"","sources":["../../../../../src/base-classes/services/services/resource-operation-custom-implementation.factory.backend.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0F,mCAAmC,EAAE,iDAAiD,EAAE,2CAA2C,EAAsG,MAAM,uBAAuB,CAAC;AACxW,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,kFAAkF,CAAC;AACnI,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qEAAqE,CAAC;AAC5G,OAAO,EAA4D,4CAA4C,EAAE,8CAA8C,EAA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