@wildo-ai/saas-models 1.1.5 → 1.1.7

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 (1295) hide show
  1. package/dist/esm/__tests__/setup.d.ts.map +1 -1
  2. package/dist/esm/__tests__/setup.js.map +1 -1
  3. package/dist/esm/_inspect.d.ts.map +1 -1
  4. package/dist/esm/_inspect.js.map +1 -1
  5. package/dist/esm/applications/application-metadata.shared.resources-config.schemas.d.ts.map +1 -1
  6. package/dist/esm/applications/application-metadata.shared.resources-config.schemas.js.map +1 -1
  7. package/dist/esm/applications/application-subject.shared.schemas.d.ts.map +1 -1
  8. package/dist/esm/applications/application-subject.shared.schemas.js.map +1 -1
  9. package/dist/esm/applications/application-versions.shared.resources-config.schemas.d.ts.map +1 -1
  10. package/dist/esm/applications/application-versions.shared.resources-config.schemas.js +2 -1
  11. package/dist/esm/applications/application-versions.shared.resources-config.schemas.js.map +1 -1
  12. package/dist/esm/applications/applications-context.schemas.d.ts +176 -2
  13. package/dist/esm/applications/applications-context.schemas.d.ts.map +1 -1
  14. package/dist/esm/applications/applications-context.schemas.js.map +1 -1
  15. package/dist/esm/applications/applications.shared.resources-config.schemas.d.ts.map +1 -1
  16. package/dist/esm/applications/applications.shared.resources-config.schemas.js +3 -2
  17. package/dist/esm/applications/applications.shared.resources-config.schemas.js.map +1 -1
  18. package/dist/esm/applications/applications.shared.schemas.d.ts +7 -5
  19. package/dist/esm/applications/applications.shared.schemas.d.ts.map +1 -1
  20. package/dist/esm/applications/applications.shared.schemas.js +6 -4
  21. package/dist/esm/applications/applications.shared.schemas.js.map +1 -1
  22. package/dist/esm/billing/billing-account.shared.resources-config.schemas.d.ts +10 -1
  23. package/dist/esm/billing/billing-account.shared.resources-config.schemas.d.ts.map +1 -1
  24. package/dist/esm/billing/billing-account.shared.resources-config.schemas.js +49 -15
  25. package/dist/esm/billing/billing-account.shared.resources-config.schemas.js.map +1 -1
  26. package/dist/esm/billing/billing-account.shared.schemas.d.ts.map +1 -1
  27. package/dist/esm/billing/billing-account.shared.schemas.js +2 -2
  28. package/dist/esm/billing/billing-account.shared.schemas.js.map +1 -1
  29. package/dist/esm/billing/billing-configuration.shared.schemas.d.ts +25 -0
  30. package/dist/esm/billing/billing-configuration.shared.schemas.d.ts.map +1 -1
  31. package/dist/esm/billing/billing-configuration.shared.schemas.js +19 -0
  32. package/dist/esm/billing/billing-configuration.shared.schemas.js.map +1 -1
  33. package/dist/esm/billing/billing-enums.shared.schemas.d.ts +27 -5
  34. package/dist/esm/billing/billing-enums.shared.schemas.d.ts.map +1 -1
  35. package/dist/esm/billing/billing-enums.shared.schemas.js +30 -4
  36. package/dist/esm/billing/billing-enums.shared.schemas.js.map +1 -1
  37. package/dist/esm/billing/billing-types.shared.schemas.d.ts +37 -11
  38. package/dist/esm/billing/billing-types.shared.schemas.d.ts.map +1 -1
  39. package/dist/esm/billing/billing-types.shared.schemas.js +31 -19
  40. package/dist/esm/billing/billing-types.shared.schemas.js.map +1 -1
  41. package/dist/esm/billing/credit-pool.shared.resources-config.schemas.d.ts +2 -0
  42. package/dist/esm/billing/credit-pool.shared.resources-config.schemas.d.ts.map +1 -1
  43. package/dist/esm/billing/credit-pool.shared.resources-config.schemas.js +18 -7
  44. package/dist/esm/billing/credit-pool.shared.resources-config.schemas.js.map +1 -1
  45. package/dist/esm/billing/credit-pool.shared.schemas.d.ts +2 -0
  46. package/dist/esm/billing/credit-pool.shared.schemas.d.ts.map +1 -1
  47. package/dist/esm/billing/credit-pool.shared.schemas.js +7 -1
  48. package/dist/esm/billing/credit-pool.shared.schemas.js.map +1 -1
  49. package/dist/esm/billing/invoice-ref.shared.resources-config.schemas.d.ts.map +1 -1
  50. package/dist/esm/billing/invoice-ref.shared.resources-config.schemas.js +6 -6
  51. package/dist/esm/billing/invoice-ref.shared.resources-config.schemas.js.map +1 -1
  52. package/dist/esm/billing/invoice-ref.shared.schemas.d.ts.map +1 -1
  53. package/dist/esm/billing/invoice-ref.shared.schemas.js +1 -1
  54. package/dist/esm/billing/invoice-ref.shared.schemas.js.map +1 -1
  55. package/dist/esm/billing/price.shared.resources-config.schemas.d.ts.map +1 -1
  56. package/dist/esm/billing/price.shared.resources-config.schemas.js.map +1 -1
  57. package/dist/esm/billing/price.shared.schemas.d.ts.map +1 -1
  58. package/dist/esm/billing/price.shared.schemas.js +5 -3
  59. package/dist/esm/billing/price.shared.schemas.js.map +1 -1
  60. package/dist/esm/billing/product-behavior-policy.shared.schemas.d.ts +11 -1
  61. package/dist/esm/billing/product-behavior-policy.shared.schemas.d.ts.map +1 -1
  62. package/dist/esm/billing/product-behavior-policy.shared.schemas.js +39 -23
  63. package/dist/esm/billing/product-behavior-policy.shared.schemas.js.map +1 -1
  64. package/dist/esm/billing/product-definition.shared.schemas.d.ts +30 -2
  65. package/dist/esm/billing/product-definition.shared.schemas.d.ts.map +1 -1
  66. package/dist/esm/billing/product-definition.shared.schemas.js +35 -0
  67. package/dist/esm/billing/product-definition.shared.schemas.js.map +1 -1
  68. package/dist/esm/billing/product.shared.resources-config.schemas.d.ts +6 -3
  69. package/dist/esm/billing/product.shared.resources-config.schemas.d.ts.map +1 -1
  70. package/dist/esm/billing/product.shared.resources-config.schemas.js.map +1 -1
  71. package/dist/esm/billing/product.shared.schemas.d.ts +7 -3
  72. package/dist/esm/billing/product.shared.schemas.d.ts.map +1 -1
  73. package/dist/esm/billing/product.shared.schemas.js +22 -7
  74. package/dist/esm/billing/product.shared.schemas.js.map +1 -1
  75. package/dist/esm/billing/promotions.shared.resources-config.schemas.d.ts.map +1 -1
  76. package/dist/esm/billing/promotions.shared.resources-config.schemas.js +8 -8
  77. package/dist/esm/billing/promotions.shared.resources-config.schemas.js.map +1 -1
  78. package/dist/esm/billing/promotions.shared.schemas.d.ts.map +1 -1
  79. package/dist/esm/billing/promotions.shared.schemas.js.map +1 -1
  80. package/dist/esm/billing/public-pricing-catalog.shared.atoms.d.ts +135 -0
  81. package/dist/esm/billing/public-pricing-catalog.shared.atoms.d.ts.map +1 -0
  82. package/dist/esm/billing/public-pricing-catalog.shared.atoms.js +112 -0
  83. package/dist/esm/billing/public-pricing-catalog.shared.atoms.js.map +1 -0
  84. package/dist/esm/billing/public-pricing-catalog.shared.d.ts +30 -0
  85. package/dist/esm/billing/public-pricing-catalog.shared.d.ts.map +1 -0
  86. package/dist/esm/billing/public-pricing-catalog.shared.js +53 -0
  87. package/dist/esm/billing/public-pricing-catalog.shared.js.map +1 -0
  88. package/dist/esm/billing/referral-reward.shared.schemas.d.ts +51 -0
  89. package/dist/esm/billing/referral-reward.shared.schemas.d.ts.map +1 -0
  90. package/dist/esm/billing/referral-reward.shared.schemas.js +92 -0
  91. package/dist/esm/billing/referral-reward.shared.schemas.js.map +1 -0
  92. package/dist/esm/billing/referral.shared.resources-config.schemas.d.ts +54 -33
  93. package/dist/esm/billing/referral.shared.resources-config.schemas.d.ts.map +1 -1
  94. package/dist/esm/billing/referral.shared.resources-config.schemas.js +56 -2
  95. package/dist/esm/billing/referral.shared.resources-config.schemas.js.map +1 -1
  96. package/dist/esm/billing/referral.shared.schemas.d.ts +22 -37
  97. package/dist/esm/billing/referral.shared.schemas.d.ts.map +1 -1
  98. package/dist/esm/billing/referral.shared.schemas.js +24 -44
  99. package/dist/esm/billing/referral.shared.schemas.js.map +1 -1
  100. package/dist/esm/billing/subscription.shared.resources-config.schemas.d.ts +9 -1
  101. package/dist/esm/billing/subscription.shared.resources-config.schemas.d.ts.map +1 -1
  102. package/dist/esm/billing/subscription.shared.resources-config.schemas.js +55 -22
  103. package/dist/esm/billing/subscription.shared.resources-config.schemas.js.map +1 -1
  104. package/dist/esm/billing/subscription.shared.schemas.d.ts +80 -5
  105. package/dist/esm/billing/subscription.shared.schemas.d.ts.map +1 -1
  106. package/dist/esm/billing/subscription.shared.schemas.js +85 -25
  107. package/dist/esm/billing/subscription.shared.schemas.js.map +1 -1
  108. package/dist/esm/billing/usage-flush-evidence.shared.schemas.d.ts.map +1 -1
  109. package/dist/esm/billing/usage-flush-evidence.shared.schemas.js.map +1 -1
  110. package/dist/esm/billing/usage-record.shared.resources-config.schemas.d.ts.map +1 -1
  111. package/dist/esm/billing/usage-record.shared.resources-config.schemas.js.map +1 -1
  112. package/dist/esm/billing/usage-record.shared.schemas.d.ts.map +1 -1
  113. package/dist/esm/billing/usage-record.shared.schemas.js +5 -5
  114. package/dist/esm/billing/usage-record.shared.schemas.js.map +1 -1
  115. package/dist/esm/charts/aggregation-query.shared.schemas.d.ts.map +1 -1
  116. package/dist/esm/charts/aggregation-query.shared.schemas.js.map +1 -1
  117. package/dist/esm/charts/aggregation.shared.definitions.d.ts.map +1 -1
  118. package/dist/esm/charts/aggregation.shared.definitions.js.map +1 -1
  119. package/dist/esm/charts/chart-definition-builder.shared.d.ts.map +1 -1
  120. package/dist/esm/charts/chart-definition-builder.shared.js.map +1 -1
  121. package/dist/esm/companion/artifact-placement.shared.definitions.d.ts.map +1 -1
  122. package/dist/esm/companion/artifact-placement.shared.definitions.js.map +1 -1
  123. package/dist/esm/companion/provider-discovery.shared.schemas.d.ts +143 -2
  124. package/dist/esm/companion/provider-discovery.shared.schemas.d.ts.map +1 -1
  125. package/dist/esm/companion/provider-discovery.shared.schemas.js +84 -1
  126. package/dist/esm/companion/provider-discovery.shared.schemas.js.map +1 -1
  127. package/dist/esm/companion/shared-library-companion.shared.definitions.d.ts.map +1 -1
  128. package/dist/esm/companion/shared-library-companion.shared.definitions.js.map +1 -1
  129. package/dist/esm/companion-exports.d.ts.map +1 -1
  130. package/dist/esm/companion-exports.js.map +1 -1
  131. package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.d.ts +14 -1
  132. package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.d.ts.map +1 -1
  133. package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.js +4 -0
  134. package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.js.map +1 -1
  135. package/dist/esm/compliance/audit-trails/audit-actor.shared.schemas.d.ts +70 -0
  136. package/dist/esm/compliance/audit-trails/audit-actor.shared.schemas.d.ts.map +1 -1
  137. package/dist/esm/compliance/audit-trails/audit-actor.shared.schemas.js +87 -0
  138. package/dist/esm/compliance/audit-trails/audit-actor.shared.schemas.js.map +1 -1
  139. package/dist/esm/compliance/audit-trails/audit-export-projection.shared.schemas.d.ts +34 -0
  140. package/dist/esm/compliance/audit-trails/audit-export-projection.shared.schemas.d.ts.map +1 -1
  141. package/dist/esm/compliance/audit-trails/audit-export-projection.shared.schemas.js +137 -3
  142. package/dist/esm/compliance/audit-trails/audit-export-projection.shared.schemas.js.map +1 -1
  143. package/dist/esm/compliance/audit-trails/audit-log-sink.shared.schemas.d.ts +7 -0
  144. package/dist/esm/compliance/audit-trails/audit-log-sink.shared.schemas.d.ts.map +1 -1
  145. package/dist/esm/compliance/audit-trails/audit-log-sink.shared.schemas.js.map +1 -1
  146. package/dist/esm/compliance/audit-trails/audit-logs.shared.resources-config.schemas.d.ts +28 -2
  147. package/dist/esm/compliance/audit-trails/audit-logs.shared.resources-config.schemas.d.ts.map +1 -1
  148. package/dist/esm/compliance/audit-trails/audit-logs.shared.resources-config.schemas.js +29 -8
  149. package/dist/esm/compliance/audit-trails/audit-logs.shared.resources-config.schemas.js.map +1 -1
  150. package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.d.ts +29 -6
  151. package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.d.ts.map +1 -1
  152. package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.js +38 -9
  153. package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.js.map +1 -1
  154. package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.d.ts +1822 -146
  155. package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.d.ts.map +1 -1
  156. package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.js +1777 -87
  157. package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.js.map +1 -1
  158. package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.d.ts +10 -0
  159. package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.d.ts.map +1 -1
  160. package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.js +148 -7
  161. package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.js.map +1 -1
  162. package/dist/esm/compliance/data-classification/data-classification.shared.schemas.d.ts.map +1 -1
  163. package/dist/esm/compliance/data-classification/data-classification.shared.schemas.js.map +1 -1
  164. package/dist/esm/compliance/documents/governed-document-interactions.shared.schemas.d.ts.map +1 -1
  165. package/dist/esm/compliance/documents/governed-document-interactions.shared.schemas.js.map +1 -1
  166. package/dist/esm/compliance/documents/governed-documents.shared.schemas.d.ts.map +1 -1
  167. package/dist/esm/compliance/documents/governed-documents.shared.schemas.js.map +1 -1
  168. package/dist/esm/compliance/documents/user-governed-document-acceptances.shared.resources-config.schemas.d.ts.map +1 -1
  169. package/dist/esm/compliance/documents/user-governed-document-acceptances.shared.resources-config.schemas.js.map +1 -1
  170. package/dist/esm/compliance/documents/user-governed-document-acceptances.shared.schemas.d.ts.map +1 -1
  171. package/dist/esm/compliance/documents/user-governed-document-acceptances.shared.schemas.js.map +1 -1
  172. package/dist/esm/compliance/privacy/ai-use-posture.shared.schemas.d.ts +2 -0
  173. package/dist/esm/compliance/privacy/ai-use-posture.shared.schemas.d.ts.map +1 -1
  174. package/dist/esm/compliance/privacy/ai-use-posture.shared.schemas.js +2 -0
  175. package/dist/esm/compliance/privacy/ai-use-posture.shared.schemas.js.map +1 -1
  176. package/dist/esm/compliance/privacy/capability-consent-purposes.shared.utils.d.ts.map +1 -1
  177. package/dist/esm/compliance/privacy/capability-consent-purposes.shared.utils.js.map +1 -1
  178. package/dist/esm/compliance/privacy/client-storage.shared.schemas.d.ts.map +1 -1
  179. package/dist/esm/compliance/privacy/client-storage.shared.schemas.js.map +1 -1
  180. package/dist/esm/compliance/privacy/consent-gate-vocabulary.shared.schemas.d.ts.map +1 -1
  181. package/dist/esm/compliance/privacy/consent-gate-vocabulary.shared.schemas.js.map +1 -1
  182. package/dist/esm/compliance/privacy/consent-purposes.shared.d.ts.map +1 -1
  183. package/dist/esm/compliance/privacy/consent-purposes.shared.js.map +1 -1
  184. package/dist/esm/compliance/privacy/data-subject-rights.shared.schemas.d.ts +17 -8
  185. package/dist/esm/compliance/privacy/data-subject-rights.shared.schemas.d.ts.map +1 -1
  186. package/dist/esm/compliance/privacy/data-subject-rights.shared.schemas.js +43 -20
  187. package/dist/esm/compliance/privacy/data-subject-rights.shared.schemas.js.map +1 -1
  188. package/dist/esm/compliance/privacy/impersonalization-scrub.shared.utils.d.ts.map +1 -1
  189. package/dist/esm/compliance/privacy/impersonalization-scrub.shared.utils.js.map +1 -1
  190. package/dist/esm/compliance/privacy/impersonalization.shared.schemas.d.ts +38 -0
  191. package/dist/esm/compliance/privacy/impersonalization.shared.schemas.d.ts.map +1 -1
  192. package/dist/esm/compliance/privacy/impersonalization.shared.schemas.js +39 -0
  193. package/dist/esm/compliance/privacy/impersonalization.shared.schemas.js.map +1 -1
  194. package/dist/esm/compliance/privacy/legal-hold-subject-attribution.shared.utils.d.ts +35 -0
  195. package/dist/esm/compliance/privacy/legal-hold-subject-attribution.shared.utils.d.ts.map +1 -0
  196. package/dist/esm/compliance/privacy/legal-hold-subject-attribution.shared.utils.js +82 -0
  197. package/dist/esm/compliance/privacy/legal-hold-subject-attribution.shared.utils.js.map +1 -0
  198. package/dist/esm/compliance/privacy/legal-holds.shared.resources-config.schemas.d.ts +37 -0
  199. package/dist/esm/compliance/privacy/legal-holds.shared.resources-config.schemas.d.ts.map +1 -0
  200. package/dist/esm/compliance/privacy/legal-holds.shared.resources-config.schemas.js +223 -0
  201. package/dist/esm/compliance/privacy/legal-holds.shared.resources-config.schemas.js.map +1 -0
  202. package/dist/esm/compliance/privacy/legal-holds.shared.schemas.d.ts +222 -0
  203. package/dist/esm/compliance/privacy/legal-holds.shared.schemas.d.ts.map +1 -0
  204. package/dist/esm/compliance/privacy/legal-holds.shared.schemas.js +331 -0
  205. package/dist/esm/compliance/privacy/legal-holds.shared.schemas.js.map +1 -0
  206. package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.d.ts.map +1 -1
  207. package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.js.map +1 -1
  208. package/dist/esm/compliance/privacy/operator-compliance-identity.shared.schemas.d.ts +37 -3
  209. package/dist/esm/compliance/privacy/operator-compliance-identity.shared.schemas.d.ts.map +1 -1
  210. package/dist/esm/compliance/privacy/operator-compliance-identity.shared.schemas.js +33 -4
  211. package/dist/esm/compliance/privacy/operator-compliance-identity.shared.schemas.js.map +1 -1
  212. package/dist/esm/compliance/privacy/personal-data-category.shared.schemas.d.ts.map +1 -1
  213. package/dist/esm/compliance/privacy/personal-data-category.shared.schemas.js.map +1 -1
  214. package/dist/esm/compliance/privacy/personal-data-declaration.shared.utils.d.ts.map +1 -1
  215. package/dist/esm/compliance/privacy/personal-data-declaration.shared.utils.js.map +1 -1
  216. package/dist/esm/compliance/privacy/privacy.shared.schemas.d.ts.map +1 -1
  217. package/dist/esm/compliance/privacy/privacy.shared.schemas.js.map +1 -1
  218. package/dist/esm/compliance/privacy/provider-capability-disclosure.shared.schemas.d.ts +52 -0
  219. package/dist/esm/compliance/privacy/provider-capability-disclosure.shared.schemas.d.ts.map +1 -0
  220. package/dist/esm/compliance/privacy/provider-capability-disclosure.shared.schemas.js +116 -0
  221. package/dist/esm/compliance/privacy/provider-capability-disclosure.shared.schemas.js.map +1 -0
  222. package/dist/esm/compliance/privacy/purpose-ref.shared.schemas.d.ts +11 -0
  223. package/dist/esm/compliance/privacy/purpose-ref.shared.schemas.d.ts.map +1 -0
  224. package/dist/esm/compliance/privacy/purpose-ref.shared.schemas.js +11 -0
  225. package/dist/esm/compliance/privacy/purpose-ref.shared.schemas.js.map +1 -0
  226. package/dist/esm/compliance/privacy/redaction.shared.schemas.d.ts.map +1 -1
  227. package/dist/esm/compliance/privacy/redaction.shared.schemas.js.map +1 -1
  228. package/dist/esm/compliance/privacy/retention-binding.shared.utils.d.ts +93 -0
  229. package/dist/esm/compliance/privacy/retention-binding.shared.utils.d.ts.map +1 -0
  230. package/dist/esm/compliance/privacy/retention-binding.shared.utils.js +149 -0
  231. package/dist/esm/compliance/privacy/retention-binding.shared.utils.js.map +1 -0
  232. package/dist/esm/compliance/privacy/retention-enforcement-records.shared.resources-config.schemas.d.ts +43 -0
  233. package/dist/esm/compliance/privacy/retention-enforcement-records.shared.resources-config.schemas.d.ts.map +1 -0
  234. package/dist/esm/compliance/privacy/retention-enforcement-records.shared.resources-config.schemas.js +106 -0
  235. package/dist/esm/compliance/privacy/retention-enforcement-records.shared.resources-config.schemas.js.map +1 -0
  236. package/dist/esm/compliance/privacy/retention-enforcement-records.shared.schemas.d.ts +209 -0
  237. package/dist/esm/compliance/privacy/retention-enforcement-records.shared.schemas.d.ts.map +1 -0
  238. package/dist/esm/compliance/privacy/retention-enforcement-records.shared.schemas.js +226 -0
  239. package/dist/esm/compliance/privacy/retention-enforcement-records.shared.schemas.js.map +1 -0
  240. package/dist/esm/compliance/privacy/retention-schedule.shared.schemas.d.ts +129 -5
  241. package/dist/esm/compliance/privacy/retention-schedule.shared.schemas.d.ts.map +1 -1
  242. package/dist/esm/compliance/privacy/retention-schedule.shared.schemas.js +128 -4
  243. package/dist/esm/compliance/privacy/retention-schedule.shared.schemas.js.map +1 -1
  244. package/dist/esm/compliance/privacy/retention-scope-deleted.shared.utils.d.ts +53 -0
  245. package/dist/esm/compliance/privacy/retention-scope-deleted.shared.utils.d.ts.map +1 -0
  246. package/dist/esm/compliance/privacy/retention-scope-deleted.shared.utils.js +74 -0
  247. package/dist/esm/compliance/privacy/retention-scope-deleted.shared.utils.js.map +1 -0
  248. package/dist/esm/compliance/privacy/sharing.shared.schemas.d.ts.map +1 -1
  249. package/dist/esm/compliance/privacy/sharing.shared.schemas.js.map +1 -1
  250. package/dist/esm/compliance/privacy/subject-data-recipients.shared.schemas.d.ts +311 -0
  251. package/dist/esm/compliance/privacy/subject-data-recipients.shared.schemas.d.ts.map +1 -0
  252. package/dist/esm/compliance/privacy/subject-data-recipients.shared.schemas.js +355 -0
  253. package/dist/esm/compliance/privacy/subject-data-recipients.shared.schemas.js.map +1 -0
  254. package/dist/esm/compliance/privacy/subject-erasure-lane-evidence.shared.schemas.d.ts.map +1 -1
  255. package/dist/esm/compliance/privacy/subject-erasure-lane-evidence.shared.schemas.js.map +1 -1
  256. package/dist/esm/compliance/privacy/subject-erasure.shared.schemas.d.ts +178 -39
  257. package/dist/esm/compliance/privacy/subject-erasure.shared.schemas.d.ts.map +1 -1
  258. package/dist/esm/compliance/privacy/subject-erasure.shared.schemas.js +145 -35
  259. package/dist/esm/compliance/privacy/subject-erasure.shared.schemas.js.map +1 -1
  260. package/dist/esm/compliance/privacy/subject-export-render.shared.utils.d.ts.map +1 -1
  261. package/dist/esm/compliance/privacy/subject-export-render.shared.utils.js +26 -0
  262. package/dist/esm/compliance/privacy/subject-export-render.shared.utils.js.map +1 -1
  263. package/dist/esm/compliance/privacy/subject-export.shared.schemas.d.ts +9 -0
  264. package/dist/esm/compliance/privacy/subject-export.shared.schemas.d.ts.map +1 -1
  265. package/dist/esm/compliance/privacy/subject-export.shared.schemas.js.map +1 -1
  266. package/dist/esm/compliance/review-cadence.shared.schemas.d.ts.map +1 -1
  267. package/dist/esm/compliance/review-cadence.shared.schemas.js.map +1 -1
  268. package/dist/esm/compliance/risk-posture.shared.schemas.d.ts.map +1 -1
  269. package/dist/esm/compliance/risk-posture.shared.schemas.js.map +1 -1
  270. package/dist/esm/config/analytics-value-moments.shared.schemas.d.ts.map +1 -1
  271. package/dist/esm/config/analytics-value-moments.shared.schemas.js.map +1 -1
  272. package/dist/esm/config/app-configuration-shared.shared.schemas.d.ts +109 -1
  273. package/dist/esm/config/app-configuration-shared.shared.schemas.d.ts.map +1 -1
  274. package/dist/esm/config/app-configuration-shared.shared.schemas.js +57 -0
  275. package/dist/esm/config/app-configuration-shared.shared.schemas.js.map +1 -1
  276. package/dist/esm/config/app-frontend-type.shared.schemas.d.ts.map +1 -1
  277. package/dist/esm/config/app-frontend-type.shared.schemas.js.map +1 -1
  278. package/dist/esm/config/auth-config-resolution.shared.utils.d.ts.map +1 -1
  279. package/dist/esm/config/auth-config-resolution.shared.utils.js.map +1 -1
  280. package/dist/esm/config/brand-assets.shared.schemas.d.ts.map +1 -1
  281. package/dist/esm/config/brand-assets.shared.schemas.js.map +1 -1
  282. package/dist/esm/config/configuration-validation.shared.schemas.d.ts.map +1 -1
  283. package/dist/esm/config/configuration-validation.shared.schemas.js.map +1 -1
  284. package/dist/esm/config/entity-identity-config.shared.schemas.d.ts +69 -0
  285. package/dist/esm/config/entity-identity-config.shared.schemas.d.ts.map +1 -1
  286. package/dist/esm/config/entity-identity-config.shared.schemas.js +93 -0
  287. package/dist/esm/config/entity-identity-config.shared.schemas.js.map +1 -1
  288. package/dist/esm/config/frontend/chart-definition.shared.schemas.d.ts +16 -16
  289. package/dist/esm/config/frontend/chart-definition.shared.schemas.d.ts.map +1 -1
  290. package/dist/esm/config/frontend/chart-definition.shared.schemas.js.map +1 -1
  291. package/dist/esm/config/frontend/chart-registration-alignment.shared.d.ts.map +1 -1
  292. package/dist/esm/config/frontend/chart-registration-alignment.shared.js.map +1 -1
  293. package/dist/esm/config/frontend/navigation.shared.schemas.d.ts +160 -61
  294. package/dist/esm/config/frontend/navigation.shared.schemas.d.ts.map +1 -1
  295. package/dist/esm/config/frontend/navigation.shared.schemas.js +297 -65
  296. package/dist/esm/config/frontend/navigation.shared.schemas.js.map +1 -1
  297. package/dist/esm/config/frontend/onboarding.shared.schemas.d.ts.map +1 -1
  298. package/dist/esm/config/frontend/onboarding.shared.schemas.js.map +1 -1
  299. package/dist/esm/config/postgresql.shared.schemas.d.ts.map +1 -1
  300. package/dist/esm/config/postgresql.shared.schemas.js.map +1 -1
  301. package/dist/esm/config/registration-acquisition-policy.shared.utils.d.ts.map +1 -1
  302. package/dist/esm/config/registration-acquisition-policy.shared.utils.js.map +1 -1
  303. package/dist/esm/config-authoring.entry.d.ts.map +1 -1
  304. package/dist/esm/config-authoring.entry.js.map +1 -1
  305. package/dist/esm/crdt/crdt-merge.shared.utils.d.ts.map +1 -1
  306. package/dist/esm/crdt/crdt-merge.shared.utils.js.map +1 -1
  307. package/dist/esm/data-seeding/data-seeding-config.shared.schemas.d.ts.map +1 -1
  308. package/dist/esm/data-seeding/data-seeding-config.shared.schemas.js.map +1 -1
  309. package/dist/esm/errors/caught-error-description.shared.utils.d.ts +69 -0
  310. package/dist/esm/errors/caught-error-description.shared.utils.d.ts.map +1 -0
  311. package/dist/esm/errors/caught-error-description.shared.utils.js +77 -0
  312. package/dist/esm/errors/caught-error-description.shared.utils.js.map +1 -0
  313. package/dist/esm/errors/errors.custom-message-ref.shared.definitions.d.ts +76 -3
  314. package/dist/esm/errors/errors.custom-message-ref.shared.definitions.d.ts.map +1 -1
  315. package/dist/esm/errors/errors.custom-message-ref.shared.definitions.js +76 -2
  316. package/dist/esm/errors/errors.custom-message-ref.shared.definitions.js.map +1 -1
  317. package/dist/esm/errors/errors.shared.definitions.d.ts.map +1 -1
  318. package/dist/esm/errors/errors.shared.definitions.js.map +1 -1
  319. package/dist/esm/errors/errors.shared.schemas.d.ts +20 -1
  320. package/dist/esm/errors/errors.shared.schemas.d.ts.map +1 -1
  321. package/dist/esm/errors/errors.shared.schemas.js +16 -9
  322. package/dist/esm/errors/errors.shared.schemas.js.map +1 -1
  323. package/dist/esm/errors/errors.shared.utils.d.ts +0 -24
  324. package/dist/esm/errors/errors.shared.utils.d.ts.map +1 -1
  325. package/dist/esm/errors/errors.shared.utils.js +0 -39
  326. package/dist/esm/errors/errors.shared.utils.js.map +1 -1
  327. package/dist/esm/errors/resource-access-forbidden.shared.error.d.ts.map +1 -1
  328. package/dist/esm/errors/resource-access-forbidden.shared.error.js.map +1 -1
  329. package/dist/esm/errors/thrown-value-description.shared.utils.d.ts +6 -7
  330. package/dist/esm/errors/thrown-value-description.shared.utils.d.ts.map +1 -1
  331. package/dist/esm/errors/thrown-value-description.shared.utils.js +6 -7
  332. package/dist/esm/errors/thrown-value-description.shared.utils.js.map +1 -1
  333. package/dist/esm/errors/zod-issue-formatting.shared.utils.d.ts.map +1 -1
  334. package/dist/esm/errors/zod-issue-formatting.shared.utils.js.map +1 -1
  335. package/dist/esm/exports/tabular-csv.shared.utils.d.ts.map +1 -1
  336. package/dist/esm/exports/tabular-csv.shared.utils.js.map +1 -1
  337. package/dist/esm/external-data/external-data-pipeline-description.shared.d.ts +70 -0
  338. package/dist/esm/external-data/external-data-pipeline-description.shared.d.ts.map +1 -0
  339. package/dist/esm/external-data/external-data-pipeline-description.shared.js +92 -0
  340. package/dist/esm/external-data/external-data-pipeline-description.shared.js.map +1 -0
  341. package/dist/esm/external-data/external-data-pipeline-pass-mode.shared.d.ts +154 -0
  342. package/dist/esm/external-data/external-data-pipeline-pass-mode.shared.d.ts.map +1 -0
  343. package/dist/esm/external-data/external-data-pipeline-pass-mode.shared.js +161 -0
  344. package/dist/esm/external-data/external-data-pipeline-pass-mode.shared.js.map +1 -0
  345. package/dist/esm/external-data/external-data-pipeline.shared.schemas.d.ts +1071 -23
  346. package/dist/esm/external-data/external-data-pipeline.shared.schemas.d.ts.map +1 -1
  347. package/dist/esm/external-data/external-data-pipeline.shared.schemas.js +1065 -17
  348. package/dist/esm/external-data/external-data-pipeline.shared.schemas.js.map +1 -1
  349. package/dist/esm/external-data/external-data-provenance.shared.d.ts +71 -0
  350. package/dist/esm/external-data/external-data-provenance.shared.d.ts.map +1 -0
  351. package/dist/esm/external-data/external-data-provenance.shared.js +88 -0
  352. package/dist/esm/external-data/external-data-provenance.shared.js.map +1 -0
  353. package/dist/esm/external-data.exports.d.ts +5 -0
  354. package/dist/esm/external-data.exports.d.ts.map +1 -1
  355. package/dist/esm/external-data.exports.js +11 -0
  356. package/dist/esm/external-data.exports.js.map +1 -1
  357. package/dist/esm/external-providers/compose-provider-registry.shared.d.ts.map +1 -1
  358. package/dist/esm/external-providers/compose-provider-registry.shared.js.map +1 -1
  359. package/dist/esm/external-providers/engine-capabilities.shared.schemas.d.ts +17 -2
  360. package/dist/esm/external-providers/engine-capabilities.shared.schemas.d.ts.map +1 -1
  361. package/dist/esm/external-providers/engine-capabilities.shared.schemas.js +22 -4
  362. package/dist/esm/external-providers/engine-capabilities.shared.schemas.js.map +1 -1
  363. package/dist/esm/external-providers/engine-capability-resolution-mode.shared.d.ts.map +1 -1
  364. package/dist/esm/external-providers/engine-capability-resolution-mode.shared.js +3 -0
  365. package/dist/esm/external-providers/engine-capability-resolution-mode.shared.js.map +1 -1
  366. package/dist/esm/external-providers/engine-capability-surface.shared.d.ts.map +1 -1
  367. package/dist/esm/external-providers/engine-capability-surface.shared.js +2 -0
  368. package/dist/esm/external-providers/engine-capability-surface.shared.js.map +1 -1
  369. package/dist/esm/external-providers/external-providers.shared.schemas.d.ts.map +1 -1
  370. package/dist/esm/external-providers/external-providers.shared.schemas.js.map +1 -1
  371. package/dist/esm/external-providers/frontend-bootstrap.shared.schemas.d.ts +152 -1
  372. package/dist/esm/external-providers/frontend-bootstrap.shared.schemas.d.ts.map +1 -1
  373. package/dist/esm/external-providers/frontend-bootstrap.shared.schemas.js.map +1 -1
  374. package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.d.ts +4 -3
  375. package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.d.ts.map +1 -1
  376. package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.js +4 -3
  377. package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.js.map +1 -1
  378. package/dist/esm/external-providers/frontend-capability-runtime.shared.types.d.ts +45 -0
  379. package/dist/esm/external-providers/frontend-capability-runtime.shared.types.d.ts.map +1 -1
  380. package/dist/esm/external-providers/frontend-capability-runtime.shared.types.js +14 -0
  381. package/dist/esm/external-providers/frontend-capability-runtime.shared.types.js.map +1 -1
  382. package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.d.ts +188 -4
  383. package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.d.ts.map +1 -1
  384. package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.js +76 -9
  385. package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.js.map +1 -1
  386. package/dist/esm/external-providers/frontend-provider-public-config.shared.d.ts +175 -33
  387. package/dist/esm/external-providers/frontend-provider-public-config.shared.d.ts.map +1 -1
  388. package/dist/esm/external-providers/frontend-provider-public-config.shared.js +247 -42
  389. package/dist/esm/external-providers/frontend-provider-public-config.shared.js.map +1 -1
  390. package/dist/esm/external-providers/model-cost-accounting-config.shared.schemas.d.ts +53 -0
  391. package/dist/esm/external-providers/model-cost-accounting-config.shared.schemas.d.ts.map +1 -0
  392. package/dist/esm/external-providers/model-cost-accounting-config.shared.schemas.js +41 -0
  393. package/dist/esm/external-providers/model-cost-accounting-config.shared.schemas.js.map +1 -0
  394. package/dist/esm/external-providers/provider-address-lookup-contract.shared.types.d.ts +150 -0
  395. package/dist/esm/external-providers/provider-address-lookup-contract.shared.types.d.ts.map +1 -0
  396. package/dist/esm/external-providers/provider-address-lookup-contract.shared.types.js +22 -0
  397. package/dist/esm/external-providers/provider-address-lookup-contract.shared.types.js.map +1 -0
  398. package/dist/esm/external-providers/provider-augmentation-opt-ins.shared.schemas.d.ts +42 -0
  399. package/dist/esm/external-providers/provider-augmentation-opt-ins.shared.schemas.d.ts.map +1 -0
  400. package/dist/esm/external-providers/provider-augmentation-opt-ins.shared.schemas.js +49 -0
  401. package/dist/esm/external-providers/provider-augmentation-opt-ins.shared.schemas.js.map +1 -0
  402. package/dist/esm/external-providers/provider-authentication-assurance.shared.schemas.d.ts.map +1 -1
  403. package/dist/esm/external-providers/provider-authentication-assurance.shared.schemas.js.map +1 -1
  404. package/dist/esm/external-providers/provider-browser-operations.shared.schemas.d.ts +53 -0
  405. package/dist/esm/external-providers/provider-browser-operations.shared.schemas.d.ts.map +1 -1
  406. package/dist/esm/external-providers/provider-browser-operations.shared.schemas.js +56 -0
  407. package/dist/esm/external-providers/provider-browser-operations.shared.schemas.js.map +1 -1
  408. package/dist/esm/external-providers/provider-capability.shared.schemas.d.ts +34 -0
  409. package/dist/esm/external-providers/provider-capability.shared.schemas.d.ts.map +1 -1
  410. package/dist/esm/external-providers/provider-capability.shared.schemas.js +34 -0
  411. package/dist/esm/external-providers/provider-capability.shared.schemas.js.map +1 -1
  412. package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.d.ts +341 -4
  413. package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.d.ts.map +1 -1
  414. package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.js +270 -20
  415. package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.js.map +1 -1
  416. package/dist/esm/external-providers/provider-frontend-component-contract.shared.types.d.ts +6 -2
  417. package/dist/esm/external-providers/provider-frontend-component-contract.shared.types.d.ts.map +1 -1
  418. package/dist/esm/external-providers/provider-frontend-component-contract.shared.types.js +6 -2
  419. package/dist/esm/external-providers/provider-frontend-component-contract.shared.types.js.map +1 -1
  420. package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.d.ts +174 -1
  421. package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.d.ts.map +1 -1
  422. package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.js +125 -0
  423. package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.js.map +1 -1
  424. package/dist/esm/external-providers/provider-metadata.shared.schemas.d.ts +3 -3
  425. package/dist/esm/external-providers/provider-metadata.shared.schemas.d.ts.map +1 -1
  426. package/dist/esm/external-providers/provider-metadata.shared.schemas.js.map +1 -1
  427. package/dist/esm/external-providers/provider-package-allow-list.shared.schemas.d.ts +42 -0
  428. package/dist/esm/external-providers/provider-package-allow-list.shared.schemas.d.ts.map +1 -0
  429. package/dist/esm/external-providers/provider-package-allow-list.shared.schemas.js +57 -0
  430. package/dist/esm/external-providers/provider-package-allow-list.shared.schemas.js.map +1 -0
  431. package/dist/esm/external-providers/provider-protocol.shared.schemas.d.ts +6 -0
  432. package/dist/esm/external-providers/provider-protocol.shared.schemas.d.ts.map +1 -1
  433. package/dist/esm/external-providers/provider-protocol.shared.schemas.js +6 -0
  434. package/dist/esm/external-providers/provider-protocol.shared.schemas.js.map +1 -1
  435. package/dist/esm/external-providers/provider-scope-reauthorization.shared.schemas.d.ts +58 -0
  436. package/dist/esm/external-providers/provider-scope-reauthorization.shared.schemas.d.ts.map +1 -0
  437. package/dist/esm/external-providers/provider-scope-reauthorization.shared.schemas.js +35 -0
  438. package/dist/esm/external-providers/provider-scope-reauthorization.shared.schemas.js.map +1 -0
  439. package/dist/esm/external-providers/provider-shared-connections.shared.schemas.d.ts +115 -0
  440. package/dist/esm/external-providers/provider-shared-connections.shared.schemas.d.ts.map +1 -0
  441. package/dist/esm/external-providers/provider-shared-connections.shared.schemas.js +137 -0
  442. package/dist/esm/external-providers/provider-shared-connections.shared.schemas.js.map +1 -0
  443. package/dist/esm/external-providers/provider-tier-rule.shared.utils.d.ts.map +1 -1
  444. package/dist/esm/external-providers/provider-tier-rule.shared.utils.js.map +1 -1
  445. package/dist/esm/external-providers/provider-usage-cost.shared.d.ts +73 -0
  446. package/dist/esm/external-providers/provider-usage-cost.shared.d.ts.map +1 -0
  447. package/dist/esm/external-providers/provider-usage-cost.shared.js +171 -0
  448. package/dist/esm/external-providers/provider-usage-cost.shared.js.map +1 -0
  449. package/dist/esm/external-providers/provider-usage-pricing.example.d.ts +12 -0
  450. package/dist/esm/external-providers/provider-usage-pricing.example.d.ts.map +1 -0
  451. package/dist/esm/external-providers/provider-usage-pricing.example.js +40 -0
  452. package/dist/esm/external-providers/provider-usage-pricing.example.js.map +1 -0
  453. package/dist/esm/external-providers/provider-usage-pricing.shared.schemas.d.ts +68 -32
  454. package/dist/esm/external-providers/provider-usage-pricing.shared.schemas.d.ts.map +1 -1
  455. package/dist/esm/external-providers/provider-usage-pricing.shared.schemas.js +63 -52
  456. package/dist/esm/external-providers/provider-usage-pricing.shared.schemas.js.map +1 -1
  457. package/dist/esm/features/application-features.shared.resources-config.schemas.d.ts +5 -5
  458. package/dist/esm/features/application-features.shared.resources-config.schemas.d.ts.map +1 -1
  459. package/dist/esm/features/application-features.shared.resources-config.schemas.js +13 -5
  460. package/dist/esm/features/application-features.shared.resources-config.schemas.js.map +1 -1
  461. package/dist/esm/features/connected-feature.example.d.ts.map +1 -1
  462. package/dist/esm/features/connected-feature.example.js +2 -1
  463. package/dist/esm/features/connected-feature.example.js.map +1 -1
  464. package/dist/esm/features/core-feature-definitions.shared.d.ts.map +1 -1
  465. package/dist/esm/features/core-feature-definitions.shared.js +2 -1
  466. package/dist/esm/features/core-feature-definitions.shared.js.map +1 -1
  467. package/dist/esm/features/feature-builders.shared.d.ts.map +1 -1
  468. package/dist/esm/features/feature-builders.shared.js.map +1 -1
  469. package/dist/esm/features/feature-definition.shared.schemas.d.ts +2 -11
  470. package/dist/esm/features/feature-definition.shared.schemas.d.ts.map +1 -1
  471. package/dist/esm/features/feature-definition.shared.schemas.js +0 -12
  472. package/dist/esm/features/feature-definition.shared.schemas.js.map +1 -1
  473. package/dist/esm/features/feature-registry.shared.d.ts.map +1 -1
  474. package/dist/esm/features/feature-registry.shared.js.map +1 -1
  475. package/dist/esm/features/feature-resolution.shared.schemas.d.ts.map +1 -1
  476. package/dist/esm/features/feature-resolution.shared.schemas.js.map +1 -1
  477. package/dist/esm/features/scope-features.shared.schemas.d.ts +31 -17
  478. package/dist/esm/features/scope-features.shared.schemas.d.ts.map +1 -1
  479. package/dist/esm/features/scope-features.shared.schemas.js +27 -5
  480. package/dist/esm/features/scope-features.shared.schemas.js.map +1 -1
  481. package/dist/esm/features/user-features.shared.resources-config.schemas.d.ts +5 -5
  482. package/dist/esm/features/user-features.shared.resources-config.schemas.d.ts.map +1 -1
  483. package/dist/esm/features/user-features.shared.resources-config.schemas.js.map +1 -1
  484. package/dist/esm/files/file-remote-reference-link.shared.schemas.d.ts.map +1 -1
  485. package/dist/esm/files/file-remote-reference-link.shared.schemas.js.map +1 -1
  486. package/dist/esm/files/file-upload-grant.shared.schemas.d.ts.map +1 -1
  487. package/dist/esm/files/file-upload-grant.shared.schemas.js.map +1 -1
  488. package/dist/esm/files/files.shared.resources-config.schemas.d.ts.map +1 -1
  489. package/dist/esm/files/files.shared.resources-config.schemas.js.map +1 -1
  490. package/dist/esm/files/files.shared.schemas.d.ts.map +1 -1
  491. package/dist/esm/files/files.shared.schemas.js.map +1 -1
  492. package/dist/esm/files/files.shared.utils.d.ts.map +1 -1
  493. package/dist/esm/files/files.shared.utils.js.map +1 -1
  494. package/dist/esm/flows-actors/a2a-push-delivery-log.shared.resources-config.schemas.d.ts.map +1 -1
  495. package/dist/esm/flows-actors/a2a-push-delivery-log.shared.resources-config.schemas.js.map +1 -1
  496. package/dist/esm/flows-actors/a2a-push-delivery-log.shared.schemas.d.ts.map +1 -1
  497. package/dist/esm/flows-actors/a2a-push-delivery-log.shared.schemas.js.map +1 -1
  498. package/dist/esm/flows-actors/a2a-token-budget-state.shared.resources-config.schemas.d.ts.map +1 -1
  499. package/dist/esm/flows-actors/a2a-token-budget-state.shared.resources-config.schemas.js.map +1 -1
  500. package/dist/esm/flows-actors/a2a-token-budget-state.shared.schemas.d.ts.map +1 -1
  501. package/dist/esm/flows-actors/a2a-token-budget-state.shared.schemas.js.map +1 -1
  502. package/dist/esm/flows-actors/actors.shared.schemas.d.ts +127 -11
  503. package/dist/esm/flows-actors/actors.shared.schemas.d.ts.map +1 -1
  504. package/dist/esm/flows-actors/actors.shared.schemas.js +32 -1
  505. package/dist/esm/flows-actors/actors.shared.schemas.js.map +1 -1
  506. package/dist/esm/flows-actors/agent-traceability.shared.schemas.d.ts +16 -0
  507. package/dist/esm/flows-actors/agent-traceability.shared.schemas.d.ts.map +1 -1
  508. package/dist/esm/flows-actors/agent-traceability.shared.schemas.js +7 -0
  509. package/dist/esm/flows-actors/agent-traceability.shared.schemas.js.map +1 -1
  510. package/dist/esm/flows-actors/agent-work-decisions.shared.resources-config.schemas.d.ts +68 -0
  511. package/dist/esm/flows-actors/agent-work-decisions.shared.resources-config.schemas.d.ts.map +1 -0
  512. package/dist/esm/flows-actors/agent-work-decisions.shared.resources-config.schemas.js +276 -0
  513. package/dist/esm/flows-actors/agent-work-decisions.shared.resources-config.schemas.js.map +1 -0
  514. package/dist/esm/flows-actors/agent-work-decisions.shared.schemas.d.ts +468 -0
  515. package/dist/esm/flows-actors/agent-work-decisions.shared.schemas.d.ts.map +1 -0
  516. package/dist/esm/flows-actors/agent-work-decisions.shared.schemas.js +472 -0
  517. package/dist/esm/flows-actors/agent-work-decisions.shared.schemas.js.map +1 -0
  518. package/dist/esm/flows-actors/agents.shared.schemas.d.ts +2 -2
  519. package/dist/esm/flows-actors/agents.shared.schemas.d.ts.map +1 -1
  520. package/dist/esm/flows-actors/agents.shared.schemas.js.map +1 -1
  521. package/dist/esm/flows-actors/autonomous-agents.shared.schemas.d.ts +118 -0
  522. package/dist/esm/flows-actors/autonomous-agents.shared.schemas.d.ts.map +1 -0
  523. package/dist/esm/flows-actors/autonomous-agents.shared.schemas.js +144 -0
  524. package/dist/esm/flows-actors/autonomous-agents.shared.schemas.js.map +1 -0
  525. package/dist/esm/flows-actors/deliberation.shared.schemas.d.ts.map +1 -1
  526. package/dist/esm/flows-actors/deliberation.shared.schemas.js.map +1 -1
  527. package/dist/esm/flows-actors/execution-plan-readiness.shared.utils.d.ts.map +1 -1
  528. package/dist/esm/flows-actors/execution-plan-readiness.shared.utils.js.map +1 -1
  529. package/dist/esm/flows-actors/flows-actors-execution.shared.resources-config.schemas.d.ts.map +1 -1
  530. package/dist/esm/flows-actors/flows-actors-execution.shared.resources-config.schemas.js.map +1 -1
  531. package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.d.ts +142 -8
  532. package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.d.ts.map +1 -1
  533. package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.js +209 -11
  534. package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.js.map +1 -1
  535. package/dist/esm/flows-actors/flows-actors-task.shared.resources-config.schemas.d.ts.map +1 -1
  536. package/dist/esm/flows-actors/flows-actors-task.shared.resources-config.schemas.js.map +1 -1
  537. package/dist/esm/flows-actors/flows-actors-task.shared.schemas.d.ts.map +1 -1
  538. package/dist/esm/flows-actors/flows-actors-task.shared.schemas.js.map +1 -1
  539. package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.d.ts +37 -2
  540. package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.d.ts.map +1 -1
  541. package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.js +30 -2
  542. package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.js.map +1 -1
  543. package/dist/esm/flows-actors/flows-actors.configuration.shared.schemas.d.ts +0 -11
  544. package/dist/esm/flows-actors/flows-actors.configuration.shared.schemas.d.ts.map +1 -1
  545. package/dist/esm/flows-actors/flows-actors.configuration.shared.schemas.js +12 -5
  546. package/dist/esm/flows-actors/flows-actors.configuration.shared.schemas.js.map +1 -1
  547. package/dist/esm/flows-actors/flows-actors.frontend.shared.schemas.d.ts +45 -6
  548. package/dist/esm/flows-actors/flows-actors.frontend.shared.schemas.d.ts.map +1 -1
  549. package/dist/esm/flows-actors/flows-actors.frontend.shared.schemas.js +31 -5
  550. package/dist/esm/flows-actors/flows-actors.frontend.shared.schemas.js.map +1 -1
  551. package/dist/esm/flows-actors/flows-actors.io.shared.schemas.d.ts.map +1 -1
  552. package/dist/esm/flows-actors/flows-actors.io.shared.schemas.js +30 -30
  553. package/dist/esm/flows-actors/flows-actors.io.shared.schemas.js.map +1 -1
  554. package/dist/esm/flows-actors/flows-actors.system.shared.definitions.d.ts.map +1 -1
  555. package/dist/esm/flows-actors/flows-actors.system.shared.definitions.js.map +1 -1
  556. package/dist/esm/flows-actors/flows-actors.system.shared.schemas.d.ts +15 -7
  557. package/dist/esm/flows-actors/flows-actors.system.shared.schemas.d.ts.map +1 -1
  558. package/dist/esm/flows-actors/flows-actors.system.shared.schemas.js.map +1 -1
  559. package/dist/esm/flows-actors/flows.shared.schemas.d.ts +15 -0
  560. package/dist/esm/flows-actors/flows.shared.schemas.d.ts.map +1 -1
  561. package/dist/esm/flows-actors/flows.shared.schemas.js.map +1 -1
  562. package/dist/esm/flows-actors/human-decision.shared.schemas.d.ts +506 -0
  563. package/dist/esm/flows-actors/human-decision.shared.schemas.d.ts.map +1 -1
  564. package/dist/esm/flows-actors/human-decision.shared.schemas.js +502 -0
  565. package/dist/esm/flows-actors/human-decision.shared.schemas.js.map +1 -1
  566. package/dist/esm/flows-actors/mcp-servers.shared.schemas.d.ts.map +1 -1
  567. package/dist/esm/flows-actors/mcp-servers.shared.schemas.js.map +1 -1
  568. package/dist/esm/flows-actors/model-call-attributions.shared.resources-config.schemas.d.ts +46 -0
  569. package/dist/esm/flows-actors/model-call-attributions.shared.resources-config.schemas.d.ts.map +1 -0
  570. package/dist/esm/flows-actors/model-call-attributions.shared.resources-config.schemas.js +65 -0
  571. package/dist/esm/flows-actors/model-call-attributions.shared.resources-config.schemas.js.map +1 -0
  572. package/dist/esm/flows-actors/model-call-attributions.shared.schemas.d.ts +120 -0
  573. package/dist/esm/flows-actors/model-call-attributions.shared.schemas.d.ts.map +1 -0
  574. package/dist/esm/flows-actors/model-call-attributions.shared.schemas.js +165 -0
  575. package/dist/esm/flows-actors/model-call-attributions.shared.schemas.js.map +1 -0
  576. package/dist/esm/flows-actors/model-cost-period-aggregates.shared.resources-config.schemas.d.ts +45 -0
  577. package/dist/esm/flows-actors/model-cost-period-aggregates.shared.resources-config.schemas.d.ts.map +1 -0
  578. package/dist/esm/flows-actors/model-cost-period-aggregates.shared.resources-config.schemas.js +127 -0
  579. package/dist/esm/flows-actors/model-cost-period-aggregates.shared.resources-config.schemas.js.map +1 -0
  580. package/dist/esm/flows-actors/model-cost-period-aggregates.shared.schemas.d.ts +83 -0
  581. package/dist/esm/flows-actors/model-cost-period-aggregates.shared.schemas.d.ts.map +1 -0
  582. package/dist/esm/flows-actors/model-cost-period-aggregates.shared.schemas.js +97 -0
  583. package/dist/esm/flows-actors/model-cost-period-aggregates.shared.schemas.js.map +1 -0
  584. package/dist/esm/flows-actors/model-cost-summary.shared.schemas.d.ts +136 -0
  585. package/dist/esm/flows-actors/model-cost-summary.shared.schemas.d.ts.map +1 -0
  586. package/dist/esm/flows-actors/model-cost-summary.shared.schemas.js +90 -0
  587. package/dist/esm/flows-actors/model-cost-summary.shared.schemas.js.map +1 -0
  588. package/dist/esm/flows-actors/prompt-ir.shared.schemas.d.ts.map +1 -1
  589. package/dist/esm/flows-actors/prompt-ir.shared.schemas.js.map +1 -1
  590. package/dist/esm/flows-actors/provider-call-records.shared.resources-config.schemas.d.ts +5 -1
  591. package/dist/esm/flows-actors/provider-call-records.shared.resources-config.schemas.d.ts.map +1 -1
  592. package/dist/esm/flows-actors/provider-call-records.shared.resources-config.schemas.js +19 -4
  593. package/dist/esm/flows-actors/provider-call-records.shared.resources-config.schemas.js.map +1 -1
  594. package/dist/esm/flows-actors/provider-call-records.shared.schemas.d.ts +13 -15
  595. package/dist/esm/flows-actors/provider-call-records.shared.schemas.d.ts.map +1 -1
  596. package/dist/esm/flows-actors/provider-call-records.shared.schemas.js +30 -17
  597. package/dist/esm/flows-actors/provider-call-records.shared.schemas.js.map +1 -1
  598. package/dist/esm/flows-actors/review-deadlines.shared.schemas.d.ts +268 -0
  599. package/dist/esm/flows-actors/review-deadlines.shared.schemas.d.ts.map +1 -0
  600. package/dist/esm/flows-actors/review-deadlines.shared.schemas.js +576 -0
  601. package/dist/esm/flows-actors/review-deadlines.shared.schemas.js.map +1 -0
  602. package/dist/esm/flows-actors/tasks.actors.shared.schemas.d.ts +30 -0
  603. package/dist/esm/flows-actors/tasks.actors.shared.schemas.d.ts.map +1 -1
  604. package/dist/esm/flows-actors/tasks.actors.shared.schemas.js.map +1 -1
  605. package/dist/esm/flows-actors/work-attribution.shared.schemas.d.ts +129 -0
  606. package/dist/esm/flows-actors/work-attribution.shared.schemas.d.ts.map +1 -0
  607. package/dist/esm/flows-actors/work-attribution.shared.schemas.js +141 -0
  608. package/dist/esm/flows-actors/work-attribution.shared.schemas.js.map +1 -0
  609. package/dist/esm/frontend-definitions/frontend-notification-custom-message-ref.definitions.d.ts +22 -1
  610. package/dist/esm/frontend-definitions/frontend-notification-custom-message-ref.definitions.d.ts.map +1 -1
  611. package/dist/esm/frontend-definitions/frontend-notification-custom-message-ref.definitions.js +23 -0
  612. package/dist/esm/frontend-definitions/frontend-notification-custom-message-ref.definitions.js.map +1 -1
  613. package/dist/esm/frontend-definitions/settings-destination-ref.definitions.d.ts +61 -0
  614. package/dist/esm/frontend-definitions/settings-destination-ref.definitions.d.ts.map +1 -1
  615. package/dist/esm/frontend-definitions/settings-destination-ref.definitions.js +61 -0
  616. package/dist/esm/frontend-definitions/settings-destination-ref.definitions.js.map +1 -1
  617. package/dist/esm/guidance/guidance-flow.shared.schemas.d.ts.map +1 -1
  618. package/dist/esm/guidance/guidance-flow.shared.schemas.js.map +1 -1
  619. package/dist/esm/guidance/guidance-state.shared.resources-config.schemas.d.ts.map +1 -1
  620. package/dist/esm/guidance/guidance-state.shared.resources-config.schemas.js.map +1 -1
  621. package/dist/esm/guidance/guidance-state.shared.schemas.d.ts.map +1 -1
  622. package/dist/esm/guidance/guidance-state.shared.schemas.js +11 -10
  623. package/dist/esm/guidance/guidance-state.shared.schemas.js.map +1 -1
  624. package/dist/esm/guidance/guidance-state.shared.utils.d.ts.map +1 -1
  625. package/dist/esm/guidance/guidance-state.shared.utils.js.map +1 -1
  626. package/dist/esm/guidance/lifecycle-config.shared.schemas.d.ts.map +1 -1
  627. package/dist/esm/guidance/lifecycle-config.shared.schemas.js.map +1 -1
  628. package/dist/esm/guidance/lifecycle-state.shared.resources-config.schemas.d.ts.map +1 -1
  629. package/dist/esm/guidance/lifecycle-state.shared.resources-config.schemas.js.map +1 -1
  630. package/dist/esm/guidance/lifecycle-state.shared.schemas.d.ts.map +1 -1
  631. package/dist/esm/guidance/lifecycle-state.shared.schemas.js +6 -6
  632. package/dist/esm/guidance/lifecycle-state.shared.schemas.js.map +1 -1
  633. package/dist/esm/guidance/milestone-builders.shared.d.ts.map +1 -1
  634. package/dist/esm/guidance/milestone-builders.shared.js.map +1 -1
  635. package/dist/esm/guidance/milestone-definition.shared.schemas.d.ts.map +1 -1
  636. package/dist/esm/guidance/milestone-definition.shared.schemas.js.map +1 -1
  637. package/dist/esm/guidance/progression-presentation.shared.schemas.d.ts.map +1 -1
  638. package/dist/esm/guidance/progression-presentation.shared.schemas.js.map +1 -1
  639. package/dist/esm/guidance/progression-state.shared.resources-config.schemas.d.ts.map +1 -1
  640. package/dist/esm/guidance/progression-state.shared.resources-config.schemas.js.map +1 -1
  641. package/dist/esm/guidance/progression-state.shared.schemas.d.ts.map +1 -1
  642. package/dist/esm/guidance/progression-state.shared.schemas.js +8 -7
  643. package/dist/esm/guidance/progression-state.shared.schemas.js.map +1 -1
  644. package/dist/esm/http-api-binding/http-api-binding-id.shared.utils.d.ts.map +1 -1
  645. package/dist/esm/http-api-binding/http-api-binding-id.shared.utils.js +1 -1
  646. package/dist/esm/http-api-binding/http-api-binding-id.shared.utils.js.map +1 -1
  647. package/dist/esm/http-api-binding/http-api-binding.shared.schemas.d.ts +550 -30
  648. package/dist/esm/http-api-binding/http-api-binding.shared.schemas.d.ts.map +1 -1
  649. package/dist/esm/http-api-binding/http-api-binding.shared.schemas.js +498 -34
  650. package/dist/esm/http-api-binding/http-api-binding.shared.schemas.js.map +1 -1
  651. package/dist/esm/http-api-binding/http-api-erasure-stance.shared.d.ts +62 -0
  652. package/dist/esm/http-api-binding/http-api-erasure-stance.shared.d.ts.map +1 -0
  653. package/dist/esm/http-api-binding/http-api-erasure-stance.shared.js +66 -0
  654. package/dist/esm/http-api-binding/http-api-erasure-stance.shared.js.map +1 -0
  655. package/dist/esm/http-api-binding/http-api-rest-write-operations.shared.schemas.d.ts +133 -0
  656. package/dist/esm/http-api-binding/http-api-rest-write-operations.shared.schemas.d.ts.map +1 -0
  657. package/dist/esm/http-api-binding/http-api-rest-write-operations.shared.schemas.js +191 -0
  658. package/dist/esm/http-api-binding/http-api-rest-write-operations.shared.schemas.js.map +1 -0
  659. package/dist/esm/http-api-binding/http-api-transport-dialect.shared.d.ts +37 -6
  660. package/dist/esm/http-api-binding/http-api-transport-dialect.shared.d.ts.map +1 -1
  661. package/dist/esm/http-api-binding/http-api-transport-dialect.shared.js +37 -6
  662. package/dist/esm/http-api-binding/http-api-transport-dialect.shared.js.map +1 -1
  663. package/dist/esm/http-api-binding/read-through-engine-anchors.shared.d.ts.map +1 -1
  664. package/dist/esm/http-api-binding/read-through-engine-anchors.shared.js.map +1 -1
  665. package/dist/esm/i18n/application-config-vocabulary.shared.d.ts +36 -0
  666. package/dist/esm/i18n/application-config-vocabulary.shared.d.ts.map +1 -0
  667. package/dist/esm/i18n/application-config-vocabulary.shared.js +39 -0
  668. package/dist/esm/i18n/application-config-vocabulary.shared.js.map +1 -0
  669. package/dist/esm/i18n/engine-open-vocabulary-values.shared.d.ts +11 -0
  670. package/dist/esm/i18n/engine-open-vocabulary-values.shared.d.ts.map +1 -0
  671. package/dist/esm/i18n/engine-open-vocabulary-values.shared.js +14 -0
  672. package/dist/esm/i18n/engine-open-vocabulary-values.shared.js.map +1 -0
  673. package/dist/esm/i18n/engine-open-vocabulary.shared.d.ts +20 -0
  674. package/dist/esm/i18n/engine-open-vocabulary.shared.d.ts.map +1 -0
  675. package/dist/esm/i18n/engine-open-vocabulary.shared.js +21 -0
  676. package/dist/esm/i18n/engine-open-vocabulary.shared.js.map +1 -0
  677. package/dist/esm/i18n/interpolate-label-params.shared.utils.d.ts.map +1 -1
  678. package/dist/esm/i18n/interpolate-label-params.shared.utils.js.map +1 -1
  679. package/dist/esm/i18n/labelling.dto.shared.schemas.d.ts.map +1 -1
  680. package/dist/esm/i18n/labelling.dto.shared.schemas.js.map +1 -1
  681. package/dist/esm/inbound/conversation-threads.shared.resources-config.schemas.d.ts +94 -0
  682. package/dist/esm/inbound/conversation-threads.shared.resources-config.schemas.d.ts.map +1 -0
  683. package/dist/esm/inbound/conversation-threads.shared.resources-config.schemas.js +206 -0
  684. package/dist/esm/inbound/conversation-threads.shared.resources-config.schemas.js.map +1 -0
  685. package/dist/esm/inbound/conversation-threads.shared.schemas.d.ts +169 -0
  686. package/dist/esm/inbound/conversation-threads.shared.schemas.d.ts.map +1 -0
  687. package/dist/esm/inbound/conversation-threads.shared.schemas.js +231 -0
  688. package/dist/esm/inbound/conversation-threads.shared.schemas.js.map +1 -0
  689. package/dist/esm/inbound/inbound-channels.shared.schemas.d.ts +195 -0
  690. package/dist/esm/inbound/inbound-channels.shared.schemas.d.ts.map +1 -0
  691. package/dist/esm/inbound/inbound-channels.shared.schemas.js +244 -0
  692. package/dist/esm/inbound/inbound-channels.shared.schemas.js.map +1 -0
  693. package/dist/esm/inbound/inbound-delivery.shared.resources-config.schemas.d.ts +36 -0
  694. package/dist/esm/inbound/inbound-delivery.shared.resources-config.schemas.d.ts.map +1 -0
  695. package/dist/esm/inbound/inbound-delivery.shared.resources-config.schemas.js +169 -0
  696. package/dist/esm/inbound/inbound-delivery.shared.resources-config.schemas.js.map +1 -0
  697. package/dist/esm/inbound/inbound-delivery.shared.schemas.d.ts +404 -0
  698. package/dist/esm/inbound/inbound-delivery.shared.schemas.d.ts.map +1 -0
  699. package/dist/esm/inbound/inbound-delivery.shared.schemas.js +449 -0
  700. package/dist/esm/inbound/inbound-delivery.shared.schemas.js.map +1 -0
  701. package/dist/esm/inbound/inbound-endpoint-env.shared.d.ts +46 -0
  702. package/dist/esm/inbound/inbound-endpoint-env.shared.d.ts.map +1 -0
  703. package/dist/esm/inbound/inbound-endpoint-env.shared.js +57 -0
  704. package/dist/esm/inbound/inbound-endpoint-env.shared.js.map +1 -0
  705. package/dist/esm/index.d.ts +58 -1
  706. package/dist/esm/index.d.ts.map +1 -1
  707. package/dist/esm/index.js +67 -1
  708. package/dist/esm/index.js.map +1 -1
  709. package/dist/esm/meta-workflows/actions.meta-workflows.shared.schemas.d.ts.map +1 -1
  710. package/dist/esm/meta-workflows/actions.meta-workflows.shared.schemas.js.map +1 -1
  711. package/dist/esm/meta-workflows/catalog.meta-workflows.shared.schemas.d.ts.map +1 -1
  712. package/dist/esm/meta-workflows/catalog.meta-workflows.shared.schemas.js.map +1 -1
  713. package/dist/esm/meta-workflows/coding-tasks.meta-workflows.shared.schemas.d.ts.map +1 -1
  714. package/dist/esm/meta-workflows/coding-tasks.meta-workflows.shared.schemas.js.map +1 -1
  715. package/dist/esm/meta-workflows/context-selection.meta-workflows.shared.schemas.d.ts.map +1 -1
  716. package/dist/esm/meta-workflows/context-selection.meta-workflows.shared.schemas.js.map +1 -1
  717. package/dist/esm/meta-workflows/decisions.meta-workflows.shared.schemas.d.ts +28 -0
  718. package/dist/esm/meta-workflows/decisions.meta-workflows.shared.schemas.d.ts.map +1 -1
  719. package/dist/esm/meta-workflows/decisions.meta-workflows.shared.schemas.js +29 -0
  720. package/dist/esm/meta-workflows/decisions.meta-workflows.shared.schemas.js.map +1 -1
  721. package/dist/esm/meta-workflows/orchestration.meta-workflows.shared.schemas.d.ts +95 -1
  722. package/dist/esm/meta-workflows/orchestration.meta-workflows.shared.schemas.d.ts.map +1 -1
  723. package/dist/esm/meta-workflows/orchestration.meta-workflows.shared.schemas.js +121 -0
  724. package/dist/esm/meta-workflows/orchestration.meta-workflows.shared.schemas.js.map +1 -1
  725. package/dist/esm/meta-workflows/portable-primitives.meta-workflows.shared.schemas.d.ts.map +1 -1
  726. package/dist/esm/meta-workflows/portable-primitives.meta-workflows.shared.schemas.js.map +1 -1
  727. package/dist/esm/meta-workflows.exports.d.ts +0 -1
  728. package/dist/esm/meta-workflows.exports.d.ts.map +1 -1
  729. package/dist/esm/meta-workflows.exports.js +0 -1
  730. package/dist/esm/meta-workflows.exports.js.map +1 -1
  731. package/dist/esm/monitoring/monitoring.shared.schemas.d.ts.map +1 -1
  732. package/dist/esm/monitoring/monitoring.shared.schemas.js.map +1 -1
  733. package/dist/esm/notifications/email/email-context.shared.schemas.d.ts.map +1 -1
  734. package/dist/esm/notifications/email/email-context.shared.schemas.js.map +1 -1
  735. package/dist/esm/notifications/email/email-submission.shared.enums.d.ts.map +1 -1
  736. package/dist/esm/notifications/email/email-submission.shared.enums.js.map +1 -1
  737. package/dist/esm/notifications/email/email-template-registry.shared.schemas.d.ts +7 -1
  738. package/dist/esm/notifications/email/email-template-registry.shared.schemas.d.ts.map +1 -1
  739. package/dist/esm/notifications/email/email-template-registry.shared.schemas.js +35 -0
  740. package/dist/esm/notifications/email/email-template-registry.shared.schemas.js.map +1 -1
  741. package/dist/esm/notifications/email/email-template.shared.enums.d.ts.map +1 -1
  742. package/dist/esm/notifications/email/email-template.shared.enums.js.map +1 -1
  743. package/dist/esm/notifications/inbound-email/inbound-email.shared.resources-config.schemas.d.ts +131 -0
  744. package/dist/esm/notifications/inbound-email/inbound-email.shared.resources-config.schemas.d.ts.map +1 -0
  745. package/dist/esm/notifications/inbound-email/inbound-email.shared.resources-config.schemas.js +258 -0
  746. package/dist/esm/notifications/inbound-email/inbound-email.shared.resources-config.schemas.js.map +1 -0
  747. package/dist/esm/notifications/inbound-email/inbound-email.shared.schemas.d.ts +448 -0
  748. package/dist/esm/notifications/inbound-email/inbound-email.shared.schemas.d.ts.map +1 -0
  749. package/dist/esm/notifications/inbound-email/inbound-email.shared.schemas.js +530 -0
  750. package/dist/esm/notifications/inbound-email/inbound-email.shared.schemas.js.map +1 -0
  751. package/dist/esm/notifications/m2m/m2m-webhook-delivery-contract.shared.d.ts.map +1 -1
  752. package/dist/esm/notifications/m2m/m2m-webhook-delivery-contract.shared.js.map +1 -1
  753. package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.resources-config.schemas.d.ts.map +1 -1
  754. package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.resources-config.schemas.js +4 -3
  755. package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.resources-config.schemas.js.map +1 -1
  756. package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.schemas.d.ts.map +1 -1
  757. package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.schemas.js.map +1 -1
  758. package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.d.ts +16 -1
  759. package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.d.ts.map +1 -1
  760. package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.js +46 -16
  761. package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.js.map +1 -1
  762. package/dist/esm/notifications/m2m/webhook-config.shared.schemas.d.ts +19 -12
  763. package/dist/esm/notifications/m2m/webhook-config.shared.schemas.d.ts.map +1 -1
  764. package/dist/esm/notifications/m2m/webhook-config.shared.schemas.js +77 -12
  765. package/dist/esm/notifications/m2m/webhook-config.shared.schemas.js.map +1 -1
  766. package/dist/esm/notifications/notification-badges.core.definitions.d.ts.map +1 -1
  767. package/dist/esm/notifications/notification-badges.core.definitions.js.map +1 -1
  768. package/dist/esm/notifications/notification-badges.schemas.d.ts +35 -3
  769. package/dist/esm/notifications/notification-badges.schemas.d.ts.map +1 -1
  770. package/dist/esm/notifications/notification-badges.schemas.js +43 -3
  771. package/dist/esm/notifications/notification-badges.schemas.js.map +1 -1
  772. package/dist/esm/notifications/notification-badges.shared.resources-config.schemas.d.ts.map +1 -1
  773. package/dist/esm/notifications/notification-badges.shared.resources-config.schemas.js.map +1 -1
  774. package/dist/esm/notifications/notifications.shared.schemas.d.ts +66 -399
  775. package/dist/esm/notifications/notifications.shared.schemas.d.ts.map +1 -1
  776. package/dist/esm/notifications/notifications.shared.schemas.js +111 -58
  777. package/dist/esm/notifications/notifications.shared.schemas.js.map +1 -1
  778. package/dist/esm/organizations/application-owner-organization.shared.schemas.d.ts.map +1 -1
  779. package/dist/esm/organizations/application-owner-organization.shared.schemas.js.map +1 -1
  780. package/dist/esm/organizations/organization-features.shared.resources-config.schemas.d.ts +5 -5
  781. package/dist/esm/organizations/organization-features.shared.resources-config.schemas.d.ts.map +1 -1
  782. package/dist/esm/organizations/organization-features.shared.resources-config.schemas.js +6 -6
  783. package/dist/esm/organizations/organization-features.shared.resources-config.schemas.js.map +1 -1
  784. package/dist/esm/organizations/organization-features.shared.schemas.d.ts.map +1 -1
  785. package/dist/esm/organizations/organization-features.shared.schemas.js.map +1 -1
  786. package/dist/esm/organizations/organization-members.shared.resources-config.schemas.d.ts +3 -0
  787. package/dist/esm/organizations/organization-members.shared.resources-config.schemas.d.ts.map +1 -1
  788. package/dist/esm/organizations/organization-members.shared.resources-config.schemas.js +60 -14
  789. package/dist/esm/organizations/organization-members.shared.resources-config.schemas.js.map +1 -1
  790. package/dist/esm/organizations/organization-members.shared.schemas.d.ts +3 -0
  791. package/dist/esm/organizations/organization-members.shared.schemas.d.ts.map +1 -1
  792. package/dist/esm/organizations/organization-members.shared.schemas.js +30 -0
  793. package/dist/esm/organizations/organization-members.shared.schemas.js.map +1 -1
  794. package/dist/esm/organizations/organization-notifications.shared.resources-config.schemas.d.ts.map +1 -1
  795. package/dist/esm/organizations/organization-notifications.shared.resources-config.schemas.js.map +1 -1
  796. package/dist/esm/organizations/organization-notifications.shared.schemas.d.ts.map +1 -1
  797. package/dist/esm/organizations/organization-notifications.shared.schemas.js +9 -9
  798. package/dist/esm/organizations/organization-notifications.shared.schemas.js.map +1 -1
  799. package/dist/esm/organizations/organization-preferences.shared.resources-config.schemas.d.ts.map +1 -1
  800. package/dist/esm/organizations/organization-preferences.shared.resources-config.schemas.js.map +1 -1
  801. package/dist/esm/organizations/organization-preferences.shared.schemas.d.ts.map +1 -1
  802. package/dist/esm/organizations/organization-preferences.shared.schemas.js +4 -4
  803. package/dist/esm/organizations/organization-preferences.shared.schemas.js.map +1 -1
  804. package/dist/esm/organizations/organization-profile.shared.resources-config.schemas.d.ts +0 -1
  805. package/dist/esm/organizations/organization-profile.shared.resources-config.schemas.d.ts.map +1 -1
  806. package/dist/esm/organizations/organization-profile.shared.resources-config.schemas.js.map +1 -1
  807. package/dist/esm/organizations/organization-profile.shared.schemas.d.ts +5 -5
  808. package/dist/esm/organizations/organization-profile.shared.schemas.d.ts.map +1 -1
  809. package/dist/esm/organizations/organization-profile.shared.schemas.js +15 -10
  810. package/dist/esm/organizations/organization-profile.shared.schemas.js.map +1 -1
  811. package/dist/esm/organizations/organization-unit-inheritance.shared.d.ts.map +1 -1
  812. package/dist/esm/organizations/organization-unit-inheritance.shared.js.map +1 -1
  813. package/dist/esm/organizations/organization-unit-members.shared.resources-config.schemas.d.ts.map +1 -1
  814. package/dist/esm/organizations/organization-unit-members.shared.resources-config.schemas.js +1 -1
  815. package/dist/esm/organizations/organization-unit-members.shared.resources-config.schemas.js.map +1 -1
  816. package/dist/esm/organizations/organization-unit-members.shared.schemas.d.ts.map +1 -1
  817. package/dist/esm/organizations/organization-unit-members.shared.schemas.js +2 -1
  818. package/dist/esm/organizations/organization-unit-members.shared.schemas.js.map +1 -1
  819. package/dist/esm/organizations/organization-unit-narrowing-decision.shared.d.ts +63 -1
  820. package/dist/esm/organizations/organization-unit-narrowing-decision.shared.d.ts.map +1 -1
  821. package/dist/esm/organizations/organization-unit-narrowing-decision.shared.js +106 -5
  822. package/dist/esm/organizations/organization-unit-narrowing-decision.shared.js.map +1 -1
  823. package/dist/esm/organizations/organization-unit-narrowing.example.d.ts.map +1 -1
  824. package/dist/esm/organizations/organization-unit-narrowing.example.js.map +1 -1
  825. package/dist/esm/organizations/organization-unit-narrowing.shared.d.ts.map +1 -1
  826. package/dist/esm/organizations/organization-unit-narrowing.shared.js +9 -0
  827. package/dist/esm/organizations/organization-unit-narrowing.shared.js.map +1 -1
  828. package/dist/esm/organizations/organization-units.shared.path.d.ts.map +1 -1
  829. package/dist/esm/organizations/organization-units.shared.path.js.map +1 -1
  830. package/dist/esm/organizations/organization-units.shared.resources-config.schemas.d.ts.map +1 -1
  831. package/dist/esm/organizations/organization-units.shared.resources-config.schemas.js +7 -2
  832. package/dist/esm/organizations/organization-units.shared.resources-config.schemas.js.map +1 -1
  833. package/dist/esm/organizations/organization-units.shared.schemas.d.ts.map +1 -1
  834. package/dist/esm/organizations/organization-units.shared.schemas.js.map +1 -1
  835. package/dist/esm/organizations/organizations.shared.resources-config.schemas.d.ts +3 -1
  836. package/dist/esm/organizations/organizations.shared.resources-config.schemas.d.ts.map +1 -1
  837. package/dist/esm/organizations/organizations.shared.resources-config.schemas.js +12 -8
  838. package/dist/esm/organizations/organizations.shared.resources-config.schemas.js.map +1 -1
  839. package/dist/esm/organizations/organizations.shared.schemas.d.ts +7 -2
  840. package/dist/esm/organizations/organizations.shared.schemas.d.ts.map +1 -1
  841. package/dist/esm/organizations/organizations.shared.schemas.js +51 -1
  842. package/dist/esm/organizations/organizations.shared.schemas.js.map +1 -1
  843. package/dist/esm/organizations/service-provider-activity-feed.shared.resources-config.schemas.d.ts +58 -0
  844. package/dist/esm/organizations/service-provider-activity-feed.shared.resources-config.schemas.d.ts.map +1 -0
  845. package/dist/esm/organizations/service-provider-activity-feed.shared.resources-config.schemas.js +188 -0
  846. package/dist/esm/organizations/service-provider-activity-feed.shared.resources-config.schemas.js.map +1 -0
  847. package/dist/esm/organizations/service-provider-activity-feed.shared.schemas.d.ts +122 -0
  848. package/dist/esm/organizations/service-provider-activity-feed.shared.schemas.d.ts.map +1 -0
  849. package/dist/esm/organizations/service-provider-activity-feed.shared.schemas.js +136 -0
  850. package/dist/esm/organizations/service-provider-activity-feed.shared.schemas.js.map +1 -0
  851. package/dist/esm/organizations/service-provider-capability-grants.shared.resources-config.schemas.d.ts +36 -0
  852. package/dist/esm/organizations/service-provider-capability-grants.shared.resources-config.schemas.d.ts.map +1 -0
  853. package/dist/esm/organizations/service-provider-capability-grants.shared.resources-config.schemas.js +155 -0
  854. package/dist/esm/organizations/service-provider-capability-grants.shared.resources-config.schemas.js.map +1 -0
  855. package/dist/esm/organizations/service-provider-capability-grants.shared.schemas.d.ts +229 -0
  856. package/dist/esm/organizations/service-provider-capability-grants.shared.schemas.d.ts.map +1 -0
  857. package/dist/esm/organizations/service-provider-capability-grants.shared.schemas.js +290 -0
  858. package/dist/esm/organizations/service-provider-capability-grants.shared.schemas.js.map +1 -0
  859. package/dist/esm/organizations/service-provider-client-controls.shared.schemas.d.ts +48 -0
  860. package/dist/esm/organizations/service-provider-client-controls.shared.schemas.d.ts.map +1 -0
  861. package/dist/esm/organizations/service-provider-client-controls.shared.schemas.js +50 -0
  862. package/dist/esm/organizations/service-provider-client-controls.shared.schemas.js.map +1 -0
  863. package/dist/esm/organizations/service-provider-relationships.shared.resources-config.schemas.d.ts +97 -0
  864. package/dist/esm/organizations/service-provider-relationships.shared.resources-config.schemas.d.ts.map +1 -0
  865. package/dist/esm/organizations/service-provider-relationships.shared.resources-config.schemas.js +572 -0
  866. package/dist/esm/organizations/service-provider-relationships.shared.resources-config.schemas.js.map +1 -0
  867. package/dist/esm/organizations/service-provider-relationships.shared.schemas.d.ts +590 -0
  868. package/dist/esm/organizations/service-provider-relationships.shared.schemas.d.ts.map +1 -0
  869. package/dist/esm/organizations/service-provider-relationships.shared.schemas.js +869 -0
  870. package/dist/esm/organizations/service-provider-relationships.shared.schemas.js.map +1 -0
  871. package/dist/esm/organizations/tenant-teardown-config.shared.schemas.d.ts +36 -6
  872. package/dist/esm/organizations/tenant-teardown-config.shared.schemas.d.ts.map +1 -1
  873. package/dist/esm/organizations/tenant-teardown-config.shared.schemas.js +57 -16
  874. package/dist/esm/organizations/tenant-teardown-config.shared.schemas.js.map +1 -1
  875. package/dist/esm/provider-registration-runtime.exports.d.ts +0 -1
  876. package/dist/esm/provider-registration-runtime.exports.d.ts.map +1 -1
  877. package/dist/esm/provider-registration-runtime.exports.js +0 -1
  878. package/dist/esm/provider-registration-runtime.exports.js.map +1 -1
  879. package/dist/esm/public-runtime/index.d.ts +30 -11
  880. package/dist/esm/public-runtime/index.d.ts.map +1 -1
  881. package/dist/esm/public-runtime/index.js +30 -11
  882. package/dist/esm/public-runtime/index.js.map +1 -1
  883. package/dist/esm/queue/jobs.shared.resources-config.schemas.d.ts.map +1 -1
  884. package/dist/esm/queue/jobs.shared.resources-config.schemas.js.map +1 -1
  885. package/dist/esm/queue/jobs.shared.schemas.d.ts +30 -2
  886. package/dist/esm/queue/jobs.shared.schemas.d.ts.map +1 -1
  887. package/dist/esm/queue/jobs.shared.schemas.js +12 -0
  888. package/dist/esm/queue/jobs.shared.schemas.js.map +1 -1
  889. package/dist/esm/queue/jobs.shared.utils.d.ts.map +1 -1
  890. package/dist/esm/queue/jobs.shared.utils.js.map +1 -1
  891. package/dist/esm/queue/queues.shared.schemas.d.ts.map +1 -1
  892. package/dist/esm/queue/queues.shared.schemas.js.map +1 -1
  893. package/dist/esm/queue/queues.shared.utils.d.ts.map +1 -1
  894. package/dist/esm/queue/queues.shared.utils.js.map +1 -1
  895. package/dist/esm/queue/rabbitmq-queue-args.shared.d.ts.map +1 -1
  896. package/dist/esm/queue/rabbitmq-queue-args.shared.js.map +1 -1
  897. package/dist/esm/rag/rag-retrieval-health.shared.d.ts.map +1 -1
  898. package/dist/esm/rag/rag-retrieval-health.shared.js.map +1 -1
  899. package/dist/esm/requests/header-keys.shared.d.ts +6 -0
  900. package/dist/esm/requests/header-keys.shared.d.ts.map +1 -1
  901. package/dist/esm/requests/header-keys.shared.js +7 -0
  902. package/dist/esm/requests/header-keys.shared.js.map +1 -1
  903. package/dist/esm/requests/http-requests.shared.d.ts.map +1 -1
  904. package/dist/esm/requests/http-requests.shared.js.map +1 -1
  905. package/dist/esm/requests/idempotency-key.shared.d.ts.map +1 -1
  906. package/dist/esm/requests/idempotency-key.shared.js.map +1 -1
  907. package/dist/esm/requests/manual-controllers-routes-documentation.d.ts.map +1 -1
  908. package/dist/esm/requests/manual-controllers-routes-documentation.js +147 -8
  909. package/dist/esm/requests/manual-controllers-routes-documentation.js.map +1 -1
  910. package/dist/esm/requests/manual-controllers-routes-urls.d.ts +51 -23
  911. package/dist/esm/requests/manual-controllers-routes-urls.d.ts.map +1 -1
  912. package/dist/esm/requests/manual-controllers-routes-urls.js +64 -0
  913. package/dist/esm/requests/manual-controllers-routes-urls.js.map +1 -1
  914. package/dist/esm/requests/rate-limits.shared.schemas.d.ts.map +1 -1
  915. package/dist/esm/requests/rate-limits.shared.schemas.js.map +1 -1
  916. package/dist/esm/requests/websocket.shared.schemas.d.ts +78 -13
  917. package/dist/esm/requests/websocket.shared.schemas.d.ts.map +1 -1
  918. package/dist/esm/requests/websocket.shared.schemas.js +91 -18
  919. package/dist/esm/requests/websocket.shared.schemas.js.map +1 -1
  920. package/dist/esm/resources/child-operations.shared.schemas.d.ts.map +1 -1
  921. package/dist/esm/resources/child-operations.shared.schemas.js.map +1 -1
  922. package/dist/esm/resources/collection-query-parameters.shared.d.ts.map +1 -1
  923. package/dist/esm/resources/collection-query-parameters.shared.js.map +1 -1
  924. package/dist/esm/resources/context-policy.shared.schemas.d.ts.map +1 -1
  925. package/dist/esm/resources/context-policy.shared.schemas.js.map +1 -1
  926. package/dist/esm/resources/embedded-resource-mark.shared.utils.d.ts +21 -0
  927. package/dist/esm/resources/embedded-resource-mark.shared.utils.d.ts.map +1 -0
  928. package/dist/esm/resources/embedded-resource-mark.shared.utils.js +22 -0
  929. package/dist/esm/resources/embedded-resource-mark.shared.utils.js.map +1 -0
  930. package/dist/esm/resources/relationship-display.shared.schemas.d.ts.map +1 -1
  931. package/dist/esm/resources/relationship-display.shared.schemas.js.map +1 -1
  932. package/dist/esm/resources/resources-config.shared.factory.d.ts.map +1 -1
  933. package/dist/esm/resources/resources-config.shared.factory.js +812 -32
  934. package/dist/esm/resources/resources-config.shared.factory.js.map +1 -1
  935. package/dist/esm/resources/resources-config.shared.schemas.d.ts +244 -48
  936. package/dist/esm/resources/resources-config.shared.schemas.d.ts.map +1 -1
  937. package/dist/esm/resources/resources-config.shared.schemas.js +151 -17
  938. package/dist/esm/resources/resources-config.shared.schemas.js.map +1 -1
  939. package/dist/esm/resources/resources-registry.shared.core.definitions.d.ts.map +1 -1
  940. package/dist/esm/resources/resources-registry.shared.core.definitions.js +369 -12
  941. package/dist/esm/resources/resources-registry.shared.core.definitions.js.map +1 -1
  942. package/dist/esm/resources/resources-relationships.shared.factory.d.ts.map +1 -1
  943. package/dist/esm/resources/resources-relationships.shared.factory.js.map +1 -1
  944. package/dist/esm/resources/resources-serialization.shared.schemas.d.ts.map +1 -1
  945. package/dist/esm/resources/resources-serialization.shared.schemas.js.map +1 -1
  946. package/dist/esm/resources/resources.shared.core.definitions.d.ts +45 -0
  947. package/dist/esm/resources/resources.shared.core.definitions.d.ts.map +1 -1
  948. package/dist/esm/resources/resources.shared.core.definitions.js +92 -0
  949. package/dist/esm/resources/resources.shared.core.definitions.js.map +1 -1
  950. package/dist/esm/resources/resources.shared.schemas.d.ts +2 -17
  951. package/dist/esm/resources/resources.shared.schemas.d.ts.map +1 -1
  952. package/dist/esm/resources/resources.shared.schemas.js +24 -20
  953. package/dist/esm/resources/resources.shared.schemas.js.map +1 -1
  954. package/dist/esm/resources/resources.shared.utils.d.ts +16 -8
  955. package/dist/esm/resources/resources.shared.utils.d.ts.map +1 -1
  956. package/dist/esm/resources/resources.shared.utils.js +16 -8
  957. package/dist/esm/resources/resources.shared.utils.js.map +1 -1
  958. package/dist/esm/resources/utils/collection-export.shared.utils.d.ts +2 -2
  959. package/dist/esm/resources/utils/collection-export.shared.utils.d.ts.map +1 -1
  960. package/dist/esm/resources/utils/collection-export.shared.utils.js +4 -2
  961. package/dist/esm/resources/utils/collection-export.shared.utils.js.map +1 -1
  962. package/dist/esm/resources/utils/composition-cascade-deletability.validation.d.ts.map +1 -1
  963. package/dist/esm/resources/utils/composition-cascade-deletability.validation.js.map +1 -1
  964. package/dist/esm/resources/utils/composition-seedability.validation.d.ts.map +1 -1
  965. package/dist/esm/resources/utils/composition-seedability.validation.js.map +1 -1
  966. package/dist/esm/resources/utils/context-addressed-composition-singleton.shared.utils.d.ts.map +1 -1
  967. package/dist/esm/resources/utils/context-addressed-composition-singleton.shared.utils.js.map +1 -1
  968. package/dist/esm/resources/utils/dependent-lifecycle-classification.validation.d.ts.map +1 -1
  969. package/dist/esm/resources/utils/dependent-lifecycle-classification.validation.js.map +1 -1
  970. package/dist/esm/resources/utils/duplicate-relationship-registration.validation.d.ts.map +1 -1
  971. package/dist/esm/resources/utils/duplicate-relationship-registration.validation.js.map +1 -1
  972. package/dist/esm/resources/utils/field-value-disclosure.utils.d.ts.map +1 -1
  973. package/dist/esm/resources/utils/field-value-disclosure.utils.js.map +1 -1
  974. package/dist/esm/resources/utils/http-api-write-declaration.shared.utils.d.ts +103 -0
  975. package/dist/esm/resources/utils/http-api-write-declaration.shared.utils.d.ts.map +1 -0
  976. package/dist/esm/resources/utils/http-api-write-declaration.shared.utils.js +275 -0
  977. package/dist/esm/resources/utils/http-api-write-declaration.shared.utils.js.map +1 -0
  978. package/dist/esm/resources/utils/initiator-stamped-field-satisfiability.validation.d.ts.map +1 -1
  979. package/dist/esm/resources/utils/initiator-stamped-field-satisfiability.validation.js.map +1 -1
  980. package/dist/esm/resources/utils/no-subject-data-stance-coherence.shared.utils.d.ts +51 -0
  981. package/dist/esm/resources/utils/no-subject-data-stance-coherence.shared.utils.d.ts.map +1 -0
  982. package/dist/esm/resources/utils/no-subject-data-stance-coherence.shared.utils.js +28 -0
  983. package/dist/esm/resources/utils/no-subject-data-stance-coherence.shared.utils.js.map +1 -0
  984. package/dist/esm/resources/utils/persistence-adapter-discrimination.shared.utils.d.ts.map +1 -1
  985. package/dist/esm/resources/utils/persistence-adapter-discrimination.shared.utils.js.map +1 -1
  986. package/dist/esm/resources/utils/populated-file-fields.shared.utils.d.ts.map +1 -1
  987. package/dist/esm/resources/utils/populated-file-fields.shared.utils.js +30 -19
  988. package/dist/esm/resources/utils/populated-file-fields.shared.utils.js.map +1 -1
  989. package/dist/esm/resources/utils/repository-dto-builder.utils.d.ts.map +1 -1
  990. package/dist/esm/resources/utils/repository-dto-builder.utils.js.map +1 -1
  991. package/dist/esm/resources/utils/request-schema-field-carriage.shared.utils.d.ts +2 -0
  992. package/dist/esm/resources/utils/request-schema-field-carriage.shared.utils.d.ts.map +1 -0
  993. package/dist/esm/resources/utils/request-schema-field-carriage.shared.utils.js +33 -0
  994. package/dist/esm/resources/utils/request-schema-field-carriage.shared.utils.js.map +1 -0
  995. package/dist/esm/resources/utils/required-fk-fillability.validation.d.ts.map +1 -1
  996. package/dist/esm/resources/utils/required-fk-fillability.validation.js.map +1 -1
  997. package/dist/esm/resources/utils/resource-operation-type-guards.utils.d.ts.map +1 -1
  998. package/dist/esm/resources/utils/resource-operation-type-guards.utils.js.map +1 -1
  999. package/dist/esm/resources/utils/resource-polymorphism.factory.d.ts +15 -0
  1000. package/dist/esm/resources/utils/resource-polymorphism.factory.d.ts.map +1 -1
  1001. package/dist/esm/resources/utils/resource-polymorphism.factory.js +6 -1
  1002. package/dist/esm/resources/utils/resource-polymorphism.factory.js.map +1 -1
  1003. package/dist/esm/resources/utils/resource-polymorphism.relationships.d.ts.map +1 -1
  1004. package/dist/esm/resources/utils/resource-polymorphism.relationships.js.map +1 -1
  1005. package/dist/esm/resources/utils/resource-polymorphism.schemas.d.ts.map +1 -1
  1006. package/dist/esm/resources/utils/resource-polymorphism.schemas.js +30 -4
  1007. package/dist/esm/resources/utils/resource-polymorphism.schemas.js.map +1 -1
  1008. package/dist/esm/resources/utils/resource-polymorphism.utils.d.ts.map +1 -1
  1009. package/dist/esm/resources/utils/resource-polymorphism.utils.js.map +1 -1
  1010. package/dist/esm/resources/utils/resource-subtree.utils.d.ts.map +1 -1
  1011. package/dist/esm/resources/utils/resource-subtree.utils.js.map +1 -1
  1012. package/dist/esm/resources/utils/resources-config-context-needs.utils.d.ts.map +1 -1
  1013. package/dist/esm/resources/utils/resources-config-context-needs.utils.js.map +1 -1
  1014. package/dist/esm/resources/utils/resources-config-naming.utils.d.ts.map +1 -1
  1015. package/dist/esm/resources/utils/resources-config-naming.utils.js.map +1 -1
  1016. package/dist/esm/resources/utils/resources-config-operations.dtos-builder.utils.d.ts +46 -0
  1017. package/dist/esm/resources/utils/resources-config-operations.dtos-builder.utils.d.ts.map +1 -1
  1018. package/dist/esm/resources/utils/resources-config-operations.dtos-builder.utils.js +205 -22
  1019. package/dist/esm/resources/utils/resources-config-operations.dtos-builder.utils.js.map +1 -1
  1020. package/dist/esm/resources/utils/resources-config-operations.path.utils.d.ts.map +1 -1
  1021. package/dist/esm/resources/utils/resources-config-operations.path.utils.js.map +1 -1
  1022. package/dist/esm/resources/utils/resources-config-operations.urls-builder.utils.d.ts.map +1 -1
  1023. package/dist/esm/resources/utils/resources-config-operations.urls-builder.utils.js.map +1 -1
  1024. package/dist/esm/resources/utils/resources-config-operations.utils.d.ts.map +1 -1
  1025. package/dist/esm/resources/utils/resources-config-operations.utils.js.map +1 -1
  1026. package/dist/esm/resources/utils/resources-serialization.utils.d.ts +19 -2
  1027. package/dist/esm/resources/utils/resources-serialization.utils.d.ts.map +1 -1
  1028. package/dist/esm/resources/utils/resources-serialization.utils.js +4 -0
  1029. package/dist/esm/resources/utils/resources-serialization.utils.js.map +1 -1
  1030. package/dist/esm/resources/utils/resources-summary.utils.d.ts.map +1 -1
  1031. package/dist/esm/resources/utils/resources-summary.utils.js.map +1 -1
  1032. package/dist/esm/resources/utils/schema-family-builder.utils.d.ts.map +1 -1
  1033. package/dist/esm/resources/utils/schema-family-builder.utils.js.map +1 -1
  1034. package/dist/esm/resources/utils/schema-type-inference.utils.d.ts.map +1 -1
  1035. package/dist/esm/resources/utils/schema-type-inference.utils.js.map +1 -1
  1036. package/dist/esm/resources/utils/schema-type-utils.d.ts.map +1 -1
  1037. package/dist/esm/resources/utils/schema-type-utils.js.map +1 -1
  1038. package/dist/esm/resources/utils/schema-variant-resolver.utils.d.ts.map +1 -1
  1039. package/dist/esm/resources/utils/schema-variant-resolver.utils.js.map +1 -1
  1040. package/dist/esm/resources/utils/shared-persistence-collection.utils.d.ts.map +1 -1
  1041. package/dist/esm/resources/utils/shared-persistence-collection.utils.js +15 -9
  1042. package/dist/esm/resources/utils/shared-persistence-collection.utils.js.map +1 -1
  1043. package/dist/esm/resources/utils/templatable-file-fields.shared.utils.d.ts.map +1 -1
  1044. package/dist/esm/resources/utils/templatable-file-fields.shared.utils.js.map +1 -1
  1045. package/dist/esm/resources/work-unit.shared.schemas.d.ts +20 -0
  1046. package/dist/esm/resources/work-unit.shared.schemas.d.ts.map +1 -0
  1047. package/dist/esm/resources/work-unit.shared.schemas.js +19 -0
  1048. package/dist/esm/resources/work-unit.shared.schemas.js.map +1 -0
  1049. package/dist/esm/runtime/domain-module.shared.definitions.d.ts.map +1 -1
  1050. package/dist/esm/runtime/domain-module.shared.definitions.js.map +1 -1
  1051. package/dist/esm/runtime/execution-context.shared.schemas.d.ts +48 -1
  1052. package/dist/esm/runtime/execution-context.shared.schemas.d.ts.map +1 -1
  1053. package/dist/esm/runtime/execution-context.shared.schemas.js +101 -9
  1054. package/dist/esm/runtime/execution-context.shared.schemas.js.map +1 -1
  1055. package/dist/esm/runtime/runtime.shared.schemas.d.ts.map +1 -1
  1056. package/dist/esm/runtime/runtime.shared.schemas.js.map +1 -1
  1057. package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.d.ts +1 -0
  1058. package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.d.ts.map +1 -1
  1059. package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.js +37 -20
  1060. package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.js.map +1 -1
  1061. package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.d.ts +1 -0
  1062. package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.d.ts.map +1 -1
  1063. package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.js +61 -48
  1064. package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.js.map +1 -1
  1065. package/dist/esm/security/api-keys/api-keys.shared.schemas.d.ts +26 -0
  1066. package/dist/esm/security/api-keys/api-keys.shared.schemas.d.ts.map +1 -1
  1067. package/dist/esm/security/api-keys/api-keys.shared.schemas.js +39 -5
  1068. package/dist/esm/security/api-keys/api-keys.shared.schemas.js.map +1 -1
  1069. package/dist/esm/security/authentications/anonymous-session/anonymous-session.shared.contract.d.ts.map +1 -1
  1070. package/dist/esm/security/authentications/anonymous-session/anonymous-session.shared.contract.js.map +1 -1
  1071. package/dist/esm/security/authentications/authentication.shared.dto.schemas.d.ts +5 -3
  1072. package/dist/esm/security/authentications/authentication.shared.dto.schemas.d.ts.map +1 -1
  1073. package/dist/esm/security/authentications/authentication.shared.dto.schemas.js +6 -0
  1074. package/dist/esm/security/authentications/authentication.shared.dto.schemas.js.map +1 -1
  1075. package/dist/esm/security/authentications/authentication.shared.schemas.d.ts.map +1 -1
  1076. package/dist/esm/security/authentications/authentication.shared.schemas.js.map +1 -1
  1077. package/dist/esm/security/authentications/authentication.shared.utils.d.ts.map +1 -1
  1078. package/dist/esm/security/authentications/authentication.shared.utils.js.map +1 -1
  1079. package/dist/esm/security/authentications/consumable-token.shared.schemas.d.ts.map +1 -1
  1080. package/dist/esm/security/authentications/consumable-token.shared.schemas.js.map +1 -1
  1081. package/dist/esm/security/authentications/cross-frontend-handoff.shared.dto.schemas.d.ts.map +1 -1
  1082. package/dist/esm/security/authentications/cross-frontend-handoff.shared.dto.schemas.js.map +1 -1
  1083. package/dist/esm/security/authentications/mfa-backup-code-contract.shared.d.ts.map +1 -1
  1084. package/dist/esm/security/authentications/mfa-backup-code-contract.shared.js.map +1 -1
  1085. package/dist/esm/security/authentications/password-blocklist.shared.utils.d.ts.map +1 -1
  1086. package/dist/esm/security/authentications/password-blocklist.shared.utils.js.map +1 -1
  1087. package/dist/esm/security/authentications/password-reset.shared.dto.schemas.d.ts.map +1 -1
  1088. package/dist/esm/security/authentications/password-reset.shared.dto.schemas.js.map +1 -1
  1089. package/dist/esm/security/authentications/registration.shared.dto.schemas.d.ts.map +1 -1
  1090. package/dist/esm/security/authentications/registration.shared.dto.schemas.js.map +1 -1
  1091. package/dist/esm/security/authentications/same-origin-redirect-path.shared.d.ts.map +1 -1
  1092. package/dist/esm/security/authentications/same-origin-redirect-path.shared.js.map +1 -1
  1093. package/dist/esm/security/authentications/scim/scim-organization-unit-mapping.shared.d.ts.map +1 -1
  1094. package/dist/esm/security/authentications/scim/scim-organization-unit-mapping.shared.js +2 -2
  1095. package/dist/esm/security/authentications/scim/scim-organization-unit-mapping.shared.js.map +1 -1
  1096. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.resources-config.schemas.d.ts +11 -0
  1097. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.resources-config.schemas.d.ts.map +1 -1
  1098. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.resources-config.schemas.js +19 -8
  1099. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.resources-config.schemas.js.map +1 -1
  1100. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.d.ts +1 -1
  1101. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.d.ts.map +1 -1
  1102. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.js +5 -5
  1103. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.js.map +1 -1
  1104. package/dist/esm/security/authentications/scim/scim-tokens.shared.resources-config.schemas.d.ts.map +1 -1
  1105. package/dist/esm/security/authentications/scim/scim-tokens.shared.resources-config.schemas.js +11 -11
  1106. package/dist/esm/security/authentications/scim/scim-tokens.shared.resources-config.schemas.js.map +1 -1
  1107. package/dist/esm/security/authentications/scim/scim-tokens.shared.schemas.d.ts +2 -0
  1108. package/dist/esm/security/authentications/scim/scim-tokens.shared.schemas.d.ts.map +1 -1
  1109. package/dist/esm/security/authentications/scim/scim-tokens.shared.schemas.js +9 -0
  1110. package/dist/esm/security/authentications/scim/scim-tokens.shared.schemas.js.map +1 -1
  1111. package/dist/esm/security/authentications/service-provider-client-authentication.shared.schemas.d.ts +169 -0
  1112. package/dist/esm/security/authentications/service-provider-client-authentication.shared.schemas.d.ts.map +1 -0
  1113. package/dist/esm/security/authentications/service-provider-client-authentication.shared.schemas.js +162 -0
  1114. package/dist/esm/security/authentications/service-provider-client-authentication.shared.schemas.js.map +1 -0
  1115. package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.resources-config.schemas.d.ts.map +1 -1
  1116. package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.resources-config.schemas.js +10 -8
  1117. package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.resources-config.schemas.js.map +1 -1
  1118. package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.schemas.d.ts.map +1 -1
  1119. package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.schemas.js.map +1 -1
  1120. package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.resources-config.schemas.d.ts.map +1 -1
  1121. package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.resources-config.schemas.js.map +1 -1
  1122. package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.schemas.d.ts.map +1 -1
  1123. package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.schemas.js.map +1 -1
  1124. package/dist/esm/security/authentications/siem/siem-delivery-reliability-contract.shared.d.ts.map +1 -1
  1125. package/dist/esm/security/authentications/siem/siem-delivery-reliability-contract.shared.js.map +1 -1
  1126. package/dist/esm/security/authentications/siem/siem-export-config.shared.resources-config.schemas.d.ts.map +1 -1
  1127. package/dist/esm/security/authentications/siem/siem-export-config.shared.resources-config.schemas.js.map +1 -1
  1128. package/dist/esm/security/authentications/siem/siem-export-config.shared.schemas.d.ts.map +1 -1
  1129. package/dist/esm/security/authentications/siem/siem-export-config.shared.schemas.js +8 -8
  1130. package/dist/esm/security/authentications/siem/siem-export-config.shared.schemas.js.map +1 -1
  1131. package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.d.ts.map +1 -1
  1132. package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.js +17 -16
  1133. package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.js.map +1 -1
  1134. package/dist/esm/security/authentications/sso/sso-config.shared.schemas.d.ts.map +1 -1
  1135. package/dist/esm/security/authentications/sso/sso-config.shared.schemas.js +28 -25
  1136. package/dist/esm/security/authentications/sso/sso-config.shared.schemas.js.map +1 -1
  1137. package/dist/esm/security/authentications/sso/sso-connection.shared.resources-config.schemas.d.ts +17 -6
  1138. package/dist/esm/security/authentications/sso/sso-connection.shared.resources-config.schemas.d.ts.map +1 -1
  1139. package/dist/esm/security/authentications/sso/sso-connection.shared.resources-config.schemas.js +90 -38
  1140. package/dist/esm/security/authentications/sso/sso-connection.shared.resources-config.schemas.js.map +1 -1
  1141. package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.d.ts +0 -24
  1142. package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.d.ts.map +1 -1
  1143. package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.js +79 -68
  1144. package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.js.map +1 -1
  1145. package/dist/esm/security/authorizations/administrative-continuity.shared.schemas.d.ts +8 -1
  1146. package/dist/esm/security/authorizations/administrative-continuity.shared.schemas.d.ts.map +1 -1
  1147. package/dist/esm/security/authorizations/administrative-continuity.shared.schemas.js +7 -0
  1148. package/dist/esm/security/authorizations/administrative-continuity.shared.schemas.js.map +1 -1
  1149. package/dist/esm/security/authorizations/application-access-grants.shared.resources-config.schemas.d.ts.map +1 -1
  1150. package/dist/esm/security/authorizations/application-access-grants.shared.resources-config.schemas.js +1 -1
  1151. package/dist/esm/security/authorizations/application-access-grants.shared.resources-config.schemas.js.map +1 -1
  1152. package/dist/esm/security/authorizations/application-access-grants.shared.schemas.d.ts.map +1 -1
  1153. package/dist/esm/security/authorizations/application-access-grants.shared.schemas.js.map +1 -1
  1154. package/dist/esm/security/authorizations/platform-access-grants.shared.resources-config.schemas.d.ts.map +1 -1
  1155. package/dist/esm/security/authorizations/platform-access-grants.shared.resources-config.schemas.js +7 -7
  1156. package/dist/esm/security/authorizations/platform-access-grants.shared.resources-config.schemas.js.map +1 -1
  1157. package/dist/esm/security/authorizations/platform-access-grants.shared.schemas.d.ts.map +1 -1
  1158. package/dist/esm/security/authorizations/platform-access-grants.shared.schemas.js.map +1 -1
  1159. package/dist/esm/security/authorizations/roles.shared.defaults.d.ts.map +1 -1
  1160. package/dist/esm/security/authorizations/roles.shared.defaults.js +56 -0
  1161. package/dist/esm/security/authorizations/roles.shared.defaults.js.map +1 -1
  1162. package/dist/esm/security/authorizations/roles.shared.schemas.d.ts +77 -1
  1163. package/dist/esm/security/authorizations/roles.shared.schemas.d.ts.map +1 -1
  1164. package/dist/esm/security/authorizations/roles.shared.schemas.js +90 -0
  1165. package/dist/esm/security/authorizations/roles.shared.schemas.js.map +1 -1
  1166. package/dist/esm/security/authorizations/roles.shared.utils.d.ts.map +1 -1
  1167. package/dist/esm/security/authorizations/roles.shared.utils.js.map +1 -1
  1168. package/dist/esm/security/connected-accounts/provider-connection-listing.shared.schemas.d.ts +86 -0
  1169. package/dist/esm/security/connected-accounts/provider-connection-listing.shared.schemas.d.ts.map +1 -0
  1170. package/dist/esm/security/connected-accounts/provider-connection-listing.shared.schemas.js +40 -0
  1171. package/dist/esm/security/connected-accounts/provider-connection-listing.shared.schemas.js.map +1 -0
  1172. package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.d.ts +2 -1
  1173. package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.d.ts.map +1 -1
  1174. package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.js +2 -1
  1175. package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.js.map +1 -1
  1176. package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.d.ts +2 -1
  1177. package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.d.ts.map +1 -1
  1178. package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.js +2 -1
  1179. package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.js.map +1 -1
  1180. package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.d.ts +46 -14
  1181. package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.d.ts.map +1 -1
  1182. package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.js +81 -21
  1183. package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.js.map +1 -1
  1184. package/dist/esm/security/credential-rotation-grace.shared.utils.d.ts +69 -0
  1185. package/dist/esm/security/credential-rotation-grace.shared.utils.d.ts.map +1 -0
  1186. package/dist/esm/security/credential-rotation-grace.shared.utils.js +77 -0
  1187. package/dist/esm/security/credential-rotation-grace.shared.utils.js.map +1 -0
  1188. package/dist/esm/security/crypto-keys/crypto-keys.shared.schemas.d.ts.map +1 -1
  1189. package/dist/esm/security/crypto-keys/crypto-keys.shared.schemas.js.map +1 -1
  1190. package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.d.ts.map +1 -1
  1191. package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.js +28 -8
  1192. package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.js.map +1 -1
  1193. package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.d.ts +3 -1
  1194. package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.d.ts.map +1 -1
  1195. package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.js +89 -14
  1196. package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.js.map +1 -1
  1197. package/dist/esm/security/oauth-clients/oauth-clients.shared.schemas.d.ts +1 -0
  1198. package/dist/esm/security/oauth-clients/oauth-clients.shared.schemas.d.ts.map +1 -1
  1199. package/dist/esm/security/oauth-clients/oauth-clients.shared.schemas.js +25 -4
  1200. package/dist/esm/security/oauth-clients/oauth-clients.shared.schemas.js.map +1 -1
  1201. package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.resources-config.schemas.d.ts.map +1 -1
  1202. package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.resources-config.schemas.js.map +1 -1
  1203. package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.schemas.d.ts.map +1 -1
  1204. package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.schemas.js.map +1 -1
  1205. package/dist/esm/security/oauth-clients/oauth-resource-server.shared.schemas.d.ts.map +1 -1
  1206. package/dist/esm/security/oauth-clients/oauth-resource-server.shared.schemas.js.map +1 -1
  1207. package/dist/esm/security/outbound-target-control.shared.schemas.d.ts +7 -1
  1208. package/dist/esm/security/outbound-target-control.shared.schemas.d.ts.map +1 -1
  1209. package/dist/esm/security/outbound-target-control.shared.schemas.js +6 -0
  1210. package/dist/esm/security/outbound-target-control.shared.schemas.js.map +1 -1
  1211. package/dist/esm/security/submission-challenge/submission-challenge.shared.d.ts +143 -0
  1212. package/dist/esm/security/submission-challenge/submission-challenge.shared.d.ts.map +1 -0
  1213. package/dist/esm/security/submission-challenge/submission-challenge.shared.js +123 -0
  1214. package/dist/esm/security/submission-challenge/submission-challenge.shared.js.map +1 -0
  1215. package/dist/esm/systems-of-record/system-of-record-actions.shared.schemas.d.ts +384 -0
  1216. package/dist/esm/systems-of-record/system-of-record-actions.shared.schemas.d.ts.map +1 -0
  1217. package/dist/esm/systems-of-record/system-of-record-actions.shared.schemas.js +327 -0
  1218. package/dist/esm/systems-of-record/system-of-record-actions.shared.schemas.js.map +1 -0
  1219. package/dist/esm/systems-of-record/system-of-record-credential-kind.shared.d.ts.map +1 -1
  1220. package/dist/esm/systems-of-record/system-of-record-credential-kind.shared.js.map +1 -1
  1221. package/dist/esm/systems-of-record/system-of-record-declaration.shared.schemas.d.ts +121 -8
  1222. package/dist/esm/systems-of-record/system-of-record-declaration.shared.schemas.d.ts.map +1 -1
  1223. package/dist/esm/systems-of-record/system-of-record-declaration.shared.schemas.js +83 -4
  1224. package/dist/esm/systems-of-record/system-of-record-declaration.shared.schemas.js.map +1 -1
  1225. package/dist/esm/systems-of-record/system-of-record-env.shared.d.ts.map +1 -1
  1226. package/dist/esm/systems-of-record/system-of-record-env.shared.js.map +1 -1
  1227. package/dist/esm/systems-of-record/system-of-record-error-codes.shared.d.ts +266 -8
  1228. package/dist/esm/systems-of-record/system-of-record-error-codes.shared.d.ts.map +1 -1
  1229. package/dist/esm/systems-of-record/system-of-record-error-codes.shared.js +291 -7
  1230. package/dist/esm/systems-of-record/system-of-record-error-codes.shared.js.map +1 -1
  1231. package/dist/esm/systems-of-record/system-of-record-facet.shared.schemas.d.ts +313 -3
  1232. package/dist/esm/systems-of-record/system-of-record-facet.shared.schemas.d.ts.map +1 -1
  1233. package/dist/esm/systems-of-record/system-of-record-facet.shared.schemas.js +369 -3
  1234. package/dist/esm/systems-of-record/system-of-record-facet.shared.schemas.js.map +1 -1
  1235. package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.resources-config.schemas.d.ts.map +1 -1
  1236. package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.resources-config.schemas.js +2 -1
  1237. package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.resources-config.schemas.js.map +1 -1
  1238. package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.schemas.d.ts.map +1 -1
  1239. package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.schemas.js.map +1 -1
  1240. package/dist/esm/testing/resource-config-builders.d.ts.map +1 -1
  1241. package/dist/esm/testing/resource-config-builders.js.map +1 -1
  1242. package/dist/esm/testing.d.ts.map +1 -1
  1243. package/dist/esm/testing.js.map +1 -1
  1244. package/dist/esm/users/anonymous-user-marketing-metadata.shared.schemas.d.ts.map +1 -1
  1245. package/dist/esm/users/anonymous-user-marketing-metadata.shared.schemas.js.map +1 -1
  1246. package/dist/esm/users/anonymous-users.shared.resources-config.schemas.d.ts +5 -3
  1247. package/dist/esm/users/anonymous-users.shared.resources-config.schemas.d.ts.map +1 -1
  1248. package/dist/esm/users/anonymous-users.shared.resources-config.schemas.js +19 -10
  1249. package/dist/esm/users/anonymous-users.shared.resources-config.schemas.js.map +1 -1
  1250. package/dist/esm/users/anonymous-users.shared.schema.d.ts.map +1 -1
  1251. package/dist/esm/users/anonymous-users.shared.schema.js.map +1 -1
  1252. package/dist/esm/users/inbound-contacts.shared.resources-config.schemas.d.ts.map +1 -1
  1253. package/dist/esm/users/inbound-contacts.shared.resources-config.schemas.js +6 -0
  1254. package/dist/esm/users/inbound-contacts.shared.resources-config.schemas.js.map +1 -1
  1255. package/dist/esm/users/inbound-contacts.shared.schemas.d.ts.map +1 -1
  1256. package/dist/esm/users/inbound-contacts.shared.schemas.js.map +1 -1
  1257. package/dist/esm/users/user-consent-decision.shared.utils.d.ts.map +1 -1
  1258. package/dist/esm/users/user-consent-decision.shared.utils.js.map +1 -1
  1259. package/dist/esm/users/user-credentials.shared.resources-config.schemas.d.ts.map +1 -1
  1260. package/dist/esm/users/user-credentials.shared.resources-config.schemas.js.map +1 -1
  1261. package/dist/esm/users/user-credentials.shared.schemas.d.ts.map +1 -1
  1262. package/dist/esm/users/user-credentials.shared.schemas.js.map +1 -1
  1263. package/dist/esm/users/user-identity-links.shared.resources-config.schemas.d.ts.map +1 -1
  1264. package/dist/esm/users/user-identity-links.shared.resources-config.schemas.js.map +1 -1
  1265. package/dist/esm/users/user-identity-links.shared.schemas.d.ts.map +1 -1
  1266. package/dist/esm/users/user-identity-links.shared.schemas.js.map +1 -1
  1267. package/dist/esm/users/user-preferences-reset.shared.utils.d.ts.map +1 -1
  1268. package/dist/esm/users/user-preferences-reset.shared.utils.js +2 -2
  1269. package/dist/esm/users/user-preferences-reset.shared.utils.js.map +1 -1
  1270. package/dist/esm/users/user-preferences.shared.resources-config.schemas.d.ts +0 -3
  1271. package/dist/esm/users/user-preferences.shared.resources-config.schemas.d.ts.map +1 -1
  1272. package/dist/esm/users/user-preferences.shared.resources-config.schemas.js.map +1 -1
  1273. package/dist/esm/users/user-profiles.shared.resources-config.schemas.d.ts.map +1 -1
  1274. package/dist/esm/users/user-profiles.shared.resources-config.schemas.js.map +1 -1
  1275. package/dist/esm/users/user-self-preferences.shared.resources-config.schemas.d.ts +0 -3
  1276. package/dist/esm/users/user-self-preferences.shared.resources-config.schemas.d.ts.map +1 -1
  1277. package/dist/esm/users/user-self-preferences.shared.resources-config.schemas.js.map +1 -1
  1278. package/dist/esm/users/user-self-profiles.shared.resources-config.schemas.d.ts.map +1 -1
  1279. package/dist/esm/users/user-self-profiles.shared.resources-config.schemas.js.map +1 -1
  1280. package/dist/esm/users/user-self.shared.resources-config.schemas.d.ts.map +1 -1
  1281. package/dist/esm/users/user-self.shared.resources-config.schemas.js +1 -1
  1282. package/dist/esm/users/user-self.shared.resources-config.schemas.js.map +1 -1
  1283. package/dist/esm/users/users.shared.resources-config.schemas.d.ts.map +1 -1
  1284. package/dist/esm/users/users.shared.resources-config.schemas.js +82 -20
  1285. package/dist/esm/users/users.shared.resources-config.schemas.js.map +1 -1
  1286. package/dist/esm/users/users.shared.schemas.d.ts +12 -9
  1287. package/dist/esm/users/users.shared.schemas.d.ts.map +1 -1
  1288. package/dist/esm/users/users.shared.schemas.js +49 -18
  1289. package/dist/esm/users/users.shared.schemas.js.map +1 -1
  1290. package/dist/tsconfig.build.tsbuildinfo +1 -1
  1291. package/package.json +4 -4
  1292. package/dist/esm/compliance/privacy/data-retention.shared.schemas.d.ts +0 -8
  1293. package/dist/esm/compliance/privacy/data-retention.shared.schemas.d.ts.map +0 -1
  1294. package/dist/esm/compliance/privacy/data-retention.shared.schemas.js +0 -7
  1295. package/dist/esm/compliance/privacy/data-retention.shared.schemas.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"inbound-contacts.shared.schemas.js","sourceRoot":"","sources":["../../../../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C,QAAQ,CAAC,EACpF,aAAa,CAAC,MAAM,CACrB;IACD,KAAK,EAAG,oBAAoB,CAC1B,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,cAAc,CAAC,oBAAoB,CAAC,eAAe,CAAC,EAC1E,aAAa,CAAC,MAAM,CACrB;IAED;;;;;;;;;;;;;;;;;OAiBG;IACH,eAAe,EAAG,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,WAAW,EAAE,CAAC,iBAAiB,EAAE,CAAC,aAAa,EAAE;IAEzF;;;;;;;OAOG;IACH,MAAM,EAAG,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,WAAW,EAAE,CAAC,iBAAiB,EAAE,CAAC,aAAa,EAAE;IAEhF;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,aAAa,EAAG,CAAC,CAAC,MAAM,EAAE,CAAC,WAAW,EAAE,CAAC,QAAQ,EAAE,CAAC,iBAAiB,EAAE;IAEvE;;;;;;;;;;;;;;;;OAgBG;IACH,cAAc,EAAG,CAAC,CAAC,IAAI,CAAC,4BAA4B,CAAC,CAAC,OAAO,CAAC,4BAA4B,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC,iBAAiB,EAAE,CAAC,iBAAiB,EAAE,CAAC,aAAa,EAAE;IAEtK;;;;;;;;OAQG;IACH,SAAS,EAAG,CAAC,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,cAAc,EAAE,CAAC,iBAAiB,EAAE,CAAC,iBAAiB,EAAE;IAC3F,SAAS,EAAG,CAAC,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,iBAAiB,EAAE,CAAC,iBAAiB,EAAE;IAC1E,OAAO,EAAG,2BAA2B;CACxC,CAAC,CAAC","sourcesContent":["import { z } from \"zod\";\nimport { addImpersonalizeWith } from '@wildo-ai/zod-decorators';\nimport { RedactionType } from '../compliance/privacy/redaction.shared.schemas';\nimport { ERASED_USER_EMAIL } from './users.shared.schemas';\nimport { InboundContactPrivacySchema } from \"../compliance/privacy/privacy.shared.schemas\";\nimport { PersonalDataCategory } from '../compliance/privacy/personal-data-category.shared.schemas';\n\n\n/**\n * Server-computed lead-triage signal: whether the lead's email corresponded to\n * an existing `users` account at capture time, and — because the caller only\n * flagged \"active, or not\" — whether that account was ACTIVE.\n *\n * This is a TRIAGE / dedup HINT, **not** an ownership link. It NEVER sets\n * `userId`/`relatedUserId`: an anonymous visitor typing an email does not prove\n * they own it, so attributing the lead to a real account on an unverified string\n * would be an account-takeover hole. Ownership is established only by proven\n * authentication (the transposition hook) or a manual sales tag (`relatedUserId`).\n */\nexport enum InboundContactEmailUserMatch {\n /** No existing `users` row carried this email at capture time. */\n NONE = 'NONE',\n /** Email matched an existing user whose lifecycle `status` is `ACTIVE`. */\n ACTIVE_USER = 'ACTIVE_USER',\n /**\n * Email matched an existing user that is NOT active — any of `INACTIVE`,\n * `SUSPENDED`, `PENDING_VERIFICATION`, `PENDING_INVITATION`, `DELETED`.\n */\n INACTIVE_USER = 'INACTIVE_USER',\n}\n\n\n/**\n * InboundContact — lead / contact-form submission captured from the\n * public marketing site (Phase 0.5). APPLICATION-scoped (Q-E=B), no\n * `isAnonymizable: true` — transposition is handled by a focused\n * manual hook in `AnonymousSessionBackendService.transposeOwnership`\n * that updates `{ anonymousUserId, userId }` (see\n * .cursor/plans/saas-website-slice.md § 0.5.a).\n *\n * Attribution data (UTM, referrer, landing path, IP fingerprint) does\n * NOT live here. It lives ONCE on `AnonymousUser` (Q-D=β first-touch\n * attribution); analytics joins via the `anonymousUserId` FK.\n */\nexport const InboundContactSchema = z.object({\n\n _id : z.string().isPrimaryKey().isSummaryField(),\n email : addImpersonalizeWith(\n z.email().isSummaryField().dataCategories(PersonalDataCategory.CONTACT_DETAILS),\n RedactionType.MASK,\n { maskValue: ERASED_USER_EMAIL },\n ),\n firstName : addImpersonalizeWith(\n z.string().optional().isSummaryField().dataCategories(PersonalDataCategory.IDENTITY),\n RedactionType.REMOVE,\n ),\n lastName : addImpersonalizeWith(\n z.string().optional().isSummaryField().dataCategories(PersonalDataCategory.IDENTITY),\n RedactionType.REMOVE,\n ),\n phone : addImpersonalizeWith(\n z.string().optional().dataCategories(PersonalDataCategory.CONTACT_DETAILS),\n RedactionType.REMOVE,\n ),\n\n /**\n * Anonymous session that created this lead. FK to `AnonymousUser`.\n * Carries first-touch marketing attribution (utm, referrer,\n * landingPath) via `AnonymousUser.marketingMetadata` (Q-D=β —\n * attribution lives on the session, not the conversion row).\n * Cleared to `null` by the manual transposition hook on\n * `AnonymousSessionBackendService` once the user converts and\n * `userId` is set.\n *\n * Server-set on anonymous-session creates by the write-path context\n * enrichment (`ResourceOperationHelperBackendService.enrichDataWithContext`),\n * which injects `executionContext.initiatorIds.anonymousUserId` — the client\n * `uuidRef` (the AnonymousUser's relational identity), NOT its server-minted\n * `_id`. This resource is APPLICATION-scoped and standalone-created (no nested\n * `/anonymous-users/{uuidRef}/…` URL segment carries the FK, and it is\n * deliberately NOT `isAnonymizable`), so the enrichment resolves the FK from the\n * anonymous initiator identity rather than the URL scope map. Never client-authored.\n */\n anonymousUserId : z.string().nullable().isDBIndexed().excludeFromCreate().isBackendOnly(),\n\n /**\n * Authenticated user AFTER anonymous-session transposition (W7.3a).\n * Auto-set by the manual transposition hook on\n * `AnonymousSessionBackendService` when the anonymous user signs up\n * or logs in. `null` for leads that never converted to an\n * authenticated user. Distinct from `relatedUserId` below — see\n * `relatedUserId` JSDoc for the semantic boundary.\n */\n userId : z.string().nullable().isDBIndexed().excludeFromCreate().isBackendOnly(),\n\n /**\n * Manually-linked existing customer profile by sales / support\n * (e.g. a salesperson tags an inbound lead as \"this is the same\n * human as CRM contact X\"). **Not** auto-populated by\n * anonymous-session transposition — that slot is `userId` above.\n *\n * A lead can legitimately have both populated:\n * - `userId` = the user who eventually signed up from this\n * lead session (auto-set by transposition).\n * - `relatedUserId` = the user a human rep manually associated\n * (may be a different person, e.g. the lead is\n * for a colleague of an existing customer).\n *\n * Kept on the schema for zero-cost preservation (no migration);\n * the disambiguating JSDoc here exists so future readers do not\n * conflate it with `userId`.\n *\n * `.excludeFromCreate()` is a HARD requirement, not polish: the public\n * INBOUND_CONTACTS CREATE is anonymous (`APP_ANONYMOUS`), so a client-\n * authorable `relatedUserId` would let an unauthenticated visitor tag a\n * lead as \"related to\" an arbitrary existing user (a data-integrity /\n * attribution-forgery hole). It is set ONLY post-create by a sales/support\n * admin via a privileged update, never on the public capture request.\n */\n relatedUserId : z.string().isDBIndexed().optional().excludeFromCreate(),\n\n /**\n * Lead-triage signal (see `InboundContactEmailUserMatch`): did this lead's\n * email match an existing user at capture time, and was that user active?\n *\n * Server-computed by the INBOUND_CONTACTS CREATE custom implementation\n * (`prefixCoreOperations`) via a privileged users-by-email lookup — the\n * anonymous create context cannot read `users`, so the lookup runs in a\n * dedicated internal super-admin context and the result is stamped here.\n *\n * `.isBackendOnly()` is a HARD requirement, not polish: the CREATE response\n * is returned to the anonymous submitter, so exposing the match would turn\n * lead capture into an account-enumeration oracle. Backend-only keeps it out\n * of every client response; admin / analytics surfaces read it through the\n * internal DTO. `.excludeFromCreate()` (server-set, never client-authored)\n * and `.excludeFromUpdate()` (immutable capture-time snapshot); `.default`\n * `NONE` is the fail-safe when the email is absent or the lookup fails.\n */\n emailUserMatch : z.enum(InboundContactEmailUserMatch).default(InboundContactEmailUserMatch.NONE).isDBIndexed().excludeFromCreate().excludeFromUpdate().isBackendOnly(),\n\n /**\n * Mongoose-managed timestamps. Declared `z.date()` (NOT `z.iso.datetime()`)\n * because the persistence layer stores them as BSON `Date`s and the DTO\n * builder's network-boundary coercion (`applyNetworkBoundaryCoercion`)\n * rewrites `z.date()` → `z.coerce.date()`. A `z.iso.datetime()` string validator would\n * reject the stored `Date` on the output/internalDto parse → HTTP 500\n * `service_resource_transformation_failed` on every create/read. Matches the\n * framework-wide timestamp convention (35+ resources, e.g. `AnonymousUser`).\n */\n createdAt : z.date().isDBIndexed().isSummaryField().excludeFromCreate().excludeFromUpdate(),\n updatedAt : z.date().isDBIndexed().excludeFromCreate().excludeFromUpdate(),\n privacy : InboundContactPrivacySchema,\n});\n\n\nexport type InboundContact = z.infer<typeof InboundContactSchema>;\n"]}
1
+ {"version":3,"file":"inbound-contacts.shared.schemas.js","sourceRoot":"","sources":["../../../src/users/inbound-contacts.shared.schemas.ts"],"names":[],"mappings":"AAAA,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,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,2BAA2B,EAAE,MAAM,8CAA8C,CAAC;AAC3F,OAAO,EAAE,oBAAoB,EAAE,MAAM,6DAA6D,CAAC;AAGnG;;;;;;;;;;GAUG;AACH,MAAM,CAAN,IAAY,4BAUX;AAVD,WAAY,4BAA4B;IACtC,kEAAkE;IAClE,6CAAa,CAAA;IACb,2EAA2E;IAC3E,2DAA2B,CAAA;IAC3B;;;OAGG;IACH,+DAA+B,CAAA;AACjC,CAAC,EAVW,4BAA4B,KAA5B,4BAA4B,QAUvC;AAGD;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAEzC,GAAG,EAAG,CAAC,CAAC,MAAM,EAAE,CAAC,YAAY,EAAE,CAAC,cAAc,EAAE;IAChD,KAAK,EAAG,oBAAoB,CAC1B,CAAC,CAAC,KAAK,EAAE,CAAC,cAAc,EAAE,CAAC,cAAc,CAAC,oBAAoB,CAAC,eAAe,CAAC,EAC/E,aAAa,CAAC,IAAI,EAClB,EAAE,SAAS,EAAE,iBAAiB,EAAE,CACjC;IACD,SAAS,EAAG,oBAAoB,CAC9B,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC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C,WAAW,EAAE,CAAC,iBAAiB,EAAE,CAAC,iBAAiB,EAAE;IAC1E,OAAO,EAAG,2BAA2B;CACxC,CAAC,CAAC","sourcesContent":["import { z } from \"zod\";\nimport { addImpersonalizeWith } from '@wildo-ai/zod-decorators';\nimport { RedactionType } from '../compliance/privacy/redaction.shared.schemas';\nimport { ERASED_USER_EMAIL } from './users.shared.schemas';\nimport { InboundContactPrivacySchema } from \"../compliance/privacy/privacy.shared.schemas\";\nimport { PersonalDataCategory } from '../compliance/privacy/personal-data-category.shared.schemas';\n\n\n/**\n * Server-computed lead-triage signal: whether the lead's email corresponded to\n * an existing `users` account at capture time, and — because the caller only\n * flagged \"active, or not\" — whether that account was ACTIVE.\n *\n * This is a TRIAGE / dedup HINT, **not** an ownership link. It NEVER sets\n * `userId`/`relatedUserId`: an anonymous visitor typing an email does not prove\n * they own it, so attributing the lead to a real account on an unverified string\n * would be an account-takeover hole. Ownership is established only by proven\n * authentication (the transposition hook) or a manual sales tag (`relatedUserId`).\n */\nexport enum InboundContactEmailUserMatch {\n /** No existing `users` row carried this email at capture time. */\n NONE = 'NONE',\n /** Email matched an existing user whose lifecycle `status` is `ACTIVE`. */\n ACTIVE_USER = 'ACTIVE_USER',\n /**\n * Email matched an existing user that is NOT active — any of `INACTIVE`,\n * `SUSPENDED`, `PENDING_VERIFICATION`, `PENDING_INVITATION`, `DELETED`.\n */\n INACTIVE_USER = 'INACTIVE_USER',\n}\n\n\n/**\n * InboundContact — lead / contact-form submission captured from the\n * public marketing site (Phase 0.5). APPLICATION-scoped (Q-E=B), no\n * `isAnonymizable: true` — transposition is handled by a focused\n * manual hook in `AnonymousSessionBackendService.transposeOwnership`\n * that updates `{ anonymousUserId, userId }` (see\n * .cursor/plans/saas-website-slice.md § 0.5.a).\n *\n * Attribution data (UTM, referrer, landing path, IP fingerprint) does\n * NOT live here. It lives ONCE on `AnonymousUser` (Q-D=β first-touch\n * attribution); analytics joins via the `anonymousUserId` FK.\n */\nexport const InboundContactSchema = z.object({\n\n _id : z.string().isPrimaryKey().isSummaryField(),\n email : addImpersonalizeWith(\n z.email().isSummaryField().dataCategories(PersonalDataCategory.CONTACT_DETAILS),\n RedactionType.MASK,\n { maskValue: ERASED_USER_EMAIL },\n ),\n firstName : addImpersonalizeWith(\n z.string().optional().isSummaryField().dataCategories(PersonalDataCategory.IDENTITY),\n RedactionType.REMOVE,\n ),\n lastName : addImpersonalizeWith(\n z.string().optional().isSummaryField().dataCategories(PersonalDataCategory.IDENTITY),\n RedactionType.REMOVE,\n ),\n phone : addImpersonalizeWith(\n z.string().optional().dataCategories(PersonalDataCategory.CONTACT_DETAILS),\n RedactionType.REMOVE,\n ),\n\n /**\n * Anonymous session that created this lead. FK to `AnonymousUser`.\n * Carries first-touch marketing attribution (utm, referrer,\n * landingPath) via `AnonymousUser.marketingMetadata` (Q-D=β —\n * attribution lives on the session, not the conversion row).\n * Cleared to `null` by the manual transposition hook on\n * `AnonymousSessionBackendService` once the user converts and\n * `userId` is set.\n *\n * Server-set on anonymous-session creates by the write-path context\n * enrichment (`ResourceOperationHelperBackendService.enrichDataWithContext`),\n * which injects `executionContext.initiatorIds.anonymousUserId` — the client\n * `uuidRef` (the AnonymousUser's relational identity), NOT its server-minted\n * `_id`. This resource is APPLICATION-scoped and standalone-created (no nested\n * `/anonymous-users/{uuidRef}/…` URL segment carries the FK, and it is\n * deliberately NOT `isAnonymizable`), so the enrichment resolves the FK from the\n * anonymous initiator identity rather than the URL scope map. Never client-authored.\n */\n anonymousUserId : z.string().nullable().isDBIndexed().excludeFromCreate().isBackendOnly(),\n\n /**\n * Authenticated user AFTER anonymous-session transposition (W7.3a).\n * Auto-set by the manual transposition hook on\n * `AnonymousSessionBackendService` when the anonymous user signs up\n * or logs in. `null` for leads that never converted to an\n * authenticated user. Distinct from `relatedUserId` below — see\n * `relatedUserId` JSDoc for the semantic boundary.\n */\n userId : z.string().nullable().isDBIndexed().excludeFromCreate().isBackendOnly(),\n\n /**\n * Manually-linked existing customer profile by sales / support\n * (e.g. a salesperson tags an inbound lead as \"this is the same\n * human as CRM contact X\"). **Not** auto-populated by\n * anonymous-session transposition — that slot is `userId` above.\n *\n * A lead can legitimately have both populated:\n * - `userId` = the user who eventually signed up from this\n * lead session (auto-set by transposition).\n * - `relatedUserId` = the user a human rep manually associated\n * (may be a different person, e.g. the lead is\n * for a colleague of an existing customer).\n *\n * Kept on the schema for zero-cost preservation (no migration);\n * the disambiguating JSDoc here exists so future readers do not\n * conflate it with `userId`.\n *\n * `.excludeFromCreate()` is a HARD requirement, not polish: the public\n * INBOUND_CONTACTS CREATE is anonymous (`APP_ANONYMOUS`), so a client-\n * authorable `relatedUserId` would let an unauthenticated visitor tag a\n * lead as \"related to\" an arbitrary existing user (a data-integrity /\n * attribution-forgery hole). It is set ONLY post-create by a sales/support\n * admin via a privileged update, never on the public capture request.\n */\n relatedUserId : z.string().isDBIndexed().optional().excludeFromCreate(),\n\n /**\n * Lead-triage signal (see `InboundContactEmailUserMatch`): did this lead's\n * email match an existing user at capture time, and was that user active?\n *\n * Server-computed by the INBOUND_CONTACTS CREATE custom implementation\n * (`prefixCoreOperations`) via a privileged users-by-email lookup — the\n * anonymous create context cannot read `users`, so the lookup runs in a\n * dedicated internal super-admin context and the result is stamped here.\n *\n * `.isBackendOnly()` is a HARD requirement, not polish: the CREATE response\n * is returned to the anonymous submitter, so exposing the match would turn\n * lead capture into an account-enumeration oracle. Backend-only keeps it out\n * of every client response; admin / analytics surfaces read it through the\n * internal DTO. `.excludeFromCreate()` (server-set, never client-authored)\n * and `.excludeFromUpdate()` (immutable capture-time snapshot); `.default`\n * `NONE` is the fail-safe when the email is absent or the lookup fails.\n */\n emailUserMatch : z.enum(InboundContactEmailUserMatch).default(InboundContactEmailUserMatch.NONE).isDBIndexed().excludeFromCreate().excludeFromUpdate().isBackendOnly(),\n\n /**\n * Mongoose-managed timestamps. Declared `z.date()` (NOT `z.iso.datetime()`)\n * because the persistence layer stores them as BSON `Date`s and the DTO\n * builder's network-boundary coercion (`applyNetworkBoundaryCoercion`)\n * rewrites `z.date()` → `z.coerce.date()`. A `z.iso.datetime()` string validator would\n * reject the stored `Date` on the output/internalDto parse → HTTP 500\n * `service_resource_transformation_failed` on every create/read. Matches the\n * framework-wide timestamp convention (35+ resources, e.g. `AnonymousUser`).\n */\n createdAt : z.date().isDBIndexed().isSummaryField().excludeFromCreate().excludeFromUpdate(),\n updatedAt : z.date().isDBIndexed().excludeFromCreate().excludeFromUpdate(),\n privacy : InboundContactPrivacySchema,\n});\n\n\nexport type InboundContact = z.infer<typeof InboundContactSchema>;\n"]}
@@ -1 +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"}
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"}
@@ -1 +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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AC,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"]}
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,iBAAiB,CAAC,CAAC;IAErF,MAAM,UAAU,GAAG,YAAY,CAAC,MAAM,KAAK,gBAAgB,CAAC,MAAM;WAC7D,YAAY,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,KAAK,EAAE,EAAE,CA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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"]}
@@ -1 +1 @@
1
- {"version":3,"file":"user-credentials.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["../../../../src/users/user-credentials.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,OAAO,EAAE,qBAAqB,EAAwD,MAAM,gDAAgD,CAAC;AAC7I,OAAO,EAA4D,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAGvI;;;;;;GAMG;AACH,eAAO,MAAM,0DAA0D,GACrE,wBAAwB,oBAAoB,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAsH9C,CAAC"}
1
+ {"version":3,"file":"user-credentials.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["../../../src/users/user-credentials.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,OAAO,EAAE,qBAAqB,EAAwD,MAAM,gDAAgD,CAAC;AAC7I,OAAO,EAA4D,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAGvI;;;;;;GAMG;AACH,eAAO,MAAM,0DAA0D,GACrE,wBAAwB,oBAAoB,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAsH9C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"user-credentials.shared.resources-config.schemas.js","sourceRoot":"","sources":["../../../../src/users/user-credentials.shared.resources-config.schemas.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,MAAM,wDAAwD,CAAC;AACvH,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CA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0B,CAAC,MAAM;iBAC7C;aACF;SACF;QACD,CAAC,qBAAqB,CAAC,MAAM,CAAC,EAAE;YAC9B,QAAQ,EAAE;gBACR;oBACE,WAAW,EAAE,4BAA4B,CAAC,aAAa;oBACvD,SAAS,EAAE,IAAI;oBACf,KAAK,EAAE,CAAC,cAAc,CAAC,qBAAqB,CAAC;oBAC7C,SAAS,EAAE,0BAA0B,CAAC,QAAQ;iBAC/C;aACF;SACF;KACF;CACF,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\nimport { ErasureRetentionMode, ResourceDataSubjectKind } from '../compliance/privacy/impersonalization.shared.schemas';\nimport { UserCredentialsSchema } from './user-credentials.shared.schemas';\nimport { createResourceConfiguration_Initialization } from '../resources/resources-config.shared.factory';\nimport { ResourceSystemAccessMode } from '../resources/resources-config.shared.schemas';\nimport { CoreResourceOperation, CoreResourceType, coreResourceShared_FieldIdentifier } from '../resources/resources.shared.core.definitions';\nimport { ResourceOperationRiskLevel, ResourceOperationVariantType, ResourceRelationship } from '../resources/resources.shared.schemas';\nimport { CORE_APP_ROLES } from '../security/authorizations/roles.shared.schemas';\n\n/**\n * User Credentials Resource Configuration (Internal-only)\n *\n * System resource — no auto-generated API controller.\n * Operations are INTERNAL_CALL: accessible through the service layer pipeline\n * by trusted internal code, but not exposed as HTTP endpoints.\n */\nexport const userCredentialsResourceConfiguration_InitializationFactory = (\n resourcesRelationships: ResourceRelationship[]\n) => createResourceConfiguration_Initialization<undefined,\n CoreResourceOperation.READ | CoreResourceOperation.LIST | CoreResourceOperation.CREATE | CoreResourceOperation.UPDATE | CoreResourceOperation.DELETE | CoreResourceOperation.UPDATE_MANY,\n typeof UserCredentialsSchema\n>({\n mainSchema: UserCredentialsSchema,\n resourceIdentifier: CoreResourceType.USER_CREDENTIALS,\n resourceFieldIdentifier: coreResourceShared_FieldIdentifier[CoreResourceType.USER_CREDENTIALS],\n resourceRelationships: resourcesRelationships,\n isSystemResource: true,\n // Registration / password-reset / MFA flows write credentials in-process on a\n // pre-auth (or system) EC that carries no request context, so the client-shaped\n // request DTO would strip `userId` (context FK) and `passwordHash` /\n // `secretBase32` / … (backendOnly). Opt CREATE + UPDATE into the trusted\n // `createAsSystem` / `updateAsSystem` path, which re-attaches exactly those\n // fields after the strict parse. INTERNAL_CALL-only resource → never HTTP-reachable.\n systemAccessPolicy: {\n exportSubject: ResourceSystemAccessMode.FORBIDDEN, create: ResourceSystemAccessMode.ALLOWED, update: ResourceSystemAccessMode.ALLOWED },\n\n /**\n * Subject erasure scrubs-and-RETAINS the credentials row.\n *\n * `RETAIN_AND_IMPERSONALIZE`: the row holds the password hash and the hashed backup codes, and both\n * are REMOVEd. Retaining rather than deleting keeps the row's foreign key to the retained identity\n * row resolvable — the same reason `USERS` is retained — while the secrets themselves are provably\n * gone, which is the statement a notice can actually make.\n *\n * A credential outliving its subject is the worst case here, so both fields are nulled rather than\n * masked: a masked hash is still a string a verifier will attempt, and \"it never matches\" is a\n * property of the value, not a guarantee.\n */\n retentionPolicy: {\n mode: ErasureRetentionMode.RETAIN_AND_IMPERSONALIZE,\n },\n\n /** The subject is the person these credentials authenticate, reached through `userId`. */\n dataSubjectPolicy: { kind: ResourceDataSubjectKind.SELF_PRINCIPAL },\n\n coreOperations: [\n CoreResourceOperation.READ,\n CoreResourceOperation.LIST,\n CoreResourceOperation.CREATE,\n CoreResourceOperation.UPDATE,\n CoreResourceOperation.DELETE,\n // Route-less; required by `retentionPolicy` (the in-place scrub).\n CoreResourceOperation.UPDATE_MANY,\n ],\n operationsConfiguration: {\n /*\n * Route-less retention plumbing. `retentionPolicy` requires UPDATE_MANY — the impersonalize writer\n * scrubs rows in place through `updateManyAsSystem`. INTERNAL_CALL registers NO route, and must not\n * be REPOSITORY_ONLY: that satisfies the factory's boot-time guard and then fails to resolve when an\n * erasure actually runs, because the retention primitives resolve through\n * `getServiceOperationPathDefault`, which excludes it.\n */\n [CoreResourceOperation.UPDATE_MANY]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.CRITICAL,\n },\n ],\n },\n [CoreResourceOperation.READ]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.LOW,\n },\n ],\n },\n [CoreResourceOperation.LIST]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.LOW,\n },\n ],\n },\n [CoreResourceOperation.CREATE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n // requestDto auto-derived from decorators\n riskLevel: ResourceOperationRiskLevel.HIGH,\n },\n ],\n },\n [CoreResourceOperation.UPDATE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n // requestDto auto-derived from decorators\n riskLevel: ResourceOperationRiskLevel.MEDIUM,\n },\n ],\n },\n [CoreResourceOperation.DELETE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.CRITICAL,\n },\n ],\n },\n },\n});\n\n\n"]}
1
+ {"version":3,"file":"user-credentials.shared.resources-config.schemas.js","sourceRoot":"","sources":["../../../src/users/user-credentials.shared.resources-config.schemas.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,MAAM,wDAAwD,CAAC;AACvH,OAAO,EAAE,qBAAqB,EAAE,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SAAS,EAAE,0BAA0B,CAAC,MAAM;iBAC7C;aACF;SACF;QACD,CAAC,qBAAqB,CAAC,MAAM,CAAC,EAAE;YAC9B,QAAQ,EAAE;gBACR;oBACE,WAAW,EAAE,4BAA4B,CAAC,aAAa;oBACvD,SAAS,EAAE,IAAI;oBACf,KAAK,EAAE,CAAC,cAAc,CAAC,qBAAqB,CAAC;oBAC7C,SAAS,EAAE,0BAA0B,CAAC,QAAQ;iBAC/C;aACF;SACF;KACF;CACF,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\nimport { ErasureRetentionMode, ResourceDataSubjectKind } from '../compliance/privacy/impersonalization.shared.schemas';\nimport { UserCredentialsSchema } from './user-credentials.shared.schemas';\nimport { createResourceConfiguration_Initialization } from '../resources/resources-config.shared.factory';\nimport { ResourceSystemAccessMode } from '../resources/resources-config.shared.schemas';\nimport { CoreResourceOperation, CoreResourceType, coreResourceShared_FieldIdentifier } from '../resources/resources.shared.core.definitions';\nimport { ResourceOperationRiskLevel, ResourceOperationVariantType, ResourceRelationship } from '../resources/resources.shared.schemas';\nimport { CORE_APP_ROLES } from '../security/authorizations/roles.shared.schemas';\n\n/**\n * User Credentials Resource Configuration (Internal-only)\n *\n * System resource — no auto-generated API controller.\n * Operations are INTERNAL_CALL: accessible through the service layer pipeline\n * by trusted internal code, but not exposed as HTTP endpoints.\n */\nexport const userCredentialsResourceConfiguration_InitializationFactory = (\n resourcesRelationships: ResourceRelationship[]\n) => createResourceConfiguration_Initialization<undefined,\n CoreResourceOperation.READ | CoreResourceOperation.LIST | CoreResourceOperation.CREATE | CoreResourceOperation.UPDATE | CoreResourceOperation.DELETE | CoreResourceOperation.UPDATE_MANY,\n typeof UserCredentialsSchema\n>({\n mainSchema: UserCredentialsSchema,\n resourceIdentifier: CoreResourceType.USER_CREDENTIALS,\n resourceFieldIdentifier: coreResourceShared_FieldIdentifier[CoreResourceType.USER_CREDENTIALS],\n resourceRelationships: resourcesRelationships,\n isSystemResource: true,\n // Registration / password-reset / MFA flows write credentials in-process on a\n // pre-auth (or system) EC that carries no request context, so the client-shaped\n // request DTO would strip `userId` (context FK) and `passwordHash` /\n // `secretBase32` / … (backendOnly). Opt CREATE + UPDATE into the trusted\n // `createAsSystem` / `updateAsSystem` path, which re-attaches exactly those\n // fields after the strict parse. INTERNAL_CALL-only resource → never HTTP-reachable.\n systemAccessPolicy: {\n exportSubject: ResourceSystemAccessMode.FORBIDDEN, create: ResourceSystemAccessMode.ALLOWED, update: ResourceSystemAccessMode.ALLOWED },\n\n /**\n * Subject erasure scrubs-and-RETAINS the credentials row.\n *\n * `RETAIN_AND_IMPERSONALIZE`: the row holds the password hash and the hashed backup codes, and both\n * are REMOVEd. Retaining rather than deleting keeps the row's foreign key to the retained identity\n * row resolvable — the same reason `USERS` is retained — while the secrets themselves are provably\n * gone, which is the statement a notice can actually make.\n *\n * A credential outliving its subject is the worst case here, so both fields are nulled rather than\n * masked: a masked hash is still a string a verifier will attempt, and \"it never matches\" is a\n * property of the value, not a guarantee.\n */\n retentionPolicy: {\n mode: ErasureRetentionMode.RETAIN_AND_IMPERSONALIZE,\n },\n\n /** The subject is the person these credentials authenticate, reached through `userId`. */\n dataSubjectPolicy: { kind: ResourceDataSubjectKind.SELF_PRINCIPAL },\n\n coreOperations: [\n CoreResourceOperation.READ,\n CoreResourceOperation.LIST,\n CoreResourceOperation.CREATE,\n CoreResourceOperation.UPDATE,\n CoreResourceOperation.DELETE,\n // Route-less; required by `retentionPolicy` (the in-place scrub).\n CoreResourceOperation.UPDATE_MANY,\n ],\n operationsConfiguration: {\n /*\n * Route-less retention plumbing. `retentionPolicy` requires UPDATE_MANY — the impersonalize writer\n * scrubs rows in place through `updateManyAsSystem`. INTERNAL_CALL registers NO route, and must not\n * be REPOSITORY_ONLY: that satisfies the factory's boot-time guard and then fails to resolve when an\n * erasure actually runs, because the retention primitives resolve through\n * `getServiceOperationPathDefault`, which excludes it.\n */\n [CoreResourceOperation.UPDATE_MANY]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.CRITICAL,\n },\n ],\n },\n [CoreResourceOperation.READ]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.LOW,\n },\n ],\n },\n [CoreResourceOperation.LIST]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.LOW,\n },\n ],\n },\n [CoreResourceOperation.CREATE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n // requestDto auto-derived from decorators\n riskLevel: ResourceOperationRiskLevel.HIGH,\n },\n ],\n },\n [CoreResourceOperation.UPDATE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n // requestDto auto-derived from decorators\n riskLevel: ResourceOperationRiskLevel.MEDIUM,\n },\n ],\n },\n [CoreResourceOperation.DELETE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.CRITICAL,\n },\n ],\n },\n },\n});\n\n\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"user-credentials.shared.schemas.d.ts","sourceRoot":"","sources":["../../../../src/users/user-credentials.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,kBAAkB,EAAE,MAAM,2DAA2D,CAAC;AAK/F;;;GAGG;AACH,eAAO,MAAM,4BAA4B;;;;;;;;;;;iBAWvC,CAAC;AAGH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAElF;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA2FhC,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
1
+ {"version":3,"file":"user-credentials.shared.schemas.d.ts","sourceRoot":"","sources":["../../../src/users/user-credentials.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,kBAAkB,EAAE,MAAM,2DAA2D,CAAC;AAK/F;;;GAGG;AACH,eAAO,MAAM,4BAA4B;;;;;;;;;;;iBAWvC,CAAC;AAGH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAElF;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA2FhC,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"user-credentials.shared.schemas.js","sourceRoot":"","sources":["../../../../src/users/user-credentials.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,kBAAkB,EAAE,MAAM,2DAA2D,CAAC;AAC/F,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,gDAAgD,CAAC;AAC/E,OAAO,EAAE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iBAAiB,EAAE,CAAC,iBAAiB,EAAE;IACnG,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC,iBAAiB,EAAE,CAAC,iBAAiB,EAAE;CACpG,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\nimport { MfaEnrollmentState } from '../security/authentications/authentication.shared.schemas';\nimport { addImpersonalizeWith } from '@wildo-ai/zod-decorators';\nimport { RedactionType } from '../compliance/privacy/redaction.shared.schemas';\nimport { PersonalDataCategory } from '../compliance/privacy/personal-data-category.shared.schemas';\n\n/**\n * Individual WebAuthn/Passkey credential entry.\n * Stores the data returned by @simplewebauthn/server after registration verification.\n */\nexport const PasskeyCredentialEntrySchema = z.object({\n credentialId: z.string().min(1),\n publicKey: z.string().min(1),\n counter: z.number().int().min(0).default(0),\n transports: z.array(z.string()).default([]),\n credentialDeviceType: z.string().default('singleDevice'),\n credentialBackedUp: z.boolean().default(false),\n name: z.string().max(100).default('Passkey'),\n aaguid: z.string().optional(),\n createdAt: z.date().default(() => new Date()),\n lastUsedAt: z.date().optional(),\n});\n\n\nexport type PasskeyCredentialEntry = z.infer<typeof PasskeyCredentialEntrySchema>;\n\n/**\n * User Credentials Schema\n * Stores all authentication secrets for a user: password hash + optional TOTP.\n * All fields are compatible with MongoDB via zod-to-mongoose converter.\n *\n * The local first-factor / TOTP secret fields (`passwordHash`, `secretBase32`,\n * `totpVerifiedAt`) are `.nullish()` — absent when never set, or explicitly `null`\n * once a compliance clear physically destroys them (directory-managed reconciliation,\n * TOTP-disable). See each field's JSDoc for the null-vs-absent contract.\n *\n * TOTP fields (optional — user may have password-only auth):\n * - `secretBase32`: base32-encoded TOTP secret (backendOnly). Used with otpauth library.\n * NOTE: stored as plaintext base32. For production hardening, add AES-256-GCM encryption at rest.\n * - `totpVerified`: whether the user has confirmed TOTP setup by entering a valid code\n * - `backupCodesHashed`: SHA-256 hashes of backup codes (consumed on use)\n * - `totpVerifiedAt`: timestamp when TOTP setup was confirmed\n */\nexport const UserCredentialsSchema = z.object({\n _id: z.string().min(1).isPrimaryKey().isSummaryField(),\n userId: z.string().min(1).isDBIndexed().isForeignKey().isSummaryField().excludeFromUpdate(),\n // NULLISH by design — the hash is a non-empty `string` when set, ABSENT for a PASSWORD-LESS\n // account (first factor is a passkey, magic link, or enterprise SSO — the row must be\n // creatable with no `passwordHash`, e.g. passkey-enroll-at-invitation-accept), or explicitly\n // `null` once a clear physically DESTROYS it. The AUTH-24 directory-managed reconciliation\n // (`_reconcileLocalCredentialsForDirectoryManaged`) writes `passwordHash: null` to neutralise a\n // local first factor that would otherwise survive IdP deprovisioning. `null` MUST be accepted\n // here: the write re-attaches this backend-only field past the strict request-DTO strip\n // (`updateAsSystem`), but the SERVICE-LAYER OUTPUT PROJECTION (`transformOutput` →\n // `internalDto.parse`) re-validates the persisted document against the FULL schema (backend-only\n // fields included). Were this merely `.optional()` (absent-only, not null), the destroy-write\n // would persist the `null` and THEN throw `service_resource_transformation_failed` on the\n // after-image — the credential is gone but the operation errors (misleading \"reconcile failed\"\n // log). Every consumer treats the hash as falsy-when-absent (`!credentials?.passwordHash`\n // guards, `enrolled: !!passwordHash`, last-method-removal counting), so `null` and absent are\n // handled identically. `.min(1)` still guarantees a NON-EMPTY hash whenever one IS present.\n // ── CREDENTIALS is declared, not derived, on this resource ──\n //\n // The producer DERIVES `credentials` from `.isPassword()` / `.isOtp()` / `.isWriteOnlySecret()`.\n // These fields carry `.isBackendOnly()` instead — correctly, since they are stored HASHES and\n // secrets that must never leave the backend, not editable password INPUTS. So the derivation\n // cannot see them and the declaration has to be explicit. Measured: before this, `userCredentials`\n // reported zero categories while holding every secret the application has.\n // REMOVE, not MASK. A credential is the one field class where a placeholder would be worse than a\n // null: a masked hash is still a string the verifier will attempt, and \"it never matches\" is a\n // property of the value rather than a guarantee. Nulling it makes the absence structural.\n passwordHash: addImpersonalizeWith(\n z.string().min(1).nullish().isBackendOnly().dataCategories(PersonalDataCategory.CREDENTIALS),\n RedactionType.REMOVE,\n ),\n\n /**\n * TOTP secret encoded as base32 — used with otpauth library for code generation/verification.\n * NULLISH: absent when TOTP was never set up, or explicitly `null` after the\n * auth-method-management TOTP-disable clear physically destroys it. `null` must be accepted so\n * that disable-clear's null-write round-trips through the output projection — same contract as\n * `passwordHash` above (backend-only field, re-validated by `transformOutput`).\n */\n secretBase32: z.string().nullish().isBackendOnly().dataCategories(PersonalDataCategory.CREDENTIALS),\n /** Whether the user has confirmed TOTP setup by entering a valid code */\n totpVerified: z.boolean().default(false).isDBIndexed(),\n /** SHA-256 hashes of backup codes — consumed on use (removed from array) */\n // RESET, not REMOVE, and the field is back to non-nullable (issue #195).\n //\n // It was widened to `.nullish()` on 2026-08-31 purely so REMOVE could reach it: no treatment could\n // then scrub a non-nullable field with a default, so widening the READ contract of a credential\n // field was the only way to declare an erasure posture here. `RESET` landed on 2026-09-01 and the\n // workaround is no longer needed.\n //\n // Reverting is also the more truthful scrub. RESET writes `[]` — *there are no backup codes* —\n // while REMOVE wrote `null`, which reads as *unknown*. For a credential those are different\n // statements to anyone reading the row, and only one of them is what erasure actually achieved.\n backupCodesHashed: addImpersonalizeWith(\n z.array(z.string()).default([]).isBackendOnly().dataCategories(PersonalDataCategory.CREDENTIALS),\n RedactionType.RESET,\n ),\n /**\n * When the user verified their TOTP setup. NULLISH: absent before verification, a `Date` once\n * verified, or explicitly `null` after the TOTP-disable clear. Unlike the backend-only TOTP\n * secret this field is NOT stripped from the request DTO, so `null` must be accepted on BOTH\n * the write-side parse (`validateAndTransformInput`, which loose-parses the in-shape field) AND\n * the output projection — otherwise the disable-clear throws before/after persisting. Readers\n * use `?? undefined`, so `null` and absent behave identically.\n */\n totpVerifiedAt: z.date().nullish(),\n /** Timestamp of the last password change. Refresh tokens issued before this are rejected (C4 fix). */\n passwordChangedAt: z.date().optional().isBackendOnly(),\n /** WebAuthn/Passkey credentials — array of registered passkeys */\n passkeyCredentials: z.array(PasskeyCredentialEntrySchema).default([]).isBackendOnly().dataCategories(PersonalDataCategory.CREDENTIALS),\n\n /** W2.1: timestamp of the first login where MFA was required but not yet enrolled. Used with enrollmentGracePeriodDays. */\n firstMfaPromptAt: z.date().optional().isBackendOnly(),\n /** W4.6: MFA enrollment lifecycle state. Computed at user creation and updated on enrollment completion. */\n mfaEnrollmentState: z.enum(MfaEnrollmentState).default(MfaEnrollmentState.NOT_REQUIRED).isBackendOnly(),\n /** W2.3: tracks consecutive account lockouts for progressive lockout duration (2^n multiplier). Reset on successful login. */\n consecutiveLockouts: z.number().default(0).isBackendOnly(),\n\n /** Phone number in E.164 format for SMS OTP authentication (Phase G2) */\n // CONTACT_DETAILS, not CREDENTIALS. It is the SMS OTP delivery ADDRESS — a way to reach the\n // person, which they hold independently of this application — not a secret this application\n // stores. Merging the two would make a notice say the phone number is a credential.\n phoneNumber: z.string().regex(/^\\+?[1-9]\\d{1,14}$/).optional().dataCategories(PersonalDataCategory.CONTACT_DETAILS),\n /** Whether the phone number has been verified via OTP confirmation */\n phoneNumberVerified: z.boolean().default(false),\n /** When the phone number was verified */\n phoneVerifiedAt: z.date().optional(),\n\n createdAt: z.date().default(() => new Date()).isDBIndexed().excludeFromCreate().excludeFromUpdate(),\n updatedAt: z.date().default(() => new Date()).isDBIndexed().excludeFromCreate().excludeFromUpdate(),\n});\n\nexport type UserCredentials = z.infer<typeof UserCredentialsSchema>;\n\n\n"]}
1
+ {"version":3,"file":"user-credentials.shared.schemas.js","sourceRoot":"","sources":["../../../src/users/user-credentials.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,kBAAkB,EAAE,MAAM,2DAA2D,CAAC;AAC/F,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,gDAAgD,CAAC;AAC/E,OAAO,EAAE,oB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AiB,EAAE,CAAC,iBAAiB,EAAE;IACnG,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC,iBAAiB,EAAE,CAAC,iBAAiB,EAAE;CACpG,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\nimport { MfaEnrollmentState } from '../security/authentications/authentication.shared.schemas';\nimport { addImpersonalizeWith } from '@wildo-ai/zod-decorators';\nimport { RedactionType } from '../compliance/privacy/redaction.shared.schemas';\nimport { PersonalDataCategory } from '../compliance/privacy/personal-data-category.shared.schemas';\n\n/**\n * Individual WebAuthn/Passkey credential entry.\n * Stores the data returned by @simplewebauthn/server after registration verification.\n */\nexport const PasskeyCredentialEntrySchema = z.object({\n credentialId: z.string().min(1),\n publicKey: z.string().min(1),\n counter: z.number().int().min(0).default(0),\n transports: z.array(z.string()).default([]),\n credentialDeviceType: z.string().default('singleDevice'),\n credentialBackedUp: z.boolean().default(false),\n name: z.string().max(100).default('Passkey'),\n aaguid: z.string().optional(),\n createdAt: z.date().default(() => new Date()),\n lastUsedAt: z.date().optional(),\n});\n\n\nexport type PasskeyCredentialEntry = z.infer<typeof PasskeyCredentialEntrySchema>;\n\n/**\n * User Credentials Schema\n * Stores all authentication secrets for a user: password hash + optional TOTP.\n * All fields are compatible with MongoDB via zod-to-mongoose converter.\n *\n * The local first-factor / TOTP secret fields (`passwordHash`, `secretBase32`,\n * `totpVerifiedAt`) are `.nullish()` — absent when never set, or explicitly `null`\n * once a compliance clear physically destroys them (directory-managed reconciliation,\n * TOTP-disable). See each field's JSDoc for the null-vs-absent contract.\n *\n * TOTP fields (optional — user may have password-only auth):\n * - `secretBase32`: base32-encoded TOTP secret (backendOnly). Used with otpauth library.\n * NOTE: stored as plaintext base32. For production hardening, add AES-256-GCM encryption at rest.\n * - `totpVerified`: whether the user has confirmed TOTP setup by entering a valid code\n * - `backupCodesHashed`: SHA-256 hashes of backup codes (consumed on use)\n * - `totpVerifiedAt`: timestamp when TOTP setup was confirmed\n */\nexport const UserCredentialsSchema = z.object({\n _id: z.string().min(1).isPrimaryKey().isSummaryField(),\n userId: z.string().min(1).isDBIndexed().isForeignKey().isSummaryField().excludeFromUpdate(),\n // NULLISH by design — the hash is a non-empty `string` when set, ABSENT for a PASSWORD-LESS\n // account (first factor is a passkey, magic link, or enterprise SSO — the row must be\n // creatable with no `passwordHash`, e.g. passkey-enroll-at-invitation-accept), or explicitly\n // `null` once a clear physically DESTROYS it. The AUTH-24 directory-managed reconciliation\n // (`_reconcileLocalCredentialsForDirectoryManaged`) writes `passwordHash: null` to neutralise a\n // local first factor that would otherwise survive IdP deprovisioning. `null` MUST be accepted\n // here: the write re-attaches this backend-only field past the strict request-DTO strip\n // (`updateAsSystem`), but the SERVICE-LAYER OUTPUT PROJECTION (`transformOutput` →\n // `internalDto.parse`) re-validates the persisted document against the FULL schema (backend-only\n // fields included). Were this merely `.optional()` (absent-only, not null), the destroy-write\n // would persist the `null` and THEN throw `service_resource_transformation_failed` on the\n // after-image — the credential is gone but the operation errors (misleading \"reconcile failed\"\n // log). Every consumer treats the hash as falsy-when-absent (`!credentials?.passwordHash`\n // guards, `enrolled: !!passwordHash`, last-method-removal counting), so `null` and absent are\n // handled identically. `.min(1)` still guarantees a NON-EMPTY hash whenever one IS present.\n // ── CREDENTIALS is declared, not derived, on this resource ──\n //\n // The producer DERIVES `credentials` from `.isPassword()` / `.isOtp()` / `.isWriteOnlySecret()`.\n // These fields carry `.isBackendOnly()` instead — correctly, since they are stored HASHES and\n // secrets that must never leave the backend, not editable password INPUTS. So the derivation\n // cannot see them and the declaration has to be explicit. Measured: before this, `userCredentials`\n // reported zero categories while holding every secret the application has.\n // REMOVE, not MASK. A credential is the one field class where a placeholder would be worse than a\n // null: a masked hash is still a string the verifier will attempt, and \"it never matches\" is a\n // property of the value rather than a guarantee. Nulling it makes the absence structural.\n passwordHash: addImpersonalizeWith(\n z.string().min(1).nullish().isBackendOnly().dataCategories(PersonalDataCategory.CREDENTIALS),\n RedactionType.REMOVE,\n ),\n\n /**\n * TOTP secret encoded as base32 — used with otpauth library for code generation/verification.\n * NULLISH: absent when TOTP was never set up, or explicitly `null` after the\n * auth-method-management TOTP-disable clear physically destroys it. `null` must be accepted so\n * that disable-clear's null-write round-trips through the output projection — same contract as\n * `passwordHash` above (backend-only field, re-validated by `transformOutput`).\n */\n secretBase32: z.string().nullish().isBackendOnly().dataCategories(PersonalDataCategory.CREDENTIALS),\n /** Whether the user has confirmed TOTP setup by entering a valid code */\n totpVerified: z.boolean().default(false).isDBIndexed(),\n /** SHA-256 hashes of backup codes — consumed on use (removed from array) */\n // RESET, not REMOVE, and the field is back to non-nullable (issue #195).\n //\n // It was widened to `.nullish()` on 2026-08-31 purely so REMOVE could reach it: no treatment could\n // then scrub a non-nullable field with a default, so widening the READ contract of a credential\n // field was the only way to declare an erasure posture here. `RESET` landed on 2026-09-01 and the\n // workaround is no longer needed.\n //\n // Reverting is also the more truthful scrub. RESET writes `[]` — *there are no backup codes* —\n // while REMOVE wrote `null`, which reads as *unknown*. For a credential those are different\n // statements to anyone reading the row, and only one of them is what erasure actually achieved.\n backupCodesHashed: addImpersonalizeWith(\n z.array(z.string()).default([]).isBackendOnly().dataCategories(PersonalDataCategory.CREDENTIALS),\n RedactionType.RESET,\n ),\n /**\n * When the user verified their TOTP setup. NULLISH: absent before verification, a `Date` once\n * verified, or explicitly `null` after the TOTP-disable clear. Unlike the backend-only TOTP\n * secret this field is NOT stripped from the request DTO, so `null` must be accepted on BOTH\n * the write-side parse (`validateAndTransformInput`, which loose-parses the in-shape field) AND\n * the output projection — otherwise the disable-clear throws before/after persisting. Readers\n * use `?? undefined`, so `null` and absent behave identically.\n */\n totpVerifiedAt: z.date().nullish(),\n /** Timestamp of the last password change. Refresh tokens issued before this are rejected (C4 fix). */\n passwordChangedAt: z.date().optional().isBackendOnly(),\n /** WebAuthn/Passkey credentials — array of registered passkeys */\n passkeyCredentials: z.array(PasskeyCredentialEntrySchema).default([]).isBackendOnly().dataCategories(PersonalDataCategory.CREDENTIALS),\n\n /** W2.1: timestamp of the first login where MFA was required but not yet enrolled. Used with enrollmentGracePeriodDays. */\n firstMfaPromptAt: z.date().optional().isBackendOnly(),\n /** W4.6: MFA enrollment lifecycle state. Computed at user creation and updated on enrollment completion. */\n mfaEnrollmentState: z.enum(MfaEnrollmentState).default(MfaEnrollmentState.NOT_REQUIRED).isBackendOnly(),\n /** W2.3: tracks consecutive account lockouts for progressive lockout duration (2^n multiplier). Reset on successful login. */\n consecutiveLockouts: z.number().default(0).isBackendOnly(),\n\n /** Phone number in E.164 format for SMS OTP authentication (Phase G2) */\n // CONTACT_DETAILS, not CREDENTIALS. It is the SMS OTP delivery ADDRESS — a way to reach the\n // person, which they hold independently of this application — not a secret this application\n // stores. Merging the two would make a notice say the phone number is a credential.\n phoneNumber: z.string().regex(/^\\+?[1-9]\\d{1,14}$/).optional().dataCategories(PersonalDataCategory.CONTACT_DETAILS),\n /** Whether the phone number has been verified via OTP confirmation */\n phoneNumberVerified: z.boolean().default(false),\n /** When the phone number was verified */\n phoneVerifiedAt: z.date().optional(),\n\n createdAt: z.date().default(() => new Date()).isDBIndexed().excludeFromCreate().excludeFromUpdate(),\n updatedAt: z.date().default(() => new Date()).isDBIndexed().excludeFromCreate().excludeFromUpdate(),\n});\n\nexport type UserCredentials = z.infer<typeof UserCredentialsSchema>;\n\n\n"]}
@@ -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"}
@@ -1 +1 @@
1
- {"version":3,"file":"user-identity-links.shared.resources-config.schemas.js","sourceRoot":"","sources":["../../../../src/users/user-identity-links.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAC9E,OAAO,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,MAAM,wDAAwD,CAAC;AACvH,OAAO,EAAE,0CAA0C,EAAE,MAAM,8CAA8C,CAAC;AAC1G,OAAO,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAC;AACxF,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,kCAAkC,EAAE,MAAM,gDAAgD,CAAC;AAC7I,OAAO,EAAE,0BAA0B,EAAE,4BAA4B,EAAwB,MAAM,uCAAuC,CAAC;AACvI,OAAO,EAAE,cAAc,EAAE,MAAM,iDAAiD,CAAC;AACjF,OAAO,EAAE,yBAAyB,EAAE,MAAM,qDAAqD,CAAC;AAEhG,MAAM,CAAC,MAAM,4DAA4D,GAAG,CAC1E,sBAA8C,EAC9C,EAAE,CAAC,0CAA0C,CAG7C;IACA,UAAU,EAAE,sBAAsB;IAClC,kBAAkB,EAAE,gBAAgB,CAAC,mBAAmB;IACxD,uBAAuB,EAAE,kCAAkC,CAAC,gBAAgB,CAAC,mBAAmB,CAAC;IACjG,qBAAqB,EAAE,s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BACE,WAAW,EAAE,4BAA4B,CAAC,aAAa;oBACvD,SAAS,EAAE,IAAI;oBACf,KAAK,EAAE,CAAC,cAAc,CAAC,qBAAqB,CAAC;oBAC7C,SAAS,EAAE,0BAA0B,CAAC,GAAG;iBAC1C;aACF;SACF;QACD,CAAC,qBAAqB,CAAC,IAAI,CAAC,EAAE;YAC5B,QAAQ,EAAE;gBACR;oBACE,WAAW,EAAE,4BAA4B,CAAC,aAAa;oBACvD,SAAS,EAAE,IAAI;oBACf,KAAK,EAAE,CAAC,cAAc,CAAC,qBAAqB,CAAC;oBAC7C,SAAS,EAAE,0BAA0B,CAAC,GAAG;iBAC1C;aACF;SACF;QACD,CAAC,qBAAqB,CAAC,MAAM,CAAC,EAAE;YAC9B,QAAQ,EAAE;gBACR;oBACE,WAAW,EAAE,4BAA4B,CAAC,aAAa;oBACvD,SAAS,EAAE,IAAI;oBACf,KAAK,EAAE,CAAC,cAAc,CAAC,qBAAqB,CAAC;oBAC7C,SAAS,EAAE,0BAA0B,CAAC,MAAM;iBAC7C;aACF;SACF;QACD,CAAC,qBAAqB,CAAC,MAAM,CAAC,EAAE;YAC9B,QAAQ,EAAE;gBACR;oBACE,WAAW,EAAE,4BAA4B,CAAC,aAAa;oBACvD,SAAS,EAAE,IAAI;oBACf,KAAK,EAAE,CAAC,cAAc,CAAC,qBAAqB,CAAC;oBAC7C,SAAS,EAAE,0BAA0B,CAAC,MAAM;iBAC7C;aACF;SACF;QACD,CAAC,qBAAqB,CAAC,MAAM,CAAC,EAAE;YAC9B,QAAQ,EAAE;gBACR;oBACE,WAAW,EAAE,4BAA4B,CAAC,aAAa;oBACvD,SAAS,EAAE,IAAI;oBACf,KAAK,EAAE,CAAC,cAAc,CAAC,qBAAqB,CAAC;oBAC7C,SAAS,EAAE,0BAA0B,CAAC,IAAI;iBAC3C;aACF;SACF;KACF;CACF,CAAC,CAAC","sourcesContent":["/**\n * User Identity Links Resource Configuration (Internal-only)\n *\n * System resource — no auto-generated API controller.\n * Frontend access via custom auth controller endpoint: GET /auth/identity-links\n *\n * Operations are INTERNAL_CALL: accessible through the service layer pipeline\n * by trusted internal code (OAuth2 JIT provisioning, auth method management),\n * but not exposed as HTTP endpoints.\n */\n\nimport { UserIdentityLinkSchema } from './user-identity-links.shared.schemas';\nimport { ErasureRetentionMode, ResourceDataSubjectKind } from '../compliance/privacy/impersonalization.shared.schemas';\nimport { createResourceConfiguration_Initialization } from '../resources/resources-config.shared.factory';\nimport { ResourceSystemAccessMode } from '../resources/resources-config.shared.schemas';\nimport { CoreResourceOperation, CoreResourceType, coreResourceShared_FieldIdentifier } from '../resources/resources.shared.core.definitions';\nimport { ResourceOperationRiskLevel, ResourceOperationVariantType, ResourceRelationship } from '../resources/resources.shared.schemas';\nimport { CORE_APP_ROLES } from '../security/authorizations/roles.shared.schemas';\nimport { DataPortabilityProvenance } from '../compliance/privacy/subject-export.shared.schemas';\n\nexport const userIdentityLinksResourceConfiguration_InitializationFactory = (\n resourcesRelationships: ResourceRelationship[]\n) => createResourceConfiguration_Initialization<undefined,\n CoreResourceOperation.READ | CoreResourceOperation.LIST | CoreResourceOperation.CREATE | CoreResourceOperation.UPDATE | CoreResourceOperation.DELETE | CoreResourceOperation.UPDATE_MANY,\n typeof UserIdentityLinkSchema\n>({\n mainSchema: UserIdentityLinkSchema,\n resourceIdentifier: CoreResourceType.USER_IDENTITY_LINKS,\n resourceFieldIdentifier: coreResourceShared_FieldIdentifier[CoreResourceType.USER_IDENTITY_LINKS],\n resourceRelationships: resourcesRelationships,\n isSystemResource: true,\n\n // OAuth2 JIT + enterprise SSO / SCIM provisioning create and update identity links\n // in-process on a request-context-less EC. The client-shaped CREATE DTO strips the\n // context FKs by name (`userId`, `organizationId`, `applicationId`), and both CREATE and UPDATE strip\n // the backend-only `providerRawProfile`. This resource has no HTTP surface (all\n // variants are INTERNAL_CALL), so the trusted `createAsSystem` / `updateAsSystem`\n // primitives are the ONLY writers — opt both verbs in so the stripped fields survive\n // the strict-DTO parse (re-attached from the schema-derived allowlist).\n systemAccessPolicy: {\n exportSubject: ResourceSystemAccessMode.ALLOWED,\n create: ResourceSystemAccessMode.ALLOWED,\n update: ResourceSystemAccessMode.ALLOWED,\n // AUTH-24: the auth-policy resolver READS a user's identity link during LOGIN to decide whether they are\n // IdP-PROVISIONED in an actively directory-managed org — only THEN are their local first-factor\n // credentials derived off (and reconciled). The owner/admin who registered locally has no link and keeps\n // a break-glass credential (user decision 2026-07-21). The bulk sweep on SCIM activation LISTS an org's\n // links to reconcile all already-provisioned members. Both run under a pre-/being-authenticated or\n // token-mint EC, so they resolve via the system door.\n read: ResourceSystemAccessMode.ALLOWED,\n list: ResourceSystemAccessMode.ALLOWED,\n },\n portabilityPolicy: { defaultProvenance: DataPortabilityProvenance.OBSERVED },\n\n\n /**\n * Subject erasure scrubs-and-RETAINS the identity link.\n *\n * `RETAIN_AND_IMPERSONALIZE`: the row holds the provider's own copy of the person — their id at that\n * provider, their email, display name, avatar URL and the raw profile payload. All are scrubbed.\n *\n * `providerUserId` participates in the compound business key, so masking it would collide across two\n * erased links for one connection under a plain unique index. It does not, because declaring a\n * retention policy makes the planner emit that index RETENTION-SCOPED — retained rows fall outside\n * the constraint. Verify that in the generated migration rather than assuming it.\n */\n retentionPolicy: {\n mode: ErasureRetentionMode.RETAIN_AND_IMPERSONALIZE,\n },\n\n /** The subject is the person the external identity belongs to, reached through `userId`. */\n dataSubjectPolicy: { kind: ResourceDataSubjectKind.SELF_PRINCIPAL },\n\n coreOperations: [\n CoreResourceOperation.READ,\n CoreResourceOperation.LIST,\n CoreResourceOperation.CREATE,\n CoreResourceOperation.UPDATE,\n CoreResourceOperation.DELETE,\n // Route-less; required by `retentionPolicy` (the in-place scrub).\n CoreResourceOperation.UPDATE_MANY,\n ],\n operationsConfiguration: {\n /*\n * Route-less retention plumbing. `retentionPolicy` requires UPDATE_MANY — the impersonalize writer\n * scrubs rows in place through `updateManyAsSystem`. INTERNAL_CALL registers NO route, and must not\n * be REPOSITORY_ONLY: that satisfies the factory's boot-time guard and then fails to resolve when an\n * erasure actually runs, because the retention primitives resolve through\n * `getServiceOperationPathDefault`, which excludes it.\n */\n [CoreResourceOperation.UPDATE_MANY]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.CRITICAL,\n },\n ],\n },\n [CoreResourceOperation.READ]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.LOW,\n },\n ],\n },\n [CoreResourceOperation.LIST]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.LOW,\n },\n ],\n },\n [CoreResourceOperation.CREATE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.MEDIUM,\n },\n ],\n },\n [CoreResourceOperation.UPDATE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.MEDIUM,\n },\n ],\n },\n [CoreResourceOperation.DELETE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.HIGH,\n },\n ],\n },\n },\n});\n"]}
1
+ {"version":3,"file":"user-identity-links.shared.resources-config.schemas.js","sourceRoot":"","sources":["../../../src/users/user-identity-links.shared.resources-config.schemas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,QAAQ,EAAE;gBACR;oBACE,WAAW,EAAE,4BAA4B,CAAC,aAAa;oBACvD,SAAS,EAAE,IAAI;oBACf,KAAK,EAAE,CAAC,cAAc,CAAC,qBAAqB,CAAC;oBAC7C,SAAS,EAAE,0BAA0B,CAAC,MAAM;iBAC7C;aACF;SACF;QACD,CAAC,qBAAqB,CAAC,MAAM,CAAC,EAAE;YAC9B,QAAQ,EAAE;gBACR;oBACE,WAAW,EAAE,4BAA4B,CAAC,aAAa;oBACvD,SAAS,EAAE,IAAI;oBACf,KAAK,EAAE,CAAC,cAAc,CAAC,qBAAqB,CAAC;oBAC7C,SAAS,EAAE,0BAA0B,CAAC,MAAM;iBAC7C;aACF;SACF;QACD,CAAC,qBAAqB,CAAC,MAAM,CAAC,EAAE;YAC9B,QAAQ,EAAE;gBACR;oBACE,WAAW,EAAE,4BAA4B,CAAC,aAAa;oBACvD,SAAS,EAAE,IAAI;oBACf,KAAK,EAAE,CAAC,cAAc,CAAC,qBAAqB,CAAC;oBAC7C,SAAS,EAAE,0BAA0B,CAAC,IAAI;iBAC3C;aACF;SACF;KACF;CACF,CAAC,CAAC","sourcesContent":["/**\n * User Identity Links Resource Configuration (Internal-only)\n *\n * System resource — no auto-generated API controller.\n * Frontend access via custom auth controller endpoint: GET /auth/identity-links\n *\n * Operations are INTERNAL_CALL: accessible through the service layer pipeline\n * by trusted internal code (OAuth2 JIT provisioning, auth method management),\n * but not exposed as HTTP endpoints.\n */\n\nimport { UserIdentityLinkSchema } from './user-identity-links.shared.schemas';\nimport { ErasureRetentionMode, ResourceDataSubjectKind } from '../compliance/privacy/impersonalization.shared.schemas';\nimport { createResourceConfiguration_Initialization } from '../resources/resources-config.shared.factory';\nimport { ResourceSystemAccessMode } from '../resources/resources-config.shared.schemas';\nimport { CoreResourceOperation, CoreResourceType, coreResourceShared_FieldIdentifier } from '../resources/resources.shared.core.definitions';\nimport { ResourceOperationRiskLevel, ResourceOperationVariantType, ResourceRelationship } from '../resources/resources.shared.schemas';\nimport { CORE_APP_ROLES } from '../security/authorizations/roles.shared.schemas';\nimport { DataPortabilityProvenance } from '../compliance/privacy/subject-export.shared.schemas';\n\nexport const userIdentityLinksResourceConfiguration_InitializationFactory = (\n resourcesRelationships: ResourceRelationship[]\n) => createResourceConfiguration_Initialization<undefined,\n CoreResourceOperation.READ | CoreResourceOperation.LIST | CoreResourceOperation.CREATE | CoreResourceOperation.UPDATE | CoreResourceOperation.DELETE | CoreResourceOperation.UPDATE_MANY,\n typeof UserIdentityLinkSchema\n>({\n mainSchema: UserIdentityLinkSchema,\n resourceIdentifier: CoreResourceType.USER_IDENTITY_LINKS,\n resourceFieldIdentifier: coreResourceShared_FieldIdentifier[CoreResourceType.USER_IDENTITY_LINKS],\n resourceRelationships: resourcesRelationships,\n isSystemResource: true,\n\n // OAuth2 JIT + enterprise SSO / SCIM provisioning create and update identity links\n // in-process on a request-context-less EC. The client-shaped CREATE DTO strips the\n // context FKs by name (`userId`, `organizationId`, `applicationId`), and both CREATE and UPDATE strip\n // the backend-only `providerRawProfile`. This resource has no HTTP surface (all\n // variants are INTERNAL_CALL), so the trusted `createAsSystem` / `updateAsSystem`\n // primitives are the ONLY writers — opt both verbs in so the stripped fields survive\n // the strict-DTO parse (re-attached from the schema-derived allowlist).\n systemAccessPolicy: {\n exportSubject: ResourceSystemAccessMode.ALLOWED,\n create: ResourceSystemAccessMode.ALLOWED,\n update: ResourceSystemAccessMode.ALLOWED,\n // AUTH-24: the auth-policy resolver READS a user's identity link during LOGIN to decide whether they are\n // IdP-PROVISIONED in an actively directory-managed org — only THEN are their local first-factor\n // credentials derived off (and reconciled). The owner/admin who registered locally has no link and keeps\n // a break-glass credential (user decision 2026-07-21). The bulk sweep on SCIM activation LISTS an org's\n // links to reconcile all already-provisioned members. Both run under a pre-/being-authenticated or\n // token-mint EC, so they resolve via the system door.\n read: ResourceSystemAccessMode.ALLOWED,\n list: ResourceSystemAccessMode.ALLOWED,\n },\n portabilityPolicy: { defaultProvenance: DataPortabilityProvenance.OBSERVED },\n\n\n /**\n * Subject erasure scrubs-and-RETAINS the identity link.\n *\n * `RETAIN_AND_IMPERSONALIZE`: the row holds the provider's own copy of the person — their id at that\n * provider, their email, display name, avatar URL and the raw profile payload. All are scrubbed.\n *\n * `providerUserId` participates in the compound business key, so masking it would collide across two\n * erased links for one connection under a plain unique index. It does not, because declaring a\n * retention policy makes the planner emit that index RETENTION-SCOPED — retained rows fall outside\n * the constraint. Verify that in the generated migration rather than assuming it.\n */\n retentionPolicy: {\n mode: ErasureRetentionMode.RETAIN_AND_IMPERSONALIZE,\n },\n\n /** The subject is the person the external identity belongs to, reached through `userId`. */\n dataSubjectPolicy: { kind: ResourceDataSubjectKind.SELF_PRINCIPAL },\n\n coreOperations: [\n CoreResourceOperation.READ,\n CoreResourceOperation.LIST,\n CoreResourceOperation.CREATE,\n CoreResourceOperation.UPDATE,\n CoreResourceOperation.DELETE,\n // Route-less; required by `retentionPolicy` (the in-place scrub).\n CoreResourceOperation.UPDATE_MANY,\n ],\n operationsConfiguration: {\n /*\n * Route-less retention plumbing. `retentionPolicy` requires UPDATE_MANY — the impersonalize writer\n * scrubs rows in place through `updateManyAsSystem`. INTERNAL_CALL registers NO route, and must not\n * be REPOSITORY_ONLY: that satisfies the factory's boot-time guard and then fails to resolve when an\n * erasure actually runs, because the retention primitives resolve through\n * `getServiceOperationPathDefault`, which excludes it.\n */\n [CoreResourceOperation.UPDATE_MANY]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.CRITICAL,\n },\n ],\n },\n [CoreResourceOperation.READ]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.LOW,\n },\n ],\n },\n [CoreResourceOperation.LIST]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.LOW,\n },\n ],\n },\n [CoreResourceOperation.CREATE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.MEDIUM,\n },\n ],\n },\n [CoreResourceOperation.UPDATE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.MEDIUM,\n },\n ],\n },\n [CoreResourceOperation.DELETE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.HIGH,\n },\n ],\n },\n },\n});\n"]}
@@ -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;;;;;;;;;;;;;;;;;;kBAqLjC,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"}
@@ -1 +1 @@
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,I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;aACxE,CAAC,CAAC;QACL,CAAC;QACD,OAAO;IACT,CAAC;IAED,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC;QACvB,GAAG,CAAC,QAAQ,CAAC;YACX,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,CAAC,cAAc,CAAC;YACtB,OAAO,EAAE,gDAAgD;SAC1D,CAAC,CAAC;IACL,CAAC;IAED,IAAI,IAAI,CAAC,SAAS,KAAK,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"]}
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,mCAAm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ourcesContent":["/**\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"]}
@@ -1 +1 @@
1
- {"version":3,"file":"user-preferences-reset.shared.utils.d.ts","sourceRoot":"","sources":["../../../../src/users/user-preferences-reset.shared.utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EACL,mBAAmB,EACnB,eAAe,EAKhB,MAAM,wBAAwB,CAAC;AAGhC;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,iCAAiC;;iBAE5C,CAAC;AAEH,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAC;AA2B5F;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,8BAA8B,CAC5C,OAAO,EAAE,2BAA2B,EACpC,kBAAkB,EAAE,eAAe,GAAG,SAAS,GAC9C,OAAO,CAAC,eAAe,CAAC,CAU1B"}
1
+ {"version":3,"file":"user-preferences-reset.shared.utils.d.ts","sourceRoot":"","sources":["../../../src/users/user-preferences-reset.shared.utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EACL,mBAAmB,EACnB,eAAe,EAKhB,MAAM,wBAAwB,CAAC;AAGhC;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,iCAAiC;;iBAE5C,CAAC;AAEH,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAC;AA2B5F;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,8BAA8B,CAC5C,OAAO,EAAE,2BAA2B,EACpC,kBAAkB,EAAE,eAAe,GAAG,SAAS,GAC9C,OAAO,CAAC,eAAe,CAAC,CAU1B"}
@@ -35,7 +35,7 @@
35
35
  * `.excludeFromUpdate()`.
36
36
  */
37
37
  import { z } from "zod";
38
- import { EnumEditMode } from "@wildo-ai/zod-decorators";
38
+ import { EnumMultipleEditMode } from "@wildo-ai/zod-decorators";
39
39
  import { UserPreferenceGroup, UserLanguagePreferencesSchema, UserPreferences_NotificationsSchema, UserPreferences_RegionalSchema, UserPreferences_UI_ThemeSchema, } from "./users.shared.schemas.js";
40
40
  import { UserPrivacySchema } from "../compliance/privacy/privacy.shared.schemas.js";
41
41
  /**
@@ -51,7 +51,7 @@ import { UserPrivacySchema } from "../compliance/privacy/privacy.shared.schemas.
51
51
  * matching how `fallbackLanguages` presents a compact multi-select in the same settings surface.
52
52
  */
53
53
  export const UserPreferencesResetRequestSchema = z.object({
54
- groups: z.array(z.enum(UserPreferenceGroup).enumUI({ edit: { editMode: EnumEditMode.COMBOBOX } })).min(1),
54
+ groups: z.array(z.enum(UserPreferenceGroup).enumUI({ edit: { multipleEditMode: EnumMultipleEditMode.COMBOBOX } })).min(1).describe("The preference blocks to return to their defaults, by field name: `notifications`, `privacy`, `ui`, `regional` or `languagePreferences`. At least one is required, and blocks not named are left unchanged. Resetting `privacy` withdraws every consent the user has given; resetting `regional` clears the user's own regional choices so the organization's apply."),
55
55
  });
56
56
  /**
57
57
  * Every block is preference state. Governed-document interaction receipts live in their own
@@ -1 +1 @@
1
- {"version":3,"file":"user-preferences-reset.shared.utils.js","sourceRoot":"","sources":["../../../../src/users/user-preferences-reset.shared.utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAExD,OAAO,EACL,mBAAmB,EAEnB,6BAA6B,EAC7B,mCAAmC,EACnC,8BAA8B,EAC9B,8BAA8B,GAC/B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,iBAAiB,EAAE,MAAM,8CAA8C,CAAC;AAEjF;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAAC,CAAC,MAAM,CAAC;IACxD,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,EAAE,QAAQ,EAAE,YAAY,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;CAC1G,CAAC,CAAC;AAiBH;;;GAGG;AACH,MAAM,qCAAqC,GAAsC;IAC/E,CAAC,mBAAmB,CAAC,aAAa,CAAC,EAAE,GAAG,EAAE,CAAC,mCAAmC,CAAC,KAAK,CAAC,EAAE,CAAC;IACxF,CAAC,mBAAmB,CAAC,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,8BAA8B,CAAC,KAAK,CAAC,EAAE,CAAC;IACxE,CAAC,mBAAmB,CAAC,QAAQ,CAAC,EAAE,GAAG,EAAE,CAAC,8BAA8B,CAAC,KAAK,CAAC,EAAE,CAAC;IAC9E,CAAC,mBAAmB,CAAC,QAAQ,CAAC,EAAE,GAAG,EAAE,CAAC,6BAA6B,CAAC,KAAK,CAAC,EAAE,CAAC;IAC7E,CAAC,mBAAmB,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,CAAC,iBAAiB,CAAC,KAAK,CAAC,EAAE,CAAC;CACjE,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,UAAU,8BAA8B,CAC5C,OAAoC,EACpC,kBAA+C;IAE/C,MAAM,KAAK,GAA6B,EAAE,CAAC;IAE3C,KAAK,MAAM,KAAK,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;QACnC,sFAAsF;QACtF,yFAAyF;QACxF,KAAiC,CAAC,KAAK,CAAC,GAAG,qCAAqC,CAAC,KAAK,CAAC,CAAC,kBAAkB,CAAC,CAAC;IAC/G,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["/**\n * User Preferences Reset — the shared contract behind `reset_to_defaults`.\n *\n * ONE authority for the self-service reset of a preferences row. `USER_SELF_PREFERENCES`\n * resolves to the `USER_PREFERENCES` persistence collection, but the administrator-addressed\n * resource deliberately exposes no reset operation: a second public verb would be a second\n * contract for the same mutation, free to drift. Administrators have the generic UPDATE for an\n * explicit correction; subjects own selective reset here.\n *\n * ## Why this file exists at all\n *\n * The operation used to declare six booleans (`resetNotifications`, `resetPrivacy`, `resetUI`,\n * `resetRegional`, `resetLanguage`, `resetAll`). None of them is a field on\n * `UserPreferencesSchema`, and a payload is stripped THREE times on the way to the database —\n * the controller parses the body against the operation `requestDto`, the repository re-parses\n * the write against that same DTO, and Mongoose drops every non-schema path. A request naming\n * no schema path therefore produced an empty `$set`: the route answered HTTP 200 having reset\n * nothing. That is the class of defect catalogued in\n * the 2026-08-01 routed-but-unimplemented operation sweep (#1275).\n *\n * ## How the reset reaches the database now\n *\n * `requestDto` names the caller-facing vocabulary ({@link UserPreferenceGroup}); a\n * `basicPrefixOperation` turns it into the patch this module builds. The framework merges a\n * prefix's return value onto the payload and whitelists the keys the prefix ADDED into\n * `preserveServerInjectedFields`, which the repository re-attaches after its strict parse. So\n * the group fields persist while the `groups` array itself — a client-supplied key, never\n * whitelisted — is stripped before it can reach a document.\n *\n * The patch is deliberately PARTIAL. The repository `$set`s it with no dot-path flattening, so\n * naming a group replaces that whole subdocument (which is exactly what \"reset this block\"\n * means), while an unnamed group is not in the `$set` at all and is left untouched. Spreading\n * the current row instead — the shape `todo-lists`/`todos` use — would make `_id` and `userId`\n * prefix-injected keys and re-write `userId` on every reset, despite it being\n * `.excludeFromUpdate()`.\n */\n\nimport { z } from \"zod\";\nimport { EnumEditMode } from \"@wildo-ai/zod-decorators\";\n\nimport {\n UserPreferenceGroup,\n UserPreferences,\n UserLanguagePreferencesSchema,\n UserPreferences_NotificationsSchema,\n UserPreferences_RegionalSchema,\n UserPreferences_UI_ThemeSchema,\n} from \"./users.shared.schemas\";\nimport { UserPrivacySchema } from \"../compliance/privacy/privacy.shared.schemas\";\n\n/**\n * The `reset_to_defaults` request body for the subject-facing preferences resource.\n *\n * `.min(1)` is load-bearing, not decoration: a reset naming no group would write nothing and\n * answer 200, re-creating the exact silent no-op this operation was fixed for. Rejecting it at\n * the DTO makes that unrepresentable — the controller's strict parse turns it into a 400 before\n * any dispatch, and the repository's re-parse of the write enforces the same rule on every\n * non-HTTP path.\n *\n * `COMBOBOX` renders the array as a chips multi-select rather than an add-a-row array field,\n * matching how `fallbackLanguages` presents a compact multi-select in the same settings surface.\n */\nexport const UserPreferencesResetRequestSchema = z.object({\n groups: z.array(z.enum(UserPreferenceGroup).enumUI({ edit: { editMode: EnumEditMode.COMBOBOX } })).min(1),\n});\n\nexport type UserPreferencesResetRequest = z.infer<typeof UserPreferencesResetRequestSchema>;\n\n/**\n * How each preference block returns to its defaults.\n *\n * The mapped type is the integrity proof: `UserPreferences[Group]` only type-checks when every\n * {@link UserPreferenceGroup} value is a real field of `UserPreferences`. Typo a value, rename a\n * group field without renaming the enum value, or add a group member without a factory, and\n * this stops compiling — instead of shipping a patch key Mongoose silently drops, which is the\n * failure mode that made the old contract a no-op.\n */\ntype UserPreferenceGroupResetFactories = {\n [Group in UserPreferenceGroup]: (currentPreferences: UserPreferences | undefined) => UserPreferences[Group];\n};\n\n/**\n * Every block is preference state. Governed-document interaction receipts live in their own\n * immutable release-bound store and therefore cannot be erased or forged by this reset path.\n */\nconst USER_PREFERENCE_GROUP_RESET_FACTORIES: UserPreferenceGroupResetFactories = {\n [UserPreferenceGroup.NOTIFICATIONS]: () => UserPreferences_NotificationsSchema.parse({}),\n [UserPreferenceGroup.UI]: () => UserPreferences_UI_ThemeSchema.parse({}),\n [UserPreferenceGroup.REGIONAL]: () => UserPreferences_RegionalSchema.parse({}),\n [UserPreferenceGroup.LANGUAGE]: () => UserLanguagePreferencesSchema.parse({}),\n [UserPreferenceGroup.PRIVACY]: () => UserPrivacySchema.parse({}),\n};\n\n/**\n * The persistence patch for a `reset_to_defaults` request — one key per requested block, and\n * nothing else.\n *\n * Returned from a `basicPrefixOperation`, so the framework merges it onto the payload and the\n * core UPDATE persists it. Keys absent from the patch are absent from the `$set`, so an\n * unnamed block is left exactly as it was.\n *\n * assurance-control: WILDO.PRIVACY.CONSENT_RECORD — resetting {@link UserPreferenceGroup.PRIVACY}\n * returns `consentedPurposes` to the empty set and clears `consentDecidedAt`, which IS a consent\n * decision — a withdrawal of everything, after which a consent surface asks again. It leaves a trail\n * naming the previous and resulting value: the operation is CRITICAL, so it sits above the\n * framework's automatic audit floor and emits `resource_operation_performed`, and\n * `consentedPurposes` carries `.isAuditEvidence()` so its VALUES ride on that record. Governed-document receipts are neither preference members nor resettable values.\n *\n * @param request - the parsed request body. Re-parse `inputDto` through\n * {@link UserPreferencesResetRequestSchema} at the call site rather than casting it: the\n * prefix hook types `inputDto` as the resource's main schema, while the runtime value is the\n * operation's request DTO.\n * @param currentPreferences - the row being reset, supplied to each block factory. Current\n * factories return schema defaults; governed-document receipts live outside this resource.\n */\nexport function buildUserPreferencesResetPatch(\n request: UserPreferencesResetRequest,\n currentPreferences: UserPreferences | undefined,\n): Partial<UserPreferences> {\n const patch: Partial<UserPreferences> = {};\n\n for (const group of request.groups) {\n // Same correlated-write widening as above: the factory is selected by the same key it\n // writes, so the value type is right by construction and only the assignment is widened.\n (patch as Record<string, unknown>)[group] = USER_PREFERENCE_GROUP_RESET_FACTORIES[group](currentPreferences);\n }\n\n return patch;\n}\n"]}
1
+ {"version":3,"file":"user-preferences-reset.shared.utils.js","sourceRoot":"","sources":["../../../src/users/user-preferences-reset.shared.utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEhE,OAAO,EACL,mBAAmB,EAEnB,6BAA6B,EAC7B,mCAAmC,EACnC,8BAA8B,EAC9B,8BAA8B,GAC/B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,iBAAiB,EAAE,MAAM,8CAA8C,CAAC;AAEjF;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAAC,CAAC,MAAM,CAAC;IACxD,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,EAAE,gBAAgB,EAAE,oBAAoB,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,sWAAsW,CAAC;CAC3e,CAAC,CAAC;AAiBH;;;GAGG;AACH,MAAM,qCAAqC,GAAsC;IAC/E,CAAC,mBAAmB,CAAC,aAAa,CAAC,EAAE,GAAG,EAAE,CAAC,mCAAmC,CAAC,KAAK,CAAC,EAAE,CAAC;IACxF,CAAC,mBAAmB,CAAC,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,8BAA8B,CAAC,KAAK,CAAC,EAAE,CAAC;IACxE,CAAC,mBAAmB,CAAC,QAAQ,CAAC,EAAE,GAAG,EAAE,CAAC,8BAA8B,CAAC,KAAK,CAAC,EAAE,CAAC;IAC9E,CAAC,mBAAmB,CAAC,QAAQ,CAAC,EAAE,GAAG,EAAE,CAAC,6BAA6B,CAAC,KAAK,CAAC,EAAE,CAAC;IAC7E,CAAC,mBAAmB,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,CAAC,iBAAiB,CAAC,KAAK,CAAC,EAAE,CAAC;CACjE,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,UAAU,8BAA8B,CAC5C,OAAoC,EACpC,kBAA+C;IAE/C,MAAM,KAAK,GAA6B,EAAE,CAAC;IAE3C,KAAK,MAAM,KAAK,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;QACnC,sFAAsF;QACtF,yFAAyF;QACxF,KAAiC,CAAC,KAAK,CAAC,GAAG,qCAAqC,CAAC,KAAK,CAAC,CAAC,kBAAkB,CAAC,CAAC;IAC/G,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["/**\n * User Preferences Reset — the shared contract behind `reset_to_defaults`.\n *\n * ONE authority for the self-service reset of a preferences row. `USER_SELF_PREFERENCES`\n * resolves to the `USER_PREFERENCES` persistence collection, but the administrator-addressed\n * resource deliberately exposes no reset operation: a second public verb would be a second\n * contract for the same mutation, free to drift. Administrators have the generic UPDATE for an\n * explicit correction; subjects own selective reset here.\n *\n * ## Why this file exists at all\n *\n * The operation used to declare six booleans (`resetNotifications`, `resetPrivacy`, `resetUI`,\n * `resetRegional`, `resetLanguage`, `resetAll`). None of them is a field on\n * `UserPreferencesSchema`, and a payload is stripped THREE times on the way to the database —\n * the controller parses the body against the operation `requestDto`, the repository re-parses\n * the write against that same DTO, and Mongoose drops every non-schema path. A request naming\n * no schema path therefore produced an empty `$set`: the route answered HTTP 200 having reset\n * nothing. That is the class of defect catalogued in\n * the 2026-08-01 routed-but-unimplemented operation sweep (#1275).\n *\n * ## How the reset reaches the database now\n *\n * `requestDto` names the caller-facing vocabulary ({@link UserPreferenceGroup}); a\n * `basicPrefixOperation` turns it into the patch this module builds. The framework merges a\n * prefix's return value onto the payload and whitelists the keys the prefix ADDED into\n * `preserveServerInjectedFields`, which the repository re-attaches after its strict parse. So\n * the group fields persist while the `groups` array itself — a client-supplied key, never\n * whitelisted — is stripped before it can reach a document.\n *\n * The patch is deliberately PARTIAL. The repository `$set`s it with no dot-path flattening, so\n * naming a group replaces that whole subdocument (which is exactly what \"reset this block\"\n * means), while an unnamed group is not in the `$set` at all and is left untouched. Spreading\n * the current row instead — the shape `todo-lists`/`todos` use — would make `_id` and `userId`\n * prefix-injected keys and re-write `userId` on every reset, despite it being\n * `.excludeFromUpdate()`.\n */\n\nimport { z } from \"zod\";\nimport { EnumMultipleEditMode } from \"@wildo-ai/zod-decorators\";\n\nimport {\n UserPreferenceGroup,\n UserPreferences,\n UserLanguagePreferencesSchema,\n UserPreferences_NotificationsSchema,\n UserPreferences_RegionalSchema,\n UserPreferences_UI_ThemeSchema,\n} from \"./users.shared.schemas\";\nimport { UserPrivacySchema } from \"../compliance/privacy/privacy.shared.schemas\";\n\n/**\n * The `reset_to_defaults` request body for the subject-facing preferences resource.\n *\n * `.min(1)` is load-bearing, not decoration: a reset naming no group would write nothing and\n * answer 200, re-creating the exact silent no-op this operation was fixed for. Rejecting it at\n * the DTO makes that unrepresentable — the controller's strict parse turns it into a 400 before\n * any dispatch, and the repository's re-parse of the write enforces the same rule on every\n * non-HTTP path.\n *\n * `COMBOBOX` renders the array as a chips multi-select rather than an add-a-row array field,\n * matching how `fallbackLanguages` presents a compact multi-select in the same settings surface.\n */\nexport const UserPreferencesResetRequestSchema = z.object({\n groups: z.array(z.enum(UserPreferenceGroup).enumUI({ edit: { multipleEditMode: EnumMultipleEditMode.COMBOBOX } })).min(1).describe(\"The preference blocks to return to their defaults, by field name: `notifications`, `privacy`, `ui`, `regional` or `languagePreferences`. At least one is required, and blocks not named are left unchanged. Resetting `privacy` withdraws every consent the user has given; resetting `regional` clears the user's own regional choices so the organization's apply.\"),\n});\n\nexport type UserPreferencesResetRequest = z.infer<typeof UserPreferencesResetRequestSchema>;\n\n/**\n * How each preference block returns to its defaults.\n *\n * The mapped type is the integrity proof: `UserPreferences[Group]` only type-checks when every\n * {@link UserPreferenceGroup} value is a real field of `UserPreferences`. Typo a value, rename a\n * group field without renaming the enum value, or add a group member without a factory, and\n * this stops compiling — instead of shipping a patch key Mongoose silently drops, which is the\n * failure mode that made the old contract a no-op.\n */\ntype UserPreferenceGroupResetFactories = {\n [Group in UserPreferenceGroup]: (currentPreferences: UserPreferences | undefined) => UserPreferences[Group];\n};\n\n/**\n * Every block is preference state. Governed-document interaction receipts live in their own\n * immutable release-bound store and therefore cannot be erased or forged by this reset path.\n */\nconst USER_PREFERENCE_GROUP_RESET_FACTORIES: UserPreferenceGroupResetFactories = {\n [UserPreferenceGroup.NOTIFICATIONS]: () => UserPreferences_NotificationsSchema.parse({}),\n [UserPreferenceGroup.UI]: () => UserPreferences_UI_ThemeSchema.parse({}),\n [UserPreferenceGroup.REGIONAL]: () => UserPreferences_RegionalSchema.parse({}),\n [UserPreferenceGroup.LANGUAGE]: () => UserLanguagePreferencesSchema.parse({}),\n [UserPreferenceGroup.PRIVACY]: () => UserPrivacySchema.parse({}),\n};\n\n/**\n * The persistence patch for a `reset_to_defaults` request — one key per requested block, and\n * nothing else.\n *\n * Returned from a `basicPrefixOperation`, so the framework merges it onto the payload and the\n * core UPDATE persists it. Keys absent from the patch are absent from the `$set`, so an\n * unnamed block is left exactly as it was.\n *\n * assurance-control: WILDO.PRIVACY.CONSENT_RECORD — resetting {@link UserPreferenceGroup.PRIVACY}\n * returns `consentedPurposes` to the empty set and clears `consentDecidedAt`, which IS a consent\n * decision — a withdrawal of everything, after which a consent surface asks again. It leaves a trail\n * naming the previous and resulting value: the operation is CRITICAL, so it sits above the\n * framework's automatic audit floor and emits `resource_operation_performed`, and\n * `consentedPurposes` carries `.isAuditEvidence()` so its VALUES ride on that record. Governed-document receipts are neither preference members nor resettable values.\n *\n * @param request - the parsed request body. Re-parse `inputDto` through\n * {@link UserPreferencesResetRequestSchema} at the call site rather than casting it: the\n * prefix hook types `inputDto` as the resource's main schema, while the runtime value is the\n * operation's request DTO.\n * @param currentPreferences - the row being reset, supplied to each block factory. Current\n * factories return schema defaults; governed-document receipts live outside this resource.\n */\nexport function buildUserPreferencesResetPatch(\n request: UserPreferencesResetRequest,\n currentPreferences: UserPreferences | undefined,\n): Partial<UserPreferences> {\n const patch: Partial<UserPreferences> = {};\n\n for (const group of request.groups) {\n // Same correlated-write widening as above: the factory is selected by the same key it\n // writes, so the value type is right by construction and only the assignment is widened.\n (patch as Record<string, unknown>)[group] = USER_PREFERENCE_GROUP_RESET_FACTORIES[group](currentPreferences);\n }\n\n return patch;\n}\n"]}
@@ -57,8 +57,6 @@ export declare const userPreferencesResourceConfiguration_InitializationFactory:
57
57
  userId: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<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.ZodString>>>>>;
58
58
  notifications: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodDefault<z.ZodObject<{
59
59
  email: z.ZodDefault<z.ZodBoolean>;
60
- push: z.ZodDefault<z.ZodBoolean>;
61
- sms: z.ZodDefault<z.ZodBoolean>;
62
60
  inApp: z.ZodDefault<z.ZodBoolean>;
63
61
  }, z.core.$strip>>>;
64
62
  privacy: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodDefault<z.ZodObject<{
@@ -77,7 +75,6 @@ export declare const userPreferencesResourceConfiguration_InitializationFactory:
77
75
  languagePreferences: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodDefault<z.ZodObject<{
78
76
  primaryLanguage: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodDefault<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodEnum<typeof import("@wildo-ai/presets-components-models").AvailableLanguage>>>>;
79
77
  fallbackLanguages: z.ZodDefault<z.ZodArray<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodEnum<typeof import("@wildo-ai/presets-components-models").AvailableLanguage>>>>>;
80
- autoDetect: z.ZodDefault<z.ZodBoolean>;
81
78
  useOrganizationDefault: z.ZodDefault<z.ZodBoolean>;
82
79
  }, z.core.$strip>>>>;
83
80
  }, z.core.$strip>>;
@@ -1 +1 @@
1
- {"version":3,"file":"user-preferences.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["../../../../src/users/user-preferences.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,OAAO,EAAE,qBAAqB,EAAE,MAAM,gDAAgD,CAAC;AACvF,OAAO,EAA8B,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAWzG;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,oBAAY,0BAA0B;IACpC,uBAAuB,4BAA4B;CACpD;AAED;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,iDAAiD;;;;;iBAE5D,CAAC;AAEH,MAAM,MAAM,2CAA2C,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iDAAiD,CAAC,CAAC;AAE5H,KAAK,6BAA6B,GAC9B,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,WAAW,GACjC,qBAAqB,CAAC,MAAM,CAAC;AAKjC,eAAO,MAAM,0DAA0D,GAAI,wBAAwB,oBAAoB,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAkNvH,CAAC"}
1
+ {"version":3,"file":"user-preferences.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["../../../src/users/user-preferences.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,OAAO,EAAE,qBAAqB,EAAE,MAAM,gDAAgD,CAAC;AACvF,OAAO,EAA8B,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAWzG;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,oBAAY,0BAA0B;IACpC,uBAAuB,4BAA4B;CACpD;AAED;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,iDAAiD;;;;;iBAE5D,CAAC;AAEH,MAAM,MAAM,2CAA2C,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iDAAiD,CAAC,CAAC;AAE5H,KAAK,6BAA6B,GAC9B,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,WAAW,GACjC,qBAAqB,CAAC,MAAM,CAAC;AAKjC,eAAO,MAAM,0DAA0D,GAAI,wBAAwB,oBAAoB,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;kBAkNvH,CAAC"}