@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
@@ -46,7 +46,8 @@ export declare const InboundContactSchema: z.ZodObject<{
46
46
  createdAt: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodDate>>>>;
47
47
  updatedAt: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodDate>>>;
48
48
  privacy: z.ZodObject<{
49
- dataProcessingConsent: z.ZodDefault<z.ZodEnum<typeof import("..").DataProcessingConsent>>;
49
+ consentedPurposes: z.ZodDefault<z.ZodArray<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodEnum<typeof import("..").ConsentPurpose>>>>;
50
+ consentDecidedAt: z.ZodOptional<z.ZodDate>;
50
51
  }, z.core.$strip>;
51
52
  }, z.core.$strip>;
52
53
  export type InboundContact = z.infer<typeof InboundContactSchema>;
@@ -1 +1 @@
1
- {"version":3,"file":"inbound-contacts.shared.schemas.d.ts","sourceRoot":"","sources":["../../../../src/users/inbound-contacts.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB;;;;;;;;;;GAUG;AACH,oBAAY,4BAA4B;IACtC,kEAAkE;IAClE,IAAI,SAAS;IACb,2EAA2E;IAC3E,WAAW,gBAAgB;IAC3B;;;OAGG;IACH,aAAa,kBAAkB;CAChC;AAGD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;iBA4G/B,CAAC;AAGH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
1
+ {"version":3,"file":"inbound-contacts.shared.schemas.d.ts","sourceRoot":"","sources":["../../../../src/users/inbound-contacts.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB;;;;;;;;;;GAUG;AACH,oBAAY,4BAA4B;IACtC,kEAAkE;IAClE,IAAI,SAAS;IACb,2EAA2E;IAC3E,WAAW,gBAAgB;IAC3B;;;OAGG;IACH,aAAa,kBAAkB;CAChC;AAGD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;iBA4G/B,CAAC;AAGH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
@@ -0,0 +1,127 @@
1
+ import type { ConsentPurpose } from '../compliance/privacy/consent-purposes.shared';
2
+ /**
3
+ * Any record carrying a consent `privacy` block — user preferences, an inbound contact, an anonymous
4
+ * visitor. Structural on purpose: the rule below is the same for every holder, and a per-resource
5
+ * copy is how two doors come to disagree about when a decision happened.
6
+ */
7
+ export interface ConsentDecisionHolder {
8
+ privacy?: {
9
+ consentedPurposes?: readonly (ConsentPurpose | string)[];
10
+ consentDecidedAt?: Date | string;
11
+ [otherPrivacyField: string]: unknown;
12
+ };
13
+ }
14
+ /**
15
+ * The server-owned half of a consent decision (#534) — returned from the `basicPrefixOperation` of
16
+ * `USER_SELF_PREFERENCES` / `USER_PREFERENCES` UPDATE and `INBOUND_CONTACTS` CREATE. On a CREATE there
17
+ * is no current record, so any purpose granted is a change and an explicit empty choice is a claim.
18
+ *
19
+ * ## `consentDecidedAt` is stamped by the SERVER, never taken from the caller
20
+ *
21
+ * It records WHEN a person made an affirmative consent choice, and it is what separates "declined
22
+ * everything" from "was never asked". A client-authored instant would let any caller backdate or
23
+ * forge that fact, so a caller's value is only ever read as a CLAIM that a decision is being made, and
24
+ * the recorded instant is the server's clock.
25
+ *
26
+ * ## When a write counts as a decision
27
+ *
28
+ * - The purpose SET changed → a decision. Always stamped.
29
+ * - The set is unchanged but the caller sends a `consentDecidedAt` different from the stored one → an
30
+ * explicit re-confirmation, e.g. a person who meets the consent prompt and grants nothing. Stamped.
31
+ * - The set is unchanged and the caller echoes the stored instant (or sends none) → NOT a decision.
32
+ * This is the ordinary preferences form re-submitting every field while the person edited something
33
+ * else; stamping there would fabricate a consent choice nobody made.
34
+ *
35
+ * A write that does not touch `privacy` at all returns an empty patch, which the framework merges as a
36
+ * no-op. A write that touches `privacy` WITHOUT `consentedPurposes` is not a decision either, and the
37
+ * returned block carries the STORED purposes and instant forward.
38
+ * Without that, the write would replace the whole `privacy` object and the stored consent would be lost
39
+ * while reading as a withdrawal (#534 review F1).
40
+ *
41
+ * The returned `privacy` block is the CURRENT block overlaid with the caller's, so a partial write —
42
+ * the consent gate sends only the purposes — cannot silently reset a sibling member to its default.
43
+ *
44
+ * assurance-control: WILDO.PRIVACY.CONSENT_RECORD — the decision instant is server-owned, and the
45
+ * purpose set it accompanies is audit evidence on the same UPDATE.
46
+ */
47
+ export declare function buildConsentDecisionPatch<THolder extends ConsentDecisionHolder>(input: Partial<THolder> | undefined, current: THolder | undefined, now?: Date): Partial<THolder>;
48
+ /**
49
+ * The ADMINISTRATOR door's consent rule (#534, decided by Paul 2026-09-13): an administrator may WITHDRAW
50
+ * purposes on a person's behalf — honouring a withdrawal request received another way — but may never
51
+ * GRANT one. Consent is the subject's own act; a purpose an administrator added would carry the same
52
+ * server-stamped instant as the person's own choice and could not be told apart from it.
53
+ *
54
+ * Refuses an addition with a validation error naming the purposes, then applies the ordinary decision
55
+ * rule. Everything that is not an addition — a withdrawal, an unchanged set, a write that does not touch
56
+ * consent — passes through unchanged.
57
+ */
58
+ export declare function buildAdministratorConsentDecisionPatch<THolder extends ConsentDecisionHolder>(input: Partial<THolder> | undefined, current: THolder | undefined, now?: Date): Partial<THolder>;
59
+ /**
60
+ * What an anonymous visitor's consent decision contributes to the account they just became (#1258).
61
+ *
62
+ * ## The one thing that dies at this boundary today
63
+ *
64
+ * Every other rights signal a visitor produces is carried: `transposeOwnership` moves their
65
+ * draft notes and their inbound contacts onto the new account, and reconciles what it could not move.
66
+ * Their consent decision is the exception — the website keeps it in `localStorage` on its own origin,
67
+ * `AnonymousUser.privacy` is written `{}` at session start and never again, and the conversion moves
68
+ * neither. So a visitor who declines analytics on the marketing site is asked again inside the
69
+ * application, and under a declared service-consent requirement is BLOCKED there, over a question they
70
+ * answered minutes earlier.
71
+ *
72
+ * ## Why this takes `applicationAsks` and not just two privacy blocks
73
+ *
74
+ * A decision is `(granted ⊆ offered, at an instant)`, never a grant set alone — see
75
+ * `AnonymousUserPrivacySchema.offeredPurposes` for why the two surfaces legitimately ask different
76
+ * questions. `consentDecidedAt` is read everywhere as *"this person was asked and answered"*, so
77
+ * stamping it when the visitor's surface offered LESS than the application asks would record a
78
+ * decision about a purpose nobody displayed, and the application would stop prompting for it.
79
+ *
80
+ * Hence the split outcome, which is the whole design:
81
+ *
82
+ * | the visitor was offered | what carries |
83
+ * |---|---|
84
+ * | everything this application asks | grants **and** the decision instant — nothing more to ask |
85
+ * | less than this application asks | the grants ALONE, with **no** instant — the person is still prompted, and the surface starts pre-ticked with what they already agreed to |
86
+ * | nothing (never asked) | nothing |
87
+ *
88
+ * The middle row is not a compromise. It is exactly what the `PROMPT` gate status exists for.
89
+ *
90
+ * ## The account always wins, and that is what makes a shared browser safe
91
+ *
92
+ * An account that has already recorded a decision receives NOTHING: their own answer stands, and a
93
+ * second device's anonymous session cannot overwrite it. Because the middle row also refuses to stamp
94
+ * an instant, the residual risk of a shared browser — visitor A decides, does not register, and
95
+ * visitor B registers from the same browser — degrades to a pre-ticked box rather than an inherited
96
+ * decision: B is still ASKED, and their answer replaces the seed.
97
+ *
98
+ * ## Defensive, because the anonymous row is written by a public door
99
+ *
100
+ * A grant for a purpose the same record does not list as offered is DROPPED rather than trusted. That
101
+ * row is written by an unauthenticated visitor through a public endpoint, so the two fields are a
102
+ * caller's claim about their own decision; only their intersection is a statement this function is
103
+ * willing to repeat onto an identified person.
104
+ *
105
+ * Pure, so every branch is pinned without a database. Returns an EMPTY patch when nothing carries,
106
+ * which the framework merges as a no-op.
107
+ *
108
+ * assurance-control: WILDO.PRIVACY.CONSENT_RECORD — a decision taken before identity is carried onto
109
+ * the person it belonged to, with its own instant, and never widened past what they were shown.
110
+ */
111
+ export declare function buildAnonymousConsentCarryPatch<THolder extends ConsentDecisionHolder>(params: {
112
+ /** The converting visitor's `AnonymousUser.privacy`. */
113
+ readonly anonymous: {
114
+ readonly consentedPurposes?: readonly (ConsentPurpose | string)[];
115
+ readonly offeredPurposes?: readonly (ConsentPurpose | string)[];
116
+ readonly consentDecidedAt?: Date | string;
117
+ } | undefined;
118
+ /** The account's current privacy block, or undefined when it has none. */
119
+ readonly account: ConsentDecisionHolder['privacy'] | undefined;
120
+ /**
121
+ * The purposes this application's own consent surface would put to the person — the gate's
122
+ * `optionalPurposes` plus anything it requires. Passing an empty list means the application asks
123
+ * nothing, so a carried decision is complete by definition.
124
+ */
125
+ readonly applicationAsks: readonly (ConsentPurpose | string)[];
126
+ }): Partial<THolder>;
127
+ //# sourceMappingURL=user-consent-decision.shared.utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user-consent-decision.shared.utils.d.ts","sourceRoot":"","sources":["../../../../src/users/user-consent-decision.shared.utils.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+CAA+C,CAAC;AAEpF;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IACpC,OAAO,CAAC,EAAE;QACR,iBAAiB,CAAC,EAAE,SAAS,CAAC,cAAc,GAAG,MAAM,CAAC,EAAE,CAAC;QACzD,gBAAgB,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;QACjC,CAAC,iBAAiB,EAAE,MAAM,GAAG,OAAO,CAAC;KACtC,CAAC;CACH;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAgB,yBAAyB,CAAC,OAAO,SAAS,qBAAqB,EAC7E,KAAK,EAAE,OAAO,CAAC,OAAO,CAAC,GAAG,SAAS,EACnC,OAAO,EAAE,OAAO,GAAG,SAAS,EAC5B,GAAG,GAAE,IAAiB,GACrB,OAAO,CAAC,OAAO,CAAC,CAyClB;AAED;;;;;;;;;GASG;AACH,wBAAgB,sCAAsC,CAAC,OAAO,SAAS,qBAAqB,EAC1F,KAAK,EAAE,OAAO,CAAC,OAAO,CAAC,GAAG,SAAS,EACnC,OAAO,EAAE,OAAO,GAAG,SAAS,EAC5B,GAAG,GAAE,IAAiB,GACrB,OAAO,CAAC,OAAO,CAAC,CAelB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AACH,wBAAgB,+BAA+B,CAAC,OAAO,SAAS,qBAAqB,EAAE,MAAM,EAAE;IAC7F,wDAAwD;IACxD,QAAQ,CAAC,SAAS,EAAE;QAClB,QAAQ,CAAC,iBAAiB,CAAC,EAAE,SAAS,CAAC,cAAc,GAAG,MAAM,CAAC,EAAE,CAAC;QAClE,QAAQ,CAAC,eAAe,CAAC,EAAE,SAAS,CAAC,cAAc,GAAG,MAAM,CAAC,EAAE,CAAC;QAChE,QAAQ,CAAC,gBAAgB,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;KAC3C,GAAG,SAAS,CAAC;IACd,0EAA0E;IAC1E,QAAQ,CAAC,OAAO,EAAE,qBAAqB,CAAC,SAAS,CAAC,GAAG,SAAS,CAAC;IAC/D;;;;OAIG;IACH,QAAQ,CAAC,eAAe,EAAE,SAAS,CAAC,cAAc,GAAG,MAAM,CAAC,EAAE,CAAC;CAChE,GAAG,OAAO,CAAC,OAAO,CAAC,CAkCnB"}
@@ -0,0 +1,189 @@
1
+ import { ZodError } from 'zod';
2
+ import { normalizeConsentPurposes } from '../compliance/privacy/consent-purposes.shared.js';
3
+ /**
4
+ * The server-owned half of a consent decision (#534) — returned from the `basicPrefixOperation` of
5
+ * `USER_SELF_PREFERENCES` / `USER_PREFERENCES` UPDATE and `INBOUND_CONTACTS` CREATE. On a CREATE there
6
+ * is no current record, so any purpose granted is a change and an explicit empty choice is a claim.
7
+ *
8
+ * ## `consentDecidedAt` is stamped by the SERVER, never taken from the caller
9
+ *
10
+ * It records WHEN a person made an affirmative consent choice, and it is what separates "declined
11
+ * everything" from "was never asked". A client-authored instant would let any caller backdate or
12
+ * forge that fact, so a caller's value is only ever read as a CLAIM that a decision is being made, and
13
+ * the recorded instant is the server's clock.
14
+ *
15
+ * ## When a write counts as a decision
16
+ *
17
+ * - The purpose SET changed → a decision. Always stamped.
18
+ * - The set is unchanged but the caller sends a `consentDecidedAt` different from the stored one → an
19
+ * explicit re-confirmation, e.g. a person who meets the consent prompt and grants nothing. Stamped.
20
+ * - The set is unchanged and the caller echoes the stored instant (or sends none) → NOT a decision.
21
+ * This is the ordinary preferences form re-submitting every field while the person edited something
22
+ * else; stamping there would fabricate a consent choice nobody made.
23
+ *
24
+ * A write that does not touch `privacy` at all returns an empty patch, which the framework merges as a
25
+ * no-op. A write that touches `privacy` WITHOUT `consentedPurposes` is not a decision either, and the
26
+ * returned block carries the STORED purposes and instant forward.
27
+ * Without that, the write would replace the whole `privacy` object and the stored consent would be lost
28
+ * while reading as a withdrawal (#534 review F1).
29
+ *
30
+ * The returned `privacy` block is the CURRENT block overlaid with the caller's, so a partial write —
31
+ * the consent gate sends only the purposes — cannot silently reset a sibling member to its default.
32
+ *
33
+ * assurance-control: WILDO.PRIVACY.CONSENT_RECORD — the decision instant is server-owned, and the
34
+ * purpose set it accompanies is audit evidence on the same UPDATE.
35
+ */
36
+ export function buildConsentDecisionPatch(input, current, now = new Date()) {
37
+ const incoming = input?.privacy;
38
+ if (incoming === undefined)
39
+ return {};
40
+ const currentPrivacy = current?.privacy;
41
+ if (incoming.consentedPurposes === undefined) {
42
+ const carried = {
43
+ ...(currentPrivacy ?? {}),
44
+ ...incoming,
45
+ consentedPurposes: normalizeConsentPurposes(currentPrivacy?.consentedPurposes),
46
+ };
47
+ // A caller-sent instant without a purpose set is not a decision; the stored instant stands.
48
+ if (currentPrivacy?.consentDecidedAt !== undefined)
49
+ carried.consentDecidedAt = currentPrivacy.consentDecidedAt;
50
+ else
51
+ delete carried.consentDecidedAt;
52
+ return { privacy: carried };
53
+ }
54
+ const nextPurposes = normalizeConsentPurposes(incoming.consentedPurposes);
55
+ const previousPurposes = normalizeConsentPurposes(currentPrivacy?.consentedPurposes);
56
+ const setChanged = nextPurposes.length !== previousPurposes.length
57
+ || nextPurposes.some((purpose, index) => purpose !== previousPurposes[index]);
58
+ const claimedAt = incoming.consentDecidedAt === undefined ? undefined : new Date(incoming.consentDecidedAt).getTime();
59
+ const storedAt = currentPrivacy?.consentDecidedAt === undefined ? undefined : new Date(currentPrivacy.consentDecidedAt).getTime();
60
+ const explicitReconfirmation = claimedAt !== undefined && claimedAt !== storedAt;
61
+ const decided = setChanged || explicitReconfirmation;
62
+ const privacy = {
63
+ ...(currentPrivacy ?? {}),
64
+ ...incoming,
65
+ consentedPurposes: nextPurposes,
66
+ };
67
+ if (decided) {
68
+ privacy.consentDecidedAt = now;
69
+ }
70
+ else if (currentPrivacy?.consentDecidedAt !== undefined) {
71
+ privacy.consentDecidedAt = currentPrivacy.consentDecidedAt;
72
+ }
73
+ else {
74
+ delete privacy.consentDecidedAt;
75
+ }
76
+ return { privacy };
77
+ }
78
+ /**
79
+ * The ADMINISTRATOR door's consent rule (#534, decided by Paul 2026-09-13): an administrator may WITHDRAW
80
+ * purposes on a person's behalf — honouring a withdrawal request received another way — but may never
81
+ * GRANT one. Consent is the subject's own act; a purpose an administrator added would carry the same
82
+ * server-stamped instant as the person's own choice and could not be told apart from it.
83
+ *
84
+ * Refuses an addition with a validation error naming the purposes, then applies the ordinary decision
85
+ * rule. Everything that is not an addition — a withdrawal, an unchanged set, a write that does not touch
86
+ * consent — passes through unchanged.
87
+ */
88
+ export function buildAdministratorConsentDecisionPatch(input, current, now = new Date()) {
89
+ const requested = input?.privacy?.consentedPurposes;
90
+ if (requested !== undefined) {
91
+ const stored = normalizeConsentPurposes(current?.privacy?.consentedPurposes);
92
+ const added = normalizeConsentPurposes(requested).filter((purpose) => !stored.includes(purpose));
93
+ if (added.length > 0) {
94
+ throw new ZodError([{
95
+ code: 'custom',
96
+ path: ['privacy', 'consentedPurposes'],
97
+ message: `An administrator may withdraw consent purposes but cannot grant them on a person's behalf; refused: ${added.join(', ')}.`,
98
+ input: requested,
99
+ }]);
100
+ }
101
+ }
102
+ return buildConsentDecisionPatch(input, current, now);
103
+ }
104
+ /**
105
+ * What an anonymous visitor's consent decision contributes to the account they just became (#1258).
106
+ *
107
+ * ## The one thing that dies at this boundary today
108
+ *
109
+ * Every other rights signal a visitor produces is carried: `transposeOwnership` moves their
110
+ * draft notes and their inbound contacts onto the new account, and reconciles what it could not move.
111
+ * Their consent decision is the exception — the website keeps it in `localStorage` on its own origin,
112
+ * `AnonymousUser.privacy` is written `{}` at session start and never again, and the conversion moves
113
+ * neither. So a visitor who declines analytics on the marketing site is asked again inside the
114
+ * application, and under a declared service-consent requirement is BLOCKED there, over a question they
115
+ * answered minutes earlier.
116
+ *
117
+ * ## Why this takes `applicationAsks` and not just two privacy blocks
118
+ *
119
+ * A decision is `(granted ⊆ offered, at an instant)`, never a grant set alone — see
120
+ * `AnonymousUserPrivacySchema.offeredPurposes` for why the two surfaces legitimately ask different
121
+ * questions. `consentDecidedAt` is read everywhere as *"this person was asked and answered"*, so
122
+ * stamping it when the visitor's surface offered LESS than the application asks would record a
123
+ * decision about a purpose nobody displayed, and the application would stop prompting for it.
124
+ *
125
+ * Hence the split outcome, which is the whole design:
126
+ *
127
+ * | the visitor was offered | what carries |
128
+ * |---|---|
129
+ * | everything this application asks | grants **and** the decision instant — nothing more to ask |
130
+ * | less than this application asks | the grants ALONE, with **no** instant — the person is still prompted, and the surface starts pre-ticked with what they already agreed to |
131
+ * | nothing (never asked) | nothing |
132
+ *
133
+ * The middle row is not a compromise. It is exactly what the `PROMPT` gate status exists for.
134
+ *
135
+ * ## The account always wins, and that is what makes a shared browser safe
136
+ *
137
+ * An account that has already recorded a decision receives NOTHING: their own answer stands, and a
138
+ * second device's anonymous session cannot overwrite it. Because the middle row also refuses to stamp
139
+ * an instant, the residual risk of a shared browser — visitor A decides, does not register, and
140
+ * visitor B registers from the same browser — degrades to a pre-ticked box rather than an inherited
141
+ * decision: B is still ASKED, and their answer replaces the seed.
142
+ *
143
+ * ## Defensive, because the anonymous row is written by a public door
144
+ *
145
+ * A grant for a purpose the same record does not list as offered is DROPPED rather than trusted. That
146
+ * row is written by an unauthenticated visitor through a public endpoint, so the two fields are a
147
+ * caller's claim about their own decision; only their intersection is a statement this function is
148
+ * willing to repeat onto an identified person.
149
+ *
150
+ * Pure, so every branch is pinned without a database. Returns an EMPTY patch when nothing carries,
151
+ * which the framework merges as a no-op.
152
+ *
153
+ * assurance-control: WILDO.PRIVACY.CONSENT_RECORD — a decision taken before identity is carried onto
154
+ * the person it belonged to, with its own instant, and never widened past what they were shown.
155
+ */
156
+ export function buildAnonymousConsentCarryPatch(params) {
157
+ const { anonymous, account, applicationAsks } = params;
158
+ // Never asked, or asked nothing: there is no decision to carry, and seeding grants from a
159
+ // non-decision would invent one.
160
+ if (anonymous?.consentDecidedAt === undefined)
161
+ return {};
162
+ const offered = normalizeConsentPurposes(anonymous.offeredPurposes);
163
+ if (offered.length === 0)
164
+ return {};
165
+ // The account's own answer stands. `consentDecidedAt` is the decision marker; a non-empty grant set
166
+ // is checked too, so a row that somehow holds grants without an instant is still not overwritten.
167
+ const accountDecided = account?.consentDecidedAt !== undefined
168
+ || normalizeConsentPurposes(account?.consentedPurposes).length > 0;
169
+ if (accountDecided)
170
+ return {};
171
+ // Only what the visitor was actually shown AND granted.
172
+ const carriedGrants = normalizeConsentPurposes(anonymous.consentedPurposes).filter((purpose) => offered.includes(purpose));
173
+ const asked = normalizeConsentPurposes(applicationAsks);
174
+ const coversEverythingAsked = asked.every((purpose) => offered.includes(purpose));
175
+ const privacy = {
176
+ ...(account ?? {}),
177
+ consentedPurposes: carriedGrants,
178
+ };
179
+ if (coversEverythingAsked) {
180
+ // The visitor's own instant, not the carry's: the moment they decided is the fact being recorded.
181
+ privacy.consentDecidedAt = new Date(anonymous.consentDecidedAt);
182
+ }
183
+ else {
184
+ // Seed the grants and leave the question open, so the application still prompts.
185
+ delete privacy.consentDecidedAt;
186
+ }
187
+ return { privacy };
188
+ }
189
+ //# sourceMappingURL=user-consent-decision.shared.utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user-consent-decision.shared.utils.js","sourceRoot":"","sources":["../../../../src/users/user-consent-decision.shared.utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AAE/B,OAAO,EAAE,wBAAwB,EAAE,MAAM,+CAA+C,CAAC;AAgBzF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,MAAM,UAAU,yBAAyB,CACvC,KAAmC,EACnC,OAA4B,EAC5B,MAAY,IAAI,IAAI,EAAE;IAEtB,MAAM,QAAQ,GAAG,KAAK,EAAE,OAAO,CAAC;IAChC,IAAI,QAAQ,KAAK,SAAS;QAAE,OAAO,EAAE,CAAC;IAEtC,MAAM,cAAc,GAAG,OAAO,EAAE,OAAO,CAAC;IACxC,IAAI,QAAQ,CAAC,iBAAiB,KAAK,SAAS,EAAE,CAAC;QAC7C,MAAM,OAAO,GAAkD;YAC7D,GAAG,CAAC,cAAc,IAAI,EAAE,CAAC;YACzB,GAAG,QAAQ;YACX,iBAAiB,EAAE,wBAAwB,CAAC,cAAc,EAAE,iBAAiB,CAAC;SAC/E,CAAC;QACF,4FAA4F;QAC5F,IAAI,cAAc,EAAE,gBAAgB,KAAK,SAAS;YAAE,OAAO,CAAC,gBAAgB,GAAG,cAAc,CAAC,gBAAgB,CAAC;;YAC1G,OAAO,OAAO,CAAC,gBAAgB,CAAC;QACrC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAsB,CAAC;IAClD,CAAC;IAED,MAAM,YAAY,GAAG,wBAAwB,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC;IAC1E,MAAM,gBAAgB,GAAG,wBAAwB,CAAC,cAAc,EAAE,i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AAS;WACzD,wBAAwB,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;IACrE,IAAI,cAAc;QAAE,OAAO,EAAE,CAAC;IAE9B,wDAAwD;IACxD,MAAM,aAAa,GAAG,wBAAwB,CAAC,SAAS,CAAC,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;IAE3H,MAAM,KAAK,GAAG,wBAAwB,CAAC,eAAe,CAAC,CAAC;IACxD,MAAM,qBAAqB,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;IAElF,MAAM,OAAO,GAAkD;QAC7D,GAAG,CAAC,OAAO,IAAI,EAAE,CAAC;QAClB,iBAAiB,EAAE,aAAa;KACjC,CAAC;IACF,IAAI,qBAAqB,EAAE,CAAC;QAC1B,kGAAkG;QAClG,OAAO,CAAC,gBAAgB,GAAG,IAAI,IAAI,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;IAClE,CAAC;SAAM,CAAC;QACN,iFAAiF;QACjF,OAAO,OAAO,CAAC,gBAAgB,CAAC;IAClC,CAAC;IAED,OAAO,EAAE,OAAO,EAAsB,CAAC;AACzC,CAAC","sourcesContent":["import { ZodError } from 'zod';\n\nimport { normalizeConsentPurposes } from '../compliance/privacy/consent-purposes.shared';\nimport type { ConsentPurpose } from '../compliance/privacy/consent-purposes.shared';\n\n/**\n * Any record carrying a consent `privacy` block — user preferences, an inbound contact, an anonymous\n * visitor. Structural on purpose: the rule below is the same for every holder, and a per-resource\n * copy is how two doors come to disagree about when a decision happened.\n */\nexport interface ConsentDecisionHolder {\n privacy?: {\n consentedPurposes?: readonly (ConsentPurpose | string)[];\n consentDecidedAt?: Date | string;\n [otherPrivacyField: string]: unknown;\n };\n}\n\n/**\n * The server-owned half of a consent decision (#534) — returned from the `basicPrefixOperation` of\n * `USER_SELF_PREFERENCES` / `USER_PREFERENCES` UPDATE and `INBOUND_CONTACTS` CREATE. On a CREATE there\n * is no current record, so any purpose granted is a change and an explicit empty choice is a claim.\n *\n * ## `consentDecidedAt` is stamped by the SERVER, never taken from the caller\n *\n * It records WHEN a person made an affirmative consent choice, and it is what separates \"declined\n * everything\" from \"was never asked\". A client-authored instant would let any caller backdate or\n * forge that fact, so a caller's value is only ever read as a CLAIM that a decision is being made, and\n * the recorded instant is the server's clock.\n *\n * ## When a write counts as a decision\n *\n * - The purpose SET changed → a decision. Always stamped.\n * - The set is unchanged but the caller sends a `consentDecidedAt` different from the stored one → an\n * explicit re-confirmation, e.g. a person who meets the consent prompt and grants nothing. Stamped.\n * - The set is unchanged and the caller echoes the stored instant (or sends none) → NOT a decision.\n * This is the ordinary preferences form re-submitting every field while the person edited something\n * else; stamping there would fabricate a consent choice nobody made.\n *\n * A write that does not touch `privacy` at all returns an empty patch, which the framework merges as a\n * no-op. A write that touches `privacy` WITHOUT `consentedPurposes` is not a decision either, and the\n * returned block carries the STORED purposes and instant forward.\n * Without that, the write would replace the whole `privacy` object and the stored consent would be lost\n * while reading as a withdrawal (#534 review F1).\n *\n * The returned `privacy` block is the CURRENT block overlaid with the caller's, so a partial write —\n * the consent gate sends only the purposes — cannot silently reset a sibling member to its default.\n *\n * assurance-control: WILDO.PRIVACY.CONSENT_RECORD — the decision instant is server-owned, and the\n * purpose set it accompanies is audit evidence on the same UPDATE.\n */\nexport function buildConsentDecisionPatch<THolder extends ConsentDecisionHolder>(\n input: Partial<THolder> | undefined,\n current: THolder | undefined,\n now: Date = new Date(),\n): Partial<THolder> {\n const incoming = input?.privacy;\n if (incoming === undefined) return {};\n\n const currentPrivacy = current?.privacy;\n if (incoming.consentedPurposes === undefined) {\n const carried: NonNullable<ConsentDecisionHolder['privacy']> = {\n ...(currentPrivacy ?? {}),\n ...incoming,\n consentedPurposes: normalizeConsentPurposes(currentPrivacy?.consentedPurposes),\n };\n // A caller-sent instant without a purpose set is not a decision; the stored instant stands.\n if (currentPrivacy?.consentDecidedAt !== undefined) carried.consentDecidedAt = currentPrivacy.consentDecidedAt;\n else delete carried.consentDecidedAt;\n return { privacy: carried } as Partial<THolder>;\n }\n\n const nextPurposes = normalizeConsentPurposes(incoming.consentedPurposes);\n const previousPurposes = normalizeConsentPurposes(currentPrivacy?.consentedPurposes);\n\n const setChanged = nextPurposes.length !== previousPurposes.length\n || nextPurposes.some((purpose, index) => purpose !== previousPurposes[index]);\n const claimedAt = incoming.consentDecidedAt === undefined ? undefined : new Date(incoming.consentDecidedAt as Date | string).getTime();\n const storedAt = currentPrivacy?.consentDecidedAt === undefined ? undefined : new Date(currentPrivacy.consentDecidedAt as Date | string).getTime();\n const explicitReconfirmation = claimedAt !== undefined && claimedAt !== storedAt;\n\n const decided = setChanged || explicitReconfirmation;\n const privacy: NonNullable<ConsentDecisionHolder['privacy']> = {\n ...(currentPrivacy ?? {}),\n ...incoming,\n consentedPurposes: nextPurposes,\n };\n if (decided) {\n privacy.consentDecidedAt = now;\n } else if (currentPrivacy?.consentDecidedAt !== undefined) {\n privacy.consentDecidedAt = currentPrivacy.consentDecidedAt;\n } else {\n delete privacy.consentDecidedAt;\n }\n\n return { privacy } as Partial<THolder>;\n}\n\n/**\n * The ADMINISTRATOR door's consent rule (#534, decided by Paul 2026-09-13): an administrator may WITHDRAW\n * purposes on a person's behalf — honouring a withdrawal request received another way — but may never\n * GRANT one. Consent is the subject's own act; a purpose an administrator added would carry the same\n * server-stamped instant as the person's own choice and could not be told apart from it.\n *\n * Refuses an addition with a validation error naming the purposes, then applies the ordinary decision\n * rule. Everything that is not an addition — a withdrawal, an unchanged set, a write that does not touch\n * consent — passes through unchanged.\n */\nexport function buildAdministratorConsentDecisionPatch<THolder extends ConsentDecisionHolder>(\n input: Partial<THolder> | undefined,\n current: THolder | undefined,\n now: Date = new Date(),\n): Partial<THolder> {\n const requested = input?.privacy?.consentedPurposes;\n if (requested !== undefined) {\n const stored = normalizeConsentPurposes(current?.privacy?.consentedPurposes);\n const added = normalizeConsentPurposes(requested).filter((purpose) => !stored.includes(purpose));\n if (added.length > 0) {\n throw new ZodError([{\n code: 'custom',\n path: ['privacy', 'consentedPurposes'],\n message: `An administrator may withdraw consent purposes but cannot grant them on a person's behalf; refused: ${added.join(', ')}.`,\n input: requested,\n }]);\n }\n }\n return buildConsentDecisionPatch(input, current, now);\n}\n\n/**\n * What an anonymous visitor's consent decision contributes to the account they just became (#1258).\n *\n * ## The one thing that dies at this boundary today\n *\n * Every other rights signal a visitor produces is carried: `transposeOwnership` moves their\n * draft notes and their inbound contacts onto the new account, and reconciles what it could not move.\n * Their consent decision is the exception — the website keeps it in `localStorage` on its own origin,\n * `AnonymousUser.privacy` is written `{}` at session start and never again, and the conversion moves\n * neither. So a visitor who declines analytics on the marketing site is asked again inside the\n * application, and under a declared service-consent requirement is BLOCKED there, over a question they\n * answered minutes earlier.\n *\n * ## Why this takes `applicationAsks` and not just two privacy blocks\n *\n * A decision is `(granted ⊆ offered, at an instant)`, never a grant set alone — see\n * `AnonymousUserPrivacySchema.offeredPurposes` for why the two surfaces legitimately ask different\n * questions. `consentDecidedAt` is read everywhere as *\"this person was asked and answered\"*, so\n * stamping it when the visitor's surface offered LESS than the application asks would record a\n * decision about a purpose nobody displayed, and the application would stop prompting for it.\n *\n * Hence the split outcome, which is the whole design:\n *\n * | the visitor was offered | what carries |\n * |---|---|\n * | everything this application asks | grants **and** the decision instant — nothing more to ask |\n * | less than this application asks | the grants ALONE, with **no** instant — the person is still prompted, and the surface starts pre-ticked with what they already agreed to |\n * | nothing (never asked) | nothing |\n *\n * The middle row is not a compromise. It is exactly what the `PROMPT` gate status exists for.\n *\n * ## The account always wins, and that is what makes a shared browser safe\n *\n * An account that has already recorded a decision receives NOTHING: their own answer stands, and a\n * second device's anonymous session cannot overwrite it. Because the middle row also refuses to stamp\n * an instant, the residual risk of a shared browser — visitor A decides, does not register, and\n * visitor B registers from the same browser — degrades to a pre-ticked box rather than an inherited\n * decision: B is still ASKED, and their answer replaces the seed.\n *\n * ## Defensive, because the anonymous row is written by a public door\n *\n * A grant for a purpose the same record does not list as offered is DROPPED rather than trusted. That\n * row is written by an unauthenticated visitor through a public endpoint, so the two fields are a\n * caller's claim about their own decision; only their intersection is a statement this function is\n * willing to repeat onto an identified person.\n *\n * Pure, so every branch is pinned without a database. Returns an EMPTY patch when nothing carries,\n * which the framework merges as a no-op.\n *\n * assurance-control: WILDO.PRIVACY.CONSENT_RECORD — a decision taken before identity is carried onto\n * the person it belonged to, with its own instant, and never widened past what they were shown.\n */\nexport function buildAnonymousConsentCarryPatch<THolder extends ConsentDecisionHolder>(params: {\n /** The converting visitor's `AnonymousUser.privacy`. */\n readonly anonymous: {\n readonly consentedPurposes?: readonly (ConsentPurpose | string)[];\n readonly offeredPurposes?: readonly (ConsentPurpose | string)[];\n readonly consentDecidedAt?: Date | string;\n } | undefined;\n /** The account's current privacy block, or undefined when it has none. */\n readonly account: ConsentDecisionHolder['privacy'] | undefined;\n /**\n * The purposes this application's own consent surface would put to the person — the gate's\n * `optionalPurposes` plus anything it requires. Passing an empty list means the application asks\n * nothing, so a carried decision is complete by definition.\n */\n readonly applicationAsks: readonly (ConsentPurpose | string)[];\n}): Partial<THolder> {\n const { anonymous, account, applicationAsks } = params;\n\n // Never asked, or asked nothing: there is no decision to carry, and seeding grants from a\n // non-decision would invent one.\n if (anonymous?.consentDecidedAt === undefined) return {};\n const offered = normalizeConsentPurposes(anonymous.offeredPurposes);\n if (offered.length === 0) return {};\n\n // The account's own answer stands. `consentDecidedAt` is the decision marker; a non-empty grant set\n // is checked too, so a row that somehow holds grants without an instant is still not overwritten.\n const accountDecided = account?.consentDecidedAt !== undefined\n || normalizeConsentPurposes(account?.consentedPurposes).length > 0;\n if (accountDecided) return {};\n\n // Only what the visitor was actually shown AND granted.\n const carriedGrants = normalizeConsentPurposes(anonymous.consentedPurposes).filter((purpose) => offered.includes(purpose));\n\n const asked = normalizeConsentPurposes(applicationAsks);\n const coversEverythingAsked = asked.every((purpose) => offered.includes(purpose));\n\n const privacy: NonNullable<ConsentDecisionHolder['privacy']> = {\n ...(account ?? {}),\n consentedPurposes: carriedGrants,\n };\n if (coversEverythingAsked) {\n // The visitor's own instant, not the carry's: the moment they decided is the fact being recorded.\n privacy.consentDecidedAt = new Date(anonymous.consentDecidedAt);\n } else {\n // Seed the grants and leave the question open, so the application still prompts.\n delete privacy.consentDecidedAt;\n }\n\n return { privacy } as Partial<THolder>;\n}\n"]}
@@ -20,6 +20,7 @@ export declare const userIdentityLinksResourceConfiguration_InitializationFactor
20
20
  providerDisplayName: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodOptional<import("zod").ZodString>>;
21
21
  providerAvatarUrl: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodOptional<import("zod").ZodString>>;
22
22
  providerRawProfile: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>>>;
23
+ scimExternalId: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodOptional<import("zod").ZodString>>;
23
24
  scopeType: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodOptional<import("zod").ZodEnum<typeof import("..").AuthScopeType>>>;
24
25
  organizationId: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodOptional<import("zod").ZodString>>;
25
26
  applicationId: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodOptional<import("zod").ZodString>>;
@@ -1 +1 @@
1
- {"version":3,"file":"user-identity-links.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["../../../../src/users/user-identity-links.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAMH,OAAO,EAAE,qBAAqB,EAAwD,MAAM,gDAAgD,CAAC;AAC7I,OAAO,EAA4D,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAIvI,eAAO,MAAM,4DAA4D,GACvE,wBAAwB,oBAAoB,EAAE;;;;;;;;;;;;;;;;;kCAkI9C,CAAC"}
1
+ {"version":3,"file":"user-identity-links.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["../../../../src/users/user-identity-links.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAMH,OAAO,EAAE,qBAAqB,EAAwD,MAAM,gDAAgD,CAAC;AAC7I,OAAO,EAA4D,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAIvI,eAAO,MAAM,4DAA4D,GACvE,wBAAwB,oBAAoB,EAAE;;;;;;;;;;;;;;;;;;kCAkI9C,CAAC"}
@@ -28,6 +28,7 @@ export declare const UserIdentityLinkSchema: import("@wildo-ai/zod-decorators").
28
28
  providerDisplayName: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodOptional<z.ZodString>>;
29
29
  providerAvatarUrl: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodOptional<z.ZodString>>;
30
30
  providerRawProfile: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>>;
31
+ scimExternalId: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodOptional<z.ZodString>>;
31
32
  scopeType: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodOptional<z.ZodEnum<typeof AuthScopeType>>>;
32
33
  organizationId: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodOptional<z.ZodString>>;
33
34
  applicationId: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodOptional<z.ZodString>>;
@@ -1 +1 @@
1
- {"version":3,"file":"user-identity-links.shared.schemas.d.ts","sourceRoot":"","sources":["../../../../src/users/user-identity-links.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,OAAO,EACL,aAAa,EACb,sBAAsB,EACtB,iBAAiB,EAClB,MAAM,2DAA2D,CAAC;AAEnE;;;;;;GAMG;AACH,eAAO,MAAM,mCAAmC,EAAE,QAAQ,CACxD,MAAM,CAAC,iBAAiB,EAAE,WAAW,CAAC,sBAAsB,CAAC,CAAC,CAW/D,CAAC;AAEF,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;kBAmJjC,CAAC;AAGH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
1
+ {"version":3,"file":"user-identity-links.shared.schemas.d.ts","sourceRoot":"","sources":["../../../../src/users/user-identity-links.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,OAAO,EACL,aAAa,EACb,sBAAsB,EACtB,iBAAiB,EAClB,MAAM,2DAA2D,CAAC;AAEnE;;;;;;GAMG;AACH,eAAO,MAAM,mCAAmC,EAAE,QAAQ,CACxD,MAAM,CAAC,iBAAiB,EAAE,WAAW,CAAC,sBAAsB,CAAC,CAAC,CAW/D,CAAC;AAEF,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;kBAqLjC,CAAC;AAGH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
@@ -65,6 +65,36 @@ export const UserIdentityLinkSchema = z.object({
65
65
  // exactly why it must be scrubbed: an unclassifiable blob is not an empty one.
66
66
  providerRawProfile: addImpersonalizeWith(z.record(z.string(), z.unknown()).optional().isBackendOnly(), RedactionType.REMOVE)
67
67
  .dataCategories([PersonalDataCategory.IDENTITY, PersonalDataCategory.USER_CONTENT]),
68
+ /**
69
+ * The DIRECTORY's own identifier for this person, as SCIM `externalId` — and deliberately NOT
70
+ * {@link UserIdentityLinkSchema.shape.providerUserId}.
71
+ *
72
+ * ## Why it cannot share a column with `providerUserId`
73
+ *
74
+ * `providerUserId` is the AUTHENTICATION KEY. `createIdentityLink` resolves an existing link by it
75
+ * (with `providerRef`, `connectionType` and the scope) and refuses with
76
+ * `enterprise_identity_already_linked_to_another_user` when it points at somebody else. It is also
77
+ * part of this resource's business key.
78
+ *
79
+ * SCIM `externalId` is not that. RFC 7643 §3.1 makes it the CLIENT's identifier, which the service
80
+ * provider stores; the provider's own identifier is `id`. Microsoft Entra maps it from
81
+ * `[mailNickname]` by default — a mutable handle — so writing it into `providerUserId` would
82
+ * re-key a live SSO identity from an attribute an administrator can change in the directory. The
83
+ * next sign-in asserting the original subject would find no link.
84
+ *
85
+ * ## What it was before (#1402)
86
+ *
87
+ * `SCIM_USER_ATTRIBUTE_MAP` mapped `externalId` → `providerUserId`, and the SCIM PATCH/PUT path
88
+ * folded it into the profile update bag — which writes `USER_PROFILES`, a resource that does not
89
+ * own the field. It was stripped by the strict re-parse and the directory was told `200`. Measured
90
+ * against a live Entra tenant on 2026-09-21: it reported updating `externalId` for two users, and
91
+ * neither value was stored, so it re-sent the same update on every cycle.
92
+ *
93
+ * Optional because only a directory sets it: a social or interactive SSO link has none. Not
94
+ * indexed and not part of any key — it is a value to hand back, not to resolve by; resolving by it
95
+ * is what the whole comment above exists to prevent.
96
+ */
97
+ scimExternalId: addImpersonalizeWith(z.string().optional().dataCategories(PersonalDataCategory.IDENTITY), RedactionType.REMOVE),
68
98
  /** Enterprise tenant kind. Absent for social links. */
69
99
  scopeType: z.enum(AuthScopeType).optional().isDBIndexed(),
70
100
  /** Organization tenant identifier. Present only for organization-scoped enterprise links. */
@@ -1 +1 @@
1
- {"version":3,"file":"user-identity-links.shared.schemas.js","sourceRoot":"","sources":["../../../../src/users/user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AE,CAAC,eAAe,CAAC;gBACvB,OAAO,EAAE,8DAA8D;aACxE,CAAC,CAAC;QACL,CAAC;QACD,OAAO;IACT,CAAC;IAED,GAAG,CAAC,QAAQ,CAAC;QACX,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,CAAC,WAAW,CAAC;QACnB,OAAO,EAAE,yDAAyD;KACnE,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["/**\n * User Identity Links Schema\n *\n * Tracks OAuth2/SSO provider connections per user.\n * A user can have multiple identity links (e.g., Google social + Microsoft enterprise).\n *\n * Canonical identity key: connection type + provider + provider user + exact enterprise\n * scope/connection coordinates. The database compound unique index prevents the same\n * external identity from being bound to two Wildo users inside one tenant connection.\n */\n\nimport { z } from 'zod';\nimport { addImpersonalizeWith } from '@wildo-ai/zod-decorators';\nimport { RedactionType } from '../compliance/privacy/redaction.shared.schemas';\nimport { ERASED_USER_EMAIL, ERASED_IDENTITY_VALUE } from './users.shared.schemas';\nimport { PersonalDataCategory } from '../compliance/privacy/personal-data-category.shared.schemas';\nimport {\n AuthScopeType,\n ExternalIdentitySource,\n SsoConnectionType,\n} from '../security/authentications/authentication.shared.schemas';\n\n/**\n * Valid provenance mechanisms for each connection ownership class.\n *\n * OAuth2 is social-only; SAML and SCIM are enterprise-only; OIDC legitimately\n * spans both. Keeping this relationship beside the persisted link schema makes\n * invalid cross-products impossible at every repository boundary.\n */\nexport const IDENTITY_SOURCES_BY_CONNECTION_TYPE: Readonly<\n Record<SsoConnectionType, ReadonlySet<ExternalIdentitySource>>\n> = {\n [SsoConnectionType.SOCIAL]: new Set([\n ExternalIdentitySource.OAUTH2,\n ExternalIdentitySource.OIDC,\n ]),\n [SsoConnectionType.ENTERPRISE]: new Set([\n ExternalIdentitySource.OIDC,\n ExternalIdentitySource.SAML,\n ExternalIdentitySource.SCIM,\n ]),\n};\n\nexport const UserIdentityLinkSchema = z.object({\n _id: z.string().min(1).isPrimaryKey().isSummaryField(),\n\n /** FK → USERS — the user who owns this identity link */\n userId: z.string().min(1).isDBIndexed().isForeignKey().isSummaryField().excludeFromUpdate(),\n\n /** Distinguishes social vs enterprise links */\n connectionType: z.enum(SsoConnectionType).isDBIndexed().isSummaryField(),\n\n /** Matches external connector ref (e.g., \"google\", \"microsoft\", \"github\", \"oidc\") */\n providerRef: z.string().min(1).isDBIndexed().isSummaryField(),\n\n /** The user's ID at the IdP */\n // MASK, not REMOVE: `min(1)` and part of the compound business key, so a null fails the re-parse.\n // Two erased links for one connection would share this masked value — which is safe because a\n // declared retention policy makes the planner emit that unique index RETENTION-SCOPED, so retained\n // rows fall outside the constraint. Confirmed in the generated migration, not assumed.\n providerUserId: addImpersonalizeWith(\n z.string().min(1).isDBIndexed().dataCategories(PersonalDataCategory.IDENTITY),\n RedactionType.MASK,\n { maskValue: ERASED_IDENTITY_VALUE },\n ),\n\n /** Email from the IdP */\n providerEmail: addImpersonalizeWith(\n z.string().isDBIndexed().dataCategories(PersonalDataCategory.CONTACT_DETAILS),\n RedactionType.MASK,\n { maskValue: ERASED_USER_EMAIL },\n ),\n\n /** Display name from IdP */\n providerDisplayName: addImpersonalizeWith(\n z.string().optional().dataCategories(PersonalDataCategory.IDENTITY),\n RedactionType.REMOVE,\n ),\n\n /** Avatar URL from IdP */\n providerAvatarUrl: addImpersonalizeWith(\n z.string().optional().dataCategories(PersonalDataCategory.IDENTITY),\n RedactionType.REMOVE,\n ),\n\n /**\n * Raw claims from the IdP for debugging — backend only.\n *\n * The one field on this resource whose contents the framework does not control: an IdP may put\n * anything in a claim set, including a special category. IDENTITY + USER_CONTENT is what the field\n * is FOR; it is not a certification of what a given IdP will send. An application whose IdP is\n * known to emit a special-category claim should say so on its own copy.\n */\n // The provider's own payload about the person, unbounded in shape — whatever that provider chose\n // to send. It carries no `dataCategories` because nothing can classify it in advance, which is\n // exactly why it must be scrubbed: an unclassifiable blob is not an empty one.\n providerRawProfile: addImpersonalizeWith(\n z.record(z.string(), z.unknown()).optional().isBackendOnly(),\n RedactionType.REMOVE,\n )\n .dataCategories([PersonalDataCategory.IDENTITY, PersonalDataCategory.USER_CONTENT]),\n\n /** Enterprise tenant kind. Absent for social links. */\n scopeType: z.enum(AuthScopeType).optional().isDBIndexed(),\n\n /** Organization tenant identifier. Present only for organization-scoped enterprise links. */\n organizationId: z.string().optional().isForeignKey(),\n\n /** Application tenant identifier. Present only for application-scoped enterprise links. */\n applicationId: z.string().optional().isForeignKey(),\n\n /** Enterprise connection identifier within the owning scope. */\n connectionId: z.string().optional(),\n\n /** Authentication source that created this link. */\n source: z.enum(ExternalIdentitySource),\n\n /** When this identity link was created */\n linkedAt: z.date().default(() => new Date()).isDBIndexed().excludeFromCreate().excludeFromUpdate(),\n\n /** Last time this identity link was used for authentication */\n lastUsedAt: z.date().default(() => new Date()).isDBIndexed().excludeFromCreate().excludeFromUpdate(),\n}).businessKeySet([\n 'connectionType',\n 'providerRef',\n 'providerUserId',\n 'scopeType',\n 'organizationId',\n 'applicationId',\n 'connectionId',\n]).superRefine((link, ctx) => {\n if (!IDENTITY_SOURCES_BY_CONNECTION_TYPE[link.connectionType].has(link.source)) {\n ctx.addIssue({\n code: 'custom',\n path: ['source'],\n message: `Identity source ${link.source} is incompatible with ${link.connectionType} connections`,\n });\n }\n\n if (link.connectionType === SsoConnectionType.SOCIAL) {\n if (\n link.scopeType !== undefined\n || link.organizationId !== undefined\n || link.applicationId !== undefined\n || link.connectionId !== undefined\n ) {\n ctx.addIssue({\n code: 'custom',\n path: ['scopeType'],\n message: 'Social identity links must not carry enterprise scope fields',\n });\n }\n return;\n }\n\n if (!link.connectionId) {\n ctx.addIssue({\n code: 'custom',\n path: ['connectionId'],\n message: 'Enterprise identity links require connectionId',\n });\n }\n\n if (link.scopeType === AuthScopeType.ORGANIZATION) {\n if (!link.organizationId || link.applicationId !== undefined) {\n ctx.addIssue({\n code: 'custom',\n path: ['organizationId'],\n message: 'Organization-scoped identity links require only organizationId',\n });\n }\n return;\n }\n\n if (link.scopeType === AuthScopeType.APPLICATION) {\n if (!link.applicationId || link.organizationId !== undefined) {\n ctx.addIssue({\n code: 'custom',\n path: ['applicationId'],\n message: 'Application-scoped identity links require only applicationId',\n });\n }\n return;\n }\n\n ctx.addIssue({\n code: 'custom',\n path: ['scopeType'],\n message: 'Enterprise identity links require an explicit scopeType',\n });\n});\n\n\nexport type UserIdentityLink = z.infer<typeof UserIdentityLinkSchema>;\n"]}
1
+ {"version":3,"file":"user-identity-links.shared.schemas.js","sourceRoot":"","sources":["../../../../src/users/user-identity-links.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,gDAAgD,CAAC;AAC/E,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAClF,OAAO,EAAE,oBAAoB,EAAE,MAAM,6DAA6D,CAAC;AACnG,OAAO,EACL,aAAa,EACb,sBAAsB,EACtB,iBAAiB,GAClB,MAAM,2DAA2D,CAAC;AAEnE;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,mCAAmC,GAE5C;IACF,CAAC,iBAAiB,CAAC,MAAM,CAAC,EAAE,IAAI,GAAG,CAAC;QAClC,sBAAsB,CAAC,MAAM;QAC7B,sBAAsB,CAAC,IAAI;KAC5B,CAAC;IACF,CAAC,iBAAiB,CAAC,UAAU,CAAC,EAAE,IAAI,GAAG,CAAC;QACtC,sBAAsB,CAAC,IAAI;QAC3B,sBAAsB,CAAC,IAAI;QAC3B,sBAAsB,CAAC,IAAI;KAC5B,CAAC;CACH,CAAC;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,YAAY,EAAE,C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K,aAAa,CAAC,YAAY,EAAE,CAAC;QAClD,IAAI,CAAC,IAAI,CAAC,cAAc,IAAI,IAAI,CAAC,aAAa,KAAK,SAAS,EAAE,CAAC;YAC7D,GAAG,CAAC,QAAQ,CAAC;gBACX,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,gBAAgB,CAAC;gBACxB,OAAO,EAAE,gEAAgE;aAC1E,CAAC,CAAC;QACL,CAAC;QACD,OAAO;IACT,CAAC;IAED,IAAI,IAAI,CAAC,SAAS,KAAK,aAAa,CAAC,WAAW,EAAE,CAAC;QACjD,IAAI,CAAC,IAAI,CAAC,aAAa,IAAI,IAAI,CAAC,cAAc,KAAK,SAAS,EAAE,CAAC;YAC7D,GAAG,CAAC,QAAQ,CAAC;gBACX,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,eAAe,CAAC;gBACvB,OAAO,EAAE,8DAA8D;aACxE,CAAC,CAAC;QACL,CAAC;QACD,OAAO;IACT,CAAC;IAED,GAAG,CAAC,QAAQ,CAAC;QACX,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,CAAC,WAAW,CAAC;QACnB,OAAO,EAAE,yDAAyD;KACnE,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["/**\n * User Identity Links Schema\n *\n * Tracks OAuth2/SSO provider connections per user.\n * A user can have multiple identity links (e.g., Google social + Microsoft enterprise).\n *\n * Canonical identity key: connection type + provider + provider user + exact enterprise\n * scope/connection coordinates. The database compound unique index prevents the same\n * external identity from being bound to two Wildo users inside one tenant connection.\n */\n\nimport { z } from 'zod';\nimport { addImpersonalizeWith } from '@wildo-ai/zod-decorators';\nimport { RedactionType } from '../compliance/privacy/redaction.shared.schemas';\nimport { ERASED_USER_EMAIL, ERASED_IDENTITY_VALUE } from './users.shared.schemas';\nimport { PersonalDataCategory } from '../compliance/privacy/personal-data-category.shared.schemas';\nimport {\n AuthScopeType,\n ExternalIdentitySource,\n SsoConnectionType,\n} from '../security/authentications/authentication.shared.schemas';\n\n/**\n * Valid provenance mechanisms for each connection ownership class.\n *\n * OAuth2 is social-only; SAML and SCIM are enterprise-only; OIDC legitimately\n * spans both. Keeping this relationship beside the persisted link schema makes\n * invalid cross-products impossible at every repository boundary.\n */\nexport const IDENTITY_SOURCES_BY_CONNECTION_TYPE: Readonly<\n Record<SsoConnectionType, ReadonlySet<ExternalIdentitySource>>\n> = {\n [SsoConnectionType.SOCIAL]: new Set([\n ExternalIdentitySource.OAUTH2,\n ExternalIdentitySource.OIDC,\n ]),\n [SsoConnectionType.ENTERPRISE]: new Set([\n ExternalIdentitySource.OIDC,\n ExternalIdentitySource.SAML,\n ExternalIdentitySource.SCIM,\n ]),\n};\n\nexport const UserIdentityLinkSchema = z.object({\n _id: z.string().min(1).isPrimaryKey().isSummaryField(),\n\n /** FK → USERS — the user who owns this identity link */\n userId: z.string().min(1).isDBIndexed().isForeignKey().isSummaryField().excludeFromUpdate(),\n\n /** Distinguishes social vs enterprise links */\n connectionType: z.enum(SsoConnectionType).isDBIndexed().isSummaryField(),\n\n /** Matches external connector ref (e.g., \"google\", \"microsoft\", \"github\", \"oidc\") */\n providerRef: z.string().min(1).isDBIndexed().isSummaryField(),\n\n /** The user's ID at the IdP */\n // MASK, not REMOVE: `min(1)` and part of the compound business key, so a null fails the re-parse.\n // Two erased links for one connection would share this masked value — which is safe because a\n // declared retention policy makes the planner emit that unique index RETENTION-SCOPED, so retained\n // rows fall outside the constraint. Confirmed in the generated migration, not assumed.\n providerUserId: addImpersonalizeWith(\n z.string().min(1).isDBIndexed().dataCategories(PersonalDataCategory.IDENTITY),\n RedactionType.MASK,\n { maskValue: ERASED_IDENTITY_VALUE },\n ),\n\n /** Email from the IdP */\n providerEmail: addImpersonalizeWith(\n z.string().isDBIndexed().dataCategories(PersonalDataCategory.CONTACT_DETAILS),\n RedactionType.MASK,\n { maskValue: ERASED_USER_EMAIL },\n ),\n\n /** Display name from IdP */\n providerDisplayName: addImpersonalizeWith(\n z.string().optional().dataCategories(PersonalDataCategory.IDENTITY),\n RedactionType.REMOVE,\n ),\n\n /** Avatar URL from IdP */\n providerAvatarUrl: addImpersonalizeWith(\n z.string().optional().dataCategories(PersonalDataCategory.IDENTITY),\n RedactionType.REMOVE,\n ),\n\n /**\n * Raw claims from the IdP for debugging — backend only.\n *\n * The one field on this resource whose contents the framework does not control: an IdP may put\n * anything in a claim set, including a special category. IDENTITY + USER_CONTENT is what the field\n * is FOR; it is not a certification of what a given IdP will send. An application whose IdP is\n * known to emit a special-category claim should say so on its own copy.\n */\n // The provider's own payload about the person, unbounded in shape — whatever that provider chose\n // to send. It carries no `dataCategories` because nothing can classify it in advance, which is\n // exactly why it must be scrubbed: an unclassifiable blob is not an empty one.\n providerRawProfile: addImpersonalizeWith(\n z.record(z.string(), z.unknown()).optional().isBackendOnly(),\n RedactionType.REMOVE,\n )\n .dataCategories([PersonalDataCategory.IDENTITY, PersonalDataCategory.USER_CONTENT]),\n\n /**\n * The DIRECTORY's own identifier for this person, as SCIM `externalId` — and deliberately NOT\n * {@link UserIdentityLinkSchema.shape.providerUserId}.\n *\n * ## Why it cannot share a column with `providerUserId`\n *\n * `providerUserId` is the AUTHENTICATION KEY. `createIdentityLink` resolves an existing link by it\n * (with `providerRef`, `connectionType` and the scope) and refuses with\n * `enterprise_identity_already_linked_to_another_user` when it points at somebody else. It is also\n * part of this resource's business key.\n *\n * SCIM `externalId` is not that. RFC 7643 §3.1 makes it the CLIENT's identifier, which the service\n * provider stores; the provider's own identifier is `id`. Microsoft Entra maps it from\n * `[mailNickname]` by default — a mutable handle — so writing it into `providerUserId` would\n * re-key a live SSO identity from an attribute an administrator can change in the directory. The\n * next sign-in asserting the original subject would find no link.\n *\n * ## What it was before (#1402)\n *\n * `SCIM_USER_ATTRIBUTE_MAP` mapped `externalId` → `providerUserId`, and the SCIM PATCH/PUT path\n * folded it into the profile update bag — which writes `USER_PROFILES`, a resource that does not\n * own the field. It was stripped by the strict re-parse and the directory was told `200`. Measured\n * against a live Entra tenant on 2026-09-21: it reported updating `externalId` for two users, and\n * neither value was stored, so it re-sent the same update on every cycle.\n *\n * Optional because only a directory sets it: a social or interactive SSO link has none. Not\n * indexed and not part of any key — it is a value to hand back, not to resolve by; resolving by it\n * is what the whole comment above exists to prevent.\n */\n scimExternalId: addImpersonalizeWith(\n z.string().optional().dataCategories(PersonalDataCategory.IDENTITY),\n RedactionType.REMOVE,\n ),\n\n /** Enterprise tenant kind. Absent for social links. */\n scopeType: z.enum(AuthScopeType).optional().isDBIndexed(),\n\n /** Organization tenant identifier. Present only for organization-scoped enterprise links. */\n organizationId: z.string().optional().isForeignKey(),\n\n /** Application tenant identifier. Present only for application-scoped enterprise links. */\n applicationId: z.string().optional().isForeignKey(),\n\n /** Enterprise connection identifier within the owning scope. */\n connectionId: z.string().optional(),\n\n /** Authentication source that created this link. */\n source: z.enum(ExternalIdentitySource),\n\n /** When this identity link was created */\n linkedAt: z.date().default(() => new Date()).isDBIndexed().excludeFromCreate().excludeFromUpdate(),\n\n /** Last time this identity link was used for authentication */\n lastUsedAt: z.date().default(() => new Date()).isDBIndexed().excludeFromCreate().excludeFromUpdate(),\n}).businessKeySet([\n 'connectionType',\n 'providerRef',\n 'providerUserId',\n 'scopeType',\n 'organizationId',\n 'applicationId',\n 'connectionId',\n]).superRefine((link, ctx) => {\n if (!IDENTITY_SOURCES_BY_CONNECTION_TYPE[link.connectionType].has(link.source)) {\n ctx.addIssue({\n code: 'custom',\n path: ['source'],\n message: `Identity source ${link.source} is incompatible with ${link.connectionType} connections`,\n });\n }\n\n if (link.connectionType === SsoConnectionType.SOCIAL) {\n if (\n link.scopeType !== undefined\n || link.organizationId !== undefined\n || link.applicationId !== undefined\n || link.connectionId !== undefined\n ) {\n ctx.addIssue({\n code: 'custom',\n path: ['scopeType'],\n message: 'Social identity links must not carry enterprise scope fields',\n });\n }\n return;\n }\n\n if (!link.connectionId) {\n ctx.addIssue({\n code: 'custom',\n path: ['connectionId'],\n message: 'Enterprise identity links require connectionId',\n });\n }\n\n if (link.scopeType === AuthScopeType.ORGANIZATION) {\n if (!link.organizationId || link.applicationId !== undefined) {\n ctx.addIssue({\n code: 'custom',\n path: ['organizationId'],\n message: 'Organization-scoped identity links require only organizationId',\n });\n }\n return;\n }\n\n if (link.scopeType === AuthScopeType.APPLICATION) {\n if (!link.applicationId || link.organizationId !== undefined) {\n ctx.addIssue({\n code: 'custom',\n path: ['applicationId'],\n message: 'Application-scoped identity links require only applicationId',\n });\n }\n return;\n }\n\n ctx.addIssue({\n code: 'custom',\n path: ['scopeType'],\n message: 'Enterprise identity links require an explicit scopeType',\n });\n});\n\n\nexport type UserIdentityLink = z.infer<typeof UserIdentityLinkSchema>;\n"]}
@@ -16,7 +16,7 @@
16
16
  * the write against that same DTO, and Mongoose drops every non-schema path. A request naming
17
17
  * no schema path therefore produced an empty `$set`: the route answered HTTP 200 having reset
18
18
  * nothing. That is the class of defect catalogued in
19
- * `.claude/plans/routed-unimplemented-operations-fail-closed.md`.
19
+ * the 2026-08-01 routed-but-unimplemented operation sweep (#1275).
20
20
  *
21
21
  * ## How the reset reaches the database now
22
22
  *
@@ -61,18 +61,18 @@ export type UserPreferencesResetRequest = z.infer<typeof UserPreferencesResetReq
61
61
  * unnamed block is left exactly as it was.
62
62
  *
63
63
  * assurance-control: WILDO.PRIVACY.CONSENT_RECORD — resetting {@link UserPreferenceGroup.PRIVACY}
64
- * returns `dataProcessingConsent` to its default, which IS a consent decision. It leaves a trail
64
+ * returns `consentedPurposes` to the empty set and clears `consentDecidedAt`, which IS a consent
65
+ * decision — a withdrawal of everything, after which a consent surface asks again. It leaves a trail
65
66
  * naming the previous and resulting value: the operation is CRITICAL, so it sits above the
66
67
  * framework's automatic audit floor and emits `resource_operation_performed`, and
67
- * `dataProcessingConsent` / `privacyLevel` carry `.isAuditEvidence()` so their VALUES ride on that
68
- * record. Governed-document receipts are neither preference members nor resettable values.
68
+ * `consentedPurposes` carries `.isAuditEvidence()` so its VALUES ride on that record. Governed-document receipts are neither preference members nor resettable values.
69
69
  *
70
70
  * @param request - the parsed request body. Re-parse `inputDto` through
71
71
  * {@link UserPreferencesResetRequestSchema} at the call site rather than casting it: the
72
72
  * prefix hook types `inputDto` as the resource's main schema, while the runtime value is the
73
73
  * operation's request DTO.
74
- * @param currentPreferences - the row being reset, needed by blocks whose reset is not a pure
75
- * default (today: privacy, whose consent receipts are carried through).
74
+ * @param currentPreferences - the row being reset, supplied to each block factory. Current
75
+ * factories return schema defaults; governed-document receipts live outside this resource.
76
76
  */
77
77
  export declare function buildUserPreferencesResetPatch(request: UserPreferencesResetRequest, currentPreferences: UserPreferences | undefined): Partial<UserPreferences>;
78
78
  //# sourceMappingURL=user-preferences-reset.shared.utils.d.ts.map
@@ -16,7 +16,7 @@
16
16
  * the write against that same DTO, and Mongoose drops every non-schema path. A request naming
17
17
  * no schema path therefore produced an empty `$set`: the route answered HTTP 200 having reset
18
18
  * nothing. That is the class of defect catalogued in
19
- * `.claude/plans/routed-unimplemented-operations-fail-closed.md`.
19
+ * the 2026-08-01 routed-but-unimplemented operation sweep (#1275).
20
20
  *
21
21
  * ## How the reset reaches the database now
22
22
  *
@@ -73,18 +73,18 @@ const USER_PREFERENCE_GROUP_RESET_FACTORIES = {
73
73
  * unnamed block is left exactly as it was.
74
74
  *
75
75
  * assurance-control: WILDO.PRIVACY.CONSENT_RECORD — resetting {@link UserPreferenceGroup.PRIVACY}
76
- * returns `dataProcessingConsent` to its default, which IS a consent decision. It leaves a trail
76
+ * returns `consentedPurposes` to the empty set and clears `consentDecidedAt`, which IS a consent
77
+ * decision — a withdrawal of everything, after which a consent surface asks again. It leaves a trail
77
78
  * naming the previous and resulting value: the operation is CRITICAL, so it sits above the
78
79
  * framework's automatic audit floor and emits `resource_operation_performed`, and
79
- * `dataProcessingConsent` / `privacyLevel` carry `.isAuditEvidence()` so their VALUES ride on that
80
- * record. Governed-document receipts are neither preference members nor resettable values.
80
+ * `consentedPurposes` carries `.isAuditEvidence()` so its VALUES ride on that record. Governed-document receipts are neither preference members nor resettable values.
81
81
  *
82
82
  * @param request - the parsed request body. Re-parse `inputDto` through
83
83
  * {@link UserPreferencesResetRequestSchema} at the call site rather than casting it: the
84
84
  * prefix hook types `inputDto` as the resource's main schema, while the runtime value is the
85
85
  * operation's request DTO.
86
- * @param currentPreferences - the row being reset, needed by blocks whose reset is not a pure
87
- * default (today: privacy, whose consent receipts are carried through).
86
+ * @param currentPreferences - the row being reset, supplied to each block factory. Current
87
+ * factories return schema defaults; governed-document receipts live outside this resource.
88
88
  */
89
89
  export function buildUserPreferencesResetPatch(request, currentPreferences) {
90
90
  const patch = {};