@wildo-ai/saas-models 1.1.2 → 1.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (410) hide show
  1. package/dist/esm/applications/applications-context.schemas.d.ts +14 -10
  2. package/dist/esm/applications/applications-context.schemas.d.ts.map +1 -1
  3. package/dist/esm/applications/applications.shared.resources-config.schemas.d.ts.map +1 -1
  4. package/dist/esm/applications/applications.shared.resources-config.schemas.js +4 -3
  5. package/dist/esm/applications/applications.shared.resources-config.schemas.js.map +1 -1
  6. package/dist/esm/billing/billing-configuration.shared.schemas.d.ts +0 -4
  7. package/dist/esm/billing/billing-configuration.shared.schemas.d.ts.map +1 -1
  8. package/dist/esm/billing/billing-configuration.shared.schemas.js +59 -17
  9. package/dist/esm/billing/billing-configuration.shared.schemas.js.map +1 -1
  10. package/dist/esm/billing/billing-enums.shared.schemas.d.ts +77 -21
  11. package/dist/esm/billing/billing-enums.shared.schemas.d.ts.map +1 -1
  12. package/dist/esm/billing/billing-enums.shared.schemas.js +85 -23
  13. package/dist/esm/billing/billing-enums.shared.schemas.js.map +1 -1
  14. package/dist/esm/billing/billing-types.shared.schemas.d.ts +3 -3
  15. package/dist/esm/billing/price.shared.schemas.d.ts.map +1 -1
  16. package/dist/esm/billing/price.shared.schemas.js +7 -1
  17. package/dist/esm/billing/price.shared.schemas.js.map +1 -1
  18. package/dist/esm/billing/product-behavior-policy.shared.schemas.d.ts.map +1 -1
  19. package/dist/esm/billing/product-behavior-policy.shared.schemas.js +52 -11
  20. package/dist/esm/billing/product-behavior-policy.shared.schemas.js.map +1 -1
  21. package/dist/esm/billing/product-definition.shared.schemas.d.ts +2 -2
  22. package/dist/esm/billing/product.shared.resources-config.schemas.d.ts +2 -2
  23. package/dist/esm/billing/product.shared.schemas.d.ts +2 -2
  24. package/dist/esm/billing/product.shared.schemas.d.ts.map +1 -1
  25. package/dist/esm/billing/product.shared.schemas.js +7 -3
  26. package/dist/esm/billing/product.shared.schemas.js.map +1 -1
  27. package/dist/esm/billing/subscription.shared.resources-config.schemas.d.ts +1 -1
  28. package/dist/esm/billing/subscription.shared.resources-config.schemas.d.ts.map +1 -1
  29. package/dist/esm/billing/subscription.shared.resources-config.schemas.js +15 -1
  30. package/dist/esm/billing/subscription.shared.resources-config.schemas.js.map +1 -1
  31. package/dist/esm/billing/usage-record.shared.schemas.d.ts +7 -3
  32. package/dist/esm/billing/usage-record.shared.schemas.d.ts.map +1 -1
  33. package/dist/esm/billing/usage-record.shared.schemas.js +22 -3
  34. package/dist/esm/billing/usage-record.shared.schemas.js.map +1 -1
  35. package/dist/esm/companion/provider-discovery.shared.schemas.d.ts +69 -2
  36. package/dist/esm/companion/provider-discovery.shared.schemas.d.ts.map +1 -1
  37. package/dist/esm/companion/provider-discovery.shared.schemas.js +20 -1
  38. package/dist/esm/companion/provider-discovery.shared.schemas.js.map +1 -1
  39. package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.d.ts +85 -0
  40. package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.d.ts.map +1 -0
  41. package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.js +157 -0
  42. package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.js.map +1 -0
  43. package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.d.ts +23 -0
  44. package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.d.ts.map +1 -1
  45. package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.js +56 -0
  46. package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.js.map +1 -1
  47. package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.d.ts +480 -20
  48. package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.d.ts.map +1 -1
  49. package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.js +547 -23
  50. package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.js.map +1 -1
  51. package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.d.ts.map +1 -1
  52. package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.js +82 -3
  53. package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.js.map +1 -1
  54. package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.d.ts +31 -30
  55. package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.d.ts.map +1 -1
  56. package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.js +98 -3
  57. package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.js.map +1 -1
  58. package/dist/esm/compliance/privacy/privacy.shared.schemas.d.ts +17 -0
  59. package/dist/esm/compliance/privacy/privacy.shared.schemas.d.ts.map +1 -1
  60. package/dist/esm/compliance/privacy/privacy.shared.schemas.js +27 -4
  61. package/dist/esm/compliance/privacy/privacy.shared.schemas.js.map +1 -1
  62. package/dist/esm/compliance/privacy/redaction.shared.schemas.d.ts +82 -29
  63. package/dist/esm/compliance/privacy/redaction.shared.schemas.d.ts.map +1 -1
  64. package/dist/esm/compliance/privacy/redaction.shared.schemas.js +95 -29
  65. package/dist/esm/compliance/privacy/redaction.shared.schemas.js.map +1 -1
  66. package/dist/esm/compliance/privacy/subject-export.shared.schemas.d.ts.map +1 -1
  67. package/dist/esm/compliance/privacy/subject-export.shared.schemas.js +12 -5
  68. package/dist/esm/compliance/privacy/subject-export.shared.schemas.js.map +1 -1
  69. package/dist/esm/config/analytics-value-moments.shared.schemas.d.ts +21 -0
  70. package/dist/esm/config/analytics-value-moments.shared.schemas.d.ts.map +1 -1
  71. package/dist/esm/config/analytics-value-moments.shared.schemas.js +20 -0
  72. package/dist/esm/config/analytics-value-moments.shared.schemas.js.map +1 -1
  73. package/dist/esm/config/app-configuration-shared.shared.schemas.d.ts +7 -5
  74. package/dist/esm/config/app-configuration-shared.shared.schemas.d.ts.map +1 -1
  75. package/dist/esm/config/auth-config-resolution.shared.utils.d.ts +8 -1
  76. package/dist/esm/config/auth-config-resolution.shared.utils.d.ts.map +1 -1
  77. package/dist/esm/config/auth-config-resolution.shared.utils.js +29 -0
  78. package/dist/esm/config/auth-config-resolution.shared.utils.js.map +1 -1
  79. package/dist/esm/config/entity-identity-config.shared.schemas.d.ts +95 -17
  80. package/dist/esm/config/entity-identity-config.shared.schemas.d.ts.map +1 -1
  81. package/dist/esm/config/entity-identity-config.shared.schemas.js +86 -8
  82. package/dist/esm/config/entity-identity-config.shared.schemas.js.map +1 -1
  83. package/dist/esm/config/frontend/chart-definition.shared.schemas.d.ts +12 -12
  84. package/dist/esm/errors/errors.custom-message-ref.shared.definitions.d.ts +28 -0
  85. package/dist/esm/errors/errors.custom-message-ref.shared.definitions.d.ts.map +1 -1
  86. package/dist/esm/errors/errors.custom-message-ref.shared.definitions.js +28 -0
  87. package/dist/esm/errors/errors.custom-message-ref.shared.definitions.js.map +1 -1
  88. package/dist/esm/external-data/external-data-pipeline.shared.schemas.d.ts +45 -12
  89. package/dist/esm/external-data/external-data-pipeline.shared.schemas.d.ts.map +1 -1
  90. package/dist/esm/external-data/external-data-pipeline.shared.schemas.js.map +1 -1
  91. package/dist/esm/external-providers/engine-capabilities.shared.schemas.d.ts +103 -58
  92. package/dist/esm/external-providers/engine-capabilities.shared.schemas.d.ts.map +1 -1
  93. package/dist/esm/external-providers/engine-capabilities.shared.schemas.js +176 -15
  94. package/dist/esm/external-providers/engine-capabilities.shared.schemas.js.map +1 -1
  95. package/dist/esm/external-providers/engine-capability-resolution-mode.shared.d.ts +15 -3
  96. package/dist/esm/external-providers/engine-capability-resolution-mode.shared.d.ts.map +1 -1
  97. package/dist/esm/external-providers/engine-capability-resolution-mode.shared.js +32 -5
  98. package/dist/esm/external-providers/engine-capability-resolution-mode.shared.js.map +1 -1
  99. package/dist/esm/external-providers/frontend-bootstrap.shared.schemas.d.ts +83 -7
  100. package/dist/esm/external-providers/frontend-bootstrap.shared.schemas.d.ts.map +1 -1
  101. package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.d.ts +59 -0
  102. package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.d.ts.map +1 -0
  103. package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.js +61 -0
  104. package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.js.map +1 -0
  105. package/dist/esm/external-providers/frontend-capability-runtime.shared.types.d.ts +97 -0
  106. package/dist/esm/external-providers/frontend-capability-runtime.shared.types.d.ts.map +1 -0
  107. package/dist/esm/external-providers/frontend-capability-runtime.shared.types.js +41 -0
  108. package/dist/esm/external-providers/frontend-capability-runtime.shared.types.js.map +1 -0
  109. package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.d.ts +148 -2
  110. package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.d.ts.map +1 -1
  111. package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.js +56 -1
  112. package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.js.map +1 -1
  113. package/dist/esm/external-providers/provider-capability.shared.schemas.d.ts +5 -28
  114. package/dist/esm/external-providers/provider-capability.shared.schemas.d.ts.map +1 -1
  115. package/dist/esm/external-providers/provider-capability.shared.schemas.js +4 -2
  116. package/dist/esm/external-providers/provider-capability.shared.schemas.js.map +1 -1
  117. package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.d.ts +18 -8
  118. package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.d.ts.map +1 -1
  119. package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.js +9 -4
  120. package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.js.map +1 -1
  121. package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.d.ts +338 -0
  122. package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.d.ts.map +1 -0
  123. package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.js +332 -0
  124. package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.js.map +1 -0
  125. package/dist/esm/external-providers/provider-metadata.shared.schemas.d.ts +178 -9
  126. package/dist/esm/external-providers/provider-metadata.shared.schemas.d.ts.map +1 -1
  127. package/dist/esm/external-providers/provider-metadata.shared.schemas.js +181 -9
  128. package/dist/esm/external-providers/provider-metadata.shared.schemas.js.map +1 -1
  129. package/dist/esm/external-providers/provider-protocol.shared.schemas.d.ts +7 -5
  130. package/dist/esm/external-providers/provider-protocol.shared.schemas.d.ts.map +1 -1
  131. package/dist/esm/external-providers/provider-protocol.shared.schemas.js +7 -5
  132. package/dist/esm/external-providers/provider-protocol.shared.schemas.js.map +1 -1
  133. package/dist/esm/external-providers/provider-tier-rule.shared.utils.d.ts +40 -0
  134. package/dist/esm/external-providers/provider-tier-rule.shared.utils.d.ts.map +1 -0
  135. package/dist/esm/external-providers/provider-tier-rule.shared.utils.js +80 -0
  136. package/dist/esm/external-providers/provider-tier-rule.shared.utils.js.map +1 -0
  137. package/dist/esm/features/core-feature-definitions.shared.d.ts.map +1 -1
  138. package/dist/esm/features/core-feature-definitions.shared.js +7 -1
  139. package/dist/esm/features/core-feature-definitions.shared.js.map +1 -1
  140. package/dist/esm/features/feature-builders.shared.d.ts +32 -0
  141. package/dist/esm/features/feature-builders.shared.d.ts.map +1 -1
  142. package/dist/esm/features/feature-builders.shared.js +32 -0
  143. package/dist/esm/features/feature-builders.shared.js.map +1 -1
  144. package/dist/esm/files/file-upload-grant.shared.schemas.d.ts +14 -2
  145. package/dist/esm/files/file-upload-grant.shared.schemas.d.ts.map +1 -1
  146. package/dist/esm/files/file-upload-grant.shared.schemas.js +44 -5
  147. package/dist/esm/files/file-upload-grant.shared.schemas.js.map +1 -1
  148. package/dist/esm/files/files.shared.schemas.d.ts +15 -8
  149. package/dist/esm/files/files.shared.schemas.d.ts.map +1 -1
  150. package/dist/esm/files/files.shared.schemas.js +15 -8
  151. package/dist/esm/files/files.shared.schemas.js.map +1 -1
  152. package/dist/esm/flows-actors/actors.shared.schemas.d.ts.map +1 -1
  153. package/dist/esm/flows-actors/actors.shared.schemas.js +3 -2
  154. package/dist/esm/flows-actors/actors.shared.schemas.js.map +1 -1
  155. package/dist/esm/flows-actors/agents.shared.schemas.d.ts +54 -5
  156. package/dist/esm/flows-actors/agents.shared.schemas.d.ts.map +1 -1
  157. package/dist/esm/flows-actors/agents.shared.schemas.js.map +1 -1
  158. package/dist/esm/flows-actors/apps-blueprint/apps-blueprint.shared.schemas.d.ts +6 -6
  159. package/dist/esm/flows-actors/deliberation.shared.schemas.d.ts +0 -3
  160. package/dist/esm/flows-actors/deliberation.shared.schemas.d.ts.map +1 -1
  161. package/dist/esm/flows-actors/deliberation.shared.schemas.js +0 -5
  162. package/dist/esm/flows-actors/deliberation.shared.schemas.js.map +1 -1
  163. package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.d.ts +14 -0
  164. package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.d.ts.map +1 -1
  165. package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.js +40 -3
  166. package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.js.map +1 -1
  167. package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.d.ts +19 -0
  168. package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.d.ts.map +1 -1
  169. package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.js +33 -0
  170. package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.js.map +1 -1
  171. package/dist/esm/flows-actors/flows-actors.io.shared.schemas.d.ts +14 -9
  172. package/dist/esm/flows-actors/flows-actors.io.shared.schemas.d.ts.map +1 -1
  173. package/dist/esm/flows-actors/flows-actors.io.shared.schemas.js +14 -9
  174. package/dist/esm/flows-actors/flows-actors.io.shared.schemas.js.map +1 -1
  175. package/dist/esm/flows-actors/flows-actors.system.shared.schemas.d.ts.map +1 -1
  176. package/dist/esm/flows-actors/flows-actors.system.shared.schemas.js +3 -2
  177. package/dist/esm/flows-actors/flows-actors.system.shared.schemas.js.map +1 -1
  178. package/dist/esm/flows-actors/flows.shared.schemas.d.ts.map +1 -1
  179. package/dist/esm/flows-actors/flows.shared.schemas.js +3 -2
  180. package/dist/esm/flows-actors/flows.shared.schemas.js.map +1 -1
  181. package/dist/esm/flows-actors/mcp-servers.shared.schemas.d.ts +128 -0
  182. package/dist/esm/flows-actors/mcp-servers.shared.schemas.d.ts.map +1 -0
  183. package/dist/esm/flows-actors/mcp-servers.shared.schemas.js +142 -0
  184. package/dist/esm/flows-actors/mcp-servers.shared.schemas.js.map +1 -0
  185. package/dist/esm/flows-actors/meta-workflows/budget-authority.meta-workflows.shared.schemas.d.ts +0 -3
  186. package/dist/esm/flows-actors/meta-workflows/budget-authority.meta-workflows.shared.schemas.d.ts.map +1 -1
  187. package/dist/esm/flows-actors/meta-workflows/budget-authority.meta-workflows.shared.schemas.js +1 -4
  188. package/dist/esm/flows-actors/meta-workflows/budget-authority.meta-workflows.shared.schemas.js.map +1 -1
  189. package/dist/esm/flows-actors/meta-workflows/context-selection.meta-workflows.shared.schemas.d.ts +0 -16
  190. package/dist/esm/flows-actors/meta-workflows/context-selection.meta-workflows.shared.schemas.d.ts.map +1 -1
  191. package/dist/esm/flows-actors/meta-workflows/context-selection.meta-workflows.shared.schemas.js +1 -17
  192. package/dist/esm/flows-actors/meta-workflows/context-selection.meta-workflows.shared.schemas.js.map +1 -1
  193. package/dist/esm/flows-actors/meta-workflows/decisions.meta-workflows.shared.schemas.d.ts +3 -3
  194. package/dist/esm/flows-actors/meta-workflows/decisions.meta-workflows.shared.schemas.js +3 -3
  195. package/dist/esm/flows-actors/meta-workflows/decisions.meta-workflows.shared.schemas.js.map +1 -1
  196. package/dist/esm/flows-actors/meta-workflows/execution-binding-common.meta-workflows.shared.schemas.d.ts +2 -8
  197. package/dist/esm/flows-actors/meta-workflows/execution-binding-common.meta-workflows.shared.schemas.d.ts.map +1 -1
  198. package/dist/esm/flows-actors/meta-workflows/execution-binding-common.meta-workflows.shared.schemas.js +4 -15
  199. package/dist/esm/flows-actors/meta-workflows/execution-binding-common.meta-workflows.shared.schemas.js.map +1 -1
  200. package/dist/esm/guidance/guidance-state.shared.utils.d.ts.map +1 -1
  201. package/dist/esm/guidance/guidance-state.shared.utils.js +1 -0
  202. package/dist/esm/guidance/guidance-state.shared.utils.js.map +1 -1
  203. package/dist/esm/guidance/progression-state.shared.resources-config.schemas.d.ts +8 -0
  204. package/dist/esm/guidance/progression-state.shared.resources-config.schemas.d.ts.map +1 -1
  205. package/dist/esm/guidance/progression-state.shared.schemas.d.ts +46 -0
  206. package/dist/esm/guidance/progression-state.shared.schemas.d.ts.map +1 -1
  207. package/dist/esm/guidance/progression-state.shared.schemas.js +49 -0
  208. package/dist/esm/guidance/progression-state.shared.schemas.js.map +1 -1
  209. package/dist/esm/http-api-binding/http-api-binding.shared.schemas.d.ts +320 -50
  210. package/dist/esm/http-api-binding/http-api-binding.shared.schemas.d.ts.map +1 -1
  211. package/dist/esm/http-api-binding/http-api-binding.shared.schemas.js +137 -36
  212. package/dist/esm/http-api-binding/http-api-binding.shared.schemas.js.map +1 -1
  213. package/dist/esm/index.d.ts +9 -0
  214. package/dist/esm/index.d.ts.map +1 -1
  215. package/dist/esm/index.js +9 -0
  216. package/dist/esm/index.js.map +1 -1
  217. package/dist/esm/notifications/email/email-template-registry.shared.schemas.d.ts +11 -2
  218. package/dist/esm/notifications/email/email-template-registry.shared.schemas.d.ts.map +1 -1
  219. package/dist/esm/notifications/email/email-template-registry.shared.schemas.js.map +1 -1
  220. package/dist/esm/notifications/email/email-template.shared.enums.d.ts +15 -0
  221. package/dist/esm/notifications/email/email-template.shared.enums.d.ts.map +1 -1
  222. package/dist/esm/notifications/email/email-template.shared.enums.js +15 -0
  223. package/dist/esm/notifications/email/email-template.shared.enums.js.map +1 -1
  224. package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.d.ts +1 -0
  225. package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.d.ts.map +1 -1
  226. package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.js +19 -0
  227. package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.js.map +1 -1
  228. package/dist/esm/notifications/m2m/webhook-config.shared.schemas.d.ts +30 -0
  229. package/dist/esm/notifications/m2m/webhook-config.shared.schemas.d.ts.map +1 -1
  230. package/dist/esm/notifications/m2m/webhook-config.shared.schemas.js +65 -1
  231. package/dist/esm/notifications/m2m/webhook-config.shared.schemas.js.map +1 -1
  232. package/dist/esm/notifications/notification-badges.core.definitions.d.ts +6 -4
  233. package/dist/esm/notifications/notification-badges.core.definitions.d.ts.map +1 -1
  234. package/dist/esm/notifications/notification-badges.core.definitions.js +6 -4
  235. package/dist/esm/notifications/notification-badges.core.definitions.js.map +1 -1
  236. package/dist/esm/notifications/notification-badges.schemas.d.ts +167 -5
  237. package/dist/esm/notifications/notification-badges.schemas.d.ts.map +1 -1
  238. package/dist/esm/notifications/notification-badges.schemas.js +191 -6
  239. package/dist/esm/notifications/notification-badges.schemas.js.map +1 -1
  240. package/dist/esm/notifications/notifications.shared.schemas.d.ts +107 -0
  241. package/dist/esm/notifications/notifications.shared.schemas.d.ts.map +1 -1
  242. package/dist/esm/notifications/notifications.shared.schemas.js +149 -1
  243. package/dist/esm/notifications/notifications.shared.schemas.js.map +1 -1
  244. package/dist/esm/organizations/organization-notifications.shared.schemas.d.ts.map +1 -1
  245. package/dist/esm/organizations/organization-notifications.shared.schemas.js +22 -1
  246. package/dist/esm/organizations/organization-notifications.shared.schemas.js.map +1 -1
  247. package/dist/esm/organizations/organization-preferences.shared.schemas.d.ts +26 -0
  248. package/dist/esm/organizations/organization-preferences.shared.schemas.d.ts.map +1 -1
  249. package/dist/esm/organizations/organization-preferences.shared.schemas.js +25 -0
  250. package/dist/esm/organizations/organization-preferences.shared.schemas.js.map +1 -1
  251. package/dist/esm/organizations/organization-profile.shared.schemas.d.ts +25 -0
  252. package/dist/esm/organizations/organization-profile.shared.schemas.d.ts.map +1 -1
  253. package/dist/esm/organizations/organization-profile.shared.schemas.js +42 -17
  254. package/dist/esm/organizations/organization-profile.shared.schemas.js.map +1 -1
  255. package/dist/esm/organizations/organization-unit-narrowing.shared.d.ts +3 -2
  256. package/dist/esm/organizations/organization-unit-narrowing.shared.d.ts.map +1 -1
  257. package/dist/esm/organizations/organization-unit-narrowing.shared.js +9 -2
  258. package/dist/esm/organizations/organization-unit-narrowing.shared.js.map +1 -1
  259. package/dist/esm/organizations/organizations.shared.resources-config.schemas.d.ts.map +1 -1
  260. package/dist/esm/organizations/organizations.shared.resources-config.schemas.js +18 -3
  261. package/dist/esm/organizations/organizations.shared.resources-config.schemas.js.map +1 -1
  262. package/dist/esm/public-runtime/index.d.ts +49 -2
  263. package/dist/esm/public-runtime/index.d.ts.map +1 -1
  264. package/dist/esm/public-runtime/index.js +48 -1
  265. package/dist/esm/public-runtime/index.js.map +1 -1
  266. package/dist/esm/queue/jobs.shared.resources-config.schemas.d.ts +6 -5
  267. package/dist/esm/queue/jobs.shared.resources-config.schemas.d.ts.map +1 -1
  268. package/dist/esm/queue/jobs.shared.resources-config.schemas.js +6 -5
  269. package/dist/esm/queue/jobs.shared.resources-config.schemas.js.map +1 -1
  270. package/dist/esm/queue/jobs.shared.schemas.d.ts +16 -3
  271. package/dist/esm/queue/jobs.shared.schemas.d.ts.map +1 -1
  272. package/dist/esm/queue/jobs.shared.schemas.js +16 -3
  273. package/dist/esm/queue/jobs.shared.schemas.js.map +1 -1
  274. package/dist/esm/requests/manual-controllers-routes-documentation.d.ts +137 -0
  275. package/dist/esm/requests/manual-controllers-routes-documentation.d.ts.map +1 -0
  276. package/dist/esm/requests/manual-controllers-routes-documentation.js +1201 -0
  277. package/dist/esm/requests/manual-controllers-routes-documentation.js.map +1 -0
  278. package/dist/esm/requests/manual-controllers-routes-urls.d.ts +67 -0
  279. package/dist/esm/requests/manual-controllers-routes-urls.d.ts.map +1 -1
  280. package/dist/esm/requests/manual-controllers-routes-urls.js +78 -0
  281. package/dist/esm/requests/manual-controllers-routes-urls.js.map +1 -1
  282. package/dist/esm/requests/rate-limits.shared.schemas.d.ts +11 -1
  283. package/dist/esm/requests/rate-limits.shared.schemas.d.ts.map +1 -1
  284. package/dist/esm/requests/rate-limits.shared.schemas.js +11 -1
  285. package/dist/esm/requests/rate-limits.shared.schemas.js.map +1 -1
  286. package/dist/esm/requests/websocket.shared.schemas.d.ts +27 -4
  287. package/dist/esm/requests/websocket.shared.schemas.d.ts.map +1 -1
  288. package/dist/esm/requests/websocket.shared.schemas.js +35 -0
  289. package/dist/esm/requests/websocket.shared.schemas.js.map +1 -1
  290. package/dist/esm/resources/resources-config.shared.factory.d.ts +1 -0
  291. package/dist/esm/resources/resources-config.shared.factory.d.ts.map +1 -1
  292. package/dist/esm/resources/resources-config.shared.factory.js +105 -20
  293. package/dist/esm/resources/resources-config.shared.factory.js.map +1 -1
  294. package/dist/esm/resources/resources-config.shared.schemas.d.ts +254 -72
  295. package/dist/esm/resources/resources-config.shared.schemas.d.ts.map +1 -1
  296. package/dist/esm/resources/resources-config.shared.schemas.js.map +1 -1
  297. package/dist/esm/resources/resources-registry.shared.core.definitions.d.ts.map +1 -1
  298. package/dist/esm/resources/resources-registry.shared.core.definitions.js +97 -5
  299. package/dist/esm/resources/resources-registry.shared.core.definitions.js.map +1 -1
  300. package/dist/esm/resources/resources-relationships.shared.factory.d.ts.map +1 -1
  301. package/dist/esm/resources/resources-relationships.shared.factory.js +15 -0
  302. package/dist/esm/resources/resources-relationships.shared.factory.js.map +1 -1
  303. package/dist/esm/resources/resources.shared.core.definitions.d.ts +37 -0
  304. package/dist/esm/resources/resources.shared.core.definitions.d.ts.map +1 -1
  305. package/dist/esm/resources/resources.shared.core.definitions.js +51 -0
  306. package/dist/esm/resources/resources.shared.core.definitions.js.map +1 -1
  307. package/dist/esm/resources/resources.shared.schemas.d.ts +11 -2
  308. package/dist/esm/resources/resources.shared.schemas.d.ts.map +1 -1
  309. package/dist/esm/resources/resources.shared.schemas.js +34 -3
  310. package/dist/esm/resources/resources.shared.schemas.js.map +1 -1
  311. package/dist/esm/resources/utils/field-value-disclosure.utils.d.ts +51 -0
  312. package/dist/esm/resources/utils/field-value-disclosure.utils.d.ts.map +1 -0
  313. package/dist/esm/resources/utils/field-value-disclosure.utils.js +53 -0
  314. package/dist/esm/resources/utils/field-value-disclosure.utils.js.map +1 -0
  315. package/dist/esm/resources/utils/resources-summary.utils.d.ts +16 -2
  316. package/dist/esm/resources/utils/resources-summary.utils.d.ts.map +1 -1
  317. package/dist/esm/resources/utils/resources-summary.utils.js +19 -5
  318. package/dist/esm/resources/utils/resources-summary.utils.js.map +1 -1
  319. package/dist/esm/resources/utils/shared-persistence-collection.utils.d.ts.map +1 -1
  320. package/dist/esm/resources/utils/shared-persistence-collection.utils.js +11 -0
  321. package/dist/esm/resources/utils/shared-persistence-collection.utils.js.map +1 -1
  322. package/dist/esm/runtime/domain-module.shared.definitions.d.ts +25 -0
  323. package/dist/esm/runtime/domain-module.shared.definitions.d.ts.map +1 -1
  324. package/dist/esm/runtime/domain-module.shared.definitions.js.map +1 -1
  325. package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.d.ts +1 -0
  326. package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.d.ts.map +1 -1
  327. package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.js +38 -0
  328. package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.js.map +1 -1
  329. package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.d.ts +1 -0
  330. package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.d.ts.map +1 -1
  331. package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.js +38 -0
  332. package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.js.map +1 -1
  333. package/dist/esm/security/authentications/authentication.shared.dto.schemas.d.ts +4 -11
  334. package/dist/esm/security/authentications/authentication.shared.dto.schemas.d.ts.map +1 -1
  335. package/dist/esm/security/authentications/authentication.shared.dto.schemas.js +0 -1
  336. package/dist/esm/security/authentications/authentication.shared.dto.schemas.js.map +1 -1
  337. package/dist/esm/security/authentications/authentication.shared.schemas.d.ts +84 -5
  338. package/dist/esm/security/authentications/authentication.shared.schemas.d.ts.map +1 -1
  339. package/dist/esm/security/authentications/authentication.shared.schemas.js +83 -3
  340. package/dist/esm/security/authentications/authentication.shared.schemas.js.map +1 -1
  341. package/dist/esm/security/authentications/registration.shared.dto.schemas.d.ts +1 -0
  342. package/dist/esm/security/authentications/registration.shared.dto.schemas.d.ts.map +1 -1
  343. package/dist/esm/security/authentications/registration.shared.dto.schemas.js +11 -0
  344. package/dist/esm/security/authentications/registration.shared.dto.schemas.js.map +1 -1
  345. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.d.ts +15 -0
  346. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.d.ts.map +1 -1
  347. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.js +21 -4
  348. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.js.map +1 -1
  349. package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.d.ts +61 -1
  350. package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.d.ts.map +1 -1
  351. package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.js +208 -6
  352. package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.js.map +1 -1
  353. package/dist/esm/security/authentications/sso/sso-config.shared.schemas.d.ts +37 -27
  354. package/dist/esm/security/authentications/sso/sso-config.shared.schemas.d.ts.map +1 -1
  355. package/dist/esm/security/authentications/sso/sso-config.shared.schemas.js +134 -12
  356. package/dist/esm/security/authentications/sso/sso-config.shared.schemas.js.map +1 -1
  357. package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.d.ts +0 -6
  358. package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.d.ts.map +1 -1
  359. package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.js +17 -8
  360. package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.js.map +1 -1
  361. package/dist/esm/security/authorizations/platform-access-grants.shared.resources-config.schemas.d.ts.map +1 -1
  362. package/dist/esm/security/authorizations/platform-access-grants.shared.resources-config.schemas.js +27 -0
  363. package/dist/esm/security/authorizations/platform-access-grants.shared.resources-config.schemas.js.map +1 -1
  364. package/dist/esm/security/authorizations/platform-access-grants.shared.schemas.d.ts +52 -7
  365. package/dist/esm/security/authorizations/platform-access-grants.shared.schemas.d.ts.map +1 -1
  366. package/dist/esm/security/authorizations/platform-access-grants.shared.schemas.js +45 -8
  367. package/dist/esm/security/authorizations/platform-access-grants.shared.schemas.js.map +1 -1
  368. package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.d.ts +31 -0
  369. package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.d.ts.map +1 -0
  370. package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.js +198 -0
  371. package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.js.map +1 -0
  372. package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.d.ts +31 -0
  373. package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.d.ts.map +1 -0
  374. package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.js +191 -0
  375. package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.js.map +1 -0
  376. package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.d.ts +250 -0
  377. package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.d.ts.map +1 -0
  378. package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.js +486 -0
  379. package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.js.map +1 -0
  380. package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.d.ts +4 -1
  381. package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.d.ts.map +1 -1
  382. package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.js +29 -0
  383. package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.js.map +1 -1
  384. package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.d.ts +4 -1
  385. package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.d.ts.map +1 -1
  386. package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.js +29 -0
  387. package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.js.map +1 -1
  388. package/dist/esm/security/oauth-clients/oauth-clients.shared.schemas.d.ts +6 -0
  389. package/dist/esm/security/oauth-clients/oauth-clients.shared.schemas.d.ts.map +1 -1
  390. package/dist/esm/security/oauth-clients/oauth-clients.shared.schemas.js +31 -0
  391. package/dist/esm/security/oauth-clients/oauth-clients.shared.schemas.js.map +1 -1
  392. package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.schemas.d.ts +13 -0
  393. package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.schemas.d.ts.map +1 -1
  394. package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.schemas.js +24 -3
  395. package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.schemas.js.map +1 -1
  396. package/dist/esm/users/user-preferences.shared.resources-config.schemas.d.ts +4 -4
  397. package/dist/esm/users/user-self-preferences.shared.resources-config.schemas.d.ts +4 -4
  398. package/dist/esm/users/user-self.shared.resources-config.schemas.d.ts.map +1 -1
  399. package/dist/esm/users/user-self.shared.resources-config.schemas.js +33 -3
  400. package/dist/esm/users/user-self.shared.resources-config.schemas.js.map +1 -1
  401. package/dist/esm/users/users.shared.resources-config.schemas.d.ts +17 -1
  402. package/dist/esm/users/users.shared.resources-config.schemas.d.ts.map +1 -1
  403. package/dist/esm/users/users.shared.resources-config.schemas.js +136 -5
  404. package/dist/esm/users/users.shared.resources-config.schemas.js.map +1 -1
  405. package/dist/esm/users/users.shared.schemas.d.ts +43 -12
  406. package/dist/esm/users/users.shared.schemas.d.ts.map +1 -1
  407. package/dist/esm/users/users.shared.schemas.js +38 -7
  408. package/dist/esm/users/users.shared.schemas.js.map +1 -1
  409. package/dist/tsconfig.build.tsbuildinfo +1 -1
  410. package/package.json +4 -4
@@ -0,0 +1,157 @@
1
+ import { z } from 'zod';
2
+ import { AuditEventCategory, AuditEventSeverity, AuditableEvent_BaseSchema } from './auditable-events.shared.schema.js';
3
+ import { createResourceConfiguration_Initialization } from '../../resources/resources-config.shared.factory.js';
4
+ import { CoreResourceOperation, CoreResourceType, coreResourceShared_FieldIdentifier } from '../../resources/resources.shared.core.definitions.js';
5
+ import { ResourceOperationRiskLevel, ResourceOperationVariantType } from '../../resources/resources.shared.schemas.js';
6
+ import { CORE_APP_ROLES } from '../../security/authorizations/roles.shared.schemas.js';
7
+ import { ResourceSystemAccessMode } from '../../resources/resources-config.shared.schemas.js';
8
+ /**
9
+ * The APPLICATION-scoped door onto the audit trail.
10
+ *
11
+ * ## Why this exists at all
12
+ *
13
+ * `AUDIT_LOGS` is organization-scoped and its only route is
14
+ * `/organizations/{organizationId}/audit-logs`, so it returns exactly the rows carrying that
15
+ * tenant. A large share of security events carry NO organization by design — `logUserLogin` takes
16
+ * `organizationId` as optional because no organization is selected at login, and the same is true
17
+ * of session eviction, token refresh and application-wide authentication-policy changes. Measured
18
+ * on a dogfood application (#317): **94 of 127 rows had no organization**, and were reachable
19
+ * through no API. An operator could see 26% of the trail and could not attest the rest, while a
20
+ * reader querying the only available surface saw `user_login: 0` for a control that had emitted 21.
21
+ *
22
+ * ## Why a SEPARATE resource type rather than a second route
23
+ *
24
+ * `generateParentCombinations` composes every URL as
25
+ * `[...primaryScope, ...mandatoryContext, ...optionalCombo]`, so a routed application edge on
26
+ * `AUDIT_LOGS` would appear in EVERY combination and rewrite the organization route to
27
+ * `/applications/{applicationId}/organizations/{organizationId}/audit-logs` — breaking all eight of
28
+ * its documented paths and their consumers. Making the organization edge optional does not help:
29
+ * the empty combination is skipped whenever any parent exists, so no bare route is emitted either.
30
+ * A sibling type carrying ONE application parent takes the route it needs and leaves the existing
31
+ * door byte-identical. The pattern is the engine's own: notification badges are dual-scope with a
32
+ * type per scope, `APPLICATION_API_KEYS` shows the application routing shape, and `USER_SELF`
33
+ * shows a distinct type addressing another's rows.
34
+ *
35
+ * ## Two doors, ONE record set — the security contract
36
+ *
37
+ * Both types resolve to the `auditLogs` collection through
38
+ * `RESOURCE_SHARED_PERSISTENCE_COLLECTION_ALIASES`. That makes the isolation properties a
39
+ * per-DOOR obligation rather than a property of the rows:
40
+ *
41
+ * - the organization door keeps its tenant filter and its organization roles, unchanged;
42
+ * - this door is `APP_ADMIN_SUPER_ADMIN`-ONLY on every operation. An organization role must never
43
+ * reach it — the rows behind it span every tenant;
44
+ * - a read here that touches a tenant-attributed row is a CROSS-TENANT read and OWES an audit
45
+ * emission. **It is wired**, by the two halves below acting together, and neither is optional:
46
+ * each read variant declares `admitsCrossTenantPlatformAdministration`, and
47
+ * `ServicesRegistryHandler.recordCrossTenantReadAccess` observes every enrolled read and emits
48
+ * `CROSS_TENANT_ADMINISTRATIVE_ACCESS` once per TENANT the returned rows belong to. The
49
+ * declaration is what enrols the read: `authorizeOrganizations` — where that event is otherwise
50
+ * emitted — runs only for ORGANIZATIONS-scoped resources and decides on ONE fetched row, so it
51
+ * never sees this door at all. Grouping per tenant is what makes the crossing visible to the
52
+ * REACHED tenant, in its own organization-scoped viewer, rather than only to the operator.
53
+ * `.claude/rules/administrative-continuity-floors.md` requires every crossing to be named in the
54
+ * trail, and the trail is the worst possible surface on which to make an operator read invisible.
55
+ * See `security/authorizations/cross-tenant-read-observation.backend.ts` for why an UNDECLARED
56
+ * door is deliberately not observed instead of being observed with a false `admissionDeclared`.
57
+ *
58
+ * ## Deliberately mirrored from the organization resource
59
+ *
60
+ * `isSystemResource`, `systemAccessPolicy.exportSubject: FORBIDDEN` and the ABSENCE of a
61
+ * `retentionPolicy` are copied ON PURPOSE. They are properties of the ROWS, and the rows are the
62
+ * same ones — a second door that disagreed about whether the audit trail is subject-exportable, or
63
+ * about how long it is kept, would be a policy fork over one record set. See the organization
64
+ * config for the reasoning behind each; do not change one without the other.
65
+ *
66
+ * ## Deliberately NOT mirrored
67
+ *
68
+ * There is no CREATE. The organization resource carries a `REPOSITORY_ONLY` CREATE because that is
69
+ * how audit rows are written; writing is not a scope question and must keep exactly one door.
70
+ */
71
+ export const applicationAuditLogsResourceConfiguration_InitializationFactory = (resourcesRelationships) => createResourceConfiguration_Initialization({
72
+ mainSchema: AuditableEvent_BaseSchema,
73
+ resourceIdentifier: CoreResourceType.APPLICATION_AUDIT_LOGS,
74
+ resourceFieldIdentifier: coreResourceShared_FieldIdentifier[CoreResourceType.APPLICATION_AUDIT_LOGS],
75
+ resourceRelationships: resourcesRelationships,
76
+ isSystemResource: true,
77
+ /** Mirrored from the organization door — the same rows, so the same answer. Disclosing the monitoring trail to its own subject is self-defeating and out of Art. 20 scope. */
78
+ systemAccessPolicy: { exportSubject: ResourceSystemAccessMode.FORBIDDEN },
79
+ coreOperations: [
80
+ CoreResourceOperation.READ,
81
+ CoreResourceOperation.LIST,
82
+ CoreResourceOperation.SEARCH,
83
+ ],
84
+ operationsConfiguration: {
85
+ [CoreResourceOperation.READ]: {
86
+ variants: [{
87
+ variantType: ResourceOperationVariantType.API_CALL,
88
+ isDefault: true,
89
+ /** APP_ADMIN_SUPER_ADMIN ONLY — never an organization role. The rows behind this door span every tenant. */
90
+ roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],
91
+ riskLevel: ResourceOperationRiskLevel.MEDIUM,
92
+ /**
93
+ * Reading ONE tenant's audit row through the application door IS a crossing, so the cheapest
94
+ * reach — fetch by id — is declared and audited exactly like the collection verbs. Declaring
95
+ * it is also what stops `assignInitiatorOrganizationConfinementToFilter` silently narrowing
96
+ * this door to an operator who happens to carry an ambient organization, which would make a
97
+ * surface documented as spanning every tenant return one tenant and report success.
98
+ */
99
+ admitsCrossTenantPlatformAdministration: true,
100
+ }],
101
+ },
102
+ [CoreResourceOperation.LIST]: {
103
+ variants: [{
104
+ variantType: ResourceOperationVariantType.API_CALL,
105
+ isDefault: true,
106
+ roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],
107
+ riskLevel: ResourceOperationRiskLevel.MEDIUM,
108
+ /** The declared crossing — see READ. Every enrolled read emits one crossing per tenant reached. */
109
+ admitsCrossTenantPlatformAdministration: true,
110
+ filterFields: {
111
+ eventType: z.string(),
112
+ eventCategory: z.enum(AuditEventCategory),
113
+ severity: z.enum(AuditEventSeverity),
114
+ userId: z.string(),
115
+ /**
116
+ * Filterable so an operator can narrow to one tenant THROUGH this door, which is the
117
+ * cross-tenant investigation this surface exists for. It is a FILTER, never the isolation
118
+ * boundary: isolation on this door is the role gate above, and narrowing to a tenant does
119
+ * not make the read any less cross-tenant for audit purposes.
120
+ */
121
+ organizationId: z.string(),
122
+ correlationId: z.string(),
123
+ clientInstanceId: z.string(),
124
+ createdAt: z.date(),
125
+ },
126
+ /** `eventId` last, as the keyset tie-breaker — `createdAt` is not unique under boot/seed bursts. Mirrors the organization door; removing it reintroduces a paging data-loss path. */
127
+ sortFields: ['createdAt', 'severity', 'eventType', 'eventId'],
128
+ maxPaginatedResultPerPageLimit: 100,
129
+ }],
130
+ },
131
+ [CoreResourceOperation.SEARCH]: {
132
+ variants: [{
133
+ variantType: ResourceOperationVariantType.API_CALL,
134
+ isDefault: true,
135
+ roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],
136
+ riskLevel: ResourceOperationRiskLevel.MEDIUM,
137
+ /** The declared crossing — see READ. Every enrolled read emits one crossing per tenant reached. */
138
+ admitsCrossTenantPlatformAdministration: true,
139
+ isSearchable: false,
140
+ searchableFields: [],
141
+ filterFields: {
142
+ eventType: z.string(),
143
+ eventCategory: z.enum(AuditEventCategory),
144
+ severity: z.enum(AuditEventSeverity),
145
+ userId: z.string(),
146
+ organizationId: z.string(),
147
+ correlationId: z.string(),
148
+ clientInstanceId: z.string(),
149
+ createdAt: z.date(),
150
+ },
151
+ sortFields: ['createdAt', 'severity', 'eventType'],
152
+ maxPaginatedResultPerPageLimit: 100,
153
+ }],
154
+ },
155
+ },
156
+ });
157
+ //# sourceMappingURL=application-audit-logs.shared.resources-config.schemas.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"application-audit-logs.shared.resources-config.schemas.js","sourceRoot":"","sources":["../../../../../src/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AACrH,OAAO,EAAE,0CAA0C,EAAE,MAAM,iDAAiD,CAAC;AAC7G,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,kCAAkC,EAAE,MAAM,mDAAmD,CAAC;AAChJ,OAAO,EAAE,0BAA0B,EAAE,4BAA4B,EAAwB,MAAM,0CAA0C,CAAC;AAC1I,OAAO,EAAE,cAAc,EAAE,MAAM,oDAAoD,CAAC;AACpF,OAAO,EAAE,wBAAwB,EAAE,MAAM,iDAAiD,CAAC;AAE3F;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8DG;AACH,MAAM,CAAC,MAAM,+DAA+D,GAAG,CAC7E,sBAA8C,EAC9C,EAAE,CAAC,0CAA0C,CAI7C;IACA,UAAU,EAAE,yBAAyB;IACrC,kBAAkB,EAAE,gBAAgB,CAAC,sBAAsB;IAC3D,uBAAuB,EAAE,kCAAkC,CAAC,gBAAgB,CAAC,sBAAsB,CAAC;IACpG,qBAAqB,EAAE,sBAAsB;IAC7C,gBAAgB,EAAE,IAAI;IACtB,8KAA8K;IAC9K,kBAAkB,EAAE,EAAE,aAAa,EAAE,wBAAwB,CAAC,SAAS,EAAE;IAEzE,cAAc,EAAE;QACd,qBAAqB,CAAC,IAAI;QAC1B,qBAAqB,CAAC,IAAI;QAC1B,qBAAqB,CAAC,MAAM;KAC7B;IAED,uBAAuB,EAAE;QACvB,CAAC,qBAAqB,CAAC,IAAI,CAAC,EAAE;YAC5B,QAAQ,EAAE,CAAC;oBACT,WAAW,EAAE,4BAA4B,CAAC,QAAQ;oBAClD,SAAS,EAAE,IAAI;oBACf,4GAA4G;oBAC5G,KAAK,EAAE,CAAC,cAAc,CAAC,qBAAqB,CAAC;oBAC7C,SAAS,EAAE,0BAA0B,CAAC,MAAM;oBAC5C;;;;;;uBAMG;oBACH,uCAAuC,EAAE,IAAI;iBAC9C,CAAC;SACH;QAED,CAAC,qBAAqB,CAAC,IAAI,CAAC,EAAE;YAC5B,QAAQ,EAAE,CAAC;oBACT,WAAW,EAAE,4BAA4B,CAAC,QAAQ;oBAClD,SAAS,EAAE,IAAI;oBACf,KAAK,EAAE,CAAC,cAAc,CAAC,qBAAqB,CAAC;oBAC7C,SAAS,EAAE,0BAA0B,CAAC,MAAM;oBAC5C,mGAAmG;oBACnG,uCAAuC,EAAE,IAAI;oBAC7C,YAAY,EAAE;wBACZ,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;wBACrB,aAAa,EAAE,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC;wBACzC,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC;wBACpC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;wBAClB;;;;;2BAKG;wBACH,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE;wBAC1B,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE;wBACzB,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE;wBAC5B,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE;qBACpB;oBACD,qLAAqL;oBACrL,UAAU,EAAE,CAAC,WAAW,EAAE,UAAU,EAAE,WAAW,EAAE,SAAS,CAAU;oBACtE,8BAA8B,EAAE,GAAG;iBACpC,CAAC;SACH;QAED,CAAC,qBAAqB,CAAC,MAAM,CAAC,EAAE;YAC9B,QAAQ,EAAE,CAAC;oBACT,WAAW,EAAE,4BAA4B,CAAC,QAAQ;oBAClD,SAAS,EAAE,IAAI;oBACf,KAAK,EAAE,CAAC,cAAc,CAAC,qBAAqB,CAAC;oBAC7C,SAAS,EAAE,0BAA0B,CAAC,MAAM;oBAC5C,mGAAmG;oBACnG,uCAAuC,EAAE,IAAI;oBAC7C,YAAY,EAAE,KAAK;oBACnB,gBAAgB,EAAE,EAAE;oBACpB,YAAY,EAAE;wBACZ,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;wBACrB,aAAa,EAAE,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC;wBACzC,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC;wBACpC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;wBAClB,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE;wBAC1B,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE;wBACzB,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE;wBAC5B,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE;qBACpB;oBACD,UAAU,EAAE,CAAC,WAAW,EAAE,UAAU,EAAE,WAAW,CAAU;oBAC3D,8BAA8B,EAAE,GAAG;iBACpC,CAAC;SACH;KACF;CACF,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\n\nimport { AuditEventCategory, AuditEventSeverity, AuditableEvent_BaseSchema } from './auditable-events.shared.schema';\nimport { createResourceConfiguration_Initialization } from '../../resources/resources-config.shared.factory';\nimport { CoreResourceOperation, CoreResourceType, coreResourceShared_FieldIdentifier } from '../../resources/resources.shared.core.definitions';\nimport { ResourceOperationRiskLevel, ResourceOperationVariantType, ResourceRelationship } from '../../resources/resources.shared.schemas';\nimport { CORE_APP_ROLES } from '../../security/authorizations/roles.shared.schemas';\nimport { ResourceSystemAccessMode } from '../../resources/resources-config.shared.schemas';\n\n/**\n * The APPLICATION-scoped door onto the audit trail.\n *\n * ## Why this exists at all\n *\n * `AUDIT_LOGS` is organization-scoped and its only route is\n * `/organizations/{organizationId}/audit-logs`, so it returns exactly the rows carrying that\n * tenant. A large share of security events carry NO organization by design — `logUserLogin` takes\n * `organizationId` as optional because no organization is selected at login, and the same is true\n * of session eviction, token refresh and application-wide authentication-policy changes. Measured\n * on a dogfood application (#317): **94 of 127 rows had no organization**, and were reachable\n * through no API. An operator could see 26% of the trail and could not attest the rest, while a\n * reader querying the only available surface saw `user_login: 0` for a control that had emitted 21.\n *\n * ## Why a SEPARATE resource type rather than a second route\n *\n * `generateParentCombinations` composes every URL as\n * `[...primaryScope, ...mandatoryContext, ...optionalCombo]`, so a routed application edge on\n * `AUDIT_LOGS` would appear in EVERY combination and rewrite the organization route to\n * `/applications/{applicationId}/organizations/{organizationId}/audit-logs` — breaking all eight of\n * its documented paths and their consumers. Making the organization edge optional does not help:\n * the empty combination is skipped whenever any parent exists, so no bare route is emitted either.\n * A sibling type carrying ONE application parent takes the route it needs and leaves the existing\n * door byte-identical. The pattern is the engine's own: notification badges are dual-scope with a\n * type per scope, `APPLICATION_API_KEYS` shows the application routing shape, and `USER_SELF`\n * shows a distinct type addressing another's rows.\n *\n * ## Two doors, ONE record set — the security contract\n *\n * Both types resolve to the `auditLogs` collection through\n * `RESOURCE_SHARED_PERSISTENCE_COLLECTION_ALIASES`. That makes the isolation properties a\n * per-DOOR obligation rather than a property of the rows:\n *\n * - the organization door keeps its tenant filter and its organization roles, unchanged;\n * - this door is `APP_ADMIN_SUPER_ADMIN`-ONLY on every operation. An organization role must never\n * reach it — the rows behind it span every tenant;\n * - a read here that touches a tenant-attributed row is a CROSS-TENANT read and OWES an audit\n * emission. **It is wired**, by the two halves below acting together, and neither is optional:\n * each read variant declares `admitsCrossTenantPlatformAdministration`, and\n * `ServicesRegistryHandler.recordCrossTenantReadAccess` observes every enrolled read and emits\n * `CROSS_TENANT_ADMINISTRATIVE_ACCESS` once per TENANT the returned rows belong to. The\n * declaration is what enrols the read: `authorizeOrganizations` — where that event is otherwise\n * emitted — runs only for ORGANIZATIONS-scoped resources and decides on ONE fetched row, so it\n * never sees this door at all. Grouping per tenant is what makes the crossing visible to the\n * REACHED tenant, in its own organization-scoped viewer, rather than only to the operator.\n * `.claude/rules/administrative-continuity-floors.md` requires every crossing to be named in the\n * trail, and the trail is the worst possible surface on which to make an operator read invisible.\n * See `security/authorizations/cross-tenant-read-observation.backend.ts` for why an UNDECLARED\n * door is deliberately not observed instead of being observed with a false `admissionDeclared`.\n *\n * ## Deliberately mirrored from the organization resource\n *\n * `isSystemResource`, `systemAccessPolicy.exportSubject: FORBIDDEN` and the ABSENCE of a\n * `retentionPolicy` are copied ON PURPOSE. They are properties of the ROWS, and the rows are the\n * same ones — a second door that disagreed about whether the audit trail is subject-exportable, or\n * about how long it is kept, would be a policy fork over one record set. See the organization\n * config for the reasoning behind each; do not change one without the other.\n *\n * ## Deliberately NOT mirrored\n *\n * There is no CREATE. The organization resource carries a `REPOSITORY_ONLY` CREATE because that is\n * how audit rows are written; writing is not a scope question and must keep exactly one door.\n */\nexport const applicationAuditLogsResourceConfiguration_InitializationFactory = (\n resourcesRelationships: ResourceRelationship[]\n) => createResourceConfiguration_Initialization<\n undefined,\n CoreResourceOperation.READ | CoreResourceOperation.LIST | CoreResourceOperation.SEARCH,\n typeof AuditableEvent_BaseSchema\n>({\n mainSchema: AuditableEvent_BaseSchema,\n resourceIdentifier: CoreResourceType.APPLICATION_AUDIT_LOGS,\n resourceFieldIdentifier: coreResourceShared_FieldIdentifier[CoreResourceType.APPLICATION_AUDIT_LOGS],\n resourceRelationships: resourcesRelationships,\n isSystemResource: true,\n /** Mirrored from the organization door — the same rows, so the same answer. Disclosing the monitoring trail to its own subject is self-defeating and out of Art. 20 scope. */\n systemAccessPolicy: { exportSubject: ResourceSystemAccessMode.FORBIDDEN },\n\n coreOperations: [\n CoreResourceOperation.READ,\n CoreResourceOperation.LIST,\n CoreResourceOperation.SEARCH,\n ],\n\n operationsConfiguration: {\n [CoreResourceOperation.READ]: {\n variants: [{\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n /** APP_ADMIN_SUPER_ADMIN ONLY — never an organization role. The rows behind this door span every tenant. */\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.MEDIUM,\n /**\n * Reading ONE tenant's audit row through the application door IS a crossing, so the cheapest\n * reach — fetch by id — is declared and audited exactly like the collection verbs. Declaring\n * it is also what stops `assignInitiatorOrganizationConfinementToFilter` silently narrowing\n * this door to an operator who happens to carry an ambient organization, which would make a\n * surface documented as spanning every tenant return one tenant and report success.\n */\n admitsCrossTenantPlatformAdministration: true,\n }],\n },\n\n [CoreResourceOperation.LIST]: {\n variants: [{\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.MEDIUM,\n /** The declared crossing — see READ. Every enrolled read emits one crossing per tenant reached. */\n admitsCrossTenantPlatformAdministration: true,\n filterFields: {\n eventType: z.string(),\n eventCategory: z.enum(AuditEventCategory),\n severity: z.enum(AuditEventSeverity),\n userId: z.string(),\n /**\n * Filterable so an operator can narrow to one tenant THROUGH this door, which is the\n * cross-tenant investigation this surface exists for. It is a FILTER, never the isolation\n * boundary: isolation on this door is the role gate above, and narrowing to a tenant does\n * not make the read any less cross-tenant for audit purposes.\n */\n organizationId: z.string(),\n correlationId: z.string(),\n clientInstanceId: z.string(),\n createdAt: z.date(),\n },\n /** `eventId` last, as the keyset tie-breaker — `createdAt` is not unique under boot/seed bursts. Mirrors the organization door; removing it reintroduces a paging data-loss path. */\n sortFields: ['createdAt', 'severity', 'eventType', 'eventId'] as const,\n maxPaginatedResultPerPageLimit: 100,\n }],\n },\n\n [CoreResourceOperation.SEARCH]: {\n variants: [{\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.MEDIUM,\n /** The declared crossing — see READ. Every enrolled read emits one crossing per tenant reached. */\n admitsCrossTenantPlatformAdministration: true,\n isSearchable: false,\n searchableFields: [],\n filterFields: {\n eventType: z.string(),\n eventCategory: z.enum(AuditEventCategory),\n severity: z.enum(AuditEventSeverity),\n userId: z.string(),\n organizationId: z.string(),\n correlationId: z.string(),\n clientInstanceId: z.string(),\n createdAt: z.date(),\n },\n sortFields: ['createdAt', 'severity', 'eventType'] as const,\n maxPaginatedResultPerPageLimit: 100,\n }],\n },\n },\n});\n"]}
@@ -1,8 +1,24 @@
1
1
  import { z } from 'zod';
2
2
  /**
3
+ * @wildo_source:part:start saas.models.audit.trail-config facet:layer:shared facet:audience:app-developer
4
+ *
3
5
  * `AuditTrailConfig` — application-level operator-tunable configuration for the
4
6
  * compliance audit-trail subsystem.
5
7
  *
8
+ * ⚠️ **`archiveAfterDays` IS the opt-in, and it never deletes anything.** While it is unset the
9
+ * archival job still runs and does nothing, and every audit record stays in the primary store
10
+ * indefinitely — so an application that has never set it is accumulating, not rotating.
11
+ *
12
+ * Setting it does not shrink the primary store either. `AUDIT_LOGS` is immutable by invariant: it
13
+ * has no UPDATE and no DELETE, so records older than the horizon are COPIED to durable archival
14
+ * artifacts in file storage while the originals remain. The field is named `archiveAfterDays` rather
15
+ * than `retentionDays` for exactly that reason — nothing is retained-then-deleted, and an operator
16
+ * expecting the primary store to shrink has misread it.
17
+ *
18
+ * The decision is taken at each tick from live configuration, so changing the value takes effect
19
+ * without a restart, and a misconfigured value cannot orphan the schedule. An application that turns
20
+ * this on after it already has aged data seeds the archive with a one-off wider look-back run.
21
+ *
6
22
  * Phase 5 / F1 (audit-logging plan). Mirrors {@link DataSeedingConfigSchema} /
7
23
  * {@link LifecycleConfigSchema} in shape and intent: a small, OPTIONAL block on
8
24
  * the shared application configuration ({@link AppConfiguration_Shared_Schema})
@@ -10,6 +26,11 @@ import { z } from 'zod';
10
26
  * `compliance:audit-logs-archive` cron batch — without forking the factory's
11
27
  * built-in defaults.
12
28
  *
29
+ * It also carries the subsystem's one EGRESS posture
30
+ * ({@link allowPrivateNetworkSiemCollectors}), which belongs to the operator rather
31
+ * than to the tenant who authors a SIEM destination — see that field's own JSDoc
32
+ * for why the distinction is the whole control.
33
+ *
13
34
  * --------------------------------------------------------------------------
14
35
  * Archival, NOT deletion — audit logs are immutable
15
36
  * --------------------------------------------------------------------------
@@ -53,6 +74,8 @@ import { z } from 'zod';
53
74
  */
54
75
  export declare const AuditTrailConfigSchema: z.ZodObject<{
55
76
  archiveAfterDays: z.ZodOptional<z.ZodNumber>;
77
+ allowPrivateNetworkSiemCollectors: z.ZodOptional<z.ZodBoolean>;
56
78
  }, z.core.$strip>;
57
79
  export type AuditTrailConfig = z.infer<typeof AuditTrailConfigSchema>;
80
+ /** @wildo_source:part:end saas.models.audit.trail-config */
58
81
  //# sourceMappingURL=audit-trail-config.shared.schemas.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"audit-trail-config.shared.schemas.d.ts","sourceRoot":"","sources":["../../../../../src/compliance/audit-trails/audit-trail-config.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AACH,eAAO,MAAM,sBAAsB;;iBAmBjC,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
1
+ {"version":3,"file":"audit-trail-config.shared.schemas.d.ts","sourceRoot":"","sources":["../../../../../src/compliance/audit-trails/audit-trail-config.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwEG;AACH,eAAO,MAAM,sBAAsB;;;iBAsDjC,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACtE,4DAA4D"}
@@ -1,8 +1,24 @@
1
1
  import { z } from 'zod';
2
2
  /**
3
+ * @wildo_source:part:start saas.models.audit.trail-config facet:layer:shared facet:audience:app-developer
4
+ *
3
5
  * `AuditTrailConfig` — application-level operator-tunable configuration for the
4
6
  * compliance audit-trail subsystem.
5
7
  *
8
+ * ⚠️ **`archiveAfterDays` IS the opt-in, and it never deletes anything.** While it is unset the
9
+ * archival job still runs and does nothing, and every audit record stays in the primary store
10
+ * indefinitely — so an application that has never set it is accumulating, not rotating.
11
+ *
12
+ * Setting it does not shrink the primary store either. `AUDIT_LOGS` is immutable by invariant: it
13
+ * has no UPDATE and no DELETE, so records older than the horizon are COPIED to durable archival
14
+ * artifacts in file storage while the originals remain. The field is named `archiveAfterDays` rather
15
+ * than `retentionDays` for exactly that reason — nothing is retained-then-deleted, and an operator
16
+ * expecting the primary store to shrink has misread it.
17
+ *
18
+ * The decision is taken at each tick from live configuration, so changing the value takes effect
19
+ * without a restart, and a misconfigured value cannot orphan the schedule. An application that turns
20
+ * this on after it already has aged data seeds the archive with a one-off wider look-back run.
21
+ *
6
22
  * Phase 5 / F1 (audit-logging plan). Mirrors {@link DataSeedingConfigSchema} /
7
23
  * {@link LifecycleConfigSchema} in shape and intent: a small, OPTIONAL block on
8
24
  * the shared application configuration ({@link AppConfiguration_Shared_Schema})
@@ -10,6 +26,11 @@ import { z } from 'zod';
10
26
  * `compliance:audit-logs-archive` cron batch — without forking the factory's
11
27
  * built-in defaults.
12
28
  *
29
+ * It also carries the subsystem's one EGRESS posture
30
+ * ({@link allowPrivateNetworkSiemCollectors}), which belongs to the operator rather
31
+ * than to the tenant who authors a SIEM destination — see that field's own JSDoc
32
+ * for why the distinction is the whole control.
33
+ *
13
34
  * --------------------------------------------------------------------------
14
35
  * Archival, NOT deletion — audit logs are immutable
15
36
  * --------------------------------------------------------------------------
@@ -70,5 +91,40 @@ export const AuditTrailConfigSchema = z.object({
70
91
  * staging/production environment fails startup with a CONFIGURATION error.
71
92
  */
72
93
  archiveAfterDays: z.number().int().min(1).max(2555).optional(),
94
+ /**
95
+ * May a SIEM export deliver to a collector on an address the public internet cannot reach?
96
+ *
97
+ * ── What it is for ─────────────────────────────────────────────────────────
98
+ * A SIEM webhook URL is TENANT-authored (`siemExportConfig.webhookUrl`, written by an organization
99
+ * administrator) and the delivery worker POSTs to it with the deployment's own network position.
100
+ * That is a server-side request forgery primitive by construction, and the classic targets are the
101
+ * ones every guard in `security/ssrf` names: `169.254.169.254`, loopback admin ports, RFC 1918.
102
+ *
103
+ * But one legitimate deployment shape genuinely lives there: a self-hosted collector (Splunk,
104
+ * QRadar, a syslog bridge) on the same private network as the application. Refusing that
105
+ * unconditionally would not be "safe" — it would break a supported topology and push operators to
106
+ * a worse workaround.
107
+ *
108
+ * ── Why it is an OPERATOR field and not a tenant field ─────────────────────
109
+ * It lives HERE, on the application configuration the deployment operator authors, and NOT on
110
+ * `SiemExportConfigBaseSchema`, which the tenant authors. A tenant-settable "allow private
111
+ * addresses" flag would hand the party supplying the attacker-controlled URL the switch that
112
+ * disarms the guard aimed at them — an SSRF bypass with a checkbox. The operator declares the
113
+ * network posture; the tenant chooses a destination within it.
114
+ *
115
+ * ── Why OPTIONAL rather than `.default(false)` ─────────────────────────────
116
+ * The reader tests for `=== true`, so absent is refuse, and the fail-closed posture is the one you
117
+ * get by doing nothing — the same contract `archiveAfterDays` states one field above. It is left
118
+ * without a Zod default so `AuditTrailConfigSchema.parse({})` still round-trips as `{}`; an
119
+ * always-materialised `false` would make the block non-empty for every application that never
120
+ * authored it, which is what the pin below this schema's tests exists to prevent.
121
+ *
122
+ * ── What it does NOT relax ─────────────────────────────────────────────────
123
+ * Not the scheme policy, not the credentials-in-URL refusal, and not the PINNING: the delivery
124
+ * still connects only to an address classified at the moment of connection. It widens WHICH
125
+ * addresses are admitted, never whether the admitted address is the one connected to.
126
+ */
127
+ allowPrivateNetworkSiemCollectors: z.boolean().optional(),
73
128
  });
129
+ /** @wildo_source:part:end saas.models.audit.trail-config */
74
130
  //# sourceMappingURL=audit-trail-config.shared.schemas.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"audit-trail-config.shared.schemas.js","sourceRoot":"","sources":["../../../../../src/compliance/audit-trails/audit-trail-config.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C;;;;;;;;;;;;;;;;OAgBG;IACH,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE;CAC/D,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\n\n/**\n * `AuditTrailConfig` — application-level operator-tunable configuration for the\n * compliance audit-trail subsystem.\n *\n * Phase 5 / F1 (audit-logging plan). Mirrors {@link DataSeedingConfigSchema} /\n * {@link LifecycleConfigSchema} in shape and intent: a small, OPTIONAL block on\n * the shared application configuration ({@link AppConfiguration_Shared_Schema})\n * that tunes an engine-owned background batch — here the\n * `compliance:audit-logs-archive` cron batch — without forking the factory's\n * built-in defaults.\n *\n * --------------------------------------------------------------------------\n * Archival, NOT deletion — audit logs are immutable\n * --------------------------------------------------------------------------\n * The `AUDIT_LOGS` resource is IMMUTABLE by invariant (G5): its\n * `coreOperations` are `READ | LIST | SEARCH | CREATE` — there is NO `UPDATE`\n * and NO `DELETE`. The retention mechanism therefore NEVER removes audit\n * records from the primary store. Instead, records older than\n * {@link archiveAfterDays} are EXPORTED (copied) to durable off-DB archival\n * artifacts in file storage by the archival batch, while the original rows\n * remain in the always-on `AUDIT_LOGS` store (and, when configured, in the\n * append-only immudb tamper-proof ledger). This is why the field is named\n * `archiveAfterDays` and not `retentionDays`: nothing is retained-then-deleted;\n * the value is purely the ARCHIVAL HORIZON. (The distinction mirrors the\n * `archiveAfterDays` vs `retentionDays` split in the general\n * `DataRetentionPolicySchema`.)\n *\n * --------------------------------------------------------------------------\n * Why the config lives in `saas-models` (not next to the batch)\n * --------------------------------------------------------------------------\n * The runtime wiring (`StartApplicationBackendService.initialize`) and the\n * batch body read operator-tunable configuration EXCLUSIVELY from\n * `appConfigService.config?.*` — i.e. the {@link AppConfiguration_Shared_Schema}\n * aggregate. Placing the schema here (rather than in `saas-backend-lib` next to\n * the batch) keeps every operator-tunable engine batch symmetric with\n * `dataSeeding` / `lifecycle` and gives one source of truth the batch factory\n * and the startup validator can both import (`saas-models` cannot depend on\n * `saas-backend-lib` — the dependency arrow points the other way).\n *\n * --------------------------------------------------------------------------\n * Bounds + production floor\n * --------------------------------------------------------------------------\n * {@link archiveAfterDays} bounds mirror the SSO `auditConfig.retentionDays`\n * precedent (min 1 day, max 2555 ≈ 7 years). A stricter PRODUCTION FLOOR (365\n * days) is enforced at boot by\n * `ApplicationStartupConfigValidatorService.validate()` — NOT by a schema-level\n * `.min()` and NOT by a Zod `.superRefine()`, because the environment\n * (development vs staging/production) is a RUNTIME signal\n * (`process.env.APPLICATION_ENV`) that a pure, environment-agnostic shared\n * schema must not read. The schema `.min(1)` is the absolute floor; the runtime\n * validator raises it to 365 outside development.\n */\nexport const AuditTrailConfigSchema = z.object({\n /**\n * Age (in days) beyond which audit records are EXPORTED to durable archival\n * file-storage artifacts by the `compliance:audit-logs-archive` cron batch.\n *\n * Records are NEVER deleted from the primary `AUDIT_LOGS` store — this is the\n * archival horizon only (see the block-level JSDoc on why the field is\n * `archiveAfterDays`, not `retentionDays`).\n *\n * OPTIONAL — when omitted (`undefined`), NO archival runs and audit records\n * are retained in the primary store indefinitely. This is the compliance-safe\n * default: an operator must explicitly opt in before any archival happens.\n *\n * Bounds: min 1 / max 2555 (≈ 7 years), mirroring the SSO\n * `auditConfig.retentionDays` precedent. A production floor of 365 days is\n * enforced at boot (see block-level JSDoc) — setting a value below 365 in a\n * staging/production environment fails startup with a CONFIGURATION error.\n */\n archiveAfterDays: z.number().int().min(1).max(2555).optional(),\n});\n\nexport type AuditTrailConfig = z.infer<typeof AuditTrailConfigSchema>;\n"]}
1
+ {"version":3,"file":"audit-trail-config.shared.schemas.js","sourceRoot":"","sources":["../../../../../src/compliance/audit-trails/audit-trail-config.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwEG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C;;;;;;;;;;;;;;;;OAgBG;IACH,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE;IAE9D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAgCG;IACH,iCAAiC,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;CAC1D,CAAC,CAAC;AAGH,4DAA4D","sourcesContent":["import { z } from 'zod';\n\n/**\n * @wildo_source:part:start saas.models.audit.trail-config facet:layer:shared facet:audience:app-developer\n *\n * `AuditTrailConfig` — application-level operator-tunable configuration for the\n * compliance audit-trail subsystem.\n *\n * ⚠️ **`archiveAfterDays` IS the opt-in, and it never deletes anything.** While it is unset the\n * archival job still runs and does nothing, and every audit record stays in the primary store\n * indefinitely — so an application that has never set it is accumulating, not rotating.\n *\n * Setting it does not shrink the primary store either. `AUDIT_LOGS` is immutable by invariant: it\n * has no UPDATE and no DELETE, so records older than the horizon are COPIED to durable archival\n * artifacts in file storage while the originals remain. The field is named `archiveAfterDays` rather\n * than `retentionDays` for exactly that reason — nothing is retained-then-deleted, and an operator\n * expecting the primary store to shrink has misread it.\n *\n * The decision is taken at each tick from live configuration, so changing the value takes effect\n * without a restart, and a misconfigured value cannot orphan the schedule. An application that turns\n * this on after it already has aged data seeds the archive with a one-off wider look-back run.\n *\n * Phase 5 / F1 (audit-logging plan). Mirrors {@link DataSeedingConfigSchema} /\n * {@link LifecycleConfigSchema} in shape and intent: a small, OPTIONAL block on\n * the shared application configuration ({@link AppConfiguration_Shared_Schema})\n * that tunes an engine-owned background batch — here the\n * `compliance:audit-logs-archive` cron batch — without forking the factory's\n * built-in defaults.\n *\n * It also carries the subsystem's one EGRESS posture\n * ({@link allowPrivateNetworkSiemCollectors}), which belongs to the operator rather\n * than to the tenant who authors a SIEM destination — see that field's own JSDoc\n * for why the distinction is the whole control.\n *\n * --------------------------------------------------------------------------\n * Archival, NOT deletion — audit logs are immutable\n * --------------------------------------------------------------------------\n * The `AUDIT_LOGS` resource is IMMUTABLE by invariant (G5): its\n * `coreOperations` are `READ | LIST | SEARCH | CREATE` — there is NO `UPDATE`\n * and NO `DELETE`. The retention mechanism therefore NEVER removes audit\n * records from the primary store. Instead, records older than\n * {@link archiveAfterDays} are EXPORTED (copied) to durable off-DB archival\n * artifacts in file storage by the archival batch, while the original rows\n * remain in the always-on `AUDIT_LOGS` store (and, when configured, in the\n * append-only immudb tamper-proof ledger). This is why the field is named\n * `archiveAfterDays` and not `retentionDays`: nothing is retained-then-deleted;\n * the value is purely the ARCHIVAL HORIZON. (The distinction mirrors the\n * `archiveAfterDays` vs `retentionDays` split in the general\n * `DataRetentionPolicySchema`.)\n *\n * --------------------------------------------------------------------------\n * Why the config lives in `saas-models` (not next to the batch)\n * --------------------------------------------------------------------------\n * The runtime wiring (`StartApplicationBackendService.initialize`) and the\n * batch body read operator-tunable configuration EXCLUSIVELY from\n * `appConfigService.config?.*` — i.e. the {@link AppConfiguration_Shared_Schema}\n * aggregate. Placing the schema here (rather than in `saas-backend-lib` next to\n * the batch) keeps every operator-tunable engine batch symmetric with\n * `dataSeeding` / `lifecycle` and gives one source of truth the batch factory\n * and the startup validator can both import (`saas-models` cannot depend on\n * `saas-backend-lib` — the dependency arrow points the other way).\n *\n * --------------------------------------------------------------------------\n * Bounds + production floor\n * --------------------------------------------------------------------------\n * {@link archiveAfterDays} bounds mirror the SSO `auditConfig.retentionDays`\n * precedent (min 1 day, max 2555 ≈ 7 years). A stricter PRODUCTION FLOOR (365\n * days) is enforced at boot by\n * `ApplicationStartupConfigValidatorService.validate()` — NOT by a schema-level\n * `.min()` and NOT by a Zod `.superRefine()`, because the environment\n * (development vs staging/production) is a RUNTIME signal\n * (`process.env.APPLICATION_ENV`) that a pure, environment-agnostic shared\n * schema must not read. The schema `.min(1)` is the absolute floor; the runtime\n * validator raises it to 365 outside development.\n */\nexport const AuditTrailConfigSchema = z.object({\n /**\n * Age (in days) beyond which audit records are EXPORTED to durable archival\n * file-storage artifacts by the `compliance:audit-logs-archive` cron batch.\n *\n * Records are NEVER deleted from the primary `AUDIT_LOGS` store — this is the\n * archival horizon only (see the block-level JSDoc on why the field is\n * `archiveAfterDays`, not `retentionDays`).\n *\n * OPTIONAL — when omitted (`undefined`), NO archival runs and audit records\n * are retained in the primary store indefinitely. This is the compliance-safe\n * default: an operator must explicitly opt in before any archival happens.\n *\n * Bounds: min 1 / max 2555 (≈ 7 years), mirroring the SSO\n * `auditConfig.retentionDays` precedent. A production floor of 365 days is\n * enforced at boot (see block-level JSDoc) — setting a value below 365 in a\n * staging/production environment fails startup with a CONFIGURATION error.\n */\n archiveAfterDays: z.number().int().min(1).max(2555).optional(),\n\n /**\n * May a SIEM export deliver to a collector on an address the public internet cannot reach?\n *\n * ── What it is for ─────────────────────────────────────────────────────────\n * A SIEM webhook URL is TENANT-authored (`siemExportConfig.webhookUrl`, written by an organization\n * administrator) and the delivery worker POSTs to it with the deployment's own network position.\n * That is a server-side request forgery primitive by construction, and the classic targets are the\n * ones every guard in `security/ssrf` names: `169.254.169.254`, loopback admin ports, RFC 1918.\n *\n * But one legitimate deployment shape genuinely lives there: a self-hosted collector (Splunk,\n * QRadar, a syslog bridge) on the same private network as the application. Refusing that\n * unconditionally would not be \"safe\" — it would break a supported topology and push operators to\n * a worse workaround.\n *\n * ── Why it is an OPERATOR field and not a tenant field ─────────────────────\n * It lives HERE, on the application configuration the deployment operator authors, and NOT on\n * `SiemExportConfigBaseSchema`, which the tenant authors. A tenant-settable \"allow private\n * addresses\" flag would hand the party supplying the attacker-controlled URL the switch that\n * disarms the guard aimed at them — an SSRF bypass with a checkbox. The operator declares the\n * network posture; the tenant chooses a destination within it.\n *\n * ── Why OPTIONAL rather than `.default(false)` ─────────────────────────────\n * The reader tests for `=== true`, so absent is refuse, and the fail-closed posture is the one you\n * get by doing nothing — the same contract `archiveAfterDays` states one field above. It is left\n * without a Zod default so `AuditTrailConfigSchema.parse({})` still round-trips as `{}`; an\n * always-materialised `false` would make the block non-empty for every application that never\n * authored it, which is what the pin below this schema's tests exists to prevent.\n *\n * ── What it does NOT relax ─────────────────────────────────────────────────\n * Not the scheme policy, not the credentials-in-URL refusal, and not the PINNING: the delivery\n * still connects only to an address classified at the moment of connection. It widens WHICH\n * addresses are admitted, never whether the admitted address is the one connected to.\n */\n allowPrivateNetworkSiemCollectors: z.boolean().optional(),\n});\n\nexport type AuditTrailConfig = z.infer<typeof AuditTrailConfigSchema>;\n/** @wildo_source:part:end saas.models.audit.trail-config */\n"]}