@wildo-ai/saas-specifications 1.1.0 → 1.1.2

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 (423) hide show
  1. package/dist/assurance/external-framework-mapping.json +980 -0
  2. package/dist/esm/_core/brand/brand.family-aspects.d.ts +3 -0
  3. package/dist/esm/_core/brand/brand.family-aspects.d.ts.map +1 -0
  4. package/dist/esm/_core/brand/brand.family-aspects.js +51 -0
  5. package/dist/esm/_core/brand/brand.family-aspects.js.map +1 -0
  6. package/dist/esm/_core/build-plan/build-plan.family-aspects.d.ts +3 -0
  7. package/dist/esm/_core/build-plan/build-plan.family-aspects.d.ts.map +1 -0
  8. package/dist/esm/_core/build-plan/build-plan.family-aspects.js +28 -0
  9. package/dist/esm/_core/build-plan/build-plan.family-aspects.js.map +1 -0
  10. package/dist/esm/_core/business-model-lite/business-model.family-aspects.d.ts +3 -0
  11. package/dist/esm/_core/business-model-lite/business-model.family-aspects.d.ts.map +1 -0
  12. package/dist/esm/_core/business-model-lite/business-model.family-aspects.js +21 -0
  13. package/dist/esm/_core/business-model-lite/business-model.family-aspects.js.map +1 -0
  14. package/dist/esm/_core/chart-view-specification.schemas.d.ts +11 -0
  15. package/dist/esm/_core/chart-view-specification.schemas.d.ts.map +1 -1
  16. package/dist/esm/_core/chart-view-specification.schemas.js.map +1 -1
  17. package/dist/esm/_core/compliance-documents/compliance-document-candidate-generation.schemas.d.ts +85 -0
  18. package/dist/esm/_core/compliance-documents/compliance-document-candidate-generation.schemas.d.ts.map +1 -1
  19. package/dist/esm/_core/compliance-documents/compliance-document-candidate-generation.schemas.js +41 -0
  20. package/dist/esm/_core/compliance-documents/compliance-document-candidate-generation.schemas.js.map +1 -1
  21. package/dist/esm/_core/compliance-documents/compliance-document-candidate.schemas.d.ts +168 -2
  22. package/dist/esm/_core/compliance-documents/compliance-document-candidate.schemas.d.ts.map +1 -1
  23. package/dist/esm/_core/compliance-documents/compliance-document-candidate.schemas.js +98 -9
  24. package/dist/esm/_core/compliance-documents/compliance-document-candidate.schemas.js.map +1 -1
  25. package/dist/esm/_core/compliance-documents/compliance-documents.family-aspects.d.ts +12 -0
  26. package/dist/esm/_core/compliance-documents/compliance-documents.family-aspects.d.ts.map +1 -0
  27. package/dist/esm/_core/compliance-documents/compliance-documents.family-aspects.js +47 -0
  28. package/dist/esm/_core/compliance-documents/compliance-documents.family-aspects.js.map +1 -0
  29. package/dist/esm/_core/compliance-documents/document-fact-specification-generation.schemas.d.ts.map +1 -1
  30. package/dist/esm/_core/compliance-documents/document-fact-specification-generation.schemas.js +8 -3
  31. package/dist/esm/_core/compliance-documents/document-fact-specification-generation.schemas.js.map +1 -1
  32. package/dist/esm/_core/compliance-documents/processor-register.family-aspects.d.ts +21 -0
  33. package/dist/esm/_core/compliance-documents/processor-register.family-aspects.d.ts.map +1 -0
  34. package/dist/esm/_core/compliance-documents/processor-register.family-aspects.js +40 -0
  35. package/dist/esm/_core/compliance-documents/processor-register.family-aspects.js.map +1 -0
  36. package/dist/esm/_core/composite-view-specification.schemas.d.ts +11 -0
  37. package/dist/esm/_core/composite-view-specification.schemas.d.ts.map +1 -1
  38. package/dist/esm/_core/composite-view-specification.schemas.js.map +1 -1
  39. package/dist/esm/_core/domain-plan/domain-plan.family-aspects.d.ts +3 -0
  40. package/dist/esm/_core/domain-plan/domain-plan.family-aspects.d.ts.map +1 -0
  41. package/dist/esm/_core/domain-plan/domain-plan.family-aspects.js +32 -0
  42. package/dist/esm/_core/domain-plan/domain-plan.family-aspects.js.map +1 -0
  43. package/dist/esm/_core/execution-view-specification.schemas.d.ts +11 -0
  44. package/dist/esm/_core/execution-view-specification.schemas.d.ts.map +1 -1
  45. package/dist/esm/_core/execution-view-specification.schemas.js.map +1 -1
  46. package/dist/esm/_core/family-aspects.registry.d.ts +18 -0
  47. package/dist/esm/_core/family-aspects.registry.d.ts.map +1 -0
  48. package/dist/esm/_core/family-aspects.registry.js +60 -0
  49. package/dist/esm/_core/family-aspects.registry.js.map +1 -0
  50. package/dist/esm/_core/family-aspects.schemas.d.ts +122 -0
  51. package/dist/esm/_core/family-aspects.schemas.d.ts.map +1 -0
  52. package/dist/esm/_core/family-aspects.schemas.js +15 -0
  53. package/dist/esm/_core/family-aspects.schemas.js.map +1 -0
  54. package/dist/esm/_core/feature-drafts/capability-map-output-set-generation.schemas.d.ts +11 -11
  55. package/dist/esm/_core/feature-drafts/feature-drafts.family-aspects.d.ts +3 -0
  56. package/dist/esm/_core/feature-drafts/feature-drafts.family-aspects.d.ts.map +1 -0
  57. package/dist/esm/_core/feature-drafts/feature-drafts.family-aspects.js +25 -0
  58. package/dist/esm/_core/feature-drafts/feature-drafts.family-aspects.js.map +1 -0
  59. package/dist/esm/_core/flows-actors-view-specification.schemas.d.ts +11 -0
  60. package/dist/esm/_core/flows-actors-view-specification.schemas.d.ts.map +1 -1
  61. package/dist/esm/_core/flows-actors-view-specification.schemas.js.map +1 -1
  62. package/dist/esm/_core/frontend-component-specification.schemas.d.ts.map +1 -1
  63. package/dist/esm/_core/frontend-component-specification.schemas.js +19 -1
  64. package/dist/esm/_core/frontend-component-specification.schemas.js.map +1 -1
  65. package/dist/esm/_core/full-custom-view-specification.schemas.d.ts +11 -0
  66. package/dist/esm/_core/full-custom-view-specification.schemas.d.ts.map +1 -1
  67. package/dist/esm/_core/full-custom-view-specification.schemas.js.map +1 -1
  68. package/dist/esm/_core/guidance-flow-specification.schemas.d.ts +11 -0
  69. package/dist/esm/_core/guidance-flow-specification.schemas.d.ts.map +1 -1
  70. package/dist/esm/_core/guidance-flow-specification.schemas.js +14 -0
  71. package/dist/esm/_core/guidance-flow-specification.schemas.js.map +1 -1
  72. package/dist/esm/_core/index.d.ts +2 -0
  73. package/dist/esm/_core/index.d.ts.map +1 -1
  74. package/dist/esm/_core/index.js +2 -0
  75. package/dist/esm/_core/index.js.map +1 -1
  76. package/dist/esm/_core/market/market-snapshot-generation.schemas.d.ts +22 -22
  77. package/dist/esm/_core/market/market.family-aspects.d.ts +9 -0
  78. package/dist/esm/_core/market/market.family-aspects.d.ts.map +1 -0
  79. package/dist/esm/_core/market/market.family-aspects.js +227 -0
  80. package/dist/esm/_core/market/market.family-aspects.js.map +1 -0
  81. package/dist/esm/_core/onboarding-view-specification.schemas.d.ts +11 -0
  82. package/dist/esm/_core/onboarding-view-specification.schemas.d.ts.map +1 -1
  83. package/dist/esm/_core/onboarding-view-specification.schemas.js +14 -0
  84. package/dist/esm/_core/onboarding-view-specification.schemas.js.map +1 -1
  85. package/dist/esm/_core/placement-plan/placement-plan.family-aspects.d.ts +3 -0
  86. package/dist/esm/_core/placement-plan/placement-plan.family-aspects.d.ts.map +1 -0
  87. package/dist/esm/_core/placement-plan/placement-plan.family-aspects.js +31 -0
  88. package/dist/esm/_core/placement-plan/placement-plan.family-aspects.js.map +1 -0
  89. package/dist/esm/_core/requirements/requirements.family-aspects.d.ts +9 -0
  90. package/dist/esm/_core/requirements/requirements.family-aspects.d.ts.map +1 -0
  91. package/dist/esm/_core/requirements/requirements.family-aspects.js +40 -0
  92. package/dist/esm/_core/requirements/requirements.family-aspects.js.map +1 -0
  93. package/dist/esm/_core/resource-specification.schemas.d.ts +22 -0
  94. package/dist/esm/_core/resource-specification.schemas.d.ts.map +1 -1
  95. package/dist/esm/_core/resource-specification.schemas.js.map +1 -1
  96. package/dist/esm/_core/roadmap/roadmap.family-aspects.d.ts +3 -0
  97. package/dist/esm/_core/roadmap/roadmap.family-aspects.d.ts.map +1 -0
  98. package/dist/esm/_core/roadmap/roadmap.family-aspects.js +26 -0
  99. package/dist/esm/_core/roadmap/roadmap.family-aspects.js.map +1 -0
  100. package/dist/esm/_core/vision/vision.family-aspects.d.ts +11 -0
  101. package/dist/esm/_core/vision/vision.family-aspects.d.ts.map +1 -0
  102. package/dist/esm/_core/vision/vision.family-aspects.js +63 -0
  103. package/dist/esm/_core/vision/vision.family-aspects.js.map +1 -0
  104. package/dist/esm/application-creation/application-document-fact-specification.application-creation.schemas.d.ts +188 -33
  105. package/dist/esm/application-creation/application-document-fact-specification.application-creation.schemas.d.ts.map +1 -1
  106. package/dist/esm/application-creation/application-document-fact-specification.application-creation.schemas.js +158 -57
  107. package/dist/esm/application-creation/application-document-fact-specification.application-creation.schemas.js.map +1 -1
  108. package/dist/esm/application-creation/application-specification-family-identity.application-creation.schemas.d.ts +38 -4
  109. package/dist/esm/application-creation/application-specification-family-identity.application-creation.schemas.d.ts.map +1 -1
  110. package/dist/esm/application-creation/application-specification-family-identity.application-creation.schemas.js +37 -3
  111. package/dist/esm/application-creation/application-specification-family-identity.application-creation.schemas.js.map +1 -1
  112. package/dist/esm/application-creation/document-facts.family-aspects.d.ts +12 -0
  113. package/dist/esm/application-creation/document-facts.family-aspects.d.ts.map +1 -0
  114. package/dist/esm/application-creation/document-facts.family-aspects.js +37 -0
  115. package/dist/esm/application-creation/document-facts.family-aspects.js.map +1 -0
  116. package/dist/esm/application-creation/document-release-policy.family-aspects.d.ts +3 -0
  117. package/dist/esm/application-creation/document-release-policy.family-aspects.d.ts.map +1 -0
  118. package/dist/esm/application-creation/document-release-policy.family-aspects.js +23 -0
  119. package/dist/esm/application-creation/document-release-policy.family-aspects.js.map +1 -0
  120. package/dist/esm/application-creation/playbooks.application-creation.schemas.d.ts +93 -62
  121. package/dist/esm/application-creation/playbooks.application-creation.schemas.d.ts.map +1 -1
  122. package/dist/esm/application-creation/playbooks.application-creation.schemas.js +114 -59
  123. package/dist/esm/application-creation/playbooks.application-creation.schemas.js.map +1 -1
  124. package/dist/esm/application-creation/structured-artifact-landing.application-creation.schemas.d.ts +2 -0
  125. package/dist/esm/application-creation/structured-artifact-landing.application-creation.schemas.d.ts.map +1 -1
  126. package/dist/esm/application-creation/structured-artifact-landing.application-creation.schemas.js +2 -0
  127. package/dist/esm/application-creation/structured-artifact-landing.application-creation.schemas.js.map +1 -1
  128. package/dist/esm/application-creation.exports.d.ts +11 -0
  129. package/dist/esm/application-creation.exports.d.ts.map +1 -1
  130. package/dist/esm/application-creation.exports.js +11 -0
  131. package/dist/esm/application-creation.exports.js.map +1 -1
  132. package/dist/esm/assurance/assurance-authority-basis.definitions.d.ts +976 -2
  133. package/dist/esm/assurance/assurance-authority-basis.definitions.d.ts.map +1 -1
  134. package/dist/esm/assurance/assurance-authority-basis.definitions.js +2026 -61
  135. package/dist/esm/assurance/assurance-authority-basis.definitions.js.map +1 -1
  136. package/dist/esm/assurance/assurance-authority-basis.schemas.d.ts +1 -0
  137. package/dist/esm/assurance/assurance-authority-basis.schemas.d.ts.map +1 -1
  138. package/dist/esm/assurance/assurance-document-system.definitions.d.ts.map +1 -1
  139. package/dist/esm/assurance/assurance-document-system.definitions.js +18 -3
  140. package/dist/esm/assurance/assurance-document-system.definitions.js.map +1 -1
  141. package/dist/esm/assurance/assurance-document-system.schemas.d.ts +32 -2
  142. package/dist/esm/assurance/assurance-document-system.schemas.d.ts.map +1 -1
  143. package/dist/esm/assurance/assurance-document-system.schemas.js +32 -2
  144. package/dist/esm/assurance/assurance-document-system.schemas.js.map +1 -1
  145. package/dist/esm/assurance/assurance-external-framework-mapping.d.ts +90 -0
  146. package/dist/esm/assurance/assurance-external-framework-mapping.d.ts.map +1 -0
  147. package/dist/esm/assurance/assurance-external-framework-mapping.js +134 -0
  148. package/dist/esm/assurance/assurance-external-framework-mapping.js.map +1 -0
  149. package/dist/esm/assurance/assurance-objective-catalog.definitions.d.ts +71 -1
  150. package/dist/esm/assurance/assurance-objective-catalog.definitions.d.ts.map +1 -1
  151. package/dist/esm/assurance/assurance-objective-catalog.definitions.js +545 -5
  152. package/dist/esm/assurance/assurance-objective-catalog.definitions.js.map +1 -1
  153. package/dist/esm/assurance/assurance-program-generation.schemas.d.ts +141 -0
  154. package/dist/esm/assurance/assurance-program-generation.schemas.d.ts.map +1 -0
  155. package/dist/esm/assurance/assurance-program-generation.schemas.js +377 -0
  156. package/dist/esm/assurance/assurance-program-generation.schemas.js.map +1 -0
  157. package/dist/esm/assurance/assurance-program.family-aspects.d.ts +13 -0
  158. package/dist/esm/assurance/assurance-program.family-aspects.d.ts.map +1 -0
  159. package/dist/esm/assurance/assurance-program.family-aspects.js +16 -0
  160. package/dist/esm/assurance/assurance-program.family-aspects.js.map +1 -0
  161. package/dist/esm/assurance/assurance-program.schemas.d.ts +30 -6
  162. package/dist/esm/assurance/assurance-program.schemas.d.ts.map +1 -1
  163. package/dist/esm/assurance/assurance-program.schemas.js +29 -6
  164. package/dist/esm/assurance/assurance-program.schemas.js.map +1 -1
  165. package/dist/esm/assurance/assurance-source-registry.definitions.d.ts +1 -0
  166. package/dist/esm/assurance/assurance-source-registry.definitions.d.ts.map +1 -1
  167. package/dist/esm/assurance/assurance-source-registry.definitions.js +12 -0
  168. package/dist/esm/assurance/assurance-source-registry.definitions.js.map +1 -1
  169. package/dist/esm/assurance/assurance-sources.schemas.d.ts +76 -0
  170. package/dist/esm/assurance/assurance-sources.schemas.d.ts.map +1 -1
  171. package/dist/esm/assurance/assurance-sources.schemas.js +59 -0
  172. package/dist/esm/assurance/assurance-sources.schemas.js.map +1 -1
  173. package/dist/esm/assurance/document-publication.family-aspects.d.ts +29 -0
  174. package/dist/esm/assurance/document-publication.family-aspects.d.ts.map +1 -0
  175. package/dist/esm/assurance/document-publication.family-aspects.js +48 -0
  176. package/dist/esm/assurance/document-publication.family-aspects.js.map +1 -0
  177. package/dist/esm/assurance.exports.d.ts +2 -0
  178. package/dist/esm/assurance.exports.d.ts.map +1 -1
  179. package/dist/esm/assurance.exports.js +2 -0
  180. package/dist/esm/assurance.exports.js.map +1 -1
  181. package/dist/esm/companion-exports.d.ts +19 -2
  182. package/dist/esm/companion-exports.d.ts.map +1 -1
  183. package/dist/esm/companion-exports.js.map +1 -1
  184. package/dist/esm/engine/applications/resources/application-api-keys.resource.specification.d.ts.map +1 -1
  185. package/dist/esm/engine/applications/resources/application-api-keys.resource.specification.js +2 -0
  186. package/dist/esm/engine/applications/resources/application-api-keys.resource.specification.js.map +1 -1
  187. package/dist/esm/engine/applications/resources/application-metadata.resource.specification.d.ts.map +1 -1
  188. package/dist/esm/engine/applications/resources/application-metadata.resource.specification.js +3 -1
  189. package/dist/esm/engine/applications/resources/application-metadata.resource.specification.js.map +1 -1
  190. package/dist/esm/engine/applications/resources/application-oauth-clients.resource.specification.d.ts.map +1 -1
  191. package/dist/esm/engine/applications/resources/application-oauth-clients.resource.specification.js +3 -1
  192. package/dist/esm/engine/applications/resources/application-oauth-clients.resource.specification.js.map +1 -1
  193. package/dist/esm/engine/applications/resources/application-versions.resource.specification.d.ts.map +1 -1
  194. package/dist/esm/engine/applications/resources/application-versions.resource.specification.js +3 -1
  195. package/dist/esm/engine/applications/resources/application-versions.resource.specification.js.map +1 -1
  196. package/dist/esm/engine/applications/resources/applications.resource.specification.d.ts.map +1 -1
  197. package/dist/esm/engine/applications/resources/applications.resource.specification.js +3 -1
  198. package/dist/esm/engine/applications/resources/applications.resource.specification.js.map +1 -1
  199. package/dist/esm/engine/auth/resources/consumable-tokens.resource.specification.d.ts +36 -0
  200. package/dist/esm/engine/auth/resources/consumable-tokens.resource.specification.d.ts.map +1 -0
  201. package/dist/esm/engine/auth/resources/consumable-tokens.resource.specification.js +193 -0
  202. package/dist/esm/engine/auth/resources/consumable-tokens.resource.specification.js.map +1 -0
  203. package/dist/esm/engine/auth/resources/oauth-consent-grants.resource.specification.d.ts +1 -1
  204. package/dist/esm/engine/auth/resources/oauth-consent-grants.resource.specification.d.ts.map +1 -1
  205. package/dist/esm/engine/auth/resources/oauth-consent-grants.resource.specification.js +2 -0
  206. package/dist/esm/engine/auth/resources/oauth-consent-grants.resource.specification.js.map +1 -1
  207. package/dist/esm/engine/auth/resources/organization-api-keys.resource.specification.d.ts.map +1 -1
  208. package/dist/esm/engine/auth/resources/organization-api-keys.resource.specification.js +2 -0
  209. package/dist/esm/engine/auth/resources/organization-api-keys.resource.specification.js.map +1 -1
  210. package/dist/esm/engine/auth/resources/organization-oauth-clients.resource.specification.d.ts.map +1 -1
  211. package/dist/esm/engine/auth/resources/organization-oauth-clients.resource.specification.js +3 -1
  212. package/dist/esm/engine/auth/resources/organization-oauth-clients.resource.specification.js.map +1 -1
  213. package/dist/esm/engine/auth/resources/platform-access-grants.resource.specification.d.ts +1 -1
  214. package/dist/esm/engine/auth/resources/platform-access-grants.resource.specification.d.ts.map +1 -1
  215. package/dist/esm/engine/auth/resources/platform-access-grants.resource.specification.js +2 -0
  216. package/dist/esm/engine/auth/resources/platform-access-grants.resource.specification.js.map +1 -1
  217. package/dist/esm/engine/auth/resources/scim-provisioning-config.resource.specification.d.ts.map +1 -1
  218. package/dist/esm/engine/auth/resources/scim-provisioning-config.resource.specification.js +2 -0
  219. package/dist/esm/engine/auth/resources/scim-provisioning-config.resource.specification.js.map +1 -1
  220. package/dist/esm/engine/auth/resources/scim-tokens.resource.specification.d.ts.map +1 -1
  221. package/dist/esm/engine/auth/resources/scim-tokens.resource.specification.js +2 -0
  222. package/dist/esm/engine/auth/resources/scim-tokens.resource.specification.js.map +1 -1
  223. package/dist/esm/engine/auth/resources/siem-delivery-dlq.resource.specification.d.ts.map +1 -1
  224. package/dist/esm/engine/auth/resources/siem-delivery-dlq.resource.specification.js +2 -0
  225. package/dist/esm/engine/auth/resources/siem-delivery-dlq.resource.specification.js.map +1 -1
  226. package/dist/esm/engine/auth/resources/siem-export-config.resource.specification.d.ts.map +1 -1
  227. package/dist/esm/engine/auth/resources/siem-export-config.resource.specification.js +6 -4
  228. package/dist/esm/engine/auth/resources/siem-export-config.resource.specification.js.map +1 -1
  229. package/dist/esm/engine/auth/resources/sso-config.resource.specification.d.ts.map +1 -1
  230. package/dist/esm/engine/auth/resources/sso-config.resource.specification.js +2 -0
  231. package/dist/esm/engine/auth/resources/sso-config.resource.specification.js.map +1 -1
  232. package/dist/esm/engine/auth/resources/sso-connections.resource.specification.d.ts.map +1 -1
  233. package/dist/esm/engine/auth/resources/sso-connections.resource.specification.js +2 -0
  234. package/dist/esm/engine/auth/resources/sso-connections.resource.specification.js.map +1 -1
  235. package/dist/esm/engine/billing/resources/billing-accounts.resource.specification.d.ts +2 -2
  236. package/dist/esm/engine/billing/resources/billing-accounts.resource.specification.d.ts.map +1 -1
  237. package/dist/esm/engine/billing/resources/billing-accounts.resource.specification.js +2 -0
  238. package/dist/esm/engine/billing/resources/billing-accounts.resource.specification.js.map +1 -1
  239. package/dist/esm/engine/billing/resources/credit-pools.resource.specification.d.ts +8 -8
  240. package/dist/esm/engine/billing/resources/credit-pools.resource.specification.d.ts.map +1 -1
  241. package/dist/esm/engine/billing/resources/credit-pools.resource.specification.js +2 -0
  242. package/dist/esm/engine/billing/resources/credit-pools.resource.specification.js.map +1 -1
  243. package/dist/esm/engine/billing/resources/invoice-refs.resource.specification.d.ts +2 -2
  244. package/dist/esm/engine/billing/resources/invoice-refs.resource.specification.d.ts.map +1 -1
  245. package/dist/esm/engine/billing/resources/invoice-refs.resource.specification.js +2 -0
  246. package/dist/esm/engine/billing/resources/invoice-refs.resource.specification.js.map +1 -1
  247. package/dist/esm/engine/billing/resources/prices.resource.specification.d.ts.map +1 -1
  248. package/dist/esm/engine/billing/resources/prices.resource.specification.js +3 -1
  249. package/dist/esm/engine/billing/resources/prices.resource.specification.js.map +1 -1
  250. package/dist/esm/engine/billing/resources/products.resource.specification.d.ts.map +1 -1
  251. package/dist/esm/engine/billing/resources/products.resource.specification.js +3 -1
  252. package/dist/esm/engine/billing/resources/products.resource.specification.js.map +1 -1
  253. package/dist/esm/engine/billing/resources/promotions.resource.specification.d.ts.map +1 -1
  254. package/dist/esm/engine/billing/resources/promotions.resource.specification.js +2 -0
  255. package/dist/esm/engine/billing/resources/promotions.resource.specification.js.map +1 -1
  256. package/dist/esm/engine/billing/resources/referrals.resource.specification.d.ts.map +1 -1
  257. package/dist/esm/engine/billing/resources/referrals.resource.specification.js +3 -1
  258. package/dist/esm/engine/billing/resources/referrals.resource.specification.js.map +1 -1
  259. package/dist/esm/engine/billing/resources/subscriptions.resource.specification.d.ts +6 -6
  260. package/dist/esm/engine/billing/resources/subscriptions.resource.specification.d.ts.map +1 -1
  261. package/dist/esm/engine/billing/resources/subscriptions.resource.specification.js +2 -0
  262. package/dist/esm/engine/billing/resources/subscriptions.resource.specification.js.map +1 -1
  263. package/dist/esm/engine/billing/resources/usage-records.resource.specification.d.ts +6 -6
  264. package/dist/esm/engine/billing/resources/usage-records.resource.specification.d.ts.map +1 -1
  265. package/dist/esm/engine/billing/resources/usage-records.resource.specification.js +2 -0
  266. package/dist/esm/engine/billing/resources/usage-records.resource.specification.js.map +1 -1
  267. package/dist/esm/engine/compliance/resources/audit-logs.resource.specification.d.ts.map +1 -1
  268. package/dist/esm/engine/compliance/resources/audit-logs.resource.specification.js +2 -0
  269. package/dist/esm/engine/compliance/resources/audit-logs.resource.specification.js.map +1 -1
  270. package/dist/esm/engine/engine-resource-specifications.registry.d.ts.map +1 -1
  271. package/dist/esm/engine/engine-resource-specifications.registry.js +5 -0
  272. package/dist/esm/engine/engine-resource-specifications.registry.js.map +1 -1
  273. package/dist/esm/engine/engine-resource-sub-domain.d.ts +63 -0
  274. package/dist/esm/engine/engine-resource-sub-domain.d.ts.map +1 -0
  275. package/dist/esm/engine/engine-resource-sub-domain.js +87 -0
  276. package/dist/esm/engine/engine-resource-sub-domain.js.map +1 -0
  277. package/dist/esm/engine/errors/error-messages.specification.d.ts.map +1 -1
  278. package/dist/esm/engine/errors/error-messages.specification.js +30 -1
  279. package/dist/esm/engine/errors/error-messages.specification.js.map +1 -1
  280. package/dist/esm/engine/features/resources/application-features.resource.specification.d.ts.map +1 -1
  281. package/dist/esm/engine/features/resources/application-features.resource.specification.js +2 -0
  282. package/dist/esm/engine/features/resources/application-features.resource.specification.js.map +1 -1
  283. package/dist/esm/engine/features/resources/organization-features.resource.specification.d.ts.map +1 -1
  284. package/dist/esm/engine/features/resources/organization-features.resource.specification.js +2 -0
  285. package/dist/esm/engine/features/resources/organization-features.resource.specification.js.map +1 -1
  286. package/dist/esm/engine/features/resources/user-features.resource.specification.d.ts +1 -1
  287. package/dist/esm/engine/features/resources/user-features.resource.specification.d.ts.map +1 -1
  288. package/dist/esm/engine/features/resources/user-features.resource.specification.js +2 -0
  289. package/dist/esm/engine/features/resources/user-features.resource.specification.js.map +1 -1
  290. package/dist/esm/engine/files/resources/files.resource.specification.d.ts.map +1 -1
  291. package/dist/esm/engine/files/resources/files.resource.specification.js +2 -0
  292. package/dist/esm/engine/files/resources/files.resource.specification.js.map +1 -1
  293. package/dist/esm/engine/flows-actors/resources/a2a-push-delivery-log.resource.specification.d.ts +3 -3
  294. package/dist/esm/engine/flows-actors/resources/a2a-push-delivery-log.resource.specification.d.ts.map +1 -1
  295. package/dist/esm/engine/flows-actors/resources/a2a-push-delivery-log.resource.specification.js +12 -0
  296. package/dist/esm/engine/flows-actors/resources/a2a-push-delivery-log.resource.specification.js.map +1 -1
  297. package/dist/esm/engine/flows-actors/resources/a2a-token-budget-state.resource.specification.d.ts +3 -3
  298. package/dist/esm/engine/flows-actors/resources/a2a-token-budget-state.resource.specification.d.ts.map +1 -1
  299. package/dist/esm/engine/flows-actors/resources/a2a-token-budget-state.resource.specification.js +2 -0
  300. package/dist/esm/engine/flows-actors/resources/a2a-token-budget-state.resource.specification.js.map +1 -1
  301. package/dist/esm/engine/flows-actors/resources/flow-actor-executions.resource.specification.d.ts +3 -3
  302. package/dist/esm/engine/flows-actors/resources/flow-actor-executions.resource.specification.d.ts.map +1 -1
  303. package/dist/esm/engine/flows-actors/resources/flow-actor-executions.resource.specification.js +2 -0
  304. package/dist/esm/engine/flows-actors/resources/flow-actor-executions.resource.specification.js.map +1 -1
  305. package/dist/esm/engine/flows-actors/resources/flow-actor-tasks.resource.specification.d.ts +3 -3
  306. package/dist/esm/engine/flows-actors/resources/flow-actor-tasks.resource.specification.d.ts.map +1 -1
  307. package/dist/esm/engine/flows-actors/resources/flow-actor-tasks.resource.specification.js +3 -1
  308. package/dist/esm/engine/flows-actors/resources/flow-actor-tasks.resource.specification.js.map +1 -1
  309. package/dist/esm/engine/frontend-components/app/public-layout-main-container.frontend-component.specification.d.ts.map +1 -1
  310. package/dist/esm/engine/frontend-components/app/public-layout-main-container.frontend-component.specification.js +8 -3
  311. package/dist/esm/engine/frontend-components/app/public-layout-main-container.frontend-component.specification.js.map +1 -1
  312. package/dist/esm/engine/guidance/resources/guidance-state.resource.specification.d.ts +1 -1
  313. package/dist/esm/engine/guidance/resources/guidance-state.resource.specification.d.ts.map +1 -1
  314. package/dist/esm/engine/guidance/resources/guidance-state.resource.specification.js +3 -0
  315. package/dist/esm/engine/guidance/resources/guidance-state.resource.specification.js.map +1 -1
  316. package/dist/esm/engine/guidance/resources/lifecycle-state.resource.specification.d.ts +1 -1
  317. package/dist/esm/engine/guidance/resources/lifecycle-state.resource.specification.d.ts.map +1 -1
  318. package/dist/esm/engine/guidance/resources/lifecycle-state.resource.specification.js +3 -0
  319. package/dist/esm/engine/guidance/resources/lifecycle-state.resource.specification.js.map +1 -1
  320. package/dist/esm/engine/guidance/resources/progression-state.resource.specification.d.ts +1 -1
  321. package/dist/esm/engine/guidance/resources/progression-state.resource.specification.d.ts.map +1 -1
  322. package/dist/esm/engine/guidance/resources/progression-state.resource.specification.js +3 -0
  323. package/dist/esm/engine/guidance/resources/progression-state.resource.specification.js.map +1 -1
  324. package/dist/esm/engine/index.d.ts +1 -0
  325. package/dist/esm/engine/index.d.ts.map +1 -1
  326. package/dist/esm/engine/index.js +1 -0
  327. package/dist/esm/engine/index.js.map +1 -1
  328. package/dist/esm/engine/infrastructure/resources/data-seed-runs.resource.specification.d.ts.map +1 -1
  329. package/dist/esm/engine/infrastructure/resources/data-seed-runs.resource.specification.js +2 -0
  330. package/dist/esm/engine/infrastructure/resources/data-seed-runs.resource.specification.js.map +1 -1
  331. package/dist/esm/engine/infrastructure/resources/external-data-pipeline-states.resource.specification.d.ts.map +1 -1
  332. package/dist/esm/engine/infrastructure/resources/external-data-pipeline-states.resource.specification.js +2 -0
  333. package/dist/esm/engine/infrastructure/resources/external-data-pipeline-states.resource.specification.js.map +1 -1
  334. package/dist/esm/engine/infrastructure/resources/job-executions.resource.specification.d.ts.map +1 -1
  335. package/dist/esm/engine/infrastructure/resources/job-executions.resource.specification.js +2 -0
  336. package/dist/esm/engine/infrastructure/resources/job-executions.resource.specification.js.map +1 -1
  337. package/dist/esm/engine/infrastructure/resources/job-payload-storage.resource.specification.d.ts.map +1 -1
  338. package/dist/esm/engine/infrastructure/resources/job-payload-storage.resource.specification.js +2 -0
  339. package/dist/esm/engine/infrastructure/resources/job-payload-storage.resource.specification.js.map +1 -1
  340. package/dist/esm/engine/notifications/resources/m2m-webhook-delivery-log.resource.specification.d.ts.map +1 -1
  341. package/dist/esm/engine/notifications/resources/m2m-webhook-delivery-log.resource.specification.js +2 -0
  342. package/dist/esm/engine/notifications/resources/m2m-webhook-delivery-log.resource.specification.js.map +1 -1
  343. package/dist/esm/engine/notifications/resources/notification-badges.resource.specification.d.ts +1 -1
  344. package/dist/esm/engine/notifications/resources/notification-badges.resource.specification.d.ts.map +1 -1
  345. package/dist/esm/engine/notifications/resources/notification-badges.resource.specification.js +3 -0
  346. package/dist/esm/engine/notifications/resources/notification-badges.resource.specification.js.map +1 -1
  347. package/dist/esm/engine/notifications/resources/webhook-config.resource.specification.d.ts.map +1 -1
  348. package/dist/esm/engine/notifications/resources/webhook-config.resource.specification.js +2 -0
  349. package/dist/esm/engine/notifications/resources/webhook-config.resource.specification.js.map +1 -1
  350. package/dist/esm/engine/organizations/resources/organization-members.resource.specification.d.ts +1 -1
  351. package/dist/esm/engine/organizations/resources/organization-members.resource.specification.d.ts.map +1 -1
  352. package/dist/esm/engine/organizations/resources/organization-members.resource.specification.js +2 -0
  353. package/dist/esm/engine/organizations/resources/organization-members.resource.specification.js.map +1 -1
  354. package/dist/esm/engine/organizations/resources/organization-notifications.resource.specification.d.ts.map +1 -1
  355. package/dist/esm/engine/organizations/resources/organization-notifications.resource.specification.js +2 -0
  356. package/dist/esm/engine/organizations/resources/organization-notifications.resource.specification.js.map +1 -1
  357. package/dist/esm/engine/organizations/resources/organization-preferences.resource.specification.d.ts.map +1 -1
  358. package/dist/esm/engine/organizations/resources/organization-preferences.resource.specification.js +2 -0
  359. package/dist/esm/engine/organizations/resources/organization-preferences.resource.specification.js.map +1 -1
  360. package/dist/esm/engine/organizations/resources/organization-profiles.resource.specification.d.ts.map +1 -1
  361. package/dist/esm/engine/organizations/resources/organization-profiles.resource.specification.js +2 -0
  362. package/dist/esm/engine/organizations/resources/organization-profiles.resource.specification.js.map +1 -1
  363. package/dist/esm/engine/organizations/resources/organization-unit-members.resource.specification.d.ts.map +1 -1
  364. package/dist/esm/engine/organizations/resources/organization-unit-members.resource.specification.js +2 -0
  365. package/dist/esm/engine/organizations/resources/organization-unit-members.resource.specification.js.map +1 -1
  366. package/dist/esm/engine/organizations/resources/organization-units.resource.specification.d.ts.map +1 -1
  367. package/dist/esm/engine/organizations/resources/organization-units.resource.specification.js +2 -0
  368. package/dist/esm/engine/organizations/resources/organization-units.resource.specification.js.map +1 -1
  369. package/dist/esm/engine/organizations/resources/organizations.resource.specification.d.ts.map +1 -1
  370. package/dist/esm/engine/organizations/resources/organizations.resource.specification.js +2 -0
  371. package/dist/esm/engine/organizations/resources/organizations.resource.specification.js.map +1 -1
  372. package/dist/esm/engine/users/resources/anonymous-users.resource.specification.d.ts.map +1 -1
  373. package/dist/esm/engine/users/resources/anonymous-users.resource.specification.js +2 -0
  374. package/dist/esm/engine/users/resources/anonymous-users.resource.specification.js.map +1 -1
  375. package/dist/esm/engine/users/resources/inbound-contacts.resource.specification.d.ts +1 -1
  376. package/dist/esm/engine/users/resources/inbound-contacts.resource.specification.d.ts.map +1 -1
  377. package/dist/esm/engine/users/resources/inbound-contacts.resource.specification.js +2 -0
  378. package/dist/esm/engine/users/resources/inbound-contacts.resource.specification.js.map +1 -1
  379. package/dist/esm/engine/users/resources/user-credentials.resource.specification.d.ts +1 -1
  380. package/dist/esm/engine/users/resources/user-credentials.resource.specification.d.ts.map +1 -1
  381. package/dist/esm/engine/users/resources/user-credentials.resource.specification.js +2 -0
  382. package/dist/esm/engine/users/resources/user-credentials.resource.specification.js.map +1 -1
  383. package/dist/esm/engine/users/resources/user-identity-links.resource.specification.d.ts +1 -1
  384. package/dist/esm/engine/users/resources/user-identity-links.resource.specification.d.ts.map +1 -1
  385. package/dist/esm/engine/users/resources/user-identity-links.resource.specification.js +2 -0
  386. package/dist/esm/engine/users/resources/user-identity-links.resource.specification.js.map +1 -1
  387. package/dist/esm/engine/users/resources/user-preferences.resource.specification.d.ts +1 -1
  388. package/dist/esm/engine/users/resources/user-preferences.resource.specification.d.ts.map +1 -1
  389. package/dist/esm/engine/users/resources/user-preferences.resource.specification.js +2 -0
  390. package/dist/esm/engine/users/resources/user-preferences.resource.specification.js.map +1 -1
  391. package/dist/esm/engine/users/resources/user-profiles.resource.specification.d.ts +1 -1
  392. package/dist/esm/engine/users/resources/user-profiles.resource.specification.d.ts.map +1 -1
  393. package/dist/esm/engine/users/resources/user-profiles.resource.specification.js +2 -0
  394. package/dist/esm/engine/users/resources/user-profiles.resource.specification.js.map +1 -1
  395. package/dist/esm/engine/users/resources/user-self-preferences.resource.specification.d.ts +1 -1
  396. package/dist/esm/engine/users/resources/user-self-preferences.resource.specification.d.ts.map +1 -1
  397. package/dist/esm/engine/users/resources/user-self-preferences.resource.specification.js +2 -0
  398. package/dist/esm/engine/users/resources/user-self-preferences.resource.specification.js.map +1 -1
  399. package/dist/esm/engine/users/resources/user-self-profiles.resource.specification.d.ts +1 -1
  400. package/dist/esm/engine/users/resources/user-self-profiles.resource.specification.d.ts.map +1 -1
  401. package/dist/esm/engine/users/resources/user-self-profiles.resource.specification.js +2 -0
  402. package/dist/esm/engine/users/resources/user-self-profiles.resource.specification.js.map +1 -1
  403. package/dist/esm/engine/users/resources/user-self.resource.specification.d.ts.map +1 -1
  404. package/dist/esm/engine/users/resources/user-self.resource.specification.js +3 -1
  405. package/dist/esm/engine/users/resources/user-self.resource.specification.js.map +1 -1
  406. package/dist/esm/engine/users/resources/users.resource.specification.d.ts.map +1 -1
  407. package/dist/esm/engine/users/resources/users.resource.specification.js +2 -0
  408. package/dist/esm/engine/users/resources/users.resource.specification.js.map +1 -1
  409. package/dist/esm/technical-documentation/engine-documentation-specification-catalog.companion.d.ts +5 -0
  410. package/dist/esm/technical-documentation/engine-documentation-specification-catalog.companion.d.ts.map +1 -1
  411. package/dist/esm/technical-documentation/engine-documentation-specification-catalog.companion.js +385 -9
  412. package/dist/esm/technical-documentation/engine-documentation-specification-catalog.companion.js.map +1 -1
  413. package/dist/esm/technical-documentation/technical-documentation-units.schemas.js +1 -1
  414. package/dist/esm/technical-documentation/technical-documentation-units.schemas.js.map +1 -1
  415. package/dist/tsconfig.build.tsbuildinfo +1 -0
  416. package/package.json +8 -8
  417. package/dist/esm/.builder.pid +0 -9
  418. package/dist/esm/_core/business-coverage/coverage-findings-validation.d.ts +0 -0
  419. package/dist/esm/_core/business-coverage/coverage-findings-validation.d.ts.map +0 -0
  420. package/dist/esm/_core/business-coverage/coverage-findings-validation.js.map +0 -0
  421. package/dist/esm/_core/business-coverage/coverage-findings.schemas.d.ts +0 -0
  422. package/dist/esm/_core/business-coverage/coverage-findings.schemas.d.ts.map +0 -0
  423. package/dist/esm/_core/business-coverage/coverage-findings.schemas.js.map +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"user-profiles.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/users/resources/user-profiles.resource.specification.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,8BAA8B,IAAI,oCAAoC,EAAE,MAAM,8BAA8B,CAAC;AACtH,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,iBAAiB,EACjB,uBAAuB,EACvB,uDAAuD,IAAI,mBA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,EAAE;oBACL,OAAO,EAAE,uEAAuE;oBAChF,SAAS,EAAE,kDAAkD;iBAC9D;aACF;SACF;QACD,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE;YACX,QAAQ,EAAE;gBACR,KAAK,EAAE;oBACL,OAAO,EAAE,wDAAwD;oBACjE,SAAS,EAAE,6GAA6G;iBACzH;aACF;SACF;QACD,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE;YACX,QAAQ,EAAE;gBACR,KAAK,EAAE;oBACL,OAAO,EAAE,kDAAkD;oBAC3D,SAAS,EAAE,yEAAyE;iBACrF;aACF;SACF;QACD,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE;YACX,QAAQ,EAAE;gBACR,KAAK,EAAE;oBACL,OAAO,EAAE,oEAAoE;oBAC7E,SAAS,EAAE,yFAAyF;iBACrG;aACF;SACF;KACF;CACF,CAAC,CACH,CAAC","sourcesContent":["/**\n * Resource: `userProfiles` — Wildo SaaS engine specification (mixed, admin-leaning).\n * Same `UserProfileSchema` as `userSelfProfiles` but `CoreResourceType.USER_PROFILES` with org/admin variants.\n */\n\nimport { userProfilesResourceUIBehavior as userProfilesResourceUIBehaviorSource } 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 UserProfileSchema,\n UserProfiles_Operations,\n userProfilesResourceConfiguration_InitializationFactory as userProfilesFactory,\n} from '@wildo-ai/saas-models';\nimport {\n HttpResponseStatusCode,\n resourceFrontendConfiguration,\n resourceSpecification,\n resourceSpecificationFromFrontendConfiguration,\n} from '~wildo-specifications/_core';\n\nimport {\n selfServiceFrontEndSuccessNotification,\n} from './self-service-user-notifications.shared';\n\ntype Cfg = ReturnType<typeof userProfilesFactory>;\ntype Custom = NonNullable<Cfg['customOperation']>;\ntype Core = Cfg['coreOperations'][number];\ntype Main = Cfg['mainSchema'];\n\nconst userProfilesResourceUIBehavior = userProfilesResourceUIBehaviorSource as ResourceUIBehaviorConfig<\n Custom,\n Core,\n Main\n>;\n\nconst toast = (s: string) => selfServiceFrontEndSuccessNotification(s);\n\nconst USER_PROFILE_EXAMPLE = {\n _id: 'user_profile_01JEXAMPLE',\n userId: 'user_01JEXAMPLE',\n firstName: 'Ada',\n lastName: 'Lovelace',\n displayName: 'Ada Lovelace',\n avatar: {\n fileId: 'file_avatar_01JEXAMPLE',\n updatedAt: '2026-08-20T10:30:00.000Z',\n },\n bio: 'Leads platform integration architecture and developer enablement.',\n phoneNumber: '+352621123456',\n title: 'Staff Engineer',\n _version: 7,\n} as const;\n\nconst USER_PROFILE_CONTEXT_EXAMPLE = {\n ...USER_PROFILE_EXAMPLE,\n user: { _id: USER_PROFILE_EXAMPLE.userId },\n} as const;\n\nconst USER_PROFILE_SUMMARY_EXAMPLE = {\n _id: USER_PROFILE_EXAMPLE._id,\n userId: USER_PROFILE_EXAMPLE.userId,\n firstName: USER_PROFILE_EXAMPLE.firstName,\n lastName: USER_PROFILE_EXAMPLE.lastName,\n displayName: USER_PROFILE_EXAMPLE.displayName,\n _version: USER_PROFILE_EXAMPLE._version,\n} as const;\n\nconst USER_PROFILE_PAGE = {\n data: [USER_PROFILE_EXAMPLE],\n pagination: { page: 1, limit: 20, total: 1, totalPages: 1 },\n} as const;\n\nexport const userProfilesResourceSpecification = resourceSpecificationFromFrontendConfiguration(\n resourceFrontendConfiguration(userProfilesResourceUIBehavior),\n resourceSpecification(\n userProfilesFactory,\n UserProfileSchema,\n ({ schemaShape }) => ({\n purpose: 'The addressed user’s profile and contact card: name, display name, avatar, biography, phone number, and professional title.',\n businessRole: 'Use the normal API for a user’s own profile and the application-administration API to inspect or maintain another user’s profile.',\n lifecycleRole: 'One profile is created for each user, changes as their public or contact information changes, and is removed with that user or by an authorized administrator.',\n audience: LabelAudience.ADMIN,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'UserProfileSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactory: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'userProfilesResourceConfiguration_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_PROFILES',\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 customEnum: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'UserProfiles_Operations',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n frontendConfigurationSources: [\n {\n packageName: '@wildo-ai/presets-components',\n exportName: 'userProfilesResourceUIBehavior',\n symbolKind: CodeSymbolKind.UI_BEHAVIOR,\n },\n ],\n },\n\n fields: {\n _id: schemaShape._id.stringSpec({ meaning: 'Stable identifier of this profile document.', semanticRole: 'identifier', importance: FieldSemanticImportance.PRIMARY }),\n userId: schemaShape.userId.foreignKeySpec({\n meaning: 'Foreign key to the `users` row this profile document describes — immutable after create; profiles are keyed one-per-user.',\n whyItMatters: 'Binds the profile to one user so self-service and authorized administration address the same record without crossing tenant boundaries.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n firstName: schemaShape.firstName.stringSpec({ meaning: 'The user’s given name.', importance: FieldSemanticImportance.PRIMARY }),\n lastName: schemaShape.lastName.stringSpec({ meaning: 'The user’s family name.', importance: FieldSemanticImportance.PRIMARY }),\n displayName: schemaShape.displayName.stringSpec({ meaning: 'Optional name shown instead of composing the given and family names.' }),\n avatar: schemaShape.avatar.fileSpec({ meaning: 'Uploaded square profile image, represented by its managed file reference. External image URLs are not accepted.' }),\n bio: schemaShape.bio.stringSpec({ meaning: 'Optional short biography shown on the user’s profile.' }),\n phoneNumber: schemaShape.phoneNumber.stringSpec({ meaning: 'Optional contact number in E.164 international format. Storing it does not by itself prove possession of the number.', semanticRole: 'identifier' }),\n title: schemaShape.title.stringSpec({ meaning: 'Optional professional title shown in people and profile surfaces.' }),\n },\n\n operations: {\n [Op.READ]: {\n purpose: 'Read the profile belonging to the user identified in the route. The normal variant is self-scoped; the administration variant can address another user.',\n outcome: 'The user’s profile fields and current resource version are returned.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The profile document was found and returned with the field visibility of the active API variant.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The normal caller addresses another user, or the administration caller lacks application profile-viewing authority.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No profile document exists for the supplied id within the caller’s scope.' },\n ],\n idempotent: true,\n examples: [{\n title: 'Read your complete profile',\n request: { userId: USER_PROFILE_EXAMPLE.userId },\n response: USER_PROFILE_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n variants: {\n context: {\n examples: [{\n title: 'Read your profile with its user relationship',\n request: { userId: USER_PROFILE_EXAMPLE.userId },\n response: USER_PROFILE_CONTEXT_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n summary: {\n examples: [{\n title: 'Read your compact profile identity',\n request: { userId: USER_PROFILE_EXAMPLE.userId },\n response: USER_PROFILE_SUMMARY_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n admin: {\n examples: [{\n title: 'Inspect another user’s complete profile',\n request: { userId: USER_PROFILE_EXAMPLE.userId },\n response: USER_PROFILE_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n },\n [Op.SEARCH]: {\n purpose: 'Search profiles by name. The administration variant additionally matches phone numbers and permits a larger page size.',\n outcome: 'A paginated page of matching profile records is returned.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of profile rows matching the name search for the active API variant.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks access to search profiles through the selected normal or administration variant.' },\n ],\n idempotent: true,\n examples: [{\n title: 'Find a profile by name',\n request: {\n userId: USER_PROFILE_EXAMPLE.userId,\n q: 'Ada',\n page: 1,\n limit: 20,\n sort: 'lastName:asc',\n },\n response: USER_PROFILE_PAGE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n variants: {\n admin: {\n examples: [{\n title: 'Find a profile by contact number as an administrator',\n request: {\n userId: USER_PROFILE_EXAMPLE.userId,\n q: '+352621123456',\n page: 1,\n limit: 100,\n sort: 'lastName:asc',\n },\n response: {\n ...USER_PROFILE_PAGE,\n pagination: { ...USER_PROFILE_PAGE.pagination, limit: 100 },\n },\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n },\n [Op.CREATE]: {\n purpose: 'Create the addressed user’s profile. The normal variant creates the caller’s own profile; the administration variant provisions one for another existing user.',\n outcome: 'The new profile is returned with its server-assigned id and initial resource version.',\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'A profile document was created for the subject user and is returned with its server-assigned id.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The profile payload fails schema validation (for example, a required name is missing or `phoneNumber` is malformed).', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The normal caller addresses another user, or the administration caller lacks profile-provisioning authority.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'The referenced owning `userId` does not resolve to a known user.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'A profile document already exists for the supplied `userId` (profiles are keyed one-per-user).' },\n ],\n idempotent: false,\n examples: [\n {\n title: 'Create your own profile',\n request: {\n userId: USER_PROFILE_EXAMPLE.userId,\n firstName: USER_PROFILE_EXAMPLE.firstName,\n lastName: USER_PROFILE_EXAMPLE.lastName,\n displayName: USER_PROFILE_EXAMPLE.displayName,\n bio: USER_PROFILE_EXAMPLE.bio,\n phoneNumber: USER_PROFILE_EXAMPLE.phoneNumber,\n title: USER_PROFILE_EXAMPLE.title,\n },\n response: USER_PROFILE_EXAMPLE,\n forStatus: HttpResponseStatusCode.CREATED_201,\n },\n ],\n variants: {\n admin: {\n examples: [{\n title: 'Provision a profile for an existing user',\n request: {\n userId: USER_PROFILE_EXAMPLE.userId,\n firstName: USER_PROFILE_EXAMPLE.firstName,\n lastName: USER_PROFILE_EXAMPLE.lastName,\n displayName: USER_PROFILE_EXAMPLE.displayName,\n title: USER_PROFILE_EXAMPLE.title,\n },\n response: USER_PROFILE_EXAMPLE,\n forStatus: HttpResponseStatusCode.CREATED_201,\n }],\n },\n },\n communications: { notification: toast('The profile owner receives an in-app confirmation after the profile is created.') },\n },\n [Op.UPDATE]: {\n purpose: 'Replace one or more editable profile fields. The normal variant edits the caller’s profile; the administration variant edits another user’s profile.',\n outcome: 'The updated profile and its incremented resource version are returned.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The profile document was patched and the new state is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The edited profile fields fail schema validation.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The normal caller addresses another user, or the administration caller lacks profile-editing authority.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No profile document exists for the supplied id within the caller’s scope.' },\n ],\n idempotent: true,\n examples: [{\n title: 'Update your display name and biography',\n request: {\n userId: USER_PROFILE_EXAMPLE.userId,\n displayName: 'Ada L.',\n bio: 'Builds reliable application integrations and developer platforms.',\n },\n response: {\n ...USER_PROFILE_EXAMPLE,\n displayName: 'Ada L.',\n bio: 'Builds reliable application integrations and developer platforms.',\n _version: 8,\n },\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n variants: {\n admin: {\n examples: [{\n title: 'Correct another user’s professional title',\n request: {\n userId: USER_PROFILE_EXAMPLE.userId,\n title: 'Principal Engineer',\n },\n response: {\n ...USER_PROFILE_EXAMPLE,\n title: 'Principal Engineer',\n _version: 8,\n },\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n communications: { notification: toast('The profile owner receives an in-app confirmation after the profile is updated.') },\n },\n [Op.DELETE]: {\n purpose: 'Delete the addressed profile. The normal variant removes the caller’s own profile; the administration variant removes another user’s profile.',\n outcome: 'The profile is removed and subsequent reads return 404 until a new profile is created.',\n responseStatuses: [\n { code: HttpResponseStatusCode.NO_CONTENT_204, meaning: 'The profile document was deleted; no body is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The normal caller addresses another user, or the administration caller lacks profile-deletion authority.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No profile document exists for the supplied id (or it was already deleted).' },\n ],\n idempotent: true,\n communications: { notification: toast('The profile owner receives an in-app confirmation after the profile is deleted.') },\n },\n [UserProfiles_Operations.UPDATE_AVATAR]: {\n operationId: UserProfiles_Operations.UPDATE_AVATAR,\n purpose: 'Replace the caller’s avatar with an uploaded, application-managed image file.',\n outcome: 'The managed file reference is stored and the refreshed profile is returned.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The avatar file reference was updated and the refreshed profile is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The avatar is missing, is not a valid managed file reference, or violates the profile image constraints.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not the profile subject and lacks authority to change this profile’s avatar.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No profile document exists for the supplied id within the caller’s scope.' },\n ],\n idempotent: true,\n examples: [{\n title: 'Use an uploaded image as your avatar',\n request: {\n userId: USER_PROFILE_EXAMPLE.userId,\n avatar: {\n fileId: 'file_avatar_01JNEW',\n updatedAt: '2026-08-21T09:00:00.000Z',\n },\n },\n response: {\n ...USER_PROFILE_EXAMPLE,\n avatar: {\n fileId: 'file_avatar_01JNEW',\n updatedAt: '2026-08-21T09:00:00.000Z',\n },\n _version: 8,\n },\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n communications: { notification: toast('The profile owner receives an in-app confirmation after the avatar is updated.') },\n },\n [UserProfiles_Operations.REMOVE_AVATAR]: {\n operationId: UserProfiles_Operations.REMOVE_AVATAR,\n purpose: 'Reserved avatar-removal operation. It is not published as an application-consumer API capability while managed-file release is unimplemented.',\n outcome: 'Runtime requests fail closed; no profile or file reference is changed.',\n responseStatuses: [\n { code: HttpResponseStatusCode.INTERNAL_SERVER_ERROR_500, meaning: 'The acknowledged implementation gap refuses the request instead of reporting a successful no-op.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not the profile subject and lacks authority to clear this profile’s avatar.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No profile document exists for the supplied id within the caller’s scope.' },\n ],\n idempotent: true,\n },\n [UserProfiles_Operations.UPDATE_CONTACT_INFO]: {\n operationId: UserProfiles_Operations.UPDATE_CONTACT_INFO,\n purpose: 'Replace the caller’s profile contact number with a valid E.164 international number.',\n outcome: 'The new number is stored and the refreshed profile is returned. Number verification remains a separate authentication flow.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The contact fields were updated and the refreshed profile is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The supplied phone number is not a valid E.164 value or the contact payload fails validation.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not the profile subject and lacks authority to change this profile’s contact data.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No profile document exists for the supplied id within the caller’s scope.' },\n ],\n idempotent: true,\n examples: [{\n title: 'Update your contact number',\n request: {\n userId: USER_PROFILE_EXAMPLE.userId,\n phoneNumber: '+352621654321',\n },\n response: {\n ...USER_PROFILE_EXAMPLE,\n phoneNumber: '+352621654321',\n _version: 8,\n },\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n communications: { notification: toast('The profile owner receives an in-app confirmation after the contact number is updated.') },\n },\n },\n\n businessConstraints: [\n 'Registry scope resolves through the `USERS` composition edge — the spec’s `resourcePrimaryScope` is `USER_SELF` to match the self-anchor, even though the product copy talks about “org directory”.',\n 'Core operations in the factory register both a default `APP_USER` API variant and an `admin` API variant; the identity `userProfilesResourceUIBehavior` UI preset only hosts the `admin` operation keys in `views`, so `frontend.views` documents `admin` only. End-user “my profile” UI is covered by `USER_SELF_PROFILES`, not a `default` view row on this resource type.',\n 'Custom operations (`update_avatar` … `update_contact_info`) are `APP_USER`-only in the factory (no `admin` variant). They appear in `base.operations` for API and DF-1; the admin UI preset does not add view hosts for them (see `identity.resource-presets.tsx`).',\n 'Phone-number possession is NOT proved on this resource. There is no `verify_phone` custom operation: the challenge/response against an issued code is fully implemented in the auth subsystem by `AuthPhoneVerificationBackendService` (`PHONE_VERIFICATION` consumable tokens — single-use, 10-minute expiry — a constant-time code comparison, audit events on both the success and failure paths, and the verified state persisted through `setVerifiedPhone`), with `AuthMethod.SMS_OTP` covering the same proof as a first-or-second auth factor. `USER_SELF_PROFILES` dropped its equivalent op for the same reason, and an admin-directory resource is the wrong place regardless — an SMS code proves possession by the phone’s owner, not by the admin submitting it. `update_contact_info` changes the number; it does not attest it.',\n ],\n }),\n { resourcePrimaryScope: ResourcePrimaryScope.USER_SELF },\n ),\n () => ({\n layout: {\n // Admin `USER_PROFILES` reuses the self-profile layout verbatim\n // (`layout: main[USER_SELF_PROFILES].layout`), which is now a flat,\n // sectionless field list. `sections` must stay empty to match — the\n // structural-slot validator compares this against the SHARED merged layout\n // refs, so a documented section here would crash-loop the companion.\n purpose: 'Reuse the flat self-profile layout for admin/end-user parity — no section grouping.',\n displayPurpose: 'Directory detail drawer (admin) or people search result expansion.',\n summaryPurpose: 'Name and title in compact list rows.',\n sections: {},\n },\n views: {\n [Op.READ]: {\n variants: {\n admin: {\n purpose: 'Admin and elevated directory read — the identity preset only surfaces the `admin` operation variant for USER_PROFILES.',\n whenToUse: 'User management console, directory admin, and support workflows using `USER_PROFILES` (not the self `USER_SELF_PROFILES` type).',\n },\n },\n },\n [Op.SEARCH]: {\n variants: {\n admin: {\n purpose: 'Admin search with expanded searchable fields from the runtime config.',\n whenToUse: 'Compliance lookup and back-office people search.',\n },\n },\n },\n [Op.CREATE]: {\n variants: {\n admin: {\n purpose: 'Admin-provisioned profile creation (imports, support).',\n whenToUse: 'When operators create profile rows on behalf of users — the merged preset only exposes the `admin` variant.',\n },\n },\n },\n [Op.UPDATE]: {\n variants: {\n admin: {\n purpose: 'Admin update path for a user’s profile document.',\n whenToUse: 'Support edits and data-fix flows under super-admin or equivalent roles.',\n },\n },\n },\n [Op.DELETE]: {\n variants: {\n admin: {\n purpose: 'Admin deletion of a profile for compliance or offboarding support.',\n whenToUse: 'DSR, abuse, or org teardown — the preset surfaces only the `admin` delete variant here.',\n },\n },\n },\n },\n }),\n);\n"]}
1
+ {"version":3,"file":"user-profiles.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/users/resources/user-profiles.resource.specification.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,8BAA8B,IAAI,oCAAoC,EAAE,MAAM,8BAA8B,CAAC;AACtH,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAEpE,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,qBAA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T,QAAQ,EAAE;gBACR,KAAK,EAAE;oBACL,OAAO,EAAE,wHAAwH;oBACjI,SAAS,EAAE,iIAAiI;iBAC7I;aACF;SACF;QACD,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE;YACX,QAAQ,EAAE;gBACR,KAAK,EAAE;oBACL,OAAO,EAAE,uEAAuE;oBAChF,SAAS,EAAE,kDAAkD;iBAC9D;aACF;SACF;QACD,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE;YACX,QAAQ,EAAE;gBACR,KAAK,EAAE;oBACL,OAAO,EAAE,wDAAwD;oBACjE,SAAS,EAAE,6GAA6G;iBACzH;aACF;SACF;QACD,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE;YACX,QAAQ,EAAE;gBACR,KAAK,EAAE;oBACL,OAAO,EAAE,kDAAkD;oBAC3D,SAAS,EAAE,yEAAyE;iBACrF;aACF;SACF;QACD,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE;YACX,QAAQ,EAAE;gBACR,KAAK,EAAE;oBACL,OAAO,EAAE,oEAAoE;oBAC7E,SAAS,EAAE,yFAAyF;iBACrG;aACF;SACF;KACF;CACF,CAAC,CACH,CAAC","sourcesContent":["/**\n * Resource: `userProfiles` — Wildo SaaS engine specification (mixed, admin-leaning).\n * Same `UserProfileSchema` as `userSelfProfiles` but `CoreResourceType.USER_PROFILES` with org/admin variants.\n */\n\nimport { userProfilesResourceUIBehavior as userProfilesResourceUIBehaviorSource } 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 UserProfileSchema,\n UserProfiles_Operations,\n userProfilesResourceConfiguration_InitializationFactory as userProfilesFactory,\n} from '@wildo-ai/saas-models';\nimport {\n HttpResponseStatusCode,\n resourceFrontendConfiguration,\n resourceSpecification,\n resourceSpecificationFromFrontendConfiguration,\n} from '~wildo-specifications/_core';\n\nimport {\n selfServiceFrontEndSuccessNotification,\n} from './self-service-user-notifications.shared';\nimport { EngineResourceSubDomain } from '../../engine-resource-sub-domain';\n\ntype Cfg = ReturnType<typeof userProfilesFactory>;\ntype Custom = NonNullable<Cfg['customOperation']>;\ntype Core = Cfg['coreOperations'][number];\ntype Main = Cfg['mainSchema'];\n\nconst userProfilesResourceUIBehavior = userProfilesResourceUIBehaviorSource as ResourceUIBehaviorConfig<\n Custom,\n Core,\n Main\n>;\n\nconst toast = (s: string) => selfServiceFrontEndSuccessNotification(s);\n\nconst USER_PROFILE_EXAMPLE = {\n _id: 'user_profile_01JEXAMPLE',\n userId: 'user_01JEXAMPLE',\n firstName: 'Ada',\n lastName: 'Lovelace',\n displayName: 'Ada Lovelace',\n avatar: {\n fileId: 'file_avatar_01JEXAMPLE',\n updatedAt: '2026-08-20T10:30:00.000Z',\n },\n bio: 'Leads platform integration architecture and developer enablement.',\n phoneNumber: '+352621123456',\n title: 'Staff Engineer',\n _version: 7,\n} as const;\n\nconst USER_PROFILE_CONTEXT_EXAMPLE = {\n ...USER_PROFILE_EXAMPLE,\n user: { _id: USER_PROFILE_EXAMPLE.userId },\n} as const;\n\nconst USER_PROFILE_SUMMARY_EXAMPLE = {\n _id: USER_PROFILE_EXAMPLE._id,\n userId: USER_PROFILE_EXAMPLE.userId,\n firstName: USER_PROFILE_EXAMPLE.firstName,\n lastName: USER_PROFILE_EXAMPLE.lastName,\n displayName: USER_PROFILE_EXAMPLE.displayName,\n _version: USER_PROFILE_EXAMPLE._version,\n} as const;\n\nconst USER_PROFILE_PAGE = {\n data: [USER_PROFILE_EXAMPLE],\n pagination: { page: 1, limit: 20, total: 1, totalPages: 1 },\n} as const;\n\nexport const userProfilesResourceSpecification = resourceSpecificationFromFrontendConfiguration(\n resourceFrontendConfiguration(userProfilesResourceUIBehavior),\n resourceSpecification(\n userProfilesFactory,\n UserProfileSchema,\n ({ schemaShape }) => ({\n purpose: 'The addressed user’s profile and contact card: name, display name, avatar, biography, phone number, and professional title.',\n businessRole: 'Use the normal API for a user’s own profile and the application-administration API to inspect or maintain another user’s profile.',\n lifecycleRole: 'One profile is created for each user, changes as their public or contact information changes, and is removed with that user or by an authorized administrator.',\n audience: LabelAudience.ADMIN,\n subDomain: EngineResourceSubDomain.USERS,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'UserProfileSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactory: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'userProfilesResourceConfiguration_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_PROFILES',\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 customEnum: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'UserProfiles_Operations',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n frontendConfigurationSources: [\n {\n packageName: '@wildo-ai/presets-components',\n exportName: 'userProfilesResourceUIBehavior',\n symbolKind: CodeSymbolKind.UI_BEHAVIOR,\n },\n ],\n },\n\n fields: {\n _id: schemaShape._id.stringSpec({ meaning: 'Stable identifier of this profile document.', semanticRole: 'identifier', importance: FieldSemanticImportance.PRIMARY }),\n userId: schemaShape.userId.foreignKeySpec({\n meaning: 'Foreign key to the `users` row this profile document describes — immutable after create; profiles are keyed one-per-user.',\n whyItMatters: 'Binds the profile to one user so self-service and authorized administration address the same record without crossing tenant boundaries.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n firstName: schemaShape.firstName.stringSpec({ meaning: 'The user’s given name.', importance: FieldSemanticImportance.PRIMARY }),\n lastName: schemaShape.lastName.stringSpec({ meaning: 'The user’s family name.', importance: FieldSemanticImportance.PRIMARY }),\n displayName: schemaShape.displayName.stringSpec({ meaning: 'Optional name shown instead of composing the given and family names.' }),\n avatar: schemaShape.avatar.fileSpec({ meaning: 'Uploaded square profile image, represented by its managed file reference. External image URLs are not accepted.' }),\n bio: schemaShape.bio.stringSpec({ meaning: 'Optional short biography shown on the user’s profile.' }),\n phoneNumber: schemaShape.phoneNumber.stringSpec({ meaning: 'Optional contact number in E.164 international format. Storing it does not by itself prove possession of the number.', semanticRole: 'identifier' }),\n title: schemaShape.title.stringSpec({ meaning: 'Optional professional title shown in people and profile surfaces.' }),\n },\n\n operations: {\n [Op.READ]: {\n purpose: 'Read the profile belonging to the user identified in the route. The normal variant is self-scoped; the administration variant can address another user.',\n outcome: 'The user’s profile fields and current resource version are returned.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The profile document was found and returned with the field visibility of the active API variant.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The normal caller addresses another user, or the administration caller lacks application profile-viewing authority.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No profile document exists for the supplied id within the caller’s scope.' },\n ],\n idempotent: true,\n examples: [{\n title: 'Read your complete profile',\n request: { userId: USER_PROFILE_EXAMPLE.userId },\n response: USER_PROFILE_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n variants: {\n context: {\n examples: [{\n title: 'Read your profile with its user relationship',\n request: { userId: USER_PROFILE_EXAMPLE.userId },\n response: USER_PROFILE_CONTEXT_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n summary: {\n examples: [{\n title: 'Read your compact profile identity',\n request: { userId: USER_PROFILE_EXAMPLE.userId },\n response: USER_PROFILE_SUMMARY_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n admin: {\n examples: [{\n title: 'Inspect another user’s complete profile',\n request: { userId: USER_PROFILE_EXAMPLE.userId },\n response: USER_PROFILE_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n },\n [Op.SEARCH]: {\n purpose: 'Search profiles by name. The administration variant additionally matches phone numbers and permits a larger page size.',\n outcome: 'A paginated page of matching profile records is returned.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of profile rows matching the name search for the active API variant.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks access to search profiles through the selected normal or administration variant.' },\n ],\n idempotent: true,\n examples: [{\n title: 'Find a profile by name',\n request: {\n userId: USER_PROFILE_EXAMPLE.userId,\n q: 'Ada',\n page: 1,\n limit: 20,\n sort: 'lastName:asc',\n },\n response: USER_PROFILE_PAGE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n variants: {\n admin: {\n examples: [{\n title: 'Find a profile by contact number as an administrator',\n request: {\n userId: USER_PROFILE_EXAMPLE.userId,\n q: '+352621123456',\n page: 1,\n limit: 100,\n sort: 'lastName:asc',\n },\n response: {\n ...USER_PROFILE_PAGE,\n pagination: { ...USER_PROFILE_PAGE.pagination, limit: 100 },\n },\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n },\n [Op.CREATE]: {\n purpose: 'Create the addressed user’s profile. The normal variant creates the caller’s own profile; the administration variant provisions one for another existing user.',\n outcome: 'The new profile is returned with its server-assigned id and initial resource version.',\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'A profile document was created for the subject user and is returned with its server-assigned id.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The profile payload fails schema validation (for example, a required name is missing or `phoneNumber` is malformed).', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The normal caller addresses another user, or the administration caller lacks profile-provisioning authority.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'The referenced owning `userId` does not resolve to a known user.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'A profile document already exists for the supplied `userId` (profiles are keyed one-per-user).' },\n ],\n idempotent: false,\n examples: [\n {\n title: 'Create your own profile',\n request: {\n userId: USER_PROFILE_EXAMPLE.userId,\n firstName: USER_PROFILE_EXAMPLE.firstName,\n lastName: USER_PROFILE_EXAMPLE.lastName,\n displayName: USER_PROFILE_EXAMPLE.displayName,\n bio: USER_PROFILE_EXAMPLE.bio,\n phoneNumber: USER_PROFILE_EXAMPLE.phoneNumber,\n title: USER_PROFILE_EXAMPLE.title,\n },\n response: USER_PROFILE_EXAMPLE,\n forStatus: HttpResponseStatusCode.CREATED_201,\n },\n ],\n variants: {\n admin: {\n examples: [{\n title: 'Provision a profile for an existing user',\n request: {\n userId: USER_PROFILE_EXAMPLE.userId,\n firstName: USER_PROFILE_EXAMPLE.firstName,\n lastName: USER_PROFILE_EXAMPLE.lastName,\n displayName: USER_PROFILE_EXAMPLE.displayName,\n title: USER_PROFILE_EXAMPLE.title,\n },\n response: USER_PROFILE_EXAMPLE,\n forStatus: HttpResponseStatusCode.CREATED_201,\n }],\n },\n },\n communications: { notification: toast('The profile owner receives an in-app confirmation after the profile is created.') },\n },\n [Op.UPDATE]: {\n purpose: 'Replace one or more editable profile fields. The normal variant edits the caller’s profile; the administration variant edits another user’s profile.',\n outcome: 'The updated profile and its incremented resource version are returned.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The profile document was patched and the new state is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The edited profile fields fail schema validation.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The normal caller addresses another user, or the administration caller lacks profile-editing authority.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No profile document exists for the supplied id within the caller’s scope.' },\n ],\n idempotent: true,\n examples: [{\n title: 'Update your display name and biography',\n request: {\n userId: USER_PROFILE_EXAMPLE.userId,\n displayName: 'Ada L.',\n bio: 'Builds reliable application integrations and developer platforms.',\n },\n response: {\n ...USER_PROFILE_EXAMPLE,\n displayName: 'Ada L.',\n bio: 'Builds reliable application integrations and developer platforms.',\n _version: 8,\n },\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n variants: {\n admin: {\n examples: [{\n title: 'Correct another user’s professional title',\n request: {\n userId: USER_PROFILE_EXAMPLE.userId,\n title: 'Principal Engineer',\n },\n response: {\n ...USER_PROFILE_EXAMPLE,\n title: 'Principal Engineer',\n _version: 8,\n },\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n communications: { notification: toast('The profile owner receives an in-app confirmation after the profile is updated.') },\n },\n [Op.DELETE]: {\n purpose: 'Delete the addressed profile. The normal variant removes the caller’s own profile; the administration variant removes another user’s profile.',\n outcome: 'The profile is removed and subsequent reads return 404 until a new profile is created.',\n responseStatuses: [\n { code: HttpResponseStatusCode.NO_CONTENT_204, meaning: 'The profile document was deleted; no body is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The normal caller addresses another user, or the administration caller lacks profile-deletion authority.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No profile document exists for the supplied id (or it was already deleted).' },\n ],\n idempotent: true,\n communications: { notification: toast('The profile owner receives an in-app confirmation after the profile is deleted.') },\n },\n [UserProfiles_Operations.UPDATE_AVATAR]: {\n operationId: UserProfiles_Operations.UPDATE_AVATAR,\n purpose: 'Replace the caller’s avatar with an uploaded, application-managed image file.',\n outcome: 'The managed file reference is stored and the refreshed profile is returned.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The avatar file reference was updated and the refreshed profile is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The avatar is missing, is not a valid managed file reference, or violates the profile image constraints.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not the profile subject and lacks authority to change this profile’s avatar.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No profile document exists for the supplied id within the caller’s scope.' },\n ],\n idempotent: true,\n examples: [{\n title: 'Use an uploaded image as your avatar',\n request: {\n userId: USER_PROFILE_EXAMPLE.userId,\n avatar: {\n fileId: 'file_avatar_01JNEW',\n updatedAt: '2026-08-21T09:00:00.000Z',\n },\n },\n response: {\n ...USER_PROFILE_EXAMPLE,\n avatar: {\n fileId: 'file_avatar_01JNEW',\n updatedAt: '2026-08-21T09:00:00.000Z',\n },\n _version: 8,\n },\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n communications: { notification: toast('The profile owner receives an in-app confirmation after the avatar is updated.') },\n },\n [UserProfiles_Operations.REMOVE_AVATAR]: {\n operationId: UserProfiles_Operations.REMOVE_AVATAR,\n purpose: 'Reserved avatar-removal operation. It is not published as an application-consumer API capability while managed-file release is unimplemented.',\n outcome: 'Runtime requests fail closed; no profile or file reference is changed.',\n responseStatuses: [\n { code: HttpResponseStatusCode.INTERNAL_SERVER_ERROR_500, meaning: 'The acknowledged implementation gap refuses the request instead of reporting a successful no-op.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not the profile subject and lacks authority to clear this profile’s avatar.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No profile document exists for the supplied id within the caller’s scope.' },\n ],\n idempotent: true,\n },\n [UserProfiles_Operations.UPDATE_CONTACT_INFO]: {\n operationId: UserProfiles_Operations.UPDATE_CONTACT_INFO,\n purpose: 'Replace the caller’s profile contact number with a valid E.164 international number.',\n outcome: 'The new number is stored and the refreshed profile is returned. Number verification remains a separate authentication flow.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The contact fields were updated and the refreshed profile is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The supplied phone number is not a valid E.164 value or the contact payload fails validation.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not the profile subject and lacks authority to change this profile’s contact data.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No profile document exists for the supplied id within the caller’s scope.' },\n ],\n idempotent: true,\n examples: [{\n title: 'Update your contact number',\n request: {\n userId: USER_PROFILE_EXAMPLE.userId,\n phoneNumber: '+352621654321',\n },\n response: {\n ...USER_PROFILE_EXAMPLE,\n phoneNumber: '+352621654321',\n _version: 8,\n },\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n communications: { notification: toast('The profile owner receives an in-app confirmation after the contact number is updated.') },\n },\n },\n\n businessConstraints: [\n 'Registry scope resolves through the `USERS` composition edge — the spec’s `resourcePrimaryScope` is `USER_SELF` to match the self-anchor, even though the product copy talks about “org directory”.',\n 'Core operations in the factory register both a default `APP_USER` API variant and an `admin` API variant; the identity `userProfilesResourceUIBehavior` UI preset only hosts the `admin` operation keys in `views`, so `frontend.views` documents `admin` only. End-user “my profile” UI is covered by `USER_SELF_PROFILES`, not a `default` view row on this resource type.',\n 'Custom operations (`update_avatar` … `update_contact_info`) are `APP_USER`-only in the factory (no `admin` variant). They appear in `base.operations` for API and DF-1; the admin UI preset does not add view hosts for them (see `identity.resource-presets.tsx`).',\n 'Phone-number possession is NOT proved on this resource. There is no `verify_phone` custom operation: the challenge/response against an issued code is fully implemented in the auth subsystem by `AuthPhoneVerificationBackendService` (`PHONE_VERIFICATION` consumable tokens — single-use, 10-minute expiry — a constant-time code comparison, audit events on both the success and failure paths, and the verified state persisted through `setVerifiedPhone`), with `AuthMethod.SMS_OTP` covering the same proof as a first-or-second auth factor. `USER_SELF_PROFILES` dropped its equivalent op for the same reason, and an admin-directory resource is the wrong place regardless — an SMS code proves possession by the phone’s owner, not by the admin submitting it. `update_contact_info` changes the number; it does not attest it.',\n ],\n }),\n { resourcePrimaryScope: ResourcePrimaryScope.USER_SELF },\n ),\n () => ({\n layout: {\n // Admin `USER_PROFILES` reuses the self-profile layout verbatim\n // (`layout: main[USER_SELF_PROFILES].layout`), which is now a flat,\n // sectionless field list. `sections` must stay empty to match — the\n // structural-slot validator compares this against the SHARED merged layout\n // refs, so a documented section here would crash-loop the companion.\n purpose: 'Reuse the flat self-profile layout for admin/end-user parity — no section grouping.',\n displayPurpose: 'Directory detail drawer (admin) or people search result expansion.',\n summaryPurpose: 'Name and title in compact list rows.',\n sections: {},\n },\n views: {\n [Op.READ]: {\n variants: {\n admin: {\n purpose: 'Admin and elevated directory read — the identity preset only surfaces the `admin` operation variant for USER_PROFILES.',\n whenToUse: 'User management console, directory admin, and support workflows using `USER_PROFILES` (not the self `USER_SELF_PROFILES` type).',\n },\n },\n },\n [Op.SEARCH]: {\n variants: {\n admin: {\n purpose: 'Admin search with expanded searchable fields from the runtime config.',\n whenToUse: 'Compliance lookup and back-office people search.',\n },\n },\n },\n [Op.CREATE]: {\n variants: {\n admin: {\n purpose: 'Admin-provisioned profile creation (imports, support).',\n whenToUse: 'When operators create profile rows on behalf of users — the merged preset only exposes the `admin` variant.',\n },\n },\n },\n [Op.UPDATE]: {\n variants: {\n admin: {\n purpose: 'Admin update path for a user’s profile document.',\n whenToUse: 'Support edits and data-fix flows under super-admin or equivalent roles.',\n },\n },\n },\n [Op.DELETE]: {\n variants: {\n admin: {\n purpose: 'Admin deletion of a profile for compliance or offboarding support.',\n whenToUse: 'DSR, abuse, or org teardown — the preset surfaces only the `admin` delete variant here.',\n },\n },\n },\n },\n }),\n);\n"]}
@@ -3,7 +3,7 @@
3
3
  * Runtime: `user-self-preferences.shared.resources-config.schemas.ts`, schema `UserPreferencesSchema`.
4
4
  */
5
5
  import { CoreResourceOperation as Op, UserSelfPreferences_Operations } from '@wildo-ai/saas-models';
6
- export declare const userSelfPreferencesResourceSpecification: import("../../../_core").ResourceSpecificationConfig<typeof UserSelfPreferences_Operations, Op.READ | Op.UPDATE, import("zod").ZodObject<{
6
+ export declare const userSelfPreferencesResourceSpecification: import("../../../_core").ResourceSpecificationConfig<typeof UserSelfPreferences_Operations, Op.READ | Op.UPDATE | Op.UPDATE_MANY | Op.LIST, import("zod").ZodObject<{
7
7
  _id: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodString>>;
8
8
  userId: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodString>>>>>;
9
9
  notifications: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodDefault<import("zod").ZodObject<{
@@ -1 +1 @@
1
- {"version":3,"file":"user-self-preferences.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/users/resources/user-self-preferences.resource.specification.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAUH,OAAO,EACL,qBAAqB,IAAI,EAAE,EAI3B,8BAA8B,EAE/B,MAAM,uBAAuB,CAAC;AA6B/B,eAAO,MAAM,wCAAwC;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCA8QpD,CAAC"}
1
+ {"version":3,"file":"user-self-preferences.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/users/resources/user-self-preferences.resource.specification.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAUH,OAAO,EACL,qBAAqB,IAAI,EAAE,EAI3B,8BAA8B,EAE/B,MAAM,uBAAuB,CAAC;AA8B/B,eAAO,MAAM,wCAAwC;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCA+QpD,CAAC"}
@@ -9,6 +9,7 @@ import { CoreResourceOperation as Op, ResourcePrimaryScope, UserPreferenceGroup,
9
9
  import { HttpResponseStatusCode, resourceFrontendConfiguration, resourceSpecification, resourceSpecificationFromFrontendConfiguration, } from '../../../_core/index.js';
10
10
  import { selfServiceFrontEndSuccessNotification } from './self-service-user-notifications.shared.js';
11
11
  import { USER_PREFERENCES_EXAMPLE_USER_ID, userPreferencesApiReferenceExample, userPreferencesApiReferencePathExample, userPreferencesApiReferenceSummaryExample, } from './user-preferences-api-reference.examples.js';
12
+ import { EngineResourceSubDomain } from '../../engine-resource-sub-domain.js';
12
13
  const userSelfPreferencesResourceUIBehavior = userSelfPreferencesResourceUIBehaviorSource;
13
14
  const toast = (s) => selfServiceFrontEndSuccessNotification(s);
14
15
  export const userSelfPreferencesResourceSpecification = resourceSpecificationFromFrontendConfiguration(resourceFrontendConfiguration(userSelfPreferencesResourceUIBehavior), resourceSpecification(userSelfPreferencesFactory, UserPreferencesSchema, ({ schemaShape }) => ({
@@ -16,6 +17,7 @@ export const userSelfPreferencesResourceSpecification = resourceSpecificationFro
16
17
  businessRole: 'Self-scoped preference store — same shape as org-admin `USER_PREFERENCES` but only `APP_USER` may call it here.',
17
18
  lifecycleRole: 'Seeded with product defaults when the user account is created, then updated by the signed-in user through the generic update or selective reset operations.',
18
19
  audience: LabelAudience.END_USER,
20
+ subDomain: EngineResourceSubDomain.USERS,
19
21
  codeHandling: {
20
22
  mainSchema: {
21
23
  packageName: '@wildo-ai/saas-models',
@@ -1 +1 @@
1
- {"version":3,"file":"user-self-preferences.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/users/resources/user-self-preferences.resource.specification.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,qCAAqC,IAAI,2CAA2C,EAAE,MAAM,8BAA8B,CAAC;AACpI,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAA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;gBACnE,SAAS,EAAE,4DAA4D;gBACvE,SAAS,EAAE;oBACT,KAAK,EAAE,EAAE,OAAO,EAAE,6BAA6B,EAAE;oBACjD,WAAW,EAAE,EAAE,OAAO,EAAE,mFAAmF,EAAE;iBAC9G;aACF;SACF;KACF;IACD,KAAK,EAAE;QACL,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,OAAO,EAAE,iDAAiD,EAAE,SAAS,EAAE,yBAAyB,EAAE;QAC/G,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE,2BAA2B,EAAE,SAAS,EAAE,wCAAwC,EAAE;QAC1G,CAAC,8BAA8B,CAAC,iBAAiB,CAAC,EAAE,EAAE,OAAO,EAAE,0IAA0I,EAAE,SAAS,EAAE,8CAA8C,EAAE;KACvQ;CACF,CAAC,CACH,CAAC","sourcesContent":["/**\n * Resource: `userSelfPreferences` — Wildo SaaS engine specification (mixed).\n * Runtime: `user-self-preferences.shared.resources-config.schemas.ts`, schema `UserPreferencesSchema`.\n */\n\nimport { userSelfPreferencesResourceUIBehavior as userSelfPreferencesResourceUIBehaviorSource } 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 UserPreferenceGroup,\n UserPreferencesSchema,\n UserSelfPreferences_Operations,\n userSelfPreferencesResourceConfiguration_InitializationFactory as userSelfPreferencesFactory,\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';\n\ntype Cfg = ReturnType<typeof userSelfPreferencesFactory>;\ntype Custom = NonNullable<Cfg['customOperation']>;\ntype Core = Cfg['coreOperations'][number];\ntype Main = Cfg['mainSchema'];\n\nconst userSelfPreferencesResourceUIBehavior = userSelfPreferencesResourceUIBehaviorSource as ResourceUIBehaviorConfig<\n Custom,\n Core,\n Main\n>;\n\nconst toast = (s: string) => selfServiceFrontEndSuccessNotification(s);\n\nexport const userSelfPreferencesResourceSpecification = resourceSpecificationFromFrontendConfiguration(\n resourceFrontendConfiguration(userSelfPreferencesResourceUIBehavior),\n resourceSpecification(\n userSelfPreferencesFactory,\n UserPreferencesSchema,\n ({ schemaShape }) => ({\n purpose: 'Persist the signed-in user’s notification, privacy, UI, regional, and language preferences as a single document.',\n businessRole: 'Self-scoped preference store — same shape as org-admin `USER_PREFERENCES` but only `APP_USER` may call it here.',\n lifecycleRole:\n 'Seeded with product defaults when the user account is created, then updated by the signed-in user through the generic update or selective reset operations.',\n audience: LabelAudience.END_USER,\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: 'userSelfPreferencesResourceConfiguration_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_SELF_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 customEnum: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'UserSelfPreferences_Operations',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n frontendConfigurationSources: [\n {\n packageName: '@wildo-ai/presets-components',\n exportName: 'userSelfPreferencesResourceUIBehavior',\n symbolKind: CodeSymbolKind.UI_BEHAVIOR,\n },\n ],\n },\n\n fields: {\n _id: schemaShape._id.stringSpec({\n meaning: 'Primary key for the preferences document.',\n semanticRole: 'identifier',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n userId: schemaShape.userId.foreignKeySpec({\n meaning: 'Foreign key to the `users` row that owns this self-preference document — immutable after create.',\n whyItMatters: 'Scopes every self-serve read/write to the signed-in identity through the user-self access strategy, so a caller can only ever load or mutate their own preferences.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n notifications: schemaShape.notifications.objectSpec({\n meaning: 'Channel toggles (email, push, SMS, in-app) for notification fan-out.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n privacy: schemaShape.privacy.objectSpec({\n meaning: 'User-level privacy flags and consent mirrors for product features.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n ui: schemaShape.ui.objectSpec({\n meaning: 'UI theme selection (light/dark/system) and related presentation defaults.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n regional: schemaShape.regional.objectSpec({\n meaning: 'Timezone, locale, and date/time presentation formats.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n languagePreferences: schemaShape.languagePreferences.objectSpec({\n meaning: 'Primary/fallback languages and auto-detect behavior for i18n.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n },\n\n operations: {\n [Op.READ]: {\n purpose: 'Return the caller’s eagerly seeded preferences row for settings hydration. The `userId` path value must identify the authenticated caller; it is not an administrator-addressable user selector. ALSO exposed as an MCP tool (`operation.mcp.exposed`) to a USER-DELEGATED agent caller — a machine principal carries no `userId`, so this USER_SELF operation is never advertised to it; the read always resolves the consenting user’s own document.',\n outcome: 'Client forms can bind to every subsection in one fetch; an agent acting for the user can read their preferences (locale/timezone/theme/notifications) over MCP.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The signed-in user’s own preferences document is returned with every subsection.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.UNAUTHORIZED_401, when: 'The request carries no valid authenticated session.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The `userId` path value does not identify the authenticated caller.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No preferences row exists for the authenticated user because account provisioning did not complete successfully.' },\n ],\n idempotent: true,\n examples: [\n {\n title: 'Load my notification, 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: 'Load my 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: 'Load the compact locale and appearance summary',\n request: userPreferencesApiReferencePathExample,\n response: userPreferencesApiReferenceSummaryExample,\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n },\n },\n [Op.UPDATE]: {\n purpose: 'Patch any subset of preference sub-objects in one save. The `userId` path value must identify the authenticated caller. ALSO exposed as an MCP tool (`operation.mcp.exposed`) to a USER-DELEGATED agent caller (never to a machine principal — see READ); the write targets the consenting user’s own document.',\n outcome: 'Bulk “Save settings” buttons can send a merged DTO; an agent acting for the user can change their preferences over MCP.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The supplied preference sub-objects were merged and the new state 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 `userId` path value does not identify the authenticated caller.' },\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'One of the edited preference sub-objects fails schema validation.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No preferences row exists for the authenticated user because account provisioning did not complete successfully.' },\n ],\n idempotent: true,\n examples: [\n {\n title: 'Use French formats in the Europe/Paris timezone',\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 languagePreferences: {\n primaryLanguage: 'fr',\n fallbackLanguages: ['en'],\n autoDetect: true,\n useOrganizationDefault: false,\n },\n },\n response: userPreferencesApiReferenceExample,\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n communications: { notification: toast('FRONT_END_SUCCESS after generic UPDATE on self preferences.') },\n },\n [UserSelfPreferences_Operations.RESET_TO_DEFAULTS]: {\n operationId: UserSelfPreferences_Operations.RESET_TO_DEFAULTS,\n purpose: 'Return the named preference blocks to product defaults. The request carries `groups` — one or more members of the closed `UserPreferenceGroup` vocabulary, whose values are the persisted block names — and a \"reset everything\" is expressed by naming every block, not by a separate flag.',\n outcome: 'Each named block is replaced by its schema defaults; a block the request does not name is left exactly as it was. Resetting `privacy` changes only the two preference settings in that block. Governed notice, contract, and consent interactions are separate immutable release-bound records, are not members of this resource, and are never modified by a preferences reset.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The named preference blocks were reset to product defaults and the refreshed preferences are returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.UNAUTHORIZED_401, when: 'The request carries no valid authenticated session.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The `userId` path value does not identify the authenticated caller.' },\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: '`groups` is absent or empty, or names a block outside the vocabulary. A request naming nothing is rejected rather than answered with an empty write.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No preferences row exists for the authenticated user because account provisioning did not complete successfully.' },\n ],\n idempotent: true,\n examples: [\n {\n title: 'Restore notification and regional defaults without changing privacy or language',\n request: {\n userId: USER_PREFERENCES_EXAMPLE_USER_ID,\n groups: [UserPreferenceGroup.NOTIFICATIONS, UserPreferenceGroup.REGIONAL],\n },\n response: {\n ...userPreferencesApiReferenceExample,\n notifications: {\n email: true,\n push: true,\n sms: false,\n inApp: true,\n },\n regional: {\n timezone: 'UTC',\n dateFormat: 'YYYY-MM-DD',\n timeFormat: '24h',\n locale: 'en',\n },\n },\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n communications: { notification: toast('FRONT_END_SUCCESS after reset operation completes.') },\n },\n },\n businessConstraints: [\n 'A preferences row is created eagerly from schema defaults when the user account is created. There is no public self-service CREATE operation; a missing row is a provisioning failure, not a normal client lifecycle state.',\n 'The `userId` URL segment identifies the authenticated user-self scope. Supplying another user id never turns this API into an administrative preferences API.',\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 'RESET_TO_DEFAULTS is selective: only groups named in the request are replaced. It does not alter separate governed-document interaction records.',\n ],\n }),\n { resourcePrimaryScope: ResourcePrimaryScope.USER_SELF },\n ),\n () => ({\n layout: {\n purpose: 'Mirror the preset’s four settings sections: notifications, privacy, regional, and language. UI theme is intentionally NOT a section here — `ui.theme` is read-only in the summary projection and is edited via the dedicated Appearance Settings-Hub panel (`AppPage_AppearanceSettings`); the editable duplicate was removed from this page (mirrors the preset’s omission note). Do not re-add an `appearance` section unless the preset reintroduces the ref.',\n displayPurpose: 'End-user settings tabs; nested `ObjectScope` names in the preset must stay aligned with these section keys.',\n summaryPurpose: 'Condensed summary with theme + timezone + primary language.',\n sections: {\n notifications: {\n purpose: 'Channel-level opt-in matrix for email/push/SMS/in-app.',\n whenToUse: 'Notification center onboarding and digest controls.',\n textSlots: {\n title: { purpose: 'Label the notifications section card.' },\n description: { purpose: 'Explain binding to actual delivery channels in the worker layer.' },\n },\n },\n privacy: {\n purpose: 'Consent and data-processing toggles that affect compliance posture.',\n whenToUse: 'GDPR/CCPA style self-service privacy center.',\n textSlots: {\n title: { purpose: 'Label the privacy block.' },\n description: { purpose: 'Cross-link to org-level policies when the deployment requires it.' },\n },\n },\n regional: {\n purpose: 'Timezone and format preferences for scheduling and numbers.',\n whenToUse: 'First-day setup or travel scenarios.',\n textSlots: {\n title: { purpose: 'Label regional settings.' },\n description: { purpose: 'State that changes affect formatting, not historical stored instant fields.' },\n },\n },\n language: {\n purpose: 'Primary and fallback languages with auto-detect options.',\n whenToUse: 'Internationalized products and accessibility requirements.',\n textSlots: {\n title: { purpose: 'Label language preferences.' },\n description: { purpose: 'Note interaction with org default language when `useOrganizationDefault` is true.' },\n },\n },\n },\n },\n views: {\n [Op.READ]: { purpose: 'Load self preferences for any settings surface.', whenToUse: 'Initial settings fetch.' },\n [Op.UPDATE]: { purpose: 'Save all tabs in one DTO.', whenToUse: '“Save” with multi-section dirty state.' },\n [UserSelfPreferences_Operations.RESET_TO_DEFAULTS]: { purpose: 'Danger-zone reset: the form is a multi-select over the preference blocks, and being CRITICAL it gates its submit behind type-to-confirm.', whenToUse: '“Restore defaults” CTA in advanced settings.' },\n },\n }),\n);\n"]}
1
+ {"version":3,"file":"user-self-preferences.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/users/resources/user-self-preferences.resource.specification.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,qCAAqC,IAAI,2CAA2C,EAAE,MAAM,8BAA8B,CAAC;AACpI,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAEpE,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL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nE,SAAS,EAAE,4DAA4D;gBACvE,SAAS,EAAE;oBACT,KAAK,EAAE,EAAE,OAAO,EAAE,6BAA6B,EAAE;oBACjD,WAAW,EAAE,EAAE,OAAO,EAAE,mFAAmF,EAAE;iBAC9G;aACF;SACF;KACF;IACD,KAAK,EAAE;QACL,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,OAAO,EAAE,iDAAiD,EAAE,SAAS,EAAE,yBAAyB,EAAE;QAC/G,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE,2BAA2B,EAAE,SAAS,EAAE,wCAAwC,EAAE;QAC1G,CAAC,8BAA8B,CAAC,iBAAiB,CAAC,EAAE,EAAE,OAAO,EAAE,0IAA0I,EAAE,SAAS,EAAE,8CAA8C,EAAE;KACvQ;CACF,CAAC,CACH,CAAC","sourcesContent":["/**\n * Resource: `userSelfPreferences` — Wildo SaaS engine specification (mixed).\n * Runtime: `user-self-preferences.shared.resources-config.schemas.ts`, schema `UserPreferencesSchema`.\n */\n\nimport { userSelfPreferencesResourceUIBehavior as userSelfPreferencesResourceUIBehaviorSource } 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 UserPreferenceGroup,\n UserPreferencesSchema,\n UserSelfPreferences_Operations,\n userSelfPreferencesResourceConfiguration_InitializationFactory as userSelfPreferencesFactory,\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 userSelfPreferencesFactory>;\ntype Custom = NonNullable<Cfg['customOperation']>;\ntype Core = Cfg['coreOperations'][number];\ntype Main = Cfg['mainSchema'];\n\nconst userSelfPreferencesResourceUIBehavior = userSelfPreferencesResourceUIBehaviorSource as ResourceUIBehaviorConfig<\n Custom,\n Core,\n Main\n>;\n\nconst toast = (s: string) => selfServiceFrontEndSuccessNotification(s);\n\nexport const userSelfPreferencesResourceSpecification = resourceSpecificationFromFrontendConfiguration(\n resourceFrontendConfiguration(userSelfPreferencesResourceUIBehavior),\n resourceSpecification(\n userSelfPreferencesFactory,\n UserPreferencesSchema,\n ({ schemaShape }) => ({\n purpose: 'Persist the signed-in user’s notification, privacy, UI, regional, and language preferences as a single document.',\n businessRole: 'Self-scoped preference store — same shape as org-admin `USER_PREFERENCES` but only `APP_USER` may call it here.',\n lifecycleRole:\n 'Seeded with product defaults when the user account is created, then updated by the signed-in user through the generic update or selective reset operations.',\n audience: LabelAudience.END_USER,\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: 'userSelfPreferencesResourceConfiguration_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_SELF_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 customEnum: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'UserSelfPreferences_Operations',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n frontendConfigurationSources: [\n {\n packageName: '@wildo-ai/presets-components',\n exportName: 'userSelfPreferencesResourceUIBehavior',\n symbolKind: CodeSymbolKind.UI_BEHAVIOR,\n },\n ],\n },\n\n fields: {\n _id: schemaShape._id.stringSpec({\n meaning: 'Primary key for the preferences document.',\n semanticRole: 'identifier',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n userId: schemaShape.userId.foreignKeySpec({\n meaning: 'Foreign key to the `users` row that owns this self-preference document — immutable after create.',\n whyItMatters: 'Scopes every self-serve read/write to the signed-in identity through the user-self access strategy, so a caller can only ever load or mutate their own preferences.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n notifications: schemaShape.notifications.objectSpec({\n meaning: 'Channel toggles (email, push, SMS, in-app) for notification fan-out.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n privacy: schemaShape.privacy.objectSpec({\n meaning: 'User-level privacy flags and consent mirrors for product features.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n ui: schemaShape.ui.objectSpec({\n meaning: 'UI theme selection (light/dark/system) and related presentation defaults.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n regional: schemaShape.regional.objectSpec({\n meaning: 'Timezone, locale, and date/time presentation formats.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n languagePreferences: schemaShape.languagePreferences.objectSpec({\n meaning: 'Primary/fallback languages and auto-detect behavior for i18n.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n },\n\n operations: {\n [Op.READ]: {\n purpose: 'Return the caller’s eagerly seeded preferences row for settings hydration. The `userId` path value must identify the authenticated caller; it is not an administrator-addressable user selector. ALSO exposed as an MCP tool (`operation.mcp.exposed`) to a USER-DELEGATED agent caller — a machine principal carries no `userId`, so this USER_SELF operation is never advertised to it; the read always resolves the consenting user’s own document.',\n outcome: 'Client forms can bind to every subsection in one fetch; an agent acting for the user can read their preferences (locale/timezone/theme/notifications) over MCP.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The signed-in user’s own preferences document is returned with every subsection.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.UNAUTHORIZED_401, when: 'The request carries no valid authenticated session.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The `userId` path value does not identify the authenticated caller.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No preferences row exists for the authenticated user because account provisioning did not complete successfully.' },\n ],\n idempotent: true,\n examples: [\n {\n title: 'Load my notification, 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: 'Load my 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: 'Load the compact locale and appearance summary',\n request: userPreferencesApiReferencePathExample,\n response: userPreferencesApiReferenceSummaryExample,\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n },\n },\n [Op.UPDATE]: {\n purpose: 'Patch any subset of preference sub-objects in one save. The `userId` path value must identify the authenticated caller. ALSO exposed as an MCP tool (`operation.mcp.exposed`) to a USER-DELEGATED agent caller (never to a machine principal — see READ); the write targets the consenting user’s own document.',\n outcome: 'Bulk “Save settings” buttons can send a merged DTO; an agent acting for the user can change their preferences over MCP.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The supplied preference sub-objects were merged and the new state 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 `userId` path value does not identify the authenticated caller.' },\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'One of the edited preference sub-objects fails schema validation.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No preferences row exists for the authenticated user because account provisioning did not complete successfully.' },\n ],\n idempotent: true,\n examples: [\n {\n title: 'Use French formats in the Europe/Paris timezone',\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 languagePreferences: {\n primaryLanguage: 'fr',\n fallbackLanguages: ['en'],\n autoDetect: true,\n useOrganizationDefault: false,\n },\n },\n response: userPreferencesApiReferenceExample,\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n communications: { notification: toast('FRONT_END_SUCCESS after generic UPDATE on self preferences.') },\n },\n [UserSelfPreferences_Operations.RESET_TO_DEFAULTS]: {\n operationId: UserSelfPreferences_Operations.RESET_TO_DEFAULTS,\n purpose: 'Return the named preference blocks to product defaults. The request carries `groups` — one or more members of the closed `UserPreferenceGroup` vocabulary, whose values are the persisted block names — and a \"reset everything\" is expressed by naming every block, not by a separate flag.',\n outcome: 'Each named block is replaced by its schema defaults; a block the request does not name is left exactly as it was. Resetting `privacy` changes only the two preference settings in that block. Governed notice, contract, and consent interactions are separate immutable release-bound records, are not members of this resource, and are never modified by a preferences reset.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The named preference blocks were reset to product defaults and the refreshed preferences are returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.UNAUTHORIZED_401, when: 'The request carries no valid authenticated session.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The `userId` path value does not identify the authenticated caller.' },\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: '`groups` is absent or empty, or names a block outside the vocabulary. A request naming nothing is rejected rather than answered with an empty write.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No preferences row exists for the authenticated user because account provisioning did not complete successfully.' },\n ],\n idempotent: true,\n examples: [\n {\n title: 'Restore notification and regional defaults without changing privacy or language',\n request: {\n userId: USER_PREFERENCES_EXAMPLE_USER_ID,\n groups: [UserPreferenceGroup.NOTIFICATIONS, UserPreferenceGroup.REGIONAL],\n },\n response: {\n ...userPreferencesApiReferenceExample,\n notifications: {\n email: true,\n push: true,\n sms: false,\n inApp: true,\n },\n regional: {\n timezone: 'UTC',\n dateFormat: 'YYYY-MM-DD',\n timeFormat: '24h',\n locale: 'en',\n },\n },\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n communications: { notification: toast('FRONT_END_SUCCESS after reset operation completes.') },\n },\n },\n businessConstraints: [\n 'A preferences row is created eagerly from schema defaults when the user account is created. There is no public self-service CREATE operation; a missing row is a provisioning failure, not a normal client lifecycle state.',\n 'The `userId` URL segment identifies the authenticated user-self scope. Supplying another user id never turns this API into an administrative preferences API.',\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 'RESET_TO_DEFAULTS is selective: only groups named in the request are replaced. It does not alter separate governed-document interaction records.',\n ],\n }),\n { resourcePrimaryScope: ResourcePrimaryScope.USER_SELF },\n ),\n () => ({\n layout: {\n purpose: 'Mirror the preset’s four settings sections: notifications, privacy, regional, and language. UI theme is intentionally NOT a section here — `ui.theme` is read-only in the summary projection and is edited via the dedicated Appearance Settings-Hub panel (`AppPage_AppearanceSettings`); the editable duplicate was removed from this page (mirrors the preset’s omission note). Do not re-add an `appearance` section unless the preset reintroduces the ref.',\n displayPurpose: 'End-user settings tabs; nested `ObjectScope` names in the preset must stay aligned with these section keys.',\n summaryPurpose: 'Condensed summary with theme + timezone + primary language.',\n sections: {\n notifications: {\n purpose: 'Channel-level opt-in matrix for email/push/SMS/in-app.',\n whenToUse: 'Notification center onboarding and digest controls.',\n textSlots: {\n title: { purpose: 'Label the notifications section card.' },\n description: { purpose: 'Explain binding to actual delivery channels in the worker layer.' },\n },\n },\n privacy: {\n purpose: 'Consent and data-processing toggles that affect compliance posture.',\n whenToUse: 'GDPR/CCPA style self-service privacy center.',\n textSlots: {\n title: { purpose: 'Label the privacy block.' },\n description: { purpose: 'Cross-link to org-level policies when the deployment requires it.' },\n },\n },\n regional: {\n purpose: 'Timezone and format preferences for scheduling and numbers.',\n whenToUse: 'First-day setup or travel scenarios.',\n textSlots: {\n title: { purpose: 'Label regional settings.' },\n description: { purpose: 'State that changes affect formatting, not historical stored instant fields.' },\n },\n },\n language: {\n purpose: 'Primary and fallback languages with auto-detect options.',\n whenToUse: 'Internationalized products and accessibility requirements.',\n textSlots: {\n title: { purpose: 'Label language preferences.' },\n description: { purpose: 'Note interaction with org default language when `useOrganizationDefault` is true.' },\n },\n },\n },\n },\n views: {\n [Op.READ]: { purpose: 'Load self preferences for any settings surface.', whenToUse: 'Initial settings fetch.' },\n [Op.UPDATE]: { purpose: 'Save all tabs in one DTO.', whenToUse: '“Save” with multi-section dirty state.' },\n [UserSelfPreferences_Operations.RESET_TO_DEFAULTS]: { purpose: 'Danger-zone reset: the form is a multi-select over the preference blocks, and being CRITICAL it gates its submit behind type-to-confirm.', whenToUse: '“Restore defaults” CTA in advanced settings.' },\n },\n }),\n);\n"]}
@@ -3,7 +3,7 @@
3
3
  * Runtime: `user-self-profiles.shared.resources-config.schemas.ts`, schema `UserProfileSchema`.
4
4
  */
5
5
  import { CoreResourceOperation as Op } from '@wildo-ai/saas-models';
6
- export declare const userSelfProfilesResourceSpecification: import("../../../_core").ResourceSpecificationConfig<Record<string, never>, Op.READ | Op.UPDATE | Op.CREATE, import("zod").ZodObject<{
6
+ export declare const userSelfProfilesResourceSpecification: import("../../../_core").ResourceSpecificationConfig<Record<string, never>, Op.READ | Op.UPDATE | Op.UPDATE_MANY | Op.CREATE | Op.LIST, import("zod").ZodObject<{
7
7
  _id: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodString>>;
8
8
  userId: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodString>>>>>;
9
9
  firstName: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodString>>;
@@ -1 +1 @@
1
- {"version":3,"file":"user-self-profiles.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/users/resources/user-self-profiles.resource.specification.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAUH,OAAO,EACL,qBAAqB,IAAI,EAAE,EAI5B,MAAM,uBAAuB,CAAC;AAuB/B,eAAO,MAAM,qCAAqC;;;;;;;;;;iCA+KjD,CAAC"}
1
+ {"version":3,"file":"user-self-profiles.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/users/resources/user-self-profiles.resource.specification.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAUH,OAAO,EACL,qBAAqB,IAAI,EAAE,EAI5B,MAAM,uBAAuB,CAAC;AAwB/B,eAAO,MAAM,qCAAqC;;;;;;;;;;iCAgLjD,CAAC"}
@@ -8,12 +8,14 @@ import { CodeDeclarationKind, CodeSymbolKind, FieldSemanticImportance, } from '@
8
8
  import { CoreResourceOperation as Op, ResourcePrimaryScope, UserProfileSchema, userSelfProfilesResourceConfiguration_InitializationFactory as userSelfProfilesFactory, } from '@wildo-ai/saas-models';
9
9
  import { HttpResponseStatusCode, resourceFrontendConfiguration, resourceSpecification, resourceSpecificationFromFrontendConfiguration, } from '../../../_core/index.js';
10
10
  import { selfServiceFrontEndSuccessNotification, } from './self-service-user-notifications.shared.js';
11
+ import { EngineResourceSubDomain } from '../../engine-resource-sub-domain.js';
11
12
  const userSelfProfilesResourceUIBehavior = userSelfProfilesResourceUIBehaviorSource;
12
13
  export const userSelfProfilesResourceSpecification = resourceSpecificationFromFrontendConfiguration(resourceFrontendConfiguration(userSelfProfilesResourceUIBehavior), resourceSpecification(userSelfProfilesFactory, UserProfileSchema, ({ schemaShape }) => ({
13
14
  purpose: 'Persist the end user’s own profile card: name, avatar, bio, and contact details separate from org-admin `USER_PROFILES`.',
14
15
  businessRole: 'Self-scoped profile storage that still follows the same document shape as admin-managed profiles for merging in `UserContext`.',
15
16
  lifecycleRole: 'Created on first self-provision, updated through self-service operations, deleted with the user aggregate.',
16
17
  audience: LabelAudience.END_USER,
18
+ subDomain: EngineResourceSubDomain.USERS,
17
19
  codeHandling: {
18
20
  mainSchema: {
19
21
  packageName: '@wildo-ai/saas-models',
@@ -1 +1 @@
1
- {"version":3,"file":"user-self-profiles.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/users/resources/user-self-profiles.resource.specification.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,kCAAkC,IAAI,wCAAwC,EAAE,MAAM,8BAA8B,CAAC;AAC9H,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,iBAAiB,EACjB,2DAA2D,IAAI,uBAAuB,GACvF,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,sBAAsB,EACtB,6BAA6B,EAC7B,qBAAqB,EACrB,8CAA8C,GAC/C,MAAM,6BAA6B,CAAC;AAErC,OAAO,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+C,EAAE;KACxH;CACF,CAAC,CACH,CAAC","sourcesContent":["/**\n * Resource: `userSelfProfiles` — Wildo SaaS engine specification (mixed).\n * Runtime: `user-self-profiles.shared.resources-config.schemas.ts`, schema `UserProfileSchema`.\n */\n\nimport { userSelfProfilesResourceUIBehavior as userSelfProfilesResourceUIBehaviorSource } 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 UserProfileSchema,\n userSelfProfilesResourceConfiguration_InitializationFactory as userSelfProfilesFactory,\n} from '@wildo-ai/saas-models';\nimport {\n HttpResponseStatusCode,\n resourceFrontendConfiguration,\n resourceSpecification,\n resourceSpecificationFromFrontendConfiguration,\n} from '~wildo-specifications/_core';\n\nimport {\n selfServiceFrontEndSuccessNotification,\n} from './self-service-user-notifications.shared';\n\ntype Cfg = ReturnType<typeof userSelfProfilesFactory>;\ntype Custom = NonNullable<Cfg['customOperation']>;\ntype Core = Cfg['coreOperations'][number];\ntype Main = Cfg['mainSchema'];\n\nconst userSelfProfilesResourceUIBehavior = userSelfProfilesResourceUIBehaviorSource as ResourceUIBehaviorConfig<\n Custom,\n Core,\n Main\n>;\n\nexport const userSelfProfilesResourceSpecification = resourceSpecificationFromFrontendConfiguration(\n resourceFrontendConfiguration(userSelfProfilesResourceUIBehavior),\n resourceSpecification(\n userSelfProfilesFactory,\n UserProfileSchema,\n ({ schemaShape }) => ({\n purpose: 'Persist the end user’s own profile card: name, avatar, bio, and contact details separate from org-admin `USER_PROFILES`.',\n businessRole: 'Self-scoped profile storage that still follows the same document shape as admin-managed profiles for merging in `UserContext`.',\n lifecycleRole: 'Created on first self-provision, updated through self-service operations, deleted with the user aggregate.',\n audience: LabelAudience.END_USER,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'UserProfileSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactory: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'userSelfProfilesResourceConfiguration_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_SELF_PROFILES',\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: 'userSelfProfilesResourceUIBehavior',\n symbolKind: CodeSymbolKind.UI_BEHAVIOR,\n },\n ],\n },\n\n fields: {\n _id: schemaShape._id.stringSpec({\n meaning: 'Primary key for the user’s profile document.',\n semanticRole: 'identifier',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n userId: schemaShape.userId.foreignKeySpec({\n meaning: 'Foreign key to the `users` row that owns this self profile document — immutable after create in self-service flows.',\n whyItMatters: 'Scopes profile reads/writes to the signed-in identity so a caller can only self-provision and edit their own profile card, never another user’s.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n firstName: schemaShape.firstName.stringSpec({\n meaning: 'Legal or preferred given name shown across the product.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n lastName: schemaShape.lastName.stringSpec({\n meaning: 'Family name for sorting, directory, and exports.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n displayName: schemaShape.displayName.stringSpec({\n meaning: 'Optional friendly label overriding `firstName`+`lastName` in UI when set.',\n }),\n avatar: schemaShape.avatar.fileSpec({\n meaning: 'Profile avatar — a single uploaded square image (≤ 2 MB, ≤ 1024px) stored as the standard file reference and rendered as a square avatar. Upload-only via the `z_file()` image pipeline; no external-URL branch.',\n }),\n bio: schemaShape.bio.stringSpec({\n meaning: 'Long-form biography. Authored as markdown (source textarea on edit) and rendered as rich markdown on the read view. Hidden on display when empty.',\n }),\n phoneNumber: schemaShape.phoneNumber.stringSpec({\n meaning: 'E.164 phone used for contact and verification flows. Edited via the international phone input (country selector + national number); displayed in formatted international style.',\n semanticRole: 'identifier',\n }),\n title: schemaShape.title.stringSpec({\n meaning: 'Professional title or role label for org directory cards. Hidden on the read view when empty.',\n }),\n },\n\n operations: {\n [Op.READ]: {\n purpose: 'Load the caller’s profile row for settings and people pickers.',\n outcome: 'Clients receive the structured profile used in avatars, mentions, and HR-style views.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The signed-in user’s own profile document is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.UNAUTHORIZED_401, when: 'The request carries no valid authenticated session.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'The caller has not yet materialized a profile document (none exists until first CREATE).' },\n ],\n idempotent: true,\n },\n [Op.CREATE]: {\n purpose: 'First-time materialization of the self profile after signup when the row does not yet exist.',\n outcome: 'The user has a persisted profile document bound to their `userId`.',\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'A profile document was materialized for the signed-in user and is returned with its server-assigned id.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.UNAUTHORIZED_401, when: 'The request carries no valid authenticated session.' },\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The profile payload fails schema validation.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'A profile document already exists for the signed-in user (profiles are one-per-user; use UPDATE instead).' },\n ],\n idempotent: false,\n examples: [\n {\n title: 'Materialize my own profile after signup',\n request: {\n firstName: 'Ada',\n lastName: 'Lovelace',\n displayName: 'Ada',\n },\n response: {\n _id: 'userprofile_01HX2…',\n userId: 'user_01HX2…',\n firstName: 'Ada',\n lastName: 'Lovelace',\n displayName: 'Ada',\n },\n forStatus: HttpResponseStatusCode.CREATED_201,\n },\n ],\n communications: {\n notification: selfServiceFrontEndSuccessNotification('Acknowledge first profile creation in FRONT_END_SUCCESS toast channel (runtime).'),\n },\n },\n [Op.UPDATE]: {\n purpose: 'Patch profile fields the user is allowed to edit directly.',\n outcome: 'Names, titles, and bio text update without an administrator.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The profile fields were patched and the new state is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.UNAUTHORIZED_401, when: 'The request carries no valid authenticated session.' },\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The edited profile fields fail schema validation.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'The caller has no profile document to update yet (materialize it with CREATE first).' },\n ],\n idempotent: true,\n communications: {\n notification: selfServiceFrontEndSuccessNotification('Acknowledge a generic profile UPDATE via FRONT_END_SUCCESS.'),\n },\n },\n },\n\n businessConstraints: [\n 'The admin counterpart `USER_PROFILES` reuses the same `UserProfileSchema` but with APP_ADMIN roles — do not conflate RLS or audit semantics between the two types.',\n ],\n }),\n { resourcePrimaryScope: ResourcePrimaryScope.USER_SELF },\n ),\n () => ({\n layout: {\n // Flat, sectionless layout (2026-07): the preset dropped the\n // identity/contact/profile section grouping in favour of a single\n // settings-row field list. `sections` is therefore intentionally empty —\n // do NOT re-document identity/contact/profile here unless the preset\n // reintroduces the refs (the structural-slot validator fails otherwise).\n purpose: 'Single flat settings-row list for the self profile — no section grouping.',\n displayPurpose: 'End-user “Profile” settings; a flat label-left / value-right row list.',\n summaryPurpose: 'Compact name + title line for self-profile summaries.',\n sections: {},\n },\n views: {\n [Op.READ]: { purpose: 'Read self profile in settings or onboarding.', whenToUse: 'Default profile tab.' },\n [Op.CREATE]: { purpose: 'Initial profile create wizard / empty state CTA.', whenToUse: 'First-run experiences.' },\n [Op.UPDATE]: { purpose: 'Generic profile edit form host.', whenToUse: 'When multiple fields change in a single save.' },\n },\n }),\n);\n"]}
1
+ {"version":3,"file":"user-self-profiles.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/users/resources/user-self-profiles.resource.specification.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,kCAAkC,IAAI,wCAAwC,EAAE,MAAM,8BAA8B,CAAC;AAC9H,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,iBAAiB,EACjB,2DAA2D,IAAI,uBAAuB,GACvF,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,sBAAsB,EACtB,6BAA6B,EAC7B,qBAAqB,EACrB,8CAA8C,GAC/C,MAAM,6BAA6B,CAAC;AAErC,OAAO,EACL,sCAAsC,GACvC,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAO3E,MAAM,kCAAkC,GAAG,wCAI1C,CAAC;AAEF,MAAM,CAAC,MAAM,qCAAqC,GAAG,8CAA8C,CACjG,6BAA6B,CAAC,kCAAkC,CAAC,EACjE,qBAAqB,CACnB,uBAAuB,EACvB,iBAAiB,EACjB,CAAC,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC,CAAC;IACpB,OAAO,EAAE,0HAA0H;IACnI,YAAY,EAAE,gIAAgI;IAC9I,aAAa,EAAE,4GAA4G;IAC3H,QAAQ,EAAE,aAAa,CAAC,QAAQ;IAChC,SAAS,EAAE,uBAAuB,CAAC,KAAK;IACxC,YAAY,EAAE;QACZ,UAAU,EAAE;YACV,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,sBAAsB,CAAC,aAAa,EAAE,IAAI,EAAE,sFAAsF,EAAE;aAC7I;YACD,UAAU,EAAE,IAAI;YAChB,cAAc,EAAE;gBACd,YAAY,EAAE,sCAAsC,CAAC,6DAA6D,CAAC;aACpH;SACF;KACF;IAED,mBAAmB,EAAE;QACnB,oKAAoK;KACrK;CACF,CAAC,EACF,EAAE,oBAAoB,EAAE,oBAAoB,CAAC,SAAS,EAAE,CACzD,EACD,GAAG,EAAE,CAAC,CAAC;IACL,MAAM,EAAE;QACN,6DAA6D;QAC7D,kEAAkE;QAClE,yEAAyE;QACzE,qEAAqE;QACrE,yEAAyE;QACzE,OAAO,EAAE,2EAA2E;QACpF,cAAc,EAAE,wEAAwE;QACxF,cAAc,EAAE,uDAAuD;QACvE,QAAQ,EAAE,EAAE;KACb;IACD,KAAK,EAAE;QACL,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,OAAO,EAAE,8CAA8C,EAAE,SAAS,EAAE,sBAAsB,EAAE;QACzG,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE,kDAAkD,EAAE,SAAS,EAAE,wBAAwB,EAAE;QACjH,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE,iCAAiC,EAAE,SAAS,EAAE,+CAA+C,EAAE;KACxH;CACF,CAAC,CACH,CAAC","sourcesContent":["/**\n * Resource: `userSelfProfiles` — Wildo SaaS engine specification (mixed).\n * Runtime: `user-self-profiles.shared.resources-config.schemas.ts`, schema `UserProfileSchema`.\n */\n\nimport { userSelfProfilesResourceUIBehavior as userSelfProfilesResourceUIBehaviorSource } 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 UserProfileSchema,\n userSelfProfilesResourceConfiguration_InitializationFactory as userSelfProfilesFactory,\n} from '@wildo-ai/saas-models';\nimport {\n HttpResponseStatusCode,\n resourceFrontendConfiguration,\n resourceSpecification,\n resourceSpecificationFromFrontendConfiguration,\n} from '~wildo-specifications/_core';\n\nimport {\n selfServiceFrontEndSuccessNotification,\n} from './self-service-user-notifications.shared';\nimport { EngineResourceSubDomain } from '../../engine-resource-sub-domain';\n\ntype Cfg = ReturnType<typeof userSelfProfilesFactory>;\ntype Custom = NonNullable<Cfg['customOperation']>;\ntype Core = Cfg['coreOperations'][number];\ntype Main = Cfg['mainSchema'];\n\nconst userSelfProfilesResourceUIBehavior = userSelfProfilesResourceUIBehaviorSource as ResourceUIBehaviorConfig<\n Custom,\n Core,\n Main\n>;\n\nexport const userSelfProfilesResourceSpecification = resourceSpecificationFromFrontendConfiguration(\n resourceFrontendConfiguration(userSelfProfilesResourceUIBehavior),\n resourceSpecification(\n userSelfProfilesFactory,\n UserProfileSchema,\n ({ schemaShape }) => ({\n purpose: 'Persist the end user’s own profile card: name, avatar, bio, and contact details separate from org-admin `USER_PROFILES`.',\n businessRole: 'Self-scoped profile storage that still follows the same document shape as admin-managed profiles for merging in `UserContext`.',\n lifecycleRole: 'Created on first self-provision, updated through self-service operations, deleted with the user aggregate.',\n audience: LabelAudience.END_USER,\n subDomain: EngineResourceSubDomain.USERS,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'UserProfileSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactory: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'userSelfProfilesResourceConfiguration_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_SELF_PROFILES',\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: 'userSelfProfilesResourceUIBehavior',\n symbolKind: CodeSymbolKind.UI_BEHAVIOR,\n },\n ],\n },\n\n fields: {\n _id: schemaShape._id.stringSpec({\n meaning: 'Primary key for the user’s profile document.',\n semanticRole: 'identifier',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n userId: schemaShape.userId.foreignKeySpec({\n meaning: 'Foreign key to the `users` row that owns this self profile document — immutable after create in self-service flows.',\n whyItMatters: 'Scopes profile reads/writes to the signed-in identity so a caller can only self-provision and edit their own profile card, never another user’s.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n firstName: schemaShape.firstName.stringSpec({\n meaning: 'Legal or preferred given name shown across the product.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n lastName: schemaShape.lastName.stringSpec({\n meaning: 'Family name for sorting, directory, and exports.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n displayName: schemaShape.displayName.stringSpec({\n meaning: 'Optional friendly label overriding `firstName`+`lastName` in UI when set.',\n }),\n avatar: schemaShape.avatar.fileSpec({\n meaning: 'Profile avatar — a single uploaded square image (≤ 2 MB, ≤ 1024px) stored as the standard file reference and rendered as a square avatar. Upload-only via the `z_file()` image pipeline; no external-URL branch.',\n }),\n bio: schemaShape.bio.stringSpec({\n meaning: 'Long-form biography. Authored as markdown (source textarea on edit) and rendered as rich markdown on the read view. Hidden on display when empty.',\n }),\n phoneNumber: schemaShape.phoneNumber.stringSpec({\n meaning: 'E.164 phone used for contact and verification flows. Edited via the international phone input (country selector + national number); displayed in formatted international style.',\n semanticRole: 'identifier',\n }),\n title: schemaShape.title.stringSpec({\n meaning: 'Professional title or role label for org directory cards. Hidden on the read view when empty.',\n }),\n },\n\n operations: {\n [Op.READ]: {\n purpose: 'Load the caller’s profile row for settings and people pickers.',\n outcome: 'Clients receive the structured profile used in avatars, mentions, and HR-style views.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The signed-in user’s own profile document is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.UNAUTHORIZED_401, when: 'The request carries no valid authenticated session.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'The caller has not yet materialized a profile document (none exists until first CREATE).' },\n ],\n idempotent: true,\n },\n [Op.CREATE]: {\n purpose: 'First-time materialization of the self profile after signup when the row does not yet exist.',\n outcome: 'The user has a persisted profile document bound to their `userId`.',\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'A profile document was materialized for the signed-in user and is returned with its server-assigned id.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.UNAUTHORIZED_401, when: 'The request carries no valid authenticated session.' },\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The profile payload fails schema validation.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'A profile document already exists for the signed-in user (profiles are one-per-user; use UPDATE instead).' },\n ],\n idempotent: false,\n examples: [\n {\n title: 'Materialize my own profile after signup',\n request: {\n firstName: 'Ada',\n lastName: 'Lovelace',\n displayName: 'Ada',\n },\n response: {\n _id: 'userprofile_01HX2…',\n userId: 'user_01HX2…',\n firstName: 'Ada',\n lastName: 'Lovelace',\n displayName: 'Ada',\n },\n forStatus: HttpResponseStatusCode.CREATED_201,\n },\n ],\n communications: {\n notification: selfServiceFrontEndSuccessNotification('Acknowledge first profile creation in FRONT_END_SUCCESS toast channel (runtime).'),\n },\n },\n [Op.UPDATE]: {\n purpose: 'Patch profile fields the user is allowed to edit directly.',\n outcome: 'Names, titles, and bio text update without an administrator.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The profile fields were patched and the new state is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.UNAUTHORIZED_401, when: 'The request carries no valid authenticated session.' },\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The edited profile fields fail schema validation.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'The caller has no profile document to update yet (materialize it with CREATE first).' },\n ],\n idempotent: true,\n communications: {\n notification: selfServiceFrontEndSuccessNotification('Acknowledge a generic profile UPDATE via FRONT_END_SUCCESS.'),\n },\n },\n },\n\n businessConstraints: [\n 'The admin counterpart `USER_PROFILES` reuses the same `UserProfileSchema` but with APP_ADMIN roles — do not conflate RLS or audit semantics between the two types.',\n ],\n }),\n { resourcePrimaryScope: ResourcePrimaryScope.USER_SELF },\n ),\n () => ({\n layout: {\n // Flat, sectionless layout (2026-07): the preset dropped the\n // identity/contact/profile section grouping in favour of a single\n // settings-row field list. `sections` is therefore intentionally empty —\n // do NOT re-document identity/contact/profile here unless the preset\n // reintroduces the refs (the structural-slot validator fails otherwise).\n purpose: 'Single flat settings-row list for the self profile — no section grouping.',\n displayPurpose: 'End-user “Profile” settings; a flat label-left / value-right row list.',\n summaryPurpose: 'Compact name + title line for self-profile summaries.',\n sections: {},\n },\n views: {\n [Op.READ]: { purpose: 'Read self profile in settings or onboarding.', whenToUse: 'Default profile tab.' },\n [Op.CREATE]: { purpose: 'Initial profile create wizard / empty state CTA.', whenToUse: 'First-run experiences.' },\n [Op.UPDATE]: { purpose: 'Generic profile edit form host.', whenToUse: 'When multiple fields change in a single save.' },\n },\n }),\n);\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"user-self.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/users/resources/user-self.resource.specification.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAUH,OAAO,EACL,qBAAqB,IAAI,EAAE,EAG3B,mBAAmB,EACnB,UAAU,EAEX,MAAM,uBAAuB,CAAC;AA8B/B,eAAO,MAAM,6BAA6B;;;;;;;;;iCAmUzC,CAAC"}
1
+ {"version":3,"file":"user-self.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/users/resources/user-self.resource.specification.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAUH,OAAO,EACL,qBAAqB,IAAI,EAAE,EAG3B,mBAAmB,EACnB,UAAU,EAEX,MAAM,uBAAuB,CAAC;AA+B/B,eAAO,MAAM,6BAA6B;;;;;;;;;iCAoUzC,CAAC"}
@@ -13,12 +13,14 @@ import { CoreResourceOperation as Op, ResourcePrimaryScope, UserSchema, UserSelf
13
13
  import { HttpResponseStatusCode, resourceFrontendConfiguration, resourceSpecification, resourceSpecificationFromFrontendConfiguration, RETENTION_MARKER_FIELD_SPECS, } from '../../../_core/index.js';
14
14
  import { selfServiceFrontEndSuccessNotification, selfServiceUserEmailBlock, } from './self-service-user-notifications.shared.js';
15
15
  import { USERS_API_REFERENCE_USER_ID, usersApiReferenceExample, usersApiReferenceSummaryExample, } from './users-api-reference.examples.js';
16
+ import { EngineResourceSubDomain } from '../../engine-resource-sub-domain.js';
16
17
  const userSelfResourceUIBehavior = userSelfResourceUIBehaviorSource;
17
18
  export const userSelfResourceSpecification = resourceSpecificationFromFrontendConfiguration(resourceFrontendConfiguration(userSelfResourceUIBehavior), resourceSpecification(userSelfFactory, UserSchema, ({ schemaShape }) => ({
18
- purpose: 'Let the signed-in end user read and change their own identity row within safe, self-scoped API surfaces.',
19
+ purpose: 'The signed-in person\'s own account: read it and change what belongs to you, and nothing about anyone else.',
19
20
  businessRole: 'The user-facing counterpart to the administrative `USERS` resource — same schema, stricter access rules.',
20
21
  lifecycleRole: 'Exposes self-identity reads plus voluntary deactivation and reactivation, distinct from administrator-imposed suspension and erasure workflows.',
21
22
  audience: LabelAudience.END_USER,
23
+ subDomain: EngineResourceSubDomain.USERS,
22
24
  codeHandling: {
23
25
  mainSchema: {
24
26
  packageName: '@wildo-ai/saas-models',