@wildo-ai/saas-specifications 1.1.9 → 1.1.11

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 (928) hide show
  1. package/dist/esm/_catalogs/schema-org/_catalog-spec.shared.schemas.d.ts +5 -4
  2. package/dist/esm/_catalogs/schema-org/_catalog-spec.shared.schemas.d.ts.map +1 -1
  3. package/dist/esm/_catalogs/schema-org/_catalog-spec.shared.schemas.js +5 -4
  4. package/dist/esm/_catalogs/schema-org/_catalog-spec.shared.schemas.js.map +1 -1
  5. package/dist/esm/_catalogs/schema-org/index.js +1 -1
  6. package/dist/esm/_core/application-maturity/application-maturity.schemas.js +1 -1
  7. package/dist/esm/_core/application-maturity/application-maturity.schemas.js.map +1 -1
  8. package/dist/esm/_core/application-specification-family-identity.schemas.d.ts +11 -0
  9. package/dist/esm/_core/application-specification-family-identity.schemas.d.ts.map +1 -1
  10. package/dist/esm/_core/application-specification-family-identity.schemas.js +11 -0
  11. package/dist/esm/_core/application-specification-family-identity.schemas.js.map +1 -1
  12. package/dist/esm/_core/brand/brand-name-choice.d.ts +72 -10
  13. package/dist/esm/_core/brand/brand-name-choice.d.ts.map +1 -1
  14. package/dist/esm/_core/brand/brand-name-choice.js +144 -24
  15. package/dist/esm/_core/brand/brand-name-choice.js.map +1 -1
  16. package/dist/esm/_core/brand/brand-name-screening-generation.schemas.d.ts +41 -1
  17. package/dist/esm/_core/brand/brand-name-screening-generation.schemas.d.ts.map +1 -1
  18. package/dist/esm/_core/brand/brand-name-screening-generation.schemas.js +19 -3
  19. package/dist/esm/_core/brand/brand-name-screening-generation.schemas.js.map +1 -1
  20. package/dist/esm/_core/brand/brand-name-screening-validation.d.ts +7 -1
  21. package/dist/esm/_core/brand/brand-name-screening-validation.d.ts.map +1 -1
  22. package/dist/esm/_core/brand/brand-name-screening-validation.js +24 -3
  23. package/dist/esm/_core/brand/brand-name-screening-validation.js.map +1 -1
  24. package/dist/esm/_core/brand/brand-name-screening-view.d.ts +61 -9
  25. package/dist/esm/_core/brand/brand-name-screening-view.d.ts.map +1 -1
  26. package/dist/esm/_core/brand/brand-name-screening-view.js +42 -1
  27. package/dist/esm/_core/brand/brand-name-screening-view.js.map +1 -1
  28. package/dist/esm/_core/brand/brand-name-screening.schemas.d.ts +130 -2
  29. package/dist/esm/_core/brand/brand-name-screening.schemas.d.ts.map +1 -1
  30. package/dist/esm/_core/brand/brand-name-screening.schemas.js +165 -3
  31. package/dist/esm/_core/brand/brand-name-screening.schemas.js.map +1 -1
  32. package/dist/esm/_core/brand/brand-visual-tone.schemas.d.ts +25 -7
  33. package/dist/esm/_core/brand/brand-visual-tone.schemas.d.ts.map +1 -1
  34. package/dist/esm/_core/brand/brand-visual-tone.schemas.js +26 -8
  35. package/dist/esm/_core/brand/brand-visual-tone.schemas.js.map +1 -1
  36. package/dist/esm/_core/build-plan/build-plan-task-graph-generation.schemas.d.ts +76 -0
  37. package/dist/esm/_core/build-plan/build-plan-task-graph-generation.schemas.d.ts.map +1 -1
  38. package/dist/esm/_core/build-plan/build-plan-task-graph-validation.d.ts +7 -2
  39. package/dist/esm/_core/build-plan/build-plan-task-graph-validation.d.ts.map +1 -1
  40. package/dist/esm/_core/build-plan/build-plan-task-graph-validation.js +21 -3
  41. package/dist/esm/_core/build-plan/build-plan-task-graph-validation.js.map +1 -1
  42. package/dist/esm/_core/build-plan/build-plan-task-graph.schemas.d.ts +411 -13
  43. package/dist/esm/_core/build-plan/build-plan-task-graph.schemas.d.ts.map +1 -1
  44. package/dist/esm/_core/build-plan/build-plan-task-graph.schemas.js +281 -8
  45. package/dist/esm/_core/build-plan/build-plan-task-graph.schemas.js.map +1 -1
  46. package/dist/esm/_core/build-plan/build-plan.family-aspects.js +1 -1
  47. package/dist/esm/_core/build-plan/build-plan.family-aspects.js.map +1 -1
  48. package/dist/esm/_core/business-model-lite/business-model-lite-snapshot-generation.schemas.d.ts +4 -0
  49. package/dist/esm/_core/business-model-lite/business-model-lite-snapshot-generation.schemas.d.ts.map +1 -1
  50. package/dist/esm/_core/business-model-lite/business-model-lite-snapshot-generation.schemas.js +3 -0
  51. package/dist/esm/_core/business-model-lite/business-model-lite-snapshot-generation.schemas.js.map +1 -1
  52. package/dist/esm/_core/business-model-lite/business-model-lite-snapshot-validation.d.ts +6 -0
  53. package/dist/esm/_core/business-model-lite/business-model-lite-snapshot-validation.d.ts.map +1 -1
  54. package/dist/esm/_core/business-model-lite/business-model-lite-snapshot-validation.js +20 -0
  55. package/dist/esm/_core/business-model-lite/business-model-lite-snapshot-validation.js.map +1 -1
  56. package/dist/esm/_core/business-model-lite/business-model-lite-snapshot.schemas.d.ts +1 -0
  57. package/dist/esm/_core/business-model-lite/business-model-lite-snapshot.schemas.d.ts.map +1 -1
  58. package/dist/esm/_core/business-model-lite/pricing-plan.schemas.d.ts +1 -0
  59. package/dist/esm/_core/business-model-lite/pricing-plan.schemas.d.ts.map +1 -1
  60. package/dist/esm/_core/business-model-lite/pricing-plan.schemas.js +7 -0
  61. package/dist/esm/_core/business-model-lite/pricing-plan.schemas.js.map +1 -1
  62. package/dist/esm/_core/capability-composition/capability-composition.schemas.d.ts +4 -3
  63. package/dist/esm/_core/capability-composition/capability-composition.schemas.d.ts.map +1 -1
  64. package/dist/esm/_core/capability-composition/capability-composition.schemas.js +4 -3
  65. package/dist/esm/_core/capability-composition/capability-composition.schemas.js.map +1 -1
  66. package/dist/esm/_core/compliance-documents/ai-document-facts.schemas.d.ts +265 -0
  67. package/dist/esm/_core/compliance-documents/ai-document-facts.schemas.d.ts.map +1 -0
  68. package/dist/esm/_core/compliance-documents/ai-document-facts.schemas.js +371 -0
  69. package/dist/esm/_core/compliance-documents/ai-document-facts.schemas.js.map +1 -0
  70. package/dist/esm/_core/compliance-documents/computed-document-facts.schemas.d.ts +55 -5
  71. package/dist/esm/_core/compliance-documents/computed-document-facts.schemas.d.ts.map +1 -1
  72. package/dist/esm/_core/compliance-documents/computed-document-facts.schemas.js +66 -2
  73. package/dist/esm/_core/compliance-documents/computed-document-facts.schemas.js.map +1 -1
  74. package/dist/esm/_core/compliance-documents/launch-blockers.schemas.d.ts +42 -2
  75. package/dist/esm/_core/compliance-documents/launch-blockers.schemas.d.ts.map +1 -1
  76. package/dist/esm/_core/compliance-documents/launch-blockers.schemas.js +174 -1
  77. package/dist/esm/_core/compliance-documents/launch-blockers.schemas.js.map +1 -1
  78. package/dist/esm/_core/compliance-documents/processor-register.schemas.d.ts +4 -1
  79. package/dist/esm/_core/compliance-documents/processor-register.schemas.d.ts.map +1 -1
  80. package/dist/esm/_core/compliance-documents/processor-register.schemas.js +10 -1
  81. package/dist/esm/_core/compliance-documents/processor-register.schemas.js.map +1 -1
  82. package/dist/esm/_core/compliance-documents/recipient-disclosures.schemas.d.ts +102 -10
  83. package/dist/esm/_core/compliance-documents/recipient-disclosures.schemas.d.ts.map +1 -1
  84. package/dist/esm/_core/compliance-documents/recipient-disclosures.schemas.js +128 -25
  85. package/dist/esm/_core/compliance-documents/recipient-disclosures.schemas.js.map +1 -1
  86. package/dist/esm/_core/compliance-documents/recipient-population.schemas.d.ts +28 -0
  87. package/dist/esm/_core/compliance-documents/recipient-population.schemas.d.ts.map +1 -1
  88. package/dist/esm/_core/compliance-documents/recipient-population.schemas.js +36 -1
  89. package/dist/esm/_core/compliance-documents/recipient-population.schemas.js.map +1 -1
  90. package/dist/esm/_core/compliance-documents/required-document-set.schemas.d.ts +15 -0
  91. package/dist/esm/_core/compliance-documents/required-document-set.schemas.d.ts.map +1 -1
  92. package/dist/esm/_core/compliance-documents/required-document-set.schemas.js +15 -0
  93. package/dist/esm/_core/compliance-documents/required-document-set.schemas.js.map +1 -1
  94. package/dist/esm/_core/compliance-documents/subject-data-recipients.schemas.d.ts +21 -10
  95. package/dist/esm/_core/compliance-documents/subject-data-recipients.schemas.d.ts.map +1 -1
  96. package/dist/esm/_core/compliance-documents/subject-data-recipients.schemas.js +130 -14
  97. package/dist/esm/_core/compliance-documents/subject-data-recipients.schemas.js.map +1 -1
  98. package/dist/esm/_core/data-seed-specification.schemas.d.ts.map +1 -1
  99. package/dist/esm/_core/data-seed-specification.schemas.js +5 -1
  100. package/dist/esm/_core/data-seed-specification.schemas.js.map +1 -1
  101. package/dist/esm/_core/domain-plan/domain-plan-output-set-generation.schemas.d.ts +32 -1
  102. package/dist/esm/_core/domain-plan/domain-plan-output-set-generation.schemas.d.ts.map +1 -1
  103. package/dist/esm/_core/domain-plan/domain-plan-output-set-generation.schemas.js +41 -1
  104. package/dist/esm/_core/domain-plan/domain-plan-output-set-generation.schemas.js.map +1 -1
  105. package/dist/esm/_core/domain-plan/domain-plan-output-set-validation.d.ts +33 -1
  106. package/dist/esm/_core/domain-plan/domain-plan-output-set-validation.d.ts.map +1 -1
  107. package/dist/esm/_core/domain-plan/domain-plan-output-set-validation.js +134 -9
  108. package/dist/esm/_core/domain-plan/domain-plan-output-set-validation.js.map +1 -1
  109. package/dist/esm/_core/domain-plan/domain-plan-output-set.schemas.d.ts +117 -0
  110. package/dist/esm/_core/domain-plan/domain-plan-output-set.schemas.d.ts.map +1 -1
  111. package/dist/esm/_core/domain-plan/domain-plan-output-set.schemas.js +118 -0
  112. package/dist/esm/_core/domain-plan/domain-plan-output-set.schemas.js.map +1 -1
  113. package/dist/esm/_core/domain-plan/domain-plan.family-aspects.d.ts +1 -0
  114. package/dist/esm/_core/domain-plan/domain-plan.family-aspects.d.ts.map +1 -1
  115. package/dist/esm/_core/domain-plan/domain-plan.family-aspects.js +22 -1
  116. package/dist/esm/_core/domain-plan/domain-plan.family-aspects.js.map +1 -1
  117. package/dist/esm/_core/experience-plan/experience-plan-generation.schemas.d.ts +17 -1
  118. package/dist/esm/_core/experience-plan/experience-plan-generation.schemas.d.ts.map +1 -1
  119. package/dist/esm/_core/experience-plan/experience-plan-generation.schemas.js +21 -5
  120. package/dist/esm/_core/experience-plan/experience-plan-generation.schemas.js.map +1 -1
  121. package/dist/esm/_core/experience-plan/experience-plan-validation.d.ts +7 -1
  122. package/dist/esm/_core/experience-plan/experience-plan-validation.d.ts.map +1 -1
  123. package/dist/esm/_core/experience-plan/experience-plan-validation.js +39 -1
  124. package/dist/esm/_core/experience-plan/experience-plan-validation.js.map +1 -1
  125. package/dist/esm/_core/experience-plan/experience-plan.family-aspects.d.ts.map +1 -1
  126. package/dist/esm/_core/experience-plan/experience-plan.family-aspects.js +31 -5
  127. package/dist/esm/_core/experience-plan/experience-plan.family-aspects.js.map +1 -1
  128. package/dist/esm/_core/experience-plan/experience-plan.schemas.d.ts +81 -9
  129. package/dist/esm/_core/experience-plan/experience-plan.schemas.d.ts.map +1 -1
  130. package/dist/esm/_core/experience-plan/experience-plan.schemas.js +88 -7
  131. package/dist/esm/_core/experience-plan/experience-plan.schemas.js.map +1 -1
  132. package/dist/esm/_core/expert-personas/expert-persona-charter.schemas.d.ts +13 -6
  133. package/dist/esm/_core/expert-personas/expert-persona-charter.schemas.d.ts.map +1 -1
  134. package/dist/esm/_core/expert-personas/expert-persona-charter.schemas.js +13 -6
  135. package/dist/esm/_core/expert-personas/expert-persona-charter.schemas.js.map +1 -1
  136. package/dist/esm/_core/family-aspects.registry.d.ts.map +1 -1
  137. package/dist/esm/_core/family-aspects.registry.js +2 -0
  138. package/dist/esm/_core/family-aspects.registry.js.map +1 -1
  139. package/dist/esm/_core/family-aspects.schemas.d.ts +24 -0
  140. package/dist/esm/_core/family-aspects.schemas.d.ts.map +1 -1
  141. package/dist/esm/_core/family-aspects.schemas.js +20 -0
  142. package/dist/esm/_core/family-aspects.schemas.js.map +1 -1
  143. package/dist/esm/_core/feature-drafts/capability-map-output-set-generation.schemas.d.ts +6 -6
  144. package/dist/esm/_core/feature-drafts/feature-specification-drafts.schemas.js +2 -2
  145. package/dist/esm/_core/feature-drafts/feature-specification-drafts.schemas.js.map +1 -1
  146. package/dist/esm/_core/index.d.ts +6 -0
  147. package/dist/esm/_core/index.d.ts.map +1 -1
  148. package/dist/esm/_core/index.js +6 -0
  149. package/dist/esm/_core/index.js.map +1 -1
  150. package/dist/esm/_core/integration-plan/integration-plan-generation.schemas.d.ts +1 -0
  151. package/dist/esm/_core/integration-plan/integration-plan-generation.schemas.d.ts.map +1 -1
  152. package/dist/esm/_core/integration-plan/integration-plan.family-aspects.d.ts.map +1 -1
  153. package/dist/esm/_core/integration-plan/integration-plan.family-aspects.js +2 -1
  154. package/dist/esm/_core/integration-plan/integration-plan.family-aspects.js.map +1 -1
  155. package/dist/esm/_core/integration-plan/integration-plan.schemas.d.ts +26 -2
  156. package/dist/esm/_core/integration-plan/integration-plan.schemas.d.ts.map +1 -1
  157. package/dist/esm/_core/integration-plan/integration-plan.schemas.js +21 -1
  158. package/dist/esm/_core/integration-plan/integration-plan.schemas.js.map +1 -1
  159. package/dist/esm/_core/market/market-references.schemas.d.ts +7 -0
  160. package/dist/esm/_core/market/market-references.schemas.d.ts.map +1 -1
  161. package/dist/esm/_core/market/market-references.schemas.js +13 -1
  162. package/dist/esm/_core/market/market-references.schemas.js.map +1 -1
  163. package/dist/esm/_core/market/market-snapshot-generation.schemas.d.ts +18 -12
  164. package/dist/esm/_core/market/market-snapshot-generation.schemas.d.ts.map +1 -1
  165. package/dist/esm/_core/market/market-snapshot-generation.schemas.js +46 -17
  166. package/dist/esm/_core/market/market-snapshot-generation.schemas.js.map +1 -1
  167. package/dist/esm/_core/market/market.family-aspects.d.ts.map +1 -1
  168. package/dist/esm/_core/market/market.family-aspects.js +4 -1
  169. package/dist/esm/_core/market/market.family-aspects.js.map +1 -1
  170. package/dist/esm/_core/placement-plan/placement-plan-generation.schemas.d.ts +15 -3
  171. package/dist/esm/_core/placement-plan/placement-plan-generation.schemas.d.ts.map +1 -1
  172. package/dist/esm/_core/placement-plan/placement-plan-generation.schemas.js +6 -3
  173. package/dist/esm/_core/placement-plan/placement-plan-generation.schemas.js.map +1 -1
  174. package/dist/esm/_core/placement-plan/placement-plan-validation.d.ts +12 -1
  175. package/dist/esm/_core/placement-plan/placement-plan-validation.d.ts.map +1 -1
  176. package/dist/esm/_core/placement-plan/placement-plan-validation.js +56 -3
  177. package/dist/esm/_core/placement-plan/placement-plan-validation.js.map +1 -1
  178. package/dist/esm/_core/placement-plan/placement-plan.family-aspects.d.ts.map +1 -1
  179. package/dist/esm/_core/placement-plan/placement-plan.family-aspects.js +9 -0
  180. package/dist/esm/_core/placement-plan/placement-plan.family-aspects.js.map +1 -1
  181. package/dist/esm/_core/placement-plan/placement-plan.schemas.d.ts +83 -0
  182. package/dist/esm/_core/placement-plan/placement-plan.schemas.d.ts.map +1 -1
  183. package/dist/esm/_core/placement-plan/placement-plan.schemas.js +102 -2
  184. package/dist/esm/_core/placement-plan/placement-plan.schemas.js.map +1 -1
  185. package/dist/esm/_core/requirements/functional-requirement.schemas.d.ts +3 -2
  186. package/dist/esm/_core/requirements/functional-requirement.schemas.d.ts.map +1 -1
  187. package/dist/esm/_core/requirements/functional-requirement.schemas.js +8 -2
  188. package/dist/esm/_core/requirements/functional-requirement.schemas.js.map +1 -1
  189. package/dist/esm/_core/requirements/non-functional-requirement.schemas.d.ts +1 -0
  190. package/dist/esm/_core/requirements/non-functional-requirement.schemas.d.ts.map +1 -1
  191. package/dist/esm/_core/requirements/non-functional-requirement.schemas.js +2 -0
  192. package/dist/esm/_core/requirements/non-functional-requirement.schemas.js.map +1 -1
  193. package/dist/esm/_core/requirements/requirements-pain-coverage.d.ts +41 -0
  194. package/dist/esm/_core/requirements/requirements-pain-coverage.d.ts.map +1 -0
  195. package/dist/esm/_core/requirements/requirements-pain-coverage.js +63 -0
  196. package/dist/esm/_core/requirements/requirements-pain-coverage.js.map +1 -0
  197. package/dist/esm/_core/requirements/requirements-references.schemas.d.ts +1 -1
  198. package/dist/esm/_core/requirements/requirements-references.schemas.js +1 -1
  199. package/dist/esm/_core/requirements/requirements-references.schemas.js.map +1 -1
  200. package/dist/esm/_core/requirements/requirements-snapshot-generation.schemas.d.ts +16 -0
  201. package/dist/esm/_core/requirements/requirements-snapshot-generation.schemas.d.ts.map +1 -1
  202. package/dist/esm/_core/requirements/requirements-snapshot-generation.schemas.js +12 -1
  203. package/dist/esm/_core/requirements/requirements-snapshot-generation.schemas.js.map +1 -1
  204. package/dist/esm/_core/requirements/requirements-snapshot-validation.d.ts +13 -2
  205. package/dist/esm/_core/requirements/requirements-snapshot-validation.d.ts.map +1 -1
  206. package/dist/esm/_core/requirements/requirements-snapshot-validation.js +32 -1
  207. package/dist/esm/_core/requirements/requirements-snapshot-validation.js.map +1 -1
  208. package/dist/esm/_core/requirements/requirements-snapshot.schemas.d.ts +65 -1
  209. package/dist/esm/_core/requirements/requirements-snapshot.schemas.d.ts.map +1 -1
  210. package/dist/esm/_core/requirements/requirements-snapshot.schemas.js +53 -1
  211. package/dist/esm/_core/requirements/requirements-snapshot.schemas.js.map +1 -1
  212. package/dist/esm/_core/requirements/requirements.family-aspects.d.ts.map +1 -1
  213. package/dist/esm/_core/requirements/requirements.family-aspects.js +2 -0
  214. package/dist/esm/_core/requirements/requirements.family-aspects.js.map +1 -1
  215. package/dist/esm/_core/resource-specification.schemas.d.ts +56 -15
  216. package/dist/esm/_core/resource-specification.schemas.d.ts.map +1 -1
  217. package/dist/esm/_core/resource-specification.schemas.js +73 -13
  218. package/dist/esm/_core/resource-specification.schemas.js.map +1 -1
  219. package/dist/esm/_core/roadmap/roadmap-phase.schemas.d.ts +1 -16
  220. package/dist/esm/_core/roadmap/roadmap-phase.schemas.d.ts.map +1 -1
  221. package/dist/esm/_core/roadmap/roadmap-phase.schemas.js +3 -17
  222. package/dist/esm/_core/roadmap/roadmap-phase.schemas.js.map +1 -1
  223. package/dist/esm/_core/roadmap/roadmap-snapshot-generation.schemas.d.ts +2 -1
  224. package/dist/esm/_core/roadmap/roadmap-snapshot-generation.schemas.d.ts.map +1 -1
  225. package/dist/esm/_core/roadmap/roadmap-snapshot-generation.schemas.js +2 -1
  226. package/dist/esm/_core/roadmap/roadmap-snapshot-generation.schemas.js.map +1 -1
  227. package/dist/esm/_core/roadmap/roadmap-snapshot.schemas.d.ts +1 -1
  228. package/dist/esm/_core/service-method/service-method-derivation.d.ts +155 -0
  229. package/dist/esm/_core/service-method/service-method-derivation.d.ts.map +1 -0
  230. package/dist/esm/_core/service-method/service-method-derivation.js +410 -0
  231. package/dist/esm/_core/service-method/service-method-derivation.js.map +1 -0
  232. package/dist/esm/_core/service-method/service-method-generation.schemas.d.ts +86 -0
  233. package/dist/esm/_core/service-method/service-method-generation.schemas.d.ts.map +1 -0
  234. package/dist/esm/_core/service-method/service-method-generation.schemas.js +28 -0
  235. package/dist/esm/_core/service-method/service-method-generation.schemas.js.map +1 -0
  236. package/dist/esm/_core/service-method/service-method-validation.d.ts +35 -0
  237. package/dist/esm/_core/service-method/service-method-validation.d.ts.map +1 -0
  238. package/dist/esm/_core/service-method/service-method-validation.js +75 -0
  239. package/dist/esm/_core/service-method/service-method-validation.js.map +1 -0
  240. package/dist/esm/_core/service-method/service-method.family-aspects.d.ts +3 -0
  241. package/dist/esm/_core/service-method/service-method.family-aspects.d.ts.map +1 -0
  242. package/dist/esm/_core/service-method/service-method.family-aspects.js +59 -0
  243. package/dist/esm/_core/service-method/service-method.family-aspects.js.map +1 -0
  244. package/dist/esm/_core/service-method/service-method.schemas.d.ts +385 -0
  245. package/dist/esm/_core/service-method/service-method.schemas.d.ts.map +1 -0
  246. package/dist/esm/_core/service-method/service-method.schemas.js +372 -0
  247. package/dist/esm/_core/service-method/service-method.schemas.js.map +1 -0
  248. package/dist/esm/_core/website-plan/website-plan-generation.schemas.d.ts +37 -5
  249. package/dist/esm/_core/website-plan/website-plan-generation.schemas.d.ts.map +1 -1
  250. package/dist/esm/_core/website-plan/website-plan-generation.schemas.js +34 -6
  251. package/dist/esm/_core/website-plan/website-plan-generation.schemas.js.map +1 -1
  252. package/dist/esm/_core/website-plan/website-plan-validation.d.ts +29 -3
  253. package/dist/esm/_core/website-plan/website-plan-validation.d.ts.map +1 -1
  254. package/dist/esm/_core/website-plan/website-plan-validation.js +97 -5
  255. package/dist/esm/_core/website-plan/website-plan-validation.js.map +1 -1
  256. package/dist/esm/_core/website-plan/website-plan.family-aspects.d.ts.map +1 -1
  257. package/dist/esm/_core/website-plan/website-plan.family-aspects.js +6 -1
  258. package/dist/esm/_core/website-plan/website-plan.family-aspects.js.map +1 -1
  259. package/dist/esm/_core/website-plan/website-plan.schemas.d.ts +521 -15
  260. package/dist/esm/_core/website-plan/website-plan.schemas.d.ts.map +1 -1
  261. package/dist/esm/_core/website-plan/website-plan.schemas.js +703 -23
  262. package/dist/esm/_core/website-plan/website-plan.schemas.js.map +1 -1
  263. package/dist/esm/application-creation/accepted-change-attribution.application-creation.schemas.d.ts +78 -0
  264. package/dist/esm/application-creation/accepted-change-attribution.application-creation.schemas.d.ts.map +1 -0
  265. package/dist/esm/application-creation/accepted-change-attribution.application-creation.schemas.js +92 -0
  266. package/dist/esm/application-creation/accepted-change-attribution.application-creation.schemas.js.map +1 -0
  267. package/dist/esm/application-creation/application-creator-inputs.application-creation.schemas.d.ts +26 -0
  268. package/dist/esm/application-creation/application-creator-inputs.application-creation.schemas.d.ts.map +1 -1
  269. package/dist/esm/application-creation/application-creator-inputs.application-creation.schemas.js +14 -0
  270. package/dist/esm/application-creation/application-creator-inputs.application-creation.schemas.js.map +1 -1
  271. package/dist/esm/application-creation/application-document-fact-specification.application-creation.schemas.d.ts +21 -5
  272. package/dist/esm/application-creation/application-document-fact-specification.application-creation.schemas.d.ts.map +1 -1
  273. package/dist/esm/application-creation/application-document-fact-specification.application-creation.schemas.js +22 -4
  274. package/dist/esm/application-creation/application-document-fact-specification.application-creation.schemas.js.map +1 -1
  275. package/dist/esm/application-creation/application-line.application-creation.schemas.d.ts +119 -10
  276. package/dist/esm/application-creation/application-line.application-creation.schemas.d.ts.map +1 -1
  277. package/dist/esm/application-creation/application-line.application-creation.schemas.js +140 -7
  278. package/dist/esm/application-creation/application-line.application-creation.schemas.js.map +1 -1
  279. package/dist/esm/application-creation/domain-plan-evaluation-identities.application-creation.definitions.d.ts +7 -1
  280. package/dist/esm/application-creation/domain-plan-evaluation-identities.application-creation.definitions.d.ts.map +1 -1
  281. package/dist/esm/application-creation/domain-plan-evaluation-identities.application-creation.definitions.js +7 -1
  282. package/dist/esm/application-creation/domain-plan-evaluation-identities.application-creation.definitions.js.map +1 -1
  283. package/dist/esm/application-creation/journey.application-creation.schemas.d.ts +4 -2
  284. package/dist/esm/application-creation/journey.application-creation.schemas.d.ts.map +1 -1
  285. package/dist/esm/application-creation/journey.application-creation.schemas.js +4 -2
  286. package/dist/esm/application-creation/journey.application-creation.schemas.js.map +1 -1
  287. package/dist/esm/application-creation/playbooks.application-creation.schemas.d.ts +103 -15
  288. package/dist/esm/application-creation/playbooks.application-creation.schemas.d.ts.map +1 -1
  289. package/dist/esm/application-creation/playbooks.application-creation.schemas.js +151 -21
  290. package/dist/esm/application-creation/playbooks.application-creation.schemas.js.map +1 -1
  291. package/dist/esm/application-creation/structured-artifact-landing.application-creation.schemas.d.ts +1 -0
  292. package/dist/esm/application-creation/structured-artifact-landing.application-creation.schemas.d.ts.map +1 -1
  293. package/dist/esm/application-creation/structured-artifact-landing.application-creation.schemas.js +1 -0
  294. package/dist/esm/application-creation/structured-artifact-landing.application-creation.schemas.js.map +1 -1
  295. package/dist/esm/application-creation.exports.d.ts +7 -0
  296. package/dist/esm/application-creation.exports.d.ts.map +1 -1
  297. package/dist/esm/application-creation.exports.js +7 -0
  298. package/dist/esm/application-creation.exports.js.map +1 -1
  299. package/dist/esm/assurance/application-risk-signals.derivations.d.ts +36 -2
  300. package/dist/esm/assurance/application-risk-signals.derivations.d.ts.map +1 -1
  301. package/dist/esm/assurance/application-risk-signals.derivations.js +52 -4
  302. package/dist/esm/assurance/application-risk-signals.derivations.js.map +1 -1
  303. package/dist/esm/assurance/assurance-assessment-twins.d.ts +38 -0
  304. package/dist/esm/assurance/assurance-assessment-twins.d.ts.map +1 -0
  305. package/dist/esm/assurance/assurance-assessment-twins.js +36 -0
  306. package/dist/esm/assurance/assurance-assessment-twins.js.map +1 -0
  307. package/dist/esm/assurance/assurance-authority-basis.definitions.d.ts +608 -9
  308. package/dist/esm/assurance/assurance-authority-basis.definitions.d.ts.map +1 -1
  309. package/dist/esm/assurance/assurance-authority-basis.definitions.js +2962 -1078
  310. package/dist/esm/assurance/assurance-authority-basis.definitions.js.map +1 -1
  311. package/dist/esm/assurance/assurance-authority-basis.schemas.d.ts +15 -0
  312. package/dist/esm/assurance/assurance-authority-basis.schemas.d.ts.map +1 -1
  313. package/dist/esm/assurance/assurance-authority-basis.schemas.js +1 -0
  314. package/dist/esm/assurance/assurance-authority-basis.schemas.js.map +1 -1
  315. package/dist/esm/assurance/assurance-document-system.definitions.d.ts +2 -0
  316. package/dist/esm/assurance/assurance-document-system.definitions.d.ts.map +1 -1
  317. package/dist/esm/assurance/assurance-document-system.definitions.js +138 -19
  318. package/dist/esm/assurance/assurance-document-system.definitions.js.map +1 -1
  319. package/dist/esm/assurance/assurance-document-system.schemas.d.ts +65 -0
  320. package/dist/esm/assurance/assurance-document-system.schemas.d.ts.map +1 -1
  321. package/dist/esm/assurance/assurance-document-system.schemas.js +13 -0
  322. package/dist/esm/assurance/assurance-document-system.schemas.js.map +1 -1
  323. package/dist/esm/assurance/assurance-evidence-judgement.schemas.d.ts +81 -6
  324. package/dist/esm/assurance/assurance-evidence-judgement.schemas.d.ts.map +1 -1
  325. package/dist/esm/assurance/assurance-evidence-judgement.schemas.js +68 -7
  326. package/dist/esm/assurance/assurance-evidence-judgement.schemas.js.map +1 -1
  327. package/dist/esm/assurance/assurance-evidence-requirement-bodies.definitions.d.ts.map +1 -1
  328. package/dist/esm/assurance/assurance-evidence-requirement-bodies.definitions.js +1631 -70
  329. package/dist/esm/assurance/assurance-evidence-requirement-bodies.definitions.js.map +1 -1
  330. package/dist/esm/assurance/assurance-host-implementation-artifacts.d.ts +77 -0
  331. package/dist/esm/assurance/assurance-host-implementation-artifacts.d.ts.map +1 -0
  332. package/dist/esm/assurance/assurance-host-implementation-artifacts.js +51 -0
  333. package/dist/esm/assurance/assurance-host-implementation-artifacts.js.map +1 -0
  334. package/dist/esm/assurance/assurance-objective-catalog.definitions.d.ts +3 -2
  335. package/dist/esm/assurance/assurance-objective-catalog.definitions.d.ts.map +1 -1
  336. package/dist/esm/assurance/assurance-objective-catalog.definitions.js +327 -3
  337. package/dist/esm/assurance/assurance-objective-catalog.definitions.js.map +1 -1
  338. package/dist/esm/assurance/assurance-open-compliance-answer-cell.d.ts +12 -0
  339. package/dist/esm/assurance/assurance-open-compliance-answer-cell.d.ts.map +1 -0
  340. package/dist/esm/assurance/assurance-open-compliance-answer-cell.js +19 -0
  341. package/dist/esm/assurance/assurance-open-compliance-answer-cell.js.map +1 -0
  342. package/dist/esm/assurance/assurance-open-compliance-coverage-pack.d.ts +403 -0
  343. package/dist/esm/assurance/assurance-open-compliance-coverage-pack.d.ts.map +1 -0
  344. package/dist/esm/assurance/assurance-open-compliance-coverage-pack.js +825 -0
  345. package/dist/esm/assurance/assurance-open-compliance-coverage-pack.js.map +1 -0
  346. package/dist/esm/assurance/assurance-program-generation.schemas.d.ts +83 -8
  347. package/dist/esm/assurance/assurance-program-generation.schemas.d.ts.map +1 -1
  348. package/dist/esm/assurance/assurance-program-generation.schemas.js +167 -20
  349. package/dist/esm/assurance/assurance-program-generation.schemas.js.map +1 -1
  350. package/dist/esm/assurance/assurance-program.schemas.d.ts +234 -35
  351. package/dist/esm/assurance/assurance-program.schemas.d.ts.map +1 -1
  352. package/dist/esm/assurance/assurance-program.schemas.js +255 -14
  353. package/dist/esm/assurance/assurance-program.schemas.js.map +1 -1
  354. package/dist/esm/assurance/assurance-source-registry.definitions.d.ts +2 -1
  355. package/dist/esm/assurance/assurance-source-registry.definitions.d.ts.map +1 -1
  356. package/dist/esm/assurance/assurance-source-registry.definitions.js +259 -18
  357. package/dist/esm/assurance/assurance-source-registry.definitions.js.map +1 -1
  358. package/dist/esm/assurance/assurance-source-requirement-inventory.definitions.d.ts +17 -0
  359. package/dist/esm/assurance/assurance-source-requirement-inventory.definitions.d.ts.map +1 -0
  360. package/dist/esm/assurance/assurance-source-requirement-inventory.definitions.js +216 -0
  361. package/dist/esm/assurance/assurance-source-requirement-inventory.definitions.js.map +1 -0
  362. package/dist/esm/assurance/assurance-sources.schemas.d.ts +110 -0
  363. package/dist/esm/assurance/assurance-sources.schemas.d.ts.map +1 -1
  364. package/dist/esm/assurance/assurance-sources.schemas.js +111 -1
  365. package/dist/esm/assurance/assurance-sources.schemas.js.map +1 -1
  366. package/dist/esm/assurance/assurance-verification-requirement-bodies.definitions.d.ts.map +1 -1
  367. package/dist/esm/assurance/assurance-verification-requirement-bodies.definitions.js +356 -5
  368. package/dist/esm/assurance/assurance-verification-requirement-bodies.definitions.js.map +1 -1
  369. package/dist/esm/assurance/governed-document-audience.derivations.d.ts +83 -0
  370. package/dist/esm/assurance/governed-document-audience.derivations.d.ts.map +1 -0
  371. package/dist/esm/assurance/governed-document-audience.derivations.js +97 -0
  372. package/dist/esm/assurance/governed-document-audience.derivations.js.map +1 -0
  373. package/dist/esm/assurance/governed-document-release.d.ts +15 -1
  374. package/dist/esm/assurance/governed-document-release.d.ts.map +1 -1
  375. package/dist/esm/assurance/governed-document-release.js +3 -1
  376. package/dist/esm/assurance/governed-document-release.js.map +1 -1
  377. package/dist/esm/assurance.exports.d.ts +4 -0
  378. package/dist/esm/assurance.exports.d.ts.map +1 -1
  379. package/dist/esm/assurance.exports.js +4 -0
  380. package/dist/esm/assurance.exports.js.map +1 -1
  381. package/dist/esm/companion-exports.d.ts +9 -1
  382. package/dist/esm/companion-exports.d.ts.map +1 -1
  383. package/dist/esm/companion-exports.js.map +1 -1
  384. package/dist/esm/engine/applications/resources/application-api-keys.resource.specification.d.ts +1 -1
  385. package/dist/esm/engine/applications/resources/application-api-keys.resource.specification.d.ts.map +1 -1
  386. package/dist/esm/engine/applications/resources/application-api-keys.resource.specification.js +33 -5
  387. package/dist/esm/engine/applications/resources/application-api-keys.resource.specification.js.map +1 -1
  388. package/dist/esm/engine/applications/resources/application-metadata.resource.specification.d.ts.map +1 -1
  389. package/dist/esm/engine/applications/resources/application-metadata.resource.specification.js +9 -12
  390. package/dist/esm/engine/applications/resources/application-metadata.resource.specification.js.map +1 -1
  391. package/dist/esm/engine/applications/resources/application-oauth-clients.resource.specification.d.ts +1 -1
  392. package/dist/esm/engine/applications/resources/application-oauth-clients.resource.specification.d.ts.map +1 -1
  393. package/dist/esm/engine/applications/resources/application-oauth-clients.resource.specification.js +60 -6
  394. package/dist/esm/engine/applications/resources/application-oauth-clients.resource.specification.js.map +1 -1
  395. package/dist/esm/engine/applications/resources/application-versions.resource.specification.js +4 -4
  396. package/dist/esm/engine/applications/resources/application-versions.resource.specification.js.map +1 -1
  397. package/dist/esm/engine/applications/resources/applications.resource.specification.d.ts +1 -0
  398. package/dist/esm/engine/applications/resources/applications.resource.specification.d.ts.map +1 -1
  399. package/dist/esm/engine/applications/resources/applications.resource.specification.js +2 -2
  400. package/dist/esm/engine/applications/resources/applications.resource.specification.js.map +1 -1
  401. package/dist/esm/engine/auth/resources/application-access-grants.resource.specification.d.ts +12 -4
  402. package/dist/esm/engine/auth/resources/application-access-grants.resource.specification.d.ts.map +1 -1
  403. package/dist/esm/engine/auth/resources/application-access-grants.resource.specification.js +46 -10
  404. package/dist/esm/engine/auth/resources/application-access-grants.resource.specification.js.map +1 -1
  405. package/dist/esm/engine/auth/resources/oauth-consent-grants.resource.specification.d.ts +3 -2
  406. package/dist/esm/engine/auth/resources/oauth-consent-grants.resource.specification.d.ts.map +1 -1
  407. package/dist/esm/engine/auth/resources/oauth-consent-grants.resource.specification.js +15 -4
  408. package/dist/esm/engine/auth/resources/oauth-consent-grants.resource.specification.js.map +1 -1
  409. package/dist/esm/engine/auth/resources/organization-api-keys.resource.specification.d.ts +1 -1
  410. package/dist/esm/engine/auth/resources/organization-api-keys.resource.specification.d.ts.map +1 -1
  411. package/dist/esm/engine/auth/resources/organization-api-keys.resource.specification.js +40 -11
  412. package/dist/esm/engine/auth/resources/organization-api-keys.resource.specification.js.map +1 -1
  413. package/dist/esm/engine/auth/resources/organization-oauth-clients.resource.specification.d.ts +1 -1
  414. package/dist/esm/engine/auth/resources/organization-oauth-clients.resource.specification.d.ts.map +1 -1
  415. package/dist/esm/engine/auth/resources/organization-oauth-clients.resource.specification.js +44 -3
  416. package/dist/esm/engine/auth/resources/organization-oauth-clients.resource.specification.js.map +1 -1
  417. package/dist/esm/engine/auth/resources/organization-provider-credentials.resource.specification.d.ts +7 -3
  418. package/dist/esm/engine/auth/resources/organization-provider-credentials.resource.specification.d.ts.map +1 -1
  419. package/dist/esm/engine/auth/resources/organization-provider-credentials.resource.specification.js +40 -8
  420. package/dist/esm/engine/auth/resources/organization-provider-credentials.resource.specification.js.map +1 -1
  421. package/dist/esm/engine/auth/resources/platform-access-grants.resource.specification.d.ts +14 -8
  422. package/dist/esm/engine/auth/resources/platform-access-grants.resource.specification.d.ts.map +1 -1
  423. package/dist/esm/engine/auth/resources/platform-access-grants.resource.specification.js +72 -19
  424. package/dist/esm/engine/auth/resources/platform-access-grants.resource.specification.js.map +1 -1
  425. package/dist/esm/engine/auth/resources/scim-provisioning-config.resource.specification.d.ts +2 -2
  426. package/dist/esm/engine/auth/resources/scim-provisioning-config.resource.specification.d.ts.map +1 -1
  427. package/dist/esm/engine/auth/resources/scim-provisioning-config.resource.specification.js +6 -6
  428. package/dist/esm/engine/auth/resources/scim-provisioning-config.resource.specification.js.map +1 -1
  429. package/dist/esm/engine/auth/resources/scim-tokens.resource.specification.d.ts +1 -0
  430. package/dist/esm/engine/auth/resources/scim-tokens.resource.specification.d.ts.map +1 -1
  431. package/dist/esm/engine/auth/resources/scim-tokens.resource.specification.js +14 -13
  432. package/dist/esm/engine/auth/resources/scim-tokens.resource.specification.js.map +1 -1
  433. package/dist/esm/engine/auth/resources/siem-delivery-dlq.resource.specification.d.ts.map +1 -1
  434. package/dist/esm/engine/auth/resources/siem-delivery-dlq.resource.specification.js +2 -2
  435. package/dist/esm/engine/auth/resources/siem-delivery-dlq.resource.specification.js.map +1 -1
  436. package/dist/esm/engine/auth/resources/siem-delivery-outbox.resource.specification.d.ts.map +1 -1
  437. package/dist/esm/engine/auth/resources/siem-delivery-outbox.resource.specification.js.map +1 -1
  438. package/dist/esm/engine/auth/resources/sso-config.resource.specification.d.ts.map +1 -1
  439. package/dist/esm/engine/auth/resources/sso-config.resource.specification.js +68 -12
  440. package/dist/esm/engine/auth/resources/sso-config.resource.specification.js.map +1 -1
  441. package/dist/esm/engine/auth/resources/sso-connections.resource.specification.d.ts.map +1 -1
  442. package/dist/esm/engine/auth/resources/sso-connections.resource.specification.js +75 -19
  443. package/dist/esm/engine/auth/resources/sso-connections.resource.specification.js.map +1 -1
  444. package/dist/esm/engine/auth/resources/user-provider-credentials.resource.specification.d.ts +3 -1
  445. package/dist/esm/engine/auth/resources/user-provider-credentials.resource.specification.d.ts.map +1 -1
  446. package/dist/esm/engine/auth/resources/user-provider-credentials.resource.specification.js +11 -7
  447. package/dist/esm/engine/auth/resources/user-provider-credentials.resource.specification.js.map +1 -1
  448. package/dist/esm/engine/billing/resources/billing-accounts.resource.specification.d.ts +2 -0
  449. package/dist/esm/engine/billing/resources/billing-accounts.resource.specification.d.ts.map +1 -1
  450. package/dist/esm/engine/billing/resources/billing-accounts.resource.specification.js +2 -1
  451. package/dist/esm/engine/billing/resources/billing-accounts.resource.specification.js.map +1 -1
  452. package/dist/esm/engine/billing/resources/invoice-refs.resource.specification.d.ts +4 -2
  453. package/dist/esm/engine/billing/resources/invoice-refs.resource.specification.d.ts.map +1 -1
  454. package/dist/esm/engine/billing/resources/invoice-refs.resource.specification.js +8 -7
  455. package/dist/esm/engine/billing/resources/invoice-refs.resource.specification.js.map +1 -1
  456. package/dist/esm/engine/billing/resources/prices.resource.specification.js +1 -1
  457. package/dist/esm/engine/billing/resources/prices.resource.specification.js.map +1 -1
  458. package/dist/esm/engine/billing/resources/products.resource.specification.js +1 -1
  459. package/dist/esm/engine/billing/resources/products.resource.specification.js.map +1 -1
  460. package/dist/esm/engine/billing/resources/promotions.resource.specification.js +1 -1
  461. package/dist/esm/engine/billing/resources/promotions.resource.specification.js.map +1 -1
  462. package/dist/esm/engine/billing/resources/referrals.resource.specification.js +6 -6
  463. package/dist/esm/engine/billing/resources/referrals.resource.specification.js.map +1 -1
  464. package/dist/esm/engine/billing/resources/subscriptions.resource.specification.d.ts +2 -2
  465. package/dist/esm/engine/billing/resources/subscriptions.resource.specification.js +1 -1
  466. package/dist/esm/engine/billing/resources/subscriptions.resource.specification.js.map +1 -1
  467. package/dist/esm/engine/billing/resources/usage-records.resource.specification.d.ts +4 -0
  468. package/dist/esm/engine/billing/resources/usage-records.resource.specification.d.ts.map +1 -1
  469. package/dist/esm/engine/billing/resources/usage-records.resource.specification.js +4 -1
  470. package/dist/esm/engine/billing/resources/usage-records.resource.specification.js.map +1 -1
  471. package/dist/esm/engine/compliance/resources/application-audit-logs.resource.specification.d.ts +9 -5
  472. package/dist/esm/engine/compliance/resources/application-audit-logs.resource.specification.d.ts.map +1 -1
  473. package/dist/esm/engine/compliance/resources/application-audit-logs.resource.specification.js +16 -8
  474. package/dist/esm/engine/compliance/resources/application-audit-logs.resource.specification.js.map +1 -1
  475. package/dist/esm/engine/compliance/resources/approval-seals.resource.specification.d.ts +73 -0
  476. package/dist/esm/engine/compliance/resources/approval-seals.resource.specification.d.ts.map +1 -0
  477. package/dist/esm/engine/compliance/resources/approval-seals.resource.specification.js +192 -0
  478. package/dist/esm/engine/compliance/resources/approval-seals.resource.specification.js.map +1 -0
  479. package/dist/esm/engine/compliance/resources/audit-logs.resource.specification.d.ts +5 -3
  480. package/dist/esm/engine/compliance/resources/audit-logs.resource.specification.d.ts.map +1 -1
  481. package/dist/esm/engine/compliance/resources/audit-logs.resource.specification.js +19 -13
  482. package/dist/esm/engine/compliance/resources/audit-logs.resource.specification.js.map +1 -1
  483. package/dist/esm/engine/compliance/resources/legal-holds.resource.specification.d.ts +11 -6
  484. package/dist/esm/engine/compliance/resources/legal-holds.resource.specification.d.ts.map +1 -1
  485. package/dist/esm/engine/compliance/resources/legal-holds.resource.specification.js +14 -3
  486. package/dist/esm/engine/compliance/resources/legal-holds.resource.specification.js.map +1 -1
  487. package/dist/esm/engine/compliance/resources/published-verification-keys.resource.specification.d.ts +37 -0
  488. package/dist/esm/engine/compliance/resources/published-verification-keys.resource.specification.d.ts.map +1 -0
  489. package/dist/esm/engine/compliance/resources/published-verification-keys.resource.specification.js +161 -0
  490. package/dist/esm/engine/compliance/resources/published-verification-keys.resource.specification.js.map +1 -0
  491. package/dist/esm/engine/compliance/resources/retention-enforcement-records.resource.specification.js +1 -1
  492. package/dist/esm/engine/compliance/resources/retention-enforcement-records.resource.specification.js.map +1 -1
  493. package/dist/esm/engine/engine-resource-specifications.registry.d.ts.map +1 -1
  494. package/dist/esm/engine/engine-resource-specifications.registry.js +55 -11
  495. package/dist/esm/engine/engine-resource-specifications.registry.js.map +1 -1
  496. package/dist/esm/engine/errors/error-messages.specification.d.ts.map +1 -1
  497. package/dist/esm/engine/errors/error-messages.specification.js +300 -5
  498. package/dist/esm/engine/errors/error-messages.specification.js.map +1 -1
  499. package/dist/esm/engine/features/core-limits.feature.specifications.d.ts +10 -4
  500. package/dist/esm/engine/features/core-limits.feature.specifications.d.ts.map +1 -1
  501. package/dist/esm/engine/features/core-limits.feature.specifications.js +100 -5
  502. package/dist/esm/engine/features/core-limits.feature.specifications.js.map +1 -1
  503. package/dist/esm/engine/features/custom-branding.feature.specification.d.ts.map +1 -1
  504. package/dist/esm/engine/features/custom-branding.feature.specification.js +7 -3
  505. package/dist/esm/engine/features/custom-branding.feature.specification.js.map +1 -1
  506. package/dist/esm/engine/features/index.d.ts +4 -2
  507. package/dist/esm/engine/features/index.d.ts.map +1 -1
  508. package/dist/esm/engine/features/index.js +6 -4
  509. package/dist/esm/engine/features/index.js.map +1 -1
  510. package/dist/esm/engine/features/resources/application-features.resource.specification.js +2 -2
  511. package/dist/esm/engine/features/resources/application-features.resource.specification.js.map +1 -1
  512. package/dist/esm/engine/features/resources/organization-features.resource.specification.d.ts.map +1 -1
  513. package/dist/esm/engine/features/resources/organization-features.resource.specification.js +34 -15
  514. package/dist/esm/engine/features/resources/organization-features.resource.specification.js.map +1 -1
  515. package/dist/esm/engine/files/resources/files.resource.specification.d.ts +4 -1
  516. package/dist/esm/engine/files/resources/files.resource.specification.d.ts.map +1 -1
  517. package/dist/esm/engine/files/resources/files.resource.specification.js +24 -3
  518. package/dist/esm/engine/files/resources/files.resource.specification.js.map +1 -1
  519. package/dist/esm/engine/flows-actors/resources/a2a-push-delivery-log.resource.specification.d.ts.map +1 -1
  520. package/dist/esm/engine/flows-actors/resources/a2a-push-delivery-log.resource.specification.js +31 -3
  521. package/dist/esm/engine/flows-actors/resources/a2a-push-delivery-log.resource.specification.js.map +1 -1
  522. package/dist/esm/engine/flows-actors/resources/a2a-token-budget-state.resource.specification.js +6 -6
  523. package/dist/esm/engine/flows-actors/resources/a2a-token-budget-state.resource.specification.js.map +1 -1
  524. package/dist/esm/engine/flows-actors/resources/actor-system-executions.resource.specification.d.ts +30 -0
  525. package/dist/esm/engine/flows-actors/resources/actor-system-executions.resource.specification.d.ts.map +1 -0
  526. package/dist/esm/engine/flows-actors/resources/actor-system-executions.resource.specification.js +181 -0
  527. package/dist/esm/engine/flows-actors/resources/actor-system-executions.resource.specification.js.map +1 -0
  528. package/dist/esm/engine/flows-actors/resources/actor-tasks.resource.specification.d.ts +3 -0
  529. package/dist/esm/engine/flows-actors/resources/actor-tasks.resource.specification.d.ts.map +1 -0
  530. package/dist/esm/engine/flows-actors/resources/actor-tasks.resource.specification.js +110 -0
  531. package/dist/esm/engine/flows-actors/resources/actor-tasks.resource.specification.js.map +1 -0
  532. package/dist/esm/engine/flows-actors/resources/agent-behavior-reports.resource.specification.d.ts +3 -0
  533. package/dist/esm/engine/flows-actors/resources/agent-behavior-reports.resource.specification.d.ts.map +1 -0
  534. package/dist/esm/engine/flows-actors/resources/agent-behavior-reports.resource.specification.js +286 -0
  535. package/dist/esm/engine/flows-actors/resources/agent-behavior-reports.resource.specification.js.map +1 -0
  536. package/dist/esm/engine/flows-actors/resources/agent-operation-records.resource.specification.d.ts +3 -0
  537. package/dist/esm/engine/flows-actors/resources/agent-operation-records.resource.specification.d.ts.map +1 -0
  538. package/dist/esm/engine/flows-actors/resources/agent-operation-records.resource.specification.js +147 -0
  539. package/dist/esm/engine/flows-actors/resources/agent-operation-records.resource.specification.js.map +1 -0
  540. package/dist/esm/engine/flows-actors/resources/agent-work-decisions.resource.specification.d.ts.map +1 -1
  541. package/dist/esm/engine/flows-actors/resources/agent-work-decisions.resource.specification.js +71 -26
  542. package/dist/esm/engine/flows-actors/resources/agent-work-decisions.resource.specification.js.map +1 -1
  543. package/dist/esm/engine/flows-actors/resources/application-agent-policies.resource.specification.d.ts +3 -0
  544. package/dist/esm/engine/flows-actors/resources/application-agent-policies.resource.specification.d.ts.map +1 -0
  545. package/dist/esm/engine/flows-actors/resources/application-agent-policies.resource.specification.js +92 -0
  546. package/dist/esm/engine/flows-actors/resources/application-agent-policies.resource.specification.js.map +1 -0
  547. package/dist/esm/engine/flows-actors/resources/chat-conversations.resource.specification.d.ts +46 -0
  548. package/dist/esm/engine/flows-actors/resources/chat-conversations.resource.specification.d.ts.map +1 -0
  549. package/dist/esm/engine/flows-actors/resources/chat-conversations.resource.specification.js +196 -0
  550. package/dist/esm/engine/flows-actors/resources/chat-conversations.resource.specification.js.map +1 -0
  551. package/dist/esm/engine/flows-actors/resources/flow-actor-executions.resource.specification.d.ts +73 -31
  552. package/dist/esm/engine/flows-actors/resources/flow-actor-executions.resource.specification.d.ts.map +1 -1
  553. package/dist/esm/engine/flows-actors/resources/flow-actor-executions.resource.specification.js +118 -18
  554. package/dist/esm/engine/flows-actors/resources/flow-actor-executions.resource.specification.js.map +1 -1
  555. package/dist/esm/engine/flows-actors/resources/flow-actor-tasks.resource.specification.d.ts +3 -0
  556. package/dist/esm/engine/flows-actors/resources/flow-actor-tasks.resource.specification.d.ts.map +1 -1
  557. package/dist/esm/engine/flows-actors/resources/flow-actor-tasks.resource.specification.js +9 -4
  558. package/dist/esm/engine/flows-actors/resources/flow-actor-tasks.resource.specification.js.map +1 -1
  559. package/dist/esm/engine/flows-actors/resources/human-decision-notice-stays.resource.specification.d.ts +3 -0
  560. package/dist/esm/engine/flows-actors/resources/human-decision-notice-stays.resource.specification.d.ts.map +1 -0
  561. package/dist/esm/engine/flows-actors/resources/human-decision-notice-stays.resource.specification.js +184 -0
  562. package/dist/esm/engine/flows-actors/resources/human-decision-notice-stays.resource.specification.js.map +1 -0
  563. package/dist/esm/engine/flows-actors/resources/model-call-attributions.resource.specification.d.ts.map +1 -1
  564. package/dist/esm/engine/flows-actors/resources/model-call-attributions.resource.specification.js +17 -5
  565. package/dist/esm/engine/flows-actors/resources/model-call-attributions.resource.specification.js.map +1 -1
  566. package/dist/esm/engine/flows-actors/resources/model-cost-period-aggregates.resource.specification.d.ts.map +1 -1
  567. package/dist/esm/engine/flows-actors/resources/model-cost-period-aggregates.resource.specification.js +47 -7
  568. package/dist/esm/engine/flows-actors/resources/model-cost-period-aggregates.resource.specification.js.map +1 -1
  569. package/dist/esm/engine/flows-actors/resources/model-usage-ceiling-state.resource.specification.d.ts +3 -0
  570. package/dist/esm/engine/flows-actors/resources/model-usage-ceiling-state.resource.specification.d.ts.map +1 -0
  571. package/dist/esm/engine/flows-actors/resources/model-usage-ceiling-state.resource.specification.js +118 -0
  572. package/dist/esm/engine/flows-actors/resources/model-usage-ceiling-state.resource.specification.js.map +1 -0
  573. package/dist/esm/engine/flows-actors/resources/operation-approval-requests.resource.specification.d.ts +3 -0
  574. package/dist/esm/engine/flows-actors/resources/operation-approval-requests.resource.specification.d.ts.map +1 -0
  575. package/dist/esm/engine/flows-actors/resources/operation-approval-requests.resource.specification.js +230 -0
  576. package/dist/esm/engine/flows-actors/resources/operation-approval-requests.resource.specification.js.map +1 -0
  577. package/dist/esm/engine/flows-actors/resources/organization-agent-policies.resource.specification.d.ts +3 -0
  578. package/dist/esm/engine/flows-actors/resources/organization-agent-policies.resource.specification.d.ts.map +1 -0
  579. package/dist/esm/engine/flows-actors/resources/organization-agent-policies.resource.specification.js +151 -0
  580. package/dist/esm/engine/flows-actors/resources/organization-agent-policies.resource.specification.js.map +1 -0
  581. package/dist/esm/engine/flows-actors/resources/organization-chat-settings.resource.specification.d.ts +23 -0
  582. package/dist/esm/engine/flows-actors/resources/organization-chat-settings.resource.specification.d.ts.map +1 -0
  583. package/dist/esm/engine/flows-actors/resources/organization-chat-settings.resource.specification.js +124 -0
  584. package/dist/esm/engine/flows-actors/resources/organization-chat-settings.resource.specification.js.map +1 -0
  585. package/dist/esm/engine/flows-actors/resources/person-token-ceiling-state.resource.specification.d.ts +3 -0
  586. package/dist/esm/engine/flows-actors/resources/person-token-ceiling-state.resource.specification.d.ts.map +1 -0
  587. package/dist/esm/engine/flows-actors/resources/person-token-ceiling-state.resource.specification.js +114 -0
  588. package/dist/esm/engine/flows-actors/resources/person-token-ceiling-state.resource.specification.js.map +1 -0
  589. package/dist/esm/engine/flows-actors/resources/provider-call-records.resource.specification.d.ts.map +1 -1
  590. package/dist/esm/engine/flows-actors/resources/provider-call-records.resource.specification.js +45 -3
  591. package/dist/esm/engine/flows-actors/resources/provider-call-records.resource.specification.js.map +1 -1
  592. package/dist/esm/engine/frontend-components/actions/action-bar.frontend-component.specification.d.ts.map +1 -1
  593. package/dist/esm/engine/frontend-components/actions/action-bar.frontend-component.specification.js +6 -0
  594. package/dist/esm/engine/frontend-components/actions/action-bar.frontend-component.specification.js.map +1 -1
  595. package/dist/esm/engine/frontend-components/ai-elements/chat/ai-conversation-thread.frontend-component.specification.d.ts +4 -0
  596. package/dist/esm/engine/frontend-components/ai-elements/chat/ai-conversation-thread.frontend-component.specification.d.ts.map +1 -0
  597. package/dist/esm/engine/frontend-components/ai-elements/chat/ai-conversation-thread.frontend-component.specification.js +78 -0
  598. package/dist/esm/engine/frontend-components/ai-elements/chat/ai-conversation-thread.frontend-component.specification.js.map +1 -0
  599. package/dist/esm/engine/frontend-components/ai-elements/chat/ai-prompt-input.frontend-component.specification.d.ts.map +1 -1
  600. package/dist/esm/engine/frontend-components/ai-elements/chat/ai-prompt-input.frontend-component.specification.js +4 -4
  601. package/dist/esm/engine/frontend-components/ai-elements/chat/ai-prompt-input.frontend-component.specification.js.map +1 -1
  602. package/dist/esm/engine/frontend-components/ai-elements/decision/ai-approval-queue.frontend-component.specification.js +3 -3
  603. package/dist/esm/engine/frontend-components/ai-elements/decision/ai-approval-queue.frontend-component.specification.js.map +1 -1
  604. package/dist/esm/engine/frontend-components/ai-elements/graph/ai-canvas.frontend-component.specification.d.ts.map +1 -1
  605. package/dist/esm/engine/frontend-components/ai-elements/graph/ai-canvas.frontend-component.specification.js +4 -4
  606. package/dist/esm/engine/frontend-components/ai-elements/graph/ai-canvas.frontend-component.specification.js.map +1 -1
  607. package/dist/esm/engine/frontend-components/ai-elements/graph/ai-node.frontend-component.specification.d.ts.map +1 -1
  608. package/dist/esm/engine/frontend-components/ai-elements/graph/ai-node.frontend-component.specification.js +3 -3
  609. package/dist/esm/engine/frontend-components/ai-elements/graph/ai-node.frontend-component.specification.js.map +1 -1
  610. package/dist/esm/engine/frontend-components/app/app-layout-agent-work-evaluation-export-settings.frontend-component.specification.d.ts +5 -0
  611. package/dist/esm/engine/frontend-components/app/app-layout-agent-work-evaluation-export-settings.frontend-component.specification.d.ts.map +1 -0
  612. package/dist/esm/engine/frontend-components/app/app-layout-agent-work-evaluation-export-settings.frontend-component.specification.js +79 -0
  613. package/dist/esm/engine/frontend-components/app/app-layout-agent-work-evaluation-export-settings.frontend-component.specification.js.map +1 -0
  614. package/dist/esm/engine/frontend-components/app/app-layout-agent-work-override-rate-settings.frontend-component.specification.js +2 -2
  615. package/dist/esm/engine/frontend-components/app/app-layout-agent-work-override-rate-settings.frontend-component.specification.js.map +1 -1
  616. package/dist/esm/engine/frontend-components/app/app-layout-autonomous-agents-settings.frontend-component.specification.d.ts +5 -0
  617. package/dist/esm/engine/frontend-components/app/app-layout-autonomous-agents-settings.frontend-component.specification.d.ts.map +1 -0
  618. package/dist/esm/engine/frontend-components/app/app-layout-autonomous-agents-settings.frontend-component.specification.js +79 -0
  619. package/dist/esm/engine/frontend-components/app/app-layout-autonomous-agents-settings.frontend-component.specification.js.map +1 -0
  620. package/dist/esm/engine/frontend-components/app/app-layout-connected-accounts-settings.frontend-component.specification.d.ts.map +1 -1
  621. package/dist/esm/engine/frontend-components/app/app-layout-connected-accounts-settings.frontend-component.specification.js +3 -2
  622. package/dist/esm/engine/frontend-components/app/app-layout-connected-accounts-settings.frontend-component.specification.js.map +1 -1
  623. package/dist/esm/engine/frontend-components/app/app-layout-invitations-settings.frontend-component.specification.js +3 -3
  624. package/dist/esm/engine/frontend-components/app/app-layout-invitations-settings.frontend-component.specification.js.map +1 -1
  625. package/dist/esm/engine/frontend-components/app/app-layout-model-cost-breakdown-settings.frontend-component.specification.d.ts +5 -0
  626. package/dist/esm/engine/frontend-components/app/app-layout-model-cost-breakdown-settings.frontend-component.specification.d.ts.map +1 -0
  627. package/dist/esm/engine/frontend-components/app/app-layout-model-cost-breakdown-settings.frontend-component.specification.js +79 -0
  628. package/dist/esm/engine/frontend-components/app/app-layout-model-cost-breakdown-settings.frontend-component.specification.js.map +1 -0
  629. package/dist/esm/engine/frontend-components/app/app-layout-representative-activity-settings.frontend-component.specification.d.ts +5 -0
  630. package/dist/esm/engine/frontend-components/app/app-layout-representative-activity-settings.frontend-component.specification.d.ts.map +1 -0
  631. package/dist/esm/engine/frontend-components/app/app-layout-representative-activity-settings.frontend-component.specification.js +79 -0
  632. package/dist/esm/engine/frontend-components/app/app-layout-representative-activity-settings.frontend-component.specification.js.map +1 -0
  633. package/dist/esm/engine/frontend-components/app/app-layout-settings-hub.frontend-component.specification.js +3 -3
  634. package/dist/esm/engine/frontend-components/app/app-layout-settings-hub.frontend-component.specification.js.map +1 -1
  635. package/dist/esm/engine/frontend-components/app/public-layout-legal-notice.frontend-component.specification.d.ts +4 -0
  636. package/dist/esm/engine/frontend-components/app/public-layout-legal-notice.frontend-component.specification.d.ts.map +1 -0
  637. package/dist/esm/engine/frontend-components/app/public-layout-legal-notice.frontend-component.specification.js +22 -0
  638. package/dist/esm/engine/frontend-components/app/public-layout-legal-notice.frontend-component.specification.js.map +1 -0
  639. package/dist/esm/engine/frontend-components/app/public-layout-main-container.frontend-component.specification.d.ts.map +1 -1
  640. package/dist/esm/engine/frontend-components/app/public-layout-main-container.frontend-component.specification.js +2 -1
  641. package/dist/esm/engine/frontend-components/app/public-layout-main-container.frontend-component.specification.js.map +1 -1
  642. package/dist/esm/engine/frontend-components/auth/admin-config/app-page-security-settings.frontend-component.specification.d.ts.map +1 -1
  643. package/dist/esm/engine/frontend-components/auth/admin-config/app-page-security-settings.frontend-component.specification.js +3 -2
  644. package/dist/esm/engine/frontend-components/auth/admin-config/app-page-security-settings.frontend-component.specification.js.map +1 -1
  645. package/dist/esm/engine/frontend-components/auth/public-layout-chat-identity-link.frontend-component.specification.d.ts +4 -0
  646. package/dist/esm/engine/frontend-components/auth/public-layout-chat-identity-link.frontend-component.specification.d.ts.map +1 -0
  647. package/dist/esm/engine/frontend-components/auth/public-layout-chat-identity-link.frontend-component.specification.js +22 -0
  648. package/dist/esm/engine/frontend-components/auth/public-layout-chat-identity-link.frontend-component.specification.js.map +1 -0
  649. package/dist/esm/engine/frontend-components/auth/public-layout-user-auth.frontend-component.specification.js +2 -2
  650. package/dist/esm/engine/frontend-components/auth/public-layout-user-auth.frontend-component.specification.js.map +1 -1
  651. package/dist/esm/engine/frontend-components/auth/public-layout-user-invitation.frontend-component.specification.js +1 -1
  652. package/dist/esm/engine/frontend-components/auth/public-layout-user-invitation.frontend-component.specification.js.map +1 -1
  653. package/dist/esm/engine/frontend-components/billing/billing-pricing-table.frontend-component.specification.js +1 -1
  654. package/dist/esm/engine/frontend-components/billing/billing-pricing-table.frontend-component.specification.js.map +1 -1
  655. package/dist/esm/engine/frontend-components/data-display/badge.frontend-component.specification.d.ts.map +1 -1
  656. package/dist/esm/engine/frontend-components/data-display/badge.frontend-component.specification.js +7 -0
  657. package/dist/esm/engine/frontend-components/data-display/badge.frontend-component.specification.js.map +1 -1
  658. package/dist/esm/engine/frontend-components/feedback/features/feature-limit-indicator.frontend-component.specification.js +1 -1
  659. package/dist/esm/engine/frontend-components/feedback/features/feature-limit-indicator.frontend-component.specification.js.map +1 -1
  660. package/dist/esm/engine/frontend-components/flows-actors/low-level-ai-approval.frontend-component.specification.js +1 -1
  661. package/dist/esm/engine/frontend-components/flows-actors/low-level-ai-approval.frontend-component.specification.js.map +1 -1
  662. package/dist/esm/engine/frontend-components/flows-actors/low-level-ai-decision.frontend-component.specification.js +6 -6
  663. package/dist/esm/engine/frontend-components/flows-actors/low-level-ai-decision.frontend-component.specification.js.map +1 -1
  664. package/dist/esm/engine/frontend-components/flows-actors/low-level-ai-execution-usage.frontend-component.specification.d.ts +4 -0
  665. package/dist/esm/engine/frontend-components/flows-actors/low-level-ai-execution-usage.frontend-component.specification.d.ts.map +1 -0
  666. package/dist/esm/engine/frontend-components/flows-actors/low-level-ai-execution-usage.frontend-component.specification.js +24 -0
  667. package/dist/esm/engine/frontend-components/flows-actors/low-level-ai-execution-usage.frontend-component.specification.js.map +1 -0
  668. package/dist/esm/engine/frontend-components/flows-actors/low-level-ai-flow-node.frontend-component.specification.js +6 -6
  669. package/dist/esm/engine/frontend-components/flows-actors/low-level-ai-flow-node.frontend-component.specification.js.map +1 -1
  670. package/dist/esm/engine/frontend-components/flows-actors/low-level-ai-graph-viewer.frontend-component.specification.d.ts +4 -0
  671. package/dist/esm/engine/frontend-components/flows-actors/low-level-ai-graph-viewer.frontend-component.specification.d.ts.map +1 -0
  672. package/dist/esm/engine/frontend-components/flows-actors/low-level-ai-graph-viewer.frontend-component.specification.js +128 -0
  673. package/dist/esm/engine/frontend-components/flows-actors/low-level-ai-graph-viewer.frontend-component.specification.js.map +1 -0
  674. package/dist/esm/engine/frontend-components/flows-actors/low-level-ai-system-catalog.frontend-component.specification.js +1 -1
  675. package/dist/esm/engine/frontend-components/flows-actors/low-level-ai-system-catalog.frontend-component.specification.js.map +1 -1
  676. package/dist/esm/engine/frontend-components/form/controls/boolean/toggle.frontend-component.specification.js +1 -1
  677. package/dist/esm/engine/frontend-components/form/controls/boolean/toggle.frontend-component.specification.js.map +1 -1
  678. package/dist/esm/engine/frontend-components/form/controls/date-time/date-range-picker.frontend-component.specification.js +1 -1
  679. package/dist/esm/engine/frontend-components/form/controls/date-time/date-range-picker.frontend-component.specification.js.map +1 -1
  680. package/dist/esm/engine/frontend-components/form/controls/date-time/datepicker.frontend-component.specification.js +1 -1
  681. package/dist/esm/engine/frontend-components/form/controls/date-time/datepicker.frontend-component.specification.js.map +1 -1
  682. package/dist/esm/engine/frontend-components/form/controls/date-time/datetime-picker.frontend-component.specification.js +1 -1
  683. package/dist/esm/engine/frontend-components/form/controls/date-time/datetime-picker.frontend-component.specification.js.map +1 -1
  684. package/dist/esm/engine/frontend-components/form/controls/date-time/datetime-range-picker.frontend-component.specification.js +1 -1
  685. package/dist/esm/engine/frontend-components/form/controls/date-time/datetime-range-picker.frontend-component.specification.js.map +1 -1
  686. package/dist/esm/engine/frontend-components/form/controls/date-time/time-range-picker.frontend-component.specification.js +1 -1
  687. package/dist/esm/engine/frontend-components/form/controls/date-time/time-range-picker.frontend-component.specification.js.map +1 -1
  688. package/dist/esm/engine/frontend-components/form/controls/enum/toggle-group.frontend-component.specification.js +4 -4
  689. package/dist/esm/engine/frontend-components/form/controls/enum/toggle-group.frontend-component.specification.js.map +1 -1
  690. package/dist/esm/engine/frontend-components/form/controls/string/chips-input.frontend-component.specification.d.ts +5 -0
  691. package/dist/esm/engine/frontend-components/form/controls/string/chips-input.frontend-component.specification.d.ts.map +1 -0
  692. package/dist/esm/engine/frontend-components/form/controls/string/chips-input.frontend-component.specification.js +139 -0
  693. package/dist/esm/engine/frontend-components/form/controls/string/chips-input.frontend-component.specification.js.map +1 -0
  694. package/dist/esm/engine/frontend-components/form/fields/form-field-string.frontend-component.specification.js +1 -1
  695. package/dist/esm/engine/frontend-components/form/fields/form-field-string.frontend-component.specification.js.map +1 -1
  696. package/dist/esm/engine/frontend-components/high-level-views/high-level-views-flows-actors.frontend-component.specification.d.ts.map +1 -1
  697. package/dist/esm/engine/frontend-components/high-level-views/high-level-views-flows-actors.frontend-component.specification.js +5 -1
  698. package/dist/esm/engine/frontend-components/high-level-views/high-level-views-flows-actors.frontend-component.specification.js.map +1 -1
  699. package/dist/esm/engine/frontend-components/index.d.ts +7 -0
  700. package/dist/esm/engine/frontend-components/index.d.ts.map +1 -1
  701. package/dist/esm/engine/frontend-components/index.js +29 -0
  702. package/dist/esm/engine/frontend-components/index.js.map +1 -1
  703. package/dist/esm/engine/frontend-components/navigation/app-level/sidebar.frontend-component.specification.js +1 -1
  704. package/dist/esm/engine/frontend-components/navigation/app-level/sidebar.frontend-component.specification.js.map +1 -1
  705. package/dist/esm/engine/frontend-components/navigation/app-level/user-dropdown.frontend-component.specification.d.ts.map +1 -1
  706. package/dist/esm/engine/frontend-components/navigation/app-level/user-dropdown.frontend-component.specification.js +3 -1
  707. package/dist/esm/engine/frontend-components/navigation/app-level/user-dropdown.frontend-component.specification.js.map +1 -1
  708. package/dist/esm/engine/frontend-components/navigation/app-level/utility-panel.frontend-component.specification.js +4 -4
  709. package/dist/esm/engine/frontend-components/navigation/app-level/utility-panel.frontend-component.specification.js.map +1 -1
  710. package/dist/esm/engine/frontend-components/resources/resource-layout-header.frontend-component.specification.js +2 -2
  711. package/dist/esm/engine/frontend-components/resources/resource-layout-header.frontend-component.specification.js.map +1 -1
  712. package/dist/esm/engine/frontend-components/resources/resource-layout-list.frontend-component.specification.js +2 -2
  713. package/dist/esm/engine/frontend-components/resources/resource-layout-list.frontend-component.specification.js.map +1 -1
  714. package/dist/esm/engine/frontend-components/resources/resource-layout-record-sharing.frontend-component.specification.d.ts +4 -0
  715. package/dist/esm/engine/frontend-components/resources/resource-layout-record-sharing.frontend-component.specification.d.ts.map +1 -0
  716. package/dist/esm/engine/frontend-components/resources/resource-layout-record-sharing.frontend-component.specification.js +27 -0
  717. package/dist/esm/engine/frontend-components/resources/resource-layout-record-sharing.frontend-component.specification.js.map +1 -0
  718. package/dist/esm/engine/frontend-components/typography/text.frontend-component.specification.d.ts.map +1 -1
  719. package/dist/esm/engine/frontend-components/typography/text.frontend-component.specification.js +3 -1
  720. package/dist/esm/engine/frontend-components/typography/text.frontend-component.specification.js.map +1 -1
  721. package/dist/esm/engine/infrastructure/resources/application-data-keys.resource.specification.d.ts +24 -0
  722. package/dist/esm/engine/infrastructure/resources/application-data-keys.resource.specification.d.ts.map +1 -0
  723. package/dist/esm/engine/infrastructure/resources/application-data-keys.resource.specification.js +136 -0
  724. package/dist/esm/engine/infrastructure/resources/application-data-keys.resource.specification.js.map +1 -0
  725. package/dist/esm/engine/infrastructure/resources/data-seed-runs.resource.specification.d.ts.map +1 -1
  726. package/dist/esm/engine/infrastructure/resources/data-seed-runs.resource.specification.js +6 -1
  727. package/dist/esm/engine/infrastructure/resources/data-seed-runs.resource.specification.js.map +1 -1
  728. package/dist/esm/engine/infrastructure/resources/document-sequence-counters.resource.specification.d.ts +9 -0
  729. package/dist/esm/engine/infrastructure/resources/document-sequence-counters.resource.specification.d.ts.map +1 -0
  730. package/dist/esm/engine/infrastructure/resources/document-sequence-counters.resource.specification.js +110 -0
  731. package/dist/esm/engine/infrastructure/resources/document-sequence-counters.resource.specification.js.map +1 -0
  732. package/dist/esm/engine/infrastructure/resources/external-data-erasure-suppressions.resource.specification.d.ts.map +1 -1
  733. package/dist/esm/engine/infrastructure/resources/external-data-erasure-suppressions.resource.specification.js +10 -4
  734. package/dist/esm/engine/infrastructure/resources/external-data-erasure-suppressions.resource.specification.js.map +1 -1
  735. package/dist/esm/engine/infrastructure/resources/external-data-outbound-changes.resource.specification.d.ts.map +1 -1
  736. package/dist/esm/engine/infrastructure/resources/external-data-outbound-changes.resource.specification.js +20 -2
  737. package/dist/esm/engine/infrastructure/resources/external-data-outbound-changes.resource.specification.js.map +1 -1
  738. package/dist/esm/engine/infrastructure/resources/external-data-pipeline-membership-keys.resource.specification.js +6 -6
  739. package/dist/esm/engine/infrastructure/resources/external-data-pipeline-membership-keys.resource.specification.js.map +1 -1
  740. package/dist/esm/engine/infrastructure/resources/external-data-pipeline-membership.resource.specification.d.ts +1 -1
  741. package/dist/esm/engine/infrastructure/resources/external-data-pipeline-membership.resource.specification.js +5 -5
  742. package/dist/esm/engine/infrastructure/resources/external-data-pipeline-membership.resource.specification.js.map +1 -1
  743. package/dist/esm/engine/infrastructure/resources/external-data-pipeline-requested-keys.resource.specification.d.ts +10 -0
  744. package/dist/esm/engine/infrastructure/resources/external-data-pipeline-requested-keys.resource.specification.d.ts.map +1 -0
  745. package/dist/esm/engine/infrastructure/resources/external-data-pipeline-requested-keys.resource.specification.js +118 -0
  746. package/dist/esm/engine/infrastructure/resources/external-data-pipeline-requested-keys.resource.specification.js.map +1 -0
  747. package/dist/esm/engine/infrastructure/resources/external-data-pipeline-run-records.resource.specification.d.ts.map +1 -1
  748. package/dist/esm/engine/infrastructure/resources/external-data-pipeline-run-records.resource.specification.js +54 -8
  749. package/dist/esm/engine/infrastructure/resources/external-data-pipeline-run-records.resource.specification.js.map +1 -1
  750. package/dist/esm/engine/infrastructure/resources/external-data-pipeline-states.resource.specification.d.ts.map +1 -1
  751. package/dist/esm/engine/infrastructure/resources/external-data-pipeline-states.resource.specification.js +9 -0
  752. package/dist/esm/engine/infrastructure/resources/external-data-pipeline-states.resource.specification.js.map +1 -1
  753. package/dist/esm/engine/infrastructure/resources/external-data-remote-versions.resource.specification.d.ts.map +1 -1
  754. package/dist/esm/engine/infrastructure/resources/external-data-remote-versions.resource.specification.js +33 -5
  755. package/dist/esm/engine/infrastructure/resources/external-data-remote-versions.resource.specification.js.map +1 -1
  756. package/dist/esm/engine/infrastructure/resources/job-executions.resource.specification.d.ts +21 -4
  757. package/dist/esm/engine/infrastructure/resources/job-executions.resource.specification.d.ts.map +1 -1
  758. package/dist/esm/engine/infrastructure/resources/job-payload-storage.resource.specification.d.ts +3 -3
  759. package/dist/esm/engine/infrastructure/resources/job-payload-storage.resource.specification.js +1 -1
  760. package/dist/esm/engine/infrastructure/resources/job-payload-storage.resource.specification.js.map +1 -1
  761. package/dist/esm/engine/infrastructure/resources/post-commit-effect-outbox.resource.specification.d.ts +10 -0
  762. package/dist/esm/engine/infrastructure/resources/post-commit-effect-outbox.resource.specification.d.ts.map +1 -0
  763. package/dist/esm/engine/infrastructure/resources/post-commit-effect-outbox.resource.specification.js +159 -0
  764. package/dist/esm/engine/infrastructure/resources/post-commit-effect-outbox.resource.specification.js.map +1 -0
  765. package/dist/esm/engine/infrastructure/resources/system-of-record-partition-assignments.resource.specification.d.ts +5 -5
  766. package/dist/esm/engine/infrastructure/resources/system-of-record-partition-assignments.resource.specification.d.ts.map +1 -1
  767. package/dist/esm/engine/infrastructure/resources/system-of-record-partition-assignments.resource.specification.js +38 -10
  768. package/dist/esm/engine/infrastructure/resources/system-of-record-partition-assignments.resource.specification.js.map +1 -1
  769. package/dist/esm/engine/infrastructure/resources/transactional-commit-receipts.resource.specification.d.ts +9 -0
  770. package/dist/esm/engine/infrastructure/resources/transactional-commit-receipts.resource.specification.d.ts.map +1 -0
  771. package/dist/esm/engine/infrastructure/resources/transactional-commit-receipts.resource.specification.js +100 -0
  772. package/dist/esm/engine/infrastructure/resources/transactional-commit-receipts.resource.specification.js.map +1 -0
  773. package/dist/esm/engine/notifications/resources/chat-identity-links.resource.specification.d.ts +37 -0
  774. package/dist/esm/engine/notifications/resources/chat-identity-links.resource.specification.d.ts.map +1 -0
  775. package/dist/esm/engine/notifications/resources/chat-identity-links.resource.specification.js +181 -0
  776. package/dist/esm/engine/notifications/resources/chat-identity-links.resource.specification.js.map +1 -0
  777. package/dist/esm/engine/notifications/resources/conversation-threads.resource.specification.d.ts +3 -3
  778. package/dist/esm/engine/notifications/resources/conversation-threads.resource.specification.js +7 -7
  779. package/dist/esm/engine/notifications/resources/conversation-threads.resource.specification.js.map +1 -1
  780. package/dist/esm/engine/notifications/resources/inbound-deliveries.resource.specification.d.ts +31 -1
  781. package/dist/esm/engine/notifications/resources/inbound-deliveries.resource.specification.d.ts.map +1 -1
  782. package/dist/esm/engine/notifications/resources/inbound-deliveries.resource.specification.js +33 -7
  783. package/dist/esm/engine/notifications/resources/inbound-deliveries.resource.specification.js.map +1 -1
  784. package/dist/esm/engine/notifications/resources/inbound-email.resource.specification.d.ts +16 -14
  785. package/dist/esm/engine/notifications/resources/inbound-email.resource.specification.d.ts.map +1 -1
  786. package/dist/esm/engine/notifications/resources/inbound-email.resource.specification.js +56 -53
  787. package/dist/esm/engine/notifications/resources/inbound-email.resource.specification.js.map +1 -1
  788. package/dist/esm/engine/notifications/resources/m2m-webhook-delivery-log.resource.specification.d.ts +6 -2
  789. package/dist/esm/engine/notifications/resources/m2m-webhook-delivery-log.resource.specification.d.ts.map +1 -1
  790. package/dist/esm/engine/notifications/resources/m2m-webhook-delivery-log.resource.specification.js +22 -4
  791. package/dist/esm/engine/notifications/resources/m2m-webhook-delivery-log.resource.specification.js.map +1 -1
  792. package/dist/esm/engine/notifications/resources/notification-badges.resource.specification.d.ts +2 -2
  793. package/dist/esm/engine/notifications/resources/webhook-config.resource.specification.d.ts +2 -0
  794. package/dist/esm/engine/notifications/resources/webhook-config.resource.specification.d.ts.map +1 -1
  795. package/dist/esm/engine/notifications/resources/webhook-config.resource.specification.js +3 -3
  796. package/dist/esm/engine/notifications/resources/webhook-config.resource.specification.js.map +1 -1
  797. package/dist/esm/engine/notifications/system-emails/human-decision.system-emails.specification.d.ts +1 -0
  798. package/dist/esm/engine/notifications/system-emails/human-decision.system-emails.specification.d.ts.map +1 -1
  799. package/dist/esm/engine/notifications/system-emails/human-decision.system-emails.specification.js +43 -2
  800. package/dist/esm/engine/notifications/system-emails/human-decision.system-emails.specification.js.map +1 -1
  801. package/dist/esm/engine/notifications/system-emails/index.d.ts +0 -1
  802. package/dist/esm/engine/notifications/system-emails/index.d.ts.map +1 -1
  803. package/dist/esm/engine/notifications/system-emails/index.js +1 -3
  804. package/dist/esm/engine/notifications/system-emails/index.js.map +1 -1
  805. package/dist/esm/engine/notifications/system-emails/organization.system-emails.specification.d.ts +1 -1
  806. package/dist/esm/engine/notifications/system-emails/organization.system-emails.specification.d.ts.map +1 -1
  807. package/dist/esm/engine/notifications/system-emails/organization.system-emails.specification.js +25 -15
  808. package/dist/esm/engine/notifications/system-emails/organization.system-emails.specification.js.map +1 -1
  809. package/dist/esm/engine/notifications/system-emails/security.system-emails.specification.js +13 -13
  810. package/dist/esm/engine/notifications/system-emails/security.system-emails.specification.js.map +1 -1
  811. package/dist/esm/engine/organizations/resources/index.d.ts +1 -2
  812. package/dist/esm/engine/organizations/resources/index.d.ts.map +1 -1
  813. package/dist/esm/engine/organizations/resources/index.js +1 -2
  814. package/dist/esm/engine/organizations/resources/index.js.map +1 -1
  815. package/dist/esm/engine/organizations/resources/organization-members.resource.specification.d.ts +5 -4
  816. package/dist/esm/engine/organizations/resources/organization-members.resource.specification.d.ts.map +1 -1
  817. package/dist/esm/engine/organizations/resources/organization-members.resource.specification.js +114 -51
  818. package/dist/esm/engine/organizations/resources/organization-members.resource.specification.js.map +1 -1
  819. package/dist/esm/engine/organizations/resources/organization-profiles.resource.specification.d.ts +11 -10
  820. package/dist/esm/engine/organizations/resources/organization-profiles.resource.specification.d.ts.map +1 -1
  821. package/dist/esm/engine/organizations/resources/organization-profiles.resource.specification.js +10 -7
  822. package/dist/esm/engine/organizations/resources/organization-profiles.resource.specification.js.map +1 -1
  823. package/dist/esm/engine/organizations/resources/{service-provider-relationships.resource.specification.d.ts → organization-relationships.resource.specification.d.ts} +73 -56
  824. package/dist/esm/engine/organizations/resources/organization-relationships.resource.specification.d.ts.map +1 -0
  825. package/dist/esm/engine/organizations/resources/organization-relationships.resource.specification.js +643 -0
  826. package/dist/esm/engine/organizations/resources/organization-relationships.resource.specification.js.map +1 -0
  827. package/dist/esm/engine/organizations/resources/organization-unit-members.resource.specification.d.ts +1 -1
  828. package/dist/esm/engine/organizations/resources/organization-unit-members.resource.specification.d.ts.map +1 -1
  829. package/dist/esm/engine/organizations/resources/organization-unit-members.resource.specification.js +6 -4
  830. package/dist/esm/engine/organizations/resources/organization-unit-members.resource.specification.js.map +1 -1
  831. package/dist/esm/engine/organizations/resources/organization-units.resource.specification.js +2 -2
  832. package/dist/esm/engine/organizations/resources/organization-units.resource.specification.js.map +1 -1
  833. package/dist/esm/engine/organizations/resources/organizations.resource.specification.d.ts +4 -4
  834. package/dist/esm/engine/organizations/resources/organizations.resource.specification.d.ts.map +1 -1
  835. package/dist/esm/engine/organizations/resources/organizations.resource.specification.js +93 -43
  836. package/dist/esm/engine/organizations/resources/organizations.resource.specification.js.map +1 -1
  837. package/dist/esm/engine/organizations/resources/professional-qualifications.resource.specification.d.ts +39 -0
  838. package/dist/esm/engine/organizations/resources/professional-qualifications.resource.specification.d.ts.map +1 -0
  839. package/dist/esm/engine/organizations/resources/professional-qualifications.resource.specification.js +140 -0
  840. package/dist/esm/engine/organizations/resources/professional-qualifications.resource.specification.js.map +1 -0
  841. package/dist/esm/engine/providers/github.provider.specification.d.ts.map +1 -1
  842. package/dist/esm/engine/providers/github.provider.specification.js +8 -5
  843. package/dist/esm/engine/providers/github.provider.specification.js.map +1 -1
  844. package/dist/esm/engine/providers/google-drive.provider.specification.d.ts +6 -0
  845. package/dist/esm/engine/providers/google-drive.provider.specification.d.ts.map +1 -0
  846. package/dist/esm/engine/providers/google-drive.provider.specification.js +39 -0
  847. package/dist/esm/engine/providers/google-drive.provider.specification.js.map +1 -0
  848. package/dist/esm/engine/providers/index.d.ts +2 -0
  849. package/dist/esm/engine/providers/index.d.ts.map +1 -1
  850. package/dist/esm/engine/providers/index.js +5 -1
  851. package/dist/esm/engine/providers/index.js.map +1 -1
  852. package/dist/esm/engine/providers/microsoft-onedrive.provider.specification.d.ts +6 -0
  853. package/dist/esm/engine/providers/microsoft-onedrive.provider.specification.d.ts.map +1 -0
  854. package/dist/esm/engine/providers/microsoft-onedrive.provider.specification.js +39 -0
  855. package/dist/esm/engine/providers/microsoft-onedrive.provider.specification.js.map +1 -0
  856. package/dist/esm/engine/providers/mistral.provider.specification.js +2 -2
  857. package/dist/esm/engine/providers/mistral.provider.specification.js.map +1 -1
  858. package/dist/esm/engine/providers/resend.provider.specification.d.ts.map +1 -1
  859. package/dist/esm/engine/providers/resend.provider.specification.js +8 -6
  860. package/dist/esm/engine/providers/resend.provider.specification.js.map +1 -1
  861. package/dist/esm/engine/roles/app-audit-evidence-reader.role.specification.js +1 -1
  862. package/dist/esm/engine/roles/app-audit-evidence-reader.role.specification.js.map +1 -1
  863. package/dist/esm/engine/roles/index.d.ts +2 -2
  864. package/dist/esm/engine/roles/index.d.ts.map +1 -1
  865. package/dist/esm/engine/roles/index.js +5 -5
  866. package/dist/esm/engine/roles/index.js.map +1 -1
  867. package/dist/esm/engine/roles/org-delegated-capabilities.role.specification.d.ts +1 -1
  868. package/dist/esm/engine/roles/org-delegated-capabilities.role.specification.d.ts.map +1 -1
  869. package/dist/esm/engine/roles/org-delegated-capabilities.role.specification.js +24 -24
  870. package/dist/esm/engine/roles/org-delegated-capabilities.role.specification.js.map +1 -1
  871. package/dist/esm/engine/roles/org-representative.role.specification.d.ts +2 -0
  872. package/dist/esm/engine/roles/org-representative.role.specification.d.ts.map +1 -0
  873. package/dist/esm/engine/roles/org-representative.role.specification.js +22 -0
  874. package/dist/esm/engine/roles/org-representative.role.specification.js.map +1 -0
  875. package/dist/esm/engine/users/resources/anonymous-users.resource.specification.d.ts +1 -0
  876. package/dist/esm/engine/users/resources/anonymous-users.resource.specification.d.ts.map +1 -1
  877. package/dist/esm/engine/users/resources/anonymous-users.resource.specification.js +7 -5
  878. package/dist/esm/engine/users/resources/anonymous-users.resource.specification.js.map +1 -1
  879. package/dist/esm/engine/users/resources/inbound-contacts.resource.specification.d.ts +3 -3
  880. package/dist/esm/engine/users/resources/inbound-contacts.resource.specification.js +3 -3
  881. package/dist/esm/engine/users/resources/inbound-contacts.resource.specification.js.map +1 -1
  882. package/dist/esm/engine/users/resources/user-credentials.resource.specification.js +3 -3
  883. package/dist/esm/engine/users/resources/user-credentials.resource.specification.js.map +1 -1
  884. package/dist/esm/engine/users/resources/user-identity-links.resource.specification.d.ts +1 -1
  885. package/dist/esm/engine/users/resources/user-identity-links.resource.specification.d.ts.map +1 -1
  886. package/dist/esm/engine/users/resources/user-identity-links.resource.specification.js +13 -1
  887. package/dist/esm/engine/users/resources/user-identity-links.resource.specification.js.map +1 -1
  888. package/dist/esm/engine/users/resources/user-preferences-api-reference.examples.d.ts +1 -0
  889. package/dist/esm/engine/users/resources/user-preferences-api-reference.examples.d.ts.map +1 -1
  890. package/dist/esm/engine/users/resources/user-preferences-api-reference.examples.js +2 -0
  891. package/dist/esm/engine/users/resources/user-preferences-api-reference.examples.js.map +1 -1
  892. package/dist/esm/engine/users/resources/user-preferences.resource.specification.d.ts +4 -0
  893. package/dist/esm/engine/users/resources/user-preferences.resource.specification.d.ts.map +1 -1
  894. package/dist/esm/engine/users/resources/user-preferences.resource.specification.js +3 -3
  895. package/dist/esm/engine/users/resources/user-preferences.resource.specification.js.map +1 -1
  896. package/dist/esm/engine/users/resources/user-profiles.resource.specification.js +1 -1
  897. package/dist/esm/engine/users/resources/user-profiles.resource.specification.js.map +1 -1
  898. package/dist/esm/engine/users/resources/user-self-preferences.resource.specification.d.ts +4 -0
  899. package/dist/esm/engine/users/resources/user-self-preferences.resource.specification.d.ts.map +1 -1
  900. package/dist/esm/engine/users/resources/user-self-preferences.resource.specification.js +6 -2
  901. package/dist/esm/engine/users/resources/user-self-preferences.resource.specification.js.map +1 -1
  902. package/dist/esm/engine/users/resources/user-self.resource.specification.d.ts +1 -0
  903. package/dist/esm/engine/users/resources/user-self.resource.specification.d.ts.map +1 -1
  904. package/dist/esm/engine/users/resources/user-self.resource.specification.js +33 -0
  905. package/dist/esm/engine/users/resources/user-self.resource.specification.js.map +1 -1
  906. package/dist/esm/engine/users/resources/users.resource.specification.d.ts +2 -1
  907. package/dist/esm/engine/users/resources/users.resource.specification.d.ts.map +1 -1
  908. package/dist/esm/engine/users/resources/users.resource.specification.js +10 -4
  909. package/dist/esm/engine/users/resources/users.resource.specification.js.map +1 -1
  910. package/dist/esm/technical-documentation/engine-documentation-specification-catalog.companion.d.ts.map +1 -1
  911. package/dist/esm/technical-documentation/engine-documentation-specification-catalog.companion.js +17 -15
  912. package/dist/esm/technical-documentation/engine-documentation-specification-catalog.companion.js.map +1 -1
  913. package/package.json +8 -8
  914. package/dist/esm/engine/notifications/system-emails/subscription.system-emails.specification.d.ts +0 -6
  915. package/dist/esm/engine/notifications/system-emails/subscription.system-emails.specification.d.ts.map +0 -1
  916. package/dist/esm/engine/notifications/system-emails/subscription.system-emails.specification.js +0 -146
  917. package/dist/esm/engine/notifications/system-emails/subscription.system-emails.specification.js.map +0 -1
  918. package/dist/esm/engine/organizations/resources/service-provider-activity-feed.resource.specification.d.ts +0 -38
  919. package/dist/esm/engine/organizations/resources/service-provider-activity-feed.resource.specification.d.ts.map +0 -1
  920. package/dist/esm/engine/organizations/resources/service-provider-activity-feed.resource.specification.js +0 -152
  921. package/dist/esm/engine/organizations/resources/service-provider-activity-feed.resource.specification.js.map +0 -1
  922. package/dist/esm/engine/organizations/resources/service-provider-relationships.resource.specification.d.ts.map +0 -1
  923. package/dist/esm/engine/organizations/resources/service-provider-relationships.resource.specification.js +0 -417
  924. package/dist/esm/engine/organizations/resources/service-provider-relationships.resource.specification.js.map +0 -1
  925. package/dist/esm/engine/roles/org-service-provider.role.specification.d.ts +0 -2
  926. package/dist/esm/engine/roles/org-service-provider.role.specification.d.ts.map +0 -1
  927. package/dist/esm/engine/roles/org-service-provider.role.specification.js +0 -22
  928. package/dist/esm/engine/roles/org-service-provider.role.specification.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"user-credentials.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/users/resources/user-credentials.resource.specification.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,qBAAqB,IAAI,EAAE,EAC3B,kBAAkB,EAClB,oBAAoB,EACpB,qBAAqB,EACrB,0DAA0D,GAC3D,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAC5F,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAE3E,MAAM,CAAC,MAAM,oCAAoC,GAAG,qBAAqB,CACvE,0DAA0D,EAC1D,qBAAqB,EACrB,CAAC,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC,CAAC;IACpB,OAAO,EAAE,8HAA8H;IACvI,YAAY,EAAE,8HAA8H;IAC5I,aAAa,EAAE,wIAAwI;IACvJ,QAAQ,EAAE,aAAa,CAAC,QAAQ;IAChC,SAAS,EAAE,uBAAuB,CAAC,KAAK;IACxC,YAAY,EAAE;QACZ,UAAU,EAAE;YACV,WAAW,EAAE,uBAAuB;YACpC,UAAU,EAAE,uBAAuB;YACnC,UAAU,EAAE,cAAc,CAAC,MAAM;YACjC,eAAe,EAAE,mBAAmB,CAAC,UAAU;SAChD;QACD,eAAe,EAAE;YACf,WAAW,EAAE,uBAAuB;YACpC,UAAU,EAAE,4DAA4D;YACxE,UAAU,EAAE,cAAc,CAAC,OAAO;YAClC,eAAe,EAAE,mBAAmB,CAAC,QAAQ;SAC9C;QACD,YAAY,EAAE;YACZ,eAAe,EAAE;gBACf,WAAW,EAAE,uBAAuB;gBACpC,UAAU,EAAE,kBAAkB;gBAC9B,UAAU,EAAE,cAAc,CAA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AAC,cAAc,EAAE,OAAO,EAAE,0HAA0H,EAAE;aACrL;YACD,cAAc,EAAE;gBACd,EAAE,IAAI,EAAE,sBAAsB,CAAC,gBAAgB,EAAE,IAAI,EAAE,2FAA2F,EAAE;gBACpJ,EAAE,IAAI,EAAE,sBAAsB,CAAC,aAAa,EAAE,IAAI,EAAE,sFAAsF,EAAE;gBAC5I,EAAE,IAAI,EAAE,sBAAsB,CAAC,aAAa,EAAE,IAAI,EAAE,qFAAqF,EAAE;aAC5I;YACD,UAAU,EAAE,IAAI;SACjB;KACF;IAED,mBAAmB,EAAE;QACnB,sMAAsM;QACtM,6LAA6L;KAC9L;CACF,CAAC,EACF,EAAE,oBAAoB,EAAE,oBAAoB,CAAC,SAAS,EAAE,CACzD,CAAC","sourcesContent":["/**\n * Resource: `userCredentials` — Wildo SaaS engine specification (backend-only).\n *\n * Inputs:\n * - Schema: engine/saas-models/src/users/user-credentials.shared.schemas.ts → `UserCredentialsSchema`\n * - Factory: engine/saas-models/src/users/user-credentials.shared.resources-config.schemas.ts\n * → `userCredentialsResourceConfiguration_InitializationFactory`\n * - Custom operations: none (core CRUD only; all variants `INTERNAL_CALL` system resource)\n * - UI presets: none\n */\n\nimport { LabelAudience } from '@wildo-ai/presets-components-models';\nimport {\n CodeDeclarationKind,\n CodeSymbolKind,\n FieldSemanticImportance,\n} from '@wildo-ai/zod-decorators';\nimport {\n CoreResourceOperation as Op,\n MfaEnrollmentState,\n ResourcePrimaryScope,\n UserCredentialsSchema,\n userCredentialsResourceConfiguration_InitializationFactory,\n} from '@wildo-ai/saas-models';\nimport { HttpResponseStatusCode, resourceSpecification } from '~wildo-specifications/_core';\nimport { EngineResourceSubDomain } from '../../engine-resource-sub-domain';\n\nexport const userCredentialsResourceSpecification = resourceSpecification(\n userCredentialsResourceConfiguration_InitializationFactory,\n UserCredentialsSchema,\n ({ schemaShape }) => ({\n purpose: 'Store each user’s primary authentication material (password, MFA, and passkey credentials) as a system-owned secrets record.',\n businessRole: 'The authoritative per-user auth-secrets table backing login, re-auth, lockout, and MFA policy enforcement for that identity.',\n lifecycleRole: 'Rotates with every password or MFA change, new passkey registration, and progressive lockout counter updates as security events occur.',\n audience: LabelAudience.END_USER,\n subDomain: EngineResourceSubDomain.USERS,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'UserCredentialsSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactory: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'userCredentialsResourceConfiguration_InitializationFactory',\n symbolKind: CodeSymbolKind.FACTORY,\n declarationKind: CodeDeclarationKind.FUNCTION,\n },\n resourceType: {\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceType',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n memberName: 'USER_CREDENTIALS',\n },\n operationVocabulary: {\n coreEnum: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceOperation',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n notes: [\n 'System resource: operations are `INTERNAL_CALL` only — the HTTP surface is custom auth service routes, not generated CRUD controllers.',\n 'The runtime `userNotifications[]` fan-out is empty; do not add communications.* blocks — password-reset and security emails are owned by auth/notification services outside this resource.',\n ],\n },\n\n fields: {\n _id: schemaShape._id.stringSpec({\n meaning: 'Document identifier for this credentials record, aligned with the user identity it protects.',\n whyItMatters: 'It is the join key the auth stack uses when it needs to read or update secrets for a given user in one fetch.',\n semanticRole: 'identifier',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n userId: schemaShape.userId.foreignKeySpec({\n meaning: 'Foreign key to the `users` record whose credentials are stored in this document.',\n whyItMatters: 'Drives a strict 1:1 (per deployment convention) between an identity and its stored secrets, preventing orphan secret blobs.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n passwordHash: schemaShape.passwordHash.stringSpec({\n meaning: 'Password verifier material (e.g. Argon2 output) for traditional password sign-in — never sent to the client. NULLISH: absent for password-less accounts whose first factor is a passkey, magic link, or enterprise SSO, or explicitly null once a directory-managed reconciliation physically destroys the local first factor.',\n whyItMatters: 'It is the root first-factor for PASSWORD users and must never leave backend-controlled storage or logs; its absence OR null both mark an account with no usable local password, so consumers must treat it as falsy-when-cleared (never assume presence).',\n semanticRole: 'code',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n secretBase32: schemaShape.secretBase32.stringSpec({\n meaning: 'Base32 TOTP shared secret, when MFA via authenticator is enabled. NULLISH: absent when TOTP was never set up, or explicitly null after the TOTP-disable clear destroys it.',\n whyItMatters: 'Powers one-time code validation in second-factor policies; must remain backend-only. A disable writes null here, so consumers must treat absent and null identically (no TOTP secret).',\n }),\n\n totpVerified: schemaShape.totpVerified.booleanSpec({\n meaning: 'True once the user has completed an authenticator enrollment ceremony and proved possession of a valid TOTP code.',\n whyItMatters: 'Gates which authentication paths are allowed before marking MFA as fully active.',\n }),\n\n backupCodesHashed: schemaShape.backupCodesHashed.arraySpec({\n meaning: 'One-way hashes of one-time recovery codes, consumed by the server when a user depletes them.',\n whyItMatters: 'Gives a break-glass path when a device is lost, without ever storing the raw recovery codes in plaintext.',\n elementMeaning: 'SHA-256 hash of a single consumed or active backup code value.',\n elementType: {\n notes: [\n 'Elements are string hashes, not a closed enum; strength is the responsibility of the issuing routine.',\n ],\n },\n }),\n\n totpVerifiedAt: schemaShape.totpVerifiedAt.dateSpec({\n meaning: 'Timestamp of the first successful TOTP setup confirmation. NULLISH: absent before verification, a date once verified, or explicitly null after the TOTP-disable clear.',\n whyItMatters: 'Useful in audits and in telling whether MFA was already proven before later policy changes; a disable writes null, so readers treat absent and null as \"not currently verified\".',\n temporalRole: 'occurred',\n }),\n\n passwordChangedAt: schemaShape.passwordChangedAt.dateSpec({\n meaning: 'When the user last changed their password.',\n whyItMatters: 'The auth stack can invalidate long-lived sessions issued before this time (refresh-token family invalidation).',\n temporalRole: 'occurred',\n }),\n\n passkeyCredentials: schemaShape.passkeyCredentials.arraySpec({\n meaning: 'Registered WebAuthn / passkey credentials (FIDO2) for passwordless or phishing-resistant auth.',\n whyItMatters: 'The platform can bind multiple device-bound keys per user while still enforcing duplicate detection on `credentialId`.',\n elementMeaning: 'One passkey registration bundle (credentialId, publicKey, device metadata) as produced by the WebAuthn verification layer.',\n elementType: {\n notes: [\n 'Element schema is the nested `PasskeyCredentialEntrySchema` in `user-credentials.shared.schemas.ts` — a nested object, not a flat enum, so this arraySpec carries element prose without an enum map.',\n ],\n },\n }),\n\n firstMfaPromptAt: schemaShape.firstMfaPromptAt.dateSpec({\n meaning: 'First wall-clock moment MFA was required but not yet satisfied under the grace window.',\n whyItMatters: 'Feeds progressive enrollment policies that give users a limited time to add a second factor.',\n temporalRole: 'occurred',\n }),\n\n mfaEnrollmentState: schemaShape.mfaEnrollmentState.enumSpec({\n meaning: 'Coarse policy state of MFA enrollment (none, required-grace, fully enrolled, etc.).',\n whyItMatters: 'The login gate and admin dashboards read this to decide which ceremonies to force next.',\n importance: FieldSemanticImportance.PRIMARY,\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'MfaEnrollmentState',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n values: {\n [MfaEnrollmentState.NOT_REQUIRED]: { meaning: 'Policy does not currently force MFA for this user.' },\n [MfaEnrollmentState.PENDING]: { meaning: 'MFA is expected but the user has not started enrollment yet.' },\n [MfaEnrollmentState.GRACE]: { meaning: 'MFA is required; the user is still inside the grace period before hard enforcement.' },\n [MfaEnrollmentState.ENROLLED]: { meaning: 'MFA is active and verified per policy (TOTP, passkey, or equivalent).' },\n },\n }),\n\n consecutiveLockouts: schemaShape.consecutiveLockouts.numberSpec({\n meaning: 'How many times this account has recently tripped a lockout (used for progressive lockout back-off).',\n whyItMatters: 'Allows infrastructure to grow delay severity without permanently banning mistaken-password attempts in one shot.',\n unit: 'count',\n }),\n\n phoneNumber: schemaShape.phoneNumber.stringSpec({\n meaning: 'E.164 phone number used for SMS OTP, when the deployment enables phone second factors.',\n whyItMatters: 'Binds a distinct possession factor channel separate from TOTP and passkeys when SMS is in scope.',\n semanticRole: 'identifier',\n }),\n\n phoneNumberVerified: schemaShape.phoneNumberVerified.booleanSpec({\n meaning: 'Whether a one-time code flow has confirmed the phone number is reachable by the user.',\n whyItMatters: 'Stops unverified phone numbers from being treated as a trusted second channel.',\n }),\n\n phoneVerifiedAt: schemaShape.phoneVerifiedAt.dateSpec({\n meaning: 'Timestamp of the most recent successful phone verification round-trip.',\n whyItMatters: 'Gives the audit trail a concrete proof point for when SMS was trusted for this number.',\n temporalRole: 'occurred',\n }),\n\n createdAt: schemaShape.createdAt.dateSpec({\n meaning: 'When the credentials document was first created (typically alongside user provisioning).',\n temporalRole: 'creation',\n }),\n\n updatedAt: schemaShape.updatedAt.dateSpec({\n meaning: 'When any mutable secret, factor state, or counter last changed on this document.',\n temporalRole: 'modified',\n }),\n },\n\n operations: {\n [Op.READ]: {\n purpose: 'Load the current authentication secrets and factor state for one user from the system repository path.',\n outcome: 'Internal services obtain the up-to-date credential payload needed to verify passwords, TOTP, passkeys, or phone OTP.',\n whenToUse: 'Use only on trusted service routes — never for direct user-facing “view my password” flows; values except policy flags remain backend-only at rest.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The credentials document was found and its factor/secret-state payload is returned to the trusted internal caller (raw verifiers stay backend-only).' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.UNAUTHORIZED_401, when: 'The internal service credential on the request is missing, malformed, or expired; this `INTERNAL_CALL` surface fails closed before any secret is read.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is authenticated but lacks the system role permitted to read raw credential material (never exposed to member-facing sessions).' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No credentials document exists for the supplied user id (the identity has no provisioned secrets row).' },\n ],\n idempotent: true,\n rateLimitNote: 'Reads of secret-grade material are restricted to trusted service routes and may be throttled / audited to limit credential-harvesting blast radius.',\n },\n\n [Op.LIST]: {\n purpose: 'Enumerate user credential records for background maintenance or support tooling (bounded by the repository query).',\n outcome: 'Operators or infrastructure jobs can page through secrets rows under strict system roles.',\n whenToUse: 'Use for migrations, audits, or break-glass investigations — not for unfiltered bulk download.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) bounded page of credentials records is returned for the system maintenance/audit caller.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.UNAUTHORIZED_401, when: 'The internal service credential on the request is missing, malformed, or expired.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the strict system / break-glass role required to enumerate secrets rows; this is never an org-operator or member surface.' },\n ],\n idempotent: true,\n },\n\n [Op.CREATE]: {\n purpose: 'Insert the initial secrets row for a new user, typically during provisioning.',\n outcome: 'The platform can tie every subsequent login event to a stable secrets document for that identity.',\n whenToUse: 'Call when a user is first materialized in the `users` table and a credentials row is required for auth.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'A fresh credentials document is created for the user and linked 1:1 to the identity it protects.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The provisioning payload fails schema validation (e.g. missing `userId`, malformed initial factor state).' },\n { code: HttpResponseStatusCode.UNAUTHORIZED_401, when: 'The internal service credential on the provisioning request is missing, malformed, or expired.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the system/provisioning role permitted to mint a credentials row.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'The referenced `users` row does not exist, so there is no identity to anchor secrets to.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'A credentials document already exists for this user id; the per-user 1:1 convention forbids a second secrets blob.' },\n ],\n idempotent: false,\n },\n\n [Op.UPDATE]: {\n purpose: 'Mutate any authentication material or state counters (password, MFA, passkey list, lockout, phone) on the row.',\n outcome: 'The system-of-record for secrets stays in sync with what the user or admin last changed in policy-compliant flows.',\n whenToUse: 'Use for password change, MFA enable/disable, new passkey registration, lockout counter bumps, and phone refresh.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The requested secret/factor mutation (password rotation, MFA change, passkey add, lockout bump, phone refresh) was applied and the updated factor-state is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The mutation payload fails validation (e.g. weak password rejected by policy, malformed passkey bundle, invalid OTP secret).' },\n { code: HttpResponseStatusCode.UNAUTHORIZED_401, when: 'Re-authentication is required and the supplied auth is missing/expired — credential mutation always fails closed on stale auth.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the role to mutate this identity’s secrets (a non-self, non-system actor).' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No credentials document exists for the supplied user id.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The mutation collides with current factor state (e.g. registering a passkey whose `credentialId` already exists, or reusing a password the rotation policy forbids).' },\n ],\n idempotent: false,\n rateLimitNote: 'Password change, MFA enrollment, and passkey registration are credential-rotation paths: non-convergent, session-invalidating, and rate-limited to slow brute-force and credential-stuffing.',\n },\n\n [Op.DELETE]: {\n purpose: 'Remove the entire credentials document when a user is deleted or a compliance scrub demands removal.',\n outcome: 'No verifier material remains for that identity, closing the high-risk data-retention path.',\n whenToUse: 'Use with extreme caution; pair with a matching user/identity delete or legal erasure run.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.NO_CONTENT_204, meaning: 'The credentials document was permanently removed; no verifier material remains for the identity and no body is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.UNAUTHORIZED_401, when: 'The internal service credential on the erasure request is missing, malformed, or expired.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the system / compliance role required to delete a secrets document.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No credentials document exists for the supplied user id (or it was already erased).' },\n ],\n idempotent: true,\n },\n },\n\n businessConstraints: [\n 'This resource stores secret-grade material. Even though some fields (like display names) are not present here, every field is treated with production encryption-at-rest and strict logging hygiene.',\n 'Refresh-token invalidation and similar session hygiene keys off `passwordChangedAt` and other timestamps — do not back-date these fields in migrations without coordinating session stores.',\n ],\n }),\n { resourcePrimaryScope: ResourcePrimaryScope.USER_SELF },\n);\n"]}
1
+ {"version":3,"file":"user-credentials.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/users/resources/user-credentials.resource.specification.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,qBAAqB,IAAI,EAAE,EAC3B,kBAAkB,EAClB,oBAAoB,EACpB,qBAAqB,EACrB,0DAA0D,GAC3D,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAC5F,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAE3E,MAAM,CAAC,MAAM,oCAAoC,GAAG,qBAAqB,CACvE,0DAA0D,EAC1D,qBAAqB,EACrB,CAAC,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC,CAAC;IACpB,OAAO,EAAE,8HAA8H;IACvI,YAAY,EAAE,8HAA8H;IAC5I,aAAa,EAAE,wIAAwI;IACvJ,QAAQ,EAAE,aAAa,CAAC,QAAQ;IAChC,SAAS,EAAE,uBAAuB,CAAC,KAAK;IACxC,YAAY,EAAE;QACZ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I,EAAE,sBAAsB,CAAC,aAAa,EAAE,IAAI,EAAE,0DAA0D,EAAE;gBAChH,EAAE,IAAI,EAAE,sBAAsB,CAAC,YAAY,EAAE,IAAI,EAAE,sKAAsK,EAAE;aAC5N;YACD,UAAU,EAAE,KAAK;YACjB,aAAa,EAAE,8LAA8L;SAC9M;QAED,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE;YACX,OAAO,EAAE,sGAAsG;YAC/G,OAAO,EAAE,4FAA4F;YACrG,SAAS,EAAE,2FAA2F;YACtG,UAAU,EAAE,uBAAuB,CAAC,OAAO;YAC3C,gBAAgB,EAAE;gBAChB,EAAE,IAAI,EAAE,sBAAsB,CAAC,MAAM,EAAE,OAAO,EAAE,iIAAiI,EAAE;aACpL;YACD,cAAc,EAAE;gBACd,EAAE,IAAI,EAAE,sBAAsB,CAAC,gBAAgB,EAAE,IAAI,EAAE,2FAA2F,EAAE;gBACpJ,EAAE,IAAI,EAAE,sBAAsB,CAAC,aAAa,EAAE,IAAI,EAAE,sFAAsF,EAAE;gBAC5I,EAAE,IAAI,EAAE,sBAAsB,CAAC,aAAa,EAAE,IAAI,EAAE,qFAAqF,EAAE;aAC5I;YACD,UAAU,EAAE,IAAI;SACjB;KACF;IAED,mBAAmB,EAAE;QACnB,sMAAsM;QACtM,6LAA6L;KAC9L;CACF,CAAC,EACF,EAAE,oBAAoB,EAAE,oBAAoB,CAAC,SAAS,EAAE,CACzD,CAAC","sourcesContent":["/**\n * Resource: `userCredentials` — Wildo SaaS engine specification (backend-only).\n *\n * Inputs:\n * - Schema: engine/saas-models/src/users/user-credentials.shared.schemas.ts → `UserCredentialsSchema`\n * - Factory: engine/saas-models/src/users/user-credentials.shared.resources-config.schemas.ts\n * → `userCredentialsResourceConfiguration_InitializationFactory`\n * - Custom operations: none (core CRUD only; all variants `INTERNAL_CALL` system resource)\n * - UI presets: none\n */\n\nimport { LabelAudience } from '@wildo-ai/presets-components-models';\nimport {\n CodeDeclarationKind,\n CodeSymbolKind,\n FieldSemanticImportance,\n} from '@wildo-ai/zod-decorators';\nimport {\n CoreResourceOperation as Op,\n MfaEnrollmentState,\n ResourcePrimaryScope,\n UserCredentialsSchema,\n userCredentialsResourceConfiguration_InitializationFactory,\n} from '@wildo-ai/saas-models';\nimport { HttpResponseStatusCode, resourceSpecification } from '~wildo-specifications/_core';\nimport { EngineResourceSubDomain } from '../../engine-resource-sub-domain';\n\nexport const userCredentialsResourceSpecification = resourceSpecification(\n userCredentialsResourceConfiguration_InitializationFactory,\n UserCredentialsSchema,\n ({ schemaShape }) => ({\n purpose: 'Store each user’s primary authentication material (password, MFA, and passkey credentials) as a system-owned secrets record.',\n businessRole: 'The authoritative per-user auth-secrets table backing login, re-auth, lockout, and MFA policy enforcement for that identity.',\n lifecycleRole: 'Rotates with every password or MFA change, new passkey registration, and progressive lockout counter updates as security events occur.',\n audience: LabelAudience.END_USER,\n subDomain: EngineResourceSubDomain.USERS,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'UserCredentialsSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactory: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'userCredentialsResourceConfiguration_InitializationFactory',\n symbolKind: CodeSymbolKind.FACTORY,\n declarationKind: CodeDeclarationKind.FUNCTION,\n },\n resourceType: {\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceType',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n memberName: 'USER_CREDENTIALS',\n },\n operationVocabulary: {\n coreEnum: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceOperation',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n notes: [\n 'System resource: operations are `INTERNAL_CALL` only — the HTTP surface is custom auth service routes, not generated CRUD controllers.',\n 'The runtime `userNotifications[]` fan-out is empty; do not add communications.* blocks — password-reset and security emails are owned by auth/notification services outside this resource.',\n ],\n },\n\n fields: {\n _id: schemaShape._id.stringSpec({\n meaning: 'Document identifier for this credentials record, aligned with the user identity it protects.',\n whyItMatters: 'It is the join key the auth stack uses when it needs to read or update secrets for a given user in one fetch.',\n semanticRole: 'identifier',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n userId: schemaShape.userId.foreignKeySpec({\n meaning: 'Foreign key to the `users` record whose credentials are stored in this document.',\n whyItMatters: 'Drives a strict 1:1 (per deployment convention) between an identity and its stored secrets, preventing orphan secret blobs.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n passwordHash: schemaShape.passwordHash.stringSpec({\n meaning: 'Password verifier material (e.g. Argon2 output) for traditional password sign-in — never sent to the client. NULLISH: absent for password-less accounts whose first factor is a passkey, magic link, or enterprise SSO, or explicitly null once a directory-managed reconciliation physically destroys the local first factor.',\n whyItMatters: 'It is the root first-factor for PASSWORD users and must never leave backend-controlled storage or logs; its absence OR null both mark an account with no usable local password, so consumers must treat it as falsy-when-cleared (never assume presence).',\n semanticRole: 'code',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n secretBase32: schemaShape.secretBase32.stringSpec({\n meaning: 'The TOTP shared secret (the base32 seed), stored sealed for this user and this credentials row, when MFA via authenticator is enabled. NULLISH: absent when TOTP was never set up, or explicitly null after the TOTP-disable clear destroys it. Removed on subject erasure.',\n whyItMatters: 'Powers one-time code validation in second-factor policies. Whoever reads the seed can compute the user\\'s codes forever, so it is sealed at rest, must remain backend-only, and is opened only by verification. A disable writes null here, so consumers must treat absent and null identically (no TOTP secret).',\n }),\n\n totpVerified: schemaShape.totpVerified.booleanSpec({\n meaning: 'True once the user has completed an authenticator enrollment ceremony and proved possession of a valid TOTP code.',\n whyItMatters: 'Gates which authentication paths are allowed before marking MFA as fully active.',\n }),\n\n backupCodesHashed: schemaShape.backupCodesHashed.arraySpec({\n meaning: 'One-way hashes of one-time recovery codes, consumed by the server when a user depletes them.',\n whyItMatters: 'Gives a break-glass path when a device is lost, without ever storing the raw recovery codes in plaintext.',\n elementMeaning: 'SHA-256 hash of a single consumed or active backup code value.',\n elementType: {\n notes: [\n 'Elements are string hashes, not a closed enum; strength is the responsibility of the issuing routine.',\n ],\n },\n }),\n\n totpVerifiedAt: schemaShape.totpVerifiedAt.dateSpec({\n meaning: 'Timestamp of the first successful TOTP setup confirmation. NULLISH: absent before verification, a date once verified, or explicitly null after the TOTP-disable clear.',\n whyItMatters: 'Useful in audits and in telling whether MFA was already proven before later policy changes; a disable writes null, so readers treat absent and null as \"not currently verified\".',\n temporalRole: 'occurred',\n }),\n\n passwordChangedAt: schemaShape.passwordChangedAt.dateSpec({\n meaning: 'When the user last changed their password.',\n whyItMatters: 'The auth stack can invalidate long-lived sessions issued before this time (refresh-token family invalidation).',\n temporalRole: 'occurred',\n }),\n\n passkeyCredentials: schemaShape.passkeyCredentials.arraySpec({\n meaning: 'Registered WebAuthn / passkey credentials (FIDO2) for passwordless or phishing-resistant auth.',\n whyItMatters: 'The platform can bind multiple device-bound keys per user while still enforcing duplicate detection on `credentialId`.',\n elementMeaning: 'One passkey registration bundle (credentialId, publicKey, device metadata) as produced by the WebAuthn verification layer.',\n elementType: {\n notes: [\n 'Element schema is the nested `PasskeyCredentialEntrySchema` in `user-credentials.shared.schemas.ts` — a nested object, not a flat enum, so this arraySpec carries element prose without an enum map.',\n ],\n },\n }),\n\n firstMfaPromptAt: schemaShape.firstMfaPromptAt.dateSpec({\n meaning: 'First wall-clock moment MFA was required but not yet satisfied under the grace window.',\n whyItMatters: 'Feeds progressive enrollment policies that give users a limited time to add a second factor.',\n temporalRole: 'occurred',\n }),\n\n mfaEnrollmentState: schemaShape.mfaEnrollmentState.enumSpec({\n meaning: 'Coarse policy state of MFA enrollment (none, required-grace, fully enrolled, etc.).',\n whyItMatters: 'The login gate and admin dashboards read this to decide which ceremonies to force next.',\n importance: FieldSemanticImportance.PRIMARY,\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'MfaEnrollmentState',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n values: {\n [MfaEnrollmentState.NOT_REQUIRED]: { meaning: 'Policy does not currently force MFA for this user.' },\n [MfaEnrollmentState.PENDING]: { meaning: 'MFA is expected but the user has not started enrollment yet.' },\n [MfaEnrollmentState.GRACE]: { meaning: 'MFA is required; the user is still inside the grace period before hard enforcement.' },\n [MfaEnrollmentState.ENROLLED]: { meaning: 'MFA is active and verified per policy (TOTP, passkey, or equivalent).' },\n },\n }),\n\n consecutiveLockouts: schemaShape.consecutiveLockouts.numberSpec({\n meaning: 'How many times this account has recently tripped a lockout (used for progressive lockout back-off).',\n whyItMatters: 'Allows infrastructure to grow delay severity without permanently banning mistaken-password attempts in one shot.',\n unit: 'count',\n }),\n\n phoneNumber: schemaShape.phoneNumber.stringSpec({\n meaning: 'E.164 phone number used for SMS OTP, when the deployment enables phone second factors.',\n whyItMatters: 'Binds a distinct possession factor channel separate from TOTP and passkeys when SMS is in scope.',\n semanticRole: 'identifier',\n }),\n\n phoneNumberVerified: schemaShape.phoneNumberVerified.booleanSpec({\n meaning: 'Whether a one-time code flow has confirmed the phone number is reachable by the user.',\n whyItMatters: 'Stops unverified phone numbers from being treated as a trusted second channel.',\n }),\n\n phoneVerifiedAt: schemaShape.phoneVerifiedAt.dateSpec({\n meaning: 'Timestamp of the most recent successful phone verification round-trip.',\n whyItMatters: 'Gives the audit trail a concrete proof point for when SMS was trusted for this number.',\n temporalRole: 'occurred',\n }),\n\n createdAt: schemaShape.createdAt.dateSpec({\n meaning: 'When the credentials document was first created (typically alongside user provisioning).',\n temporalRole: 'creation',\n }),\n\n updatedAt: schemaShape.updatedAt.dateSpec({\n meaning: 'When any mutable secret, factor state, or counter last changed on this document.',\n temporalRole: 'modified',\n }),\n },\n\n operations: {\n [Op.READ]: {\n purpose: 'Load the current authentication secrets and factor state for one user from the system repository path.',\n outcome: 'Internal services obtain the up-to-date credential payload needed to verify passwords, TOTP, passkeys, or phone OTP.',\n whenToUse: 'Use only on trusted service routes — never for direct user-facing “view my password” flows; values except policy flags remain backend-only at rest.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The credentials document was found and its factor/secret-state payload is returned to the trusted internal caller (raw verifiers stay backend-only).' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.UNAUTHORIZED_401, when: 'The internal service credential on the request is missing, malformed, or expired; this `INTERNAL_CALL` surface fails closed before any secret is read.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is authenticated but lacks the system role permitted to read raw credential material (never exposed to member-facing sessions).' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No credentials document exists for the supplied user id (the identity has no provisioned secrets row).' },\n ],\n idempotent: true,\n rateLimitNote: 'Reads of secret-grade material are restricted to trusted service routes and may be throttled / audited to limit credential-harvesting blast radius.',\n },\n\n [Op.LIST]: {\n purpose: 'Enumerate user credential records for background maintenance or support tooling (bounded by the repository query).',\n outcome: 'Operators or infrastructure jobs can page through secrets rows under strict system roles.',\n whenToUse: 'Use for migrations, audits, or break-glass investigations — not for unfiltered bulk download.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) bounded page of credentials records is returned for the system maintenance/audit caller.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.UNAUTHORIZED_401, when: 'The internal service credential on the request is missing, malformed, or expired.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the strict system / break-glass role required to enumerate secrets rows; this is never an org-operator or member surface.' },\n ],\n idempotent: true,\n },\n\n [Op.CREATE]: {\n purpose: 'Insert the initial secrets row for a new user, typically during provisioning.',\n outcome: 'The platform can tie every subsequent login event to a stable secrets document for that identity.',\n whenToUse: 'Call when a user is first materialized in the `users` table and a credentials row is required for auth.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'A fresh credentials document is created for the user and linked 1:1 to the identity it protects.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The provisioning payload fails schema validation (e.g. missing `userId`, malformed initial factor state).' },\n { code: HttpResponseStatusCode.UNAUTHORIZED_401, when: 'The internal service credential on the provisioning request is missing, malformed, or expired.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the system/provisioning role permitted to mint a credentials row.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'The referenced `users` row does not exist, so there is no identity to anchor secrets to.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'A credentials document already exists for this user id; the per-user 1:1 convention forbids a second secrets blob.' },\n ],\n idempotent: false,\n },\n\n [Op.UPDATE]: {\n purpose: 'Mutate any authentication material or state counters (password, MFA, passkey list, lockout, phone) on the row.',\n outcome: 'The system-of-record for secrets stays in sync with what the user or admin last changed in policy-compliant flows.',\n whenToUse: 'Use for password change, MFA enable/disable, new passkey registration, lockout counter bumps, and phone refresh.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The requested secret/factor mutation (password rotation, MFA change, passkey add, lockout bump, phone refresh) was applied and the updated factor-state is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The mutation payload fails validation (e.g. weak password rejected by policy, malformed passkey bundle, invalid OTP secret).' },\n { code: HttpResponseStatusCode.UNAUTHORIZED_401, when: 'Re-authentication is required and the supplied auth is missing/expired — credential mutation always fails closed on stale auth.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the role to mutate this identity’s secrets (a non-self, non-system actor).' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No credentials document exists for the supplied user id.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The mutation collides with current factor state (e.g. registering a passkey whose `credentialId` already exists, or reusing a password the rotation policy forbids).' },\n ],\n idempotent: false,\n rateLimitNote: 'Password change, MFA enrollment, and passkey registration are credential-rotation paths: non-convergent, session-invalidating, and rate-limited to slow brute-force and credential-stuffing.',\n },\n\n [Op.DELETE]: {\n purpose: 'Remove the entire credentials document when a user is deleted or a compliance scrub demands removal.',\n outcome: 'No verifier material remains for that identity, closing the high-risk data-retention path.',\n whenToUse: 'Use with extreme caution; pair with a matching user/identity delete or legal erasure run.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The credentials document was permanently removed; no verifier material remains for the identity, and the body carries its `id`.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.UNAUTHORIZED_401, when: 'The internal service credential on the erasure request is missing, malformed, or expired.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the system / compliance role required to delete a secrets document.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No credentials document exists for the supplied user id (or it was already erased).' },\n ],\n idempotent: true,\n },\n },\n\n businessConstraints: [\n 'This resource stores secret-grade material. Even though some fields (like display names) are not present here, every field is treated with production encryption-at-rest and strict logging hygiene.',\n 'Refresh-token invalidation and similar session hygiene keys off `passwordChangedAt` and other timestamps — do not back-date these fields in migrations without coordinating session stores.',\n ],\n }),\n { resourcePrimaryScope: ResourcePrimaryScope.USER_SELF },\n);\n"]}
@@ -10,7 +10,7 @@
10
10
  * engine `resourceUIBehavior` preset is registered in presets-components for this type).
11
11
  */
12
12
  import { AuthScopeType, CoreResourceOperation as Op, ExternalIdentitySource, SsoConnectionType } from '@wildo-ai/saas-models';
13
- export declare const userIdentityLinksResourceSpecification: import("../../../_core").ResourceSpecificationConfig<undefined, Op.READ | Op.UPDATE | Op.UPDATE_MANY | Op.DELETE | Op.CREATE | Op.LIST, import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodObject<{
13
+ export declare const userIdentityLinksResourceSpecification: import("../../../_core").ResourceSpecificationConfig<undefined, Op.READ | Op.UPDATE | Op.UPDATE_MANY | Op.DELETE | Op.DELETE_MANY | Op.CREATE | Op.LIST, import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodObject<{
14
14
  _id: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodString>>;
15
15
  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("zod").ZodString>>>>;
16
16
  connectionType: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodEnum<typeof SsoConnectionType>>>;
@@ -1 +1 @@
1
- {"version":3,"file":"user-identity-links.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/users/resources/user-identity-links.resource.specification.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAQH,OAAO,EACL,aAAa,EACb,qBAAqB,IAAI,EAAE,EAC3B,sBAAsB,EAEtB,iBAAiB,EAGlB,MAAM,uBAAuB,CAAC;AAI/B,eAAO,MAAM,sCAAsC;;;;;;;;;;;;;;;;;;kCA4QlD,CAAC"}
1
+ {"version":3,"file":"user-identity-links.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/users/resources/user-identity-links.resource.specification.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAQH,OAAO,EACL,aAAa,EACb,qBAAqB,IAAI,EAAE,EAC3B,sBAAsB,EAEtB,iBAAiB,EAGlB,MAAM,uBAAuB,CAAC;AAI/B,eAAO,MAAM,sCAAsC;;;;;;;;;;;;;;;;;;kCAyRlD,CAAC"}
@@ -238,7 +238,7 @@ export const userIdentityLinksResourceSpecification = resourceSpecification(user
238
238
  whenToUse: 'Use when policy demands removing a specific IdP mapping without deleting the entire user account.',
239
239
  importance: FieldSemanticImportance.PRIMARY,
240
240
  responseStatuses: [
241
- { code: HttpResponseStatusCode.NO_CONTENT_204, meaning: 'The identity link was removed; that provider subject can no longer authenticate into the user until a fresh link is created. No body is returned.' },
241
+ { code: HttpResponseStatusCode.OK_200, meaning: 'The identity link was removed; that provider subject can no longer authenticate into the user until a fresh link is created. The body carries its `id`.' },
242
242
  ],
243
243
  errorScenarios: [
244
244
  { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is neither the owning user disconnecting their own provider nor an admin unlinking a compromised binding.' },
@@ -246,6 +246,18 @@ export const userIdentityLinksResourceSpecification = resourceSpecification(user
246
246
  ],
247
247
  idempotent: true,
248
248
  },
249
+ [Op.DELETE_MANY]: {
250
+ purpose: 'Remove every identity link to an SSO connection that is being deleted, in the deletion’s own transaction.',
251
+ outcome: 'No link survives the connection it pointed at: nobody keeps a binding to a provider the organization removed, and the next connection’s removal check does not count it as another way in.',
252
+ whenToUse: 'Use only from the SSO connection deletion, which filters by `connectionId`. It has no route; a person disconnecting one of their own providers uses `DELETE /auth/identity-links/:linkId`.',
253
+ responseStatuses: [
254
+ { code: HttpResponseStatusCode.OK_200, meaning: 'The matching identity links were removed; the body lists their ids, and is empty when the connection had none.' },
255
+ ],
256
+ errorScenarios: [
257
+ { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not the framework’s SSO connection deletion; the operation is internal and has no public route.' },
258
+ ],
259
+ idempotent: true,
260
+ },
249
261
  },
250
262
  businessConstraints: [
251
263
  'The unique constraint at the data layer is `(userId, providerRef, connectionType)`; schema-level prose defers to the engine migration index because link-uniqueness is a database truth source.',
@@ -1 +1 @@
1
- {"version":3,"file":"user-identity-links.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/users/resources/user-identity-links.resource.specification.ts"],"names":[],"mappings":"A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AAmG;YAC9G,UAAU,EAAE,uBAAuB,CAAC,OAAO;YAC3C,gBAAgB,EAAE;gBAChB,EAAE,IAAI,EAAE,sBAAsB,CAAC,cAAc,EAAE,OAAO,EAAE,mJAAmJ,EAAE;aAC9M;YACD,cAAc,EAAE;gBACd,EAAE,IAAI,EAAE,sBAAsB,CAAC,aAAa,EAAE,IAAI,EAAE,sHAAsH,EAAE;gBAC5K,EAAE,IAAI,EAAE,sBAAsB,CAAC,aAAa,EAAE,IAAI,EAAE,2GAA2G,EAAE;aAClK;YACD,UAAU,EAAE,IAAI;SACjB;KACF;IAED,mBAAmB,EAAE;QACnB,iMAAiM;QACjM,4PAA4P;KAC7P;CACF,CAAC,EACF,EAAE,oBAAoB,EAAE,oBAAoB,CAAC,SAAS,EAAE,CACzD,CAAC","sourcesContent":["/**\n * Resource: `userIdentityLinks` — Wildo SaaS engine specification (backend-only).\n *\n * Inputs:\n * - Schema: engine/saas-models/src/users/user-identity-links.shared.schemas.ts → `UserIdentityLinkSchema`\n * - Factory: engine/saas-models/src/users/user-identity-links.shared.resources-config.schemas.ts\n * → `userIdentityLinksResourceConfiguration_InitializationFactory`\n * - Custom operations: none\n * - UI presets: none (a dedicated read path exists for GET /auth/identity-links at the app layer, but no\n * engine `resourceUIBehavior` preset is registered in presets-components for this type).\n */\n\nimport { LabelAudience } from '@wildo-ai/presets-components-models';\nimport {\n CodeDeclarationKind,\n CodeSymbolKind,\n FieldSemanticImportance,\n} from '@wildo-ai/zod-decorators';\nimport {\n AuthScopeType,\n CoreResourceOperation as Op,\n ExternalIdentitySource,\n ResourcePrimaryScope,\n SsoConnectionType,\n UserIdentityLinkSchema,\n userIdentityLinksResourceConfiguration_InitializationFactory,\n} from '@wildo-ai/saas-models';\nimport { HttpResponseStatusCode, resourceSpecification } from '~wildo-specifications/_core';\nimport { EngineResourceSubDomain } from '../../engine-resource-sub-domain';\n\nexport const userIdentityLinksResourceSpecification = resourceSpecification(\n userIdentityLinksResourceConfiguration_InitializationFactory,\n UserIdentityLinkSchema,\n ({ schemaShape }) => ({\n purpose: 'Persist the OAuth/OIDC/SSO identity links that connect each managed user to their external provider identities (social or enterprise).',\n businessRole: 'The per-user system-of-record for which IdP subjects map to a Wildo `users` row during login, provisioning, and SCIM flows.',\n lifecycleRole: 'Rows are created on first link, updated when provider fields refresh, and timestamped for last use on every successful sign-in with that link. A row is removed with its user, with its SSO connection when that connection is deleted on its own, and, for an organization-scoped enterprise link, when its organization is purged; a link must never outlive the tenant it binds to, or the cross-organization SSO guard reads it as a live membership.',\n audience: LabelAudience.END_USER,\n subDomain: EngineResourceSubDomain.USERS,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'UserIdentityLinkSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactory: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'userIdentityLinksResourceConfiguration_InitializationFactory',\n symbolKind: CodeSymbolKind.FACTORY,\n declarationKind: CodeDeclarationKind.FUNCTION,\n },\n resourceType: {\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceType',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n memberName: 'USER_IDENTITY_LINKS',\n },\n operationVocabulary: {\n coreEnum: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceOperation',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n notes: [\n 'All operations are `INTERNAL_CALL` in the resource config — the supported external read surface is the auth controller, not a generic CRUD controller.',\n 'No `userNotifications` / `m2mNotifications` on this resource; do not add communications.* blocks (invitation/alert emails are owned by adjacent services).',\n ],\n },\n\n fields: {\n _id: schemaShape._id.stringSpec({\n meaning: 'Identifier for a single (user, provider, connection-type) link record stored in the identity-links collection.',\n whyItMatters: 'Deduplicates the identity-link upsert key used during JIT provisioning and IdP re-login.',\n semanticRole: 'identifier',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n userId: schemaShape.userId.foreignKeySpec({\n meaning: 'The Wildo user that owns this external identity link.',\n whyItMatters: 'Drives the fan-out to “which app user is logging in from which IdP account”.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n connectionType: schemaShape.connectionType.enumSpec({\n meaning: 'Whether this link is a lightweight social sign-in or a stricter enterprise connector.',\n whyItMatters: 'Changes validation rules, admin UX, and whether an explicit enterprise scope is permitted.',\n importance: FieldSemanticImportance.PRIMARY,\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'SsoConnectionType',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n values: {\n [SsoConnectionType.SOCIAL]: { meaning: 'Consumer or workspace-social IdP (no tenant-specific enterprise contract).' },\n [SsoConnectionType.ENTERPRISE]: { meaning: 'SAML/enterprise contract bound to exactly one organization or application scope.' },\n },\n }),\n\n providerRef: schemaShape.providerRef.stringSpec({\n meaning: 'Stable connector string for the provider family (e.g. google, microsoft, oidc, github).',\n whyItMatters: 'Picks the correct OIDC/SAML client configuration and certificate trust chain during login.',\n semanticRole: 'code',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n providerUserId: schemaShape.providerUserId.stringSpec({\n meaning: 'The end-user’s stable subject at the provider (IdP `sub` or directory object id, depending on IdP).',\n whyItMatters: 'The lookup anchor when reconciling a returning login with the same external account.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n scimExternalId: schemaShape.scimExternalId.stringSpec({\n meaning: 'The identity directory’s own identifier for this person, as the SCIM `externalId` it sends. Present only on a link a directory maintains; absent on social and interactive sign-in links.',\n whyItMatters: 'Deliberately SEPARATE from `providerUserId`, which is the authentication key a returning login is resolved by. RFC 7643 §3.1 makes `externalId` the client’s identifier for the service provider to store, while the provider’s own identifier is `id` — and directories derive it from mutable attributes (Microsoft Entra maps it from `mailNickname` by default), so storing it in the lookup anchor would re-key a live identity whenever an administrator renamed someone. It is a value to hand back to the directory, never one to resolve by.',\n semanticRole: 'identifier',\n }),\n\n providerEmail: schemaShape.providerEmail.stringSpec({\n meaning: 'Email the IdP attests for the user at link time, used for UI display and support correlation.',\n whyItMatters: 'Often the human-readable handle operators see; may diverge from the Wildo account email in edge cases.',\n semanticRole: 'identifier',\n }),\n\n providerDisplayName: schemaShape.providerDisplayName.stringSpec({\n meaning: 'Display name the IdP returned on last profile refresh, if any.',\n whyItMatters: 'Powers friendly UI in device/session lists and admin tooling when available.',\n }),\n\n providerAvatarUrl: schemaShape.providerAvatarUrl.stringSpec({\n meaning: 'Profile picture URL from the provider when the IdP includes one in claims.',\n whyItMatters: 'Improves UX without re-uploading a separate app avatar, when permitted by policy.',\n semanticRole: 'uri',\n }),\n\n providerRawProfile: schemaShape.providerRawProfile.objectSpec({\n meaning: 'Opaque provider claims map (`string` keys → `unknown` values) retained for support and debugging — not shown to the end user.',\n whyItMatters: 'Gives the auth team enough raw context to diagnose mapping bugs without a second data fetch; treated as operator-only and excluded from public APIs.',\n }),\n\n scopeType: schemaShape.scopeType.enumSpec({\n meaning: 'The exact tenant kind that owns an enterprise identity link; omitted for social links.',\n whyItMatters: 'Prevents application identifiers from being interpreted as organization identifiers by membership, grant, and audit logic.',\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'AuthScopeType',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n values: {\n [AuthScopeType.ORGANIZATION]: { meaning: 'The link belongs to an organization-scoped enterprise connection.' },\n [AuthScopeType.APPLICATION]: { meaning: 'The link belongs to an application-scoped enterprise connection.' },\n },\n }),\n\n organizationId: schemaShape.organizationId.stringSpec({\n meaning: 'The owning organization for an organization-scoped enterprise identity link.',\n whyItMatters:\n 'Binds the identity to the same organization that owns membership and organization-type grants, and ties the link\\'s life to that organization: purging it removes the link. Forbidden for social and application-scoped links.',\n semanticRole: 'identifier',\n }),\n\n applicationId: schemaShape.applicationId.stringSpec({\n meaning: 'The owning application for an application-scoped enterprise identity link.',\n whyItMatters:\n 'Preserves application tenancy without manufacturing an organization membership or overloading `organizationId`.',\n semanticRole: 'identifier',\n }),\n\n connectionId: schemaShape.connectionId.stringSpec({\n meaning: 'Enterprise connector record identifier inside the owning organization or application scope.',\n whyItMatters:\n 'Distinguishes multiple enterprise connectors in one scope and is required for enterprise links; social links omit it.',\n semanticRole: 'identifier',\n }),\n\n source: schemaShape.source.enumSpec({\n meaning: 'How this record was first established (OIDC, SAML, SCIM, …).',\n whyItMatters: 'Distinguishes interactive JIT links from service-driven SCIM or migration imports when auditing the graph.',\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'ExternalIdentitySource',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n values: {\n [ExternalIdentitySource.OAUTH2]: { meaning: 'Created through an OAuth 2.0 interactive flow that does not provide OpenID Connect identity semantics.' },\n [ExternalIdentitySource.OIDC]: { meaning: 'Created through an OpenID Connect interactive flow.' },\n [ExternalIdentitySource.SAML]: { meaning: 'Created through a SAML-based enterprise sign-in or assertion exchange.' },\n [ExternalIdentitySource.SCIM]: { meaning: 'Provisioned or reconciled from directory SCIM sync rather than a browser sign-in only.' },\n },\n }),\n\n linkedAt: schemaShape.linkedAt.dateSpec({\n meaning: 'When the provider first bound this `providerUserId` to the Wildo user (insert-time timestamp).',\n whyItMatters: 'Ordering field for “account linking history” views and compliance exports.',\n temporalRole: 'creation',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n lastUsedAt: schemaShape.lastUsedAt.dateSpec({\n meaning: 'The last successful sign-in (or link refresh) that used this exact identity link.',\n whyItMatters: 'Idle-link cleanup policies and support triage can rely on inactivity heuristics from this value.',\n temporalRole: 'occurred',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n },\n\n operations: {\n [Op.READ]: {\n purpose: 'Fetch one specific identity link row, typically through internal service calls when reconciling a provider subject.',\n outcome: 'The caller can inspect the stored provider email, type, and connector metadata to finish auth or audit.',\n whenToUse: 'Use when a backend flow already has the object id. The user-facing “list my links” door is `GET /auth/identity-links`, served by the authentication-method management controller, not a generic public READ. Self-service unlinking uses the separate authenticated DELETE /auth/identity-links/:linkId door, which owns removal policy, reauthentication and the transactional remaining-first-factor check; a generic resource route does not carry those safeguards.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The identity-link record was found and its provider metadata (email, type, connector ids) is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is neither the owning user nor a trusted auth/admin service permitted to read another user’s provider bindings.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No identity-link row exists for the supplied id.' },\n ],\n idempotent: true,\n },\n\n [Op.LIST]: {\n purpose: 'List identity links (usually filtered by `userId`) to render settings pages or to audit provider coverage.',\n outcome: 'Operators or services receive the full set of provider bindings for a user in one query plan.',\n whenToUse: 'Use when the auth controller or admin service enumerates a user’s connected accounts. A person reading back their OWN links reaches `GET /auth/identity-links`, and removes one through `DELETE /auth/identity-links/:linkId`; both are already routed, so this operation is the persistence beneath them rather than a screen an application still has to build.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) set of the target user’s provider bindings is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller tries to enumerate another user’s links without the auth-controller / admin role; a user may only list their own connected accounts.' },\n ],\n idempotent: true,\n },\n\n [Op.CREATE]: {\n purpose: 'Insert a new identity link when a first-time OIDC or SAML sign-in or SCIM import introduces a new provider subject.',\n outcome: 'The Wildo user record gains a new stable mapping row that future sign-ins can hit without a migration.',\n whenToUse: 'Use in JIT account linking — never from untrusted public callers without a verified IdP attestation first.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'A new identity-link record binds the provider subject to the Wildo user; future sign-ins resolve through it without re-provisioning.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The link payload fails schema validation (e.g. missing provider subject fields, an incompatible connection/source pair, or enterprise scope coordinates that do not match `scopeType`).' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is an untrusted/public actor with no verified IdP attestation; JIT linking is gated to the auth service.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'The referenced `users` row does not exist, so there is no identity to bind the provider subject to.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'This provider subject is already linked for the same connection type, provider, external subject, and exact enterprise scope/connection coordinates, so a second binding is rejected.' },\n ],\n idempotent: false,\n },\n\n [Op.UPDATE]: {\n purpose: 'Refresh profile metadata (email, name, raw claims) or move ownership fields after transposition/merge events.',\n outcome: 'The next login sees up-to-date provider data without re-creating a new link row id.',\n whenToUse: 'Use when a provider re-issues a subject change or when a manual data-fix adjusts enterprise connector ids.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The link’s provider metadata (or ownership fields after a merge) was refreshed and the updated record is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The refreshed fields fail schema validation.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the auth-service / admin role required to mutate this identity link.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No identity-link row exists for the supplied id.' },\n ],\n idempotent: true,\n },\n\n [Op.DELETE]: {\n purpose: 'Remove an identity link when a user explicitly disconnects a provider or an admin unlinks a compromised binding.',\n outcome: 'That provider can no longer authenticate into this Wildo user until a fresh link is created.',\n whenToUse: 'Use when policy demands removing a specific IdP mapping without deleting the entire user account.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.NO_CONTENT_204, meaning: 'The identity link was removed; that provider subject can no longer authenticate into the user until a fresh link is created. No body is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is neither the owning user disconnecting their own provider nor an admin unlinking a compromised binding.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No identity-link row exists for the supplied id (the provider was never linked, or was already unlinked).' },\n ],\n idempotent: true,\n },\n },\n\n businessConstraints: [\n 'The unique constraint at the data layer is `(userId, providerRef, connectionType)`; schema-level prose defers to the engine migration index because link-uniqueness is a database truth source.',\n 'Enterprise fields (`organizationId`, `connectionId`) are optional in the shared schema: social connections omit them while enterprise ones rely on them for tenant scoping — authors must not flatten those semantics in AI prompts into “always present”.',\n ],\n }),\n { resourcePrimaryScope: ResourcePrimaryScope.USER_SELF },\n);\n"]}
1
+ {"version":3,"file":"user-identity-links.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/users/resources/user-identity-links.resource.specification.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,aAAa,EACb,qBAAqB,IAAI,EAAE,EAC3B,sBAAsB,EACtB,oBAAoB,EACpB,iBAAiB,EACjB,sBAAsB,EACtB,4DAA4D,GAC7D,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAC5F,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAE3E,MAAM,CAAC,MAAM,sCAAsC,GAAG,qBAAqB,CACzE,4DAA4D,EAC5D,sBAAsB,EACtB,CAAC,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC,CAAC;IACpB,OAAO,EAAE,wIAA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AAE;aACnK;YACD,cAAc,EAAE;gBACd,EAAE,IAAI,EAAE,sBAAsB,CAAC,aAAa,EAAE,IAAI,EAAE,+GAA+G,EAAE;aACtK;YACD,UAAU,EAAE,IAAI;SACjB;KACF;IAED,mBAAmB,EAAE;QACnB,iMAAiM;QACjM,4PAA4P;KAC7P;CACF,CAAC,EACF,EAAE,oBAAoB,EAAE,oBAAoB,CAAC,SAAS,EAAE,CACzD,CAAC","sourcesContent":["/**\n * Resource: `userIdentityLinks` — Wildo SaaS engine specification (backend-only).\n *\n * Inputs:\n * - Schema: engine/saas-models/src/users/user-identity-links.shared.schemas.ts → `UserIdentityLinkSchema`\n * - Factory: engine/saas-models/src/users/user-identity-links.shared.resources-config.schemas.ts\n * → `userIdentityLinksResourceConfiguration_InitializationFactory`\n * - Custom operations: none\n * - UI presets: none (a dedicated read path exists for GET /auth/identity-links at the app layer, but no\n * engine `resourceUIBehavior` preset is registered in presets-components for this type).\n */\n\nimport { LabelAudience } from '@wildo-ai/presets-components-models';\nimport {\n CodeDeclarationKind,\n CodeSymbolKind,\n FieldSemanticImportance,\n} from '@wildo-ai/zod-decorators';\nimport {\n AuthScopeType,\n CoreResourceOperation as Op,\n ExternalIdentitySource,\n ResourcePrimaryScope,\n SsoConnectionType,\n UserIdentityLinkSchema,\n userIdentityLinksResourceConfiguration_InitializationFactory,\n} from '@wildo-ai/saas-models';\nimport { HttpResponseStatusCode, resourceSpecification } from '~wildo-specifications/_core';\nimport { EngineResourceSubDomain } from '../../engine-resource-sub-domain';\n\nexport const userIdentityLinksResourceSpecification = resourceSpecification(\n userIdentityLinksResourceConfiguration_InitializationFactory,\n UserIdentityLinkSchema,\n ({ schemaShape }) => ({\n purpose: 'Persist the OAuth/OIDC/SSO identity links that connect each managed user to their external provider identities (social or enterprise).',\n businessRole: 'The per-user system-of-record for which IdP subjects map to a Wildo `users` row during login, provisioning, and SCIM flows.',\n lifecycleRole: 'Rows are created on first link, updated when provider fields refresh, and timestamped for last use on every successful sign-in with that link. A row is removed with its user, with its SSO connection when that connection is deleted on its own, and, for an organization-scoped enterprise link, when its organization is purged; a link must never outlive the tenant it binds to, or the cross-organization SSO guard reads it as a live membership.',\n audience: LabelAudience.END_USER,\n subDomain: EngineResourceSubDomain.USERS,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'UserIdentityLinkSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactory: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'userIdentityLinksResourceConfiguration_InitializationFactory',\n symbolKind: CodeSymbolKind.FACTORY,\n declarationKind: CodeDeclarationKind.FUNCTION,\n },\n resourceType: {\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceType',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n memberName: 'USER_IDENTITY_LINKS',\n },\n operationVocabulary: {\n coreEnum: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceOperation',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n notes: [\n 'All operations are `INTERNAL_CALL` in the resource config — the supported external read surface is the auth controller, not a generic CRUD controller.',\n 'No `userNotifications` / `m2mNotifications` on this resource; do not add communications.* blocks (invitation/alert emails are owned by adjacent services).',\n ],\n },\n\n fields: {\n _id: schemaShape._id.stringSpec({\n meaning: 'Identifier for a single (user, provider, connection-type) link record stored in the identity-links collection.',\n whyItMatters: 'Deduplicates the identity-link upsert key used during JIT provisioning and IdP re-login.',\n semanticRole: 'identifier',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n userId: schemaShape.userId.foreignKeySpec({\n meaning: 'The Wildo user that owns this external identity link.',\n whyItMatters: 'Drives the fan-out to “which app user is logging in from which IdP account”.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n connectionType: schemaShape.connectionType.enumSpec({\n meaning: 'Whether this link is a lightweight social sign-in or a stricter enterprise connector.',\n whyItMatters: 'Changes validation rules, admin UX, and whether an explicit enterprise scope is permitted.',\n importance: FieldSemanticImportance.PRIMARY,\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'SsoConnectionType',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n values: {\n [SsoConnectionType.SOCIAL]: { meaning: 'Consumer or workspace-social IdP (no tenant-specific enterprise contract).' },\n [SsoConnectionType.ENTERPRISE]: { meaning: 'SAML/enterprise contract bound to exactly one organization or application scope.' },\n },\n }),\n\n providerRef: schemaShape.providerRef.stringSpec({\n meaning: 'Stable connector string for the provider family (e.g. google, microsoft, oidc, github).',\n whyItMatters: 'Picks the correct OIDC/SAML client configuration and certificate trust chain during login.',\n semanticRole: 'code',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n providerUserId: schemaShape.providerUserId.stringSpec({\n meaning: 'The end-user’s stable subject at the provider (IdP `sub` or directory object id, depending on IdP).',\n whyItMatters: 'The lookup anchor when reconciling a returning login with the same external account.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n scimExternalId: schemaShape.scimExternalId.stringSpec({\n meaning: 'The identity directory’s own identifier for this person, as the SCIM `externalId` it sends. Present only on a link a directory maintains; absent on social and interactive sign-in links.',\n whyItMatters: 'Deliberately SEPARATE from `providerUserId`, which is the authentication key a returning login is resolved by. RFC 7643 §3.1 makes `externalId` the client’s identifier for the service provider to store, while the provider’s own identifier is `id` — and directories derive it from mutable attributes (Microsoft Entra maps it from `mailNickname` by default), so storing it in the lookup anchor would re-key a live identity whenever an administrator renamed someone. It is a value to hand back to the directory, never one to resolve by.',\n semanticRole: 'identifier',\n }),\n\n providerEmail: schemaShape.providerEmail.stringSpec({\n meaning: 'Email the IdP attests for the user at link time, used for UI display and support correlation.',\n whyItMatters: 'Often the human-readable handle operators see; may diverge from the Wildo account email in edge cases.',\n semanticRole: 'identifier',\n }),\n\n providerDisplayName: schemaShape.providerDisplayName.stringSpec({\n meaning: 'Display name the IdP returned on last profile refresh, if any.',\n whyItMatters: 'Powers friendly UI in device/session lists and admin tooling when available.',\n }),\n\n providerAvatarUrl: schemaShape.providerAvatarUrl.stringSpec({\n meaning: 'Profile picture URL from the provider when the IdP includes one in claims.',\n whyItMatters: 'Improves UX without re-uploading a separate app avatar, when permitted by policy.',\n semanticRole: 'uri',\n }),\n\n providerRawProfile: schemaShape.providerRawProfile.objectSpec({\n meaning: 'Opaque provider claims map (`string` keys → `unknown` values) retained for support and debugging — not shown to the end user.',\n whyItMatters: 'Gives the auth team enough raw context to diagnose mapping bugs without a second data fetch; treated as operator-only and excluded from public APIs.',\n }),\n\n scopeType: schemaShape.scopeType.enumSpec({\n meaning: 'The exact tenant kind that owns an enterprise identity link; omitted for social links.',\n whyItMatters: 'Prevents application identifiers from being interpreted as organization identifiers by membership, grant, and audit logic.',\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'AuthScopeType',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n values: {\n [AuthScopeType.ORGANIZATION]: { meaning: 'The link belongs to an organization-scoped enterprise connection.' },\n [AuthScopeType.APPLICATION]: { meaning: 'The link belongs to an application-scoped enterprise connection.' },\n },\n }),\n\n organizationId: schemaShape.organizationId.stringSpec({\n meaning: 'The owning organization for an organization-scoped enterprise identity link.',\n whyItMatters:\n 'Binds the identity to the same organization that owns membership and organization-type grants, and ties the link\\'s life to that organization: purging it removes the link. Forbidden for social and application-scoped links.',\n semanticRole: 'identifier',\n }),\n\n applicationId: schemaShape.applicationId.stringSpec({\n meaning: 'The owning application for an application-scoped enterprise identity link.',\n whyItMatters:\n 'Preserves application tenancy without manufacturing an organization membership or overloading `organizationId`.',\n semanticRole: 'identifier',\n }),\n\n connectionId: schemaShape.connectionId.stringSpec({\n meaning: 'Enterprise connector record identifier inside the owning organization or application scope.',\n whyItMatters:\n 'Distinguishes multiple enterprise connectors in one scope and is required for enterprise links; social links omit it.',\n semanticRole: 'identifier',\n }),\n\n source: schemaShape.source.enumSpec({\n meaning: 'How this record was first established (OIDC, SAML, SCIM, …).',\n whyItMatters: 'Distinguishes interactive JIT links from service-driven SCIM or migration imports when auditing the graph.',\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'ExternalIdentitySource',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n values: {\n [ExternalIdentitySource.OAUTH2]: { meaning: 'Created through an OAuth 2.0 interactive flow that does not provide OpenID Connect identity semantics.' },\n [ExternalIdentitySource.OIDC]: { meaning: 'Created through an OpenID Connect interactive flow.' },\n [ExternalIdentitySource.SAML]: { meaning: 'Created through a SAML-based enterprise sign-in or assertion exchange.' },\n [ExternalIdentitySource.SCIM]: { meaning: 'Provisioned or reconciled from directory SCIM sync rather than a browser sign-in only.' },\n },\n }),\n\n linkedAt: schemaShape.linkedAt.dateSpec({\n meaning: 'When the provider first bound this `providerUserId` to the Wildo user (insert-time timestamp).',\n whyItMatters: 'Ordering field for “account linking history” views and compliance exports.',\n temporalRole: 'creation',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n lastUsedAt: schemaShape.lastUsedAt.dateSpec({\n meaning: 'The last successful sign-in (or link refresh) that used this exact identity link.',\n whyItMatters: 'Idle-link cleanup policies and support triage can rely on inactivity heuristics from this value.',\n temporalRole: 'occurred',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n },\n\n operations: {\n [Op.READ]: {\n purpose: 'Fetch one specific identity link row, typically through internal service calls when reconciling a provider subject.',\n outcome: 'The caller can inspect the stored provider email, type, and connector metadata to finish auth or audit.',\n whenToUse: 'Use when a backend flow already has the object id. The user-facing “list my links” door is `GET /auth/identity-links`, served by the authentication-method management controller, not a generic public READ. Self-service unlinking uses the separate authenticated DELETE /auth/identity-links/:linkId door, which owns removal policy, reauthentication and the transactional remaining-first-factor check; a generic resource route does not carry those safeguards.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The identity-link record was found and its provider metadata (email, type, connector ids) is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is neither the owning user nor a trusted auth/admin service permitted to read another user’s provider bindings.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No identity-link row exists for the supplied id.' },\n ],\n idempotent: true,\n },\n\n [Op.LIST]: {\n purpose: 'List identity links (usually filtered by `userId`) to render settings pages or to audit provider coverage.',\n outcome: 'Operators or services receive the full set of provider bindings for a user in one query plan.',\n whenToUse: 'Use when the auth controller or admin service enumerates a user’s connected accounts. A person reading back their OWN links reaches `GET /auth/identity-links`, and removes one through `DELETE /auth/identity-links/:linkId`; both are already routed, so this operation is the persistence beneath them rather than a screen an application still has to build.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) set of the target user’s provider bindings is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller tries to enumerate another user’s links without the auth-controller / admin role; a user may only list their own connected accounts.' },\n ],\n idempotent: true,\n },\n\n [Op.CREATE]: {\n purpose: 'Insert a new identity link when a first-time OIDC or SAML sign-in or SCIM import introduces a new provider subject.',\n outcome: 'The Wildo user record gains a new stable mapping row that future sign-ins can hit without a migration.',\n whenToUse: 'Use in JIT account linking — never from untrusted public callers without a verified IdP attestation first.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'A new identity-link record binds the provider subject to the Wildo user; future sign-ins resolve through it without re-provisioning.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The link payload fails schema validation (e.g. missing provider subject fields, an incompatible connection/source pair, or enterprise scope coordinates that do not match `scopeType`).' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is an untrusted/public actor with no verified IdP attestation; JIT linking is gated to the auth service.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'The referenced `users` row does not exist, so there is no identity to bind the provider subject to.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'This provider subject is already linked for the same connection type, provider, external subject, and exact enterprise scope/connection coordinates, so a second binding is rejected.' },\n ],\n idempotent: false,\n },\n\n [Op.UPDATE]: {\n purpose: 'Refresh profile metadata (email, name, raw claims) or move ownership fields after transposition/merge events.',\n outcome: 'The next login sees up-to-date provider data without re-creating a new link row id.',\n whenToUse: 'Use when a provider re-issues a subject change or when a manual data-fix adjusts enterprise connector ids.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The link’s provider metadata (or ownership fields after a merge) was refreshed and the updated record is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The refreshed fields fail schema validation.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the auth-service / admin role required to mutate this identity link.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No identity-link row exists for the supplied id.' },\n ],\n idempotent: true,\n },\n\n [Op.DELETE]: {\n purpose: 'Remove an identity link when a user explicitly disconnects a provider or an admin unlinks a compromised binding.',\n outcome: 'That provider can no longer authenticate into this Wildo user until a fresh link is created.',\n whenToUse: 'Use when policy demands removing a specific IdP mapping without deleting the entire user account.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The identity link was removed; that provider subject can no longer authenticate into the user until a fresh link is created. The body carries its `id`.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is neither the owning user disconnecting their own provider nor an admin unlinking a compromised binding.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No identity-link row exists for the supplied id (the provider was never linked, or was already unlinked).' },\n ],\n idempotent: true,\n },\n\n [Op.DELETE_MANY]: {\n purpose: 'Remove every identity link to an SSO connection that is being deleted, in the deletion’s own transaction.',\n outcome: 'No link survives the connection it pointed at: nobody keeps a binding to a provider the organization removed, and the next connection’s removal check does not count it as another way in.',\n whenToUse: 'Use only from the SSO connection deletion, which filters by `connectionId`. It has no route; a person disconnecting one of their own providers uses `DELETE /auth/identity-links/:linkId`.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The matching identity links were removed; the body lists their ids, and is empty when the connection had none.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not the framework’s SSO connection deletion; the operation is internal and has no public route.' },\n ],\n idempotent: true,\n },\n },\n\n businessConstraints: [\n 'The unique constraint at the data layer is `(userId, providerRef, connectionType)`; schema-level prose defers to the engine migration index because link-uniqueness is a database truth source.',\n 'Enterprise fields (`organizationId`, `connectionId`) are optional in the shared schema: social connections omit them while enterprise ones rely on them for tenant scoping — authors must not flatten those semantics in AI prompts into “always present”.',\n ],\n }),\n { resourcePrimaryScope: ResourcePrimaryScope.USER_SELF },\n);\n"]}
@@ -14,6 +14,7 @@ export declare const userPreferencesApiReferenceExample: {
14
14
  notifications: {
15
15
  email: boolean;
16
16
  inApp: boolean;
17
+ byResourceType: {};
17
18
  };
18
19
  privacy: {
19
20
  consentedPurposes: string[];
@@ -1 +1 @@
1
- {"version":3,"file":"user-preferences-api-reference.examples.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/users/resources/user-preferences-api-reference.examples.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,eAAO,MAAM,gCAAgC,sBAAsB,CAAC;AACpE,eAAO,MAAM,2BAA2B,kCAAkC,CAAC;AAE3E,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;CAyB9C,CAAC;AAEF,eAAO,MAAM,sCAAsC;;CAElD,CAAC;AAEF,eAAO,MAAM,yCAAyC;;;;;;;;;;;;;;;;;CAMrD,CAAC"}
1
+ {"version":3,"file":"user-preferences-api-reference.examples.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/users/resources/user-preferences-api-reference.examples.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,eAAO,MAAM,gCAAgC,sBAAsB,CAAC;AACpE,eAAO,MAAM,2BAA2B,kCAAkC,CAAC;AAE3E,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;CA2B9C,CAAC;AAEF,eAAO,MAAM,sCAAsC;;CAElD,CAAC;AAEF,eAAO,MAAM,yCAAyC;;;;;;;;;;;;;;;;;CAMrD,CAAC"}
@@ -14,6 +14,8 @@ export const userPreferencesApiReferenceExample = {
14
14
  notifications: {
15
15
  email: true,
16
16
  inApp: true,
17
+ // Per-kind choices (#2318): empty for a person who has turned no kind of notification off.
18
+ byResourceType: {},
17
19
  },
18
20
  privacy: {
19
21
  consentedPurposes: ['analytics'],
@@ -1 +1 @@
1
- {"version":3,"file":"user-preferences-api-reference.examples.js","sourceRoot":"","sources":["../../../../../../src/engine/users/resources/user-preferences-api-reference.examples.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,MAAM,CAAC,MAAM,gCAAgC,GAAG,mBAAmB,CAAC;AACpE,MAAM,CAAC,MAAM,2BAA2B,GAAG,+BAA+B,CAAC;AAE3E,MAAM,CAAC,MAAM,kCAAkC,GAAG;IAChD,GAAG,EAAE,2BAA2B;IAChC,MAAM,EAAE,gCAAgC;IACxC,aAAa,EAAE;QACb,KAAK,EAAE,IAAI;QACX,KAAK,EAAE,IAAI;KACZ;IACD,OAAO,EAAE;QACP,iBAAiB,EAAE,CAAC,WAAW,CAAC;QAChC,gBAAgB,EAAE,0BAA0B;KAC7C;IACD,EAAE,EAAE;QACF,KAAK,EAAE,MAAM;KACd;IACD,QAAQ,EAAE;QACR,QAAQ,EAAE,cAAc;QACxB,UAAU,EAAE,YAAY;QACxB,UAAU,EAAE,KAAK;QACjB,MAAM,EAAE,IAAI;KACb;IACD,mBAAmB,EAAE;QACnB,eAAe,EAAE,IAAI;QACrB,iBAAiB,EAAE,CAAC,IAAI,CAAC;QACzB,sBAAsB,EAAE,KAAK;KAC9B;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,sCAAsC,GAAG;IACpD,MAAM,EAAE,gCAAgC;CACzC,CAAC;AAEF,MAAM,CAAC,MAAM,yCAAyC,GAAG;IACvD,GAAG,EAAE,kCAAkC,CAAC,GAAG;IAC3C,MAAM,EAAE,kCAAkC,CAAC,MAAM;IACjD,EAAE,EAAE,kCAAkC,CAAC,EAAE;IACzC,QAAQ,EAAE,kCAAkC,CAAC,QAAQ;IACrD,mBAAmB,EAAE,kCAAkC,CAAC,mBAAmB;CAC5E,CAAC","sourcesContent":["/**\n * Canonical wire examples for the two API doors onto the shared user-preferences rows.\n *\n * `USER_SELF_PREFERENCES` owns subject-facing read/update/reset operations and\n * `USER_PREFERENCES` owns administrator-addressed read/update operations. Both resolve to the\n * same persistence collection and the same `UserPreferencesSchema`, so duplicating payloads in\n * their specifications would let the published contracts drift while the runtime data does not.\n */\n\nexport const USER_PREFERENCES_EXAMPLE_USER_ID = 'user_01HX2EXAMPLE';\nexport const USER_PREFERENCES_EXAMPLE_ID = 'user_preferences_01HX2EXAMPLE';\n\nexport const userPreferencesApiReferenceExample = {\n _id: USER_PREFERENCES_EXAMPLE_ID,\n userId: USER_PREFERENCES_EXAMPLE_USER_ID,\n notifications: {\n email: true,\n inApp: true,\n },\n privacy: {\n consentedPurposes: ['analytics'],\n consentDecidedAt: '2026-09-01T09:00:00.000Z',\n },\n ui: {\n theme: 'AUTO',\n },\n regional: {\n timezone: 'Europe/Paris',\n dateFormat: 'DD/MM/YYYY',\n timeFormat: '24h',\n locale: 'fr',\n },\n languagePreferences: {\n primaryLanguage: 'fr',\n fallbackLanguages: ['en'],\n useOrganizationDefault: false,\n },\n};\n\nexport const userPreferencesApiReferencePathExample = {\n userId: USER_PREFERENCES_EXAMPLE_USER_ID,\n};\n\nexport const userPreferencesApiReferenceSummaryExample = {\n _id: userPreferencesApiReferenceExample._id,\n userId: userPreferencesApiReferenceExample.userId,\n ui: userPreferencesApiReferenceExample.ui,\n regional: userPreferencesApiReferenceExample.regional,\n languagePreferences: userPreferencesApiReferenceExample.languagePreferences,\n};\n"]}
1
+ {"version":3,"file":"user-preferences-api-reference.examples.js","sourceRoot":"","sources":["../../../../../../src/engine/users/resources/user-preferences-api-reference.examples.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,MAAM,CAAC,MAAM,gCAAgC,GAAG,mBAAmB,CAAC;AACpE,MAAM,CAAC,MAAM,2BAA2B,GAAG,+BAA+B,CAAC;AAE3E,MAAM,CAAC,MAAM,kCAAkC,GAAG;IAChD,GAAG,EAAE,2BAA2B;IAChC,MAAM,EAAE,gCAAgC;IACxC,aAAa,EAAE;QACb,KAAK,EAAE,IAAI;QACX,KAAK,EAAE,IAAI;QACX,2FAA2F;QAC3F,cAAc,EAAE,EAAE;KACnB;IACD,OAAO,EAAE;QACP,iBAAiB,EAAE,CAAC,WAAW,CAAC;QAChC,gBAAgB,EAAE,0BAA0B;KAC7C;IACD,EAAE,EAAE;QACF,KAAK,EAAE,MAAM;KACd;IACD,QAAQ,EAAE;QACR,QAAQ,EAAE,cAAc;QACxB,UAAU,EAAE,YAAY;QACxB,UAAU,EAAE,KAAK;QACjB,MAAM,EAAE,IAAI;KACb;IACD,mBAAmB,EAAE;QACnB,eAAe,EAAE,IAAI;QACrB,iBAAiB,EAAE,CAAC,IAAI,CAAC;QACzB,sBAAsB,EAAE,KAAK;KAC9B;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,sCAAsC,GAAG;IACpD,MAAM,EAAE,gCAAgC;CACzC,CAAC;AAEF,MAAM,CAAC,MAAM,yCAAyC,GAAG;IACvD,GAAG,EAAE,kCAAkC,CAAC,GAAG;IAC3C,MAAM,EAAE,kCAAkC,CAAC,MAAM;IACjD,EAAE,EAAE,kCAAkC,CAAC,EAAE;IACzC,QAAQ,EAAE,kCAAkC,CAAC,QAAQ;IACrD,mBAAmB,EAAE,kCAAkC,CAAC,mBAAmB;CAC5E,CAAC","sourcesContent":["/**\n * Canonical wire examples for the two API doors onto the shared user-preferences rows.\n *\n * `USER_SELF_PREFERENCES` owns subject-facing read/update/reset operations and\n * `USER_PREFERENCES` owns administrator-addressed read/update operations. Both resolve to the\n * same persistence collection and the same `UserPreferencesSchema`, so duplicating payloads in\n * their specifications would let the published contracts drift while the runtime data does not.\n */\n\nexport const USER_PREFERENCES_EXAMPLE_USER_ID = 'user_01HX2EXAMPLE';\nexport const USER_PREFERENCES_EXAMPLE_ID = 'user_preferences_01HX2EXAMPLE';\n\nexport const userPreferencesApiReferenceExample = {\n _id: USER_PREFERENCES_EXAMPLE_ID,\n userId: USER_PREFERENCES_EXAMPLE_USER_ID,\n notifications: {\n email: true,\n inApp: true,\n // Per-kind choices (#2318): empty for a person who has turned no kind of notification off.\n byResourceType: {},\n },\n privacy: {\n consentedPurposes: ['analytics'],\n consentDecidedAt: '2026-09-01T09:00:00.000Z',\n },\n ui: {\n theme: 'AUTO',\n },\n regional: {\n timezone: 'Europe/Paris',\n dateFormat: 'DD/MM/YYYY',\n timeFormat: '24h',\n locale: 'fr',\n },\n languagePreferences: {\n primaryLanguage: 'fr',\n fallbackLanguages: ['en'],\n useOrganizationDefault: false,\n },\n};\n\nexport const userPreferencesApiReferencePathExample = {\n userId: USER_PREFERENCES_EXAMPLE_USER_ID,\n};\n\nexport const userPreferencesApiReferenceSummaryExample = {\n _id: userPreferencesApiReferenceExample._id,\n userId: userPreferencesApiReferenceExample.userId,\n ui: userPreferencesApiReferenceExample.ui,\n regional: userPreferencesApiReferenceExample.regional,\n languagePreferences: userPreferencesApiReferenceExample.languagePreferences,\n};\n"]}
@@ -9,6 +9,10 @@ export declare const userPreferencesResourceSpecification: import("../../../_cor
9
9
  notifications: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodDefault<import("zod").ZodObject<{
10
10
  email: import("zod").ZodDefault<import("zod").ZodBoolean>;
11
11
  inApp: import("zod").ZodDefault<import("zod").ZodBoolean>;
12
+ byResourceType: import("zod").ZodDefault<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodObject<{
13
+ email: import("zod").ZodOptional<import("zod").ZodBoolean>;
14
+ inApp: import("zod").ZodOptional<import("zod").ZodBoolean>;
15
+ }, import("zod/v4/core").$strip>>>;
12
16
  }, import("zod/v4/core").$strip>>>;
13
17
  privacy: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodDefault<import("zod").ZodObject<{
14
18
  consentedPurposes: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodDefault<import("zod").ZodArray<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodEnum<typeof import("@wildo-ai/saas-models").ConsentPurpose>>>>>;
@@ -1 +1 @@
1
- {"version":3,"file":"user-preferences.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/users/resources/user-preferences.resource.specification.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAUH,OAAO,EACL,qBAAqB,IAAI,EAAE,EAI5B,MAAM,uBAAuB,CAAC;AA8B/B,eAAO,MAAM,oCAAoC;;;;;;;;;;;;;;;;;;;;;;;;;iCAuNhD,CAAC"}
1
+ {"version":3,"file":"user-preferences.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/users/resources/user-preferences.resource.specification.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAUH,OAAO,EACL,qBAAqB,IAAI,EAAE,EAI5B,MAAM,uBAAuB,CAAC;AA8B/B,eAAO,MAAM,oCAAoC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAuNhD,CAAC"}
@@ -63,7 +63,7 @@ export const userPreferencesResourceSpecification = resourceSpecificationFromFro
63
63
  whyItMatters: 'Anchors the preference record to a single identity so admin/impersonation reads and self-serve writes always resolve one owner and never leak preferences across users.',
64
64
  importance: FieldSemanticImportance.PRIMARY,
65
65
  }),
66
- notifications: schemaShape.notifications.objectSpec({ meaning: 'Channel toggles.', importance: FieldSemanticImportance.PRIMARY }),
66
+ notifications: schemaShape.notifications.objectSpec({ meaning: 'The user\u2019s notification choices: the `email` and `inApp` channel switches, and `byResourceType`, a channel turned off for one kind of notification, keyed by the resource it is about. The switches are the master.', importance: FieldSemanticImportance.PRIMARY }),
67
67
  privacy: schemaShape.privacy.objectSpec({ meaning: 'Privacy and consent data.', importance: FieldSemanticImportance.PRIMARY }),
68
68
  ui: schemaShape.ui.objectSpec({ meaning: 'Theme and presentation block.', importance: FieldSemanticImportance.PRIMARY }),
69
69
  regional: schemaShape.regional.objectSpec({ meaning: 'Timezone and format settings.', importance: FieldSemanticImportance.PRIMARY }),
@@ -157,7 +157,7 @@ export const userPreferencesResourceSpecification = resourceSpecificationFromFro
157
157
  [Op.DELETE]: {
158
158
  purpose: 'Delete the preferences row as part of the trusted user-composition cascade.',
159
159
  outcome: 'The dependent preferences row is removed when its owning user is deleted.',
160
- responseStatuses: [{ code: HttpResponseStatusCode.NO_CONTENT_204, meaning: 'The internal lifecycle cascade deleted the preferences record.' }],
160
+ responseStatuses: [{ code: HttpResponseStatusCode.OK_200, meaning: 'The internal lifecycle cascade deleted the preferences record.' }],
161
161
  errorScenarios: [],
162
162
  idempotent: true,
163
163
  },
@@ -176,7 +176,7 @@ export const userPreferencesResourceSpecification = resourceSpecificationFromFro
176
176
  summaryPurpose: 'Time zone and primary language as bare values, shared with the self layout (theme and locale are left out: bare, they are ambiguous).',
177
177
  sections: {
178
178
  notifications: {
179
- purpose: 'Per-channel opt-ins.',
179
+ purpose: 'The user\u2019s two channel switches, email and in-app, then the table of kinds of notification they may silence, one switch per channel each kind uses (the same section the user edits, shared layout).',
180
180
  whenToUse: 'When support verifies notification storms or delivery issues.',
181
181
  textSlots: { title: { purpose: 'Notifications section label.' } },
182
182
  },
@@ -1 +1 @@
1
- {"version":3,"file":"user-preferences.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/users/resources/user-preferences.resource.specification.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,iCAAiC,IAAI,uCAAuC,EAAE,MAAM,8BAA8B,CAAC;AAC5H,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAEpE,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,qBAAqB,IAAI,EAAE,EAC3B,oBAAoB,EACpB,qBAAqB,EACrB,0DAA0D,IAAI,sBAAsB,GACrF,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,sBAAsB,EACtB,6BAA6B,EAC7B,qBAAqB,EACrB,8CAA8C,GAC/C,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAAE,sCAAsC,EAAE,MAAM,0CAA0C,CAAC;AAClG,OAAO,EACL,gCAAgC,EAChC,kCAAkC,EAClC,sCAAsC,EACtC,yCAAyC,GAC1C,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAO3E,MAAM,iCAAiC,GAAG,uCAIzC,CAAC;AAEF,MAAM,KAAK,GAAG,CAAC,CAAS,EAAE,EAAE,CAAC,sCAAsC,CAAC,CAAC,CAAC,CAAC;AAEvE,MAAM,CAAC,MAAM,oCAAoC,GAAG,8CAA8C,CAChG,6BAA6B,CAAC,iCAAiC,CAAC,EAChE,qBAAqB,CACnB,sBAAsB,EACtB,qBAAqB,EACrB,CAAC,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC,CAAC;IACpB,OAAO,EAAE,qJAAqJ;IAC9J,YAAY,EAAE,kKAAkK;IAChL,aAAa,EAAE,0KAA0K;IACzL,QAAQ,EAAE,aAAa,CAAC,KAAK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/B,SAAS,EAAE,+DAA+D;gBAC1E,SAAS,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,8BAA8B,EAAE,EAAE;aAClE;YACD,OAAO,EAAE;gBACP,OAAO,EAAE,uBAAuB;gBAChC,SAAS,EAAE,yBAAyB;gBACpC,SAAS,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,wBAAwB,EAAE,EAAE;aAC5D;YACD,QAAQ,EAAE;gBACR,OAAO,EAAE,uBAAuB;gBAChC,SAAS,EAAE,2BAA2B;gBACtC,SAAS,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,iBAAiB,EAAE,EAAE;aACrD;YACD,QAAQ,EAAE;gBACR,OAAO,EAAE,uCAAuC;gBAChD,SAAS,EAAE,8BAA8B;gBACzC,SAAS,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,iBAAiB,EAAE,EAAE;aACrD;SACF;KACF;IACD,KAAK,EAAE;QACL,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE;YACT,QAAQ,EAAE;gBACR,KAAK,EAAE;oBACL,OAAO,EAAE,gGAAgG;oBACzG,SAAS,EAAE,yEAAyE;iBACrF;aACF;SACF;QACD,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE;YACX,QAAQ,EAAE;gBACR,KAAK,EAAE;oBACL,OAAO,EAAE,mEAAmE;oBAC5E,SAAS,EAAE,gDAAgD;iBAC5D;aACF;SACF;KACF;CACF,CAAC,CACH,CAAC","sourcesContent":["/**\n * Resource: `userPreferences` — Wildo SaaS engine specification (mixed, admin-leaning).\n * Schema: `UserPreferencesSchema` (same document shape as `userSelfPreferences`).\n */\n\nimport { userPreferencesResourceUIBehavior as userPreferencesResourceUIBehaviorSource } from '@wildo-ai/presets-components';\nimport { LabelAudience } from '@wildo-ai/presets-components-models';\nimport type { ResourceUIBehaviorConfig } from '@wildo-ai/saas-frontend-lib/companion';\nimport {\n CodeDeclarationKind,\n CodeSymbolKind,\n FieldSemanticImportance,\n} from '@wildo-ai/zod-decorators';\nimport {\n CoreResourceOperation as Op,\n ResourcePrimaryScope,\n UserPreferencesSchema,\n userPreferencesResourceConfiguration_InitializationFactory as userPreferencesFactory,\n} from '@wildo-ai/saas-models';\nimport {\n HttpResponseStatusCode,\n resourceFrontendConfiguration,\n resourceSpecification,\n resourceSpecificationFromFrontendConfiguration,\n} from '~wildo-specifications/_core';\n\nimport { selfServiceFrontEndSuccessNotification } from './self-service-user-notifications.shared';\nimport {\n USER_PREFERENCES_EXAMPLE_USER_ID,\n userPreferencesApiReferenceExample,\n userPreferencesApiReferencePathExample,\n userPreferencesApiReferenceSummaryExample,\n} from './user-preferences-api-reference.examples';\nimport { EngineResourceSubDomain } from '../../engine-resource-sub-domain';\n\ntype Cfg = ReturnType<typeof userPreferencesFactory>;\ntype Custom = NonNullable<Cfg['customOperation']>;\ntype Core = Cfg['coreOperations'][number];\ntype Main = Cfg['mainSchema'];\n\nconst userPreferencesResourceUIBehavior = userPreferencesResourceUIBehaviorSource as ResourceUIBehaviorConfig<\n Custom,\n Core,\n Main\n>;\n\nconst toast = (s: string) => selfServiceFrontEndSuccessNotification(s);\n\nexport const userPreferencesResourceSpecification = resourceSpecificationFromFrontendConfiguration(\n resourceFrontendConfiguration(userPreferencesResourceUIBehavior),\n resourceSpecification(\n userPreferencesFactory,\n UserPreferencesSchema,\n ({ schemaShape }) => ({\n purpose: 'Application-administration access to an addressed user’s preference document. Subject-facing access belongs exclusively to `USER_SELF_PREFERENCES`.',\n businessRole: 'Powers authorized support inspection and explicitly privileged preference corrections without republishing the self-service API under an addressable user route.',\n lifecycleRole: 'Created internally alongside the user and deleted internally with the user; administrators may read or update the existing row but cannot create or delete it over HTTP.',\n audience: LabelAudience.ADMIN,\n subDomain: EngineResourceSubDomain.USERS,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'UserPreferencesSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactory: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'userPreferencesResourceConfiguration_InitializationFactory',\n symbolKind: CodeSymbolKind.FACTORY,\n declarationKind: CodeDeclarationKind.FUNCTION,\n },\n resourceType: {\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceType',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n memberName: 'USER_PREFERENCES',\n },\n operationVocabulary: {\n coreEnum: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceOperation',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n frontendConfigurationSources: [\n {\n packageName: '@wildo-ai/presets-components',\n exportName: 'userPreferencesResourceUIBehavior',\n symbolKind: CodeSymbolKind.UI_BEHAVIOR,\n },\n ],\n },\n\n fields: {\n _id: schemaShape._id.stringSpec({ meaning: 'Preferences record id.', semanticRole: 'identifier', importance: FieldSemanticImportance.PRIMARY }),\n userId: schemaShape.userId.foreignKeySpec({\n meaning: 'Foreign key to the `users` record that owns this preference document — immutable after create.',\n whyItMatters: 'Anchors the preference record to a single identity so admin/impersonation reads and self-serve writes always resolve one owner and never leak preferences across users.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n notifications: schemaShape.notifications.objectSpec({ meaning: 'Channel toggles.', importance: FieldSemanticImportance.PRIMARY }),\n privacy: schemaShape.privacy.objectSpec({ meaning: 'Privacy and consent data.', importance: FieldSemanticImportance.PRIMARY }),\n ui: schemaShape.ui.objectSpec({ meaning: 'Theme and presentation block.', importance: FieldSemanticImportance.PRIMARY }),\n regional: schemaShape.regional.objectSpec({ meaning: 'Timezone and format settings.', importance: FieldSemanticImportance.PRIMARY }),\n languagePreferences: schemaShape.languagePreferences.objectSpec({ meaning: 'Language/locale block.', importance: FieldSemanticImportance.PRIMARY }),\n },\n\n operations: {\n [Op.READ]: {\n purpose: 'Read the preference document of an addressed user through the application-administration API. This cross-subject operation requires `APP_ADMIN_VIEWER`; a user reading their own preferences uses `USER_SELF_PREFERENCES` instead.',\n outcome: 'Support and application administrators can inspect the exact preference state that the addressed user sees without impersonating that user.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The addressed user’s complete preference document is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.UNAUTHORIZED_401, when: 'The request carries no valid authenticated session.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller does not hold the application-administration viewer role.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'The addressed user does not exist or has no preferences row because provisioning did not complete successfully.' },\n ],\n idempotent: true,\n examples: [\n {\n title: 'Inspect a user’s delivery, privacy and regional choices',\n request: userPreferencesApiReferencePathExample,\n response: userPreferencesApiReferenceExample,\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n variants: {\n context: {\n examples: [\n {\n title: 'Inspect preferences with their owning user context',\n request: userPreferencesApiReferencePathExample,\n response: {\n ...userPreferencesApiReferenceExample,\n user: { _id: USER_PREFERENCES_EXAMPLE_USER_ID },\n },\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n summary: {\n examples: [\n {\n title: 'Inspect the compact locale and appearance summary',\n request: userPreferencesApiReferencePathExample,\n response: userPreferencesApiReferenceSummaryExample,\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n },\n },\n [Op.CREATE]: {\n purpose: 'Create the default preferences row from the trusted user-provisioning lifecycle.',\n outcome: 'Every newly created user starts with exactly one schema-default preferences row.',\n responseStatuses: [{ code: HttpResponseStatusCode.CREATED_201, meaning: 'The internal provisioning hook created the preferences record.' }],\n errorScenarios: [{ code: HttpResponseStatusCode.CONFLICT_409, when: 'The one-per-user preferences row already exists.' }],\n idempotent: false,\n },\n [Op.UPDATE]: {\n purpose: 'Correct selected preference blocks for an addressed user through the application-administration API. This cross-subject operation requires `APP_ADMIN_SUPER_ADMIN`; ordinary user changes use `USER_SELF_PREFERENCES`. Successful updates emit an audit event even below the automatic risk floor; marked privacy decision fields carry before/after values.',\n outcome: 'The selected blocks are replaced on the same preference document used by the self-service API, and the addressed user receives the updated state.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The addressed user’s preference document was updated and is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'A supplied preference block fails schema validation.' },\n { code: HttpResponseStatusCode.UNAUTHORIZED_401, when: 'The request carries no valid authenticated session.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller does not hold the application super-administrator role.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'The addressed user does not exist or has no preferences row because provisioning did not complete successfully.' },\n ],\n idempotent: true,\n examples: [\n {\n title: 'Correct the timezone used for a user’s scheduled work',\n request: {\n userId: USER_PREFERENCES_EXAMPLE_USER_ID,\n regional: {\n timezone: 'Europe/Paris',\n dateFormat: 'DD/MM/YYYY',\n timeFormat: '24h',\n locale: 'fr',\n },\n },\n response: userPreferencesApiReferenceExample,\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n communications: { notification: toast('FRONT_END_SUCCESS on UPDATE (runtime).') },\n },\n [Op.DELETE]: {\n purpose: 'Delete the preferences row as part of the trusted user-composition cascade.',\n outcome: 'The dependent preferences row is removed when its owning user is deleted.',\n responseStatuses: [{ code: HttpResponseStatusCode.NO_CONTENT_204, meaning: 'The internal lifecycle cascade deleted the preferences record.' }],\n errorScenarios: [],\n idempotent: true,\n },\n },\n\n businessConstraints: [\n 'Registry `resourcePrimaryScope` is `USER_SELF` from the `USERS → USER_PREFERENCES` composition rel — the document is user-anchored even when operators edit it in admin UIs.',\n 'The only HTTP variants are administrator-addressed READ and UPDATE. CREATE exists solely for eager `createAsSystem` provisioning; DELETE exists solely for the USERS composition cascade.',\n '`USER_PREFERENCES` and `USER_SELF_PREFERENCES` resolve to the SAME collection. Subject-facing READ, UPDATE and RESET_TO_DEFAULTS belong only to the self resource; this resource never republishes them under `/users/{userId}`.',\n 'Both administrative variants explicitly admit cross-subject user administration and retain independent APP_ADMIN role gates. The path user id selects the subject only after that authorization succeeds.',\n 'UPDATE accepts selected preference blocks, but a supplied block is validated as that block’s complete object. Send all fields of each block you change.',\n ],\n }),\n { resourcePrimaryScope: ResourcePrimaryScope.USER_SELF },\n ),\n () => ({\n layout: {\n purpose: 'Reuse the self-preference section structure (the admin preset sets its layout to the shared USER_SELF_PREFERENCES layout) so admin and user see identical field grouping: notifications/privacy/regional/language. UI theme is intentionally NOT a section here — the shared self-preferences layout omits it; theme is shown and edited only on the dedicated Appearance Settings-Hub panel. Sections carry a title and no description, as in the shared self layout. Do not re-add an appearance section unless the shared layout reintroduces the ref.',\n displayPurpose: 'Admin “Edit user preferences” or impersonation read-only view.',\n summaryPurpose: 'Time zone and primary language as bare values, shared with the self layout (theme and locale are left out: bare, they are ambiguous).',\n sections: {\n notifications: {\n purpose: 'Per-channel opt-ins.',\n whenToUse: 'When support verifies notification storms or delivery issues.',\n textSlots: { title: { purpose: 'Notifications section label.' } },\n },\n privacy: {\n purpose: 'User privacy posture.',\n whenToUse: 'DSR and consent audits.',\n textSlots: { title: { purpose: 'Privacy section label.' } },\n },\n regional: {\n purpose: 'Timezone and formats.',\n whenToUse: 'Scheduling support cases.',\n textSlots: { title: { purpose: 'Regional label.' } },\n },\n language: {\n purpose: 'Language and fallback language stack.',\n whenToUse: 'i18n bug reports for a user.',\n textSlots: { title: { purpose: 'Language label.' } },\n },\n },\n },\n views: {\n [Op.READ]: {\n variants: {\n admin: {\n purpose: 'Read preferences through the only public variant on this resource: application administration.',\n whenToUse: 'Back-office user-preferences inspection without impersonating the user.',\n },\n },\n },\n [Op.UPDATE]: {\n variants: {\n admin: {\n purpose: 'Update preferences on behalf of the user (super-admin / support).',\n whenToUse: 'Impersonation or break-glass preference fixes.',\n },\n },\n },\n },\n }),\n);\n"]}
1
+ {"version":3,"file":"user-preferences.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/users/resources/user-preferences.resource.specification.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,iCAAiC,IAAI,uCAAuC,EAAE,MAAM,8BAA8B,CAAC;AAC5H,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAEpE,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,qBAAqB,IAAI,EAAE,EAC3B,oBAAoB,EACpB,qBAAqB,EACrB,0DAA0D,IAAI,sBAAsB,GACrF,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,sBAAsB,EACtB,6BAA6B,EAC7B,qBAAqB,EACrB,8CAA8C,GAC/C,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAAE,sCAAsC,EAAE,MAAM,0CAA0C,CAAC;AAClG,OAAO,EACL,gCAAgC,EAChC,kCAAkC,EAClC,sCAAsC,EACtC,yCAAyC,GAC1C,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAO3E,MAAM,iCAAiC,GAAG,uCAIzC,CAAC;AAEF,MAAM,KAAK,GAAG,CAAC,CAAS,EAAE,EAAE,CAAC,sCAAsC,CAAC,CAAC,CAAC,CAAC;AAEvE,MAAM,CAAC,MAAM,oCAAoC,GAAG,8CAA8C,CAChG,6BAA6B,CAAC,iCAAiC,CAAC,EAChE,qBAAqB,CACnB,sBAAsB,EACtB,qBAAqB,EACrB,CAAC,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC,CAAC;IACpB,OAAO,EAAE,qJAAqJ;IAC9J,YAAY,EAAE,kKAAkK;IAChL,aAAa,EAAE,0KAA0K;IACzL,QAAQ,EAAE,aAAa,CAAC,KAAK;IAC7B,SAAS,EAAE,uBAAuB,CAAC,KAAK;IACxC,YAAY,EAAE;QACZ,UAAU,EAA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AE,8BAA8B,EAAE,EAAE;aAClE;YACD,OAAO,EAAE;gBACP,OAAO,EAAE,uBAAuB;gBAChC,SAAS,EAAE,yBAAyB;gBACpC,SAAS,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,wBAAwB,EAAE,EAAE;aAC5D;YACD,QAAQ,EAAE;gBACR,OAAO,EAAE,uBAAuB;gBAChC,SAAS,EAAE,2BAA2B;gBACtC,SAAS,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,iBAAiB,EAAE,EAAE;aACrD;YACD,QAAQ,EAAE;gBACR,OAAO,EAAE,uCAAuC;gBAChD,SAAS,EAAE,8BAA8B;gBACzC,SAAS,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,iBAAiB,EAAE,EAAE;aACrD;SACF;KACF;IACD,KAAK,EAAE;QACL,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE;YACT,QAAQ,EAAE;gBACR,KAAK,EAAE;oBACL,OAAO,EAAE,gGAAgG;oBACzG,SAAS,EAAE,yEAAyE;iBACrF;aACF;SACF;QACD,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE;YACX,QAAQ,EAAE;gBACR,KAAK,EAAE;oBACL,OAAO,EAAE,mEAAmE;oBAC5E,SAAS,EAAE,gDAAgD;iBAC5D;aACF;SACF;KACF;CACF,CAAC,CACH,CAAC","sourcesContent":["/**\n * Resource: `userPreferences` — Wildo SaaS engine specification (mixed, admin-leaning).\n * Schema: `UserPreferencesSchema` (same document shape as `userSelfPreferences`).\n */\n\nimport { userPreferencesResourceUIBehavior as userPreferencesResourceUIBehaviorSource } from '@wildo-ai/presets-components';\nimport { LabelAudience } from '@wildo-ai/presets-components-models';\nimport type { ResourceUIBehaviorConfig } from '@wildo-ai/saas-frontend-lib/companion';\nimport {\n CodeDeclarationKind,\n CodeSymbolKind,\n FieldSemanticImportance,\n} from '@wildo-ai/zod-decorators';\nimport {\n CoreResourceOperation as Op,\n ResourcePrimaryScope,\n UserPreferencesSchema,\n userPreferencesResourceConfiguration_InitializationFactory as userPreferencesFactory,\n} from '@wildo-ai/saas-models';\nimport {\n HttpResponseStatusCode,\n resourceFrontendConfiguration,\n resourceSpecification,\n resourceSpecificationFromFrontendConfiguration,\n} from '~wildo-specifications/_core';\n\nimport { selfServiceFrontEndSuccessNotification } from './self-service-user-notifications.shared';\nimport {\n USER_PREFERENCES_EXAMPLE_USER_ID,\n userPreferencesApiReferenceExample,\n userPreferencesApiReferencePathExample,\n userPreferencesApiReferenceSummaryExample,\n} from './user-preferences-api-reference.examples';\nimport { EngineResourceSubDomain } from '../../engine-resource-sub-domain';\n\ntype Cfg = ReturnType<typeof userPreferencesFactory>;\ntype Custom = NonNullable<Cfg['customOperation']>;\ntype Core = Cfg['coreOperations'][number];\ntype Main = Cfg['mainSchema'];\n\nconst userPreferencesResourceUIBehavior = userPreferencesResourceUIBehaviorSource as ResourceUIBehaviorConfig<\n Custom,\n Core,\n Main\n>;\n\nconst toast = (s: string) => selfServiceFrontEndSuccessNotification(s);\n\nexport const userPreferencesResourceSpecification = resourceSpecificationFromFrontendConfiguration(\n resourceFrontendConfiguration(userPreferencesResourceUIBehavior),\n resourceSpecification(\n userPreferencesFactory,\n UserPreferencesSchema,\n ({ schemaShape }) => ({\n purpose: 'Application-administration access to an addressed user’s preference document. Subject-facing access belongs exclusively to `USER_SELF_PREFERENCES`.',\n businessRole: 'Powers authorized support inspection and explicitly privileged preference corrections without republishing the self-service API under an addressable user route.',\n lifecycleRole: 'Created internally alongside the user and deleted internally with the user; administrators may read or update the existing row but cannot create or delete it over HTTP.',\n audience: LabelAudience.ADMIN,\n subDomain: EngineResourceSubDomain.USERS,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'UserPreferencesSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactory: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'userPreferencesResourceConfiguration_InitializationFactory',\n symbolKind: CodeSymbolKind.FACTORY,\n declarationKind: CodeDeclarationKind.FUNCTION,\n },\n resourceType: {\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceType',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n memberName: 'USER_PREFERENCES',\n },\n operationVocabulary: {\n coreEnum: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceOperation',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n frontendConfigurationSources: [\n {\n packageName: '@wildo-ai/presets-components',\n exportName: 'userPreferencesResourceUIBehavior',\n symbolKind: CodeSymbolKind.UI_BEHAVIOR,\n },\n ],\n },\n\n fields: {\n _id: schemaShape._id.stringSpec({ meaning: 'Preferences record id.', semanticRole: 'identifier', importance: FieldSemanticImportance.PRIMARY }),\n userId: schemaShape.userId.foreignKeySpec({\n meaning: 'Foreign key to the `users` record that owns this preference document — immutable after create.',\n whyItMatters: 'Anchors the preference record to a single identity so admin/impersonation reads and self-serve writes always resolve one owner and never leak preferences across users.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n notifications: schemaShape.notifications.objectSpec({ meaning: 'The user\\u2019s notification choices: the `email` and `inApp` channel switches, and `byResourceType`, a channel turned off for one kind of notification, keyed by the resource it is about. The switches are the master.', importance: FieldSemanticImportance.PRIMARY }),\n privacy: schemaShape.privacy.objectSpec({ meaning: 'Privacy and consent data.', importance: FieldSemanticImportance.PRIMARY }),\n ui: schemaShape.ui.objectSpec({ meaning: 'Theme and presentation block.', importance: FieldSemanticImportance.PRIMARY }),\n regional: schemaShape.regional.objectSpec({ meaning: 'Timezone and format settings.', importance: FieldSemanticImportance.PRIMARY }),\n languagePreferences: schemaShape.languagePreferences.objectSpec({ meaning: 'Language/locale block.', importance: FieldSemanticImportance.PRIMARY }),\n },\n\n operations: {\n [Op.READ]: {\n purpose: 'Read the preference document of an addressed user through the application-administration API. This cross-subject operation requires `APP_ADMIN_VIEWER`; a user reading their own preferences uses `USER_SELF_PREFERENCES` instead.',\n outcome: 'Support and application administrators can inspect the exact preference state that the addressed user sees without impersonating that user.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The addressed user’s complete preference document is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.UNAUTHORIZED_401, when: 'The request carries no valid authenticated session.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller does not hold the application-administration viewer role.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'The addressed user does not exist or has no preferences row because provisioning did not complete successfully.' },\n ],\n idempotent: true,\n examples: [\n {\n title: 'Inspect a user’s delivery, privacy and regional choices',\n request: userPreferencesApiReferencePathExample,\n response: userPreferencesApiReferenceExample,\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n variants: {\n context: {\n examples: [\n {\n title: 'Inspect preferences with their owning user context',\n request: userPreferencesApiReferencePathExample,\n response: {\n ...userPreferencesApiReferenceExample,\n user: { _id: USER_PREFERENCES_EXAMPLE_USER_ID },\n },\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n summary: {\n examples: [\n {\n title: 'Inspect the compact locale and appearance summary',\n request: userPreferencesApiReferencePathExample,\n response: userPreferencesApiReferenceSummaryExample,\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n },\n },\n [Op.CREATE]: {\n purpose: 'Create the default preferences row from the trusted user-provisioning lifecycle.',\n outcome: 'Every newly created user starts with exactly one schema-default preferences row.',\n responseStatuses: [{ code: HttpResponseStatusCode.CREATED_201, meaning: 'The internal provisioning hook created the preferences record.' }],\n errorScenarios: [{ code: HttpResponseStatusCode.CONFLICT_409, when: 'The one-per-user preferences row already exists.' }],\n idempotent: false,\n },\n [Op.UPDATE]: {\n purpose: 'Correct selected preference blocks for an addressed user through the application-administration API. This cross-subject operation requires `APP_ADMIN_SUPER_ADMIN`; ordinary user changes use `USER_SELF_PREFERENCES`. Successful updates emit an audit event even below the automatic risk floor; marked privacy decision fields carry before/after values.',\n outcome: 'The selected blocks are replaced on the same preference document used by the self-service API, and the addressed user receives the updated state.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The addressed user’s preference document was updated and is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'A supplied preference block fails schema validation.' },\n { code: HttpResponseStatusCode.UNAUTHORIZED_401, when: 'The request carries no valid authenticated session.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller does not hold the application super-administrator role.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'The addressed user does not exist or has no preferences row because provisioning did not complete successfully.' },\n ],\n idempotent: true,\n examples: [\n {\n title: 'Correct the timezone used for a user’s scheduled work',\n request: {\n userId: USER_PREFERENCES_EXAMPLE_USER_ID,\n regional: {\n timezone: 'Europe/Paris',\n dateFormat: 'DD/MM/YYYY',\n timeFormat: '24h',\n locale: 'fr',\n },\n },\n response: userPreferencesApiReferenceExample,\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n communications: { notification: toast('FRONT_END_SUCCESS on UPDATE (runtime).') },\n },\n [Op.DELETE]: {\n purpose: 'Delete the preferences row as part of the trusted user-composition cascade.',\n outcome: 'The dependent preferences row is removed when its owning user is deleted.',\n responseStatuses: [{ code: HttpResponseStatusCode.OK_200, meaning: 'The internal lifecycle cascade deleted the preferences record.' }],\n errorScenarios: [],\n idempotent: true,\n },\n },\n\n businessConstraints: [\n 'Registry `resourcePrimaryScope` is `USER_SELF` from the `USERS → USER_PREFERENCES` composition rel — the document is user-anchored even when operators edit it in admin UIs.',\n 'The only HTTP variants are administrator-addressed READ and UPDATE. CREATE exists solely for eager `createAsSystem` provisioning; DELETE exists solely for the USERS composition cascade.',\n '`USER_PREFERENCES` and `USER_SELF_PREFERENCES` resolve to the SAME collection. Subject-facing READ, UPDATE and RESET_TO_DEFAULTS belong only to the self resource; this resource never republishes them under `/users/{userId}`.',\n 'Both administrative variants explicitly admit cross-subject user administration and retain independent APP_ADMIN role gates. The path user id selects the subject only after that authorization succeeds.',\n 'UPDATE accepts selected preference blocks, but a supplied block is validated as that block’s complete object. Send all fields of each block you change.',\n ],\n }),\n { resourcePrimaryScope: ResourcePrimaryScope.USER_SELF },\n ),\n () => ({\n layout: {\n purpose: 'Reuse the self-preference section structure (the admin preset sets its layout to the shared USER_SELF_PREFERENCES layout) so admin and user see identical field grouping: notifications/privacy/regional/language. UI theme is intentionally NOT a section here — the shared self-preferences layout omits it; theme is shown and edited only on the dedicated Appearance Settings-Hub panel. Sections carry a title and no description, as in the shared self layout. Do not re-add an appearance section unless the shared layout reintroduces the ref.',\n displayPurpose: 'Admin “Edit user preferences” or impersonation read-only view.',\n summaryPurpose: 'Time zone and primary language as bare values, shared with the self layout (theme and locale are left out: bare, they are ambiguous).',\n sections: {\n notifications: {\n purpose: 'The user\\u2019s two channel switches, email and in-app, then the table of kinds of notification they may silence, one switch per channel each kind uses (the same section the user edits, shared layout).',\n whenToUse: 'When support verifies notification storms or delivery issues.',\n textSlots: { title: { purpose: 'Notifications section label.' } },\n },\n privacy: {\n purpose: 'User privacy posture.',\n whenToUse: 'DSR and consent audits.',\n textSlots: { title: { purpose: 'Privacy section label.' } },\n },\n regional: {\n purpose: 'Timezone and formats.',\n whenToUse: 'Scheduling support cases.',\n textSlots: { title: { purpose: 'Regional label.' } },\n },\n language: {\n purpose: 'Language and fallback language stack.',\n whenToUse: 'i18n bug reports for a user.',\n textSlots: { title: { purpose: 'Language label.' } },\n },\n },\n },\n views: {\n [Op.READ]: {\n variants: {\n admin: {\n purpose: 'Read preferences through the only public variant on this resource: application administration.',\n whenToUse: 'Back-office user-preferences inspection without impersonating the user.',\n },\n },\n },\n [Op.UPDATE]: {\n variants: {\n admin: {\n purpose: 'Update preferences on behalf of the user (super-admin / support).',\n whenToUse: 'Impersonation or break-glass preference fixes.',\n },\n },\n },\n },\n }),\n);\n"]}
@@ -291,7 +291,7 @@ export const userProfilesResourceSpecification = resourceSpecificationFromFronte
291
291
  purpose: 'Delete the addressed profile. The normal variant removes the caller’s own profile; the administration variant removes another user’s profile.',
292
292
  outcome: 'The profile is removed and subsequent reads return 404 until a new profile is created.',
293
293
  responseStatuses: [
294
- { code: HttpResponseStatusCode.NO_CONTENT_204, meaning: 'The profile document was deleted; no body is returned.' },
294
+ { code: HttpResponseStatusCode.OK_200, meaning: 'The profile document was deleted; the body carries its `id`.' },
295
295
  ],
296
296
  errorScenarios: [
297
297
  { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The normal caller addresses another user, or the administration caller lacks profile-deletion authority.' },