@wildo-ai/saas-models 1.1.3 → 1.1.5

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 (890) hide show
  1. package/dist/esm/applications/application-metadata.shared.resources-config.schemas.d.ts +1 -1
  2. package/dist/esm/applications/application-versions.shared.resources-config.schemas.d.ts +1 -1
  3. package/dist/esm/applications/application-versions.shared.resources-config.schemas.js +2 -2
  4. package/dist/esm/applications/application-versions.shared.resources-config.schemas.js.map +1 -1
  5. package/dist/esm/applications/applications-context.schemas.d.ts +236 -18
  6. package/dist/esm/applications/applications-context.schemas.d.ts.map +1 -1
  7. package/dist/esm/applications/applications.shared.resources-config.schemas.d.ts +1 -0
  8. package/dist/esm/applications/applications.shared.resources-config.schemas.d.ts.map +1 -1
  9. package/dist/esm/applications/applications.shared.resources-config.schemas.js +1 -1
  10. package/dist/esm/applications/applications.shared.resources-config.schemas.js.map +1 -1
  11. package/dist/esm/applications/applications.shared.schemas.d.ts +3 -2
  12. package/dist/esm/applications/applications.shared.schemas.d.ts.map +1 -1
  13. package/dist/esm/applications/applications.shared.schemas.js +40 -5
  14. package/dist/esm/applications/applications.shared.schemas.js.map +1 -1
  15. package/dist/esm/billing/billing-account.shared.resources-config.schemas.d.ts +1 -2
  16. package/dist/esm/billing/billing-account.shared.resources-config.schemas.d.ts.map +1 -1
  17. package/dist/esm/billing/billing-account.shared.resources-config.schemas.js +1 -2
  18. package/dist/esm/billing/billing-account.shared.resources-config.schemas.js.map +1 -1
  19. package/dist/esm/billing/billing-enums.shared.schemas.d.ts +87 -5
  20. package/dist/esm/billing/billing-enums.shared.schemas.d.ts.map +1 -1
  21. package/dist/esm/billing/billing-enums.shared.schemas.js +91 -5
  22. package/dist/esm/billing/billing-enums.shared.schemas.js.map +1 -1
  23. package/dist/esm/billing/billing-types.shared.schemas.d.ts +25 -4
  24. package/dist/esm/billing/billing-types.shared.schemas.d.ts.map +1 -1
  25. package/dist/esm/billing/billing-types.shared.schemas.js +61 -0
  26. package/dist/esm/billing/billing-types.shared.schemas.js.map +1 -1
  27. package/dist/esm/billing/price.shared.resources-config.schemas.d.ts.map +1 -1
  28. package/dist/esm/billing/price.shared.resources-config.schemas.js +32 -2
  29. package/dist/esm/billing/price.shared.resources-config.schemas.js.map +1 -1
  30. package/dist/esm/billing/product-behavior-policy.shared.schemas.d.ts.map +1 -1
  31. package/dist/esm/billing/product-behavior-policy.shared.schemas.js +1 -1
  32. package/dist/esm/billing/product-behavior-policy.shared.schemas.js.map +1 -1
  33. package/dist/esm/billing/product.shared.resources-config.schemas.d.ts.map +1 -1
  34. package/dist/esm/billing/product.shared.resources-config.schemas.js +32 -2
  35. package/dist/esm/billing/product.shared.resources-config.schemas.js.map +1 -1
  36. package/dist/esm/billing/product.shared.schemas.d.ts +1 -0
  37. package/dist/esm/billing/product.shared.schemas.d.ts.map +1 -1
  38. package/dist/esm/billing/product.shared.schemas.js +3 -0
  39. package/dist/esm/billing/product.shared.schemas.js.map +1 -1
  40. package/dist/esm/billing/promotions.shared.resources-config.schemas.d.ts.map +1 -1
  41. package/dist/esm/billing/promotions.shared.resources-config.schemas.js +33 -3
  42. package/dist/esm/billing/promotions.shared.resources-config.schemas.js.map +1 -1
  43. package/dist/esm/billing/referral.shared.resources-config.schemas.d.ts.map +1 -1
  44. package/dist/esm/billing/referral.shared.resources-config.schemas.js +22 -2
  45. package/dist/esm/billing/referral.shared.resources-config.schemas.js.map +1 -1
  46. package/dist/esm/billing/referral.shared.schemas.d.ts +1 -0
  47. package/dist/esm/billing/referral.shared.schemas.d.ts.map +1 -1
  48. package/dist/esm/billing/referral.shared.schemas.js +3 -0
  49. package/dist/esm/billing/referral.shared.schemas.js.map +1 -1
  50. package/dist/esm/billing/subscription.shared.resources-config.schemas.d.ts +23 -1
  51. package/dist/esm/billing/subscription.shared.resources-config.schemas.d.ts.map +1 -1
  52. package/dist/esm/billing/subscription.shared.resources-config.schemas.js +48 -2
  53. package/dist/esm/billing/subscription.shared.resources-config.schemas.js.map +1 -1
  54. package/dist/esm/billing/subscription.shared.schemas.d.ts +1 -0
  55. package/dist/esm/billing/subscription.shared.schemas.d.ts.map +1 -1
  56. package/dist/esm/billing/subscription.shared.schemas.js +3 -0
  57. package/dist/esm/billing/subscription.shared.schemas.js.map +1 -1
  58. package/dist/esm/billing/usage-flush-evidence.shared.schemas.d.ts +49 -0
  59. package/dist/esm/billing/usage-flush-evidence.shared.schemas.d.ts.map +1 -0
  60. package/dist/esm/billing/usage-flush-evidence.shared.schemas.js +48 -0
  61. package/dist/esm/billing/usage-flush-evidence.shared.schemas.js.map +1 -0
  62. package/dist/esm/billing/usage-record.shared.schemas.d.ts +1 -0
  63. package/dist/esm/billing/usage-record.shared.schemas.d.ts.map +1 -1
  64. package/dist/esm/billing/usage-record.shared.schemas.js +3 -0
  65. package/dist/esm/billing/usage-record.shared.schemas.js.map +1 -1
  66. package/dist/esm/companion/provider-discovery.shared.schemas.d.ts +8 -0
  67. package/dist/esm/companion/provider-discovery.shared.schemas.d.ts.map +1 -1
  68. package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.d.ts +14 -3
  69. package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.d.ts.map +1 -1
  70. package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.js +21 -7
  71. package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.js.map +1 -1
  72. package/dist/esm/compliance/audit-trails/audit-export-projection.shared.schemas.d.ts +450 -0
  73. package/dist/esm/compliance/audit-trails/audit-export-projection.shared.schemas.d.ts.map +1 -0
  74. package/dist/esm/compliance/audit-trails/audit-export-projection.shared.schemas.js +723 -0
  75. package/dist/esm/compliance/audit-trails/audit-export-projection.shared.schemas.js.map +1 -0
  76. package/dist/esm/compliance/audit-trails/audit-logs.shared.resources-config.schemas.d.ts +2 -2
  77. package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.d.ts +8 -0
  78. package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.d.ts.map +1 -1
  79. package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.js +15 -0
  80. package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.js.map +1 -1
  81. package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.d.ts +787 -21
  82. package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.d.ts.map +1 -1
  83. package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.js +1079 -26
  84. package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.js.map +1 -1
  85. package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.d.ts.map +1 -1
  86. package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.js +51 -0
  87. package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.js.map +1 -1
  88. package/dist/esm/compliance/documents/governed-document-interactions.shared.schemas.d.ts +463 -0
  89. package/dist/esm/compliance/documents/governed-document-interactions.shared.schemas.d.ts.map +1 -0
  90. package/dist/esm/compliance/documents/governed-document-interactions.shared.schemas.js +526 -0
  91. package/dist/esm/compliance/documents/governed-document-interactions.shared.schemas.js.map +1 -0
  92. package/dist/esm/compliance/documents/governed-documents.shared.schemas.d.ts +539 -15
  93. package/dist/esm/compliance/documents/governed-documents.shared.schemas.d.ts.map +1 -1
  94. package/dist/esm/compliance/documents/governed-documents.shared.schemas.js +402 -14
  95. package/dist/esm/compliance/documents/governed-documents.shared.schemas.js.map +1 -1
  96. package/dist/esm/compliance/documents/user-governed-document-acceptances.shared.resources-config.schemas.d.ts +18 -0
  97. package/dist/esm/compliance/documents/user-governed-document-acceptances.shared.resources-config.schemas.d.ts.map +1 -0
  98. package/dist/esm/compliance/documents/user-governed-document-acceptances.shared.resources-config.schemas.js +89 -0
  99. package/dist/esm/compliance/documents/user-governed-document-acceptances.shared.resources-config.schemas.js.map +1 -0
  100. package/dist/esm/compliance/documents/user-governed-document-acceptances.shared.schemas.d.ts +47 -0
  101. package/dist/esm/compliance/documents/user-governed-document-acceptances.shared.schemas.d.ts.map +1 -0
  102. package/dist/esm/compliance/documents/user-governed-document-acceptances.shared.schemas.js +73 -0
  103. package/dist/esm/compliance/documents/user-governed-document-acceptances.shared.schemas.js.map +1 -0
  104. package/dist/esm/compliance/privacy/ai-use-posture.shared.schemas.d.ts +21 -0
  105. package/dist/esm/compliance/privacy/ai-use-posture.shared.schemas.d.ts.map +1 -1
  106. package/dist/esm/compliance/privacy/ai-use-posture.shared.schemas.js +39 -1
  107. package/dist/esm/compliance/privacy/ai-use-posture.shared.schemas.js.map +1 -1
  108. package/dist/esm/compliance/privacy/capability-consent-purposes.shared.utils.d.ts +33 -0
  109. package/dist/esm/compliance/privacy/capability-consent-purposes.shared.utils.d.ts.map +1 -0
  110. package/dist/esm/compliance/privacy/capability-consent-purposes.shared.utils.js +30 -0
  111. package/dist/esm/compliance/privacy/capability-consent-purposes.shared.utils.js.map +1 -0
  112. package/dist/esm/compliance/privacy/client-storage.shared.schemas.d.ts +6 -5
  113. package/dist/esm/compliance/privacy/client-storage.shared.schemas.d.ts.map +1 -1
  114. package/dist/esm/compliance/privacy/client-storage.shared.schemas.js +15 -5
  115. package/dist/esm/compliance/privacy/client-storage.shared.schemas.js.map +1 -1
  116. package/dist/esm/compliance/privacy/consent-gate-vocabulary.shared.schemas.d.ts +127 -0
  117. package/dist/esm/compliance/privacy/consent-gate-vocabulary.shared.schemas.d.ts.map +1 -0
  118. package/dist/esm/compliance/privacy/consent-gate-vocabulary.shared.schemas.js +94 -0
  119. package/dist/esm/compliance/privacy/consent-gate-vocabulary.shared.schemas.js.map +1 -0
  120. package/dist/esm/compliance/privacy/consent-purposes.shared.d.ts +125 -0
  121. package/dist/esm/compliance/privacy/consent-purposes.shared.d.ts.map +1 -0
  122. package/dist/esm/compliance/privacy/consent-purposes.shared.js +136 -0
  123. package/dist/esm/compliance/privacy/consent-purposes.shared.js.map +1 -0
  124. package/dist/esm/compliance/privacy/data-subject-rights.shared.schemas.d.ts +91 -0
  125. package/dist/esm/compliance/privacy/data-subject-rights.shared.schemas.d.ts.map +1 -0
  126. package/dist/esm/compliance/privacy/data-subject-rights.shared.schemas.js +123 -0
  127. package/dist/esm/compliance/privacy/data-subject-rights.shared.schemas.js.map +1 -0
  128. package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.d.ts +27 -0
  129. package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.d.ts.map +1 -1
  130. package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.js +36 -2
  131. package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.js.map +1 -1
  132. package/dist/esm/compliance/privacy/operator-compliance-identity.shared.schemas.d.ts +68 -25
  133. package/dist/esm/compliance/privacy/operator-compliance-identity.shared.schemas.d.ts.map +1 -1
  134. package/dist/esm/compliance/privacy/operator-compliance-identity.shared.schemas.js +74 -22
  135. package/dist/esm/compliance/privacy/operator-compliance-identity.shared.schemas.js.map +1 -1
  136. package/dist/esm/compliance/privacy/privacy.shared.schemas.d.ts +9 -17
  137. package/dist/esm/compliance/privacy/privacy.shared.schemas.d.ts.map +1 -1
  138. package/dist/esm/compliance/privacy/privacy.shared.schemas.js +74 -31
  139. package/dist/esm/compliance/privacy/privacy.shared.schemas.js.map +1 -1
  140. package/dist/esm/compliance/privacy/subject-erasure-lane-evidence.shared.schemas.d.ts +47 -0
  141. package/dist/esm/compliance/privacy/subject-erasure-lane-evidence.shared.schemas.d.ts.map +1 -0
  142. package/dist/esm/compliance/privacy/subject-erasure-lane-evidence.shared.schemas.js +98 -0
  143. package/dist/esm/compliance/privacy/subject-erasure-lane-evidence.shared.schemas.js.map +1 -0
  144. package/dist/esm/compliance/privacy/subject-erasure.shared.schemas.d.ts +368 -35
  145. package/dist/esm/compliance/privacy/subject-erasure.shared.schemas.d.ts.map +1 -1
  146. package/dist/esm/compliance/privacy/subject-erasure.shared.schemas.js +403 -17
  147. package/dist/esm/compliance/privacy/subject-erasure.shared.schemas.js.map +1 -1
  148. package/dist/esm/compliance/review-cadence.shared.schemas.d.ts +56 -0
  149. package/dist/esm/compliance/review-cadence.shared.schemas.d.ts.map +1 -0
  150. package/dist/esm/compliance/review-cadence.shared.schemas.js +71 -0
  151. package/dist/esm/compliance/review-cadence.shared.schemas.js.map +1 -0
  152. package/dist/esm/compliance/risk-posture.shared.schemas.d.ts +161 -0
  153. package/dist/esm/compliance/risk-posture.shared.schemas.d.ts.map +1 -0
  154. package/dist/esm/compliance/risk-posture.shared.schemas.js +166 -0
  155. package/dist/esm/compliance/risk-posture.shared.schemas.js.map +1 -0
  156. package/dist/esm/config/analytics-value-moments.shared.schemas.d.ts +4 -3
  157. package/dist/esm/config/analytics-value-moments.shared.schemas.d.ts.map +1 -1
  158. package/dist/esm/config/analytics-value-moments.shared.schemas.js +4 -3
  159. package/dist/esm/config/analytics-value-moments.shared.schemas.js.map +1 -1
  160. package/dist/esm/config/app-configuration-shared.shared.schemas.d.ts +222 -9
  161. package/dist/esm/config/app-configuration-shared.shared.schemas.d.ts.map +1 -1
  162. package/dist/esm/config/app-configuration-shared.shared.schemas.js +232 -9
  163. package/dist/esm/config/app-configuration-shared.shared.schemas.js.map +1 -1
  164. package/dist/esm/config/auth-config-resolution.shared.utils.d.ts +75 -3
  165. package/dist/esm/config/auth-config-resolution.shared.utils.d.ts.map +1 -1
  166. package/dist/esm/config/auth-config-resolution.shared.utils.js +93 -4
  167. package/dist/esm/config/auth-config-resolution.shared.utils.js.map +1 -1
  168. package/dist/esm/config/brand-assets.shared.schemas.d.ts +5 -4
  169. package/dist/esm/config/brand-assets.shared.schemas.d.ts.map +1 -1
  170. package/dist/esm/config/brand-assets.shared.schemas.js +14 -4
  171. package/dist/esm/config/brand-assets.shared.schemas.js.map +1 -1
  172. package/dist/esm/config/entity-identity-config.shared.schemas.d.ts +463 -19
  173. package/dist/esm/config/entity-identity-config.shared.schemas.d.ts.map +1 -1
  174. package/dist/esm/config/entity-identity-config.shared.schemas.js +535 -28
  175. package/dist/esm/config/entity-identity-config.shared.schemas.js.map +1 -1
  176. package/dist/esm/config/frontend/chart-definition.shared.schemas.d.ts +14 -14
  177. package/dist/esm/config/frontend/chart-registration-alignment.shared.d.ts +139 -3
  178. package/dist/esm/config/frontend/chart-registration-alignment.shared.d.ts.map +1 -1
  179. package/dist/esm/config/frontend/chart-registration-alignment.shared.js +151 -4
  180. package/dist/esm/config/frontend/chart-registration-alignment.shared.js.map +1 -1
  181. package/dist/esm/config/frontend/navigation.shared.schemas.d.ts +21 -17
  182. package/dist/esm/config/frontend/navigation.shared.schemas.d.ts.map +1 -1
  183. package/dist/esm/config/frontend/navigation.shared.schemas.js +58 -40
  184. package/dist/esm/config/frontend/navigation.shared.schemas.js.map +1 -1
  185. package/dist/esm/config/frontend/onboarding.shared.schemas.d.ts +90 -133
  186. package/dist/esm/config/frontend/onboarding.shared.schemas.d.ts.map +1 -1
  187. package/dist/esm/config/frontend/onboarding.shared.schemas.js +148 -100
  188. package/dist/esm/config/frontend/onboarding.shared.schemas.js.map +1 -1
  189. package/dist/esm/errors/errors.custom-message-ref.shared.definitions.d.ts +146 -43
  190. package/dist/esm/errors/errors.custom-message-ref.shared.definitions.d.ts.map +1 -1
  191. package/dist/esm/errors/errors.custom-message-ref.shared.definitions.js +147 -42
  192. package/dist/esm/errors/errors.custom-message-ref.shared.definitions.js.map +1 -1
  193. package/dist/esm/errors/errors.shared.definitions.js +1 -1
  194. package/dist/esm/errors/errors.shared.definitions.js.map +1 -1
  195. package/dist/esm/errors/errors.shared.schemas.d.ts +29 -40
  196. package/dist/esm/errors/errors.shared.schemas.d.ts.map +1 -1
  197. package/dist/esm/errors/errors.shared.schemas.js +37 -54
  198. package/dist/esm/errors/errors.shared.schemas.js.map +1 -1
  199. package/dist/esm/errors/errors.shared.utils.d.ts +24 -0
  200. package/dist/esm/errors/errors.shared.utils.d.ts.map +1 -1
  201. package/dist/esm/errors/errors.shared.utils.js +39 -0
  202. package/dist/esm/errors/errors.shared.utils.js.map +1 -1
  203. package/dist/esm/errors/thrown-value-description.shared.utils.d.ts +27 -0
  204. package/dist/esm/errors/thrown-value-description.shared.utils.d.ts.map +1 -0
  205. package/dist/esm/errors/thrown-value-description.shared.utils.js +67 -0
  206. package/dist/esm/errors/thrown-value-description.shared.utils.js.map +1 -0
  207. package/dist/esm/external-data/external-data-pipeline.shared.schemas.d.ts +48 -73
  208. package/dist/esm/external-data/external-data-pipeline.shared.schemas.d.ts.map +1 -1
  209. package/dist/esm/external-data/external-data-pipeline.shared.schemas.js +103 -9
  210. package/dist/esm/external-data/external-data-pipeline.shared.schemas.js.map +1 -1
  211. package/dist/esm/external-data.exports.d.ts +1 -0
  212. package/dist/esm/external-data.exports.d.ts.map +1 -1
  213. package/dist/esm/external-data.exports.js +1 -0
  214. package/dist/esm/external-data.exports.js.map +1 -1
  215. package/dist/esm/external-providers/engine-capabilities.shared.schemas.d.ts +18 -12
  216. package/dist/esm/external-providers/engine-capabilities.shared.schemas.d.ts.map +1 -1
  217. package/dist/esm/external-providers/engine-capabilities.shared.schemas.js +18 -12
  218. package/dist/esm/external-providers/engine-capabilities.shared.schemas.js.map +1 -1
  219. package/dist/esm/external-providers/engine-capability-resolution-mode.shared.d.ts +5 -3
  220. package/dist/esm/external-providers/engine-capability-resolution-mode.shared.d.ts.map +1 -1
  221. package/dist/esm/external-providers/engine-capability-resolution-mode.shared.js +5 -3
  222. package/dist/esm/external-providers/engine-capability-resolution-mode.shared.js.map +1 -1
  223. package/dist/esm/external-providers/engine-capability-surface.shared.d.ts +77 -0
  224. package/dist/esm/external-providers/engine-capability-surface.shared.d.ts.map +1 -0
  225. package/dist/esm/external-providers/engine-capability-surface.shared.js +173 -0
  226. package/dist/esm/external-providers/engine-capability-surface.shared.js.map +1 -0
  227. package/dist/esm/external-providers/external-providers.shared.schemas.d.ts +2 -0
  228. package/dist/esm/external-providers/external-providers.shared.schemas.d.ts.map +1 -1
  229. package/dist/esm/external-providers/external-providers.shared.schemas.js +21 -0
  230. package/dist/esm/external-providers/external-providers.shared.schemas.js.map +1 -1
  231. package/dist/esm/external-providers/frontend-bootstrap.shared.schemas.d.ts +131 -7
  232. package/dist/esm/external-providers/frontend-bootstrap.shared.schemas.d.ts.map +1 -1
  233. package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.d.ts +114 -0
  234. package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.d.ts.map +1 -1
  235. package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.js +148 -0
  236. package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.js.map +1 -1
  237. package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.d.ts +108 -0
  238. package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.d.ts.map +1 -1
  239. package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.js +86 -0
  240. package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.js.map +1 -1
  241. package/dist/esm/external-providers/frontend-provider-public-config.shared.d.ts +184 -0
  242. package/dist/esm/external-providers/frontend-provider-public-config.shared.d.ts.map +1 -0
  243. package/dist/esm/external-providers/frontend-provider-public-config.shared.js +216 -0
  244. package/dist/esm/external-providers/frontend-provider-public-config.shared.js.map +1 -0
  245. package/dist/esm/external-providers/provider-authentication-assurance.shared.schemas.d.ts +30 -0
  246. package/dist/esm/external-providers/provider-authentication-assurance.shared.schemas.d.ts.map +1 -0
  247. package/dist/esm/external-providers/provider-authentication-assurance.shared.schemas.js +32 -0
  248. package/dist/esm/external-providers/provider-authentication-assurance.shared.schemas.js.map +1 -0
  249. package/dist/esm/external-providers/provider-browser-operations.shared.schemas.d.ts +86 -0
  250. package/dist/esm/external-providers/provider-browser-operations.shared.schemas.d.ts.map +1 -0
  251. package/dist/esm/external-providers/provider-browser-operations.shared.schemas.js +85 -0
  252. package/dist/esm/external-providers/provider-browser-operations.shared.schemas.js.map +1 -0
  253. package/dist/esm/external-providers/provider-capability.shared.schemas.d.ts +14 -13
  254. package/dist/esm/external-providers/provider-capability.shared.schemas.d.ts.map +1 -1
  255. package/dist/esm/external-providers/provider-capability.shared.schemas.js +10 -10
  256. package/dist/esm/external-providers/provider-capability.shared.schemas.js.map +1 -1
  257. package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.d.ts +18 -8
  258. package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.d.ts.map +1 -1
  259. package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.js +10 -4
  260. package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.js.map +1 -1
  261. package/dist/esm/external-providers/provider-frontend-component-contract.shared.types.d.ts +165 -0
  262. package/dist/esm/external-providers/provider-frontend-component-contract.shared.types.d.ts.map +1 -0
  263. package/dist/esm/external-providers/provider-frontend-component-contract.shared.types.js +39 -0
  264. package/dist/esm/external-providers/provider-frontend-component-contract.shared.types.js.map +1 -0
  265. package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.d.ts +7 -5
  266. package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.d.ts.map +1 -1
  267. package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.js +7 -5
  268. package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.js.map +1 -1
  269. package/dist/esm/external-providers/provider-metadata.shared.schemas.d.ts +8 -5
  270. package/dist/esm/external-providers/provider-metadata.shared.schemas.d.ts.map +1 -1
  271. package/dist/esm/external-providers/provider-metadata.shared.schemas.js +5 -2
  272. package/dist/esm/external-providers/provider-metadata.shared.schemas.js.map +1 -1
  273. package/dist/esm/features/application-features.shared.resources-config.schemas.d.ts +2 -0
  274. package/dist/esm/features/application-features.shared.resources-config.schemas.d.ts.map +1 -1
  275. package/dist/esm/features/application-features.shared.resources-config.schemas.js +42 -3
  276. package/dist/esm/features/application-features.shared.resources-config.schemas.js.map +1 -1
  277. package/dist/esm/features/connected-feature.example.d.ts +64 -0
  278. package/dist/esm/features/connected-feature.example.d.ts.map +1 -0
  279. package/dist/esm/features/connected-feature.example.js +86 -0
  280. package/dist/esm/features/connected-feature.example.js.map +1 -0
  281. package/dist/esm/features/scope-features.shared.schemas.d.ts +53 -0
  282. package/dist/esm/features/scope-features.shared.schemas.d.ts.map +1 -1
  283. package/dist/esm/features/scope-features.shared.schemas.js +37 -0
  284. package/dist/esm/features/scope-features.shared.schemas.js.map +1 -1
  285. package/dist/esm/features/user-features.shared.resources-config.schemas.d.ts +1 -1
  286. package/dist/esm/features/user-features.shared.resources-config.schemas.d.ts.map +1 -1
  287. package/dist/esm/features/user-features.shared.resources-config.schemas.js +42 -48
  288. package/dist/esm/features/user-features.shared.resources-config.schemas.js.map +1 -1
  289. package/dist/esm/files/file-remote-reference-link.shared.schemas.d.ts +73 -0
  290. package/dist/esm/files/file-remote-reference-link.shared.schemas.d.ts.map +1 -0
  291. package/dist/esm/files/file-remote-reference-link.shared.schemas.js +62 -0
  292. package/dist/esm/files/file-remote-reference-link.shared.schemas.js.map +1 -0
  293. package/dist/esm/files/files.shared.resources-config.schemas.d.ts +3 -3
  294. package/dist/esm/files/files.shared.resources-config.schemas.js +3 -3
  295. package/dist/esm/files/files.shared.resources-config.schemas.js.map +1 -1
  296. package/dist/esm/flows-actors/actors.shared.schemas.d.ts +152 -129
  297. package/dist/esm/flows-actors/actors.shared.schemas.d.ts.map +1 -1
  298. package/dist/esm/flows-actors/actors.shared.schemas.js +99 -2
  299. package/dist/esm/flows-actors/actors.shared.schemas.js.map +1 -1
  300. package/dist/esm/flows-actors/agent-traceability.shared.schemas.d.ts +6 -0
  301. package/dist/esm/flows-actors/agent-traceability.shared.schemas.d.ts.map +1 -1
  302. package/dist/esm/flows-actors/agents.shared.schemas.d.ts +3 -3
  303. package/dist/esm/flows-actors/agents.shared.schemas.d.ts.map +1 -1
  304. package/dist/esm/flows-actors/agents.shared.schemas.js +11 -5
  305. package/dist/esm/flows-actors/agents.shared.schemas.js.map +1 -1
  306. package/dist/esm/flows-actors/deliberation.shared.schemas.d.ts +13 -0
  307. package/dist/esm/flows-actors/deliberation.shared.schemas.d.ts.map +1 -1
  308. package/dist/esm/flows-actors/deliberation.shared.schemas.js.map +1 -1
  309. package/dist/esm/flows-actors/execution-plan-readiness.shared.utils.d.ts +45 -0
  310. package/dist/esm/flows-actors/execution-plan-readiness.shared.utils.d.ts.map +1 -0
  311. package/dist/esm/flows-actors/execution-plan-readiness.shared.utils.js +51 -0
  312. package/dist/esm/flows-actors/execution-plan-readiness.shared.utils.js.map +1 -0
  313. package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.d.ts +31 -0
  314. package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.d.ts.map +1 -1
  315. package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.js +61 -3
  316. package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.js.map +1 -1
  317. package/dist/esm/flows-actors/flows-actors-task.shared.schemas.d.ts +2 -2
  318. package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.d.ts +16 -8
  319. package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.d.ts.map +1 -1
  320. package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.js +23 -11
  321. package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.js.map +1 -1
  322. package/dist/esm/flows-actors/flows-actors.configuration.shared.schemas.d.ts +0 -189
  323. package/dist/esm/flows-actors/flows-actors.configuration.shared.schemas.d.ts.map +1 -1
  324. package/dist/esm/flows-actors/flows-actors.configuration.shared.schemas.js +14 -50
  325. package/dist/esm/flows-actors/flows-actors.configuration.shared.schemas.js.map +1 -1
  326. package/dist/esm/flows-actors/flows-actors.frontend.shared.schemas.d.ts +0 -3
  327. package/dist/esm/flows-actors/flows-actors.frontend.shared.schemas.d.ts.map +1 -1
  328. package/dist/esm/flows-actors/flows-actors.frontend.shared.schemas.js +0 -1
  329. package/dist/esm/flows-actors/flows-actors.frontend.shared.schemas.js.map +1 -1
  330. package/dist/esm/flows-actors/flows-actors.system.shared.schemas.d.ts +1 -67
  331. package/dist/esm/flows-actors/flows-actors.system.shared.schemas.d.ts.map +1 -1
  332. package/dist/esm/flows-actors/flows-actors.system.shared.schemas.js +1 -2
  333. package/dist/esm/flows-actors/flows-actors.system.shared.schemas.js.map +1 -1
  334. package/dist/esm/flows-actors/flows.shared.schemas.d.ts +0 -1
  335. package/dist/esm/flows-actors/flows.shared.schemas.d.ts.map +1 -1
  336. package/dist/esm/flows-actors/human-decision.shared.schemas.d.ts +121 -0
  337. package/dist/esm/flows-actors/human-decision.shared.schemas.d.ts.map +1 -0
  338. package/dist/esm/flows-actors/human-decision.shared.schemas.js +252 -0
  339. package/dist/esm/flows-actors/human-decision.shared.schemas.js.map +1 -0
  340. package/dist/esm/flows-actors/mcp-servers.shared.schemas.d.ts +2 -0
  341. package/dist/esm/flows-actors/mcp-servers.shared.schemas.d.ts.map +1 -1
  342. package/dist/esm/flows-actors/mcp-servers.shared.schemas.js +13 -0
  343. package/dist/esm/flows-actors/mcp-servers.shared.schemas.js.map +1 -1
  344. package/dist/esm/flows-actors/provider-call-records.shared.resources-config.schemas.d.ts +24 -0
  345. package/dist/esm/flows-actors/provider-call-records.shared.resources-config.schemas.d.ts.map +1 -0
  346. package/dist/esm/flows-actors/provider-call-records.shared.resources-config.schemas.js +80 -0
  347. package/dist/esm/flows-actors/provider-call-records.shared.resources-config.schemas.js.map +1 -0
  348. package/dist/esm/flows-actors/provider-call-records.shared.schemas.d.ts +123 -0
  349. package/dist/esm/flows-actors/provider-call-records.shared.schemas.d.ts.map +1 -0
  350. package/dist/esm/flows-actors/provider-call-records.shared.schemas.js +181 -0
  351. package/dist/esm/flows-actors/provider-call-records.shared.schemas.js.map +1 -0
  352. package/dist/esm/flows-actors/tasks.actors.shared.schemas.d.ts +58 -81
  353. package/dist/esm/flows-actors/tasks.actors.shared.schemas.d.ts.map +1 -1
  354. package/dist/esm/flows-actors/tasks.actors.shared.schemas.js +75 -38
  355. package/dist/esm/flows-actors/tasks.actors.shared.schemas.js.map +1 -1
  356. package/dist/esm/frontend-definitions/settings-destination-ref.definitions.d.ts +217 -0
  357. package/dist/esm/frontend-definitions/settings-destination-ref.definitions.d.ts.map +1 -0
  358. package/dist/esm/frontend-definitions/settings-destination-ref.definitions.js +230 -0
  359. package/dist/esm/frontend-definitions/settings-destination-ref.definitions.js.map +1 -0
  360. package/dist/esm/guidance/guidance-flow.shared.schemas.d.ts +106 -24
  361. package/dist/esm/guidance/guidance-flow.shared.schemas.d.ts.map +1 -1
  362. package/dist/esm/guidance/guidance-flow.shared.schemas.js +152 -14
  363. package/dist/esm/guidance/guidance-flow.shared.schemas.js.map +1 -1
  364. package/dist/esm/guidance/lifecycle-state.shared.schemas.d.ts +0 -6
  365. package/dist/esm/guidance/lifecycle-state.shared.schemas.d.ts.map +1 -1
  366. package/dist/esm/guidance/lifecycle-state.shared.schemas.js +0 -19
  367. package/dist/esm/guidance/lifecycle-state.shared.schemas.js.map +1 -1
  368. package/dist/esm/guidance/milestone-builders.shared.d.ts +4 -2
  369. package/dist/esm/guidance/milestone-builders.shared.d.ts.map +1 -1
  370. package/dist/esm/guidance/milestone-builders.shared.js +4 -2
  371. package/dist/esm/guidance/milestone-builders.shared.js.map +1 -1
  372. package/dist/esm/guidance/milestone-definition.shared.schemas.d.ts +66 -4
  373. package/dist/esm/guidance/milestone-definition.shared.schemas.d.ts.map +1 -1
  374. package/dist/esm/guidance/milestone-definition.shared.schemas.js +50 -0
  375. package/dist/esm/guidance/milestone-definition.shared.schemas.js.map +1 -1
  376. package/dist/esm/guidance/progression-presentation.shared.schemas.d.ts +71 -0
  377. package/dist/esm/guidance/progression-presentation.shared.schemas.d.ts.map +1 -0
  378. package/dist/esm/guidance/progression-presentation.shared.schemas.js +72 -0
  379. package/dist/esm/guidance/progression-presentation.shared.schemas.js.map +1 -0
  380. package/dist/esm/guidance/progression-state.shared.resources-config.schemas.d.ts +2 -0
  381. package/dist/esm/guidance/progression-state.shared.resources-config.schemas.d.ts.map +1 -1
  382. package/dist/esm/guidance/progression-state.shared.schemas.d.ts +4 -0
  383. package/dist/esm/guidance/progression-state.shared.schemas.d.ts.map +1 -1
  384. package/dist/esm/guidance/progression-state.shared.schemas.js +5 -0
  385. package/dist/esm/guidance/progression-state.shared.schemas.js.map +1 -1
  386. package/dist/esm/http-api-binding/http-api-binding-id.shared.utils.d.ts.map +1 -1
  387. package/dist/esm/http-api-binding/http-api-binding-id.shared.utils.js +2 -1
  388. package/dist/esm/http-api-binding/http-api-binding-id.shared.utils.js.map +1 -1
  389. package/dist/esm/http-api-binding/http-api-binding.shared.schemas.d.ts +181 -412
  390. package/dist/esm/http-api-binding/http-api-binding.shared.schemas.d.ts.map +1 -1
  391. package/dist/esm/http-api-binding/http-api-binding.shared.schemas.js +249 -199
  392. package/dist/esm/http-api-binding/http-api-binding.shared.schemas.js.map +1 -1
  393. package/dist/esm/http-api-binding/http-api-transport-dialect.shared.d.ts +107 -0
  394. package/dist/esm/http-api-binding/http-api-transport-dialect.shared.d.ts.map +1 -0
  395. package/dist/esm/http-api-binding/http-api-transport-dialect.shared.js +108 -0
  396. package/dist/esm/http-api-binding/http-api-transport-dialect.shared.js.map +1 -0
  397. package/dist/esm/http-api-binding/read-through-engine-anchors.shared.d.ts +38 -0
  398. package/dist/esm/http-api-binding/read-through-engine-anchors.shared.d.ts.map +1 -0
  399. package/dist/esm/http-api-binding/read-through-engine-anchors.shared.js +42 -0
  400. package/dist/esm/http-api-binding/read-through-engine-anchors.shared.js.map +1 -0
  401. package/dist/esm/index.d.ts +47 -4
  402. package/dist/esm/index.d.ts.map +1 -1
  403. package/dist/esm/index.js +77 -16
  404. package/dist/esm/index.js.map +1 -1
  405. package/dist/esm/meta-workflows/actions.meta-workflows.shared.schemas.d.ts.map +1 -0
  406. package/dist/esm/meta-workflows/actions.meta-workflows.shared.schemas.js.map +1 -0
  407. package/dist/esm/meta-workflows/catalog.meta-workflows.shared.schemas.d.ts.map +1 -0
  408. package/dist/esm/meta-workflows/catalog.meta-workflows.shared.schemas.js.map +1 -0
  409. package/dist/esm/meta-workflows/coding-tasks.meta-workflows.shared.schemas.d.ts +130 -0
  410. package/dist/esm/meta-workflows/coding-tasks.meta-workflows.shared.schemas.d.ts.map +1 -0
  411. package/dist/esm/meta-workflows/coding-tasks.meta-workflows.shared.schemas.js +104 -0
  412. package/dist/esm/meta-workflows/coding-tasks.meta-workflows.shared.schemas.js.map +1 -0
  413. package/dist/esm/meta-workflows/context-selection.meta-workflows.shared.schemas.d.ts.map +1 -0
  414. package/dist/esm/meta-workflows/context-selection.meta-workflows.shared.schemas.js.map +1 -0
  415. package/dist/esm/{flows-actors/meta-workflows → meta-workflows}/decisions.meta-workflows.shared.schemas.d.ts +64 -0
  416. package/dist/esm/meta-workflows/decisions.meta-workflows.shared.schemas.d.ts.map +1 -0
  417. package/dist/esm/{flows-actors/meta-workflows → meta-workflows}/decisions.meta-workflows.shared.schemas.js +47 -0
  418. package/dist/esm/meta-workflows/decisions.meta-workflows.shared.schemas.js.map +1 -0
  419. package/dist/esm/meta-workflows/orchestration.meta-workflows.shared.schemas.d.ts +544 -0
  420. package/dist/esm/meta-workflows/orchestration.meta-workflows.shared.schemas.d.ts.map +1 -0
  421. package/dist/esm/meta-workflows/orchestration.meta-workflows.shared.schemas.js +638 -0
  422. package/dist/esm/meta-workflows/orchestration.meta-workflows.shared.schemas.js.map +1 -0
  423. package/dist/esm/{flows-actors/meta-workflows → meta-workflows}/portable-primitives.meta-workflows.shared.schemas.d.ts +15 -8
  424. package/dist/esm/meta-workflows/portable-primitives.meta-workflows.shared.schemas.d.ts.map +1 -0
  425. package/dist/esm/{flows-actors/meta-workflows → meta-workflows}/portable-primitives.meta-workflows.shared.schemas.js +15 -8
  426. package/dist/esm/meta-workflows/portable-primitives.meta-workflows.shared.schemas.js.map +1 -0
  427. package/dist/esm/meta-workflows.exports.d.ts +21 -25
  428. package/dist/esm/meta-workflows.exports.d.ts.map +1 -1
  429. package/dist/esm/meta-workflows.exports.js +21 -25
  430. package/dist/esm/meta-workflows.exports.js.map +1 -1
  431. package/dist/esm/notifications/email/email-submission.shared.enums.d.ts +16 -0
  432. package/dist/esm/notifications/email/email-submission.shared.enums.d.ts.map +1 -0
  433. package/dist/esm/notifications/email/email-submission.shared.enums.js +17 -0
  434. package/dist/esm/notifications/email/email-submission.shared.enums.js.map +1 -0
  435. package/dist/esm/notifications/email/email-template-registry.shared.schemas.d.ts +36 -0
  436. package/dist/esm/notifications/email/email-template-registry.shared.schemas.d.ts.map +1 -1
  437. package/dist/esm/notifications/email/email-template-registry.shared.schemas.js +50 -3
  438. package/dist/esm/notifications/email/email-template-registry.shared.schemas.js.map +1 -1
  439. package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.resources-config.schemas.d.ts.map +1 -1
  440. package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.resources-config.schemas.js +4 -1
  441. package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.resources-config.schemas.js.map +1 -1
  442. package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.schemas.d.ts +2 -1
  443. package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.schemas.d.ts.map +1 -1
  444. package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.schemas.js +3 -2
  445. package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.schemas.js.map +1 -1
  446. package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.d.ts.map +1 -1
  447. package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.js +44 -3
  448. package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.js.map +1 -1
  449. package/dist/esm/notifications/notification-badges.shared.resources-config.schemas.d.ts +1 -1
  450. package/dist/esm/notifications/notification-badges.shared.resources-config.schemas.d.ts.map +1 -1
  451. package/dist/esm/notifications/notification-badges.shared.resources-config.schemas.js +12 -33
  452. package/dist/esm/notifications/notification-badges.shared.resources-config.schemas.js.map +1 -1
  453. package/dist/esm/notifications/notifications.shared.schemas.d.ts +68 -6
  454. package/dist/esm/notifications/notifications.shared.schemas.d.ts.map +1 -1
  455. package/dist/esm/notifications/notifications.shared.schemas.js +68 -6
  456. package/dist/esm/notifications/notifications.shared.schemas.js.map +1 -1
  457. package/dist/esm/organizations/application-owner-organization.shared.schemas.d.ts +145 -0
  458. package/dist/esm/organizations/application-owner-organization.shared.schemas.d.ts.map +1 -0
  459. package/dist/esm/organizations/application-owner-organization.shared.schemas.js +146 -0
  460. package/dist/esm/organizations/application-owner-organization.shared.schemas.js.map +1 -0
  461. package/dist/esm/organizations/organization-features.shared.resources-config.schemas.d.ts +2 -0
  462. package/dist/esm/organizations/organization-features.shared.resources-config.schemas.d.ts.map +1 -1
  463. package/dist/esm/organizations/organization-features.shared.resources-config.schemas.js +39 -3
  464. package/dist/esm/organizations/organization-features.shared.resources-config.schemas.js.map +1 -1
  465. package/dist/esm/organizations/organization-members.shared.resources-config.schemas.d.ts +1 -1
  466. package/dist/esm/organizations/organization-members.shared.resources-config.schemas.d.ts.map +1 -1
  467. package/dist/esm/organizations/organization-members.shared.resources-config.schemas.js +18 -14
  468. package/dist/esm/organizations/organization-members.shared.resources-config.schemas.js.map +1 -1
  469. package/dist/esm/organizations/organization-members.shared.schemas.d.ts +1 -1
  470. package/dist/esm/organizations/organization-members.shared.schemas.d.ts.map +1 -1
  471. package/dist/esm/organizations/organization-members.shared.schemas.js +9 -1
  472. package/dist/esm/organizations/organization-members.shared.schemas.js.map +1 -1
  473. package/dist/esm/organizations/organization-preferences.shared.schemas.d.ts +2 -1
  474. package/dist/esm/organizations/organization-preferences.shared.schemas.d.ts.map +1 -1
  475. package/dist/esm/organizations/organization-preferences.shared.schemas.js +3 -0
  476. package/dist/esm/organizations/organization-preferences.shared.schemas.js.map +1 -1
  477. package/dist/esm/organizations/organization-profile.shared.schemas.d.ts +3 -1
  478. package/dist/esm/organizations/organization-profile.shared.schemas.d.ts.map +1 -1
  479. package/dist/esm/organizations/organization-profile.shared.schemas.js +4 -2
  480. package/dist/esm/organizations/organization-profile.shared.schemas.js.map +1 -1
  481. package/dist/esm/organizations/organization-unit-narrowing.shared.d.ts +29 -2
  482. package/dist/esm/organizations/organization-unit-narrowing.shared.d.ts.map +1 -1
  483. package/dist/esm/organizations/organization-unit-narrowing.shared.js +27 -0
  484. package/dist/esm/organizations/organization-unit-narrowing.shared.js.map +1 -1
  485. package/dist/esm/organizations/organization-units.shared.resources-config.schemas.d.ts +2 -0
  486. package/dist/esm/organizations/organization-units.shared.resources-config.schemas.d.ts.map +1 -1
  487. package/dist/esm/organizations/organization-units.shared.resources-config.schemas.js +3 -0
  488. package/dist/esm/organizations/organization-units.shared.resources-config.schemas.js.map +1 -1
  489. package/dist/esm/organizations/organization-units.shared.schemas.d.ts +17 -5
  490. package/dist/esm/organizations/organization-units.shared.schemas.d.ts.map +1 -1
  491. package/dist/esm/organizations/organization-units.shared.schemas.js +65 -5
  492. package/dist/esm/organizations/organization-units.shared.schemas.js.map +1 -1
  493. package/dist/esm/organizations/organizations.shared.resources-config.schemas.d.ts +51 -7
  494. package/dist/esm/organizations/organizations.shared.resources-config.schemas.d.ts.map +1 -1
  495. package/dist/esm/organizations/organizations.shared.resources-config.schemas.js +151 -7
  496. package/dist/esm/organizations/organizations.shared.resources-config.schemas.js.map +1 -1
  497. package/dist/esm/organizations/organizations.shared.schemas.d.ts +18 -83
  498. package/dist/esm/organizations/organizations.shared.schemas.d.ts.map +1 -1
  499. package/dist/esm/organizations/organizations.shared.schemas.js +37 -19
  500. package/dist/esm/organizations/organizations.shared.schemas.js.map +1 -1
  501. package/dist/esm/organizations/tenant-teardown-config.shared.schemas.d.ts +13 -0
  502. package/dist/esm/organizations/tenant-teardown-config.shared.schemas.d.ts.map +1 -1
  503. package/dist/esm/organizations/tenant-teardown-config.shared.schemas.js +13 -0
  504. package/dist/esm/organizations/tenant-teardown-config.shared.schemas.js.map +1 -1
  505. package/dist/esm/provider-registration-runtime.exports.d.ts +1 -0
  506. package/dist/esm/provider-registration-runtime.exports.d.ts.map +1 -1
  507. package/dist/esm/provider-registration-runtime.exports.js +1 -0
  508. package/dist/esm/provider-registration-runtime.exports.js.map +1 -1
  509. package/dist/esm/public-runtime/index.d.ts +53 -2
  510. package/dist/esm/public-runtime/index.d.ts.map +1 -1
  511. package/dist/esm/public-runtime/index.js +45 -2
  512. package/dist/esm/public-runtime/index.js.map +1 -1
  513. package/dist/esm/queue/jobs.shared.resources-config.schemas.d.ts +7 -8
  514. package/dist/esm/queue/jobs.shared.resources-config.schemas.d.ts.map +1 -1
  515. package/dist/esm/queue/jobs.shared.resources-config.schemas.js +30 -6
  516. package/dist/esm/queue/jobs.shared.resources-config.schemas.js.map +1 -1
  517. package/dist/esm/queue/jobs.shared.schemas.d.ts +388 -2
  518. package/dist/esm/queue/jobs.shared.schemas.d.ts.map +1 -1
  519. package/dist/esm/queue/jobs.shared.schemas.js +315 -11
  520. package/dist/esm/queue/jobs.shared.schemas.js.map +1 -1
  521. package/dist/esm/queue/jobs.shared.utils.d.ts +6 -4
  522. package/dist/esm/queue/jobs.shared.utils.d.ts.map +1 -1
  523. package/dist/esm/queue/jobs.shared.utils.js +5 -4
  524. package/dist/esm/queue/jobs.shared.utils.js.map +1 -1
  525. package/dist/esm/queue/queues.shared.schemas.d.ts +20 -8
  526. package/dist/esm/queue/queues.shared.schemas.d.ts.map +1 -1
  527. package/dist/esm/queue/queues.shared.schemas.js +23 -18
  528. package/dist/esm/queue/queues.shared.schemas.js.map +1 -1
  529. package/dist/esm/queue/queues.shared.utils.d.ts +4 -2
  530. package/dist/esm/queue/queues.shared.utils.d.ts.map +1 -1
  531. package/dist/esm/queue/queues.shared.utils.js +4 -2
  532. package/dist/esm/queue/queues.shared.utils.js.map +1 -1
  533. package/dist/esm/rag/rag-retrieval-health.shared.d.ts +27 -0
  534. package/dist/esm/rag/rag-retrieval-health.shared.d.ts.map +1 -0
  535. package/dist/esm/rag/rag-retrieval-health.shared.js +29 -0
  536. package/dist/esm/rag/rag-retrieval-health.shared.js.map +1 -0
  537. package/dist/esm/requests/header-keys.shared.d.ts +6 -0
  538. package/dist/esm/requests/header-keys.shared.d.ts.map +1 -1
  539. package/dist/esm/requests/header-keys.shared.js +7 -0
  540. package/dist/esm/requests/header-keys.shared.js.map +1 -1
  541. package/dist/esm/requests/idempotency-key.shared.d.ts +76 -0
  542. package/dist/esm/requests/idempotency-key.shared.d.ts.map +1 -0
  543. package/dist/esm/requests/idempotency-key.shared.js +112 -0
  544. package/dist/esm/requests/idempotency-key.shared.js.map +1 -0
  545. package/dist/esm/requests/manual-controllers-routes-documentation.d.ts.map +1 -1
  546. package/dist/esm/requests/manual-controllers-routes-documentation.js +275 -20
  547. package/dist/esm/requests/manual-controllers-routes-documentation.js.map +1 -1
  548. package/dist/esm/requests/manual-controllers-routes-urls.d.ts +134 -0
  549. package/dist/esm/requests/manual-controllers-routes-urls.d.ts.map +1 -1
  550. package/dist/esm/requests/manual-controllers-routes-urls.js +153 -0
  551. package/dist/esm/requests/manual-controllers-routes-urls.js.map +1 -1
  552. package/dist/esm/requests/websocket.shared.schemas.d.ts +198 -20
  553. package/dist/esm/requests/websocket.shared.schemas.d.ts.map +1 -1
  554. package/dist/esm/requests/websocket.shared.schemas.js +236 -5
  555. package/dist/esm/requests/websocket.shared.schemas.js.map +1 -1
  556. package/dist/esm/resources/child-operations.shared.schemas.d.ts +56 -5
  557. package/dist/esm/resources/child-operations.shared.schemas.d.ts.map +1 -1
  558. package/dist/esm/resources/child-operations.shared.schemas.js +97 -5
  559. package/dist/esm/resources/child-operations.shared.schemas.js.map +1 -1
  560. package/dist/esm/resources/context-policy.shared.schemas.d.ts +20 -0
  561. package/dist/esm/resources/context-policy.shared.schemas.d.ts.map +1 -1
  562. package/dist/esm/resources/context-policy.shared.schemas.js +3 -0
  563. package/dist/esm/resources/context-policy.shared.schemas.js.map +1 -1
  564. package/dist/esm/resources/resources-config.shared.factory.d.ts.map +1 -1
  565. package/dist/esm/resources/resources-config.shared.factory.js +596 -34
  566. package/dist/esm/resources/resources-config.shared.factory.js.map +1 -1
  567. package/dist/esm/resources/resources-config.shared.schemas.d.ts +665 -40
  568. package/dist/esm/resources/resources-config.shared.schemas.d.ts.map +1 -1
  569. package/dist/esm/resources/resources-config.shared.schemas.js +315 -22
  570. package/dist/esm/resources/resources-config.shared.schemas.js.map +1 -1
  571. package/dist/esm/resources/resources-registry.shared.core.definitions.d.ts.map +1 -1
  572. package/dist/esm/resources/resources-registry.shared.core.definitions.js +431 -69
  573. package/dist/esm/resources/resources-registry.shared.core.definitions.js.map +1 -1
  574. package/dist/esm/resources/resources.shared.core.definitions.d.ts +36 -0
  575. package/dist/esm/resources/resources.shared.core.definitions.d.ts.map +1 -1
  576. package/dist/esm/resources/resources.shared.core.definitions.js +46 -0
  577. package/dist/esm/resources/resources.shared.core.definitions.js.map +1 -1
  578. package/dist/esm/resources/resources.shared.schemas.d.ts +256 -10
  579. package/dist/esm/resources/resources.shared.schemas.d.ts.map +1 -1
  580. package/dist/esm/resources/resources.shared.schemas.js +209 -9
  581. package/dist/esm/resources/resources.shared.schemas.js.map +1 -1
  582. package/dist/esm/resources/resources.shared.utils.d.ts +34 -8
  583. package/dist/esm/resources/resources.shared.utils.d.ts.map +1 -1
  584. package/dist/esm/resources/resources.shared.utils.js +69 -12
  585. package/dist/esm/resources/resources.shared.utils.js.map +1 -1
  586. package/dist/esm/resources/utils/composition-cascade-deletability.validation.d.ts +44 -12
  587. package/dist/esm/resources/utils/composition-cascade-deletability.validation.d.ts.map +1 -1
  588. package/dist/esm/resources/utils/composition-cascade-deletability.validation.js +46 -23
  589. package/dist/esm/resources/utils/composition-cascade-deletability.validation.js.map +1 -1
  590. package/dist/esm/resources/utils/dependent-lifecycle-classification.validation.d.ts +61 -0
  591. package/dist/esm/resources/utils/dependent-lifecycle-classification.validation.d.ts.map +1 -0
  592. package/dist/esm/resources/utils/dependent-lifecycle-classification.validation.js +79 -0
  593. package/dist/esm/resources/utils/dependent-lifecycle-classification.validation.js.map +1 -0
  594. package/dist/esm/resources/utils/initiator-stamped-field-satisfiability.validation.d.ts +60 -0
  595. package/dist/esm/resources/utils/initiator-stamped-field-satisfiability.validation.d.ts.map +1 -0
  596. package/dist/esm/resources/utils/initiator-stamped-field-satisfiability.validation.js +80 -0
  597. package/dist/esm/resources/utils/initiator-stamped-field-satisfiability.validation.js.map +1 -0
  598. package/dist/esm/resources/utils/populated-file-fields.shared.utils.d.ts +21 -0
  599. package/dist/esm/resources/utils/populated-file-fields.shared.utils.d.ts.map +1 -0
  600. package/dist/esm/resources/utils/populated-file-fields.shared.utils.js +159 -0
  601. package/dist/esm/resources/utils/populated-file-fields.shared.utils.js.map +1 -0
  602. package/dist/esm/resources/utils/resources-config-naming.utils.d.ts +15 -0
  603. package/dist/esm/resources/utils/resources-config-naming.utils.d.ts.map +1 -1
  604. package/dist/esm/resources/utils/resources-config-naming.utils.js +56 -11
  605. package/dist/esm/resources/utils/resources-config-naming.utils.js.map +1 -1
  606. package/dist/esm/resources/utils/resources-config-operations.dtos-builder.utils.d.ts +51 -1
  607. package/dist/esm/resources/utils/resources-config-operations.dtos-builder.utils.d.ts.map +1 -1
  608. package/dist/esm/resources/utils/resources-config-operations.dtos-builder.utils.js +210 -51
  609. package/dist/esm/resources/utils/resources-config-operations.dtos-builder.utils.js.map +1 -1
  610. package/dist/esm/resources/utils/resources-config-operations.urls-builder.utils.d.ts +34 -0
  611. package/dist/esm/resources/utils/resources-config-operations.urls-builder.utils.d.ts.map +1 -1
  612. package/dist/esm/resources/utils/resources-config-operations.urls-builder.utils.js +45 -1
  613. package/dist/esm/resources/utils/resources-config-operations.urls-builder.utils.js.map +1 -1
  614. package/dist/esm/resources/utils/shared-persistence-collection.utils.d.ts +29 -0
  615. package/dist/esm/resources/utils/shared-persistence-collection.utils.d.ts.map +1 -1
  616. package/dist/esm/resources/utils/shared-persistence-collection.utils.js +30 -0
  617. package/dist/esm/resources/utils/shared-persistence-collection.utils.js.map +1 -1
  618. package/dist/esm/resources/utils/templatable-file-fields.shared.utils.d.ts.map +1 -1
  619. package/dist/esm/resources/utils/templatable-file-fields.shared.utils.js +49 -11
  620. package/dist/esm/resources/utils/templatable-file-fields.shared.utils.js.map +1 -1
  621. package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.d.ts.map +1 -1
  622. package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.js +4 -1
  623. package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.js.map +1 -1
  624. package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.d.ts.map +1 -1
  625. package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.js +4 -1
  626. package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.js.map +1 -1
  627. package/dist/esm/security/authentications/authentication.shared.dto.schemas.d.ts +129 -17
  628. package/dist/esm/security/authentications/authentication.shared.dto.schemas.d.ts.map +1 -1
  629. package/dist/esm/security/authentications/authentication.shared.dto.schemas.js +160 -6
  630. package/dist/esm/security/authentications/authentication.shared.dto.schemas.js.map +1 -1
  631. package/dist/esm/security/authentications/authentication.shared.schemas.d.ts +324 -9
  632. package/dist/esm/security/authentications/authentication.shared.schemas.d.ts.map +1 -1
  633. package/dist/esm/security/authentications/authentication.shared.schemas.js +411 -8
  634. package/dist/esm/security/authentications/authentication.shared.schemas.js.map +1 -1
  635. package/dist/esm/security/authentications/authentication.shared.utils.d.ts +87 -4
  636. package/dist/esm/security/authentications/authentication.shared.utils.d.ts.map +1 -1
  637. package/dist/esm/security/authentications/authentication.shared.utils.js +95 -6
  638. package/dist/esm/security/authentications/authentication.shared.utils.js.map +1 -1
  639. package/dist/esm/security/authentications/consumable-token.shared.schemas.d.ts +23 -1
  640. package/dist/esm/security/authentications/consumable-token.shared.schemas.d.ts.map +1 -1
  641. package/dist/esm/security/authentications/consumable-token.shared.schemas.js +23 -1
  642. package/dist/esm/security/authentications/consumable-token.shared.schemas.js.map +1 -1
  643. package/dist/esm/security/authentications/cross-frontend-handoff.shared.dto.schemas.d.ts +7 -1
  644. package/dist/esm/security/authentications/cross-frontend-handoff.shared.dto.schemas.d.ts.map +1 -1
  645. package/dist/esm/security/authentications/cross-frontend-handoff.shared.dto.schemas.js +7 -1
  646. package/dist/esm/security/authentications/cross-frontend-handoff.shared.dto.schemas.js.map +1 -1
  647. package/dist/esm/security/authentications/password-blocklist.shared.utils.d.ts +74 -0
  648. package/dist/esm/security/authentications/password-blocklist.shared.utils.d.ts.map +1 -0
  649. package/dist/esm/security/authentications/password-blocklist.shared.utils.js +122 -0
  650. package/dist/esm/security/authentications/password-blocklist.shared.utils.js.map +1 -0
  651. package/dist/esm/security/authentications/registration.shared.dto.schemas.d.ts +88 -2
  652. package/dist/esm/security/authentications/registration.shared.dto.schemas.d.ts.map +1 -1
  653. package/dist/esm/security/authentications/registration.shared.dto.schemas.js +149 -2
  654. package/dist/esm/security/authentications/registration.shared.dto.schemas.js.map +1 -1
  655. package/dist/esm/security/authentications/scim/scim-organization-unit-mapping.shared.d.ts +57 -11
  656. package/dist/esm/security/authentications/scim/scim-organization-unit-mapping.shared.d.ts.map +1 -1
  657. package/dist/esm/security/authentications/scim/scim-organization-unit-mapping.shared.js +44 -11
  658. package/dist/esm/security/authentications/scim/scim-organization-unit-mapping.shared.js.map +1 -1
  659. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.resources-config.schemas.d.ts.map +1 -1
  660. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.resources-config.schemas.js +20 -7
  661. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.resources-config.schemas.js.map +1 -1
  662. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.d.ts +16 -2
  663. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.d.ts.map +1 -1
  664. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.js +32 -2
  665. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.js.map +1 -1
  666. package/dist/esm/security/authentications/scim/scim-tokens.shared.resources-config.schemas.d.ts.map +1 -1
  667. package/dist/esm/security/authentications/scim/scim-tokens.shared.resources-config.schemas.js +7 -1
  668. package/dist/esm/security/authentications/scim/scim-tokens.shared.resources-config.schemas.js.map +1 -1
  669. package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.resources-config.schemas.d.ts.map +1 -1
  670. package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.resources-config.schemas.js +4 -1
  671. package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.resources-config.schemas.js.map +1 -1
  672. package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.resources-config.schemas.d.ts +27 -0
  673. package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.resources-config.schemas.d.ts.map +1 -0
  674. package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.resources-config.schemas.js +109 -0
  675. package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.resources-config.schemas.js.map +1 -0
  676. package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.schemas.d.ts +66 -0
  677. package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.schemas.d.ts.map +1 -0
  678. package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.schemas.js +107 -0
  679. package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.schemas.js.map +1 -0
  680. package/dist/esm/security/authentications/siem/siem-export-config.shared.resources-config.schemas.d.ts +19 -0
  681. package/dist/esm/security/authentications/siem/siem-export-config.shared.resources-config.schemas.d.ts.map +1 -1
  682. package/dist/esm/security/authentications/siem/siem-export-config.shared.resources-config.schemas.js +50 -13
  683. package/dist/esm/security/authentications/siem/siem-export-config.shared.resources-config.schemas.js.map +1 -1
  684. package/dist/esm/security/authentications/siem/siem-export-config.shared.schemas.d.ts +18 -6
  685. package/dist/esm/security/authentications/siem/siem-export-config.shared.schemas.d.ts.map +1 -1
  686. package/dist/esm/security/authentications/siem/siem-export-config.shared.schemas.js +133 -4
  687. package/dist/esm/security/authentications/siem/siem-export-config.shared.schemas.js.map +1 -1
  688. package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.d.ts +29 -3
  689. package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.d.ts.map +1 -1
  690. package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.js +81 -22
  691. package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.js.map +1 -1
  692. package/dist/esm/security/authentications/sso/sso-config.shared.schemas.d.ts +0 -40
  693. package/dist/esm/security/authentications/sso/sso-config.shared.schemas.d.ts.map +1 -1
  694. package/dist/esm/security/authentications/sso/sso-config.shared.schemas.js +100 -26
  695. package/dist/esm/security/authentications/sso/sso-config.shared.schemas.js.map +1 -1
  696. package/dist/esm/security/authentications/sso/sso-connection.shared.resources-config.schemas.d.ts +9 -1
  697. package/dist/esm/security/authentications/sso/sso-connection.shared.resources-config.schemas.d.ts.map +1 -1
  698. package/dist/esm/security/authentications/sso/sso-connection.shared.resources-config.schemas.js +9 -1
  699. package/dist/esm/security/authentications/sso/sso-connection.shared.resources-config.schemas.js.map +1 -1
  700. package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.d.ts +8 -2
  701. package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.d.ts.map +1 -1
  702. package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.js +91 -4
  703. package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.js.map +1 -1
  704. package/dist/esm/security/authorizations/administrative-continuity.shared.schemas.d.ts +50 -6
  705. package/dist/esm/security/authorizations/administrative-continuity.shared.schemas.d.ts.map +1 -1
  706. package/dist/esm/security/authorizations/administrative-continuity.shared.schemas.js +50 -6
  707. package/dist/esm/security/authorizations/administrative-continuity.shared.schemas.js.map +1 -1
  708. package/dist/esm/security/authorizations/application-access-grants.shared.resources-config.schemas.d.ts +39 -0
  709. package/dist/esm/security/authorizations/application-access-grants.shared.resources-config.schemas.d.ts.map +1 -0
  710. package/dist/esm/security/authorizations/application-access-grants.shared.resources-config.schemas.js +265 -0
  711. package/dist/esm/security/authorizations/application-access-grants.shared.resources-config.schemas.js.map +1 -0
  712. package/dist/esm/security/authorizations/application-access-grants.shared.schemas.d.ts +187 -0
  713. package/dist/esm/security/authorizations/application-access-grants.shared.schemas.d.ts.map +1 -0
  714. package/dist/esm/security/authorizations/application-access-grants.shared.schemas.js +271 -0
  715. package/dist/esm/security/authorizations/application-access-grants.shared.schemas.js.map +1 -0
  716. package/dist/esm/security/authorizations/platform-access-grants.shared.schemas.d.ts +23 -0
  717. package/dist/esm/security/authorizations/platform-access-grants.shared.schemas.d.ts.map +1 -1
  718. package/dist/esm/security/authorizations/platform-access-grants.shared.schemas.js +24 -0
  719. package/dist/esm/security/authorizations/platform-access-grants.shared.schemas.js.map +1 -1
  720. package/dist/esm/security/authorizations/roles.shared.defaults.d.ts.map +1 -1
  721. package/dist/esm/security/authorizations/roles.shared.defaults.js +6 -0
  722. package/dist/esm/security/authorizations/roles.shared.defaults.js.map +1 -1
  723. package/dist/esm/security/authorizations/roles.shared.schemas.d.ts +14 -0
  724. package/dist/esm/security/authorizations/roles.shared.schemas.d.ts.map +1 -1
  725. package/dist/esm/security/authorizations/roles.shared.schemas.js +19 -0
  726. package/dist/esm/security/authorizations/roles.shared.schemas.js.map +1 -1
  727. package/dist/esm/security/authorizations/roles.shared.utils.d.ts.map +1 -1
  728. package/dist/esm/security/authorizations/roles.shared.utils.js +2 -0
  729. package/dist/esm/security/authorizations/roles.shared.utils.js.map +1 -1
  730. package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.d.ts +4 -1
  731. package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.d.ts.map +1 -1
  732. package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.d.ts +5 -2
  733. package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.d.ts.map +1 -1
  734. package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.js +13 -42
  735. package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.js.map +1 -1
  736. package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.d.ts +257 -13
  737. package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.d.ts.map +1 -1
  738. package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.js +281 -49
  739. package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.js.map +1 -1
  740. package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.d.ts +6 -3
  741. package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.d.ts.map +1 -1
  742. package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.js +74 -4
  743. package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.js.map +1 -1
  744. package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.d.ts +5 -2
  745. package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.d.ts.map +1 -1
  746. package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.js +105 -3
  747. package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.js.map +1 -1
  748. package/dist/esm/security/outbound-target-control.shared.schemas.d.ts +67 -0
  749. package/dist/esm/security/outbound-target-control.shared.schemas.d.ts.map +1 -0
  750. package/dist/esm/security/outbound-target-control.shared.schemas.js +69 -0
  751. package/dist/esm/security/outbound-target-control.shared.schemas.js.map +1 -0
  752. package/dist/esm/systems-of-record/system-of-record-credential-kind.shared.d.ts +159 -0
  753. package/dist/esm/systems-of-record/system-of-record-credential-kind.shared.d.ts.map +1 -0
  754. package/dist/esm/systems-of-record/system-of-record-credential-kind.shared.js +164 -0
  755. package/dist/esm/systems-of-record/system-of-record-credential-kind.shared.js.map +1 -0
  756. package/dist/esm/systems-of-record/system-of-record-declaration.shared.schemas.d.ts +209 -0
  757. package/dist/esm/systems-of-record/system-of-record-declaration.shared.schemas.d.ts.map +1 -0
  758. package/dist/esm/systems-of-record/system-of-record-declaration.shared.schemas.js +150 -0
  759. package/dist/esm/systems-of-record/system-of-record-declaration.shared.schemas.js.map +1 -0
  760. package/dist/esm/systems-of-record/system-of-record-env.shared.d.ts +79 -0
  761. package/dist/esm/systems-of-record/system-of-record-env.shared.d.ts.map +1 -0
  762. package/dist/esm/systems-of-record/system-of-record-env.shared.js +116 -0
  763. package/dist/esm/systems-of-record/system-of-record-env.shared.js.map +1 -0
  764. package/dist/esm/systems-of-record/system-of-record-error-codes.shared.d.ts +145 -0
  765. package/dist/esm/systems-of-record/system-of-record-error-codes.shared.d.ts.map +1 -0
  766. package/dist/esm/systems-of-record/system-of-record-error-codes.shared.js +146 -0
  767. package/dist/esm/systems-of-record/system-of-record-error-codes.shared.js.map +1 -0
  768. package/dist/esm/systems-of-record/system-of-record-facet.shared.schemas.d.ts +478 -0
  769. package/dist/esm/systems-of-record/system-of-record-facet.shared.schemas.d.ts.map +1 -0
  770. package/dist/esm/systems-of-record/system-of-record-facet.shared.schemas.js +619 -0
  771. package/dist/esm/systems-of-record/system-of-record-facet.shared.schemas.js.map +1 -0
  772. package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.resources-config.schemas.d.ts +31 -0
  773. package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.resources-config.schemas.d.ts.map +1 -0
  774. package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.resources-config.schemas.js +232 -0
  775. package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.resources-config.schemas.js.map +1 -0
  776. package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.schemas.d.ts +127 -0
  777. package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.schemas.d.ts.map +1 -0
  778. package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.schemas.js +204 -0
  779. package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.schemas.js.map +1 -0
  780. package/dist/esm/testing/resource-config-builders.d.ts.map +1 -1
  781. package/dist/esm/testing/resource-config-builders.js +10 -4
  782. package/dist/esm/testing/resource-config-builders.js.map +1 -1
  783. package/dist/esm/users/anonymous-user-marketing-metadata.shared.schemas.d.ts +2 -1
  784. package/dist/esm/users/anonymous-user-marketing-metadata.shared.schemas.d.ts.map +1 -1
  785. package/dist/esm/users/anonymous-user-marketing-metadata.shared.schemas.js +2 -1
  786. package/dist/esm/users/anonymous-user-marketing-metadata.shared.schemas.js.map +1 -1
  787. package/dist/esm/users/anonymous-users.shared.resources-config.schemas.d.ts +139 -24
  788. package/dist/esm/users/anonymous-users.shared.resources-config.schemas.d.ts.map +1 -1
  789. package/dist/esm/users/anonymous-users.shared.resources-config.schemas.js +255 -0
  790. package/dist/esm/users/anonymous-users.shared.resources-config.schemas.js.map +1 -1
  791. package/dist/esm/users/anonymous-users.shared.schema.d.ts +5 -3
  792. package/dist/esm/users/anonymous-users.shared.schema.d.ts.map +1 -1
  793. package/dist/esm/users/anonymous-users.shared.schema.js +18 -1
  794. package/dist/esm/users/anonymous-users.shared.schema.js.map +1 -1
  795. package/dist/esm/users/inbound-contacts.shared.resources-config.schemas.d.ts +2 -1
  796. package/dist/esm/users/inbound-contacts.shared.resources-config.schemas.d.ts.map +1 -1
  797. package/dist/esm/users/inbound-contacts.shared.resources-config.schemas.js +23 -0
  798. package/dist/esm/users/inbound-contacts.shared.resources-config.schemas.js.map +1 -1
  799. package/dist/esm/users/inbound-contacts.shared.schemas.d.ts +2 -1
  800. package/dist/esm/users/inbound-contacts.shared.schemas.d.ts.map +1 -1
  801. package/dist/esm/users/user-consent-decision.shared.utils.d.ts +127 -0
  802. package/dist/esm/users/user-consent-decision.shared.utils.d.ts.map +1 -0
  803. package/dist/esm/users/user-consent-decision.shared.utils.js +189 -0
  804. package/dist/esm/users/user-consent-decision.shared.utils.js.map +1 -0
  805. package/dist/esm/users/user-identity-links.shared.resources-config.schemas.d.ts +1 -0
  806. package/dist/esm/users/user-identity-links.shared.resources-config.schemas.d.ts.map +1 -1
  807. package/dist/esm/users/user-identity-links.shared.schemas.d.ts +1 -0
  808. package/dist/esm/users/user-identity-links.shared.schemas.d.ts.map +1 -1
  809. package/dist/esm/users/user-identity-links.shared.schemas.js +30 -0
  810. package/dist/esm/users/user-identity-links.shared.schemas.js.map +1 -1
  811. package/dist/esm/users/user-preferences-reset.shared.utils.d.ts +6 -6
  812. package/dist/esm/users/user-preferences-reset.shared.utils.js +6 -6
  813. package/dist/esm/users/user-preferences-reset.shared.utils.js.map +1 -1
  814. package/dist/esm/users/user-preferences.shared.resources-config.schemas.d.ts +74 -29
  815. package/dist/esm/users/user-preferences.shared.resources-config.schemas.d.ts.map +1 -1
  816. package/dist/esm/users/user-preferences.shared.resources-config.schemas.js +99 -0
  817. package/dist/esm/users/user-preferences.shared.resources-config.schemas.js.map +1 -1
  818. package/dist/esm/users/user-profiles.shared.resources-config.schemas.d.ts.map +1 -1
  819. package/dist/esm/users/user-profiles.shared.resources-config.schemas.js +25 -9
  820. package/dist/esm/users/user-profiles.shared.resources-config.schemas.js.map +1 -1
  821. package/dist/esm/users/user-self-preferences.shared.resources-config.schemas.d.ts +4 -4
  822. package/dist/esm/users/user-self-preferences.shared.resources-config.schemas.d.ts.map +1 -1
  823. package/dist/esm/users/user-self-preferences.shared.resources-config.schemas.js +12 -1
  824. package/dist/esm/users/user-self-preferences.shared.resources-config.schemas.js.map +1 -1
  825. package/dist/esm/users/user-self.shared.resources-config.schemas.d.ts +1 -0
  826. package/dist/esm/users/user-self.shared.resources-config.schemas.d.ts.map +1 -1
  827. package/dist/esm/users/user-self.shared.resources-config.schemas.js +2 -2
  828. package/dist/esm/users/user-self.shared.resources-config.schemas.js.map +1 -1
  829. package/dist/esm/users/users.shared.resources-config.schemas.d.ts +1 -0
  830. package/dist/esm/users/users.shared.resources-config.schemas.d.ts.map +1 -1
  831. package/dist/esm/users/users.shared.resources-config.schemas.js +2 -2
  832. package/dist/esm/users/users.shared.resources-config.schemas.js.map +1 -1
  833. package/dist/esm/users/users.shared.schemas.d.ts +28 -10
  834. package/dist/esm/users/users.shared.schemas.d.ts.map +1 -1
  835. package/dist/esm/users/users.shared.schemas.js +86 -11
  836. package/dist/esm/users/users.shared.schemas.js.map +1 -1
  837. package/dist/tsconfig.build.tsbuildinfo +1 -1
  838. package/package.json +14 -35
  839. package/dist/esm/flows-actors/apps-blueprint/apps-blueprint-agent-personas.shared.enums.d.ts +0 -19
  840. package/dist/esm/flows-actors/apps-blueprint/apps-blueprint-agent-personas.shared.enums.d.ts.map +0 -1
  841. package/dist/esm/flows-actors/apps-blueprint/apps-blueprint-agent-personas.shared.enums.js +0 -35
  842. package/dist/esm/flows-actors/apps-blueprint/apps-blueprint-agent-personas.shared.enums.js.map +0 -1
  843. package/dist/esm/flows-actors/apps-blueprint/apps-blueprint.shared.schemas.d.ts +0 -213
  844. package/dist/esm/flows-actors/apps-blueprint/apps-blueprint.shared.schemas.d.ts.map +0 -1
  845. package/dist/esm/flows-actors/apps-blueprint/apps-blueprint.shared.schemas.js +0 -287
  846. package/dist/esm/flows-actors/apps-blueprint/apps-blueprint.shared.schemas.js.map +0 -1
  847. package/dist/esm/flows-actors/apps-blueprint/artifacts.apps-blueprint.shared.schemas.d.ts +0 -236
  848. package/dist/esm/flows-actors/apps-blueprint/artifacts.apps-blueprint.shared.schemas.d.ts.map +0 -1
  849. package/dist/esm/flows-actors/apps-blueprint/artifacts.apps-blueprint.shared.schemas.js +0 -212
  850. package/dist/esm/flows-actors/apps-blueprint/artifacts.apps-blueprint.shared.schemas.js.map +0 -1
  851. package/dist/esm/flows-actors/meta-workflows/actions.meta-workflows.shared.schemas.d.ts.map +0 -1
  852. package/dist/esm/flows-actors/meta-workflows/actions.meta-workflows.shared.schemas.js.map +0 -1
  853. package/dist/esm/flows-actors/meta-workflows/budget-authority.meta-workflows.shared.schemas.d.ts +0 -17
  854. package/dist/esm/flows-actors/meta-workflows/budget-authority.meta-workflows.shared.schemas.d.ts.map +0 -1
  855. package/dist/esm/flows-actors/meta-workflows/budget-authority.meta-workflows.shared.schemas.js +0 -31
  856. package/dist/esm/flows-actors/meta-workflows/budget-authority.meta-workflows.shared.schemas.js.map +0 -1
  857. package/dist/esm/flows-actors/meta-workflows/catalog.meta-workflows.shared.schemas.d.ts.map +0 -1
  858. package/dist/esm/flows-actors/meta-workflows/catalog.meta-workflows.shared.schemas.js.map +0 -1
  859. package/dist/esm/flows-actors/meta-workflows/context-selection.meta-workflows.shared.schemas.d.ts.map +0 -1
  860. package/dist/esm/flows-actors/meta-workflows/context-selection.meta-workflows.shared.schemas.js.map +0 -1
  861. package/dist/esm/flows-actors/meta-workflows/continuity-identifiers.meta-workflows.shared.schemas.d.ts +0 -28
  862. package/dist/esm/flows-actors/meta-workflows/continuity-identifiers.meta-workflows.shared.schemas.d.ts.map +0 -1
  863. package/dist/esm/flows-actors/meta-workflows/continuity-identifiers.meta-workflows.shared.schemas.js +0 -28
  864. package/dist/esm/flows-actors/meta-workflows/continuity-identifiers.meta-workflows.shared.schemas.js.map +0 -1
  865. package/dist/esm/flows-actors/meta-workflows/decisions.meta-workflows.shared.schemas.d.ts.map +0 -1
  866. package/dist/esm/flows-actors/meta-workflows/decisions.meta-workflows.shared.schemas.js.map +0 -1
  867. package/dist/esm/flows-actors/meta-workflows/execution-binding-common.meta-workflows.shared.schemas.d.ts +0 -100
  868. package/dist/esm/flows-actors/meta-workflows/execution-binding-common.meta-workflows.shared.schemas.d.ts.map +0 -1
  869. package/dist/esm/flows-actors/meta-workflows/execution-binding-common.meta-workflows.shared.schemas.js +0 -232
  870. package/dist/esm/flows-actors/meta-workflows/execution-binding-common.meta-workflows.shared.schemas.js.map +0 -1
  871. package/dist/esm/flows-actors/meta-workflows/execution-binding-vocabularies.meta-workflows.shared.schemas.d.ts +0 -29
  872. package/dist/esm/flows-actors/meta-workflows/execution-binding-vocabularies.meta-workflows.shared.schemas.d.ts.map +0 -1
  873. package/dist/esm/flows-actors/meta-workflows/execution-binding-vocabularies.meta-workflows.shared.schemas.js +0 -58
  874. package/dist/esm/flows-actors/meta-workflows/execution-binding-vocabularies.meta-workflows.shared.schemas.js.map +0 -1
  875. package/dist/esm/flows-actors/meta-workflows/portable-primitives.meta-workflows.shared.schemas.d.ts.map +0 -1
  876. package/dist/esm/flows-actors/meta-workflows/portable-primitives.meta-workflows.shared.schemas.js.map +0 -1
  877. package/dist/esm/flows-actors/task-continuity-binding.actors.shared.schemas.d.ts +0 -81
  878. package/dist/esm/flows-actors/task-continuity-binding.actors.shared.schemas.d.ts.map +0 -1
  879. package/dist/esm/flows-actors/task-continuity-binding.actors.shared.schemas.js +0 -82
  880. package/dist/esm/flows-actors/task-continuity-binding.actors.shared.schemas.js.map +0 -1
  881. package/dist/esm/flows-actors/utils/flow-actors.context-builder.apps-context.shared.utils.d.ts +0 -2
  882. package/dist/esm/flows-actors/utils/flow-actors.context-builder.apps-context.shared.utils.d.ts.map +0 -1
  883. package/dist/esm/flows-actors/utils/flow-actors.context-builder.apps-context.shared.utils.js +0 -1
  884. package/dist/esm/flows-actors/utils/flow-actors.context-builder.apps-context.shared.utils.js.map +0 -1
  885. /package/dist/esm/{flows-actors/meta-workflows → meta-workflows}/actions.meta-workflows.shared.schemas.d.ts +0 -0
  886. /package/dist/esm/{flows-actors/meta-workflows → meta-workflows}/actions.meta-workflows.shared.schemas.js +0 -0
  887. /package/dist/esm/{flows-actors/meta-workflows → meta-workflows}/catalog.meta-workflows.shared.schemas.d.ts +0 -0
  888. /package/dist/esm/{flows-actors/meta-workflows → meta-workflows}/catalog.meta-workflows.shared.schemas.js +0 -0
  889. /package/dist/esm/{flows-actors/meta-workflows → meta-workflows}/context-selection.meta-workflows.shared.schemas.d.ts +0 -0
  890. /package/dist/esm/{flows-actors/meta-workflows → meta-workflows}/context-selection.meta-workflows.shared.schemas.js +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"registration.shared.dto.schemas.d.ts","sourceRoot":"","sources":["../../../../../src/security/authentications/registration.shared.dto.schemas.ts"],"names":[],"mappings":"AAAA;;;;;G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7 @@
7
7
  import { z } from 'zod';
8
8
  import { AutocompleteFieldIdentifier } from '@wildo-ai/zod-decorators';
9
9
  import { AuthMethod } from './authentication.shared.schemas.js';
10
+ import { carriedAuthRedirect } from './authentication.shared.dto.schemas.js';
10
11
  // ═══════════════════════════════════════════════════════════════
11
12
  // Registration Form + API DTO
12
13
  // ═══════════════════════════════════════════════════════════════
@@ -21,6 +22,56 @@ import { AuthMethod } from './authentication.shared.schemas.js';
21
22
  * (not here) because the error message needs i18n.
22
23
  * The .isPassword() decorator tells FormField to render password inputs.
23
24
  */
25
+ /**
26
+ * Answers to the extra profile questions a user type declares for sign-up (#1371).
27
+ *
28
+ * Keyed by the question's `id`, valued by the scalar kinds a bindable question can produce. It is
29
+ * NOT a free-form bag: the server validates every key against the resolved user type's own
30
+ * `registration.additionalProfileQuestions` and refuses anything undeclared, so a client cannot use
31
+ * it to write a profile field the application never asked about.
32
+ */
33
+ export const RegistrationProfileAnswersSchema = z.record(z.string().min(1), z.union([z.string(), z.number(), z.boolean()]));
34
+ /**
35
+ * Reconcile submitted sign-up answers against the questions the user type actually declares (#1371).
36
+ *
37
+ * Shared rather than written in the controller, because the FORM builds its fields from the same
38
+ * declaration: one function decides what a question means, so the screen and the server cannot
39
+ * disagree about which answers are legitimate.
40
+ *
41
+ * ## Undeclared keys are REFUSED, not dropped
42
+ *
43
+ * Dropping would make `profileAnswers` a silent no-op for a client that names a field the
44
+ * application never asked about — and silence is exactly how a write reaches a place nobody
45
+ * intended. Refusing keeps the transport a projection of the declaration rather than a door onto
46
+ * the profile.
47
+ *
48
+ * ## An empty string is not an answer
49
+ *
50
+ * A required question submitted as `''` is MISSING, not answered. Without that, a required question
51
+ * is satisfied by a field the person tabbed through, which is the opposite of what `required` means.
52
+ */
53
+ export function resolveRegistrationProfileAnswers(declaredQuestions, submitted) {
54
+ const questions = declaredQuestions ?? [];
55
+ const answers = submitted ?? {};
56
+ const byId = new Map(questions.map((question) => [question.id, question]));
57
+ const undeclaredQuestionIds = Object.keys(answers).filter((id) => !byId.has(id));
58
+ const profileFields = {};
59
+ const missingRequiredQuestionIds = [];
60
+ for (const question of questions) {
61
+ const value = answers[question.id];
62
+ const isAnswered = value !== undefined && value !== '';
63
+ if (!isAnswered) {
64
+ if (question.required)
65
+ missingRequiredQuestionIds.push(question.id);
66
+ continue;
67
+ }
68
+ // `bindToField` is guaranteed by the config schema, which refuses a sign-up question without
69
+ // one. Guarded anyway: this function is exported and a caller may hold a hand-built list.
70
+ if (question.bindToField)
71
+ profileFields[question.bindToField] = value;
72
+ }
73
+ return { profileFields, undeclaredQuestionIds, missingRequiredQuestionIds };
74
+ }
24
75
  export const UserRegisterFormDtoSchema = z.object({
25
76
  email: z.email().toLowerCase().stringUI({
26
77
  edit: { autoComplete: AutocompleteFieldIdentifier.EMAIL },
@@ -49,8 +100,13 @@ export const UserRegisterFormDtoSchema = z.object({
49
100
  */
50
101
  export const UserRegisterApiDtoSchema = z.object({
51
102
  email: z.email().toLowerCase(),
52
- firstName: z.string().min(1).max(50),
53
- lastName: z.string().min(1).max(50),
103
+ /**
104
+ * Optional on the WIRE because a user type may collect the names at onboarding instead (#1374,
105
+ * `ProfileNamesCollectionMoment.ONBOARDING`). Whether they are required is decided per user type by the
106
+ * registration service — a `REGISTRATION`-moment user type is refused without them, exactly as before.
107
+ */
108
+ firstName: z.string().min(1).max(50).optional(),
109
+ lastName: z.string().min(1).max(50).optional(),
54
110
  password: z.string().min(1).optional(),
55
111
  /** W6.2: Org name when orgNameSource is 'ask'. */
56
112
  organizationName: z.string().min(1).max(200).optional(),
@@ -65,6 +121,38 @@ export const UserRegisterApiDtoSchema = z.object({
65
121
  * which is a better answer than a schema rejection that cannot say what IS allowed.
66
122
  */
67
123
  method: z.enum(AuthMethod).optional(),
124
+ /**
125
+ * Which governed-document releases the registrant AFFIRMATIVELY accepted (issue #54).
126
+ *
127
+ * Release IDS only, and the asymmetry is the security property: the client supplies WHETHER a box
128
+ * was ticked, and the SERVER supplies everything else. It resolves the in-force releases from
129
+ * `compliance.governedDocumentReleases`, matches these ids against them, and records the matches.
130
+ * An id naming nothing in force is ignored rather than refused — a stale form is a stale form, and
131
+ * a registration is not the place to fail on one. So a caller cannot choose which VERSION of the
132
+ * terms they accepted, cannot invent a release, and cannot accept a document the application does
133
+ * not publish.
134
+ *
135
+ * Absent ⇒ nothing was accepted, which is what a client predating this field means and also what a
136
+ * registrant who ticked nothing means. Those two are deliberately the same answer: the record says
137
+ * what was accepted, never what was refused.
138
+ */
139
+ acceptedGovernedDocumentReleaseIds: z.array(z.string().min(1)).max(20).optional(),
140
+ /**
141
+ * The deep link the registration screen was opened with, carried into the emailed sign-in link of a
142
+ * PASSWORD-LESS signup (#1086) — the one register outcome that signs the person in on another page.
143
+ * Decided by {@link carriedAuthRedirect}, the same rule as the magic-link send and the invitation accept:
144
+ * kept only when same-origin and within bounds, otherwise dropped, never refused.
145
+ */
146
+ redirect: z.string().optional().transform(carriedAuthRedirect),
147
+ /**
148
+ * Answers to the user type's declared sign-up profile questions (#1371), keyed by question id.
149
+ *
150
+ * Validated SERVER-SIDE against that user type's own declaration — an undeclared key is refused
151
+ * rather than ignored, so this cannot become a door onto arbitrary profile fields. The form half
152
+ * is built at render time, because the questions are runtime configuration and a module-scope Zod
153
+ * object cannot carry a field per application.
154
+ */
155
+ profileAnswers: RegistrationProfileAnswersSchema.optional(),
68
156
  });
69
157
  // ═══════════════════════════════════════════════════════════════
70
158
  // Invitation Acceptance DTOs
@@ -135,6 +223,13 @@ export const UserInvitationApiDtoSchema = z.object({
135
223
  lastName: z.string().trim().min(1).max(50),
136
224
  password: z.string().optional(),
137
225
  credentialMethod: z.enum(INVITATION_ACCEPT_CREDENTIAL_METHODS).optional(),
226
+ /**
227
+ * The deep link the invitation was opened with, carried into the emailed link when `credentialMethod` is
228
+ * `MAGIC_LINK` (#1014) — the one accept outcome that signs the invitee in on another page. Decided by
229
+ * {@link carriedAuthRedirect}, the same rule as the magic-link send: kept only when same-origin and within
230
+ * bounds, otherwise dropped, never refused.
231
+ */
232
+ redirect: z.string().optional().transform(carriedAuthRedirect),
138
233
  });
139
234
  /**
140
235
  * POST /auth/invitation/reject — API contract.
@@ -155,4 +250,56 @@ export const EmailVerifyDtoSchema = z.object({
155
250
  token: z.string().min(1),
156
251
  email: z.email().toLowerCase(),
157
252
  });
253
+ // ═══════════════════════════════════════════════════════════════
254
+ // Organization Onboarding Form + API DTO
255
+ // ═══════════════════════════════════════════════════════════════
256
+ /**
257
+ * The characters an organization name may not contain. Markup delimiters, quotes and code punctuation are
258
+ * refused so a name renders as text wherever it is shown. One definition, so the onboarding form refuses
259
+ * exactly what `POST /auth/onboarding/complete-org` refuses.
260
+ */
261
+ const ORGANIZATION_NAME_DISALLOWED_CHARACTERS = /^[^<>"'`;{}()\\]+$/;
262
+ /**
263
+ * An organization name, as onboarding accepts it: trimmed FIRST, so a whitespace-only name fails `min(1)` at
264
+ * the boundary rather than trimming to empty after it. The ONE definition — the form and the API contract
265
+ * below both use it, so the form refuses exactly what `POST /auth/onboarding/complete-org` refuses.
266
+ */
267
+ const OnboardingOrganizationNameSchema = z.string().trim().min(1).max(200).regex(ORGANIZATION_NAME_DISALLOWED_CHARACTERS);
268
+ /**
269
+ * POST /auth/onboarding/complete-org — the organization-name step (#1090).
270
+ *
271
+ * Shown to an account whose authentication session is parked at `ONBOARDING_PENDING`: after registration, email
272
+ * verification or enrollment when its user type names its organization at onboarding, or after a sign-in answered
273
+ * `nextStep: onboarding` because the account still owes one (#1091). The frontend AutomatedForm schema; the API
274
+ * contract below adds the session id.
275
+ */
276
+ export const OrganizationOnboardingFormDtoSchema = z.object({
277
+ organizationName: OnboardingOrganizationNameSchema.stringUI({
278
+ edit: { autoComplete: AutocompleteFieldIdentifier.ORGANIZATION },
279
+ }),
280
+ });
281
+ /**
282
+ * POST /auth/onboarding/complete-org — API contract. `sessionId` is the parked session the answer that led
283
+ * here carried; it is what authorizes the completion, and the completion consumes it.
284
+ */
285
+ export const OrganizationOnboardingCompleteApiDtoSchema = z.object({
286
+ sessionId: z.string().min(1),
287
+ organizationName: OnboardingOrganizationNameSchema,
288
+ });
289
+ /**
290
+ * POST /auth/onboarding/complete-profile — API contract (#1374). Discharges
291
+ * `OnboardingObligation.PROFILE_NAMES` on the parked session: the person's first and last name, collected after
292
+ * the address and credential were proven. Same bounds as the sign-up form's name fields, and trimmed, so a name
293
+ * of spaces is refused rather than stored.
294
+ */
295
+ export const ProfileOnboardingCompleteApiDtoSchema = z.object({
296
+ sessionId: z.string().min(1),
297
+ firstName: z.string().trim().min(1).max(50),
298
+ lastName: z.string().trim().min(1).max(50),
299
+ });
300
+ /**
301
+ * The onboarding step's names form (#1374) — the sign-up form's own two name fields, so the same bounds and the
302
+ * same autocomplete hints apply wherever the names are asked.
303
+ */
304
+ export const ProfileOnboardingFormDtoSchema = UserRegisterFormDtoSchema.pick({ firstName: true, lastName: true });
158
305
  //# sourceMappingURL=registration.shared.dto.schemas.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"registration.shared.dto.schemas.js","sourceRoot":"","sources":["../../../../../src/security/authentications/registration.shared.dto.schemas.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,2BAA2B,EAAE,MAAM,0BAA0B,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAE7D,kEAAkE;AAClE,8BAA8B;AAC9B,kEAAkE;AAElE;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAAC;IAChD,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC;QACtC,IAAI,EAAE,EAAE,YAAY,EAAE,2BAA2B,CAAC,KAAK,EAAE;KAC1D,CAAC;IACF,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,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,CAAC,QAAQ,EAAE;CAChD,CAAC,CAAC;AAIH,kEAAkE;AAClE,6BAA6B;AAC7B,kEAAkE;AAElE;;;;GAIG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACxB,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,WAAW,EAAE;CAC/B,CAAC,CAAC","sourcesContent":["/**\n * User Registration — Shared DTO Schemas\n *\n * Single source of truth for user registration validation.\n * Used by both frontend (AutomatedForm component) and backend (req.body parsing).\n */\n\nimport { z } from 'zod';\nimport { AutocompleteFieldIdentifier } from '@wildo-ai/zod-decorators';\nimport { AuthMethod } from './authentication.shared.schemas';\n\n// ═══════════════════════════════════════════════════════════════\n// Registration Form + API DTO\n// ═══════════════════════════════════════════════════════════════\n\n/**\n * POST /auth/register — registration form fields.\n * Used as:\n * - Frontend: AutomatedForm schema (all 5 fields rendered)\n * - Backend: req.body parsing (minus confirmPassword)\n *\n * confirmPassword is a frontend-only field for client-side match validation.\n * The .refine() for password match is applied at the component level\n * (not here) because the error message needs i18n.\n * The .isPassword() decorator tells FormField to render password inputs.\n */\nexport const UserRegisterFormDtoSchema = z.object({\n email: z.email().toLowerCase().stringUI({\n edit: { autoComplete: AutocompleteFieldIdentifier.EMAIL },\n }),\n firstName: z.string().min(1).max(50).stringUI({\n edit: { autoComplete: AutocompleteFieldIdentifier.GIVEN_NAME },\n }),\n lastName: z.string().min(1).max(50).stringUI({\n edit: { autoComplete: AutocompleteFieldIdentifier.FAMILY_NAME },\n }),\n /** W6.2: Org name when orgNameSource is 'ask'. Conditionally shown on frontend. */\n organizationName: z.string().min(1).max(200).stringUI({\n edit: { autoComplete: AutocompleteFieldIdentifier.ORGANIZATION },\n }).optional(),\n password: z.string().min(1).isPassword().stringUI({\n edit: { autoComplete: AutocompleteFieldIdentifier.NEW_PASSWORD },\n }).optional(),\n confirmPassword: z.string().min(1).isPassword().stringUI({\n edit: { autoComplete: AutocompleteFieldIdentifier.NEW_PASSWORD },\n }).optional(),\n});\n\n\nexport type UserRegisterFormDto = z.infer<typeof UserRegisterFormDtoSchema>;\n\n/**\n * POST /auth/register — API contract (what goes over the wire).\n * Backend uses this for req.body parsing.\n * confirmPassword is NOT sent to the backend.\n */\nexport const UserRegisterApiDtoSchema = z.object({\n email: z.email().toLowerCase(),\n firstName: z.string().min(1).max(50),\n lastName: z.string().min(1).max(50),\n password: z.string().min(1).optional(),\n /** W6.2: Org name when orgNameSource is 'ask'. */\n organizationName: z.string().min(1).max(200).optional(),\n /**\n * How the registrant will authenticate afterwards (#463). Absent ⇒ PASSWORD, so a client that\n * predates password-less signup keeps working unchanged.\n *\n * Typed as the whole `AuthMethod` vocabulary rather than a narrowed subset, deliberately: the set\n * a given application accepts is `registration.allowedMethods`, which is per user type and\n * authored, and duplicating a narrower list here would be a second place for it to drift. A method\n * this application does not allow is refused by the service with the allowed set in the message,\n * which is a better answer than a schema rejection that cannot say what IS allowed.\n */\n method: z.enum(AuthMethod).optional(),\n});\n\n\nexport type UserRegisterApiDto = z.infer<typeof UserRegisterApiDtoSchema>;\n\n// ═══════════════════════════════════════════════════════════════\n// Invitation Acceptance DTOs\n// ═══════════════════════════════════════════════════════════════\n\n/**\n * POST /auth/invitation/accept — public invitation-acceptance form fields.\n *\n * The invitation token identifies the target invitation. Name/password fields are optional\n * because an existing invited user may only need to confirm the invitation, while a new\n * invited user can provide profile/password data in the same flow.\n *\n * confirmPassword is frontend-only and excluded from the API DTO.\n */\nexport const UserInvitationFormDtoSchema = z.object({\n // Required, mirroring registration: the invitee establishes their identity at acceptance, and\n // the profile seed keys on non-empty first+last (UserProfileSchema requires both).\n // `.regex(/\\S/)` rejects a WHITESPACE-ONLY name client-side — which `.min(1)` alone would PASS\n // (\" \" has length 2), then the frontend `normalizeText`/`.trim()` collapses it to `undefined`\n // and the required API DTO 400s AFTER the form said the field was valid. It is a CHECK,\n // deliberately NOT a `.trim()` TRANSFORM: a transform ahead of `.stringUI()` disrupts the\n // decorator's introspection surface (`getFieldUIEditConfig`). Trailing/leading whitespace is\n // normalized at the authoritative boundary (`UserInvitationApiDtoSchema`, `.trim().min(1)`).\n firstName: z.string().min(1).max(50).regex(/\\S/).stringUI({\n edit: { autoComplete: AutocompleteFieldIdentifier.GIVEN_NAME },\n }),\n lastName: z.string().min(1).max(50).regex(/\\S/).stringUI({\n edit: { autoComplete: AutocompleteFieldIdentifier.FAMILY_NAME },\n }),\n password: z.string().isPassword().stringUI({\n edit: { autoComplete: AutocompleteFieldIdentifier.NEW_PASSWORD },\n }).optional(),\n confirmPassword: z.string().isPassword().stringUI({\n edit: { autoComplete: AutocompleteFieldIdentifier.NEW_PASSWORD },\n }).optional(),\n});\n\nexport type UserInvitationFormDto = z.infer<typeof UserInvitationFormDtoSchema>;\n\n/**\n * The first-factor credential the invitee chooses to establish at acceptance.\n *\n * The invitation-accept endpoint supports exactly three establishment paths (SSO-managed\n * invitees are routed to the IdP's enterprise-authorize flow, NOT this endpoint):\n * - `PASSWORD` — set a password now. When both `credentialMethod` and\n * `password` are omitted, intentionally activate with no local credential;\n * another configured authentication method can establish later sessions.\n * - `MAGIC_LINK` — activate with no local credential; a magic link is emailed and the\n * session is established when the invitee clicks it.\n * - `PASSKEY` — enroll a NEW WebAuthn credential at accept; the invitation token bootstraps\n * the session and the passkey is registered as the go-forward credential.\n */\nexport const INVITATION_ACCEPT_CREDENTIAL_METHODS = [\n AuthMethod.PASSWORD,\n AuthMethod.MAGIC_LINK,\n AuthMethod.PASSKEY,\n] as const;\n\n/**\n * The subset of {@link AuthMethod} an invitee may establish at accept time. Enterprise-SSO / social-\n * OAuth invitees are routed to the IdP authorize flow, NOT the accept endpoint, so those members are\n * intentionally absent. Single source of truth for BOTH the request DTO (`credentialMethod` enum) and\n * the backend `AcceptInvitationParams.credentialMethod` — so the service signature can never drift\n * wider than the wire contract it is fed from.\n */\nexport type InvitationAcceptCredentialMethod = (typeof INVITATION_ACCEPT_CREDENTIAL_METHODS)[number];\n\n/**\n * POST /auth/invitation/accept — API contract.\n *\n * `credentialMethod` is optional by design. When absent, a provided `password`\n * establishes a password credential; without one, acceptance activates the\n * membership without a local credential. `MAGIC_LINK` and `PASSKEY` are\n * explicit because they initiate method-specific work.\n */\nexport const UserInvitationApiDtoSchema = z.object({\n invitationToken: z.string().min(1),\n // Required (min 1), mirroring registration — see UserInvitationFormDtoSchema.\n // `.trim()` before `.min(1)` fail-closes a whitespace-only name at the boundary\n // (a direct API caller can't seed a blank profile name).\n firstName: z.string().trim().min(1).max(50),\n lastName: z.string().trim().min(1).max(50),\n password: z.string().optional(),\n credentialMethod: z.enum(INVITATION_ACCEPT_CREDENTIAL_METHODS).optional(),\n});\n\nexport type UserInvitationApiDto = z.infer<typeof UserInvitationApiDtoSchema>;\n\n/**\n * POST /auth/invitation/reject — API contract.\n */\nexport const UserInvitationRejectApiDtoSchema = z.object({\n invitationToken: z.string().min(1),\n rejectionReason: z.string().max(500).optional(),\n});\n\nexport type UserInvitationRejectApiDto = z.infer<typeof UserInvitationRejectApiDtoSchema>;\n\n// ═══════════════════════════════════════════════════════════════\n// Email Verification API DTO\n// ═══════════════════════════════════════════════════════════════\n\n/**\n * POST /auth/verify-email — API contract.\n * Token and email are extracted from URL query parameters on the frontend.\n * Email is required for defense-in-depth constant-time comparison against token metadata.\n */\nexport const EmailVerifyDtoSchema = z.object({\n token: z.string().min(1),\n email: z.email().toLowerCase(),\n});\n\nexport type EmailVerifyDto = z.infer<typeof EmailVerifyDtoSchema>;\n"]}
1
+ {"version":3,"file":"registration.shared.dto.schemas.js","sourceRoot":"","sources":["../../../../../src/security/authentications/registration.shared.dto.schemas.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,2BAA2B,EAAE,MAAM,0BAA0B,CAAC;AACvE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AC3C,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC;CAC3C,CAAC,CAAC;AAIH;;;GAGG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,yBAAyB,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC","sourcesContent":["/**\n * User Registration — Shared DTO Schemas\n *\n * Single source of truth for user registration validation.\n * Used by both frontend (AutomatedForm component) and backend (req.body parsing).\n */\n\nimport { z } from 'zod';\nimport type { OnboardingSurveyQuestion } from '../../config/frontend/onboarding.shared.schemas';\nimport { AutocompleteFieldIdentifier } from '@wildo-ai/zod-decorators';\nimport { AuthMethod } from './authentication.shared.schemas';\nimport { carriedAuthRedirect } from './authentication.shared.dto.schemas';\n\n// ═══════════════════════════════════════════════════════════════\n// Registration Form + API DTO\n// ═══════════════════════════════════════════════════════════════\n\n/**\n * POST /auth/register — registration form fields.\n * Used as:\n * - Frontend: AutomatedForm schema (all 5 fields rendered)\n * - Backend: req.body parsing (minus confirmPassword)\n *\n * confirmPassword is a frontend-only field for client-side match validation.\n * The .refine() for password match is applied at the component level\n * (not here) because the error message needs i18n.\n * The .isPassword() decorator tells FormField to render password inputs.\n */\n/**\n * Answers to the extra profile questions a user type declares for sign-up (#1371).\n *\n * Keyed by the question's `id`, valued by the scalar kinds a bindable question can produce. It is\n * NOT a free-form bag: the server validates every key against the resolved user type's own\n * `registration.additionalProfileQuestions` and refuses anything undeclared, so a client cannot use\n * it to write a profile field the application never asked about.\n */\nexport const RegistrationProfileAnswersSchema = z.record(\n z.string().min(1),\n z.union([z.string(), z.number(), z.boolean()]),\n);\nexport type RegistrationProfileAnswers = z.infer<typeof RegistrationProfileAnswersSchema>;\n\n/** What the declaration made of the answers a registrant submitted. */\nexport interface ResolvedRegistrationProfileAnswers {\n /** Profile FIELD → value, ready to ride the composition seed. Keyed by `bindToField`, not by question id. */\n readonly profileFields: Record<string, string | number | boolean>;\n /** Submitted keys this user type never declared. Non-empty means the payload is refused. */\n readonly undeclaredQuestionIds: readonly string[];\n /** Declared-and-required questions with no usable answer. Non-empty means the payload is refused. */\n readonly missingRequiredQuestionIds: readonly string[];\n}\n\n/**\n * Reconcile submitted sign-up answers against the questions the user type actually declares (#1371).\n *\n * Shared rather than written in the controller, because the FORM builds its fields from the same\n * declaration: one function decides what a question means, so the screen and the server cannot\n * disagree about which answers are legitimate.\n *\n * ## Undeclared keys are REFUSED, not dropped\n *\n * Dropping would make `profileAnswers` a silent no-op for a client that names a field the\n * application never asked about — and silence is exactly how a write reaches a place nobody\n * intended. Refusing keeps the transport a projection of the declaration rather than a door onto\n * the profile.\n *\n * ## An empty string is not an answer\n *\n * A required question submitted as `''` is MISSING, not answered. Without that, a required question\n * is satisfied by a field the person tabbed through, which is the opposite of what `required` means.\n */\nexport function resolveRegistrationProfileAnswers(\n declaredQuestions: readonly OnboardingSurveyQuestion[] | undefined,\n submitted: RegistrationProfileAnswers | undefined,\n): ResolvedRegistrationProfileAnswers {\n const questions = declaredQuestions ?? [];\n const answers = submitted ?? {};\n const byId = new Map(questions.map((question) => [question.id, question]));\n\n const undeclaredQuestionIds = Object.keys(answers).filter((id) => !byId.has(id));\n const profileFields: Record<string, string | number | boolean> = {};\n const missingRequiredQuestionIds: string[] = [];\n\n for (const question of questions) {\n const value = answers[question.id];\n const isAnswered = value !== undefined && value !== '';\n if (!isAnswered) {\n if (question.required) missingRequiredQuestionIds.push(question.id);\n continue;\n }\n // `bindToField` is guaranteed by the config schema, which refuses a sign-up question without\n // one. Guarded anyway: this function is exported and a caller may hold a hand-built list.\n if (question.bindToField) profileFields[question.bindToField] = value;\n }\n\n return { profileFields, undeclaredQuestionIds, missingRequiredQuestionIds };\n}\n\nexport const UserRegisterFormDtoSchema = z.object({\n email: z.email().toLowerCase().stringUI({\n edit: { autoComplete: AutocompleteFieldIdentifier.EMAIL },\n }),\n firstName: z.string().min(1).max(50).stringUI({\n edit: { autoComplete: AutocompleteFieldIdentifier.GIVEN_NAME },\n }),\n lastName: z.string().min(1).max(50).stringUI({\n edit: { autoComplete: AutocompleteFieldIdentifier.FAMILY_NAME },\n }),\n /** W6.2: Org name when orgNameSource is 'ask'. Conditionally shown on frontend. */\n organizationName: z.string().min(1).max(200).stringUI({\n edit: { autoComplete: AutocompleteFieldIdentifier.ORGANIZATION },\n }).optional(),\n password: z.string().min(1).isPassword().stringUI({\n edit: { autoComplete: AutocompleteFieldIdentifier.NEW_PASSWORD },\n }).optional(),\n confirmPassword: z.string().min(1).isPassword().stringUI({\n edit: { autoComplete: AutocompleteFieldIdentifier.NEW_PASSWORD },\n }).optional(),\n});\n\n\nexport type UserRegisterFormDto = z.infer<typeof UserRegisterFormDtoSchema>;\n\n/**\n * POST /auth/register — API contract (what goes over the wire).\n * Backend uses this for req.body parsing.\n * confirmPassword is NOT sent to the backend.\n */\nexport const UserRegisterApiDtoSchema = z.object({\n email: z.email().toLowerCase(),\n /**\n * Optional on the WIRE because a user type may collect the names at onboarding instead (#1374,\n * `ProfileNamesCollectionMoment.ONBOARDING`). Whether they are required is decided per user type by the\n * registration service — a `REGISTRATION`-moment user type is refused without them, exactly as before.\n */\n firstName: z.string().min(1).max(50).optional(),\n lastName: z.string().min(1).max(50).optional(),\n password: z.string().min(1).optional(),\n /** W6.2: Org name when orgNameSource is 'ask'. */\n organizationName: z.string().min(1).max(200).optional(),\n /**\n * How the registrant will authenticate afterwards (#463). Absent ⇒ PASSWORD, so a client that\n * predates password-less signup keeps working unchanged.\n *\n * Typed as the whole `AuthMethod` vocabulary rather than a narrowed subset, deliberately: the set\n * a given application accepts is `registration.allowedMethods`, which is per user type and\n * authored, and duplicating a narrower list here would be a second place for it to drift. A method\n * this application does not allow is refused by the service with the allowed set in the message,\n * which is a better answer than a schema rejection that cannot say what IS allowed.\n */\n method: z.enum(AuthMethod).optional(),\n /**\n * Which governed-document releases the registrant AFFIRMATIVELY accepted (issue #54).\n *\n * Release IDS only, and the asymmetry is the security property: the client supplies WHETHER a box\n * was ticked, and the SERVER supplies everything else. It resolves the in-force releases from\n * `compliance.governedDocumentReleases`, matches these ids against them, and records the matches.\n * An id naming nothing in force is ignored rather than refused — a stale form is a stale form, and\n * a registration is not the place to fail on one. So a caller cannot choose which VERSION of the\n * terms they accepted, cannot invent a release, and cannot accept a document the application does\n * not publish.\n *\n * Absent ⇒ nothing was accepted, which is what a client predating this field means and also what a\n * registrant who ticked nothing means. Those two are deliberately the same answer: the record says\n * what was accepted, never what was refused.\n */\n acceptedGovernedDocumentReleaseIds: z.array(z.string().min(1)).max(20).optional(),\n /**\n * The deep link the registration screen was opened with, carried into the emailed sign-in link of a\n * PASSWORD-LESS signup (#1086) — the one register outcome that signs the person in on another page.\n * Decided by {@link carriedAuthRedirect}, the same rule as the magic-link send and the invitation accept:\n * kept only when same-origin and within bounds, otherwise dropped, never refused.\n */\n redirect: z.string().optional().transform(carriedAuthRedirect),\n /**\n * Answers to the user type's declared sign-up profile questions (#1371), keyed by question id.\n *\n * Validated SERVER-SIDE against that user type's own declaration — an undeclared key is refused\n * rather than ignored, so this cannot become a door onto arbitrary profile fields. The form half\n * is built at render time, because the questions are runtime configuration and a module-scope Zod\n * object cannot carry a field per application.\n */\n profileAnswers: RegistrationProfileAnswersSchema.optional(),\n});\n\n\nexport type UserRegisterApiDto = z.infer<typeof UserRegisterApiDtoSchema>;\n\n// ═══════════════════════════════════════════════════════════════\n// Invitation Acceptance DTOs\n// ═══════════════════════════════════════════════════════════════\n\n/**\n * POST /auth/invitation/accept — public invitation-acceptance form fields.\n *\n * The invitation token identifies the target invitation. Name/password fields are optional\n * because an existing invited user may only need to confirm the invitation, while a new\n * invited user can provide profile/password data in the same flow.\n *\n * confirmPassword is frontend-only and excluded from the API DTO.\n */\nexport const UserInvitationFormDtoSchema = z.object({\n // Required, mirroring registration: the invitee establishes their identity at acceptance, and\n // the profile seed keys on non-empty first+last (UserProfileSchema requires both).\n // `.regex(/\\S/)` rejects a WHITESPACE-ONLY name client-side — which `.min(1)` alone would PASS\n // (\" \" has length 2), then the frontend `normalizeText`/`.trim()` collapses it to `undefined`\n // and the required API DTO 400s AFTER the form said the field was valid. It is a CHECK,\n // deliberately NOT a `.trim()` TRANSFORM: a transform ahead of `.stringUI()` disrupts the\n // decorator's introspection surface (`getFieldUIEditConfig`). Trailing/leading whitespace is\n // normalized at the authoritative boundary (`UserInvitationApiDtoSchema`, `.trim().min(1)`).\n firstName: z.string().min(1).max(50).regex(/\\S/).stringUI({\n edit: { autoComplete: AutocompleteFieldIdentifier.GIVEN_NAME },\n }),\n lastName: z.string().min(1).max(50).regex(/\\S/).stringUI({\n edit: { autoComplete: AutocompleteFieldIdentifier.FAMILY_NAME },\n }),\n password: z.string().isPassword().stringUI({\n edit: { autoComplete: AutocompleteFieldIdentifier.NEW_PASSWORD },\n }).optional(),\n confirmPassword: z.string().isPassword().stringUI({\n edit: { autoComplete: AutocompleteFieldIdentifier.NEW_PASSWORD },\n }).optional(),\n});\n\nexport type UserInvitationFormDto = z.infer<typeof UserInvitationFormDtoSchema>;\n\n/**\n * The first-factor credential the invitee chooses to establish at acceptance.\n *\n * The invitation-accept endpoint supports exactly three establishment paths (SSO-managed\n * invitees are routed to the IdP's enterprise-authorize flow, NOT this endpoint):\n * - `PASSWORD` — set a password now. When both `credentialMethod` and\n * `password` are omitted, intentionally activate with no local credential;\n * another configured authentication method can establish later sessions.\n * - `MAGIC_LINK` — activate with no local credential; a magic link is emailed and the\n * session is established when the invitee clicks it.\n * - `PASSKEY` — enroll a NEW WebAuthn credential at accept; the invitation token bootstraps\n * the session and the passkey is registered as the go-forward credential.\n */\nexport const INVITATION_ACCEPT_CREDENTIAL_METHODS = [\n AuthMethod.PASSWORD,\n AuthMethod.MAGIC_LINK,\n AuthMethod.PASSKEY,\n] as const;\n\n/**\n * The subset of {@link AuthMethod} an invitee may establish at accept time. Enterprise-SSO / social-\n * OAuth invitees are routed to the IdP authorize flow, NOT the accept endpoint, so those members are\n * intentionally absent. Single source of truth for BOTH the request DTO (`credentialMethod` enum) and\n * the backend `AcceptInvitationParams.credentialMethod` — so the service signature can never drift\n * wider than the wire contract it is fed from.\n */\nexport type InvitationAcceptCredentialMethod = (typeof INVITATION_ACCEPT_CREDENTIAL_METHODS)[number];\n\n/**\n * POST /auth/invitation/accept — API contract.\n *\n * `credentialMethod` is optional by design. When absent, a provided `password`\n * establishes a password credential; without one, acceptance activates the\n * membership without a local credential. `MAGIC_LINK` and `PASSKEY` are\n * explicit because they initiate method-specific work.\n */\nexport const UserInvitationApiDtoSchema = z.object({\n invitationToken: z.string().min(1),\n // Required (min 1), mirroring registration — see UserInvitationFormDtoSchema.\n // `.trim()` before `.min(1)` fail-closes a whitespace-only name at the boundary\n // (a direct API caller can't seed a blank profile name).\n firstName: z.string().trim().min(1).max(50),\n lastName: z.string().trim().min(1).max(50),\n password: z.string().optional(),\n credentialMethod: z.enum(INVITATION_ACCEPT_CREDENTIAL_METHODS).optional(),\n /**\n * The deep link the invitation was opened with, carried into the emailed link when `credentialMethod` is\n * `MAGIC_LINK` (#1014) — the one accept outcome that signs the invitee in on another page. Decided by\n * {@link carriedAuthRedirect}, the same rule as the magic-link send: kept only when same-origin and within\n * bounds, otherwise dropped, never refused.\n */\n redirect: z.string().optional().transform(carriedAuthRedirect),\n});\n\nexport type UserInvitationApiDto = z.infer<typeof UserInvitationApiDtoSchema>;\n\n/**\n * POST /auth/invitation/reject — API contract.\n */\nexport const UserInvitationRejectApiDtoSchema = z.object({\n invitationToken: z.string().min(1),\n rejectionReason: z.string().max(500).optional(),\n});\n\nexport type UserInvitationRejectApiDto = z.infer<typeof UserInvitationRejectApiDtoSchema>;\n\n// ═══════════════════════════════════════════════════════════════\n// Email Verification API DTO\n// ═══════════════════════════════════════════════════════════════\n\n/**\n * POST /auth/verify-email — API contract.\n * Token and email are extracted from URL query parameters on the frontend.\n * Email is required for defense-in-depth constant-time comparison against token metadata.\n */\nexport const EmailVerifyDtoSchema = z.object({\n token: z.string().min(1),\n email: z.email().toLowerCase(),\n});\n\nexport type EmailVerifyDto = z.infer<typeof EmailVerifyDtoSchema>;\n\n// ═══════════════════════════════════════════════════════════════\n// Organization Onboarding Form + API DTO\n// ═══════════════════════════════════════════════════════════════\n\n/**\n * The characters an organization name may not contain. Markup delimiters, quotes and code punctuation are\n * refused so a name renders as text wherever it is shown. One definition, so the onboarding form refuses\n * exactly what `POST /auth/onboarding/complete-org` refuses.\n */\nconst ORGANIZATION_NAME_DISALLOWED_CHARACTERS: RegExp = /^[^<>\"'`;{}()\\\\]+$/;\n\n/**\n * An organization name, as onboarding accepts it: trimmed FIRST, so a whitespace-only name fails `min(1)` at\n * the boundary rather than trimming to empty after it. The ONE definition — the form and the API contract\n * below both use it, so the form refuses exactly what `POST /auth/onboarding/complete-org` refuses.\n */\nconst OnboardingOrganizationNameSchema = z.string().trim().min(1).max(200).regex(ORGANIZATION_NAME_DISALLOWED_CHARACTERS);\n\n/**\n * POST /auth/onboarding/complete-org — the organization-name step (#1090).\n *\n * Shown to an account whose authentication session is parked at `ONBOARDING_PENDING`: after registration, email\n * verification or enrollment when its user type names its organization at onboarding, or after a sign-in answered\n * `nextStep: onboarding` because the account still owes one (#1091). The frontend AutomatedForm schema; the API\n * contract below adds the session id.\n */\nexport const OrganizationOnboardingFormDtoSchema = z.object({\n organizationName: OnboardingOrganizationNameSchema.stringUI({\n edit: { autoComplete: AutocompleteFieldIdentifier.ORGANIZATION },\n }),\n});\n\nexport type OrganizationOnboardingFormDto = z.infer<typeof OrganizationOnboardingFormDtoSchema>;\n\n/**\n * POST /auth/onboarding/complete-org — API contract. `sessionId` is the parked session the answer that led\n * here carried; it is what authorizes the completion, and the completion consumes it.\n */\nexport const OrganizationOnboardingCompleteApiDtoSchema = z.object({\n sessionId: z.string().min(1),\n organizationName: OnboardingOrganizationNameSchema,\n});\n\nexport type OrganizationOnboardingCompleteApiDto = z.infer<typeof OrganizationOnboardingCompleteApiDtoSchema>;\n\n/**\n * POST /auth/onboarding/complete-profile — API contract (#1374). Discharges\n * `OnboardingObligation.PROFILE_NAMES` on the parked session: the person's first and last name, collected after\n * the address and credential were proven. Same bounds as the sign-up form's name fields, and trimmed, so a name\n * of spaces is refused rather than stored.\n */\nexport const ProfileOnboardingCompleteApiDtoSchema = z.object({\n sessionId: z.string().min(1),\n firstName: z.string().trim().min(1).max(50),\n lastName: z.string().trim().min(1).max(50),\n});\n\nexport type ProfileOnboardingCompleteApiDto = z.infer<typeof ProfileOnboardingCompleteApiDtoSchema>;\n\n/**\n * The onboarding step's names form (#1374) — the sign-up form's own two name fields, so the same bounds and the\n * same autocomplete hints apply wherever the names are asked.\n */\nexport const ProfileOnboardingFormDtoSchema = UserRegisterFormDtoSchema.pick({ firstName: true, lastName: true });\n\nexport type ProfileOnboardingFormDto = z.infer<typeof ProfileOnboardingFormDtoSchema>;\n"]}
@@ -69,23 +69,69 @@ export declare function resolveScimOrganizationUnitId(directoryValue: string | u
69
69
  export type ScimOrganizationUnitAssignment = {
70
70
  readonly _id: string;
71
71
  readonly organizationUnitId: string;
72
+ /**
73
+ * The membership side of the edge. A real junction row ALWAYS carries it; it is optional here only
74
+ * because the department axis never projects it, and requiring it would make every caller and pin
75
+ * on that axis supply a value nothing reads. Required in practice on
76
+ * {@link ScimOrganizationUnitReconciliationAxis.UNIT_MEMBERS} — see the contract check there.
77
+ */
78
+ readonly organizationMemberId?: string;
72
79
  };
73
- /** The writes a push must perform to make the member's assignments match the directory. */
80
+ /**
81
+ * Which side of the (member, unit) edge the directory is currently speaking about.
82
+ *
83
+ * Both SCIM paths reconcile the SAME junction and the same way — "make the edges incident to ONE
84
+ * anchor match exactly what the directory says" — and differ only in which node is the anchor. That
85
+ * is one concept seen from two sides, not two concepts, so it is one function; the axis names the
86
+ * side so neither call site has to re-derive the transposition.
87
+ */
88
+ export declare enum ScimOrganizationUnitReconciliationAxis {
89
+ /** Anchored on ONE member; the units vary. The `/Users` department push (`department` → unit). */
90
+ MEMBER_UNITS = "member_units",
91
+ /** Anchored on ONE unit; the members vary. The `/Groups` membership push (`members` → memberships). */
92
+ UNIT_MEMBERS = "unit_members"
93
+ }
94
+ /** The writes a push must perform to make the anchor's assignments match the directory. */
74
95
  export type ScimOrganizationUnitReconciliation = {
75
- /** Units to assign that the member does not already hold. */
76
- readonly unitIdsToCreate: string[];
77
- /** Assignment rows to delete — everything the directory no longer says. */
96
+ /**
97
+ * Counterparts to assign that the anchor does not already hold — unit ids on
98
+ * {@link ScimOrganizationUnitReconciliationAxis.MEMBER_UNITS}, organization-member ids on
99
+ * {@link ScimOrganizationUnitReconciliationAxis.UNIT_MEMBERS}.
100
+ */
101
+ readonly counterpartIdsToCreate: string[];
102
+ /** Assignment rows to delete — everything the directory no longer says, minus what it cannot speak for. */
78
103
  readonly assignmentIdsToRemove: string[];
79
104
  };
105
+ export type ScimOrganizationUnitReconciliationOptions = {
106
+ /** Defaults to {@link ScimOrganizationUnitReconciliationAxis.MEMBER_UNITS}, the department push. */
107
+ readonly axis?: ScimOrganizationUnitReconciliationAxis;
108
+ /**
109
+ * Counterparts this push has NO authority over: neither created nor removed, whatever the directory
110
+ * says about them.
111
+ *
112
+ * The department push supplies the member's units that a `/Groups` push owns
113
+ * (`OrganizationUnit.externalSource === SCIM`). Without it the two directory paths silently fight:
114
+ * department reconciliation is authoritative over the member's WHOLE set, so every `/Users` push
115
+ * would delete the assignments `/Groups` made — and Entra sends group membership as DELTAS
116
+ * (`PATCH … op: Add|Remove`), so nothing would ever restore them. The member would quietly lose the
117
+ * group's access on their next attribute sync, which is under-privilege nobody is told about.
118
+ *
119
+ * It is NOT a general "leave this alone" hatch: an id belongs here only when ANOTHER directory-owned
120
+ * path is authoritative for it. A hand-made assignment is still removed, which is the documented
121
+ * cost of opting an organization into `organizationUnitMapping`.
122
+ */
123
+ readonly counterpartIdsOutsideAuthority?: readonly string[];
124
+ };
80
125
  /**
81
- * Compute the exact writes that make a member's unit assignments match the directory.
126
+ * Compute the exact writes that make one anchor's unit assignments match the directory.
82
127
  *
83
- * Idempotent by construction: an unchanged department produces no writes at all, so a directory that
84
- * re-pushes every user nightly does not churn the junction table or its audit trail.
128
+ * Idempotent by construction: an unchanged department — or an unchanged group membership — produces
129
+ * no writes at all, so a directory that re-pushes everything nightly does not churn the junction
130
+ * table or its audit trail.
85
131
  *
86
- * A `desiredUnitIds` of `[]` (the directory sent no department, or one nobody mapped) removes every
87
- * assignment — that is the authoritative half, and it is what makes leaving a department actually
88
- * revoke its access.
132
+ * A `desiredCounterpartIds` of `[]` removes every assignment the caller has authority over. That is
133
+ * the authoritative half, and it is what makes leaving a department (or a group) actually revoke its
134
+ * access rather than accumulate it.
89
135
  */
90
- export declare function resolveScimOrganizationUnitReconciliation(desiredUnitIds: readonly string[], currentAssignments: readonly ScimOrganizationUnitAssignment[]): ScimOrganizationUnitReconciliation;
136
+ export declare function resolveScimOrganizationUnitReconciliation(desiredCounterpartIds: readonly string[], currentAssignments: readonly ScimOrganizationUnitAssignment[], options?: ScimOrganizationUnitReconciliationOptions): ScimOrganizationUnitReconciliation;
91
137
  //# sourceMappingURL=scim-organization-unit-mapping.shared.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"scim-organization-unit-mapping.shared.d.ts","sourceRoot":"","sources":["../../../../../../src/security/authentications/scim/scim-organization-unit-mapping.shared.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;GAMG;AACH,eAAO,MAAM,sCAAsC;;;iBAKjD,CAAC;AAEH,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sCAAsC,CAAC,CAAC;AAEtG,0GAA0G;AAC1G,MAAM,MAAM,oCAAoC,GAAG;IACjD,QAAQ,CAAC,uBAAuB,CAAC,EAAE,SAAS,gCAAgC,EAAE,GAAG,IAAI,CAAC;IACtF,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1C,CAAC;AAEF;;;;;;;GAOG;AACH,wBAAgB,uCAAuC,CAAC,MAAM,EAAE,oCAAoC,GAAG,SAAS,GAAG,IAAI,GAAG,OAAO,CAEhI;AAED;;;;;;;GAOG;AACH,wBAAgB,6BAA6B,CAC3C,cAAc,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,EACzC,OAAO,EAAE,SAAS,gCAAgC,EAAE,GAAG,SAAS,GAAG,IAAI,GACtE,MAAM,GAAG,SAAS,CAKpB;AAED,qDAAqD;AACrD,MAAM,MAAM,8BAA8B,GAAG;IAC3C,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;CACrC,CAAC;AAEF,2FAA2F;AAC3F,MAAM,MAAM,kCAAkC,GAAG;IAC/C,6DAA6D;IAC7D,QAAQ,CAAC,eAAe,EAAE,MAAM,EAAE,CAAC;IACnC,2EAA2E;IAC3E,QAAQ,CAAC,qBAAqB,EAAE,MAAM,EAAE,CAAC;CAC1C,CAAC;AAEF;;;;;;;;;GASG;AACH,wBAAgB,yCAAyC,CACvD,cAAc,EAAE,SAAS,MAAM,EAAE,EACjC,kBAAkB,EAAE,SAAS,8BAA8B,EAAE,GAC5D,kCAAkC,CAUpC"}
1
+ {"version":3,"file":"scim-organization-unit-mapping.shared.d.ts","sourceRoot":"","sources":["../../../../../../src/security/authentications/scim/scim-organization-unit-mapping.shared.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;GAMG;AACH,eAAO,MAAM,sCAAsC;;;iBAKjD,CAAC;AAEH,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sCAAsC,CAAC,CAAC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F;;;;;;;;;;GAUG;AACH,wBAAgB,yCAAyC,CACvD,qBAAqB,EAAE,SAAS,MAAM,EAAE,EACxC,kBAAkB,EAAE,SAAS,8BAA8B,EAAE,EAC7D,OAAO,CAAC,EAAE,yCAAyC,GAClD,kCAAkC,CA8BpC"}
@@ -69,22 +69,55 @@ export function resolveScimOrganizationUnitId(directoryValue, mapping) {
69
69
  return mapping?.find((entry) => entry.directoryValue.trim() === normalizedValue)?.organizationUnitId;
70
70
  }
71
71
  /**
72
- * Compute the exact writes that make a member's unit assignments match the directory.
72
+ * Which side of the (member, unit) edge the directory is currently speaking about.
73
73
  *
74
- * Idempotent by construction: an unchanged department produces no writes at all, so a directory that
75
- * re-pushes every user nightly does not churn the junction table or its audit trail.
74
+ * Both SCIM paths reconcile the SAME junction and the same way — "make the edges incident to ONE
75
+ * anchor match exactly what the directory says" — and differ only in which node is the anchor. That
76
+ * is one concept seen from two sides, not two concepts, so it is one function; the axis names the
77
+ * side so neither call site has to re-derive the transposition.
78
+ */
79
+ export var ScimOrganizationUnitReconciliationAxis;
80
+ (function (ScimOrganizationUnitReconciliationAxis) {
81
+ /** Anchored on ONE member; the units vary. The `/Users` department push (`department` → unit). */
82
+ ScimOrganizationUnitReconciliationAxis["MEMBER_UNITS"] = "member_units";
83
+ /** Anchored on ONE unit; the members vary. The `/Groups` membership push (`members` → memberships). */
84
+ ScimOrganizationUnitReconciliationAxis["UNIT_MEMBERS"] = "unit_members";
85
+ })(ScimOrganizationUnitReconciliationAxis || (ScimOrganizationUnitReconciliationAxis = {}));
86
+ /**
87
+ * Compute the exact writes that make one anchor's unit assignments match the directory.
76
88
  *
77
- * A `desiredUnitIds` of `[]` (the directory sent no department, or one nobody mapped) removes every
78
- * assignment — that is the authoritative half, and it is what makes leaving a department actually
79
- * revoke its access.
89
+ * Idempotent by construction: an unchanged department — or an unchanged group membership — produces
90
+ * no writes at all, so a directory that re-pushes everything nightly does not churn the junction
91
+ * table or its audit trail.
92
+ *
93
+ * A `desiredCounterpartIds` of `[]` removes every assignment the caller has authority over. That is
94
+ * the authoritative half, and it is what makes leaving a department (or a group) actually revoke its
95
+ * access rather than accumulate it.
80
96
  */
81
- export function resolveScimOrganizationUnitReconciliation(desiredUnitIds, currentAssignments) {
82
- const desired = new Set(desiredUnitIds);
83
- const held = new Set(currentAssignments.map((assignment) => assignment.organizationUnitId));
97
+ export function resolveScimOrganizationUnitReconciliation(desiredCounterpartIds, currentAssignments, options) {
98
+ const axis = options?.axis ?? ScimOrganizationUnitReconciliationAxis.MEMBER_UNITS;
99
+ const outsideAuthority = new Set(options?.counterpartIdsOutsideAuthority ?? []);
100
+ const counterpartIdOf = (assignment) => {
101
+ if (axis === ScimOrganizationUnitReconciliationAxis.MEMBER_UNITS)
102
+ return assignment.organizationUnitId;
103
+ // A junction row without its membership FK cannot be placed on this axis, and GUESSING would
104
+ // silently withhold a revocation — the one outcome this reconciliation exists to guarantee. A
105
+ // contract violation by the caller, so it is loud rather than absorbed.
106
+ if (assignment.organizationMemberId === undefined) {
107
+ throw new Error(`resolveScimOrganizationUnitReconciliation: assignment ${assignment._id} has no organizationMemberId, `
108
+ + `which ${ScimOrganizationUnitReconciliationAxis.UNIT_MEMBERS} requires.`);
109
+ }
110
+ return assignment.organizationMemberId;
111
+ };
112
+ const desired = new Set(desiredCounterpartIds);
113
+ const held = new Set(currentAssignments.map(counterpartIdOf));
84
114
  return {
85
- unitIdsToCreate: [...desired].filter((unitId) => !held.has(unitId)),
115
+ counterpartIdsToCreate: [...desired].filter((id) => !held.has(id) && !outsideAuthority.has(id)),
86
116
  assignmentIdsToRemove: currentAssignments
87
- .filter((assignment) => !desired.has(assignment.organizationUnitId))
117
+ .filter((assignment) => {
118
+ const counterpartId = counterpartIdOf(assignment);
119
+ return !desired.has(counterpartId) && !outsideAuthority.has(counterpartId);
120
+ })
88
121
  .map((assignment) => assignment._id),
89
122
  };
90
123
  }
@@ -1 +1 @@
1
- {"version":3,"file":"scim-organization-unit-mapping.shared.js","sour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I,GAAG,IAAI,GAAG,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,kBAAkB,CAAC,CAAC,CAAC;IAE5F,OAAO;QACL,eAAe,EAAE,CAAC,GAAG,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QACnE,qBAAqB,EAAE,kBAAkB;aACtC,MAAM,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,kBAAkB,CAAC,CAAC;aACnE,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC;KACvC,CAAC;AACJ,CAAC","sourcesContent":["/**\n * SCIM directory value → organization-unit assignment (WS-C).\n *\n * assurance-control: WILDO.IDENTITY.DIRECTORY_PROVISIONING — binds a directory-declared department to\n * an organization unit, and keeps that binding authoritative rather than accumulating.\n *\n * ## What this decides, and why it is EXPLICIT rather than inferred\n *\n * An IdP pushes a flat string (`department: \"Sales\"`). Units live in a TREE where `code` is unique\n * only among siblings and `name` is freeform, so \"Sales\" can legitimately match several nodes. Since\n * units became an authorization axis, resolving that string to the wrong node does not mislabel a\n * user — it grants them the wrong data.\n *\n * So there is no fuzzy matching, no name/code search, and no auto-creation. An organization admin\n * declares the binding explicitly, unit id by unit id, and a directory value with no declared binding\n * is IGNORED. The person who owns the org chart is the one who says what \"Sales\" means; nothing here\n * guesses on their behalf.\n *\n * ## Authoritative reconciliation\n *\n * Each push replaces the member's unit assignments with exactly what the directory currently says\n * (approved decision). A user who moves Sales → Legal LOSES Sales: keeping it would be privilege\n * accretion, where access only ever grows and an offboarded department is never actually left.\n *\n * ⚠️ The consequence, stated because it is not obvious: assignments made by hand in the application\n * are ALSO removed on the next push, because SCIM is authoritative over the whole set rather than\n * over a subset it can distinguish as its own. An organization that wants manual unit assignments\n * should not enable this mapping. This is why {@link isScimOrganizationUnitManagementEnabled}\n * requires an explicit, non-empty declaration before ANY reconciliation runs — an organization that\n * never opted in can never have its assignments deleted by a push.\n */\n\nimport { z } from 'zod';\n\n/**\n * One declared binding: the directory's own value for a department, and the unit it means.\n *\n * `directoryValue` is matched EXACTLY (after trimming) against what the IdP sends. It is deliberately\n * not normalised beyond whitespace — case and punctuation are part of what a directory actually\n * pushes, and silently folding them would make two distinct departments collide onto one unit.\n */\nexport const ScimOrganizationUnitMappingEntrySchema = z.object({\n /** The value the directory pushes, e.g. `\"Sales\"`. Matched exactly, whitespace-trimmed. */\n directoryValue: z.string().min(1).max(200),\n /** The `ORGANIZATION_UNITS` row this value binds to. */\n organizationUnitId: z.string().min(1),\n});\n\nexport type ScimOrganizationUnitMappingEntry = z.infer<typeof ScimOrganizationUnitMappingEntrySchema>;\n\n/** The provisioning-config surface this module reads, kept structural so callers pass their row as-is. */\nexport type ScimOrganizationUnitManagementSignal = {\n readonly organizationUnitMapping?: readonly ScimOrganizationUnitMappingEntry[] | null;\n readonly defaultUnitRole?: string | null;\n};\n\n/**\n * Is this organization managing unit assignments through SCIM at all?\n *\n * Requires BOTH a non-empty mapping and a role to grant — an assignment cannot be created without a\n * role, so a mapping without one could only ever delete. That is exactly the failure mode this gate\n * exists to prevent: a half-configured row must never make a push authoritative over assignments it\n * has no way to recreate.\n */\nexport function isScimOrganizationUnitManagementEnabled(config: ScimOrganizationUnitManagementSignal | undefined | null): boolean {\n return !!config?.defaultUnitRole && (config.organizationUnitMapping?.length ?? 0) > 0;\n}\n\n/**\n * Resolve one directory value to the unit it was declared to mean, or `undefined` when nothing\n * declares it.\n *\n * `undefined` means UNMAPPED, not \"no unit\": the caller treats an unmapped value as \"the directory\n * says nothing about units for this user\", which under authoritative reconciliation removes their\n * directory-managed assignments rather than inventing one.\n */\nexport function resolveScimOrganizationUnitId(\n directoryValue: string | undefined | null,\n mapping: readonly ScimOrganizationUnitMappingEntry[] | undefined | null,\n): string | undefined {\n const normalizedValue = typeof directoryValue === 'string' ? directoryValue.trim() : '';\n if (normalizedValue.length === 0) return undefined;\n\n return mapping?.find((entry) => entry.directoryValue.trim() === normalizedValue)?.organizationUnitId;\n}\n\n/** An existing assignment row, read structurally. */\nexport type ScimOrganizationUnitAssignment = {\n readonly _id: string;\n readonly organizationUnitId: string;\n};\n\n/** The writes a push must perform to make the member's assignments match the directory. */\nexport type ScimOrganizationUnitReconciliation = {\n /** Units to assign that the member does not already hold. */\n readonly unitIdsToCreate: string[];\n /** Assignment rows to delete — everything the directory no longer says. */\n readonly assignmentIdsToRemove: string[];\n};\n\n/**\n * Compute the exact writes that make a member's unit assignments match the directory.\n *\n * Idempotent by construction: an unchanged department produces no writes at all, so a directory that\n * re-pushes every user nightly does not churn the junction table or its audit trail.\n *\n * A `desiredUnitIds` of `[]` (the directory sent no department, or one nobody mapped) removes every\n * assignment — that is the authoritative half, and it is what makes leaving a department actually\n * revoke its access.\n */\nexport function resolveScimOrganizationUnitReconciliation(\n desiredUnitIds: readonly string[],\n currentAssignments: readonly ScimOrganizationUnitAssignment[],\n): ScimOrganizationUnitReconciliation {\n const desired = new Set(desiredUnitIds);\n const held = new Set(currentAssignments.map((assignment) => assignment.organizationUnitId));\n\n return {\n unitIdsToCreate: [...desired].filter((unitId) => !held.has(unitId)),\n assignmentIdsToRemove: currentAssignments\n .filter((assignment) => !desired.has(assignment.organizationUnitId))\n .map((assignment) => assignment._id),\n };\n}\n"]}
1
+ {"version":3,"file":"scim-organization-unit-mapping.shared.js","sourceRoot":"","sources":["../../../../../../src/security/authentications/scim/scim-organization-unit-mapping.shared.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,sCAAsC,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7D,2FAA2F;IAC3F,cAA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Y_PROVISIONING — binds a directory-declared department to\n * an organization unit, and keeps that binding authoritative rather than accumulating.\n *\n * ## What this decides, and why it is EXPLICIT rather than inferred\n *\n * An IdP pushes a flat string (`department: \"Sales\"`). Units live in a TREE where `code` is unique\n * only among siblings and `name` is freeform, so \"Sales\" can legitimately match several nodes. Since\n * units became an authorization axis, resolving that string to the wrong node does not mislabel a\n * user — it grants them the wrong data.\n *\n * So there is no fuzzy matching, no name/code search, and no auto-creation. An organization admin\n * declares the binding explicitly, unit id by unit id, and a directory value with no declared binding\n * is IGNORED. The person who owns the org chart is the one who says what \"Sales\" means; nothing here\n * guesses on their behalf.\n *\n * ## Authoritative reconciliation\n *\n * Each push replaces the member's unit assignments with exactly what the directory currently says\n * (approved decision). A user who moves Sales → Legal LOSES Sales: keeping it would be privilege\n * accretion, where access only ever grows and an offboarded department is never actually left.\n *\n * ⚠️ The consequence, stated because it is not obvious: assignments made by hand in the application\n * are ALSO removed on the next push, because SCIM is authoritative over the whole set rather than\n * over a subset it can distinguish as its own. An organization that wants manual unit assignments\n * should not enable this mapping. This is why {@link isScimOrganizationUnitManagementEnabled}\n * requires an explicit, non-empty declaration before ANY reconciliation runs — an organization that\n * never opted in can never have its assignments deleted by a push.\n */\n\nimport { z } from 'zod';\n\n/**\n * One declared binding: the directory's own value for a department, and the unit it means.\n *\n * `directoryValue` is matched EXACTLY (after trimming) against what the IdP sends. It is deliberately\n * not normalised beyond whitespace — case and punctuation are part of what a directory actually\n * pushes, and silently folding them would make two distinct departments collide onto one unit.\n */\nexport const ScimOrganizationUnitMappingEntrySchema = z.object({\n /** The value the directory pushes, e.g. `\"Sales\"`. Matched exactly, whitespace-trimmed. */\n directoryValue: z.string().min(1).max(200),\n /** The `ORGANIZATION_UNITS` row this value binds to. */\n organizationUnitId: z.string().min(1),\n});\n\nexport type ScimOrganizationUnitMappingEntry = z.infer<typeof ScimOrganizationUnitMappingEntrySchema>;\n\n/** The provisioning-config surface this module reads, kept structural so callers pass their row as-is. */\nexport type ScimOrganizationUnitManagementSignal = {\n readonly organizationUnitMapping?: readonly ScimOrganizationUnitMappingEntry[] | null;\n readonly defaultUnitRole?: string | null;\n};\n\n/**\n * Is this organization managing unit assignments through SCIM at all?\n *\n * Requires BOTH a non-empty mapping and a role to grant — an assignment cannot be created without a\n * role, so a mapping without one could only ever delete. That is exactly the failure mode this gate\n * exists to prevent: a half-configured row must never make a push authoritative over assignments it\n * has no way to recreate.\n */\nexport function isScimOrganizationUnitManagementEnabled(config: ScimOrganizationUnitManagementSignal | undefined | null): boolean {\n return !!config?.defaultUnitRole && (config.organizationUnitMapping?.length ?? 0) > 0;\n}\n\n/**\n * Resolve one directory value to the unit it was declared to mean, or `undefined` when nothing\n * declares it.\n *\n * `undefined` means UNMAPPED, not \"no unit\": the caller treats an unmapped value as \"the directory\n * says nothing about units for this user\", which under authoritative reconciliation removes their\n * directory-managed assignments rather than inventing one.\n */\nexport function resolveScimOrganizationUnitId(\n directoryValue: string | undefined | null,\n mapping: readonly ScimOrganizationUnitMappingEntry[] | undefined | null,\n): string | undefined {\n const normalizedValue = typeof directoryValue === 'string' ? directoryValue.trim() : '';\n if (normalizedValue.length === 0) return undefined;\n\n return mapping?.find((entry) => entry.directoryValue.trim() === normalizedValue)?.organizationUnitId;\n}\n\n/** An existing assignment row, read structurally. */\nexport type ScimOrganizationUnitAssignment = {\n readonly _id: string;\n readonly organizationUnitId: string;\n /**\n * The membership side of the edge. A real junction row ALWAYS carries it; it is optional here only\n * because the department axis never projects it, and requiring it would make every caller and pin\n * on that axis supply a value nothing reads. Required in practice on\n * {@link ScimOrganizationUnitReconciliationAxis.UNIT_MEMBERS} — see the contract check there.\n */\n readonly organizationMemberId?: string;\n};\n\n/**\n * Which side of the (member, unit) edge the directory is currently speaking about.\n *\n * Both SCIM paths reconcile the SAME junction and the same way — \"make the edges incident to ONE\n * anchor match exactly what the directory says\" — and differ only in which node is the anchor. That\n * is one concept seen from two sides, not two concepts, so it is one function; the axis names the\n * side so neither call site has to re-derive the transposition.\n */\nexport enum ScimOrganizationUnitReconciliationAxis {\n /** Anchored on ONE member; the units vary. The `/Users` department push (`department` → unit). */\n MEMBER_UNITS = 'member_units',\n /** Anchored on ONE unit; the members vary. The `/Groups` membership push (`members` → memberships). */\n UNIT_MEMBERS = 'unit_members',\n}\n\n/** The writes a push must perform to make the anchor's assignments match the directory. */\nexport type ScimOrganizationUnitReconciliation = {\n /**\n * Counterparts to assign that the anchor does not already hold — unit ids on\n * {@link ScimOrganizationUnitReconciliationAxis.MEMBER_UNITS}, organization-member ids on\n * {@link ScimOrganizationUnitReconciliationAxis.UNIT_MEMBERS}.\n */\n readonly counterpartIdsToCreate: string[];\n /** Assignment rows to delete — everything the directory no longer says, minus what it cannot speak for. */\n readonly assignmentIdsToRemove: string[];\n};\n\nexport type ScimOrganizationUnitReconciliationOptions = {\n /** Defaults to {@link ScimOrganizationUnitReconciliationAxis.MEMBER_UNITS}, the department push. */\n readonly axis?: ScimOrganizationUnitReconciliationAxis;\n /**\n * Counterparts this push has NO authority over: neither created nor removed, whatever the directory\n * says about them.\n *\n * The department push supplies the member's units that a `/Groups` push owns\n * (`OrganizationUnit.externalSource === SCIM`). Without it the two directory paths silently fight:\n * department reconciliation is authoritative over the member's WHOLE set, so every `/Users` push\n * would delete the assignments `/Groups` made — and Entra sends group membership as DELTAS\n * (`PATCH … op: Add|Remove`), so nothing would ever restore them. The member would quietly lose the\n * group's access on their next attribute sync, which is under-privilege nobody is told about.\n *\n * It is NOT a general \"leave this alone\" hatch: an id belongs here only when ANOTHER directory-owned\n * path is authoritative for it. A hand-made assignment is still removed, which is the documented\n * cost of opting an organization into `organizationUnitMapping`.\n */\n readonly counterpartIdsOutsideAuthority?: readonly string[];\n};\n\n/**\n * Compute the exact writes that make one anchor's unit assignments match the directory.\n *\n * Idempotent by construction: an unchanged department — or an unchanged group membership — produces\n * no writes at all, so a directory that re-pushes everything nightly does not churn the junction\n * table or its audit trail.\n *\n * A `desiredCounterpartIds` of `[]` removes every assignment the caller has authority over. That is\n * the authoritative half, and it is what makes leaving a department (or a group) actually revoke its\n * access rather than accumulate it.\n */\nexport function resolveScimOrganizationUnitReconciliation(\n desiredCounterpartIds: readonly string[],\n currentAssignments: readonly ScimOrganizationUnitAssignment[],\n options?: ScimOrganizationUnitReconciliationOptions,\n): ScimOrganizationUnitReconciliation {\n const axis = options?.axis ?? ScimOrganizationUnitReconciliationAxis.MEMBER_UNITS;\n const outsideAuthority = new Set(options?.counterpartIdsOutsideAuthority ?? []);\n\n const counterpartIdOf = (assignment: ScimOrganizationUnitAssignment): string => {\n if (axis === ScimOrganizationUnitReconciliationAxis.MEMBER_UNITS) return assignment.organizationUnitId;\n // A junction row without its membership FK cannot be placed on this axis, and GUESSING would\n // silently withhold a revocation — the one outcome this reconciliation exists to guarantee. A\n // contract violation by the caller, so it is loud rather than absorbed.\n if (assignment.organizationMemberId === undefined) {\n throw new Error(\n `resolveScimOrganizationUnitReconciliation: assignment ${assignment._id} has no organizationMemberId, `\n + `which ${ScimOrganizationUnitReconciliationAxis.UNIT_MEMBERS} requires.`,\n );\n }\n return assignment.organizationMemberId;\n };\n\n const desired = new Set(desiredCounterpartIds);\n const held = new Set(currentAssignments.map(counterpartIdOf));\n\n return {\n counterpartIdsToCreate: [...desired].filter((id) => !held.has(id) && !outsideAuthority.has(id)),\n assignmentIdsToRemove: currentAssignments\n .filter((assignment) => {\n const counterpartId = counterpartIdOf(assignment);\n return !desired.has(counterpartId) && !outsideAuthority.has(counterpartId);\n })\n .map((assignment) => assignment._id),\n };\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"scim-provisioning-config.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["../../../../../../src/security/authentications/scim/scim-provisioning-config.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,qBAAqB,EAAoB,MAAM,sDAAsD,CAAC;AAY/G,eAAO,MAAM,0CAA0C,yNA6FtD,CAAC"}
1
+ {"version":3,"file":"scim-provisioning-config.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["../../../../../../src/security/authentications/scim/scim-provisioning-config.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,qBAAqB,EAAoB,MAAM,sDAAsD,CAAC;AAY/G,eAAO,MAAM,0CAA0C,yNA0GtD,CAAC"}
@@ -60,10 +60,11 @@ export const scimProvisioningConfigPolymorphicFactories = createPolymorphicResou
60
60
  riskLevel: ResourceOperationRiskLevel.HIGH,
61
61
  }],
62
62
  },
63
- // Internal-only (INTERNAL_CALL, NO HTTP route): SCIM provisioning edits reach this through
64
- // the config service path — `AuthOrganizationConfigurationService.saveScimProvisioningConfig`
65
- // dispatches the write via `ServicesRegistryHandler.update` with the ADMIN's EC, preserving
66
- // admin audit attribution. Must NOT be REPOSITORY_ONLY: `.update()` resolves the op via
63
+ // Two kinds of caller reach this write and both resolve the SAME default: an administrator
64
+ // editing the settings pane, over the HTTP route this variant now carries; and the config
65
+ // service path — `AuthOrganizationConfigurationService.saveScimProvisioningConfig` dispatching
66
+ // via `ServicesRegistryHandler.update` with the ADMIN's EC, preserving admin audit
67
+ // attribution. Must NOT be REPOSITORY_ONLY: `.update()` resolves the op via
67
68
  // `getServiceOperationPathDefault`, which honours INTERNAL_CALL / API_CALL but NOT
68
69
  // REPOSITORY_ONLY — a repository-only UPDATE throws
69
70
  // `RESOURCES_REGISTRY_OPERATION_PATH_NOT_FOUND` (INTERNAL / critical) whenever the save
@@ -72,11 +73,23 @@ export const scimProvisioningConfigPolymorphicFactories = createPolymorphicResou
72
73
  // config — a latent copy of the same FATAL, armed for whoever wrote the save method next.
73
74
  // (No UPDATE custom-impl to keep in lockstep: the read-only computed fields are framework-
74
75
  // driven via `.isVirtual()` on the schema, which is variant-agnostic by construction.)
75
- // No public HTTP update surface (config is admin-service-owned, never self-serve). Same
76
- // fix as the CREATE above + the SSO/SIEM UPDATE precedent. Admin tier / HIGH.
76
+ //
77
+ // API_CALL — the administrator's edit door, flipped from INTERNAL_CALL alongside SSO config and
78
+ // following SIEM export config (#953). Route-less, this policy was something only a backend
79
+ // service could change, which contradicts the plainest reading of a settings pane: the four
80
+ // decisions on this row — create users, verify their email, deactivate on deprovision, and the
81
+ // role they land with — are exactly what an operator opens SCIM settings to set. The comment
82
+ // that stood here said the config was "admin-service-owned, never self-serve"; the door is
83
+ // gated on ORG_ADMIN / APP super-admin, so it is not self-serve, it is admin-served.
84
+ //
85
+ // Nothing moves in lockstep with this one: the read-only computed fields are framework-driven
86
+ // via `.isVirtual()` on the schema, which is variant-agnostic by construction, and this resource
87
+ // registers no custom implementation on any operation. Hence no shared constant here, where SSO
88
+ // and SIEM each need one — a named source with a single reader would be ceremony.
89
+ // Admin tier / HIGH.
77
90
  [CoreResourceOperation.UPDATE]: {
78
91
  variants: [{
79
- variantType: ResourceOperationVariantType.INTERNAL_CALL,
92
+ variantType: ResourceOperationVariantType.API_CALL,
80
93
  isDefault: true,
81
94
  polymorphicRole: {
82
95
  [CoreResourceType.ORGANIZATIONS]: [CORE_ORG_ROLES.ORG_ADMIN],