@wildo-ai/saas-models 1.1.4 → 1.1.6

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 (1399) hide show
  1. package/dist/esm/__tests__/setup.d.ts.map +1 -1
  2. package/dist/esm/_inspect.d.ts.map +1 -1
  3. package/dist/esm/applications/application-metadata.shared.resources-config.schemas.d.ts +1 -1
  4. package/dist/esm/applications/application-metadata.shared.resources-config.schemas.d.ts.map +1 -1
  5. package/dist/esm/applications/application-subject.shared.schemas.d.ts.map +1 -1
  6. package/dist/esm/applications/application-versions.shared.resources-config.schemas.d.ts +1 -1
  7. package/dist/esm/applications/application-versions.shared.resources-config.schemas.d.ts.map +1 -1
  8. package/dist/esm/applications/application-versions.shared.resources-config.schemas.js +4 -3
  9. package/dist/esm/applications/application-versions.shared.resources-config.schemas.js.map +1 -1
  10. package/dist/esm/applications/applications-context.schemas.d.ts +412 -20
  11. package/dist/esm/applications/applications-context.schemas.d.ts.map +1 -1
  12. package/dist/esm/applications/applications.shared.resources-config.schemas.d.ts +1 -0
  13. package/dist/esm/applications/applications.shared.resources-config.schemas.d.ts.map +1 -1
  14. package/dist/esm/applications/applications.shared.resources-config.schemas.js +4 -3
  15. package/dist/esm/applications/applications.shared.resources-config.schemas.js.map +1 -1
  16. package/dist/esm/applications/applications.shared.schemas.d.ts +10 -7
  17. package/dist/esm/applications/applications.shared.schemas.d.ts.map +1 -1
  18. package/dist/esm/applications/applications.shared.schemas.js +46 -9
  19. package/dist/esm/applications/applications.shared.schemas.js.map +1 -1
  20. package/dist/esm/billing/billing-account.shared.resources-config.schemas.d.ts +11 -3
  21. package/dist/esm/billing/billing-account.shared.resources-config.schemas.d.ts.map +1 -1
  22. package/dist/esm/billing/billing-account.shared.resources-config.schemas.js +50 -17
  23. package/dist/esm/billing/billing-account.shared.resources-config.schemas.js.map +1 -1
  24. package/dist/esm/billing/billing-account.shared.schemas.d.ts.map +1 -1
  25. package/dist/esm/billing/billing-account.shared.schemas.js +2 -2
  26. package/dist/esm/billing/billing-account.shared.schemas.js.map +1 -1
  27. package/dist/esm/billing/billing-configuration.shared.schemas.d.ts +25 -0
  28. package/dist/esm/billing/billing-configuration.shared.schemas.d.ts.map +1 -1
  29. package/dist/esm/billing/billing-configuration.shared.schemas.js +19 -0
  30. package/dist/esm/billing/billing-configuration.shared.schemas.js.map +1 -1
  31. package/dist/esm/billing/billing-enums.shared.schemas.d.ts +114 -10
  32. package/dist/esm/billing/billing-enums.shared.schemas.d.ts.map +1 -1
  33. package/dist/esm/billing/billing-enums.shared.schemas.js +121 -9
  34. package/dist/esm/billing/billing-enums.shared.schemas.js.map +1 -1
  35. package/dist/esm/billing/billing-types.shared.schemas.d.ts +61 -15
  36. package/dist/esm/billing/billing-types.shared.schemas.d.ts.map +1 -1
  37. package/dist/esm/billing/billing-types.shared.schemas.js +54 -26
  38. package/dist/esm/billing/billing-types.shared.schemas.js.map +1 -1
  39. package/dist/esm/billing/credit-pool.shared.resources-config.schemas.d.ts +2 -0
  40. package/dist/esm/billing/credit-pool.shared.resources-config.schemas.d.ts.map +1 -1
  41. package/dist/esm/billing/credit-pool.shared.resources-config.schemas.js +18 -7
  42. package/dist/esm/billing/credit-pool.shared.resources-config.schemas.js.map +1 -1
  43. package/dist/esm/billing/credit-pool.shared.schemas.d.ts +2 -0
  44. package/dist/esm/billing/credit-pool.shared.schemas.d.ts.map +1 -1
  45. package/dist/esm/billing/credit-pool.shared.schemas.js +7 -1
  46. package/dist/esm/billing/credit-pool.shared.schemas.js.map +1 -1
  47. package/dist/esm/billing/invoice-ref.shared.resources-config.schemas.d.ts.map +1 -1
  48. package/dist/esm/billing/invoice-ref.shared.resources-config.schemas.js +6 -6
  49. package/dist/esm/billing/invoice-ref.shared.resources-config.schemas.js.map +1 -1
  50. package/dist/esm/billing/invoice-ref.shared.schemas.d.ts.map +1 -1
  51. package/dist/esm/billing/invoice-ref.shared.schemas.js +1 -1
  52. package/dist/esm/billing/invoice-ref.shared.schemas.js.map +1 -1
  53. package/dist/esm/billing/price.shared.resources-config.schemas.d.ts.map +1 -1
  54. package/dist/esm/billing/price.shared.resources-config.schemas.js +32 -2
  55. package/dist/esm/billing/price.shared.resources-config.schemas.js.map +1 -1
  56. package/dist/esm/billing/price.shared.schemas.d.ts.map +1 -1
  57. package/dist/esm/billing/price.shared.schemas.js +5 -3
  58. package/dist/esm/billing/price.shared.schemas.js.map +1 -1
  59. package/dist/esm/billing/product-behavior-policy.shared.schemas.d.ts +11 -1
  60. package/dist/esm/billing/product-behavior-policy.shared.schemas.d.ts.map +1 -1
  61. package/dist/esm/billing/product-behavior-policy.shared.schemas.js +39 -23
  62. package/dist/esm/billing/product-behavior-policy.shared.schemas.js.map +1 -1
  63. package/dist/esm/billing/product-definition.shared.schemas.d.ts +30 -2
  64. package/dist/esm/billing/product-definition.shared.schemas.d.ts.map +1 -1
  65. package/dist/esm/billing/product-definition.shared.schemas.js +35 -0
  66. package/dist/esm/billing/product-definition.shared.schemas.js.map +1 -1
  67. package/dist/esm/billing/product.shared.resources-config.schemas.d.ts +6 -3
  68. package/dist/esm/billing/product.shared.resources-config.schemas.d.ts.map +1 -1
  69. package/dist/esm/billing/product.shared.resources-config.schemas.js +32 -2
  70. package/dist/esm/billing/product.shared.resources-config.schemas.js.map +1 -1
  71. package/dist/esm/billing/product.shared.schemas.d.ts +8 -3
  72. package/dist/esm/billing/product.shared.schemas.d.ts.map +1 -1
  73. package/dist/esm/billing/product.shared.schemas.js +25 -7
  74. package/dist/esm/billing/product.shared.schemas.js.map +1 -1
  75. package/dist/esm/billing/promotions.shared.resources-config.schemas.d.ts.map +1 -1
  76. package/dist/esm/billing/promotions.shared.resources-config.schemas.js +41 -11
  77. package/dist/esm/billing/promotions.shared.resources-config.schemas.js.map +1 -1
  78. package/dist/esm/billing/promotions.shared.schemas.d.ts.map +1 -1
  79. package/dist/esm/billing/public-pricing-catalog.shared.atoms.d.ts +135 -0
  80. package/dist/esm/billing/public-pricing-catalog.shared.atoms.d.ts.map +1 -0
  81. package/dist/esm/billing/public-pricing-catalog.shared.atoms.js +112 -0
  82. package/dist/esm/billing/public-pricing-catalog.shared.atoms.js.map +1 -0
  83. package/dist/esm/billing/public-pricing-catalog.shared.d.ts +30 -0
  84. package/dist/esm/billing/public-pricing-catalog.shared.d.ts.map +1 -0
  85. package/dist/esm/billing/public-pricing-catalog.shared.js +53 -0
  86. package/dist/esm/billing/public-pricing-catalog.shared.js.map +1 -0
  87. package/dist/esm/billing/referral-reward.shared.schemas.d.ts +51 -0
  88. package/dist/esm/billing/referral-reward.shared.schemas.d.ts.map +1 -0
  89. package/dist/esm/billing/referral-reward.shared.schemas.js +92 -0
  90. package/dist/esm/billing/referral-reward.shared.schemas.js.map +1 -0
  91. package/dist/esm/billing/referral.shared.resources-config.schemas.d.ts +54 -33
  92. package/dist/esm/billing/referral.shared.resources-config.schemas.d.ts.map +1 -1
  93. package/dist/esm/billing/referral.shared.resources-config.schemas.js +76 -2
  94. package/dist/esm/billing/referral.shared.resources-config.schemas.js.map +1 -1
  95. package/dist/esm/billing/referral.shared.schemas.d.ts +23 -37
  96. package/dist/esm/billing/referral.shared.schemas.d.ts.map +1 -1
  97. package/dist/esm/billing/referral.shared.schemas.js +27 -44
  98. package/dist/esm/billing/referral.shared.schemas.js.map +1 -1
  99. package/dist/esm/billing/subscription.shared.resources-config.schemas.d.ts +32 -2
  100. package/dist/esm/billing/subscription.shared.resources-config.schemas.d.ts.map +1 -1
  101. package/dist/esm/billing/subscription.shared.resources-config.schemas.js +95 -16
  102. package/dist/esm/billing/subscription.shared.resources-config.schemas.js.map +1 -1
  103. package/dist/esm/billing/subscription.shared.schemas.d.ts +81 -5
  104. package/dist/esm/billing/subscription.shared.schemas.d.ts.map +1 -1
  105. package/dist/esm/billing/subscription.shared.schemas.js +88 -25
  106. package/dist/esm/billing/subscription.shared.schemas.js.map +1 -1
  107. package/dist/esm/billing/usage-flush-evidence.shared.schemas.d.ts +49 -0
  108. package/dist/esm/billing/usage-flush-evidence.shared.schemas.d.ts.map +1 -0
  109. package/dist/esm/billing/usage-flush-evidence.shared.schemas.js +48 -0
  110. package/dist/esm/billing/usage-flush-evidence.shared.schemas.js.map +1 -0
  111. package/dist/esm/billing/usage-record.shared.resources-config.schemas.d.ts.map +1 -1
  112. package/dist/esm/billing/usage-record.shared.schemas.d.ts +1 -0
  113. package/dist/esm/billing/usage-record.shared.schemas.d.ts.map +1 -1
  114. package/dist/esm/billing/usage-record.shared.schemas.js +8 -5
  115. package/dist/esm/billing/usage-record.shared.schemas.js.map +1 -1
  116. package/dist/esm/charts/aggregation-query.shared.schemas.d.ts.map +1 -1
  117. package/dist/esm/charts/chart-definition-builder.shared.d.ts.map +1 -1
  118. package/dist/esm/companion/provider-discovery.shared.schemas.d.ts +150 -3
  119. package/dist/esm/companion/provider-discovery.shared.schemas.d.ts.map +1 -1
  120. package/dist/esm/companion/provider-discovery.shared.schemas.js +84 -1
  121. package/dist/esm/companion/provider-discovery.shared.schemas.js.map +1 -1
  122. package/dist/esm/companion/shared-library-companion.shared.definitions.d.ts.map +1 -1
  123. package/dist/esm/companion-exports.d.ts.map +1 -1
  124. package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.d.ts +28 -4
  125. package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.d.ts.map +1 -1
  126. package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.js +25 -7
  127. package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.js.map +1 -1
  128. package/dist/esm/compliance/audit-trails/audit-actor.shared.schemas.d.ts +70 -0
  129. package/dist/esm/compliance/audit-trails/audit-actor.shared.schemas.d.ts.map +1 -1
  130. package/dist/esm/compliance/audit-trails/audit-actor.shared.schemas.js +87 -0
  131. package/dist/esm/compliance/audit-trails/audit-actor.shared.schemas.js.map +1 -1
  132. package/dist/esm/compliance/audit-trails/audit-export-projection.shared.schemas.d.ts +484 -0
  133. package/dist/esm/compliance/audit-trails/audit-export-projection.shared.schemas.d.ts.map +1 -0
  134. package/dist/esm/compliance/audit-trails/audit-export-projection.shared.schemas.js +857 -0
  135. package/dist/esm/compliance/audit-trails/audit-export-projection.shared.schemas.js.map +1 -0
  136. package/dist/esm/compliance/audit-trails/audit-log-sink.shared.schemas.d.ts +7 -0
  137. package/dist/esm/compliance/audit-trails/audit-log-sink.shared.schemas.d.ts.map +1 -1
  138. package/dist/esm/compliance/audit-trails/audit-log-sink.shared.schemas.js.map +1 -1
  139. package/dist/esm/compliance/audit-trails/audit-logs.shared.resources-config.schemas.d.ts +30 -4
  140. package/dist/esm/compliance/audit-trails/audit-logs.shared.resources-config.schemas.d.ts.map +1 -1
  141. package/dist/esm/compliance/audit-trails/audit-logs.shared.resources-config.schemas.js +29 -8
  142. package/dist/esm/compliance/audit-trails/audit-logs.shared.resources-config.schemas.js.map +1 -1
  143. package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.d.ts +37 -6
  144. package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.d.ts.map +1 -1
  145. package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.js +53 -9
  146. package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.js.map +1 -1
  147. package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.d.ts +2432 -162
  148. package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.d.ts.map +1 -1
  149. package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.js +2545 -124
  150. package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.js.map +1 -1
  151. package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.d.ts +10 -0
  152. package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.d.ts.map +1 -1
  153. package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.js +177 -7
  154. package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.js.map +1 -1
  155. package/dist/esm/compliance/documents/governed-document-interactions.shared.schemas.d.ts +463 -0
  156. package/dist/esm/compliance/documents/governed-document-interactions.shared.schemas.d.ts.map +1 -0
  157. package/dist/esm/compliance/documents/governed-document-interactions.shared.schemas.js +526 -0
  158. package/dist/esm/compliance/documents/governed-document-interactions.shared.schemas.js.map +1 -0
  159. package/dist/esm/compliance/documents/governed-documents.shared.schemas.d.ts +539 -15
  160. package/dist/esm/compliance/documents/governed-documents.shared.schemas.d.ts.map +1 -1
  161. package/dist/esm/compliance/documents/governed-documents.shared.schemas.js +402 -14
  162. package/dist/esm/compliance/documents/governed-documents.shared.schemas.js.map +1 -1
  163. package/dist/esm/compliance/documents/user-governed-document-acceptances.shared.resources-config.schemas.d.ts +18 -0
  164. package/dist/esm/compliance/documents/user-governed-document-acceptances.shared.resources-config.schemas.d.ts.map +1 -0
  165. package/dist/esm/compliance/documents/user-governed-document-acceptances.shared.resources-config.schemas.js +89 -0
  166. package/dist/esm/compliance/documents/user-governed-document-acceptances.shared.resources-config.schemas.js.map +1 -0
  167. package/dist/esm/compliance/documents/user-governed-document-acceptances.shared.schemas.d.ts +47 -0
  168. package/dist/esm/compliance/documents/user-governed-document-acceptances.shared.schemas.d.ts.map +1 -0
  169. package/dist/esm/compliance/documents/user-governed-document-acceptances.shared.schemas.js +73 -0
  170. package/dist/esm/compliance/documents/user-governed-document-acceptances.shared.schemas.js.map +1 -0
  171. package/dist/esm/compliance/privacy/ai-use-posture.shared.schemas.d.ts +23 -0
  172. package/dist/esm/compliance/privacy/ai-use-posture.shared.schemas.d.ts.map +1 -1
  173. package/dist/esm/compliance/privacy/ai-use-posture.shared.schemas.js +41 -1
  174. package/dist/esm/compliance/privacy/ai-use-posture.shared.schemas.js.map +1 -1
  175. package/dist/esm/compliance/privacy/capability-consent-purposes.shared.utils.d.ts +33 -0
  176. package/dist/esm/compliance/privacy/capability-consent-purposes.shared.utils.d.ts.map +1 -0
  177. package/dist/esm/compliance/privacy/capability-consent-purposes.shared.utils.js +30 -0
  178. package/dist/esm/compliance/privacy/capability-consent-purposes.shared.utils.js.map +1 -0
  179. package/dist/esm/compliance/privacy/client-storage.shared.schemas.d.ts +6 -5
  180. package/dist/esm/compliance/privacy/client-storage.shared.schemas.d.ts.map +1 -1
  181. package/dist/esm/compliance/privacy/client-storage.shared.schemas.js +15 -5
  182. package/dist/esm/compliance/privacy/client-storage.shared.schemas.js.map +1 -1
  183. package/dist/esm/compliance/privacy/consent-gate-vocabulary.shared.schemas.d.ts +127 -0
  184. package/dist/esm/compliance/privacy/consent-gate-vocabulary.shared.schemas.d.ts.map +1 -0
  185. package/dist/esm/compliance/privacy/consent-gate-vocabulary.shared.schemas.js +94 -0
  186. package/dist/esm/compliance/privacy/consent-gate-vocabulary.shared.schemas.js.map +1 -0
  187. package/dist/esm/compliance/privacy/consent-purposes.shared.d.ts +125 -0
  188. package/dist/esm/compliance/privacy/consent-purposes.shared.d.ts.map +1 -0
  189. package/dist/esm/compliance/privacy/consent-purposes.shared.js +136 -0
  190. package/dist/esm/compliance/privacy/consent-purposes.shared.js.map +1 -0
  191. package/dist/esm/compliance/privacy/data-retention.shared.schemas.d.ts +0 -8
  192. package/dist/esm/compliance/privacy/data-retention.shared.schemas.d.ts.map +0 -1
  193. package/dist/esm/compliance/privacy/data-retention.shared.schemas.js.map +0 -1
  194. package/dist/esm/compliance/privacy/data-subject-rights.shared.schemas.d.ts +100 -0
  195. package/dist/esm/compliance/privacy/data-subject-rights.shared.schemas.d.ts.map +1 -0
  196. package/dist/esm/compliance/privacy/data-subject-rights.shared.schemas.js +146 -0
  197. package/dist/esm/compliance/privacy/data-subject-rights.shared.schemas.js.map +1 -0
  198. package/dist/esm/compliance/privacy/impersonalization-scrub.shared.utils.d.ts.map +1 -1
  199. package/dist/esm/compliance/privacy/impersonalization.shared.schemas.d.ts +38 -0
  200. package/dist/esm/compliance/privacy/impersonalization.shared.schemas.d.ts.map +1 -1
  201. package/dist/esm/compliance/privacy/impersonalization.shared.schemas.js +39 -0
  202. package/dist/esm/compliance/privacy/impersonalization.shared.schemas.js.map +1 -1
  203. package/dist/esm/compliance/privacy/legal-hold-subject-attribution.shared.utils.d.ts +35 -0
  204. package/dist/esm/compliance/privacy/legal-hold-subject-attribution.shared.utils.d.ts.map +1 -0
  205. package/dist/esm/compliance/privacy/legal-hold-subject-attribution.shared.utils.js +82 -0
  206. package/dist/esm/compliance/privacy/legal-hold-subject-attribution.shared.utils.js.map +1 -0
  207. package/dist/esm/compliance/privacy/legal-holds.shared.resources-config.schemas.d.ts +37 -0
  208. package/dist/esm/compliance/privacy/legal-holds.shared.resources-config.schemas.d.ts.map +1 -0
  209. package/dist/esm/compliance/privacy/legal-holds.shared.resources-config.schemas.js +223 -0
  210. package/dist/esm/compliance/privacy/legal-holds.shared.resources-config.schemas.js.map +1 -0
  211. package/dist/esm/compliance/privacy/legal-holds.shared.schemas.d.ts +222 -0
  212. package/dist/esm/compliance/privacy/legal-holds.shared.schemas.d.ts.map +1 -0
  213. package/dist/esm/compliance/privacy/legal-holds.shared.schemas.js +331 -0
  214. package/dist/esm/compliance/privacy/legal-holds.shared.schemas.js.map +1 -0
  215. package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.d.ts.map +1 -1
  216. package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.js.map +1 -1
  217. package/dist/esm/compliance/privacy/operator-compliance-identity.shared.schemas.d.ts +105 -28
  218. package/dist/esm/compliance/privacy/operator-compliance-identity.shared.schemas.d.ts.map +1 -1
  219. package/dist/esm/compliance/privacy/operator-compliance-identity.shared.schemas.js +107 -26
  220. package/dist/esm/compliance/privacy/operator-compliance-identity.shared.schemas.js.map +1 -1
  221. package/dist/esm/compliance/privacy/personal-data-category.shared.schemas.d.ts.map +1 -1
  222. package/dist/esm/compliance/privacy/personal-data-declaration.shared.utils.d.ts.map +1 -1
  223. package/dist/esm/compliance/privacy/privacy.shared.schemas.d.ts +9 -17
  224. package/dist/esm/compliance/privacy/privacy.shared.schemas.d.ts.map +1 -1
  225. package/dist/esm/compliance/privacy/privacy.shared.schemas.js +74 -31
  226. package/dist/esm/compliance/privacy/privacy.shared.schemas.js.map +1 -1
  227. package/dist/esm/compliance/privacy/provider-capability-disclosure.shared.schemas.d.ts +52 -0
  228. package/dist/esm/compliance/privacy/provider-capability-disclosure.shared.schemas.d.ts.map +1 -0
  229. package/dist/esm/compliance/privacy/provider-capability-disclosure.shared.schemas.js +116 -0
  230. package/dist/esm/compliance/privacy/provider-capability-disclosure.shared.schemas.js.map +1 -0
  231. package/dist/esm/compliance/privacy/purpose-ref.shared.schemas.d.ts +11 -0
  232. package/dist/esm/compliance/privacy/purpose-ref.shared.schemas.d.ts.map +1 -0
  233. package/dist/esm/compliance/privacy/purpose-ref.shared.schemas.js +11 -0
  234. package/dist/esm/compliance/privacy/purpose-ref.shared.schemas.js.map +1 -0
  235. package/dist/esm/compliance/privacy/redaction.shared.schemas.d.ts.map +1 -1
  236. package/dist/esm/compliance/privacy/redaction.shared.schemas.js.map +1 -1
  237. package/dist/esm/compliance/privacy/retention-binding.shared.utils.d.ts +93 -0
  238. package/dist/esm/compliance/privacy/retention-binding.shared.utils.d.ts.map +1 -0
  239. package/dist/esm/compliance/privacy/retention-binding.shared.utils.js +149 -0
  240. package/dist/esm/compliance/privacy/retention-binding.shared.utils.js.map +1 -0
  241. package/dist/esm/compliance/privacy/retention-enforcement-records.shared.resources-config.schemas.d.ts +43 -0
  242. package/dist/esm/compliance/privacy/retention-enforcement-records.shared.resources-config.schemas.d.ts.map +1 -0
  243. package/dist/esm/compliance/privacy/retention-enforcement-records.shared.resources-config.schemas.js +106 -0
  244. package/dist/esm/compliance/privacy/retention-enforcement-records.shared.resources-config.schemas.js.map +1 -0
  245. package/dist/esm/compliance/privacy/retention-enforcement-records.shared.schemas.d.ts +209 -0
  246. package/dist/esm/compliance/privacy/retention-enforcement-records.shared.schemas.d.ts.map +1 -0
  247. package/dist/esm/compliance/privacy/retention-enforcement-records.shared.schemas.js +226 -0
  248. package/dist/esm/compliance/privacy/retention-enforcement-records.shared.schemas.js.map +1 -0
  249. package/dist/esm/compliance/privacy/retention-schedule.shared.schemas.d.ts +129 -5
  250. package/dist/esm/compliance/privacy/retention-schedule.shared.schemas.d.ts.map +1 -1
  251. package/dist/esm/compliance/privacy/retention-schedule.shared.schemas.js +128 -4
  252. package/dist/esm/compliance/privacy/retention-schedule.shared.schemas.js.map +1 -1
  253. package/dist/esm/compliance/privacy/retention-scope-deleted.shared.utils.d.ts +53 -0
  254. package/dist/esm/compliance/privacy/retention-scope-deleted.shared.utils.d.ts.map +1 -0
  255. package/dist/esm/compliance/privacy/retention-scope-deleted.shared.utils.js +74 -0
  256. package/dist/esm/compliance/privacy/retention-scope-deleted.shared.utils.js.map +1 -0
  257. package/dist/esm/compliance/privacy/subject-data-recipients.shared.schemas.d.ts +311 -0
  258. package/dist/esm/compliance/privacy/subject-data-recipients.shared.schemas.d.ts.map +1 -0
  259. package/dist/esm/compliance/privacy/subject-data-recipients.shared.schemas.js +355 -0
  260. package/dist/esm/compliance/privacy/subject-data-recipients.shared.schemas.js.map +1 -0
  261. package/dist/esm/compliance/privacy/subject-erasure-lane-evidence.shared.schemas.d.ts +47 -0
  262. package/dist/esm/compliance/privacy/subject-erasure-lane-evidence.shared.schemas.d.ts.map +1 -0
  263. package/dist/esm/compliance/privacy/subject-erasure-lane-evidence.shared.schemas.js +98 -0
  264. package/dist/esm/compliance/privacy/subject-erasure-lane-evidence.shared.schemas.js.map +1 -0
  265. package/dist/esm/compliance/privacy/subject-erasure.shared.schemas.d.ts +507 -35
  266. package/dist/esm/compliance/privacy/subject-erasure.shared.schemas.d.ts.map +1 -1
  267. package/dist/esm/compliance/privacy/subject-erasure.shared.schemas.js +513 -17
  268. package/dist/esm/compliance/privacy/subject-erasure.shared.schemas.js.map +1 -1
  269. package/dist/esm/compliance/privacy/subject-export-render.shared.utils.d.ts.map +1 -1
  270. package/dist/esm/compliance/privacy/subject-export-render.shared.utils.js +26 -0
  271. package/dist/esm/compliance/privacy/subject-export-render.shared.utils.js.map +1 -1
  272. package/dist/esm/compliance/privacy/subject-export.shared.schemas.d.ts +9 -0
  273. package/dist/esm/compliance/privacy/subject-export.shared.schemas.d.ts.map +1 -1
  274. package/dist/esm/compliance/privacy/subject-export.shared.schemas.js.map +1 -1
  275. package/dist/esm/compliance/review-cadence.shared.schemas.d.ts +56 -0
  276. package/dist/esm/compliance/review-cadence.shared.schemas.d.ts.map +1 -0
  277. package/dist/esm/compliance/review-cadence.shared.schemas.js +71 -0
  278. package/dist/esm/compliance/review-cadence.shared.schemas.js.map +1 -0
  279. package/dist/esm/compliance/risk-posture.shared.schemas.d.ts +161 -0
  280. package/dist/esm/compliance/risk-posture.shared.schemas.d.ts.map +1 -0
  281. package/dist/esm/compliance/risk-posture.shared.schemas.js +166 -0
  282. package/dist/esm/compliance/risk-posture.shared.schemas.js.map +1 -0
  283. package/dist/esm/config/analytics-value-moments.shared.schemas.d.ts +4 -3
  284. package/dist/esm/config/analytics-value-moments.shared.schemas.d.ts.map +1 -1
  285. package/dist/esm/config/analytics-value-moments.shared.schemas.js +4 -3
  286. package/dist/esm/config/analytics-value-moments.shared.schemas.js.map +1 -1
  287. package/dist/esm/config/app-configuration-shared.shared.schemas.d.ts +331 -10
  288. package/dist/esm/config/app-configuration-shared.shared.schemas.d.ts.map +1 -1
  289. package/dist/esm/config/app-configuration-shared.shared.schemas.js +289 -9
  290. package/dist/esm/config/app-configuration-shared.shared.schemas.js.map +1 -1
  291. package/dist/esm/config/auth-config-resolution.shared.utils.d.ts +75 -3
  292. package/dist/esm/config/auth-config-resolution.shared.utils.d.ts.map +1 -1
  293. package/dist/esm/config/auth-config-resolution.shared.utils.js +93 -4
  294. package/dist/esm/config/auth-config-resolution.shared.utils.js.map +1 -1
  295. package/dist/esm/config/brand-assets.shared.schemas.d.ts +5 -4
  296. package/dist/esm/config/brand-assets.shared.schemas.d.ts.map +1 -1
  297. package/dist/esm/config/brand-assets.shared.schemas.js +14 -4
  298. package/dist/esm/config/brand-assets.shared.schemas.js.map +1 -1
  299. package/dist/esm/config/entity-identity-config.shared.schemas.d.ts +532 -19
  300. package/dist/esm/config/entity-identity-config.shared.schemas.d.ts.map +1 -1
  301. package/dist/esm/config/entity-identity-config.shared.schemas.js +628 -28
  302. package/dist/esm/config/entity-identity-config.shared.schemas.js.map +1 -1
  303. package/dist/esm/config/frontend/chart-definition.shared.schemas.d.ts +32 -32
  304. package/dist/esm/config/frontend/chart-definition.shared.schemas.d.ts.map +1 -1
  305. package/dist/esm/config/frontend/chart-registration-alignment.shared.d.ts.map +1 -1
  306. package/dist/esm/config/frontend/chart-registration-alignment.shared.js.map +1 -1
  307. package/dist/esm/config/frontend/navigation.shared.schemas.d.ts +180 -77
  308. package/dist/esm/config/frontend/navigation.shared.schemas.d.ts.map +1 -1
  309. package/dist/esm/config/frontend/navigation.shared.schemas.js +354 -104
  310. package/dist/esm/config/frontend/navigation.shared.schemas.js.map +1 -1
  311. package/dist/esm/config/frontend/onboarding.shared.schemas.d.ts +90 -133
  312. package/dist/esm/config/frontend/onboarding.shared.schemas.d.ts.map +1 -1
  313. package/dist/esm/config/frontend/onboarding.shared.schemas.js +148 -100
  314. package/dist/esm/config/frontend/onboarding.shared.schemas.js.map +1 -1
  315. package/dist/esm/config/registration-acquisition-policy.shared.utils.d.ts.map +1 -1
  316. package/dist/esm/config-authoring.entry.d.ts.map +1 -1
  317. package/dist/esm/crdt/crdt-merge.shared.utils.d.ts.map +1 -1
  318. package/dist/esm/data-seeding/data-seeding-config.shared.schemas.d.ts.map +1 -1
  319. package/dist/esm/errors/caught-error-description.shared.utils.d.ts +69 -0
  320. package/dist/esm/errors/caught-error-description.shared.utils.d.ts.map +1 -0
  321. package/dist/esm/errors/caught-error-description.shared.utils.js +77 -0
  322. package/dist/esm/errors/caught-error-description.shared.utils.js.map +1 -0
  323. package/dist/esm/errors/errors.custom-message-ref.shared.definitions.d.ts +212 -42
  324. package/dist/esm/errors/errors.custom-message-ref.shared.definitions.d.ts.map +1 -1
  325. package/dist/esm/errors/errors.custom-message-ref.shared.definitions.js +214 -41
  326. package/dist/esm/errors/errors.custom-message-ref.shared.definitions.js.map +1 -1
  327. package/dist/esm/errors/errors.shared.definitions.d.ts.map +1 -1
  328. package/dist/esm/errors/errors.shared.definitions.js +1 -1
  329. package/dist/esm/errors/errors.shared.definitions.js.map +1 -1
  330. package/dist/esm/errors/errors.shared.schemas.d.ts +49 -41
  331. package/dist/esm/errors/errors.shared.schemas.d.ts.map +1 -1
  332. package/dist/esm/errors/errors.shared.schemas.js +52 -62
  333. package/dist/esm/errors/errors.shared.schemas.js.map +1 -1
  334. package/dist/esm/errors/errors.shared.utils.d.ts.map +1 -1
  335. package/dist/esm/errors/thrown-value-description.shared.utils.d.ts +26 -0
  336. package/dist/esm/errors/thrown-value-description.shared.utils.d.ts.map +1 -0
  337. package/dist/esm/errors/thrown-value-description.shared.utils.js +66 -0
  338. package/dist/esm/errors/thrown-value-description.shared.utils.js.map +1 -0
  339. package/dist/esm/external-data/external-data-pipeline-description.shared.d.ts +70 -0
  340. package/dist/esm/external-data/external-data-pipeline-description.shared.d.ts.map +1 -0
  341. package/dist/esm/external-data/external-data-pipeline-description.shared.js +92 -0
  342. package/dist/esm/external-data/external-data-pipeline-description.shared.js.map +1 -0
  343. package/dist/esm/external-data/external-data-pipeline-pass-mode.shared.d.ts +154 -0
  344. package/dist/esm/external-data/external-data-pipeline-pass-mode.shared.d.ts.map +1 -0
  345. package/dist/esm/external-data/external-data-pipeline-pass-mode.shared.js +161 -0
  346. package/dist/esm/external-data/external-data-pipeline-pass-mode.shared.js.map +1 -0
  347. package/dist/esm/external-data/external-data-pipeline.shared.schemas.d.ts +1118 -95
  348. package/dist/esm/external-data/external-data-pipeline.shared.schemas.d.ts.map +1 -1
  349. package/dist/esm/external-data/external-data-pipeline.shared.schemas.js +1166 -24
  350. package/dist/esm/external-data/external-data-pipeline.shared.schemas.js.map +1 -1
  351. package/dist/esm/external-data/external-data-provenance.shared.d.ts +71 -0
  352. package/dist/esm/external-data/external-data-provenance.shared.d.ts.map +1 -0
  353. package/dist/esm/external-data/external-data-provenance.shared.js +88 -0
  354. package/dist/esm/external-data/external-data-provenance.shared.js.map +1 -0
  355. package/dist/esm/external-data.exports.d.ts +6 -0
  356. package/dist/esm/external-data.exports.d.ts.map +1 -1
  357. package/dist/esm/external-data.exports.js +12 -0
  358. package/dist/esm/external-data.exports.js.map +1 -1
  359. package/dist/esm/external-providers/compose-provider-registry.shared.d.ts.map +1 -1
  360. package/dist/esm/external-providers/engine-capabilities.shared.schemas.d.ts +28 -14
  361. package/dist/esm/external-providers/engine-capabilities.shared.schemas.d.ts.map +1 -1
  362. package/dist/esm/external-providers/engine-capabilities.shared.schemas.js +33 -16
  363. package/dist/esm/external-providers/engine-capabilities.shared.schemas.js.map +1 -1
  364. package/dist/esm/external-providers/engine-capability-resolution-mode.shared.d.ts +5 -3
  365. package/dist/esm/external-providers/engine-capability-resolution-mode.shared.d.ts.map +1 -1
  366. package/dist/esm/external-providers/engine-capability-resolution-mode.shared.js +8 -3
  367. package/dist/esm/external-providers/engine-capability-resolution-mode.shared.js.map +1 -1
  368. package/dist/esm/external-providers/engine-capability-surface.shared.d.ts +77 -0
  369. package/dist/esm/external-providers/engine-capability-surface.shared.d.ts.map +1 -0
  370. package/dist/esm/external-providers/engine-capability-surface.shared.js +175 -0
  371. package/dist/esm/external-providers/engine-capability-surface.shared.js.map +1 -0
  372. package/dist/esm/external-providers/external-providers.shared.schemas.d.ts +2 -0
  373. package/dist/esm/external-providers/external-providers.shared.schemas.d.ts.map +1 -1
  374. package/dist/esm/external-providers/external-providers.shared.schemas.js +21 -0
  375. package/dist/esm/external-providers/external-providers.shared.schemas.js.map +1 -1
  376. package/dist/esm/external-providers/frontend-bootstrap.shared.schemas.d.ts +281 -10
  377. package/dist/esm/external-providers/frontend-bootstrap.shared.schemas.d.ts.map +1 -1
  378. package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.d.ts +115 -0
  379. package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.d.ts.map +1 -1
  380. package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.js +149 -0
  381. package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.js.map +1 -1
  382. package/dist/esm/external-providers/frontend-capability-runtime.shared.types.d.ts +45 -0
  383. package/dist/esm/external-providers/frontend-capability-runtime.shared.types.d.ts.map +1 -1
  384. package/dist/esm/external-providers/frontend-capability-runtime.shared.types.js +14 -0
  385. package/dist/esm/external-providers/frontend-capability-runtime.shared.types.js.map +1 -1
  386. package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.d.ts +242 -7
  387. package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.d.ts.map +1 -1
  388. package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.js +127 -3
  389. package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.js.map +1 -1
  390. package/dist/esm/external-providers/frontend-provider-public-config.shared.d.ts +187 -36
  391. package/dist/esm/external-providers/frontend-provider-public-config.shared.d.ts.map +1 -1
  392. package/dist/esm/external-providers/frontend-provider-public-config.shared.js +261 -47
  393. package/dist/esm/external-providers/frontend-provider-public-config.shared.js.map +1 -1
  394. package/dist/esm/external-providers/model-cost-accounting-config.shared.schemas.d.ts +53 -0
  395. package/dist/esm/external-providers/model-cost-accounting-config.shared.schemas.d.ts.map +1 -0
  396. package/dist/esm/external-providers/model-cost-accounting-config.shared.schemas.js +41 -0
  397. package/dist/esm/external-providers/model-cost-accounting-config.shared.schemas.js.map +1 -0
  398. package/dist/esm/external-providers/provider-address-lookup-contract.shared.types.d.ts +150 -0
  399. package/dist/esm/external-providers/provider-address-lookup-contract.shared.types.d.ts.map +1 -0
  400. package/dist/esm/external-providers/provider-address-lookup-contract.shared.types.js +22 -0
  401. package/dist/esm/external-providers/provider-address-lookup-contract.shared.types.js.map +1 -0
  402. package/dist/esm/external-providers/provider-augmentation-opt-ins.shared.schemas.d.ts +42 -0
  403. package/dist/esm/external-providers/provider-augmentation-opt-ins.shared.schemas.d.ts.map +1 -0
  404. package/dist/esm/external-providers/provider-augmentation-opt-ins.shared.schemas.js +49 -0
  405. package/dist/esm/external-providers/provider-augmentation-opt-ins.shared.schemas.js.map +1 -0
  406. package/dist/esm/external-providers/provider-authentication-assurance.shared.schemas.d.ts +30 -0
  407. package/dist/esm/external-providers/provider-authentication-assurance.shared.schemas.d.ts.map +1 -0
  408. package/dist/esm/external-providers/provider-authentication-assurance.shared.schemas.js +32 -0
  409. package/dist/esm/external-providers/provider-authentication-assurance.shared.schemas.js.map +1 -0
  410. package/dist/esm/external-providers/provider-browser-operations.shared.schemas.d.ts +139 -0
  411. package/dist/esm/external-providers/provider-browser-operations.shared.schemas.d.ts.map +1 -0
  412. package/dist/esm/external-providers/provider-browser-operations.shared.schemas.js +141 -0
  413. package/dist/esm/external-providers/provider-browser-operations.shared.schemas.js.map +1 -0
  414. package/dist/esm/external-providers/provider-capability.shared.schemas.d.ts +48 -13
  415. package/dist/esm/external-providers/provider-capability.shared.schemas.d.ts.map +1 -1
  416. package/dist/esm/external-providers/provider-capability.shared.schemas.js +44 -10
  417. package/dist/esm/external-providers/provider-capability.shared.schemas.js.map +1 -1
  418. package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.d.ts +341 -4
  419. package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.d.ts.map +1 -1
  420. package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.js +270 -20
  421. package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.js.map +1 -1
  422. package/dist/esm/external-providers/provider-frontend-component-contract.shared.types.d.ts +6 -2
  423. package/dist/esm/external-providers/provider-frontend-component-contract.shared.types.d.ts.map +1 -1
  424. package/dist/esm/external-providers/provider-frontend-component-contract.shared.types.js +6 -2
  425. package/dist/esm/external-providers/provider-frontend-component-contract.shared.types.js.map +1 -1
  426. package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.d.ts +181 -6
  427. package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.d.ts.map +1 -1
  428. package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.js +132 -5
  429. package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.js.map +1 -1
  430. package/dist/esm/external-providers/provider-metadata.shared.schemas.d.ts +5 -2
  431. package/dist/esm/external-providers/provider-metadata.shared.schemas.d.ts.map +1 -1
  432. package/dist/esm/external-providers/provider-metadata.shared.schemas.js +5 -2
  433. package/dist/esm/external-providers/provider-metadata.shared.schemas.js.map +1 -1
  434. package/dist/esm/external-providers/provider-package-allow-list.shared.schemas.d.ts +42 -0
  435. package/dist/esm/external-providers/provider-package-allow-list.shared.schemas.d.ts.map +1 -0
  436. package/dist/esm/external-providers/provider-package-allow-list.shared.schemas.js +57 -0
  437. package/dist/esm/external-providers/provider-package-allow-list.shared.schemas.js.map +1 -0
  438. package/dist/esm/external-providers/provider-protocol.shared.schemas.d.ts +6 -0
  439. package/dist/esm/external-providers/provider-protocol.shared.schemas.d.ts.map +1 -1
  440. package/dist/esm/external-providers/provider-protocol.shared.schemas.js +6 -0
  441. package/dist/esm/external-providers/provider-protocol.shared.schemas.js.map +1 -1
  442. package/dist/esm/external-providers/provider-scope-reauthorization.shared.schemas.d.ts +58 -0
  443. package/dist/esm/external-providers/provider-scope-reauthorization.shared.schemas.d.ts.map +1 -0
  444. package/dist/esm/external-providers/provider-scope-reauthorization.shared.schemas.js +35 -0
  445. package/dist/esm/external-providers/provider-scope-reauthorization.shared.schemas.js.map +1 -0
  446. package/dist/esm/external-providers/provider-shared-connections.shared.schemas.d.ts +115 -0
  447. package/dist/esm/external-providers/provider-shared-connections.shared.schemas.d.ts.map +1 -0
  448. package/dist/esm/external-providers/provider-shared-connections.shared.schemas.js +137 -0
  449. package/dist/esm/external-providers/provider-shared-connections.shared.schemas.js.map +1 -0
  450. package/dist/esm/external-providers/provider-tier-rule.shared.utils.d.ts.map +1 -1
  451. package/dist/esm/external-providers/provider-tier-rule.shared.utils.js.map +1 -1
  452. package/dist/esm/external-providers/provider-usage-cost.shared.d.ts +73 -0
  453. package/dist/esm/external-providers/provider-usage-cost.shared.d.ts.map +1 -0
  454. package/dist/esm/external-providers/provider-usage-cost.shared.js +171 -0
  455. package/dist/esm/external-providers/provider-usage-cost.shared.js.map +1 -0
  456. package/dist/esm/external-providers/provider-usage-pricing.example.d.ts +12 -0
  457. package/dist/esm/external-providers/provider-usage-pricing.example.d.ts.map +1 -0
  458. package/dist/esm/external-providers/provider-usage-pricing.example.js +40 -0
  459. package/dist/esm/external-providers/provider-usage-pricing.example.js.map +1 -0
  460. package/dist/esm/external-providers/provider-usage-pricing.shared.schemas.d.ts +68 -32
  461. package/dist/esm/external-providers/provider-usage-pricing.shared.schemas.d.ts.map +1 -1
  462. package/dist/esm/external-providers/provider-usage-pricing.shared.schemas.js +63 -52
  463. package/dist/esm/external-providers/provider-usage-pricing.shared.schemas.js.map +1 -1
  464. package/dist/esm/features/application-features.shared.resources-config.schemas.d.ts +7 -5
  465. package/dist/esm/features/application-features.shared.resources-config.schemas.d.ts.map +1 -1
  466. package/dist/esm/features/application-features.shared.resources-config.schemas.js +43 -8
  467. package/dist/esm/features/application-features.shared.resources-config.schemas.js.map +1 -1
  468. package/dist/esm/features/connected-feature.example.d.ts +64 -0
  469. package/dist/esm/features/connected-feature.example.d.ts.map +1 -0
  470. package/dist/esm/features/connected-feature.example.js +87 -0
  471. package/dist/esm/features/connected-feature.example.js.map +1 -0
  472. package/dist/esm/features/core-feature-definitions.shared.d.ts.map +1 -1
  473. package/dist/esm/features/core-feature-definitions.shared.js +2 -1
  474. package/dist/esm/features/core-feature-definitions.shared.js.map +1 -1
  475. package/dist/esm/features/feature-builders.shared.d.ts.map +1 -1
  476. package/dist/esm/features/feature-builders.shared.js.map +1 -1
  477. package/dist/esm/features/feature-definition.shared.schemas.d.ts +2 -11
  478. package/dist/esm/features/feature-definition.shared.schemas.d.ts.map +1 -1
  479. package/dist/esm/features/feature-definition.shared.schemas.js +0 -12
  480. package/dist/esm/features/feature-definition.shared.schemas.js.map +1 -1
  481. package/dist/esm/features/feature-registry.shared.d.ts.map +1 -1
  482. package/dist/esm/features/feature-resolution.shared.schemas.d.ts.map +1 -1
  483. package/dist/esm/features/scope-features.shared.schemas.d.ts +74 -7
  484. package/dist/esm/features/scope-features.shared.schemas.d.ts.map +1 -1
  485. package/dist/esm/features/scope-features.shared.schemas.js +64 -5
  486. package/dist/esm/features/scope-features.shared.schemas.js.map +1 -1
  487. package/dist/esm/features/user-features.shared.resources-config.schemas.d.ts +6 -6
  488. package/dist/esm/features/user-features.shared.resources-config.schemas.d.ts.map +1 -1
  489. package/dist/esm/features/user-features.shared.resources-config.schemas.js +34 -52
  490. package/dist/esm/features/user-features.shared.resources-config.schemas.js.map +1 -1
  491. package/dist/esm/files/file-remote-reference-link.shared.schemas.d.ts.map +1 -1
  492. package/dist/esm/files/file-remote-reference-link.shared.schemas.js.map +1 -1
  493. package/dist/esm/files/file-upload-grant.shared.schemas.d.ts.map +1 -1
  494. package/dist/esm/files/file-upload-grant.shared.schemas.js.map +1 -1
  495. package/dist/esm/files/files.shared.resources-config.schemas.d.ts +3 -3
  496. package/dist/esm/files/files.shared.resources-config.schemas.d.ts.map +1 -1
  497. package/dist/esm/files/files.shared.resources-config.schemas.js +3 -3
  498. package/dist/esm/files/files.shared.resources-config.schemas.js.map +1 -1
  499. package/dist/esm/files/files.shared.schemas.d.ts.map +1 -1
  500. package/dist/esm/files/files.shared.schemas.js.map +1 -1
  501. package/dist/esm/files/files.shared.utils.d.ts.map +1 -1
  502. package/dist/esm/flows-actors/a2a-push-delivery-log.shared.resources-config.schemas.d.ts.map +1 -1
  503. package/dist/esm/flows-actors/a2a-push-delivery-log.shared.schemas.d.ts.map +1 -1
  504. package/dist/esm/flows-actors/a2a-token-budget-state.shared.resources-config.schemas.d.ts.map +1 -1
  505. package/dist/esm/flows-actors/a2a-token-budget-state.shared.schemas.d.ts.map +1 -1
  506. package/dist/esm/flows-actors/actors.shared.schemas.d.ts +279 -140
  507. package/dist/esm/flows-actors/actors.shared.schemas.d.ts.map +1 -1
  508. package/dist/esm/flows-actors/actors.shared.schemas.js +130 -2
  509. package/dist/esm/flows-actors/actors.shared.schemas.js.map +1 -1
  510. package/dist/esm/flows-actors/agent-traceability.shared.schemas.d.ts +22 -0
  511. package/dist/esm/flows-actors/agent-traceability.shared.schemas.d.ts.map +1 -1
  512. package/dist/esm/flows-actors/agent-traceability.shared.schemas.js +7 -0
  513. package/dist/esm/flows-actors/agent-traceability.shared.schemas.js.map +1 -1
  514. package/dist/esm/flows-actors/agent-work-decisions.shared.resources-config.schemas.d.ts +68 -0
  515. package/dist/esm/flows-actors/agent-work-decisions.shared.resources-config.schemas.d.ts.map +1 -0
  516. package/dist/esm/flows-actors/agent-work-decisions.shared.resources-config.schemas.js +276 -0
  517. package/dist/esm/flows-actors/agent-work-decisions.shared.resources-config.schemas.js.map +1 -0
  518. package/dist/esm/flows-actors/agent-work-decisions.shared.schemas.d.ts +468 -0
  519. package/dist/esm/flows-actors/agent-work-decisions.shared.schemas.d.ts.map +1 -0
  520. package/dist/esm/flows-actors/agent-work-decisions.shared.schemas.js +472 -0
  521. package/dist/esm/flows-actors/agent-work-decisions.shared.schemas.js.map +1 -0
  522. package/dist/esm/flows-actors/agents.shared.schemas.d.ts +3 -3
  523. package/dist/esm/flows-actors/agents.shared.schemas.d.ts.map +1 -1
  524. package/dist/esm/flows-actors/agents.shared.schemas.js +11 -5
  525. package/dist/esm/flows-actors/agents.shared.schemas.js.map +1 -1
  526. package/dist/esm/flows-actors/autonomous-agents.shared.schemas.d.ts +118 -0
  527. package/dist/esm/flows-actors/autonomous-agents.shared.schemas.d.ts.map +1 -0
  528. package/dist/esm/flows-actors/autonomous-agents.shared.schemas.js +144 -0
  529. package/dist/esm/flows-actors/autonomous-agents.shared.schemas.js.map +1 -0
  530. package/dist/esm/flows-actors/deliberation.shared.schemas.d.ts +13 -0
  531. package/dist/esm/flows-actors/deliberation.shared.schemas.d.ts.map +1 -1
  532. package/dist/esm/flows-actors/deliberation.shared.schemas.js.map +1 -1
  533. package/dist/esm/flows-actors/execution-plan-readiness.shared.utils.d.ts +45 -0
  534. package/dist/esm/flows-actors/execution-plan-readiness.shared.utils.d.ts.map +1 -0
  535. package/dist/esm/flows-actors/execution-plan-readiness.shared.utils.js +51 -0
  536. package/dist/esm/flows-actors/execution-plan-readiness.shared.utils.js.map +1 -0
  537. package/dist/esm/flows-actors/flows-actors-execution.shared.resources-config.schemas.d.ts.map +1 -1
  538. package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.d.ts +173 -8
  539. package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.d.ts.map +1 -1
  540. package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.js +269 -13
  541. package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.js.map +1 -1
  542. package/dist/esm/flows-actors/flows-actors-task.shared.resources-config.schemas.d.ts.map +1 -1
  543. package/dist/esm/flows-actors/flows-actors-task.shared.schemas.d.ts +2 -2
  544. package/dist/esm/flows-actors/flows-actors-task.shared.schemas.d.ts.map +1 -1
  545. package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.d.ts +51 -8
  546. package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.d.ts.map +1 -1
  547. package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.js +51 -11
  548. package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.js.map +1 -1
  549. package/dist/esm/flows-actors/flows-actors.configuration.shared.schemas.d.ts +0 -200
  550. package/dist/esm/flows-actors/flows-actors.configuration.shared.schemas.d.ts.map +1 -1
  551. package/dist/esm/flows-actors/flows-actors.configuration.shared.schemas.js +25 -54
  552. package/dist/esm/flows-actors/flows-actors.configuration.shared.schemas.js.map +1 -1
  553. package/dist/esm/flows-actors/flows-actors.frontend.shared.schemas.d.ts +45 -9
  554. package/dist/esm/flows-actors/flows-actors.frontend.shared.schemas.d.ts.map +1 -1
  555. package/dist/esm/flows-actors/flows-actors.frontend.shared.schemas.js +31 -6
  556. package/dist/esm/flows-actors/flows-actors.frontend.shared.schemas.js.map +1 -1
  557. package/dist/esm/flows-actors/flows-actors.io.shared.schemas.d.ts.map +1 -1
  558. package/dist/esm/flows-actors/flows-actors.io.shared.schemas.js +30 -30
  559. package/dist/esm/flows-actors/flows-actors.io.shared.schemas.js.map +1 -1
  560. package/dist/esm/flows-actors/flows-actors.system.shared.definitions.d.ts.map +1 -1
  561. package/dist/esm/flows-actors/flows-actors.system.shared.schemas.d.ts +16 -74
  562. package/dist/esm/flows-actors/flows-actors.system.shared.schemas.d.ts.map +1 -1
  563. package/dist/esm/flows-actors/flows-actors.system.shared.schemas.js +1 -2
  564. package/dist/esm/flows-actors/flows-actors.system.shared.schemas.js.map +1 -1
  565. package/dist/esm/flows-actors/flows.shared.schemas.d.ts +15 -1
  566. package/dist/esm/flows-actors/flows.shared.schemas.d.ts.map +1 -1
  567. package/dist/esm/flows-actors/flows.shared.schemas.js.map +1 -1
  568. package/dist/esm/flows-actors/human-decision.shared.schemas.d.ts +627 -0
  569. package/dist/esm/flows-actors/human-decision.shared.schemas.d.ts.map +1 -0
  570. package/dist/esm/flows-actors/human-decision.shared.schemas.js +754 -0
  571. package/dist/esm/flows-actors/human-decision.shared.schemas.js.map +1 -0
  572. package/dist/esm/flows-actors/mcp-servers.shared.schemas.d.ts.map +1 -1
  573. package/dist/esm/flows-actors/mcp-servers.shared.schemas.js +4 -2
  574. package/dist/esm/flows-actors/mcp-servers.shared.schemas.js.map +1 -1
  575. package/dist/esm/flows-actors/model-call-attributions.shared.resources-config.schemas.d.ts +46 -0
  576. package/dist/esm/flows-actors/model-call-attributions.shared.resources-config.schemas.d.ts.map +1 -0
  577. package/dist/esm/flows-actors/model-call-attributions.shared.resources-config.schemas.js +65 -0
  578. package/dist/esm/flows-actors/model-call-attributions.shared.resources-config.schemas.js.map +1 -0
  579. package/dist/esm/flows-actors/model-call-attributions.shared.schemas.d.ts +120 -0
  580. package/dist/esm/flows-actors/model-call-attributions.shared.schemas.d.ts.map +1 -0
  581. package/dist/esm/flows-actors/model-call-attributions.shared.schemas.js +165 -0
  582. package/dist/esm/flows-actors/model-call-attributions.shared.schemas.js.map +1 -0
  583. package/dist/esm/flows-actors/model-cost-period-aggregates.shared.resources-config.schemas.d.ts +45 -0
  584. package/dist/esm/flows-actors/model-cost-period-aggregates.shared.resources-config.schemas.d.ts.map +1 -0
  585. package/dist/esm/flows-actors/model-cost-period-aggregates.shared.resources-config.schemas.js +127 -0
  586. package/dist/esm/flows-actors/model-cost-period-aggregates.shared.resources-config.schemas.js.map +1 -0
  587. package/dist/esm/flows-actors/model-cost-period-aggregates.shared.schemas.d.ts +83 -0
  588. package/dist/esm/flows-actors/model-cost-period-aggregates.shared.schemas.d.ts.map +1 -0
  589. package/dist/esm/flows-actors/model-cost-period-aggregates.shared.schemas.js +97 -0
  590. package/dist/esm/flows-actors/model-cost-period-aggregates.shared.schemas.js.map +1 -0
  591. package/dist/esm/flows-actors/model-cost-summary.shared.schemas.d.ts +136 -0
  592. package/dist/esm/flows-actors/model-cost-summary.shared.schemas.d.ts.map +1 -0
  593. package/dist/esm/flows-actors/model-cost-summary.shared.schemas.js +90 -0
  594. package/dist/esm/flows-actors/model-cost-summary.shared.schemas.js.map +1 -0
  595. package/dist/esm/flows-actors/prompt-ir.shared.schemas.d.ts.map +1 -1
  596. package/dist/esm/flows-actors/provider-call-records.shared.resources-config.schemas.d.ts +28 -0
  597. package/dist/esm/flows-actors/provider-call-records.shared.resources-config.schemas.d.ts.map +1 -0
  598. package/dist/esm/flows-actors/provider-call-records.shared.resources-config.schemas.js +95 -0
  599. package/dist/esm/flows-actors/provider-call-records.shared.resources-config.schemas.js.map +1 -0
  600. package/dist/esm/flows-actors/provider-call-records.shared.schemas.d.ts +121 -0
  601. package/dist/esm/flows-actors/provider-call-records.shared.schemas.d.ts.map +1 -0
  602. package/dist/esm/flows-actors/provider-call-records.shared.schemas.js +194 -0
  603. package/dist/esm/flows-actors/provider-call-records.shared.schemas.js.map +1 -0
  604. package/dist/esm/flows-actors/review-deadlines.shared.schemas.d.ts +268 -0
  605. package/dist/esm/flows-actors/review-deadlines.shared.schemas.d.ts.map +1 -0
  606. package/dist/esm/flows-actors/review-deadlines.shared.schemas.js +576 -0
  607. package/dist/esm/flows-actors/review-deadlines.shared.schemas.js.map +1 -0
  608. package/dist/esm/flows-actors/tasks.actors.shared.schemas.d.ts +88 -81
  609. package/dist/esm/flows-actors/tasks.actors.shared.schemas.d.ts.map +1 -1
  610. package/dist/esm/flows-actors/tasks.actors.shared.schemas.js +75 -38
  611. package/dist/esm/flows-actors/tasks.actors.shared.schemas.js.map +1 -1
  612. package/dist/esm/flows-actors/work-attribution.shared.schemas.d.ts +129 -0
  613. package/dist/esm/flows-actors/work-attribution.shared.schemas.d.ts.map +1 -0
  614. package/dist/esm/flows-actors/work-attribution.shared.schemas.js +141 -0
  615. package/dist/esm/flows-actors/work-attribution.shared.schemas.js.map +1 -0
  616. package/dist/esm/frontend-definitions/frontend-notification-custom-message-ref.definitions.d.ts +22 -1
  617. package/dist/esm/frontend-definitions/frontend-notification-custom-message-ref.definitions.d.ts.map +1 -1
  618. package/dist/esm/frontend-definitions/frontend-notification-custom-message-ref.definitions.js +23 -0
  619. package/dist/esm/frontend-definitions/frontend-notification-custom-message-ref.definitions.js.map +1 -1
  620. package/dist/esm/frontend-definitions/settings-destination-ref.definitions.d.ts +167 -1
  621. package/dist/esm/frontend-definitions/settings-destination-ref.definitions.d.ts.map +1 -1
  622. package/dist/esm/frontend-definitions/settings-destination-ref.definitions.js +178 -0
  623. package/dist/esm/frontend-definitions/settings-destination-ref.definitions.js.map +1 -1
  624. package/dist/esm/guidance/guidance-flow.shared.schemas.d.ts +106 -24
  625. package/dist/esm/guidance/guidance-flow.shared.schemas.d.ts.map +1 -1
  626. package/dist/esm/guidance/guidance-flow.shared.schemas.js +152 -14
  627. package/dist/esm/guidance/guidance-flow.shared.schemas.js.map +1 -1
  628. package/dist/esm/guidance/guidance-state.shared.resources-config.schemas.d.ts.map +1 -1
  629. package/dist/esm/guidance/guidance-state.shared.schemas.d.ts.map +1 -1
  630. package/dist/esm/guidance/guidance-state.shared.schemas.js +11 -10
  631. package/dist/esm/guidance/guidance-state.shared.schemas.js.map +1 -1
  632. package/dist/esm/guidance/guidance-state.shared.utils.d.ts.map +1 -1
  633. package/dist/esm/guidance/guidance-state.shared.utils.js.map +1 -1
  634. package/dist/esm/guidance/lifecycle-config.shared.schemas.d.ts.map +1 -1
  635. package/dist/esm/guidance/lifecycle-state.shared.resources-config.schemas.d.ts.map +1 -1
  636. package/dist/esm/guidance/lifecycle-state.shared.schemas.d.ts +0 -6
  637. package/dist/esm/guidance/lifecycle-state.shared.schemas.d.ts.map +1 -1
  638. package/dist/esm/guidance/lifecycle-state.shared.schemas.js +6 -25
  639. package/dist/esm/guidance/lifecycle-state.shared.schemas.js.map +1 -1
  640. package/dist/esm/guidance/milestone-builders.shared.d.ts +4 -2
  641. package/dist/esm/guidance/milestone-builders.shared.d.ts.map +1 -1
  642. package/dist/esm/guidance/milestone-builders.shared.js +4 -2
  643. package/dist/esm/guidance/milestone-builders.shared.js.map +1 -1
  644. package/dist/esm/guidance/milestone-definition.shared.schemas.d.ts +66 -4
  645. package/dist/esm/guidance/milestone-definition.shared.schemas.d.ts.map +1 -1
  646. package/dist/esm/guidance/milestone-definition.shared.schemas.js +50 -0
  647. package/dist/esm/guidance/milestone-definition.shared.schemas.js.map +1 -1
  648. package/dist/esm/guidance/progression-presentation.shared.schemas.d.ts +71 -0
  649. package/dist/esm/guidance/progression-presentation.shared.schemas.d.ts.map +1 -0
  650. package/dist/esm/guidance/progression-presentation.shared.schemas.js +72 -0
  651. package/dist/esm/guidance/progression-presentation.shared.schemas.js.map +1 -0
  652. package/dist/esm/guidance/progression-state.shared.resources-config.schemas.d.ts +2 -0
  653. package/dist/esm/guidance/progression-state.shared.resources-config.schemas.d.ts.map +1 -1
  654. package/dist/esm/guidance/progression-state.shared.schemas.d.ts +4 -0
  655. package/dist/esm/guidance/progression-state.shared.schemas.d.ts.map +1 -1
  656. package/dist/esm/guidance/progression-state.shared.schemas.js +12 -6
  657. package/dist/esm/guidance/progression-state.shared.schemas.js.map +1 -1
  658. package/dist/esm/http-api-binding/http-api-binding-id.shared.utils.d.ts.map +1 -1
  659. package/dist/esm/http-api-binding/http-api-binding-id.shared.utils.js +2 -1
  660. package/dist/esm/http-api-binding/http-api-binding-id.shared.utils.js.map +1 -1
  661. package/dist/esm/http-api-binding/http-api-binding.shared.schemas.d.ts +730 -441
  662. package/dist/esm/http-api-binding/http-api-binding.shared.schemas.d.ts.map +1 -1
  663. package/dist/esm/http-api-binding/http-api-binding.shared.schemas.js +747 -233
  664. package/dist/esm/http-api-binding/http-api-binding.shared.schemas.js.map +1 -1
  665. package/dist/esm/http-api-binding/http-api-erasure-stance.shared.d.ts +62 -0
  666. package/dist/esm/http-api-binding/http-api-erasure-stance.shared.d.ts.map +1 -0
  667. package/dist/esm/http-api-binding/http-api-erasure-stance.shared.js +66 -0
  668. package/dist/esm/http-api-binding/http-api-erasure-stance.shared.js.map +1 -0
  669. package/dist/esm/http-api-binding/http-api-rest-write-operations.shared.schemas.d.ts +133 -0
  670. package/dist/esm/http-api-binding/http-api-rest-write-operations.shared.schemas.d.ts.map +1 -0
  671. package/dist/esm/http-api-binding/http-api-rest-write-operations.shared.schemas.js +191 -0
  672. package/dist/esm/http-api-binding/http-api-rest-write-operations.shared.schemas.js.map +1 -0
  673. package/dist/esm/http-api-binding/http-api-transport-dialect.shared.d.ts +138 -0
  674. package/dist/esm/http-api-binding/http-api-transport-dialect.shared.d.ts.map +1 -0
  675. package/dist/esm/http-api-binding/http-api-transport-dialect.shared.js +139 -0
  676. package/dist/esm/http-api-binding/http-api-transport-dialect.shared.js.map +1 -0
  677. package/dist/esm/http-api-binding/read-through-engine-anchors.shared.d.ts +38 -0
  678. package/dist/esm/http-api-binding/read-through-engine-anchors.shared.d.ts.map +1 -0
  679. package/dist/esm/http-api-binding/read-through-engine-anchors.shared.js +42 -0
  680. package/dist/esm/http-api-binding/read-through-engine-anchors.shared.js.map +1 -0
  681. package/dist/esm/i18n/application-config-vocabulary.shared.d.ts +36 -0
  682. package/dist/esm/i18n/application-config-vocabulary.shared.d.ts.map +1 -0
  683. package/dist/esm/i18n/application-config-vocabulary.shared.js +39 -0
  684. package/dist/esm/i18n/application-config-vocabulary.shared.js.map +1 -0
  685. package/dist/esm/i18n/engine-open-vocabulary-values.shared.d.ts +11 -0
  686. package/dist/esm/i18n/engine-open-vocabulary-values.shared.d.ts.map +1 -0
  687. package/dist/esm/i18n/engine-open-vocabulary-values.shared.js +14 -0
  688. package/dist/esm/i18n/engine-open-vocabulary-values.shared.js.map +1 -0
  689. package/dist/esm/i18n/engine-open-vocabulary.shared.d.ts +20 -0
  690. package/dist/esm/i18n/engine-open-vocabulary.shared.d.ts.map +1 -0
  691. package/dist/esm/i18n/engine-open-vocabulary.shared.js +21 -0
  692. package/dist/esm/i18n/engine-open-vocabulary.shared.js.map +1 -0
  693. package/dist/esm/i18n/labelling.dto.shared.schemas.d.ts.map +1 -1
  694. package/dist/esm/inbound/conversation-threads.shared.resources-config.schemas.d.ts +94 -0
  695. package/dist/esm/inbound/conversation-threads.shared.resources-config.schemas.d.ts.map +1 -0
  696. package/dist/esm/inbound/conversation-threads.shared.resources-config.schemas.js +206 -0
  697. package/dist/esm/inbound/conversation-threads.shared.resources-config.schemas.js.map +1 -0
  698. package/dist/esm/inbound/conversation-threads.shared.schemas.d.ts +169 -0
  699. package/dist/esm/inbound/conversation-threads.shared.schemas.d.ts.map +1 -0
  700. package/dist/esm/inbound/conversation-threads.shared.schemas.js +231 -0
  701. package/dist/esm/inbound/conversation-threads.shared.schemas.js.map +1 -0
  702. package/dist/esm/inbound/inbound-channels.shared.schemas.d.ts +195 -0
  703. package/dist/esm/inbound/inbound-channels.shared.schemas.d.ts.map +1 -0
  704. package/dist/esm/inbound/inbound-channels.shared.schemas.js +244 -0
  705. package/dist/esm/inbound/inbound-channels.shared.schemas.js.map +1 -0
  706. package/dist/esm/inbound/inbound-delivery.shared.resources-config.schemas.d.ts +36 -0
  707. package/dist/esm/inbound/inbound-delivery.shared.resources-config.schemas.d.ts.map +1 -0
  708. package/dist/esm/inbound/inbound-delivery.shared.resources-config.schemas.js +169 -0
  709. package/dist/esm/inbound/inbound-delivery.shared.resources-config.schemas.js.map +1 -0
  710. package/dist/esm/inbound/inbound-delivery.shared.schemas.d.ts +404 -0
  711. package/dist/esm/inbound/inbound-delivery.shared.schemas.d.ts.map +1 -0
  712. package/dist/esm/inbound/inbound-delivery.shared.schemas.js +449 -0
  713. package/dist/esm/inbound/inbound-delivery.shared.schemas.js.map +1 -0
  714. package/dist/esm/inbound/inbound-endpoint-env.shared.d.ts +46 -0
  715. package/dist/esm/inbound/inbound-endpoint-env.shared.d.ts.map +1 -0
  716. package/dist/esm/inbound/inbound-endpoint-env.shared.js +57 -0
  717. package/dist/esm/inbound/inbound-endpoint-env.shared.js.map +1 -0
  718. package/dist/esm/index.d.ts +99 -5
  719. package/dist/esm/index.d.ts.map +1 -1
  720. package/dist/esm/index.js +138 -17
  721. package/dist/esm/index.js.map +1 -1
  722. package/dist/esm/meta-workflows/actions.meta-workflows.shared.schemas.d.ts.map +1 -0
  723. package/dist/esm/meta-workflows/actions.meta-workflows.shared.schemas.js.map +1 -0
  724. package/dist/esm/meta-workflows/catalog.meta-workflows.shared.schemas.d.ts.map +1 -0
  725. package/dist/esm/meta-workflows/catalog.meta-workflows.shared.schemas.js.map +1 -0
  726. package/dist/esm/meta-workflows/coding-tasks.meta-workflows.shared.schemas.d.ts +130 -0
  727. package/dist/esm/meta-workflows/coding-tasks.meta-workflows.shared.schemas.d.ts.map +1 -0
  728. package/dist/esm/meta-workflows/coding-tasks.meta-workflows.shared.schemas.js +104 -0
  729. package/dist/esm/meta-workflows/coding-tasks.meta-workflows.shared.schemas.js.map +1 -0
  730. package/dist/esm/meta-workflows/context-selection.meta-workflows.shared.schemas.d.ts.map +1 -0
  731. package/dist/esm/meta-workflows/context-selection.meta-workflows.shared.schemas.js.map +1 -0
  732. package/dist/esm/{flows-actors/meta-workflows → meta-workflows}/decisions.meta-workflows.shared.schemas.d.ts +92 -0
  733. package/dist/esm/meta-workflows/decisions.meta-workflows.shared.schemas.d.ts.map +1 -0
  734. package/dist/esm/{flows-actors/meta-workflows → meta-workflows}/decisions.meta-workflows.shared.schemas.js +76 -0
  735. package/dist/esm/meta-workflows/decisions.meta-workflows.shared.schemas.js.map +1 -0
  736. package/dist/esm/meta-workflows/orchestration.meta-workflows.shared.schemas.d.ts +638 -0
  737. package/dist/esm/meta-workflows/orchestration.meta-workflows.shared.schemas.d.ts.map +1 -0
  738. package/dist/esm/meta-workflows/orchestration.meta-workflows.shared.schemas.js +759 -0
  739. package/dist/esm/meta-workflows/orchestration.meta-workflows.shared.schemas.js.map +1 -0
  740. package/dist/esm/{flows-actors/meta-workflows → meta-workflows}/portable-primitives.meta-workflows.shared.schemas.d.ts +15 -8
  741. package/dist/esm/meta-workflows/portable-primitives.meta-workflows.shared.schemas.d.ts.map +1 -0
  742. package/dist/esm/{flows-actors/meta-workflows → meta-workflows}/portable-primitives.meta-workflows.shared.schemas.js +15 -8
  743. package/dist/esm/meta-workflows/portable-primitives.meta-workflows.shared.schemas.js.map +1 -0
  744. package/dist/esm/meta-workflows.exports.d.ts +21 -26
  745. package/dist/esm/meta-workflows.exports.d.ts.map +1 -1
  746. package/dist/esm/meta-workflows.exports.js +21 -26
  747. package/dist/esm/meta-workflows.exports.js.map +1 -1
  748. package/dist/esm/monitoring/monitoring.shared.schemas.d.ts.map +1 -1
  749. package/dist/esm/notifications/email/email-context.shared.schemas.d.ts.map +1 -1
  750. package/dist/esm/notifications/email/email-submission.shared.enums.d.ts +16 -0
  751. package/dist/esm/notifications/email/email-submission.shared.enums.d.ts.map +1 -0
  752. package/dist/esm/notifications/email/email-submission.shared.enums.js +17 -0
  753. package/dist/esm/notifications/email/email-submission.shared.enums.js.map +1 -0
  754. package/dist/esm/notifications/email/email-template-registry.shared.schemas.d.ts +43 -1
  755. package/dist/esm/notifications/email/email-template-registry.shared.schemas.d.ts.map +1 -1
  756. package/dist/esm/notifications/email/email-template-registry.shared.schemas.js +85 -3
  757. package/dist/esm/notifications/email/email-template-registry.shared.schemas.js.map +1 -1
  758. package/dist/esm/notifications/email/email-template.shared.enums.d.ts.map +1 -1
  759. package/dist/esm/notifications/email/email-template.shared.enums.js.map +1 -1
  760. package/dist/esm/notifications/inbound-email/inbound-email.shared.resources-config.schemas.d.ts +131 -0
  761. package/dist/esm/notifications/inbound-email/inbound-email.shared.resources-config.schemas.d.ts.map +1 -0
  762. package/dist/esm/notifications/inbound-email/inbound-email.shared.resources-config.schemas.js +258 -0
  763. package/dist/esm/notifications/inbound-email/inbound-email.shared.resources-config.schemas.js.map +1 -0
  764. package/dist/esm/notifications/inbound-email/inbound-email.shared.schemas.d.ts +448 -0
  765. package/dist/esm/notifications/inbound-email/inbound-email.shared.schemas.d.ts.map +1 -0
  766. package/dist/esm/notifications/inbound-email/inbound-email.shared.schemas.js +530 -0
  767. package/dist/esm/notifications/inbound-email/inbound-email.shared.schemas.js.map +1 -0
  768. package/dist/esm/notifications/m2m/m2m-webhook-delivery-contract.shared.d.ts.map +1 -1
  769. package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.resources-config.schemas.d.ts.map +1 -1
  770. package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.resources-config.schemas.js +8 -4
  771. package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.resources-config.schemas.js.map +1 -1
  772. package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.schemas.d.ts +2 -1
  773. package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.schemas.d.ts.map +1 -1
  774. package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.schemas.js +3 -2
  775. package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.schemas.js.map +1 -1
  776. package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.d.ts +16 -1
  777. package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.d.ts.map +1 -1
  778. package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.js +86 -15
  779. package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.js.map +1 -1
  780. package/dist/esm/notifications/m2m/webhook-config.shared.schemas.d.ts +19 -12
  781. package/dist/esm/notifications/m2m/webhook-config.shared.schemas.d.ts.map +1 -1
  782. package/dist/esm/notifications/m2m/webhook-config.shared.schemas.js +77 -12
  783. package/dist/esm/notifications/m2m/webhook-config.shared.schemas.js.map +1 -1
  784. package/dist/esm/notifications/notification-badges.core.definitions.d.ts.map +1 -1
  785. package/dist/esm/notifications/notification-badges.core.definitions.js.map +1 -1
  786. package/dist/esm/notifications/notification-badges.schemas.d.ts +35 -3
  787. package/dist/esm/notifications/notification-badges.schemas.d.ts.map +1 -1
  788. package/dist/esm/notifications/notification-badges.schemas.js +43 -3
  789. package/dist/esm/notifications/notification-badges.schemas.js.map +1 -1
  790. package/dist/esm/notifications/notification-badges.shared.resources-config.schemas.d.ts +1 -1
  791. package/dist/esm/notifications/notification-badges.shared.resources-config.schemas.d.ts.map +1 -1
  792. package/dist/esm/notifications/notification-badges.shared.resources-config.schemas.js +12 -33
  793. package/dist/esm/notifications/notification-badges.shared.resources-config.schemas.js.map +1 -1
  794. package/dist/esm/notifications/notifications.shared.schemas.d.ts +85 -407
  795. package/dist/esm/notifications/notifications.shared.schemas.d.ts.map +1 -1
  796. package/dist/esm/notifications/notifications.shared.schemas.js +130 -66
  797. package/dist/esm/notifications/notifications.shared.schemas.js.map +1 -1
  798. package/dist/esm/organizations/application-owner-organization.shared.schemas.d.ts +145 -0
  799. package/dist/esm/organizations/application-owner-organization.shared.schemas.d.ts.map +1 -0
  800. package/dist/esm/organizations/application-owner-organization.shared.schemas.js +146 -0
  801. package/dist/esm/organizations/application-owner-organization.shared.schemas.js.map +1 -0
  802. package/dist/esm/organizations/organization-features.shared.resources-config.schemas.d.ts +7 -5
  803. package/dist/esm/organizations/organization-features.shared.resources-config.schemas.d.ts.map +1 -1
  804. package/dist/esm/organizations/organization-features.shared.resources-config.schemas.js +32 -9
  805. package/dist/esm/organizations/organization-features.shared.resources-config.schemas.js.map +1 -1
  806. package/dist/esm/organizations/organization-members.shared.resources-config.schemas.d.ts +4 -1
  807. package/dist/esm/organizations/organization-members.shared.resources-config.schemas.d.ts.map +1 -1
  808. package/dist/esm/organizations/organization-members.shared.resources-config.schemas.js +78 -28
  809. package/dist/esm/organizations/organization-members.shared.resources-config.schemas.js.map +1 -1
  810. package/dist/esm/organizations/organization-members.shared.schemas.d.ts +4 -1
  811. package/dist/esm/organizations/organization-members.shared.schemas.d.ts.map +1 -1
  812. package/dist/esm/organizations/organization-members.shared.schemas.js +39 -1
  813. package/dist/esm/organizations/organization-members.shared.schemas.js.map +1 -1
  814. package/dist/esm/organizations/organization-notifications.shared.resources-config.schemas.d.ts.map +1 -1
  815. package/dist/esm/organizations/organization-notifications.shared.schemas.d.ts.map +1 -1
  816. package/dist/esm/organizations/organization-notifications.shared.schemas.js +9 -9
  817. package/dist/esm/organizations/organization-notifications.shared.schemas.js.map +1 -1
  818. package/dist/esm/organizations/organization-preferences.shared.resources-config.schemas.d.ts.map +1 -1
  819. package/dist/esm/organizations/organization-preferences.shared.schemas.d.ts +2 -1
  820. package/dist/esm/organizations/organization-preferences.shared.schemas.d.ts.map +1 -1
  821. package/dist/esm/organizations/organization-preferences.shared.schemas.js +7 -4
  822. package/dist/esm/organizations/organization-preferences.shared.schemas.js.map +1 -1
  823. package/dist/esm/organizations/organization-profile.shared.resources-config.schemas.d.ts +0 -1
  824. package/dist/esm/organizations/organization-profile.shared.resources-config.schemas.d.ts.map +1 -1
  825. package/dist/esm/organizations/organization-profile.shared.schemas.d.ts +8 -6
  826. package/dist/esm/organizations/organization-profile.shared.schemas.d.ts.map +1 -1
  827. package/dist/esm/organizations/organization-profile.shared.schemas.js +19 -12
  828. package/dist/esm/organizations/organization-profile.shared.schemas.js.map +1 -1
  829. package/dist/esm/organizations/organization-unit-inheritance.shared.d.ts.map +1 -1
  830. package/dist/esm/organizations/organization-unit-members.shared.resources-config.schemas.d.ts.map +1 -1
  831. package/dist/esm/organizations/organization-unit-members.shared.resources-config.schemas.js +1 -1
  832. package/dist/esm/organizations/organization-unit-members.shared.resources-config.schemas.js.map +1 -1
  833. package/dist/esm/organizations/organization-unit-members.shared.schemas.d.ts.map +1 -1
  834. package/dist/esm/organizations/organization-unit-members.shared.schemas.js +2 -1
  835. package/dist/esm/organizations/organization-unit-members.shared.schemas.js.map +1 -1
  836. package/dist/esm/organizations/organization-unit-narrowing-decision.shared.d.ts +63 -1
  837. package/dist/esm/organizations/organization-unit-narrowing-decision.shared.d.ts.map +1 -1
  838. package/dist/esm/organizations/organization-unit-narrowing-decision.shared.js +106 -5
  839. package/dist/esm/organizations/organization-unit-narrowing-decision.shared.js.map +1 -1
  840. package/dist/esm/organizations/organization-unit-narrowing.example.d.ts.map +1 -1
  841. package/dist/esm/organizations/organization-unit-narrowing.shared.d.ts +29 -2
  842. package/dist/esm/organizations/organization-unit-narrowing.shared.d.ts.map +1 -1
  843. package/dist/esm/organizations/organization-unit-narrowing.shared.js +36 -0
  844. package/dist/esm/organizations/organization-unit-narrowing.shared.js.map +1 -1
  845. package/dist/esm/organizations/organization-units.shared.resources-config.schemas.d.ts +2 -0
  846. package/dist/esm/organizations/organization-units.shared.resources-config.schemas.d.ts.map +1 -1
  847. package/dist/esm/organizations/organization-units.shared.resources-config.schemas.js +10 -2
  848. package/dist/esm/organizations/organization-units.shared.resources-config.schemas.js.map +1 -1
  849. package/dist/esm/organizations/organization-units.shared.schemas.d.ts +17 -5
  850. package/dist/esm/organizations/organization-units.shared.schemas.d.ts.map +1 -1
  851. package/dist/esm/organizations/organization-units.shared.schemas.js +65 -5
  852. package/dist/esm/organizations/organization-units.shared.schemas.js.map +1 -1
  853. package/dist/esm/organizations/organizations.shared.resources-config.schemas.d.ts +53 -7
  854. package/dist/esm/organizations/organizations.shared.resources-config.schemas.d.ts.map +1 -1
  855. package/dist/esm/organizations/organizations.shared.resources-config.schemas.js +162 -14
  856. package/dist/esm/organizations/organizations.shared.resources-config.schemas.js.map +1 -1
  857. package/dist/esm/organizations/organizations.shared.schemas.d.ts +23 -83
  858. package/dist/esm/organizations/organizations.shared.schemas.d.ts.map +1 -1
  859. package/dist/esm/organizations/organizations.shared.schemas.js +87 -19
  860. package/dist/esm/organizations/organizations.shared.schemas.js.map +1 -1
  861. package/dist/esm/organizations/service-provider-activity-feed.shared.resources-config.schemas.d.ts +58 -0
  862. package/dist/esm/organizations/service-provider-activity-feed.shared.resources-config.schemas.d.ts.map +1 -0
  863. package/dist/esm/organizations/service-provider-activity-feed.shared.resources-config.schemas.js +188 -0
  864. package/dist/esm/organizations/service-provider-activity-feed.shared.resources-config.schemas.js.map +1 -0
  865. package/dist/esm/organizations/service-provider-activity-feed.shared.schemas.d.ts +122 -0
  866. package/dist/esm/organizations/service-provider-activity-feed.shared.schemas.d.ts.map +1 -0
  867. package/dist/esm/organizations/service-provider-activity-feed.shared.schemas.js +136 -0
  868. package/dist/esm/organizations/service-provider-activity-feed.shared.schemas.js.map +1 -0
  869. package/dist/esm/organizations/service-provider-capability-grants.shared.resources-config.schemas.d.ts +36 -0
  870. package/dist/esm/organizations/service-provider-capability-grants.shared.resources-config.schemas.d.ts.map +1 -0
  871. package/dist/esm/organizations/service-provider-capability-grants.shared.resources-config.schemas.js +155 -0
  872. package/dist/esm/organizations/service-provider-capability-grants.shared.resources-config.schemas.js.map +1 -0
  873. package/dist/esm/organizations/service-provider-capability-grants.shared.schemas.d.ts +229 -0
  874. package/dist/esm/organizations/service-provider-capability-grants.shared.schemas.d.ts.map +1 -0
  875. package/dist/esm/organizations/service-provider-capability-grants.shared.schemas.js +290 -0
  876. package/dist/esm/organizations/service-provider-capability-grants.shared.schemas.js.map +1 -0
  877. package/dist/esm/organizations/service-provider-client-controls.shared.schemas.d.ts +48 -0
  878. package/dist/esm/organizations/service-provider-client-controls.shared.schemas.d.ts.map +1 -0
  879. package/dist/esm/organizations/service-provider-client-controls.shared.schemas.js +50 -0
  880. package/dist/esm/organizations/service-provider-client-controls.shared.schemas.js.map +1 -0
  881. package/dist/esm/organizations/service-provider-relationships.shared.resources-config.schemas.d.ts +97 -0
  882. package/dist/esm/organizations/service-provider-relationships.shared.resources-config.schemas.d.ts.map +1 -0
  883. package/dist/esm/organizations/service-provider-relationships.shared.resources-config.schemas.js +572 -0
  884. package/dist/esm/organizations/service-provider-relationships.shared.resources-config.schemas.js.map +1 -0
  885. package/dist/esm/organizations/service-provider-relationships.shared.schemas.d.ts +590 -0
  886. package/dist/esm/organizations/service-provider-relationships.shared.schemas.d.ts.map +1 -0
  887. package/dist/esm/organizations/service-provider-relationships.shared.schemas.js +869 -0
  888. package/dist/esm/organizations/service-provider-relationships.shared.schemas.js.map +1 -0
  889. package/dist/esm/organizations/tenant-teardown-config.shared.schemas.d.ts +36 -6
  890. package/dist/esm/organizations/tenant-teardown-config.shared.schemas.d.ts.map +1 -1
  891. package/dist/esm/organizations/tenant-teardown-config.shared.schemas.js +57 -16
  892. package/dist/esm/organizations/tenant-teardown-config.shared.schemas.js.map +1 -1
  893. package/dist/esm/provider-registration-runtime.exports.d.ts +1 -1
  894. package/dist/esm/provider-registration-runtime.exports.d.ts.map +1 -1
  895. package/dist/esm/provider-registration-runtime.exports.js +1 -1
  896. package/dist/esm/provider-registration-runtime.exports.js.map +1 -1
  897. package/dist/esm/public-runtime/index.d.ts +65 -17
  898. package/dist/esm/public-runtime/index.d.ts.map +1 -1
  899. package/dist/esm/public-runtime/index.js +65 -17
  900. package/dist/esm/public-runtime/index.js.map +1 -1
  901. package/dist/esm/queue/jobs.shared.resources-config.schemas.d.ts +7 -8
  902. package/dist/esm/queue/jobs.shared.resources-config.schemas.d.ts.map +1 -1
  903. package/dist/esm/queue/jobs.shared.resources-config.schemas.js +30 -6
  904. package/dist/esm/queue/jobs.shared.resources-config.schemas.js.map +1 -1
  905. package/dist/esm/queue/jobs.shared.schemas.d.ts +416 -2
  906. package/dist/esm/queue/jobs.shared.schemas.d.ts.map +1 -1
  907. package/dist/esm/queue/jobs.shared.schemas.js +327 -11
  908. package/dist/esm/queue/jobs.shared.schemas.js.map +1 -1
  909. package/dist/esm/queue/jobs.shared.utils.d.ts +6 -4
  910. package/dist/esm/queue/jobs.shared.utils.d.ts.map +1 -1
  911. package/dist/esm/queue/jobs.shared.utils.js +5 -4
  912. package/dist/esm/queue/jobs.shared.utils.js.map +1 -1
  913. package/dist/esm/queue/queues.shared.schemas.d.ts +20 -8
  914. package/dist/esm/queue/queues.shared.schemas.d.ts.map +1 -1
  915. package/dist/esm/queue/queues.shared.schemas.js +23 -18
  916. package/dist/esm/queue/queues.shared.schemas.js.map +1 -1
  917. package/dist/esm/queue/queues.shared.utils.d.ts +4 -2
  918. package/dist/esm/queue/queues.shared.utils.d.ts.map +1 -1
  919. package/dist/esm/queue/queues.shared.utils.js +4 -2
  920. package/dist/esm/queue/queues.shared.utils.js.map +1 -1
  921. package/dist/esm/rag/rag-retrieval-health.shared.d.ts +27 -0
  922. package/dist/esm/rag/rag-retrieval-health.shared.d.ts.map +1 -0
  923. package/dist/esm/rag/rag-retrieval-health.shared.js +29 -0
  924. package/dist/esm/rag/rag-retrieval-health.shared.js.map +1 -0
  925. package/dist/esm/requests/header-keys.shared.d.ts +12 -0
  926. package/dist/esm/requests/header-keys.shared.d.ts.map +1 -1
  927. package/dist/esm/requests/header-keys.shared.js +14 -0
  928. package/dist/esm/requests/header-keys.shared.js.map +1 -1
  929. package/dist/esm/requests/idempotency-key.shared.d.ts +76 -0
  930. package/dist/esm/requests/idempotency-key.shared.d.ts.map +1 -0
  931. package/dist/esm/requests/idempotency-key.shared.js +112 -0
  932. package/dist/esm/requests/idempotency-key.shared.js.map +1 -0
  933. package/dist/esm/requests/manual-controllers-routes-documentation.d.ts.map +1 -1
  934. package/dist/esm/requests/manual-controllers-routes-documentation.js +365 -25
  935. package/dist/esm/requests/manual-controllers-routes-documentation.js.map +1 -1
  936. package/dist/esm/requests/manual-controllers-routes-urls.d.ts +138 -23
  937. package/dist/esm/requests/manual-controllers-routes-urls.d.ts.map +1 -1
  938. package/dist/esm/requests/manual-controllers-routes-urls.js +166 -0
  939. package/dist/esm/requests/manual-controllers-routes-urls.js.map +1 -1
  940. package/dist/esm/requests/rate-limits.shared.schemas.d.ts.map +1 -1
  941. package/dist/esm/requests/rate-limits.shared.schemas.js.map +1 -1
  942. package/dist/esm/requests/websocket.shared.schemas.d.ts +267 -26
  943. package/dist/esm/requests/websocket.shared.schemas.d.ts.map +1 -1
  944. package/dist/esm/requests/websocket.shared.schemas.js +310 -23
  945. package/dist/esm/requests/websocket.shared.schemas.js.map +1 -1
  946. package/dist/esm/resources/child-operations.shared.schemas.d.ts +56 -5
  947. package/dist/esm/resources/child-operations.shared.schemas.d.ts.map +1 -1
  948. package/dist/esm/resources/child-operations.shared.schemas.js +97 -5
  949. package/dist/esm/resources/child-operations.shared.schemas.js.map +1 -1
  950. package/dist/esm/resources/context-policy.shared.schemas.d.ts +20 -0
  951. package/dist/esm/resources/context-policy.shared.schemas.d.ts.map +1 -1
  952. package/dist/esm/resources/context-policy.shared.schemas.js +3 -0
  953. package/dist/esm/resources/context-policy.shared.schemas.js.map +1 -1
  954. package/dist/esm/resources/embedded-resource-mark.shared.utils.d.ts +21 -0
  955. package/dist/esm/resources/embedded-resource-mark.shared.utils.d.ts.map +1 -0
  956. package/dist/esm/resources/embedded-resource-mark.shared.utils.js +22 -0
  957. package/dist/esm/resources/embedded-resource-mark.shared.utils.js.map +1 -0
  958. package/dist/esm/resources/relationship-display.shared.schemas.d.ts.map +1 -1
  959. package/dist/esm/resources/resources-config.shared.factory.d.ts.map +1 -1
  960. package/dist/esm/resources/resources-config.shared.factory.js +1296 -47
  961. package/dist/esm/resources/resources-config.shared.factory.js.map +1 -1
  962. package/dist/esm/resources/resources-config.shared.schemas.d.ts +866 -92
  963. package/dist/esm/resources/resources-config.shared.schemas.d.ts.map +1 -1
  964. package/dist/esm/resources/resources-config.shared.schemas.js +460 -33
  965. package/dist/esm/resources/resources-config.shared.schemas.js.map +1 -1
  966. package/dist/esm/resources/resources-registry.shared.core.definitions.d.ts.map +1 -1
  967. package/dist/esm/resources/resources-registry.shared.core.definitions.js +730 -81
  968. package/dist/esm/resources/resources-registry.shared.core.definitions.js.map +1 -1
  969. package/dist/esm/resources/resources-relationships.shared.factory.d.ts.map +1 -1
  970. package/dist/esm/resources/resources-relationships.shared.factory.js.map +1 -1
  971. package/dist/esm/resources/resources-serialization.shared.schemas.d.ts.map +1 -1
  972. package/dist/esm/resources/resources.shared.core.definitions.d.ts +64 -0
  973. package/dist/esm/resources/resources.shared.core.definitions.d.ts.map +1 -1
  974. package/dist/esm/resources/resources.shared.core.definitions.js +120 -0
  975. package/dist/esm/resources/resources.shared.core.definitions.js.map +1 -1
  976. package/dist/esm/resources/resources.shared.schemas.d.ts +258 -27
  977. package/dist/esm/resources/resources.shared.schemas.d.ts.map +1 -1
  978. package/dist/esm/resources/resources.shared.schemas.js +233 -29
  979. package/dist/esm/resources/resources.shared.schemas.js.map +1 -1
  980. package/dist/esm/resources/resources.shared.utils.d.ts +18 -9
  981. package/dist/esm/resources/resources.shared.utils.d.ts.map +1 -1
  982. package/dist/esm/resources/resources.shared.utils.js +54 -14
  983. package/dist/esm/resources/resources.shared.utils.js.map +1 -1
  984. package/dist/esm/resources/utils/collection-export.shared.utils.d.ts +2 -2
  985. package/dist/esm/resources/utils/collection-export.shared.utils.d.ts.map +1 -1
  986. package/dist/esm/resources/utils/collection-export.shared.utils.js +4 -2
  987. package/dist/esm/resources/utils/collection-export.shared.utils.js.map +1 -1
  988. package/dist/esm/resources/utils/composition-cascade-deletability.validation.d.ts +44 -12
  989. package/dist/esm/resources/utils/composition-cascade-deletability.validation.d.ts.map +1 -1
  990. package/dist/esm/resources/utils/composition-cascade-deletability.validation.js +46 -23
  991. package/dist/esm/resources/utils/composition-cascade-deletability.validation.js.map +1 -1
  992. package/dist/esm/resources/utils/composition-seedability.validation.d.ts.map +1 -1
  993. package/dist/esm/resources/utils/context-addressed-composition-singleton.shared.utils.d.ts.map +1 -1
  994. package/dist/esm/resources/utils/dependent-lifecycle-classification.validation.d.ts +61 -0
  995. package/dist/esm/resources/utils/dependent-lifecycle-classification.validation.d.ts.map +1 -0
  996. package/dist/esm/resources/utils/dependent-lifecycle-classification.validation.js +79 -0
  997. package/dist/esm/resources/utils/dependent-lifecycle-classification.validation.js.map +1 -0
  998. package/dist/esm/resources/utils/duplicate-relationship-registration.validation.d.ts.map +1 -1
  999. package/dist/esm/resources/utils/field-value-disclosure.utils.d.ts.map +1 -1
  1000. package/dist/esm/resources/utils/field-value-disclosure.utils.js.map +1 -1
  1001. package/dist/esm/resources/utils/http-api-write-declaration.shared.utils.d.ts +103 -0
  1002. package/dist/esm/resources/utils/http-api-write-declaration.shared.utils.d.ts.map +1 -0
  1003. package/dist/esm/resources/utils/http-api-write-declaration.shared.utils.js +275 -0
  1004. package/dist/esm/resources/utils/http-api-write-declaration.shared.utils.js.map +1 -0
  1005. package/dist/esm/resources/utils/initiator-stamped-field-satisfiability.validation.d.ts +60 -0
  1006. package/dist/esm/resources/utils/initiator-stamped-field-satisfiability.validation.d.ts.map +1 -0
  1007. package/dist/esm/resources/utils/initiator-stamped-field-satisfiability.validation.js +80 -0
  1008. package/dist/esm/resources/utils/initiator-stamped-field-satisfiability.validation.js.map +1 -0
  1009. package/dist/esm/resources/utils/no-subject-data-stance-coherence.shared.utils.d.ts +51 -0
  1010. package/dist/esm/resources/utils/no-subject-data-stance-coherence.shared.utils.d.ts.map +1 -0
  1011. package/dist/esm/resources/utils/no-subject-data-stance-coherence.shared.utils.js +28 -0
  1012. package/dist/esm/resources/utils/no-subject-data-stance-coherence.shared.utils.js.map +1 -0
  1013. package/dist/esm/resources/utils/persistence-adapter-discrimination.shared.utils.d.ts.map +1 -1
  1014. package/dist/esm/resources/utils/populated-file-fields.shared.utils.d.ts +21 -0
  1015. package/dist/esm/resources/utils/populated-file-fields.shared.utils.d.ts.map +1 -0
  1016. package/dist/esm/resources/utils/populated-file-fields.shared.utils.js +170 -0
  1017. package/dist/esm/resources/utils/populated-file-fields.shared.utils.js.map +1 -0
  1018. package/dist/esm/resources/utils/repository-dto-builder.utils.d.ts.map +1 -1
  1019. package/dist/esm/resources/utils/request-schema-field-carriage.shared.utils.d.ts +2 -0
  1020. package/dist/esm/resources/utils/request-schema-field-carriage.shared.utils.d.ts.map +1 -0
  1021. package/dist/esm/resources/utils/request-schema-field-carriage.shared.utils.js +33 -0
  1022. package/dist/esm/resources/utils/request-schema-field-carriage.shared.utils.js.map +1 -0
  1023. package/dist/esm/resources/utils/required-fk-fillability.validation.d.ts.map +1 -1
  1024. package/dist/esm/resources/utils/resource-operation-type-guards.utils.d.ts.map +1 -1
  1025. package/dist/esm/resources/utils/resource-polymorphism.factory.d.ts +15 -0
  1026. package/dist/esm/resources/utils/resource-polymorphism.factory.d.ts.map +1 -1
  1027. package/dist/esm/resources/utils/resource-polymorphism.factory.js +6 -1
  1028. package/dist/esm/resources/utils/resource-polymorphism.factory.js.map +1 -1
  1029. package/dist/esm/resources/utils/resource-polymorphism.relationships.d.ts.map +1 -1
  1030. package/dist/esm/resources/utils/resource-polymorphism.schemas.d.ts.map +1 -1
  1031. package/dist/esm/resources/utils/resource-polymorphism.schemas.js +30 -4
  1032. package/dist/esm/resources/utils/resource-polymorphism.schemas.js.map +1 -1
  1033. package/dist/esm/resources/utils/resource-polymorphism.utils.d.ts.map +1 -1
  1034. package/dist/esm/resources/utils/resource-subtree.utils.d.ts.map +1 -1
  1035. package/dist/esm/resources/utils/resources-config-context-needs.utils.d.ts.map +1 -1
  1036. package/dist/esm/resources/utils/resources-config-naming.utils.d.ts +15 -0
  1037. package/dist/esm/resources/utils/resources-config-naming.utils.d.ts.map +1 -1
  1038. package/dist/esm/resources/utils/resources-config-naming.utils.js +56 -11
  1039. package/dist/esm/resources/utils/resources-config-naming.utils.js.map +1 -1
  1040. package/dist/esm/resources/utils/resources-config-operations.dtos-builder.utils.d.ts +97 -1
  1041. package/dist/esm/resources/utils/resources-config-operations.dtos-builder.utils.d.ts.map +1 -1
  1042. package/dist/esm/resources/utils/resources-config-operations.dtos-builder.utils.js +402 -60
  1043. package/dist/esm/resources/utils/resources-config-operations.dtos-builder.utils.js.map +1 -1
  1044. package/dist/esm/resources/utils/resources-config-operations.path.utils.d.ts.map +1 -1
  1045. package/dist/esm/resources/utils/resources-config-operations.urls-builder.utils.d.ts +34 -0
  1046. package/dist/esm/resources/utils/resources-config-operations.urls-builder.utils.d.ts.map +1 -1
  1047. package/dist/esm/resources/utils/resources-config-operations.urls-builder.utils.js +45 -1
  1048. package/dist/esm/resources/utils/resources-config-operations.urls-builder.utils.js.map +1 -1
  1049. package/dist/esm/resources/utils/resources-config-operations.utils.d.ts.map +1 -1
  1050. package/dist/esm/resources/utils/resources-serialization.utils.d.ts +19 -2
  1051. package/dist/esm/resources/utils/resources-serialization.utils.d.ts.map +1 -1
  1052. package/dist/esm/resources/utils/resources-serialization.utils.js +4 -0
  1053. package/dist/esm/resources/utils/resources-serialization.utils.js.map +1 -1
  1054. package/dist/esm/resources/utils/resources-summary.utils.d.ts.map +1 -1
  1055. package/dist/esm/resources/utils/resources-summary.utils.js.map +1 -1
  1056. package/dist/esm/resources/utils/schema-family-builder.utils.d.ts.map +1 -1
  1057. package/dist/esm/resources/utils/schema-type-inference.utils.d.ts.map +1 -1
  1058. package/dist/esm/resources/utils/schema-type-utils.d.ts.map +1 -1
  1059. package/dist/esm/resources/utils/schema-variant-resolver.utils.d.ts.map +1 -1
  1060. package/dist/esm/resources/utils/shared-persistence-collection.utils.d.ts +29 -0
  1061. package/dist/esm/resources/utils/shared-persistence-collection.utils.d.ts.map +1 -1
  1062. package/dist/esm/resources/utils/shared-persistence-collection.utils.js +45 -9
  1063. package/dist/esm/resources/utils/shared-persistence-collection.utils.js.map +1 -1
  1064. package/dist/esm/resources/utils/templatable-file-fields.shared.utils.d.ts.map +1 -1
  1065. package/dist/esm/resources/utils/templatable-file-fields.shared.utils.js +49 -11
  1066. package/dist/esm/resources/utils/templatable-file-fields.shared.utils.js.map +1 -1
  1067. package/dist/esm/resources/work-unit.shared.schemas.d.ts +20 -0
  1068. package/dist/esm/resources/work-unit.shared.schemas.d.ts.map +1 -0
  1069. package/dist/esm/resources/work-unit.shared.schemas.js +19 -0
  1070. package/dist/esm/resources/work-unit.shared.schemas.js.map +1 -0
  1071. package/dist/esm/runtime/domain-module.shared.definitions.d.ts.map +1 -1
  1072. package/dist/esm/runtime/domain-module.shared.definitions.js.map +1 -1
  1073. package/dist/esm/runtime/execution-context.shared.schemas.d.ts +48 -1
  1074. package/dist/esm/runtime/execution-context.shared.schemas.d.ts.map +1 -1
  1075. package/dist/esm/runtime/execution-context.shared.schemas.js +101 -9
  1076. package/dist/esm/runtime/execution-context.shared.schemas.js.map +1 -1
  1077. package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.d.ts +1 -0
  1078. package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.d.ts.map +1 -1
  1079. package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.js +41 -21
  1080. package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.js.map +1 -1
  1081. package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.d.ts +1 -0
  1082. package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.d.ts.map +1 -1
  1083. package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.js +65 -49
  1084. package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.js.map +1 -1
  1085. package/dist/esm/security/api-keys/api-keys.shared.schemas.d.ts +26 -0
  1086. package/dist/esm/security/api-keys/api-keys.shared.schemas.d.ts.map +1 -1
  1087. package/dist/esm/security/api-keys/api-keys.shared.schemas.js +39 -5
  1088. package/dist/esm/security/api-keys/api-keys.shared.schemas.js.map +1 -1
  1089. package/dist/esm/security/authentications/anonymous-session/anonymous-session.shared.contract.d.ts.map +1 -1
  1090. package/dist/esm/security/authentications/authentication.shared.dto.schemas.d.ts +133 -19
  1091. package/dist/esm/security/authentications/authentication.shared.dto.schemas.d.ts.map +1 -1
  1092. package/dist/esm/security/authentications/authentication.shared.dto.schemas.js +166 -6
  1093. package/dist/esm/security/authentications/authentication.shared.dto.schemas.js.map +1 -1
  1094. package/dist/esm/security/authentications/authentication.shared.schemas.d.ts +324 -9
  1095. package/dist/esm/security/authentications/authentication.shared.schemas.d.ts.map +1 -1
  1096. package/dist/esm/security/authentications/authentication.shared.schemas.js +411 -8
  1097. package/dist/esm/security/authentications/authentication.shared.schemas.js.map +1 -1
  1098. package/dist/esm/security/authentications/authentication.shared.utils.d.ts +87 -4
  1099. package/dist/esm/security/authentications/authentication.shared.utils.d.ts.map +1 -1
  1100. package/dist/esm/security/authentications/authentication.shared.utils.js +95 -6
  1101. package/dist/esm/security/authentications/authentication.shared.utils.js.map +1 -1
  1102. package/dist/esm/security/authentications/consumable-token.shared.schemas.d.ts +23 -1
  1103. package/dist/esm/security/authentications/consumable-token.shared.schemas.d.ts.map +1 -1
  1104. package/dist/esm/security/authentications/consumable-token.shared.schemas.js +23 -1
  1105. package/dist/esm/security/authentications/consumable-token.shared.schemas.js.map +1 -1
  1106. package/dist/esm/security/authentications/cross-frontend-handoff.shared.dto.schemas.d.ts +7 -1
  1107. package/dist/esm/security/authentications/cross-frontend-handoff.shared.dto.schemas.d.ts.map +1 -1
  1108. package/dist/esm/security/authentications/cross-frontend-handoff.shared.dto.schemas.js +7 -1
  1109. package/dist/esm/security/authentications/cross-frontend-handoff.shared.dto.schemas.js.map +1 -1
  1110. package/dist/esm/security/authentications/password-blocklist.shared.utils.d.ts +74 -0
  1111. package/dist/esm/security/authentications/password-blocklist.shared.utils.d.ts.map +1 -0
  1112. package/dist/esm/security/authentications/password-blocklist.shared.utils.js +122 -0
  1113. package/dist/esm/security/authentications/password-blocklist.shared.utils.js.map +1 -0
  1114. package/dist/esm/security/authentications/password-reset.shared.dto.schemas.d.ts.map +1 -1
  1115. package/dist/esm/security/authentications/registration.shared.dto.schemas.d.ts +88 -2
  1116. package/dist/esm/security/authentications/registration.shared.dto.schemas.d.ts.map +1 -1
  1117. package/dist/esm/security/authentications/registration.shared.dto.schemas.js +149 -2
  1118. package/dist/esm/security/authentications/registration.shared.dto.schemas.js.map +1 -1
  1119. package/dist/esm/security/authentications/scim/scim-organization-unit-mapping.shared.d.ts +57 -11
  1120. package/dist/esm/security/authentications/scim/scim-organization-unit-mapping.shared.d.ts.map +1 -1
  1121. package/dist/esm/security/authentications/scim/scim-organization-unit-mapping.shared.js +46 -13
  1122. package/dist/esm/security/authentications/scim/scim-organization-unit-mapping.shared.js.map +1 -1
  1123. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.resources-config.schemas.d.ts +11 -0
  1124. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.resources-config.schemas.d.ts.map +1 -1
  1125. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.resources-config.schemas.js +34 -10
  1126. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.resources-config.schemas.js.map +1 -1
  1127. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.d.ts +16 -2
  1128. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.d.ts.map +1 -1
  1129. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.js +36 -6
  1130. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.js.map +1 -1
  1131. package/dist/esm/security/authentications/scim/scim-tokens.shared.resources-config.schemas.d.ts.map +1 -1
  1132. package/dist/esm/security/authentications/scim/scim-tokens.shared.resources-config.schemas.js +18 -12
  1133. package/dist/esm/security/authentications/scim/scim-tokens.shared.resources-config.schemas.js.map +1 -1
  1134. package/dist/esm/security/authentications/scim/scim-tokens.shared.schemas.d.ts +2 -0
  1135. package/dist/esm/security/authentications/scim/scim-tokens.shared.schemas.d.ts.map +1 -1
  1136. package/dist/esm/security/authentications/scim/scim-tokens.shared.schemas.js +9 -0
  1137. package/dist/esm/security/authentications/scim/scim-tokens.shared.schemas.js.map +1 -1
  1138. package/dist/esm/security/authentications/service-provider-client-authentication.shared.schemas.d.ts +169 -0
  1139. package/dist/esm/security/authentications/service-provider-client-authentication.shared.schemas.d.ts.map +1 -0
  1140. package/dist/esm/security/authentications/service-provider-client-authentication.shared.schemas.js +162 -0
  1141. package/dist/esm/security/authentications/service-provider-client-authentication.shared.schemas.js.map +1 -0
  1142. package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.resources-config.schemas.d.ts.map +1 -1
  1143. package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.resources-config.schemas.js +14 -9
  1144. package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.resources-config.schemas.js.map +1 -1
  1145. package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.schemas.d.ts.map +1 -1
  1146. package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.resources-config.schemas.d.ts +27 -0
  1147. package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.resources-config.schemas.d.ts.map +1 -0
  1148. package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.resources-config.schemas.js +109 -0
  1149. package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.resources-config.schemas.js.map +1 -0
  1150. package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.schemas.d.ts +66 -0
  1151. package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.schemas.d.ts.map +1 -0
  1152. package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.schemas.js +107 -0
  1153. package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.schemas.js.map +1 -0
  1154. package/dist/esm/security/authentications/siem/siem-delivery-reliability-contract.shared.d.ts.map +1 -1
  1155. package/dist/esm/security/authentications/siem/siem-delivery-reliability-contract.shared.js.map +1 -1
  1156. package/dist/esm/security/authentications/siem/siem-export-config.shared.resources-config.schemas.d.ts +19 -0
  1157. package/dist/esm/security/authentications/siem/siem-export-config.shared.resources-config.schemas.d.ts.map +1 -1
  1158. package/dist/esm/security/authentications/siem/siem-export-config.shared.resources-config.schemas.js +50 -13
  1159. package/dist/esm/security/authentications/siem/siem-export-config.shared.resources-config.schemas.js.map +1 -1
  1160. package/dist/esm/security/authentications/siem/siem-export-config.shared.schemas.d.ts +18 -6
  1161. package/dist/esm/security/authentications/siem/siem-export-config.shared.schemas.d.ts.map +1 -1
  1162. package/dist/esm/security/authentications/siem/siem-export-config.shared.schemas.js +139 -10
  1163. package/dist/esm/security/authentications/siem/siem-export-config.shared.schemas.js.map +1 -1
  1164. package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.d.ts +26 -0
  1165. package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.d.ts.map +1 -1
  1166. package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.js +63 -33
  1167. package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.js.map +1 -1
  1168. package/dist/esm/security/authentications/sso/sso-config.shared.schemas.d.ts +0 -40
  1169. package/dist/esm/security/authentications/sso/sso-config.shared.schemas.d.ts.map +1 -1
  1170. package/dist/esm/security/authentications/sso/sso-config.shared.schemas.js +127 -50
  1171. package/dist/esm/security/authentications/sso/sso-config.shared.schemas.js.map +1 -1
  1172. package/dist/esm/security/authentications/sso/sso-connection.shared.resources-config.schemas.d.ts +26 -7
  1173. package/dist/esm/security/authentications/sso/sso-connection.shared.resources-config.schemas.d.ts.map +1 -1
  1174. package/dist/esm/security/authentications/sso/sso-connection.shared.resources-config.schemas.js +98 -38
  1175. package/dist/esm/security/authentications/sso/sso-connection.shared.resources-config.schemas.js.map +1 -1
  1176. package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.d.ts +6 -26
  1177. package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.d.ts.map +1 -1
  1178. package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.js +153 -70
  1179. package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.js.map +1 -1
  1180. package/dist/esm/security/authorizations/administrative-continuity.shared.schemas.d.ts +13 -5
  1181. package/dist/esm/security/authorizations/administrative-continuity.shared.schemas.d.ts.map +1 -1
  1182. package/dist/esm/security/authorizations/administrative-continuity.shared.schemas.js +12 -4
  1183. package/dist/esm/security/authorizations/administrative-continuity.shared.schemas.js.map +1 -1
  1184. package/dist/esm/security/authorizations/application-access-grants.shared.resources-config.schemas.d.ts +4 -0
  1185. package/dist/esm/security/authorizations/application-access-grants.shared.resources-config.schemas.d.ts.map +1 -1
  1186. package/dist/esm/security/authorizations/application-access-grants.shared.resources-config.schemas.js +9 -1
  1187. package/dist/esm/security/authorizations/application-access-grants.shared.resources-config.schemas.js.map +1 -1
  1188. package/dist/esm/security/authorizations/application-access-grants.shared.schemas.d.ts +44 -0
  1189. package/dist/esm/security/authorizations/application-access-grants.shared.schemas.d.ts.map +1 -1
  1190. package/dist/esm/security/authorizations/application-access-grants.shared.schemas.js +52 -0
  1191. package/dist/esm/security/authorizations/application-access-grants.shared.schemas.js.map +1 -1
  1192. package/dist/esm/security/authorizations/platform-access-grants.shared.resources-config.schemas.d.ts.map +1 -1
  1193. package/dist/esm/security/authorizations/platform-access-grants.shared.resources-config.schemas.js +7 -7
  1194. package/dist/esm/security/authorizations/platform-access-grants.shared.resources-config.schemas.js.map +1 -1
  1195. package/dist/esm/security/authorizations/platform-access-grants.shared.schemas.d.ts.map +1 -1
  1196. package/dist/esm/security/authorizations/platform-access-grants.shared.schemas.js.map +1 -1
  1197. package/dist/esm/security/authorizations/roles.shared.defaults.d.ts.map +1 -1
  1198. package/dist/esm/security/authorizations/roles.shared.defaults.js +62 -0
  1199. package/dist/esm/security/authorizations/roles.shared.defaults.js.map +1 -1
  1200. package/dist/esm/security/authorizations/roles.shared.schemas.d.ts +91 -1
  1201. package/dist/esm/security/authorizations/roles.shared.schemas.d.ts.map +1 -1
  1202. package/dist/esm/security/authorizations/roles.shared.schemas.js +109 -0
  1203. package/dist/esm/security/authorizations/roles.shared.schemas.js.map +1 -1
  1204. package/dist/esm/security/authorizations/roles.shared.utils.d.ts.map +1 -1
  1205. package/dist/esm/security/authorizations/roles.shared.utils.js +2 -0
  1206. package/dist/esm/security/authorizations/roles.shared.utils.js.map +1 -1
  1207. package/dist/esm/security/connected-accounts/provider-connection-listing.shared.schemas.d.ts +86 -0
  1208. package/dist/esm/security/connected-accounts/provider-connection-listing.shared.schemas.d.ts.map +1 -0
  1209. package/dist/esm/security/connected-accounts/provider-connection-listing.shared.schemas.js +40 -0
  1210. package/dist/esm/security/connected-accounts/provider-connection-listing.shared.schemas.js.map +1 -0
  1211. package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.d.ts +6 -2
  1212. package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.d.ts.map +1 -1
  1213. package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.js +2 -1
  1214. package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.js.map +1 -1
  1215. package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.d.ts +7 -3
  1216. package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.d.ts.map +1 -1
  1217. package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.js +15 -43
  1218. package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.js.map +1 -1
  1219. package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.d.ts +242 -23
  1220. package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.d.ts.map +1 -1
  1221. package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.js +310 -62
  1222. package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.js.map +1 -1
  1223. package/dist/esm/security/credential-rotation-grace.shared.utils.d.ts +69 -0
  1224. package/dist/esm/security/credential-rotation-grace.shared.utils.d.ts.map +1 -0
  1225. package/dist/esm/security/credential-rotation-grace.shared.utils.js +77 -0
  1226. package/dist/esm/security/credential-rotation-grace.shared.utils.js.map +1 -0
  1227. package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.d.ts +6 -3
  1228. package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.d.ts.map +1 -1
  1229. package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.js +102 -12
  1230. package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.js.map +1 -1
  1231. package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.d.ts +8 -3
  1232. package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.d.ts.map +1 -1
  1233. package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.js +194 -17
  1234. package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.js.map +1 -1
  1235. package/dist/esm/security/oauth-clients/oauth-clients.shared.schemas.d.ts +1 -0
  1236. package/dist/esm/security/oauth-clients/oauth-clients.shared.schemas.d.ts.map +1 -1
  1237. package/dist/esm/security/oauth-clients/oauth-clients.shared.schemas.js +25 -4
  1238. package/dist/esm/security/oauth-clients/oauth-clients.shared.schemas.js.map +1 -1
  1239. package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.resources-config.schemas.d.ts.map +1 -1
  1240. package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.schemas.d.ts.map +1 -1
  1241. package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.schemas.js.map +1 -1
  1242. package/dist/esm/security/oauth-clients/oauth-resource-server.shared.schemas.d.ts.map +1 -1
  1243. package/dist/esm/security/outbound-target-control.shared.schemas.d.ts +73 -0
  1244. package/dist/esm/security/outbound-target-control.shared.schemas.d.ts.map +1 -0
  1245. package/dist/esm/security/outbound-target-control.shared.schemas.js +75 -0
  1246. package/dist/esm/security/outbound-target-control.shared.schemas.js.map +1 -0
  1247. package/dist/esm/security/submission-challenge/submission-challenge.shared.d.ts +143 -0
  1248. package/dist/esm/security/submission-challenge/submission-challenge.shared.d.ts.map +1 -0
  1249. package/dist/esm/security/submission-challenge/submission-challenge.shared.js +123 -0
  1250. package/dist/esm/security/submission-challenge/submission-challenge.shared.js.map +1 -0
  1251. package/dist/esm/systems-of-record/system-of-record-actions.shared.schemas.d.ts +384 -0
  1252. package/dist/esm/systems-of-record/system-of-record-actions.shared.schemas.d.ts.map +1 -0
  1253. package/dist/esm/systems-of-record/system-of-record-actions.shared.schemas.js +327 -0
  1254. package/dist/esm/systems-of-record/system-of-record-actions.shared.schemas.js.map +1 -0
  1255. package/dist/esm/systems-of-record/system-of-record-credential-kind.shared.d.ts +159 -0
  1256. package/dist/esm/systems-of-record/system-of-record-credential-kind.shared.d.ts.map +1 -0
  1257. package/dist/esm/systems-of-record/system-of-record-credential-kind.shared.js +164 -0
  1258. package/dist/esm/systems-of-record/system-of-record-credential-kind.shared.js.map +1 -0
  1259. package/dist/esm/systems-of-record/system-of-record-declaration.shared.schemas.d.ts +322 -0
  1260. package/dist/esm/systems-of-record/system-of-record-declaration.shared.schemas.d.ts.map +1 -0
  1261. package/dist/esm/systems-of-record/system-of-record-declaration.shared.schemas.js +229 -0
  1262. package/dist/esm/systems-of-record/system-of-record-declaration.shared.schemas.js.map +1 -0
  1263. package/dist/esm/systems-of-record/system-of-record-env.shared.d.ts +79 -0
  1264. package/dist/esm/systems-of-record/system-of-record-env.shared.d.ts.map +1 -0
  1265. package/dist/esm/systems-of-record/system-of-record-env.shared.js +116 -0
  1266. package/dist/esm/systems-of-record/system-of-record-env.shared.js.map +1 -0
  1267. package/dist/esm/systems-of-record/system-of-record-error-codes.shared.d.ts +403 -0
  1268. package/dist/esm/systems-of-record/system-of-record-error-codes.shared.d.ts.map +1 -0
  1269. package/dist/esm/systems-of-record/system-of-record-error-codes.shared.js +430 -0
  1270. package/dist/esm/systems-of-record/system-of-record-error-codes.shared.js.map +1 -0
  1271. package/dist/esm/systems-of-record/system-of-record-facet.shared.schemas.d.ts +788 -0
  1272. package/dist/esm/systems-of-record/system-of-record-facet.shared.schemas.d.ts.map +1 -0
  1273. package/dist/esm/systems-of-record/system-of-record-facet.shared.schemas.js +985 -0
  1274. package/dist/esm/systems-of-record/system-of-record-facet.shared.schemas.js.map +1 -0
  1275. package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.resources-config.schemas.d.ts +31 -0
  1276. package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.resources-config.schemas.d.ts.map +1 -0
  1277. package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.resources-config.schemas.js +233 -0
  1278. package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.resources-config.schemas.js.map +1 -0
  1279. package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.schemas.d.ts +127 -0
  1280. package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.schemas.d.ts.map +1 -0
  1281. package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.schemas.js +204 -0
  1282. package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.schemas.js.map +1 -0
  1283. package/dist/esm/testing/resource-config-builders.d.ts.map +1 -1
  1284. package/dist/esm/testing/resource-config-builders.js +10 -4
  1285. package/dist/esm/testing/resource-config-builders.js.map +1 -1
  1286. package/dist/esm/testing.d.ts.map +1 -1
  1287. package/dist/esm/users/anonymous-user-marketing-metadata.shared.schemas.d.ts +2 -1
  1288. package/dist/esm/users/anonymous-user-marketing-metadata.shared.schemas.d.ts.map +1 -1
  1289. package/dist/esm/users/anonymous-user-marketing-metadata.shared.schemas.js +2 -1
  1290. package/dist/esm/users/anonymous-user-marketing-metadata.shared.schemas.js.map +1 -1
  1291. package/dist/esm/users/anonymous-users.shared.resources-config.schemas.d.ts +141 -24
  1292. package/dist/esm/users/anonymous-users.shared.resources-config.schemas.d.ts.map +1 -1
  1293. package/dist/esm/users/anonymous-users.shared.resources-config.schemas.js +264 -0
  1294. package/dist/esm/users/anonymous-users.shared.resources-config.schemas.js.map +1 -1
  1295. package/dist/esm/users/anonymous-users.shared.schema.d.ts +5 -3
  1296. package/dist/esm/users/anonymous-users.shared.schema.d.ts.map +1 -1
  1297. package/dist/esm/users/anonymous-users.shared.schema.js +18 -1
  1298. package/dist/esm/users/anonymous-users.shared.schema.js.map +1 -1
  1299. package/dist/esm/users/inbound-contacts.shared.resources-config.schemas.d.ts +2 -1
  1300. package/dist/esm/users/inbound-contacts.shared.resources-config.schemas.d.ts.map +1 -1
  1301. package/dist/esm/users/inbound-contacts.shared.resources-config.schemas.js +29 -0
  1302. package/dist/esm/users/inbound-contacts.shared.resources-config.schemas.js.map +1 -1
  1303. package/dist/esm/users/inbound-contacts.shared.schemas.d.ts +2 -1
  1304. package/dist/esm/users/inbound-contacts.shared.schemas.d.ts.map +1 -1
  1305. package/dist/esm/users/user-consent-decision.shared.utils.d.ts +127 -0
  1306. package/dist/esm/users/user-consent-decision.shared.utils.d.ts.map +1 -0
  1307. package/dist/esm/users/user-consent-decision.shared.utils.js +189 -0
  1308. package/dist/esm/users/user-consent-decision.shared.utils.js.map +1 -0
  1309. package/dist/esm/users/user-credentials.shared.resources-config.schemas.d.ts.map +1 -1
  1310. package/dist/esm/users/user-credentials.shared.schemas.d.ts.map +1 -1
  1311. package/dist/esm/users/user-identity-links.shared.resources-config.schemas.d.ts +1 -0
  1312. package/dist/esm/users/user-identity-links.shared.resources-config.schemas.d.ts.map +1 -1
  1313. package/dist/esm/users/user-identity-links.shared.schemas.d.ts +1 -0
  1314. package/dist/esm/users/user-identity-links.shared.schemas.d.ts.map +1 -1
  1315. package/dist/esm/users/user-identity-links.shared.schemas.js +30 -0
  1316. package/dist/esm/users/user-identity-links.shared.schemas.js.map +1 -1
  1317. package/dist/esm/users/user-preferences-reset.shared.utils.d.ts +6 -6
  1318. package/dist/esm/users/user-preferences-reset.shared.utils.d.ts.map +1 -1
  1319. package/dist/esm/users/user-preferences-reset.shared.utils.js +8 -8
  1320. package/dist/esm/users/user-preferences-reset.shared.utils.js.map +1 -1
  1321. package/dist/esm/users/user-preferences.shared.resources-config.schemas.d.ts +71 -29
  1322. package/dist/esm/users/user-preferences.shared.resources-config.schemas.d.ts.map +1 -1
  1323. package/dist/esm/users/user-preferences.shared.resources-config.schemas.js +99 -0
  1324. package/dist/esm/users/user-preferences.shared.resources-config.schemas.js.map +1 -1
  1325. package/dist/esm/users/user-profiles.shared.resources-config.schemas.d.ts.map +1 -1
  1326. package/dist/esm/users/user-profiles.shared.resources-config.schemas.js +25 -9
  1327. package/dist/esm/users/user-profiles.shared.resources-config.schemas.js.map +1 -1
  1328. package/dist/esm/users/user-self-preferences.shared.resources-config.schemas.d.ts +4 -7
  1329. package/dist/esm/users/user-self-preferences.shared.resources-config.schemas.d.ts.map +1 -1
  1330. package/dist/esm/users/user-self-preferences.shared.resources-config.schemas.js +12 -1
  1331. package/dist/esm/users/user-self-preferences.shared.resources-config.schemas.js.map +1 -1
  1332. package/dist/esm/users/user-self-profiles.shared.resources-config.schemas.d.ts.map +1 -1
  1333. package/dist/esm/users/user-self.shared.resources-config.schemas.d.ts +1 -0
  1334. package/dist/esm/users/user-self.shared.resources-config.schemas.d.ts.map +1 -1
  1335. package/dist/esm/users/user-self.shared.resources-config.schemas.js +3 -3
  1336. package/dist/esm/users/user-self.shared.resources-config.schemas.js.map +1 -1
  1337. package/dist/esm/users/users.shared.resources-config.schemas.d.ts +1 -0
  1338. package/dist/esm/users/users.shared.resources-config.schemas.d.ts.map +1 -1
  1339. package/dist/esm/users/users.shared.resources-config.schemas.js +84 -22
  1340. package/dist/esm/users/users.shared.resources-config.schemas.js.map +1 -1
  1341. package/dist/esm/users/users.shared.schemas.d.ts +23 -18
  1342. package/dist/esm/users/users.shared.schemas.d.ts.map +1 -1
  1343. package/dist/esm/users/users.shared.schemas.js +117 -27
  1344. package/dist/esm/users/users.shared.schemas.js.map +1 -1
  1345. package/package.json +14 -35
  1346. package/dist/esm/compliance/privacy/data-retention.shared.schemas.js +0 -7
  1347. package/dist/esm/flows-actors/apps-blueprint/apps-blueprint-agent-personas.shared.enums.d.ts +0 -19
  1348. package/dist/esm/flows-actors/apps-blueprint/apps-blueprint-agent-personas.shared.enums.d.ts.map +0 -1
  1349. package/dist/esm/flows-actors/apps-blueprint/apps-blueprint-agent-personas.shared.enums.js +0 -35
  1350. package/dist/esm/flows-actors/apps-blueprint/apps-blueprint-agent-personas.shared.enums.js.map +0 -1
  1351. package/dist/esm/flows-actors/apps-blueprint/apps-blueprint.shared.schemas.d.ts +0 -213
  1352. package/dist/esm/flows-actors/apps-blueprint/apps-blueprint.shared.schemas.d.ts.map +0 -1
  1353. package/dist/esm/flows-actors/apps-blueprint/apps-blueprint.shared.schemas.js +0 -287
  1354. package/dist/esm/flows-actors/apps-blueprint/apps-blueprint.shared.schemas.js.map +0 -1
  1355. package/dist/esm/flows-actors/apps-blueprint/artifacts.apps-blueprint.shared.schemas.d.ts +0 -236
  1356. package/dist/esm/flows-actors/apps-blueprint/artifacts.apps-blueprint.shared.schemas.d.ts.map +0 -1
  1357. package/dist/esm/flows-actors/apps-blueprint/artifacts.apps-blueprint.shared.schemas.js +0 -212
  1358. package/dist/esm/flows-actors/apps-blueprint/artifacts.apps-blueprint.shared.schemas.js.map +0 -1
  1359. package/dist/esm/flows-actors/meta-workflows/actions.meta-workflows.shared.schemas.d.ts.map +0 -1
  1360. package/dist/esm/flows-actors/meta-workflows/actions.meta-workflows.shared.schemas.js.map +0 -1
  1361. package/dist/esm/flows-actors/meta-workflows/budget-authority.meta-workflows.shared.schemas.d.ts +0 -17
  1362. package/dist/esm/flows-actors/meta-workflows/budget-authority.meta-workflows.shared.schemas.d.ts.map +0 -1
  1363. package/dist/esm/flows-actors/meta-workflows/budget-authority.meta-workflows.shared.schemas.js +0 -31
  1364. package/dist/esm/flows-actors/meta-workflows/budget-authority.meta-workflows.shared.schemas.js.map +0 -1
  1365. package/dist/esm/flows-actors/meta-workflows/catalog.meta-workflows.shared.schemas.d.ts.map +0 -1
  1366. package/dist/esm/flows-actors/meta-workflows/catalog.meta-workflows.shared.schemas.js.map +0 -1
  1367. package/dist/esm/flows-actors/meta-workflows/context-selection.meta-workflows.shared.schemas.d.ts.map +0 -1
  1368. package/dist/esm/flows-actors/meta-workflows/context-selection.meta-workflows.shared.schemas.js.map +0 -1
  1369. package/dist/esm/flows-actors/meta-workflows/continuity-identifiers.meta-workflows.shared.schemas.d.ts +0 -28
  1370. package/dist/esm/flows-actors/meta-workflows/continuity-identifiers.meta-workflows.shared.schemas.d.ts.map +0 -1
  1371. package/dist/esm/flows-actors/meta-workflows/continuity-identifiers.meta-workflows.shared.schemas.js +0 -28
  1372. package/dist/esm/flows-actors/meta-workflows/continuity-identifiers.meta-workflows.shared.schemas.js.map +0 -1
  1373. package/dist/esm/flows-actors/meta-workflows/decisions.meta-workflows.shared.schemas.d.ts.map +0 -1
  1374. package/dist/esm/flows-actors/meta-workflows/decisions.meta-workflows.shared.schemas.js.map +0 -1
  1375. package/dist/esm/flows-actors/meta-workflows/execution-binding-common.meta-workflows.shared.schemas.d.ts +0 -100
  1376. package/dist/esm/flows-actors/meta-workflows/execution-binding-common.meta-workflows.shared.schemas.d.ts.map +0 -1
  1377. package/dist/esm/flows-actors/meta-workflows/execution-binding-common.meta-workflows.shared.schemas.js +0 -232
  1378. package/dist/esm/flows-actors/meta-workflows/execution-binding-common.meta-workflows.shared.schemas.js.map +0 -1
  1379. package/dist/esm/flows-actors/meta-workflows/execution-binding-vocabularies.meta-workflows.shared.schemas.d.ts +0 -29
  1380. package/dist/esm/flows-actors/meta-workflows/execution-binding-vocabularies.meta-workflows.shared.schemas.d.ts.map +0 -1
  1381. package/dist/esm/flows-actors/meta-workflows/execution-binding-vocabularies.meta-workflows.shared.schemas.js +0 -58
  1382. package/dist/esm/flows-actors/meta-workflows/execution-binding-vocabularies.meta-workflows.shared.schemas.js.map +0 -1
  1383. package/dist/esm/flows-actors/meta-workflows/portable-primitives.meta-workflows.shared.schemas.d.ts.map +0 -1
  1384. package/dist/esm/flows-actors/meta-workflows/portable-primitives.meta-workflows.shared.schemas.js.map +0 -1
  1385. package/dist/esm/flows-actors/task-continuity-binding.actors.shared.schemas.d.ts +0 -81
  1386. package/dist/esm/flows-actors/task-continuity-binding.actors.shared.schemas.d.ts.map +0 -1
  1387. package/dist/esm/flows-actors/task-continuity-binding.actors.shared.schemas.js +0 -82
  1388. package/dist/esm/flows-actors/task-continuity-binding.actors.shared.schemas.js.map +0 -1
  1389. package/dist/esm/flows-actors/utils/flow-actors.context-builder.apps-context.shared.utils.d.ts +0 -2
  1390. package/dist/esm/flows-actors/utils/flow-actors.context-builder.apps-context.shared.utils.d.ts.map +0 -1
  1391. package/dist/esm/flows-actors/utils/flow-actors.context-builder.apps-context.shared.utils.js +0 -1
  1392. package/dist/esm/flows-actors/utils/flow-actors.context-builder.apps-context.shared.utils.js.map +0 -1
  1393. package/dist/tsconfig.build.tsbuildinfo +0 -1
  1394. /package/dist/esm/{flows-actors/meta-workflows → meta-workflows}/actions.meta-workflows.shared.schemas.d.ts +0 -0
  1395. /package/dist/esm/{flows-actors/meta-workflows → meta-workflows}/actions.meta-workflows.shared.schemas.js +0 -0
  1396. /package/dist/esm/{flows-actors/meta-workflows → meta-workflows}/catalog.meta-workflows.shared.schemas.d.ts +0 -0
  1397. /package/dist/esm/{flows-actors/meta-workflows → meta-workflows}/catalog.meta-workflows.shared.schemas.js +0 -0
  1398. /package/dist/esm/{flows-actors/meta-workflows → meta-workflows}/context-selection.meta-workflows.shared.schemas.d.ts +0 -0
  1399. /package/dist/esm/{flows-actors/meta-workflows → meta-workflows}/context-selection.meta-workflows.shared.schemas.js +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"organization-unit-members.sh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,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,WAAW,EAAE,CAAC,iBAAiB,EAAE,CAAC,iBAAiB,EAAE;CAC/G,CAAC,CAAC,cAAc,CAAC;IAChB,sBAAsB;IACtB,oBAAoB;CACrB,CAAC,CAAC","sourcesContent":["/**\n * Organization Unit Member Shared Schemas\n *\n * The junction between an organization MEMBERSHIP and an organization UNIT: \"this member holds this\n * role inside this unit of the org chart\".\n *\n * ## Why this is a resource and not an embedded array (plan decision D-B5)\n *\n * This started life as `OrganizationMember.organizationUnitsMembership` — an embedded\n * `[{ organizationUnitId, role }]` array. That shape could not carry the semantics it claimed:\n *\n * - **It was not portably queryable.** A dot-path filter into an array-valued field works on Mongo\n * and resolves to `NULL` on PostgreSQL (matching nothing), there is no first-class containment\n * operator, and the application-side fallback is stripped by the LIST summary projection. BOTH\n * available routes fail **OPEN**. Anything that had to ask \"who is assigned to this unit?\" —\n * the unit DELETE dependents guard, and any future authorization read — would have silently\n * passed on one adapter.\n * - **It could not be a relationship.** With no registered edge there was no cascade, so unit\n * assignments outlived both the unit and the membership that justified them.\n * - **It admitted duplicates.** An array has no uniqueness; a member could carry two different\n * roles for the same unit with no defined winner.\n *\n * As a first-class junction all three close: the assignment is queryable on every adapter, the\n * `ORGANIZATION_UNITS → ORGANIZATION_UNIT_MEMBERS` edge lets the unit DELETE guard finally cover\n * assigned members, and {@link OrganizationUnitMemberSchema}'s business key makes \"one role per\n * member per unit\" a persisted invariant instead of a convention.\n *\n * ## An authorization axis — live since WS-C phase 2\n *\n * ⚠️ `role` here IS read by the authorization path. `appendUnitScopedRoles` emits one\n * `initiatorRoles` entry per assignment, carrying `organizationUnitId` as a NARROWING discriminator\n * beside the organization-wide entry; every consumer that unions `initiatorRoles` partitions on that\n * field first (`isOrganizationWideRoleInfo`). So a unit role is live authority — bounded to one unit,\n * never tenant-wide. Two consequences for anything touching this field:\n *\n * - The role-ceiling gate governs who may ASSIGN it (both write paths carry it explicitly, see\n * {@link OrganizationUnitMemberSchema.shape.role}).\n * - Every change to it is an access-control decision and emits\n * `ORGANIZATION_UNIT_MEMBER_ROLE_CHANGED`, the narrowed twin of the organization-wide\n * `ORGANIZATION_MEMBER_ROLE_CHANGED`.\n *\n * assurance-control: WILDO.ACCESS.LEAST_PRIVILEGE · WILDO.ACCESS.PRIVILEGE_EVIDENCE — least-privilege and evidence on unit-scoped\n * role assignment.\n */\n\nimport { z } from 'zod';\n\nimport { OrgRolesSchema } from '../security/authorizations/roles.shared.schemas';\n\nexport const OrganizationUnitMemberSchema = z.object({\n _id: z.string().min(1).isPrimaryKey().isSummaryField(),\n /**\n * Tenant anchor. Denormalized from the parent membership so tenant scoping and the contextual\n * filter resolve on this row alone — an authorization-adjacent read must never depend on a join\n * to establish which tenant a row belongs to.\n */\n organizationId: z.string().min(1).isDBIndexed().isForeignKey().isSummaryField().excludeFromUpdate(),\n /** The unit of the org chart this assignment targets. */\n organizationUnitId: z.string().min(1).isDBIndexed().isForeignKey().isSummaryField().excludeFromUpdate(),\n /**\n * The organization MEMBERSHIP being assigned — deliberately the membership, not the user.\n *\n * A unit assignment presupposes membership of the owning organization, so the membership row is\n * the true semantic parent: it carries the tenant binding and its deletion is exactly when the\n * assignment stops meaning anything (hence the cascade on that edge). Pointing at `userId`\n * instead would model a user as assignable to a unit of an organization they may not belong to.\n *\n * A denormalized `userId` copy was considered for a one-hop \"unit roles for this user\" read and\n * REJECTED: the execution-context builder already holds the member rows (and therefore their\n * `_id`s) at the point it would need this, so the copy would buy nothing and add a field that can\n * drift.\n */\n organizationMemberId: z.string().min(1).isDBIndexed().isForeignKey().isSummaryField().excludeFromUpdate(),\n /**\n * The role this member holds WITHIN this unit.\n *\n * The only mutable field on the row, and deliberately so: re-grading an assignment through UPDATE\n * keeps the row's identity (and its `createdAt` provenance) intact, where a delete-plus-create\n * would silently reset both. The two coordinates that IDENTIFY the assignment\n * (`organizationMemberId`, `organizationUnitId`) are `.excludeFromUpdate()`, so an edit can change\n * what the assignment GRANTS but never what it is ABOUT.\n *\n * Both write paths — CREATE and UPDATE — are governed by the role-ceiling gate\n * (`assertRequestedRolesWithinCallerCeiling`): a principal cannot grant a unit role it does not\n * itself hold. Because a custom implementation resolves by an exact operation-path key, each path\n * carries the gate explicitly; neither inherits it from the other.\n */\n role: OrgRolesSchema.isDBIndexed().isSummaryField(),\n createdAt: z.date().default(() => new Date()).optional().isDBIndexed().excludeFromCreate().excludeFromUpdate(),\n updatedAt: z.date().default(() => new Date()).optional().isDBIndexed().excludeFromCreate().excludeFromUpdate(),\n}).businessKeySet([\n 'organizationMemberId',\n 'organizationUnitId',\n]);\n\nexport type OrganizationUnitMember = z.infer<typeof OrganizationUnitMemberSchema>;\n"]}
1
+ {"version":3,"file":"organization-unit-members.shared.schemas.js","sourceRoot":"","sources":["../../../../src/organizations/organization-unit-members.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,cAAc,EAAE,MAAM,iDAAiD,CAAC;AAEjF,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,CAAC,MAAM,CAAC;IACnD,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,YAAY,EAAE,CAAC,cAAc,EAAE;IACtD;;;;OAIG;IACH,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,YAAY,EAAE,CAAC,cAAc,EAAE,CAAC,iBAAiB,EAAE;IACnG,yDAAyD;IACzD,kBAAkB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,YAAY,EAAE,CAAC,cAAc,EAAE,CAAC,iBAAiB,EAAE;IACvG;;;;;;;;;;;;OAYG;IACH,oBAAoB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,YAAY,EAAE,CAAC,cAAc,EAAE,CAAC,iBAAiB,EAAE;IACzG;;;;;;;;;;;;;OAaG;IACH,IAAI,EAAE,cAAc,CAAC,WAAW,EAAE,CAAC,cAAc,EAAE;SAChD,QAAQ,CAAC,4JAA4J,CAAC;IACzK,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,WAAW,EAAE,CAAC,iBAAiB,EAAE,CAAC,iBAAiB,EAAE;IAC9G,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,WAAW,EAAE,CAAC,iBAAiB,EAAE,CAAC,iBAAiB,EAAE;CAC/G,CAAC,CAAC,cAAc,CAAC;IAChB,sBAAsB;IACtB,oBAAoB;CACrB,CAAC,CAAC","sourcesContent":["/**\n * Organization Unit Member Shared Schemas\n *\n * The junction between an organization MEMBERSHIP and an organization UNIT: \"this member holds this\n * role inside this unit of the org chart\".\n *\n * ## Why this is a resource and not an embedded array (plan decision D-B5)\n *\n * This started life as `OrganizationMember.organizationUnitsMembership` — an embedded\n * `[{ organizationUnitId, role }]` array. That shape could not carry the semantics it claimed:\n *\n * - **It was not portably queryable.** A dot-path filter into an array-valued field works on Mongo\n * and resolves to `NULL` on PostgreSQL (matching nothing), there is no first-class containment\n * operator, and the application-side fallback is stripped by the LIST summary projection. BOTH\n * available routes fail **OPEN**. Anything that had to ask \"who is assigned to this unit?\" —\n * the unit DELETE dependents guard, and any future authorization read — would have silently\n * passed on one adapter.\n * - **It could not be a relationship.** With no registered edge there was no cascade, so unit\n * assignments outlived both the unit and the membership that justified them.\n * - **It admitted duplicates.** An array has no uniqueness; a member could carry two different\n * roles for the same unit with no defined winner.\n *\n * As a first-class junction all three close: the assignment is queryable on every adapter, the\n * `ORGANIZATION_UNITS → ORGANIZATION_UNIT_MEMBERS` edge lets the unit DELETE guard finally cover\n * assigned members, and {@link OrganizationUnitMemberSchema}'s business key makes \"one role per\n * member per unit\" a persisted invariant instead of a convention.\n *\n * ## An authorization axis — live since WS-C phase 2\n *\n * ⚠️ `role` here IS read by the authorization path. `appendUnitScopedRoles` emits one\n * `initiatorRoles` entry per assignment, carrying `organizationUnitId` as a NARROWING discriminator\n * beside the organization-wide entry; every consumer that unions `initiatorRoles` partitions on that\n * field first (`isOrganizationWideRoleInfo`). So a unit role is live authority — bounded to one unit,\n * never tenant-wide. Two consequences for anything touching this field:\n *\n * - The role-ceiling gate governs who may ASSIGN it (both write paths carry it explicitly, see\n * {@link OrganizationUnitMemberSchema.shape.role}).\n * - Every change to it is an access-control decision and emits\n * `ORGANIZATION_UNIT_MEMBER_ROLE_CHANGED`, the narrowed twin of the organization-wide\n * `ORGANIZATION_MEMBER_ROLE_CHANGED`.\n *\n * assurance-control: WILDO.ACCESS.LEAST_PRIVILEGE · WILDO.ACCESS.PRIVILEGE_EVIDENCE — least-privilege and evidence on unit-scoped\n * role assignment.\n */\n\nimport { z } from 'zod';\n\nimport { OrgRolesSchema } from '../security/authorizations/roles.shared.schemas';\n\nexport const OrganizationUnitMemberSchema = z.object({\n _id: z.string().min(1).isPrimaryKey().isSummaryField(),\n /**\n * Tenant anchor. Denormalized from the parent membership so tenant scoping and the contextual\n * filter resolve on this row alone — an authorization-adjacent read must never depend on a join\n * to establish which tenant a row belongs to.\n */\n organizationId: z.string().min(1).isDBIndexed().isForeignKey().isSummaryField().excludeFromUpdate(),\n /** The unit of the org chart this assignment targets. */\n organizationUnitId: z.string().min(1).isDBIndexed().isForeignKey().isSummaryField().excludeFromUpdate(),\n /**\n * The organization MEMBERSHIP being assigned — deliberately the membership, not the user.\n *\n * A unit assignment presupposes membership of the owning organization, so the membership row is\n * the true semantic parent: it carries the tenant binding and its deletion is exactly when the\n * assignment stops meaning anything (hence the cascade on that edge). Pointing at `userId`\n * instead would model a user as assignable to a unit of an organization they may not belong to.\n *\n * A denormalized `userId` copy was considered for a one-hop \"unit roles for this user\" read and\n * REJECTED: the execution-context builder already holds the member rows (and therefore their\n * `_id`s) at the point it would need this, so the copy would buy nothing and add a field that can\n * drift.\n */\n organizationMemberId: z.string().min(1).isDBIndexed().isForeignKey().isSummaryField().excludeFromUpdate(),\n /**\n * The role this member holds WITHIN this unit.\n *\n * The only mutable field on the row, and deliberately so: re-grading an assignment through UPDATE\n * keeps the row's identity (and its `createdAt` provenance) intact, where a delete-plus-create\n * would silently reset both. The two coordinates that IDENTIFY the assignment\n * (`organizationMemberId`, `organizationUnitId`) are `.excludeFromUpdate()`, so an edit can change\n * what the assignment GRANTS but never what it is ABOUT.\n *\n * Both write paths — CREATE and UPDATE — are governed by the role-ceiling gate\n * (`assertRequestedRolesWithinCallerCeiling`): a principal cannot grant a unit role it does not\n * itself hold. Because a custom implementation resolves by an exact operation-path key, each path\n * carries the gate explicitly; neither inherits it from the other.\n */\n role: OrgRolesSchema.isDBIndexed().isSummaryField()\n .describe('The role the member holds inside this unit: a core organization role or one the application defines. A caller cannot grant a role it does not hold itself.'),\n createdAt: z.date().default(() => new Date()).optional().isDBIndexed().excludeFromCreate().excludeFromUpdate(),\n updatedAt: z.date().default(() => new Date()).optional().isDBIndexed().excludeFromCreate().excludeFromUpdate(),\n}).businessKeySet([\n 'organizationMemberId',\n 'organizationUnitId',\n]);\n\nexport type OrganizationUnitMember = z.infer<typeof OrganizationUnitMemberSchema>;\n"]}
@@ -32,7 +32,14 @@ export declare enum OrganizationUnitNarrowingDecisionKind {
32
32
  /** ONLY unit grants satisfy the operation, so access is confined to those units. */
33
33
  UNIT_NARROWED = "UNIT_NARROWED",
34
34
  /** Neither an organization-wide nor a unit grant satisfies the operation. */
35
- DENIED = "DENIED"
35
+ DENIED = "DENIED",
36
+ /**
37
+ * A UNIT-ONLY principal — one holding no organization-wide entry in the target organization, which
38
+ * only a unit-scoped service-provider relationship produces (#1597) — reads a resource the application
39
+ * declared organization-wide for providers (`serviceProviderOrganizationWideAccess`). Admitted with NO
40
+ * row confinement, read-class operations only. Never produced for a resource that narrows by unit.
41
+ */
42
+ SERVICE_PROVIDER_ORGANIZATION_WIDE = "SERVICE_PROVIDER_ORGANIZATION_WIDE"
36
43
  }
37
44
  export type OrganizationUnitNarrowingDecision = {
38
45
  kind: OrganizationUnitNarrowingDecisionKind.NOT_NARROWED;
@@ -44,6 +51,8 @@ export type OrganizationUnitNarrowingDecision = {
44
51
  organizationUnitIds: string[];
45
52
  } | {
46
53
  kind: OrganizationUnitNarrowingDecisionKind.DENIED;
54
+ } | {
55
+ kind: OrganizationUnitNarrowingDecisionKind.SERVICE_PROVIDER_ORGANIZATION_WIDE;
47
56
  };
48
57
  /**
49
58
  * A decision as STAMPED on an execution context — the conferring-grant record.
@@ -124,7 +133,60 @@ export declare function resolveOrganizationUnitNarrowingDecision(input: {
124
133
  readonly resourceType: string;
125
134
  readonly requiredRoles: readonly string[];
126
135
  readonly initiatorRoles: readonly ExecutionContext_RoleInfo[] | undefined;
136
+ /**
137
+ * The organization the request acts inside. Only role entries held IN it are evaluated — an
138
+ * ORG_ADMIN of another tenant must neither satisfy the organization-wide step nor lift narrowing
139
+ * here (see `selectRoleInfosActingInOrganization`). Absent ⇒ no organization entry counts.
140
+ */
141
+ readonly organizationId: string | undefined;
127
142
  readonly narrowingRegistry: Readonly<Partial<Record<string, OrganizationUnitNarrowingDeclaration>>>;
128
143
  readonly roleHierarchyResolver: OrganizationUnitRoleHierarchyResolver;
144
+ /**
145
+ * Resources the application declared readable organization-wide by a UNIT-scoped service provider
146
+ * (`serviceProviderOrganizationWideAccess`). Absent ⇒ none.
147
+ */
148
+ readonly serviceProviderOrganizationWideAccess?: Readonly<Partial<Record<string, ServiceProviderOrganizationWideAccessDeclaration>>>;
149
+ /** Whether the operation only READS (`READ`/`LIST`/`SEARCH`/`COUNT`). The provider declaration admits nothing else. */
150
+ readonly operationIsReadOnly?: boolean;
129
151
  }): OrganizationUnitNarrowingDecision;
152
+ /**
153
+ * An application's statement that a UNIT-scoped service-provider expert may READ a resource across the
154
+ * whole client organization — a shared reference list, say — even though the resource does not narrow
155
+ * by unit. The rationale is required: it is what a reviewer reads to judge whether the widening is right.
156
+ */
157
+ export type ServiceProviderOrganizationWideAccessDeclaration = {
158
+ readonly rationale: string;
159
+ };
160
+ /**
161
+ * The ENGINE's own organization-wide reads for a unit-only service-provider principal (#1597) — exactly one resource,
162
+ * and it is the organization row itself.
163
+ *
164
+ * A principal who works in an organization must be able to read which organization that is: its name, type and status,
165
+ * the row an ordinary member reads (its READ requires ORG_MEMBER, which the provider role inherits). Without it the organization switcher — one READ of the row per membership —
166
+ * never lists a client whose relationship is confined to units, so unit scope is unusable through the shipped UI.
167
+ * Reading the row grants nothing else: no other resource, and (by the admission below) no write.
168
+ *
169
+ * Engine-owned rather than an application declaration because the application MAY NOT declare it: ORGANIZATIONS is in
170
+ * the authorization plane, which `collectServiceProviderOrganizationWideAccessViolations` refuses — rightly, since an
171
+ * application widening it could expose a future authority field. The engine owns the row's shape, so the engine is the
172
+ * party that can say its READ is safe. Widening this set is a framework decision, made here and nowhere else.
173
+ */
174
+ export declare const ENGINE_SERVICE_PROVIDER_ORGANIZATION_WIDE_READS: ReadonlySet<string>;
175
+ /** Why a `serviceProviderOrganizationWideAccess` entry was refused at startup. */
176
+ export declare enum ServiceProviderOrganizationWideAccessViolationKind {
177
+ /** The resource issues authority (the authorization plane) — a provider must never read it tenant-wide by declaration. */
178
+ AUTHORIZATION_PLANE_RESOURCE = "AUTHORIZATION_PLANE_RESOURCE",
179
+ /** The resource already narrows by unit; declaring it organization-wide for providers would make one decision two. */
180
+ RESOURCE_NARROWS_BY_UNIT = "RESOURCE_NARROWS_BY_UNIT",
181
+ /** No rationale — the declaration's whole review value is the sentence saying why. */
182
+ MISSING_RATIONALE = "MISSING_RATIONALE"
183
+ }
184
+ /**
185
+ * Validate an application's `serviceProviderOrganizationWideAccess` against the MERGED narrowing map.
186
+ * Fail closed at startup on any violation: a misdeclared widening is a silent authorization hole.
187
+ */
188
+ export declare function collectServiceProviderOrganizationWideAccessViolations(declarations: Readonly<Partial<Record<string, ServiceProviderOrganizationWideAccessDeclaration>>> | undefined, narrowingRegistry: Readonly<Partial<Record<string, OrganizationUnitNarrowingDeclaration>>>): {
189
+ resourceType: string;
190
+ kind: ServiceProviderOrganizationWideAccessViolationKind;
191
+ }[];
130
192
  //# sourceMappingURL=organization-unit-narrowing-decision.shared.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"organization-unit-narrowing-decision.shared.d.ts","sourceRoot":"","sources":["../../../src/organizations/organization-unit-narrowing-decision.shared.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,6CAA6C,CAAC;AAE7F,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAC7E,OAAO,KAAK,EAAE,oCAAoC,EAAE,MAAM,sCAAsC,CAAC;AAGjG,sDAAsD;AACtD,oBAAY,qCAAqC;IAC/C,6FAA6F;IAC7F,YAAY,iBAAiB;IAC7B,2FAA2F;IAC3F,iBAAiB,sBAAsB;IACvC,oFAAoF;IACpF,aAAa,kBAAkB;IAC/B,6EAA6E;IAC7E,MAAM,WAAW;CAClB;AAED,MAAM,MAAM,iCAAiC,GACzC;IAAE,IAAI,EAAE,qCAAqC,CAAC,YAAY,CAAA;CAAE,GAC5D;IAAE,IAAI,EAAE,qCAAqC,CAAC,iBAAiB,CAAA;CAAE,GACjE;IAAE,IAAI,EAAE,qCAAqC,CAAC,aAAa,CAAC;IAAC,aAAa,EAAE,MAAM,CAAC;IAAC,mBAAmB,EAAE,MAAM,EAAE,CAAA;CAAE,GAC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AA0CtI,kFAAkF;AAClF,oBAAY,kDAAkD;IAC5D,0HAA0H;IAC1H,4BAA4B,iCAAiC;IAC7D,sHAAsH;IACtH,wBAAwB,6BAA6B;IACrD,sFAAsF;IACtF,iBAAiB,sBAAsB;CACxC;AAED;;;GAGG;AACH,wBAAgB,sDAAsD,CACpE,YAAY,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,gDAAgD,CAAC,CAAC,CAAC,GAAG,SAAS,EAC7G,iBAAiB,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,oCAAoC,CAAC,CAAC,CAAC,GACzF;IAAE,YAAY,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,kDAAkD,CAAA;CAAE,EAAE,CAetF"}
@@ -20,9 +20,10 @@
20
20
  * operation wins outright and is not narrowed — so opting a resource in can never shrink a result
21
21
  * set that a principal could already see.
22
22
  */
23
- import { isOrganizationWideRoleInfo, selectUnitScopedRoleGrants } from '../runtime/execution-context.shared.schemas.js';
23
+ import { isOrganizationWideRoleInfo, selectRoleInfosActingInOrganization, selectUnitScopedRoleGrants } from '../runtime/execution-context.shared.schemas.js';
24
24
  import { ResourcePrimaryScope } from '../resources/resources.shared.schemas.js';
25
- import { resolveOrganizationUnitNarrowing } from './organization-unit-narrowing.shared.js';
25
+ import { CoreResourceType } from '../resources/resources.shared.core.definitions.js';
26
+ import { ORGANIZATION_UNIT_NARROWING_FORBIDDEN_RESOURCES, resolveOrganizationUnitNarrowing } from './organization-unit-narrowing.shared.js';
26
27
  /** Why a request was allowed — or that it was not. */
27
28
  export var OrganizationUnitNarrowingDecisionKind;
28
29
  (function (OrganizationUnitNarrowingDecisionKind) {
@@ -34,6 +35,13 @@ export var OrganizationUnitNarrowingDecisionKind;
34
35
  OrganizationUnitNarrowingDecisionKind["UNIT_NARROWED"] = "UNIT_NARROWED";
35
36
  /** Neither an organization-wide nor a unit grant satisfies the operation. */
36
37
  OrganizationUnitNarrowingDecisionKind["DENIED"] = "DENIED";
38
+ /**
39
+ * A UNIT-ONLY principal — one holding no organization-wide entry in the target organization, which
40
+ * only a unit-scoped service-provider relationship produces (#1597) — reads a resource the application
41
+ * declared organization-wide for providers (`serviceProviderOrganizationWideAccess`). Admitted with NO
42
+ * row confinement, read-class operations only. Never produced for a resource that narrows by unit.
43
+ */
44
+ OrganizationUnitNarrowingDecisionKind["SERVICE_PROVIDER_ORGANIZATION_WIDE"] = "SERVICE_PROVIDER_ORGANIZATION_WIDE";
37
45
  })(OrganizationUnitNarrowingDecisionKind || (OrganizationUnitNarrowingDecisionKind = {}));
38
46
  /**
39
47
  * How restrictive a decision is. Higher wins when two stamps meet — see
@@ -44,6 +52,13 @@ const NARROWING_RESTRICTIVENESS = {
44
52
  [OrganizationUnitNarrowingDecisionKind.ORGANIZATION_WIDE]: 0,
45
53
  [OrganizationUnitNarrowingDecisionKind.UNIT_NARROWED]: 1,
46
54
  [OrganizationUnitNarrowingDecisionKind.DENIED]: 2,
55
+ // Admits without confinement — and only ever on a resource that does not narrow, so it never meets a
56
+ // UNIT_NARROWED stamp for the same resource. BELOW every other kind (#1597 review 7): it is the one
57
+ // decision that admits a principal holding NO organization-wide entry, so any other decision for the same
58
+ // resource in the same context — a NOT_NARROWED, an ORGANIZATION_WIDE, a DENIED — must replace it rather
59
+ // than let the admission ride on. At an equal weight the FIRST stamp won, so an admitting read's stamp
60
+ // could have outlived a later refusal on the same context.
61
+ [OrganizationUnitNarrowingDecisionKind.SERVICE_PROVIDER_ORGANIZATION_WIDE]: -1,
47
62
  };
48
63
  /**
49
64
  * Combine an existing stamp with a new one for the SAME resource — a stamp may only ever TIGHTEN.
@@ -111,10 +126,19 @@ function satisfiesAnyRequiredRole(heldRoles, requiredRoles, scope, roleHierarchy
111
126
  * held role justifies.
112
127
  */
113
128
  export function resolveOrganizationUnitNarrowingDecision(input) {
114
- const { resourceType, requiredRoles, initiatorRoles, narrowingRegistry, roleHierarchyResolver } = input;
129
+ const { resourceType, requiredRoles, narrowingRegistry, roleHierarchyResolver } = input;
130
+ const initiatorRoles = selectRoleInfosActingInOrganization(input.initiatorRoles, input.organizationId);
115
131
  const narrowing = resolveOrganizationUnitNarrowing(narrowingRegistry, resourceType);
116
- if (!narrowing)
117
- return { kind: OrganizationUnitNarrowingDecisionKind.NOT_NARROWED };
132
+ if (!narrowing) {
133
+ return resolveServiceProviderOrganizationWideAdmission({
134
+ resourceType,
135
+ requiredRoles,
136
+ initiatorRoles,
137
+ roleHierarchyResolver,
138
+ declarations: input.serviceProviderOrganizationWideAccess,
139
+ operationIsReadOnly: input.operationIsReadOnly === true,
140
+ });
141
+ }
118
142
  // ADDITIVE: an organization-wide grant that already satisfies the operation wins outright, so
119
143
  // opting a resource in can never shrink what a principal could already see.
120
144
  const organizationWideRoles = (initiatorRoles ?? []).filter(isOrganizationWideRoleInfo);
@@ -136,4 +160,81 @@ export function resolveOrganizationUnitNarrowingDecision(input) {
136
160
  organizationUnitIds: [...new Set(qualifyingUnitIds)],
137
161
  };
138
162
  }
163
+ /**
164
+ * The ENGINE's own organization-wide reads for a unit-only service-provider principal (#1597) — exactly one resource,
165
+ * and it is the organization row itself.
166
+ *
167
+ * A principal who works in an organization must be able to read which organization that is: its name, type and status,
168
+ * the row an ordinary member reads (its READ requires ORG_MEMBER, which the provider role inherits). Without it the organization switcher — one READ of the row per membership —
169
+ * never lists a client whose relationship is confined to units, so unit scope is unusable through the shipped UI.
170
+ * Reading the row grants nothing else: no other resource, and (by the admission below) no write.
171
+ *
172
+ * Engine-owned rather than an application declaration because the application MAY NOT declare it: ORGANIZATIONS is in
173
+ * the authorization plane, which `collectServiceProviderOrganizationWideAccessViolations` refuses — rightly, since an
174
+ * application widening it could expose a future authority field. The engine owns the row's shape, so the engine is the
175
+ * party that can say its READ is safe. Widening this set is a framework decision, made here and nowhere else.
176
+ */
177
+ export const ENGINE_SERVICE_PROVIDER_ORGANIZATION_WIDE_READS = new Set([CoreResourceType.ORGANIZATIONS]);
178
+ /**
179
+ * The non-narrowed half of the decision (#1597).
180
+ *
181
+ * A resource that does not narrow by unit has nothing to say about a principal who holds an
182
+ * organization-wide entry: `NOT_NARROWED`, and ordinary authorization decides. What is new is the
183
+ * UNIT-ONLY principal — one who holds unit entries in the target organization and NO organization-wide
184
+ * entry there. Only a unit-scoped service-provider relationship produces one: an ordinary unit member
185
+ * always also holds the organization-wide entry of the membership their unit role hangs from.
186
+ *
187
+ * Detected STRUCTURALLY (no org-wide entry), never by reading the relationship attribution on the role
188
+ * entry — that field is audit-only by contract, and an authority decision reading it would make audit
189
+ * metadata a control.
190
+ *
191
+ * Such a principal is admitted only when all hold, and otherwise gets `NOT_NARROWED`, which ordinary
192
+ * authorization then refuses because no organization-wide entry satisfies anything (fail closed):
193
+ * - the application declared the resource in `serviceProviderOrganizationWideAccess`, or the engine did
194
+ * ({@link ENGINE_SERVICE_PROVIDER_ORGANIZATION_WIDE_READS} — the organization's own row);
195
+ * - the operation only reads;
196
+ * - one of the unit entries satisfies the operation's roles.
197
+ */
198
+ function resolveServiceProviderOrganizationWideAdmission(input) {
199
+ const notNarrowed = { kind: OrganizationUnitNarrowingDecisionKind.NOT_NARROWED };
200
+ if (!input.declarations?.[input.resourceType] && !ENGINE_SERVICE_PROVIDER_ORGANIZATION_WIDE_READS.has(input.resourceType))
201
+ return notNarrowed;
202
+ if (!input.operationIsReadOnly)
203
+ return notNarrowed;
204
+ const organizationEntries = input.initiatorRoles.filter((roleInfo) => roleInfo.relatedPrimaryScope === ResourcePrimaryScope.ORGANIZATIONS);
205
+ if (organizationEntries.some(isOrganizationWideRoleInfo))
206
+ return notNarrowed;
207
+ const satisfied = selectUnitScopedRoleGrants(organizationEntries).some((grant) => satisfiesAnyRequiredRole(grant.roles, input.requiredRoles, ResourcePrimaryScope.ORGANIZATIONS, input.roleHierarchyResolver));
208
+ return satisfied ? { kind: OrganizationUnitNarrowingDecisionKind.SERVICE_PROVIDER_ORGANIZATION_WIDE } : notNarrowed;
209
+ }
210
+ /** Why a `serviceProviderOrganizationWideAccess` entry was refused at startup. */
211
+ export var ServiceProviderOrganizationWideAccessViolationKind;
212
+ (function (ServiceProviderOrganizationWideAccessViolationKind) {
213
+ /** The resource issues authority (the authorization plane) — a provider must never read it tenant-wide by declaration. */
214
+ ServiceProviderOrganizationWideAccessViolationKind["AUTHORIZATION_PLANE_RESOURCE"] = "AUTHORIZATION_PLANE_RESOURCE";
215
+ /** The resource already narrows by unit; declaring it organization-wide for providers would make one decision two. */
216
+ ServiceProviderOrganizationWideAccessViolationKind["RESOURCE_NARROWS_BY_UNIT"] = "RESOURCE_NARROWS_BY_UNIT";
217
+ /** No rationale — the declaration's whole review value is the sentence saying why. */
218
+ ServiceProviderOrganizationWideAccessViolationKind["MISSING_RATIONALE"] = "MISSING_RATIONALE";
219
+ })(ServiceProviderOrganizationWideAccessViolationKind || (ServiceProviderOrganizationWideAccessViolationKind = {}));
220
+ /**
221
+ * Validate an application's `serviceProviderOrganizationWideAccess` against the MERGED narrowing map.
222
+ * Fail closed at startup on any violation: a misdeclared widening is a silent authorization hole.
223
+ */
224
+ export function collectServiceProviderOrganizationWideAccessViolations(declarations, narrowingRegistry) {
225
+ const forbidden = new Set(ORGANIZATION_UNIT_NARROWING_FORBIDDEN_RESOURCES);
226
+ const violations = [];
227
+ for (const [resourceType, declaration] of Object.entries(declarations ?? {})) {
228
+ if (forbidden.has(resourceType)) {
229
+ violations.push({ resourceType, kind: ServiceProviderOrganizationWideAccessViolationKind.AUTHORIZATION_PLANE_RESOURCE });
230
+ }
231
+ if (narrowingRegistry[resourceType]) {
232
+ violations.push({ resourceType, kind: ServiceProviderOrganizationWideAccessViolationKind.RESOURCE_NARROWS_BY_UNIT });
233
+ }
234
+ if (typeof declaration?.rationale !== 'string' || declaration.rationale.trim().length === 0) {
235
+ violations.push({ resourceType, kind: ServiceProviderOrganizationWideAccessViolationKind.MISSING_RATIONALE });
236
+ }
237
+ }
238
+ return violations;
239
+ }
139
240
  //# sourceMappingURL=organization-unit-narrowing-decision.shared.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"organization-unit-narrowing-decision.shared.js","sourceRoot":"","sources":["../../../../src/organizations/organization-unit-narrowing-decision.shared.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAGH,OAAO,EAAE,0BAA0B,EAAE,0BAA0B,EAAE,MAAM,6CAA6C,CAAC;AACrH,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAE7E,OAAO,EAAE,gCAAgC,EAAE,MAAM,sCAAsC,CAAC;AAExF,sDAAsD;AACtD,MAAM,CAAN,IAAY,qCASX;AATD,WAAY,qCAAqC;IAC/C,6FAA6F;IAC7F,sEAA6B,CAAA;IAC7B,2FAA2F;IAC3F,gFAAuC,CAAA;IACvC,oFAAoF;IACpF,wEAA+B,CAAA;IAC/B,6EAA6E;IAC7E,0DAAiB,CAAA;AACnB,CAAC,EATW,qCAAqC,KAArC,qCAAqC,QAShD;AA2CD;;;GAGG;AACH,MAAM,yBAAyB,GAAoE;IACjG,CAAC,qCAAqC,CAAC,YAAY,CAAC,EAAE,CAAC;IACvD,CAAC,qCAAqC,CAAC,iBAAiB,CAAC,EAAE,CAAC;IAC5D,CAAC,qCAAqC,CAAC,aAAa,CAAC,EAAE,CAAC;IACxD,CAAC,qCAAqC,CAAC,MAAM,CAAC,EAAE,CAAC;CAClD,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,oCAAoC,CAClD,aAAyD,EACzD,aAA6C;IAE7C,IAAI,CAAC,aAAa;QAAE,OAAO,aAAa,CAAC;IAEzC,MAAM,cAAc,GAAG,yBAAyB,CAAC,aAAa,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC9E,MAAM,cAAc,GAAG,yBAAyB,CAAC,aAAa,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IAE9E,IACE,aAAa,CAAC,QAAQ,CAAC,IAAI,KAAK,qCAAq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a;QACtC,iGAAiG;QACjG,mBAAmB,EAAE,CAAC,GAAG,IAAI,GAAG,CAAC,iBAAiB,CAAC,CAAC;KACrD,CAAC;AACJ,CAAC","sourcesContent":["/**\n * The single authority deciding whether — and how — a request is narrowed by organization unit.\n *\n * ## Why one function rather than two checks\n *\n * The decision is consumed in two places that live in different services: the OPERATION GATE (may\n * this caller attempt this at all?) and the ROW FILTER / WRITE VALIDATION (which rows may they\n * touch?). Those must agree exactly. If the gate admits a caller on the strength of a unit grant and\n * the filter then fails to narrow, that unit grant has silently become organization-wide access —\n * the precise escalation the narrowing model exists to avoid. Deriving both from one function makes\n * disagreement impossible rather than merely unlikely.\n *\n * It is also the \"record the conferring grant\" surface: the returned decision names WHY access was\n * allowed, which is what an access review needs in order to answer \"why does this person have access\n * to this record?\".\n *\n * ## The algebra (plan decision D-C3b — ADDITIVE)\n *\n * Unit grants ADD reach; they never subtract. An organization-wide grant that already satisfies the\n * operation wins outright and is not narrowed — so opting a resource in can never shrink a result\n * set that a principal could already see.\n */\n\nimport type { ExecutionContext_RoleInfo } from '../runtime/execution-context.shared.schemas';\nimport { isOrganizationWideRoleInfo, selectUnitScopedRoleGrants } from '../runtime/execution-context.shared.schemas';\nimport { ResourcePrimaryScope } from '../resources/resources.shared.schemas';\nimport type { OrganizationUnitNarrowingDeclaration } from './organization-unit-narrowing.shared';\nimport { resolveOrganizationUnitNarrowing } from './organization-unit-narrowing.shared';\n\n/** Why a request was allowed — or that it was not. */\nexport enum OrganizationUnitNarrowingDecisionKind {\n /** The resource does not participate in unit narrowing; authorization proceeds unchanged. */\n NOT_NARROWED = 'NOT_NARROWED',\n /** An organization-wide grant satisfies the operation. No narrowing applies (additive). */\n ORGANIZATION_WIDE = 'ORGANIZATION_WIDE',\n /** ONLY unit grants satisfy the operation, so access is confined to those units. */\n UNIT_NARROWED = 'UNIT_NARROWED',\n /** Neither an organization-wide nor a unit grant satisfies the operation. */\n DENIED = 'DENIED',\n}\n\nexport type OrganizationUnitNarrowingDecision =\n | { kind: OrganizationUnitNarrowingDecisionKind.NOT_NARROWED }\n | { kind: OrganizationUnitNarrowingDecisionKind.ORGANIZATION_WIDE }\n | { kind: OrganizationUnitNarrowingDecisionKind.UNIT_NARROWED; unitFieldName: string; organizationUnitIds: string[] }\n | { kind: OrganizationUnitNarrowingDecisionKind.DENIED };\n\n/**\n * A decision as STAMPED on an execution context — the conferring-grant record.\n *\n * assurance-control: WILDO.ACCESS.SCOPE_CONFINEMENT — records WHY a principal reached a\n * record, which is the input an access review needs to answer \"why does this person have access to\n * this?\" without reconstructing it from role tables.\n *\n * The extra fields beyond {@link decision} exist for that review, not for the runtime rule: the\n * runtime only ever reads `decision`. `requiredRoles` is what the operation demanded and\n * `operationIdentifier` is what was attempted, so a reviewer can see the demand, the answer and the\n * units it resolved to in one record.\n */\nexport type OrganizationUnitNarrowingStamp = {\n /** The resource the decision was computed FOR. A stamp is only ever valid for this resource. */\n readonly resourceType: string;\n /** The operation whose role set was evaluated. Diagnostic/audit only — never a lookup key. */\n readonly operationIdentifier: string;\n /** The operation's declared role set at evaluation time. */\n readonly requiredRoles: readonly string[];\n /** The decision itself — the only field the runtime rule reads. */\n readonly decision: OrganizationUnitNarrowingDecision;\n /**\n * Of the units in a `UNIT_NARROWED` decision, the ones reached ONLY through downward inheritance\n * rather than held directly.\n *\n * Audit-only, and the reason it exists is specific: with `INHERIT_DOWN`, a grant at a ROOT unit\n * reaches the entire organization chart — functionally organization-wide access assembled from one\n * narrow grant (plan decision D-C4, watch item 4). Reporting only the effective set would make that\n * indistinguishable from a genuinely narrow grant in the access record. Splitting it lets a reviewer\n * see \"granted at Sales, effective across Sales and 12 descendants\" and judge whether that is what\n * was intended.\n */\n readonly inheritedOrganizationUnitIds?: readonly string[];\n};\n\n/**\n * How restrictive a decision is. Higher wins when two stamps meet — see\n * {@link mergeOrganizationUnitNarrowingStamps}.\n */\nconst NARROWING_RESTRICTIVENESS: Readonly<Record<OrganizationUnitNarrowingDecisionKind, number>> = {\n [OrganizationUnitNarrowingDecisionKind.NOT_NARROWED]: 0,\n [OrganizationUnitNarrowingDecisionKind.ORGANIZATION_WIDE]: 0,\n [OrganizationUnitNarrowingDecisionKind.UNIT_NARROWED]: 1,\n [OrganizationUnitNarrowingDecisionKind.DENIED]: 2,\n};\n\n/**\n * Combine an existing stamp with a new one for the SAME resource — a stamp may only ever TIGHTEN.\n *\n * ## Why this is not \"last write wins\", and not \"throw on conflict\"\n *\n * The execution context is reachable by any backend code holding it, so a plain overwrite would let\n * a later `ORGANIZATION_WIDE` stamp erase an earlier `UNIT_NARROWED` one and lift the narrowing —\n * the same privilege-escalation surface the retention see-through setter is guarded against.\n * Throwing on a conflict was rejected instead: the gate is legitimately re-entered within one request\n * (field-validation pre-checks, the MCP tool dispatcher re-running the controller gate), and turning\n * a legitimate re-entry into an exception converts a safe situation into a 500.\n *\n * Monotonic tightening satisfies both: a second evaluation can restrict further, never widen. Two\n * `UNIT_NARROWED` stamps INTERSECT their unit sets for the same reason.\n *\n * The cost is deliberate over-restriction in one edge case: if two operations on the same resource\n * within one request legitimately resolve differently (one satisfied organization-wide, one only by a\n * unit grant), the narrower answer governs both. That is the fail-safe direction.\n */\nexport function mergeOrganizationUnitNarrowingStamps(\n existingStamp: OrganizationUnitNarrowingStamp | undefined,\n incomingStamp: OrganizationUnitNarrowingStamp,\n): OrganizationUnitNarrowingStamp {\n if (!existingStamp) return incomingStamp;\n\n const existingWeight = NARROWING_RESTRICTIVENESS[existingStamp.decision.kind];\n const incomingWeight = NARROWING_RESTRICTIVENESS[incomingStamp.decision.kind];\n\n if (\n existingStamp.decision.kind === OrganizationUnitNarrowingDecisionKind.UNIT_NARROWED &&\n incomingStamp.decision.kind === OrganizationUnitNarrowingDecisionKind.UNIT_NARROWED\n ) {\n const existingUnitIds = new Set(existingStamp.decision.organizationUnitIds);\n const intersectedUnitIds = incomingStamp.decision.organizationUnitIds.filter((unitId) => existingUnitIds.has(unitId));\n // The audit split follows the intersection: an inherited unit that did not survive is no longer\n // reached, so reporting it would overstate the grant in the very record a reviewer reads.\n const survivingIntersectedUnitIds = new Set(intersectedUnitIds);\n return {\n ...incomingStamp,\n decision: { ...incomingStamp.decision, organizationUnitIds: intersectedUnitIds },\n inheritedOrganizationUnitIds: (incomingStamp.inheritedOrganizationUnitIds ?? []).filter((unitId) =>\n survivingIntersectedUnitIds.has(unitId)),\n };\n }\n\n return incomingWeight > existingWeight ? incomingStamp : existingStamp;\n}\n\n/** Expands one role into everything it confers within a scope — the runtime `inheritFrom` chain. */\nexport type OrganizationUnitRoleHierarchyResolver = (role: string, scope: ResourcePrimaryScope) => string[];\n\n/** Does any of `heldRoles` confer at least one of `requiredRoles`, within `scope`? */\nfunction satisfiesAnyRequiredRole(\n heldRoles: readonly string[],\n requiredRoles: readonly string[],\n scope: ResourcePrimaryScope,\n roleHierarchyResolver: OrganizationUnitRoleHierarchyResolver,\n): boolean {\n if (requiredRoles.length === 0) return false;\n const conferred = new Set<string>(heldRoles.flatMap((role) => roleHierarchyResolver(role, scope)));\n return requiredRoles.some((requiredRole) => conferred.has(requiredRole));\n}\n\n/**\n * Decide the narrowing posture for one request.\n *\n * `requiredRoles` is the operation's declared role set. An operation declaring NO roles is not\n * treated as \"anyone passes\" here — this function only ever ANSWERS the unit question, and returns\n * {@link OrganizationUnitNarrowingDecisionKind.NOT_NARROWED} so the caller's existing authorization\n * logic remains the authority for every non-unit consideration.\n *\n * Evaluation order encodes the additive rule:\n * 1. resource not opted in → NOT_NARROWED (nothing to say)\n * 2. organization-wide grant suffices → ORGANIZATION_WIDE (widest wins; no narrowing)\n * 3. unit grant suffices → UNIT_NARROWED, confined to the units that supplied it\n * 4. otherwise → DENIED\n *\n * Step 3 confines access to the units whose grant ACTUALLY satisfied the operation, not to every\n * unit the principal belongs to. A member who is ORG_MANAGER of Sales and ORG_GUEST of Legal, acting\n * on a MANAGER-gated operation, reaches Sales only — carrying Legal along would grant reach that no\n * held role justifies.\n */\nexport function resolveOrganizationUnitNarrowingDecision(input: {\n readonly resourceType: string;\n readonly requiredRoles: readonly string[];\n readonly initiatorRoles: readonly ExecutionContext_RoleInfo[] | undefined;\n readonly narrowingRegistry: Readonly<Partial<Record<string, OrganizationUnitNarrowingDeclaration>>>;\n readonly roleHierarchyResolver: OrganizationUnitRoleHierarchyResolver;\n}): OrganizationUnitNarrowingDecision {\n const { resourceType, requiredRoles, initiatorRoles, narrowingRegistry, roleHierarchyResolver } = input;\n\n const narrowing = resolveOrganizationUnitNarrowing(narrowingRegistry, resourceType);\n if (!narrowing) return { kind: OrganizationUnitNarrowingDecisionKind.NOT_NARROWED };\n\n // ADDITIVE: an organization-wide grant that already satisfies the operation wins outright, so\n // opting a resource in can never shrink what a principal could already see.\n const organizationWideRoles = (initiatorRoles ?? []).filter(isOrganizationWideRoleInfo);\n for (const roleInfo of organizationWideRoles) {\n if (satisfiesAnyRequiredRole(roleInfo.roles, requiredRoles, roleInfo.relatedPrimaryScope, roleHierarchyResolver)) {\n return { kind: OrganizationUnitNarrowingDecisionKind.ORGANIZATION_WIDE };\n }\n }\n\n // Only the units whose grant actually satisfies the operation confer reach.\n const qualifyingUnitIds = selectUnitScopedRoleGrants(initiatorRoles)\n .filter((grant) =>\n satisfiesAnyRequiredRole(grant.roles, requiredRoles, ResourcePrimaryScope.ORGANIZATIONS, roleHierarchyResolver))\n .map((grant) => grant.organizationUnitId);\n\n if (qualifyingUnitIds.length === 0) return { kind: OrganizationUnitNarrowingDecisionKind.DENIED };\n\n return {\n kind: OrganizationUnitNarrowingDecisionKind.UNIT_NARROWED,\n unitFieldName: narrowing.unitFieldName,\n // De-duplicated: several grants can name the same unit, and the value becomes a query predicate.\n organizationUnitIds: [...new Set(qualifyingUnitIds)],\n };\n}\n"]}
1
+ {"version":3,"file":"organization-unit-narrowing-decision.shared.js","sourceRoot":"","sources":["../../../../src/organizations/organization-unit-narrowing-decision.shared.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAGH,OAA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AAE,CAAC;YAC5F,UAAU,CAAC,IAAI,CAAC,EAAE,YAAY,EAAE,IAAI,EAAE,kDAAkD,CAAC,iBAAiB,EAAE,CAAC,CAAC;QAChH,CAAC;IACH,CAAC;IACD,OAAO,UAAU,CAAC;AACpB,CAAC","sourcesContent":["/**\n * The single authority deciding whether — and how — a request is narrowed by organization unit.\n *\n * ## Why one function rather than two checks\n *\n * The decision is consumed in two places that live in different services: the OPERATION GATE (may\n * this caller attempt this at all?) and the ROW FILTER / WRITE VALIDATION (which rows may they\n * touch?). Those must agree exactly. If the gate admits a caller on the strength of a unit grant and\n * the filter then fails to narrow, that unit grant has silently become organization-wide access —\n * the precise escalation the narrowing model exists to avoid. Deriving both from one function makes\n * disagreement impossible rather than merely unlikely.\n *\n * It is also the \"record the conferring grant\" surface: the returned decision names WHY access was\n * allowed, which is what an access review needs in order to answer \"why does this person have access\n * to this record?\".\n *\n * ## The algebra (plan decision D-C3b — ADDITIVE)\n *\n * Unit grants ADD reach; they never subtract. An organization-wide grant that already satisfies the\n * operation wins outright and is not narrowed — so opting a resource in can never shrink a result\n * set that a principal could already see.\n */\n\nimport type { ExecutionContext_RoleInfo } from '../runtime/execution-context.shared.schemas';\nimport { isOrganizationWideRoleInfo, selectRoleInfosActingInOrganization, selectUnitScopedRoleGrants } from '../runtime/execution-context.shared.schemas';\nimport { ResourcePrimaryScope } from '../resources/resources.shared.schemas';\nimport { CoreResourceType } from '../resources/resources.shared.core.definitions';\nimport type { OrganizationUnitNarrowingDeclaration } from './organization-unit-narrowing.shared';\nimport { ORGANIZATION_UNIT_NARROWING_FORBIDDEN_RESOURCES, resolveOrganizationUnitNarrowing } from './organization-unit-narrowing.shared';\n\n/** Why a request was allowed — or that it was not. */\nexport enum OrganizationUnitNarrowingDecisionKind {\n /** The resource does not participate in unit narrowing; authorization proceeds unchanged. */\n NOT_NARROWED = 'NOT_NARROWED',\n /** An organization-wide grant satisfies the operation. No narrowing applies (additive). */\n ORGANIZATION_WIDE = 'ORGANIZATION_WIDE',\n /** ONLY unit grants satisfy the operation, so access is confined to those units. */\n UNIT_NARROWED = 'UNIT_NARROWED',\n /** Neither an organization-wide nor a unit grant satisfies the operation. */\n DENIED = 'DENIED',\n /**\n * A UNIT-ONLY principal — one holding no organization-wide entry in the target organization, which\n * only a unit-scoped service-provider relationship produces (#1597) — reads a resource the application\n * declared organization-wide for providers (`serviceProviderOrganizationWideAccess`). Admitted with NO\n * row confinement, read-class operations only. Never produced for a resource that narrows by unit.\n */\n SERVICE_PROVIDER_ORGANIZATION_WIDE = 'SERVICE_PROVIDER_ORGANIZATION_WIDE',\n}\n\nexport type OrganizationUnitNarrowingDecision =\n | { kind: OrganizationUnitNarrowingDecisionKind.NOT_NARROWED }\n | { kind: OrganizationUnitNarrowingDecisionKind.ORGANIZATION_WIDE }\n | { kind: OrganizationUnitNarrowingDecisionKind.UNIT_NARROWED; unitFieldName: string; organizationUnitIds: string[] }\n | { kind: OrganizationUnitNarrowingDecisionKind.DENIED }\n | { kind: OrganizationUnitNarrowingDecisionKind.SERVICE_PROVIDER_ORGANIZATION_WIDE };\n\n/**\n * A decision as STAMPED on an execution context — the conferring-grant record.\n *\n * assurance-control: WILDO.ACCESS.SCOPE_CONFINEMENT — records WHY a principal reached a\n * record, which is the input an access review needs to answer \"why does this person have access to\n * this?\" without reconstructing it from role tables.\n *\n * The extra fields beyond {@link decision} exist for that review, not for the runtime rule: the\n * runtime only ever reads `decision`. `requiredRoles` is what the operation demanded and\n * `operationIdentifier` is what was attempted, so a reviewer can see the demand, the answer and the\n * units it resolved to in one record.\n */\nexport type OrganizationUnitNarrowingStamp = {\n /** The resource the decision was computed FOR. A stamp is only ever valid for this resource. */\n readonly resourceType: string;\n /** The operation whose role set was evaluated. Diagnostic/audit only — never a lookup key. */\n readonly operationIdentifier: string;\n /** The operation's declared role set at evaluation time. */\n readonly requiredRoles: readonly string[];\n /** The decision itself — the only field the runtime rule reads. */\n readonly decision: OrganizationUnitNarrowingDecision;\n /**\n * Of the units in a `UNIT_NARROWED` decision, the ones reached ONLY through downward inheritance\n * rather than held directly.\n *\n * Audit-only, and the reason it exists is specific: with `INHERIT_DOWN`, a grant at a ROOT unit\n * reaches the entire organization chart — functionally organization-wide access assembled from one\n * narrow grant (plan decision D-C4, watch item 4). Reporting only the effective set would make that\n * indistinguishable from a genuinely narrow grant in the access record. Splitting it lets a reviewer\n * see \"granted at Sales, effective across Sales and 12 descendants\" and judge whether that is what\n * was intended.\n */\n readonly inheritedOrganizationUnitIds?: readonly string[];\n};\n\n/**\n * How restrictive a decision is. Higher wins when two stamps meet — see\n * {@link mergeOrganizationUnitNarrowingStamps}.\n */\nconst NARROWING_RESTRICTIVENESS: Readonly<Record<OrganizationUnitNarrowingDecisionKind, number>> = {\n [OrganizationUnitNarrowingDecisionKind.NOT_NARROWED]: 0,\n [OrganizationUnitNarrowingDecisionKind.ORGANIZATION_WIDE]: 0,\n [OrganizationUnitNarrowingDecisionKind.UNIT_NARROWED]: 1,\n [OrganizationUnitNarrowingDecisionKind.DENIED]: 2,\n // Admits without confinement — and only ever on a resource that does not narrow, so it never meets a\n // UNIT_NARROWED stamp for the same resource. BELOW every other kind (#1597 review 7): it is the one\n // decision that admits a principal holding NO organization-wide entry, so any other decision for the same\n // resource in the same context — a NOT_NARROWED, an ORGANIZATION_WIDE, a DENIED — must replace it rather\n // than let the admission ride on. At an equal weight the FIRST stamp won, so an admitting read's stamp\n // could have outlived a later refusal on the same context.\n [OrganizationUnitNarrowingDecisionKind.SERVICE_PROVIDER_ORGANIZATION_WIDE]: -1,\n};\n\n/**\n * Combine an existing stamp with a new one for the SAME resource — a stamp may only ever TIGHTEN.\n *\n * ## Why this is not \"last write wins\", and not \"throw on conflict\"\n *\n * The execution context is reachable by any backend code holding it, so a plain overwrite would let\n * a later `ORGANIZATION_WIDE` stamp erase an earlier `UNIT_NARROWED` one and lift the narrowing —\n * the same privilege-escalation surface the retention see-through setter is guarded against.\n * Throwing on a conflict was rejected instead: the gate is legitimately re-entered within one request\n * (field-validation pre-checks, the MCP tool dispatcher re-running the controller gate), and turning\n * a legitimate re-entry into an exception converts a safe situation into a 500.\n *\n * Monotonic tightening satisfies both: a second evaluation can restrict further, never widen. Two\n * `UNIT_NARROWED` stamps INTERSECT their unit sets for the same reason.\n *\n * The cost is deliberate over-restriction in one edge case: if two operations on the same resource\n * within one request legitimately resolve differently (one satisfied organization-wide, one only by a\n * unit grant), the narrower answer governs both. That is the fail-safe direction.\n */\nexport function mergeOrganizationUnitNarrowingStamps(\n existingStamp: OrganizationUnitNarrowingStamp | undefined,\n incomingStamp: OrganizationUnitNarrowingStamp,\n): OrganizationUnitNarrowingStamp {\n if (!existingStamp) return incomingStamp;\n\n const existingWeight = NARROWING_RESTRICTIVENESS[existingStamp.decision.kind];\n const incomingWeight = NARROWING_RESTRICTIVENESS[incomingStamp.decision.kind];\n\n if (\n existingStamp.decision.kind === OrganizationUnitNarrowingDecisionKind.UNIT_NARROWED &&\n incomingStamp.decision.kind === OrganizationUnitNarrowingDecisionKind.UNIT_NARROWED\n ) {\n const existingUnitIds = new Set(existingStamp.decision.organizationUnitIds);\n const intersectedUnitIds = incomingStamp.decision.organizationUnitIds.filter((unitId) => existingUnitIds.has(unitId));\n // The audit split follows the intersection: an inherited unit that did not survive is no longer\n // reached, so reporting it would overstate the grant in the very record a reviewer reads.\n const survivingIntersectedUnitIds = new Set(intersectedUnitIds);\n return {\n ...incomingStamp,\n decision: { ...incomingStamp.decision, organizationUnitIds: intersectedUnitIds },\n inheritedOrganizationUnitIds: (incomingStamp.inheritedOrganizationUnitIds ?? []).filter((unitId) =>\n survivingIntersectedUnitIds.has(unitId)),\n };\n }\n\n return incomingWeight > existingWeight ? incomingStamp : existingStamp;\n}\n\n/** Expands one role into everything it confers within a scope — the runtime `inheritFrom` chain. */\nexport type OrganizationUnitRoleHierarchyResolver = (role: string, scope: ResourcePrimaryScope) => string[];\n\n/** Does any of `heldRoles` confer at least one of `requiredRoles`, within `scope`? */\nfunction satisfiesAnyRequiredRole(\n heldRoles: readonly string[],\n requiredRoles: readonly string[],\n scope: ResourcePrimaryScope,\n roleHierarchyResolver: OrganizationUnitRoleHierarchyResolver,\n): boolean {\n if (requiredRoles.length === 0) return false;\n const conferred = new Set<string>(heldRoles.flatMap((role) => roleHierarchyResolver(role, scope)));\n return requiredRoles.some((requiredRole) => conferred.has(requiredRole));\n}\n\n/**\n * Decide the narrowing posture for one request.\n *\n * `requiredRoles` is the operation's declared role set. An operation declaring NO roles is not\n * treated as \"anyone passes\" here — this function only ever ANSWERS the unit question, and returns\n * {@link OrganizationUnitNarrowingDecisionKind.NOT_NARROWED} so the caller's existing authorization\n * logic remains the authority for every non-unit consideration.\n *\n * Evaluation order encodes the additive rule:\n * 1. resource not opted in → NOT_NARROWED (nothing to say)\n * 2. organization-wide grant suffices → ORGANIZATION_WIDE (widest wins; no narrowing)\n * 3. unit grant suffices → UNIT_NARROWED, confined to the units that supplied it\n * 4. otherwise → DENIED\n *\n * Step 3 confines access to the units whose grant ACTUALLY satisfied the operation, not to every\n * unit the principal belongs to. A member who is ORG_MANAGER of Sales and ORG_GUEST of Legal, acting\n * on a MANAGER-gated operation, reaches Sales only — carrying Legal along would grant reach that no\n * held role justifies.\n */\nexport function resolveOrganizationUnitNarrowingDecision(input: {\n readonly resourceType: string;\n readonly requiredRoles: readonly string[];\n readonly initiatorRoles: readonly ExecutionContext_RoleInfo[] | undefined;\n /**\n * The organization the request acts inside. Only role entries held IN it are evaluated — an\n * ORG_ADMIN of another tenant must neither satisfy the organization-wide step nor lift narrowing\n * here (see `selectRoleInfosActingInOrganization`). Absent ⇒ no organization entry counts.\n */\n readonly organizationId: string | undefined;\n readonly narrowingRegistry: Readonly<Partial<Record<string, OrganizationUnitNarrowingDeclaration>>>;\n readonly roleHierarchyResolver: OrganizationUnitRoleHierarchyResolver;\n /**\n * Resources the application declared readable organization-wide by a UNIT-scoped service provider\n * (`serviceProviderOrganizationWideAccess`). Absent ⇒ none.\n */\n readonly serviceProviderOrganizationWideAccess?: Readonly<Partial<Record<string, ServiceProviderOrganizationWideAccessDeclaration>>>;\n /** Whether the operation only READS (`READ`/`LIST`/`SEARCH`/`COUNT`). The provider declaration admits nothing else. */\n readonly operationIsReadOnly?: boolean;\n}): OrganizationUnitNarrowingDecision {\n const { resourceType, requiredRoles, narrowingRegistry, roleHierarchyResolver } = input;\n const initiatorRoles = selectRoleInfosActingInOrganization(input.initiatorRoles, input.organizationId);\n\n const narrowing = resolveOrganizationUnitNarrowing(narrowingRegistry, resourceType);\n if (!narrowing) {\n return resolveServiceProviderOrganizationWideAdmission({\n resourceType,\n requiredRoles,\n initiatorRoles,\n roleHierarchyResolver,\n declarations: input.serviceProviderOrganizationWideAccess,\n operationIsReadOnly: input.operationIsReadOnly === true,\n });\n }\n\n // ADDITIVE: an organization-wide grant that already satisfies the operation wins outright, so\n // opting a resource in can never shrink what a principal could already see.\n const organizationWideRoles = (initiatorRoles ?? []).filter(isOrganizationWideRoleInfo);\n for (const roleInfo of organizationWideRoles) {\n if (satisfiesAnyRequiredRole(roleInfo.roles, requiredRoles, roleInfo.relatedPrimaryScope, roleHierarchyResolver)) {\n return { kind: OrganizationUnitNarrowingDecisionKind.ORGANIZATION_WIDE };\n }\n }\n\n // Only the units whose grant actually satisfies the operation confer reach.\n const qualifyingUnitIds = selectUnitScopedRoleGrants(initiatorRoles)\n .filter((grant) =>\n satisfiesAnyRequiredRole(grant.roles, requiredRoles, ResourcePrimaryScope.ORGANIZATIONS, roleHierarchyResolver))\n .map((grant) => grant.organizationUnitId);\n\n if (qualifyingUnitIds.length === 0) return { kind: OrganizationUnitNarrowingDecisionKind.DENIED };\n\n return {\n kind: OrganizationUnitNarrowingDecisionKind.UNIT_NARROWED,\n unitFieldName: narrowing.unitFieldName,\n // De-duplicated: several grants can name the same unit, and the value becomes a query predicate.\n organizationUnitIds: [...new Set(qualifyingUnitIds)],\n };\n}\n\n/**\n * An application's statement that a UNIT-scoped service-provider expert may READ a resource across the\n * whole client organization — a shared reference list, say — even though the resource does not narrow\n * by unit. The rationale is required: it is what a reviewer reads to judge whether the widening is right.\n */\nexport type ServiceProviderOrganizationWideAccessDeclaration = { readonly rationale: string };\n\n/**\n * The ENGINE's own organization-wide reads for a unit-only service-provider principal (#1597) — exactly one resource,\n * and it is the organization row itself.\n *\n * A principal who works in an organization must be able to read which organization that is: its name, type and status,\n * the row an ordinary member reads (its READ requires ORG_MEMBER, which the provider role inherits). Without it the organization switcher — one READ of the row per membership —\n * never lists a client whose relationship is confined to units, so unit scope is unusable through the shipped UI.\n * Reading the row grants nothing else: no other resource, and (by the admission below) no write.\n *\n * Engine-owned rather than an application declaration because the application MAY NOT declare it: ORGANIZATIONS is in\n * the authorization plane, which `collectServiceProviderOrganizationWideAccessViolations` refuses — rightly, since an\n * application widening it could expose a future authority field. The engine owns the row's shape, so the engine is the\n * party that can say its READ is safe. Widening this set is a framework decision, made here and nowhere else.\n */\nexport const ENGINE_SERVICE_PROVIDER_ORGANIZATION_WIDE_READS: ReadonlySet<string> = new Set<string>([CoreResourceType.ORGANIZATIONS]);\n\n/**\n * The non-narrowed half of the decision (#1597).\n *\n * A resource that does not narrow by unit has nothing to say about a principal who holds an\n * organization-wide entry: `NOT_NARROWED`, and ordinary authorization decides. What is new is the\n * UNIT-ONLY principal — one who holds unit entries in the target organization and NO organization-wide\n * entry there. Only a unit-scoped service-provider relationship produces one: an ordinary unit member\n * always also holds the organization-wide entry of the membership their unit role hangs from.\n *\n * Detected STRUCTURALLY (no org-wide entry), never by reading the relationship attribution on the role\n * entry — that field is audit-only by contract, and an authority decision reading it would make audit\n * metadata a control.\n *\n * Such a principal is admitted only when all hold, and otherwise gets `NOT_NARROWED`, which ordinary\n * authorization then refuses because no organization-wide entry satisfies anything (fail closed):\n * - the application declared the resource in `serviceProviderOrganizationWideAccess`, or the engine did\n * ({@link ENGINE_SERVICE_PROVIDER_ORGANIZATION_WIDE_READS} — the organization's own row);\n * - the operation only reads;\n * - one of the unit entries satisfies the operation's roles.\n */\nfunction resolveServiceProviderOrganizationWideAdmission(input: {\n readonly resourceType: string;\n readonly requiredRoles: readonly string[];\n readonly initiatorRoles: readonly ExecutionContext_RoleInfo[];\n readonly roleHierarchyResolver: OrganizationUnitRoleHierarchyResolver;\n readonly declarations: Readonly<Partial<Record<string, ServiceProviderOrganizationWideAccessDeclaration>>> | undefined;\n readonly operationIsReadOnly: boolean;\n}): OrganizationUnitNarrowingDecision {\n const notNarrowed = { kind: OrganizationUnitNarrowingDecisionKind.NOT_NARROWED } as const;\n if (!input.declarations?.[input.resourceType] && !ENGINE_SERVICE_PROVIDER_ORGANIZATION_WIDE_READS.has(input.resourceType)) return notNarrowed;\n if (!input.operationIsReadOnly) return notNarrowed;\n\n const organizationEntries = input.initiatorRoles.filter((roleInfo) => roleInfo.relatedPrimaryScope === ResourcePrimaryScope.ORGANIZATIONS);\n if (organizationEntries.some(isOrganizationWideRoleInfo)) return notNarrowed;\n\n const satisfied = selectUnitScopedRoleGrants(organizationEntries).some((grant) =>\n satisfiesAnyRequiredRole(grant.roles, input.requiredRoles, ResourcePrimaryScope.ORGANIZATIONS, input.roleHierarchyResolver));\n return satisfied ? { kind: OrganizationUnitNarrowingDecisionKind.SERVICE_PROVIDER_ORGANIZATION_WIDE } : notNarrowed;\n}\n\n/** Why a `serviceProviderOrganizationWideAccess` entry was refused at startup. */\nexport enum ServiceProviderOrganizationWideAccessViolationKind {\n /** The resource issues authority (the authorization plane) — a provider must never read it tenant-wide by declaration. */\n AUTHORIZATION_PLANE_RESOURCE = 'AUTHORIZATION_PLANE_RESOURCE',\n /** The resource already narrows by unit; declaring it organization-wide for providers would make one decision two. */\n RESOURCE_NARROWS_BY_UNIT = 'RESOURCE_NARROWS_BY_UNIT',\n /** No rationale — the declaration's whole review value is the sentence saying why. */\n MISSING_RATIONALE = 'MISSING_RATIONALE',\n}\n\n/**\n * Validate an application's `serviceProviderOrganizationWideAccess` against the MERGED narrowing map.\n * Fail closed at startup on any violation: a misdeclared widening is a silent authorization hole.\n */\nexport function collectServiceProviderOrganizationWideAccessViolations(\n declarations: Readonly<Partial<Record<string, ServiceProviderOrganizationWideAccessDeclaration>>> | undefined,\n narrowingRegistry: Readonly<Partial<Record<string, OrganizationUnitNarrowingDeclaration>>>,\n): { resourceType: string; kind: ServiceProviderOrganizationWideAccessViolationKind }[] {\n const forbidden = new Set<string>(ORGANIZATION_UNIT_NARROWING_FORBIDDEN_RESOURCES);\n const violations: { resourceType: string; kind: ServiceProviderOrganizationWideAccessViolationKind }[] = [];\n for (const [resourceType, declaration] of Object.entries(declarations ?? {})) {\n if (forbidden.has(resourceType)) {\n violations.push({ resourceType, kind: ServiceProviderOrganizationWideAccessViolationKind.AUTHORIZATION_PLANE_RESOURCE });\n }\n if (narrowingRegistry[resourceType]) {\n violations.push({ resourceType, kind: ServiceProviderOrganizationWideAccessViolationKind.RESOURCE_NARROWS_BY_UNIT });\n }\n if (typeof declaration?.rationale !== 'string' || declaration.rationale.trim().length === 0) {\n violations.push({ resourceType, kind: ServiceProviderOrganizationWideAccessViolationKind.MISSING_RATIONALE });\n }\n }\n return violations;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"organization-unit-narrowing.example.d.ts","sourceRoot":"","sources":["../../../src/organizations/organization-unit-narrowing.example.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,oCAAoC,EAAE,MAAM,sCAAsC,CAAC;AAEjG;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,gCAAgC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,oCAAoC,CAAC,CAG3G,CAAC;AACF,8EAA8E"}
1
+ {"version":3,"file":"organization-unit-narrowing.example.d.ts","sourceRoot":"","sources":["../../../../src/organizations/organization-unit-narrowing.example.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,oCAAoC,EAAE,MAAM,sCAAsC,CAAC;AAEjG;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,gCAAgC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,oCAAoC,CAAC,CAG3G,CAAC;AACF,8EAA8E"}
@@ -114,10 +114,37 @@ export declare const ENGINE_ORGANIZATION_UNIT_NARROWING: Readonly<Partial<Record
114
114
  * an application cannot narrow the authorization plane merely by declaring it later than the engine.
115
115
  */
116
116
  export declare function mergeOrganizationUnitNarrowingDeclarations(engineNarrowing: Readonly<Partial<Record<string, OrganizationUnitNarrowingDeclaration>>>, applicationNarrowing: Readonly<Partial<Record<string, OrganizationUnitNarrowingDeclaration>>> | undefined): Readonly<Partial<Record<string, OrganizationUnitNarrowingDeclaration>>>;
117
- /** A declaration that violates the D-C4 containment rule. */
117
+ /** A declaration that violates the D-C4 containment rule, or contradicts a DERIVED one. */
118
118
  export type OrganizationUnitNarrowingViolation = {
119
119
  readonly resourceType: string;
120
- readonly reason: 'authorization_plane_resource_cannot_be_unit_narrowable' | 'missing_unit_field_name';
120
+ readonly reason: 'authorization_plane_resource_cannot_be_unit_narrowable' | 'missing_unit_field_name'
121
+ /**
122
+ * An application named a different `unitFieldName` for a resource the ENGINE derives (#1058 R7).
123
+ *
124
+ * Refused rather than resolved either way. Letting the application win puts a read-through
125
+ * resource's confinement on a field no projector writes, so every caller sees nothing; letting
126
+ * the engine win silently makes the application's own declaration a lie it can read in its
127
+ * source and never observe. The remedy is to delete the declaration, which is why the message
128
+ * says so — the engine supplies it.
129
+ */
130
+ | 'derived_narrowing_contradicted';
131
+ };
132
+ /**
133
+ * Fold the ENGINE's derived declarations over an application's, refusing any disagreement.
134
+ *
135
+ * Separate from {@link mergeOrganizationUnitNarrowingDeclarations}, and the asymmetry is the point.
136
+ * That merge lets an APPLICATION replace an engine opt-in, because the application owns the field
137
+ * name on its own schema. A DERIVED declaration is the opposite case: the field is the engine's, it
138
+ * is written by the engine's own projector, and an application has no way to change where it lands.
139
+ * So a disagreement there is not an override — it is a statement that cannot be true.
140
+ *
141
+ * An application declaration that AGREES is left alone rather than reported: it is redundant, not
142
+ * wrong, and refusing redundancy would break every application that wrote down what the engine
143
+ * would have derived anyway.
144
+ */
145
+ export declare function foldDerivedOrganizationUnitNarrowing(declared: Readonly<Partial<Record<string, OrganizationUnitNarrowingDeclaration>>>, derived: Readonly<Partial<Record<string, OrganizationUnitNarrowingDeclaration>>>): {
146
+ readonly merged: Readonly<Partial<Record<string, OrganizationUnitNarrowingDeclaration>>>;
147
+ readonly violations: OrganizationUnitNarrowingViolation[];
121
148
  };
122
149
  /**
123
150
  * Validate a narrowing registry against the containment rule.
@@ -1 +1 @@
1
- {"version":3,"file":"organization-unit-narrowing.shared.d.ts","sourceRoot":"","sources":["../../../src/organizations/organization-unit-narrowing.shared.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,gDAAgD,CAAC;AAElF;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,MAAM,oCAAoC,GAAG;IACjD,4EAA4E;IAC5E,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;CAChC,CAAC;AACF,iFAAiF;AAEjF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,eAAO,MAAM,+CAA+C,EAAE,SAAS,gBAAgB,EAetF,CAAC;AACF,iFAAiF;AAEjF;;;;;;;GAOG;AACH,eAAO,MAAM,kCAAkC,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,gBAAgB,EAAE,oCAAoC,CAAC,CAAC,CAAM,CAAC;AAExI;;;;;;;;;;;;GAYG;AACH,wBAAgB,0CAA0C,CACxD,eAAe,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,oCAAoC,CAAC,CAAC,CAAC,EACxF,oBAAoB,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,oCAAoC,CAAC,CAAC,CAAC,GAAG,SAAS,GACxG,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,oCAAoC,CAAC,CAAC,CAAC,CAEzE;AAED,6DAA6D;AAC7D,MAAM,MAAM,kCAAkC,GAAG;IAC/C,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,MAAM,EAAE,wDAAwD,GAAG,yBAAyB,CAAC;CACvG,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,0CAA0C,CACxD,iBAAiB,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,oCAAoC,CAAC,CAAC,CAAC,GACzF,kCAAkC,EAAE,CAgBtC;AAED;;;;;;GAMG;AACH,wBAAgB,gCAAgC,CAC9C,iBAAiB,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,oCAAoC,CAAC,CAAC,CAAC,EAC1F,YAAY,EAAE,MAAM,GACnB,oCAAoC,GAAG,SAAS,CAKlD"}
1
+ {"version":3,"file":"organization-unit-narrowing.shared.d.ts","sourceRoot":"","sources":["../../../../src/organizations/organization-unit-narrowing.shared.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,gDAAgD,CAAC;AAElF;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,MAAM,oCAAoC,GAAG;IACjD,4EAA4E;IAC5E,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;CAChC,CAAC;AACF,iFAAiF;AAEjF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,eAAO,MAAM,+CAA+C,EAAE,SAAS,gBAAgB,EAwBtF,CAAC;AACF,iFAAiF;AAEjF;;;;;;;GAOG;AACH,eAAO,MAAM,kCAAkC,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,gBAAgB,EAAE,oCAAoC,CAAC,CAAC,CAAM,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AE,oCAAoC,CAAC,CAAC,CAAC,EAC1F,YAAY,EAAE,MAAM,GACnB,oCAAoC,GAAG,SAAS,CAKlD"}
@@ -72,6 +72,15 @@ export const ORGANIZATION_UNIT_NARROWING_FORBIDDEN_RESOURCES = [
72
72
  // hazard the sibling entries above record: the grant confines them to a subtree, the object they
73
73
  // reach does not live in one.
74
74
  CoreResourceType.ORG_PROVIDER_CREDENTIALS,
75
+ // Service-provider relationships (#1597) ISSUE authority: accepting one, amending its scope or assigning
76
+ // an expert to it hands a person outside the organization a membership inside it. A unit administrator
77
+ // must never reach the verbs that do that, for the same issues-authority reason as the entries above.
78
+ CoreResourceType.SERVICE_PROVIDER_RELATIONSHIPS,
79
+ CoreResourceType.SERVICE_ENGAGEMENTS,
80
+ CoreResourceType.SERVICE_ENGAGEMENT_ASSIGNMENTS,
81
+ // A capability grant (#1631) issues ADMINISTRATIVE authority to people outside the organization — the most direct
82
+ // form of the issues-authority hazard above.
83
+ CoreResourceType.SERVICE_PROVIDER_CAPABILITY_GRANTS,
75
84
  ];
76
85
  /** @wildo_source:part:end saas.models.organization-unit-narrowing-containment */
77
86
  /**
@@ -99,6 +108,33 @@ export const ENGINE_ORGANIZATION_UNIT_NARROWING = {};
99
108
  export function mergeOrganizationUnitNarrowingDeclarations(engineNarrowing, applicationNarrowing) {
100
109
  return { ...engineNarrowing, ...(applicationNarrowing ?? {}) };
101
110
  }
111
+ /**
112
+ * Fold the ENGINE's derived declarations over an application's, refusing any disagreement.
113
+ *
114
+ * Separate from {@link mergeOrganizationUnitNarrowingDeclarations}, and the asymmetry is the point.
115
+ * That merge lets an APPLICATION replace an engine opt-in, because the application owns the field
116
+ * name on its own schema. A DERIVED declaration is the opposite case: the field is the engine's, it
117
+ * is written by the engine's own projector, and an application has no way to change where it lands.
118
+ * So a disagreement there is not an override — it is a statement that cannot be true.
119
+ *
120
+ * An application declaration that AGREES is left alone rather than reported: it is redundant, not
121
+ * wrong, and refusing redundancy would break every application that wrote down what the engine
122
+ * would have derived anyway.
123
+ */
124
+ export function foldDerivedOrganizationUnitNarrowing(declared, derived) {
125
+ const violations = [];
126
+ const merged = { ...declared };
127
+ for (const [resourceType, declaration] of Object.entries(derived)) {
128
+ if (!declaration)
129
+ continue;
130
+ const existing = declared[resourceType];
131
+ if (existing !== undefined && existing.unitFieldName !== declaration.unitFieldName) {
132
+ violations.push({ resourceType, reason: 'derived_narrowing_contradicted' });
133
+ }
134
+ merged[resourceType] = declaration;
135
+ }
136
+ return { merged, violations };
137
+ }
102
138
  /**
103
139
  * Validate a narrowing registry against the containment rule.
104
140
  *
@@ -1 +1 @@
1
- {"version":3,"file":"organization-unit-narrowing.shared.js","sourceRoot":"","sources":["../../../src/organizations/organization-unit-narrowing.shared.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,gDAAgD,CAAC;AAkClF,iFAAiF;AAEjF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,MAAM,CAAC,MAAM,+CAA+C,GAAgC;IAC1F,gBAAgB,CAAC,yBAAyB;IAC1C,gBAAgB,CAAC,oBAAoB;IACrC,gBAAgB,CAAC,kBAAkB;IACnC,2FAA2F;IAC3F,mFAAmF;IACnF,gBAAgB,CAAC,aAAa;IAC9B,gBAAgB,CAAC,YAAY;IAC7B,gBAAgB,CAAC,0BAA0B;IAC3C,kGAAkG;IAClG,gGAAgG;IAChG,8FAA8F;IAC9F,iGAAiG;IACjG,8BAA8B;IAC9B,gBAAgB,CAAC,wBAAwB;CAC1C,CAAC;AACF,iFAAiF;AAEjF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,kCAAkC,GAAsF,EAAE,CAAC;AAExI;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,0CAA0C,CACxD,eAAwF,EACxF,oBAAyG;IAEzG,OAAO,EAAE,GAAG,eAAe,EAAE,GAAG,CAAC,oBAAoB,IAAI,EAAE,CAAC,EAAE,CAAC;AACjE,CAAC;AAQD;;;;;;GAMG;AACH,MAAM,UAAU,0CAA0C,CACxD,iBAA0F;IAE1F,MAAM,SAAS,GAAG,IAAI,GAAG,CAAS,+CAA+C,CAAC,CAAC;IACnF,MAAM,UAAU,GAAyC,EAAE,CAAC;IAE5D,KAAK,MAAM,CAAC,YAAY,EAAE,WAAW,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,iBAAiB,CAAC,EAAE,CAAC;QAC5E,IAAI,CAAC,WAAW;YAAE,SAAS;QAC3B,IAAI,SAAS,CAAC,GAAG,CAAC,YAAY,CAAC,EAAE,CAAC;YAChC,UAAU,CAAC,IAAI,CAAC,EAAE,YAAY,EAAE,MAAM,EAAE,wDAAwD,EAAE,CAAC,CAAC;YACpG,SAAS;QACX,CAAC;QACD,IAAI,OAAO,WAAW,CAAC,aAAa,KAAK,QAAQ,IAAI,WAAW,CAAC,aAAa,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC5F,UAAU,CAAC,IAAI,CAAC,EAAE,YAAY,EAAE,MAAM,EAAE,yBAAyB,EAAE,CAAC,CAAC;QACvE,CAAC;IACH,CAAC;IAED,OAAO,UAAU,CAAC;AACpB,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,gCAAgC,CAC9C,iBAA0F,EAC1F,YAAoB;IAEpB,IAAI,+CAA+C,CAAC,QAAQ,CAAC,YAAgC,CAAC;QAAE,OAAO,SAAS,CAAC;IACjH,MAAM,WAAW,GAAG,iBAAiB,CAAC,YAAY,CAAC,CAAC;IACpD,IAAI,CAAC,WAAW,EAAE,aAAa;QAAE,OAAO,SAAS,CAAC;IAClD,OAAO,WAAW,CAAC;AACrB,CAAC","sourcesContent":["/**\n * Organization-unit narrowing — the opt-in registry and its hard containment rule.\n *\n * Unit grants are ADDITIVE (plan decision D-C3b): they widen a principal's reach, never shrink it.\n * A caller whose organization-wide grant already satisfies an operation is not narrowed at all; a\n * caller who would otherwise be denied gains access to the rows of the units they hold.\n *\n * A resource participates ONLY by opting in here. Narrowing is never implicit: inferring it from the\n * presence of an `organizationUnitId` field would silently change the result set of every existing\n * LIST the moment such a field was added.\n */\n\nimport { CoreResourceType } from '../resources/resources.shared.core.definitions';\n\n/**\n * @wildo_source:part:start saas.models.organization-unit-narrowing-declaration facet:layer:shared facet:family:authorization\n *\n * How one resource is narrowed: the field carrying the unit a row belongs to.\n *\n * Import from `@wildo-ai/saas-models`. Declare narrowing by passing an\n * `organizationUnitNarrowing` map to application startup, keyed by resource type:\n *\n * ```ts\n * organizationUnitNarrowing: {\n * [MyResourceType.PROJECTS]: { unitFieldName: 'organizationUnitId' },\n * }\n * ```\n *\n * `unitFieldName` must name a real field on the resource's main schema that stores the owning\n * `ORGANIZATION_UNITS` id — it becomes a query predicate on every read and a write-time check on\n * every create/update, so a misspelled field is an authorization defect, not a typo.\n *\n * Opting in is ADDITIVE: a caller whose organization-wide role already satisfies the operation is\n * never narrowed and keeps seeing the whole tenant, while a caller who would otherwise be denied\n * gains access to the rows of the units they hold. Opting a resource in therefore cannot shrink any\n * existing result set.\n *\n * Deliberately an object rather than a bare boolean so per-operation narrowing can be added later as\n * an optional property (D-C5) without migrating any existing declaration — Dynamics carries depth\n * per privilege, and Wildo already declares roles per operation variant, so that is the likely next\n * shape. Resource-level is a strict subset of it.\n */\nexport type OrganizationUnitNarrowingDeclaration = {\n /** The field on the resource holding the owning `ORGANIZATION_UNITS` id. */\n readonly unitFieldName: string;\n};\n/** @wildo_source:part:end saas.models.organization-unit-narrowing-declaration */\n\n/**\n * @wildo_source:part:start saas.models.organization-unit-narrowing-containment facet:layer:shared facet:family:authorization facet:audience:app-developer\n *\n * Resources that may NEVER be unit-narrowable — the authorization plane.\n *\n * ## The loop this closes\n *\n * A resource that ISSUES authority must not be governed by the authority it issues. Were\n * `ORGANIZATION_UNIT_MEMBERS` narrowable:\n *\n * 1. a principal who is organization-wide `ORG_MEMBER` but `ORG_ADMIN` of ONE unit\n * 2. satisfies the `ORG_ADMIN` gate on the grant surface via that unit grant,\n * 3. grants themselves `ORG_ADMIN` in every other unit,\n * 4. and the union of all units is organization-wide admin — assembled from a single unit grant.\n *\n * Step 3 is blocked today only because the role ceiling derives from organization-wide grants. That\n * is one refactor away from being undone (see the `D-C4 LOCK` regression test), so the containment\n * is also structural: a unit grant can never reach these resources at all.\n *\n * Every major suite enforces the same separation — SAP puts user↔role assignment behind dedicated\n * authorization objects, Azure puts role assignment outside the data plane behind\n * `Microsoft.Authorization/roleAssignments/write`, and Dynamics forbids assigning a role you do not\n * hold.\n *\n * `ORGANIZATION_MEMBERS` is listed for the same reason one level up: it carries the organization-wide\n * `roles` array that produces `initiatorRoles`. The roles-bearing machine credentials are listed\n * because the roles written at CREATE become the authority of every token minted from them.\n *\n * ## `ORGANIZATIONS` is listed for a SECOND, distinct reason — scope inversion\n *\n * The rule above is \"a resource that ISSUES authority may not be governed by the authority it\n * issues\". `ORGANIZATIONS` is barred by its sibling: **a resource that DEFINES a scope may not be\n * governed by a narrowing INSIDE that scope.** A unit is owned BY an organization, so letting the\n * owned thing gate access to its owner inverts the containment.\n *\n * That is not abstract. The tenant lifecycle verbs live on this resource, and\n * `request_deletion` / `suspend` are `ORG_ADMIN`-gated. Were `ORGANIZATIONS` narrowable, a principal\n * who is organization-wide `ORG_MEMBER` but `ORG_ADMIN` of ONE unit would satisfy that gate through\n * the unit grant — and one division's administrator could mark the ENTIRE tenant for deletion, or\n * halt it. The blast radius is the whole organization, reached from a grant that was supposed to\n * confine them to a subtree of it.\n *\n * It is also meaningless independently of the hazard: an organization is not located inside one of\n * its own units, so there is no honest `unitFieldName` to declare. Listing it turns a declaration\n * that could never be correct into a boot failure instead of a silent authorization hole.\n */\nexport const ORGANIZATION_UNIT_NARROWING_FORBIDDEN_RESOURCES: readonly CoreResourceType[] = [\n CoreResourceType.ORGANIZATION_UNIT_MEMBERS,\n CoreResourceType.ORGANIZATION_MEMBERS,\n CoreResourceType.ORGANIZATION_UNITS,\n // The tenant itself — scope inversion, and the door to the tenant lifecycle verbs. See the\n // dedicated section above; this is a different rule from the issues-authority one.\n CoreResourceType.ORGANIZATIONS,\n CoreResourceType.ORG_API_KEYS,\n CoreResourceType.OAUTH_CLIENTS_ORGANIZATION,\n // A credential authenticates the WHOLE TENANT toward a third party — there is one Slack workspace\n // behind it, not one per division. Narrowing it to a unit would let a unit-scoped administrator\n // rotate or delete the credential every other unit spends, which is the same issues-authority\n // hazard the sibling entries above record: the grant confines them to a subtree, the object they\n // reach does not live in one.\n CoreResourceType.ORG_PROVIDER_CREDENTIALS,\n];\n/** @wildo_source:part:end saas.models.organization-unit-narrowing-containment */\n\n/**\n * The engine's opted-in resources.\n *\n * EMPTY BY DESIGN. No engine resource carries a unit FK yet, and opting one in is a deliberate\n * per-resource decision, not a default. The mechanism ships ahead of its first consumer so that the\n * containment rule is enforced from the start rather than retrofitted after a resource has already\n * been narrowed incorrectly.\n */\nexport const ENGINE_ORGANIZATION_UNIT_NARROWING: Readonly<Partial<Record<CoreResourceType, OrganizationUnitNarrowingDeclaration>>> = {};\n\n/**\n * Merge the engine's opt-ins with an application's into the map that GOVERNS RUNTIME.\n *\n * The engine ships none today, so in practice this is the application's own map — but the merge\n * exists rather than the application map being used directly, because the containment validation and\n * every runtime lookup must see ONE map. A second, unmerged source is how a resource ends up narrowed\n * on the read path and not on the write path.\n *\n * An application declaration for a resource the engine also declares REPLACES it: the application\n * owns the field name on its own schema. Nothing here validates the result — the caller passes the\n * merged map to {@link collectOrganizationUnitNarrowingViolations} and fails closed at boot, so that\n * an application cannot narrow the authorization plane merely by declaring it later than the engine.\n */\nexport function mergeOrganizationUnitNarrowingDeclarations(\n engineNarrowing: Readonly<Partial<Record<string, OrganizationUnitNarrowingDeclaration>>>,\n applicationNarrowing: Readonly<Partial<Record<string, OrganizationUnitNarrowingDeclaration>>> | undefined,\n): Readonly<Partial<Record<string, OrganizationUnitNarrowingDeclaration>>> {\n return { ...engineNarrowing, ...(applicationNarrowing ?? {}) };\n}\n\n/** A declaration that violates the D-C4 containment rule. */\nexport type OrganizationUnitNarrowingViolation = {\n readonly resourceType: string;\n readonly reason: 'authorization_plane_resource_cannot_be_unit_narrowable' | 'missing_unit_field_name';\n};\n\n/**\n * Validate a narrowing registry against the containment rule.\n *\n * Returns violations rather than throwing so the caller owns the failure mode — the engine boot path\n * turns these into a startup error (fail closed: a misdeclared narrowing is a silent authorization\n * hole, so the application must not start), while tooling can report them without dying.\n */\nexport function collectOrganizationUnitNarrowingViolations(\n narrowingRegistry: Readonly<Partial<Record<string, OrganizationUnitNarrowingDeclaration>>>,\n): OrganizationUnitNarrowingViolation[] {\n const forbidden = new Set<string>(ORGANIZATION_UNIT_NARROWING_FORBIDDEN_RESOURCES);\n const violations: OrganizationUnitNarrowingViolation[] = [];\n\n for (const [resourceType, declaration] of Object.entries(narrowingRegistry)) {\n if (!declaration) continue;\n if (forbidden.has(resourceType)) {\n violations.push({ resourceType, reason: 'authorization_plane_resource_cannot_be_unit_narrowable' });\n continue;\n }\n if (typeof declaration.unitFieldName !== 'string' || declaration.unitFieldName.length === 0) {\n violations.push({ resourceType, reason: 'missing_unit_field_name' });\n }\n }\n\n return violations;\n}\n\n/**\n * Is this resource narrowed by organization unit?\n *\n * The single question every consumer asks. Reading the registry directly is how a call site ends up\n * disagreeing with the containment rule — the forbidden set is re-checked here so a registry that\n * was assembled without validation still cannot narrow the authorization plane.\n */\nexport function resolveOrganizationUnitNarrowing(\n narrowingRegistry: Readonly<Partial<Record<string, OrganizationUnitNarrowingDeclaration>>>,\n resourceType: string,\n): OrganizationUnitNarrowingDeclaration | undefined {\n if (ORGANIZATION_UNIT_NARROWING_FORBIDDEN_RESOURCES.includes(resourceType as CoreResourceType)) return undefined;\n const declaration = narrowingRegistry[resourceType];\n if (!declaration?.unitFieldName) return undefined;\n return declaration;\n}\n"]}
1
+ {"version":3,"file":"organization-unit-narrowing.shared.js","sourceRoot":"","sources":["../../../../src/organizations/organization-unit-narrowing.shared.ts"],"names":[],"mappings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,+CAA+C,CAAC,QAAQ,CAAC,YAAgC,CAAC;QAAE,OAAO,SAAS,CAAC;IACjH,MAAM,WAAW,GAAG,iBAAiB,CAAC,YAAY,CAAC,CAAC;IACpD,IAAI,CAAC,WAAW,EAAE,aAAa;QAAE,OAAO,SAAS,CAAC;IAClD,OAAO,WAAW,CAAC;AACrB,CAAC","sourcesContent":["/**\n * Organization-unit narrowing — the opt-in registry and its hard containment rule.\n *\n * Unit grants are ADDITIVE (plan decision D-C3b): they widen a principal's reach, never shrink it.\n * A caller whose organization-wide grant already satisfies an operation is not narrowed at all; a\n * caller who would otherwise be denied gains access to the rows of the units they hold.\n *\n * A resource participates ONLY by opting in here. Narrowing is never implicit: inferring it from the\n * presence of an `organizationUnitId` field would silently change the result set of every existing\n * LIST the moment such a field was added.\n */\n\nimport { CoreResourceType } from '../resources/resources.shared.core.definitions';\n\n/**\n * @wildo_source:part:start saas.models.organization-unit-narrowing-declaration facet:layer:shared facet:family:authorization\n *\n * How one resource is narrowed: the field carrying the unit a row belongs to.\n *\n * Import from `@wildo-ai/saas-models`. Declare narrowing by passing an\n * `organizationUnitNarrowing` map to application startup, keyed by resource type:\n *\n * ```ts\n * organizationUnitNarrowing: {\n * [MyResourceType.PROJECTS]: { unitFieldName: 'organizationUnitId' },\n * }\n * ```\n *\n * `unitFieldName` must name a real field on the resource's main schema that stores the owning\n * `ORGANIZATION_UNITS` id — it becomes a query predicate on every read and a write-time check on\n * every create/update, so a misspelled field is an authorization defect, not a typo.\n *\n * Opting in is ADDITIVE: a caller whose organization-wide role already satisfies the operation is\n * never narrowed and keeps seeing the whole tenant, while a caller who would otherwise be denied\n * gains access to the rows of the units they hold. Opting a resource in therefore cannot shrink any\n * existing result set.\n *\n * Deliberately an object rather than a bare boolean so per-operation narrowing can be added later as\n * an optional property (D-C5) without migrating any existing declaration — Dynamics carries depth\n * per privilege, and Wildo already declares roles per operation variant, so that is the likely next\n * shape. Resource-level is a strict subset of it.\n */\nexport type OrganizationUnitNarrowingDeclaration = {\n /** The field on the resource holding the owning `ORGANIZATION_UNITS` id. */\n readonly unitFieldName: string;\n};\n/** @wildo_source:part:end saas.models.organization-unit-narrowing-declaration */\n\n/**\n * @wildo_source:part:start saas.models.organization-unit-narrowing-containment facet:layer:shared facet:family:authorization facet:audience:app-developer\n *\n * Resources that may NEVER be unit-narrowable — the authorization plane.\n *\n * ## The loop this closes\n *\n * A resource that ISSUES authority must not be governed by the authority it issues. Were\n * `ORGANIZATION_UNIT_MEMBERS` narrowable:\n *\n * 1. a principal who is organization-wide `ORG_MEMBER` but `ORG_ADMIN` of ONE unit\n * 2. satisfies the `ORG_ADMIN` gate on the grant surface via that unit grant,\n * 3. grants themselves `ORG_ADMIN` in every other unit,\n * 4. and the union of all units is organization-wide admin — assembled from a single unit grant.\n *\n * Step 3 is blocked today only because the role ceiling derives from organization-wide grants. That\n * is one refactor away from being undone (see the `D-C4 LOCK` regression test), so the containment\n * is also structural: a unit grant can never reach these resources at all.\n *\n * Every major suite enforces the same separation — SAP puts user↔role assignment behind dedicated\n * authorization objects, Azure puts role assignment outside the data plane behind\n * `Microsoft.Authorization/roleAssignments/write`, and Dynamics forbids assigning a role you do not\n * hold.\n *\n * `ORGANIZATION_MEMBERS` is listed for the same reason one level up: it carries the organization-wide\n * `roles` array that produces `initiatorRoles`. The roles-bearing machine credentials are listed\n * because the roles written at CREATE become the authority of every token minted from them.\n *\n * ## `ORGANIZATIONS` is listed for a SECOND, distinct reason — scope inversion\n *\n * The rule above is \"a resource that ISSUES authority may not be governed by the authority it\n * issues\". `ORGANIZATIONS` is barred by its sibling: **a resource that DEFINES a scope may not be\n * governed by a narrowing INSIDE that scope.** A unit is owned BY an organization, so letting the\n * owned thing gate access to its owner inverts the containment.\n *\n * That is not abstract. The tenant lifecycle verbs live on this resource, and\n * `request_deletion` / `suspend` are `ORG_ADMIN`-gated. Were `ORGANIZATIONS` narrowable, a principal\n * who is organization-wide `ORG_MEMBER` but `ORG_ADMIN` of ONE unit would satisfy that gate through\n * the unit grant — and one division's administrator could mark the ENTIRE tenant for deletion, or\n * halt it. The blast radius is the whole organization, reached from a grant that was supposed to\n * confine them to a subtree of it.\n *\n * It is also meaningless independently of the hazard: an organization is not located inside one of\n * its own units, so there is no honest `unitFieldName` to declare. Listing it turns a declaration\n * that could never be correct into a boot failure instead of a silent authorization hole.\n */\nexport const ORGANIZATION_UNIT_NARROWING_FORBIDDEN_RESOURCES: readonly CoreResourceType[] = [\n CoreResourceType.ORGANIZATION_UNIT_MEMBERS,\n CoreResourceType.ORGANIZATION_MEMBERS,\n CoreResourceType.ORGANIZATION_UNITS,\n // The tenant itself — scope inversion, and the door to the tenant lifecycle verbs. See the\n // dedicated section above; this is a different rule from the issues-authority one.\n CoreResourceType.ORGANIZATIONS,\n CoreResourceType.ORG_API_KEYS,\n CoreResourceType.OAUTH_CLIENTS_ORGANIZATION,\n // A credential authenticates the WHOLE TENANT toward a third party — there is one Slack workspace\n // behind it, not one per division. Narrowing it to a unit would let a unit-scoped administrator\n // rotate or delete the credential every other unit spends, which is the same issues-authority\n // hazard the sibling entries above record: the grant confines them to a subtree, the object they\n // reach does not live in one.\n CoreResourceType.ORG_PROVIDER_CREDENTIALS,\n // Service-provider relationships (#1597) ISSUE authority: accepting one, amending its scope or assigning\n // an expert to it hands a person outside the organization a membership inside it. A unit administrator\n // must never reach the verbs that do that, for the same issues-authority reason as the entries above.\n CoreResourceType.SERVICE_PROVIDER_RELATIONSHIPS,\n CoreResourceType.SERVICE_ENGAGEMENTS,\n CoreResourceType.SERVICE_ENGAGEMENT_ASSIGNMENTS,\n // A capability grant (#1631) issues ADMINISTRATIVE authority to people outside the organization — the most direct\n // form of the issues-authority hazard above.\n CoreResourceType.SERVICE_PROVIDER_CAPABILITY_GRANTS,\n];\n/** @wildo_source:part:end saas.models.organization-unit-narrowing-containment */\n\n/**\n * The engine's opted-in resources.\n *\n * EMPTY BY DESIGN. No engine resource carries a unit FK yet, and opting one in is a deliberate\n * per-resource decision, not a default. The mechanism ships ahead of its first consumer so that the\n * containment rule is enforced from the start rather than retrofitted after a resource has already\n * been narrowed incorrectly.\n */\nexport const ENGINE_ORGANIZATION_UNIT_NARROWING: Readonly<Partial<Record<CoreResourceType, OrganizationUnitNarrowingDeclaration>>> = {};\n\n/**\n * Merge the engine's opt-ins with an application's into the map that GOVERNS RUNTIME.\n *\n * The engine ships none today, so in practice this is the application's own map — but the merge\n * exists rather than the application map being used directly, because the containment validation and\n * every runtime lookup must see ONE map. A second, unmerged source is how a resource ends up narrowed\n * on the read path and not on the write path.\n *\n * An application declaration for a resource the engine also declares REPLACES it: the application\n * owns the field name on its own schema. Nothing here validates the result — the caller passes the\n * merged map to {@link collectOrganizationUnitNarrowingViolations} and fails closed at boot, so that\n * an application cannot narrow the authorization plane merely by declaring it later than the engine.\n */\nexport function mergeOrganizationUnitNarrowingDeclarations(\n engineNarrowing: Readonly<Partial<Record<string, OrganizationUnitNarrowingDeclaration>>>,\n applicationNarrowing: Readonly<Partial<Record<string, OrganizationUnitNarrowingDeclaration>>> | undefined,\n): Readonly<Partial<Record<string, OrganizationUnitNarrowingDeclaration>>> {\n return { ...engineNarrowing, ...(applicationNarrowing ?? {}) };\n}\n\n/** A declaration that violates the D-C4 containment rule, or contradicts a DERIVED one. */\nexport type OrganizationUnitNarrowingViolation = {\n readonly resourceType: string;\n readonly reason:\n | 'authorization_plane_resource_cannot_be_unit_narrowable'\n | 'missing_unit_field_name'\n /**\n * An application named a different `unitFieldName` for a resource the ENGINE derives (#1058 R7).\n *\n * Refused rather than resolved either way. Letting the application win puts a read-through\n * resource's confinement on a field no projector writes, so every caller sees nothing; letting\n * the engine win silently makes the application's own declaration a lie it can read in its\n * source and never observe. The remedy is to delete the declaration, which is why the message\n * says so — the engine supplies it.\n */\n | 'derived_narrowing_contradicted';\n};\n\n/**\n * Fold the ENGINE's derived declarations over an application's, refusing any disagreement.\n *\n * Separate from {@link mergeOrganizationUnitNarrowingDeclarations}, and the asymmetry is the point.\n * That merge lets an APPLICATION replace an engine opt-in, because the application owns the field\n * name on its own schema. A DERIVED declaration is the opposite case: the field is the engine's, it\n * is written by the engine's own projector, and an application has no way to change where it lands.\n * So a disagreement there is not an override — it is a statement that cannot be true.\n *\n * An application declaration that AGREES is left alone rather than reported: it is redundant, not\n * wrong, and refusing redundancy would break every application that wrote down what the engine\n * would have derived anyway.\n */\nexport function foldDerivedOrganizationUnitNarrowing(\n declared: Readonly<Partial<Record<string, OrganizationUnitNarrowingDeclaration>>>,\n derived: Readonly<Partial<Record<string, OrganizationUnitNarrowingDeclaration>>>,\n): {\n readonly merged: Readonly<Partial<Record<string, OrganizationUnitNarrowingDeclaration>>>;\n readonly violations: OrganizationUnitNarrowingViolation[];\n} {\n const violations: OrganizationUnitNarrowingViolation[] = [];\n const merged: Record<string, OrganizationUnitNarrowingDeclaration> = { ...declared };\n\n for (const [resourceType, declaration] of Object.entries(derived)) {\n if (!declaration) continue;\n const existing = declared[resourceType];\n if (existing !== undefined && existing.unitFieldName !== declaration.unitFieldName) {\n violations.push({ resourceType, reason: 'derived_narrowing_contradicted' });\n }\n merged[resourceType] = declaration;\n }\n\n return { merged, violations };\n}\n\n/**\n * Validate a narrowing registry against the containment rule.\n *\n * Returns violations rather than throwing so the caller owns the failure mode — the engine boot path\n * turns these into a startup error (fail closed: a misdeclared narrowing is a silent authorization\n * hole, so the application must not start), while tooling can report them without dying.\n */\nexport function collectOrganizationUnitNarrowingViolations(\n narrowingRegistry: Readonly<Partial<Record<string, OrganizationUnitNarrowingDeclaration>>>,\n): OrganizationUnitNarrowingViolation[] {\n const forbidden = new Set<string>(ORGANIZATION_UNIT_NARROWING_FORBIDDEN_RESOURCES);\n const violations: OrganizationUnitNarrowingViolation[] = [];\n\n for (const [resourceType, declaration] of Object.entries(narrowingRegistry)) {\n if (!declaration) continue;\n if (forbidden.has(resourceType)) {\n violations.push({ resourceType, reason: 'authorization_plane_resource_cannot_be_unit_narrowable' });\n continue;\n }\n if (typeof declaration.unitFieldName !== 'string' || declaration.unitFieldName.length === 0) {\n violations.push({ resourceType, reason: 'missing_unit_field_name' });\n }\n }\n\n return violations;\n}\n\n/**\n * Is this resource narrowed by organization unit?\n *\n * The single question every consumer asks. Reading the registry directly is how a call site ends up\n * disagreeing with the containment rule — the forbidden set is re-checked here so a registry that\n * was assembled without validation still cannot narrow the authorization plane.\n */\nexport function resolveOrganizationUnitNarrowing(\n narrowingRegistry: Readonly<Partial<Record<string, OrganizationUnitNarrowingDeclaration>>>,\n resourceType: string,\n): OrganizationUnitNarrowingDeclaration | undefined {\n if (ORGANIZATION_UNIT_NARROWING_FORBIDDEN_RESOURCES.includes(resourceType as CoreResourceType)) return undefined;\n const declaration = narrowingRegistry[resourceType];\n if (!declaration?.unitFieldName) return undefined;\n return declaration;\n}\n"]}
@@ -23,6 +23,8 @@ export declare const organizationUnitResourceConfiguration_InitializationFactory
23
23
  name: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodString>>;
24
24
  code: z.ZodOptional<z.ZodString>;
25
25
  type: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodOptional<z.ZodEnum<typeof import("./organization-units.shared.schemas").OrganizationUnitType>>>>;
26
+ externalSource: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodOptional<z.ZodEnum<typeof import("..").ExternalIdentitySource>>>>>>;
27
+ externalId: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodOptional<z.ZodString>>>>;
26
28
  createdAt: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodDefault<z.ZodDate>>>>;
27
29
  updatedAt: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodDefault<z.ZodDate>>>>;
28
30
  }, z.core.$strip>>>;
@@ -1 +1 @@
1
- {"version":3,"file":"organization-units.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["../../../src/organizations/organization-units.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,qBAAqB,EAAE,MAAM,gDAAgD,CAAC;AACvF,OAAO,EAAoD,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAU/H,oBAAY,2BAA2B;IACrC,IAAI,SAAS,CAAE,gCAAgC;IAC/C,OAAO,YAAY,CAAE,eAAe;IACpC,OAAO,YAAY;CACpB;AASD,KAAK,8BAA8B,GAC/B,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,CAAC;AAKjC,eAAO,MAAM,2DAA2D,GAAI,wBAAwB,oBAAoB,EAAE;;;;;;;;;;;;mBAmLxH,CAAC"}
1
+ {"version":3,"file":"organization-units.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["../../../../src/organizations/organization-units.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,qBAAqB,EAAE,MAAM,gDAAgD,CAAC;AACvF,OAAO,EAAoD,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAU/H,oBAAY,2BAA2B;IACrC,IAAI,SAAS,CAAE,gCAAgC;IAC/C,OAAO,YAAY,CAAE,eAAe;IACpC,OAAO,YAAY;CACpB;AASD,KAAK,8BAA8B,GAC/B,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,CAAC;AAKjC,eAAO,MAAM,2DAA2D,GAAI,wBAAwB,oBAAoB,EAAE;;;;;;;;;;;;;;mBA2LxH,CAAC"}