@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
@@ -3,6 +3,7 @@ import { LabelAudience } from '@wildo-ai/presets-components-models';
3
3
  import { CodeDeclarationKind, CodeSymbolKind, FieldSemanticImportance, } from '@wildo-ai/zod-decorators';
4
4
  import { AdministrativeContinuityErrorCode, CORE_ORG_ROLES, CoreResourceOperation as Op, ErrorSeverity, ErrorType, OrganizationMemberSchema, OrganizationMemberStatus, OrganizationMembers_Operations, ResourcePrimaryScope, organizationMembersResourceConfiguration_InitializationFactory as organizationMembersFactory, } from '@wildo-ai/saas-models';
5
5
  import { HttpResponseStatusCode, resourceFrontendConfiguration, resourceSpecification, resourceSpecificationFromFrontendConfiguration, } from '../../../_core/index.js';
6
+ import { EngineResourceSubDomain } from '../../engine-resource-sub-domain.js';
6
7
  const organizationMembersResourceUIBehavior = organizationMembersUIBehaviorSource;
7
8
  const ORGANIZATION_MEMBER_EXAMPLE = {
8
9
  _id: 'organization_member_01HX2EXAMPLE',
@@ -45,6 +46,7 @@ export const organizationMembersResourceSpecification = resourceSpecificationFro
45
46
  businessRole: 'Use this resource to browse the organization directory and to manage invitations, membership access, and organization-level authority.',
46
47
  lifecycleRole: 'A membership begins as a pending invitation or an active provisioned membership, can be updated or suspended, and ends when the invitation is revoked or the member is removed.',
47
48
  audience: LabelAudience.ADMIN,
49
+ subDomain: EngineResourceSubDomain.ORGANIZATIONS,
48
50
  codeHandling: {
49
51
  mainSchema: {
50
52
  packageName: '@wildo-ai/saas-models',
@@ -1 +1 @@
1
- {"version":3,"file":"organization-members.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/organizations/resources/organization-members.resource.specification.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yCAAyC,IAAI,mCAAmC,EAAE,MAAM,8BAA8B,CAAC;AAChI,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAEpE,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,iCAAiC,EACjC,cAAc,EACd,qBAAqB,IAAI,EAAE,EAC3B,aAAa,EACb,SAAS,EACT,wBAAwB,EACxB,wBAAwB,EACxB,8BAA8B,EAC9B,oBAAoB,EACpB,8DAA8D,IAAI,0BAA0B,GAC7F,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,sBAAsB,EACtB,6BAA6B,EAC7B,qBAAqB,EACrB,8CAA8C,GAC/C,MAAM,6BAA6B,CAAC;AAOrC,MAAM,qCAAqC,GAAG,mCAAmF,CAAC;AAElI,MAAM,2BAA2B,GAAG;IAClC,GAAG,EAAE,kCAAkC;IACvC,MAAM,EAAE,mBAAmB;IAC3B,SAAS,EAAE,yBAAyB;IACpC,cAAc,EAAE,2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2CAA2C,EAAE;QAC7I,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE,qDAAqD,EAAE,SAAS,EAAE,qGAAqG,EAAE;QACjM,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE,uCAAuC,EAAE,SAAS,EAAE,yCAAyC,EAAE;QACvH,CAAC,8BAA8B,CAAC,OAAO,CAAC,EAAE,EAAE,OAAO,EAAE,8DAA8D,EAAE,SAAS,EAAE,oCAAoC,EAAE;QACtK,CAAC,8BAA8B,CAAC,UAAU,CAAC,EAAE,EAAE,OAAO,EAAE,mCAAmC,EAAE,SAAS,EAAE,qCAAqC,EAAE;QAC/I,CAAC,8BAA8B,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE,yFAAyF,EAAE,SAAS,EAAE,wDAAwD,EAAE;QACpN,sFAAsF;QACtF,kFAAkF;QAClF,8FAA8F;QAC9F,2FAA2F;QAC3F,sGAAsG;QACtG,2EAA2E;QAC3E,CAAC,8BAA8B,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE,0DAA0D,EAAE,SAAS,EAAE,mEAAmE,EAAE;KACjM;CACF,CAAC,CACH,CAAC","sourcesContent":["import { organizationMembersMainResourceUIBehavior as organizationMembersUIBehaviorSource } 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 AdministrativeContinuityErrorCode,\n CORE_ORG_ROLES,\n CoreResourceOperation as Op,\n ErrorSeverity,\n ErrorType,\n OrganizationMemberSchema,\n OrganizationMemberStatus,\n OrganizationMembers_Operations,\n ResourcePrimaryScope,\n organizationMembersResourceConfiguration_InitializationFactory as organizationMembersFactory,\n} from '@wildo-ai/saas-models';\nimport {\n HttpResponseStatusCode,\n resourceFrontendConfiguration,\n resourceSpecification,\n resourceSpecificationFromFrontendConfiguration,\n} from '~wildo-specifications/_core';\n\ntype Cfg = ReturnType<typeof organizationMembersFactory>;\ntype Custom = NonNullable<Cfg['customOperation']>;\ntype Core = Cfg['coreOperations'][number];\ntype Main = Cfg['mainSchema'];\n\nconst organizationMembersResourceUIBehavior = organizationMembersUIBehaviorSource as ResourceUIBehaviorConfig<Custom, Core, Main>;\n\nconst ORGANIZATION_MEMBER_EXAMPLE = {\n _id: 'organization_member_01HX2EXAMPLE',\n userId: 'user_01HX2EXAMPLE',\n userEmail: 'alex.morgan@example.com',\n organizationId: 'organization_01HX2EXAMPLE',\n roles: [CORE_ORG_ROLES.ORG_MEMBER],\n status: OrganizationMemberStatus.ACTIVE,\n userTitle: 'Staff Engineer',\n instanceLabel: 'Alex Morgan',\n createdAt: '2026-07-03T09:15:00.000Z',\n updatedAt: '2026-08-18T08:00:00.000Z',\n _version: 4,\n} as const;\n\nconst ORGANIZATION_MEMBER_SUMMARY_EXAMPLE = {\n _id: ORGANIZATION_MEMBER_EXAMPLE._id,\n userId: ORGANIZATION_MEMBER_EXAMPLE.userId,\n userEmail: ORGANIZATION_MEMBER_EXAMPLE.userEmail,\n organizationId: ORGANIZATION_MEMBER_EXAMPLE.organizationId,\n roles: ORGANIZATION_MEMBER_EXAMPLE.roles,\n status: ORGANIZATION_MEMBER_EXAMPLE.status,\n userTitle: ORGANIZATION_MEMBER_EXAMPLE.userTitle,\n instanceLabel: ORGANIZATION_MEMBER_EXAMPLE.instanceLabel,\n _version: ORGANIZATION_MEMBER_EXAMPLE._version,\n} as const;\n\nconst ORGANIZATION_MEMBER_CONTEXT_EXAMPLE = {\n ...ORGANIZATION_MEMBER_EXAMPLE,\n user: { _id: ORGANIZATION_MEMBER_EXAMPLE.userId },\n organization: { _id: ORGANIZATION_MEMBER_EXAMPLE.organizationId },\n} as const;\n\nfunction organizationMembersPage<T>(data: readonly T[]) {\n return {\n data,\n pagination: { page: 1, limit: 20, total: data.length, totalPages: data.length === 0 ? 0 : 1 },\n };\n}\n\nconst ORGANIZATION_MEMBERS_PAGE_REQUEST = { page: 1, limit: 20, sort: 'createdAt:desc' } as const;\n\nexport const organizationMembersResourceSpecification = resourceSpecificationFromFrontendConfiguration(\n resourceFrontendConfiguration(organizationMembersResourceUIBehavior),\n resourceSpecification(\n organizationMembersFactory,\n OrganizationMemberSchema,\n ({ schemaShape }) => ({\n purpose: 'Represents one person’s membership in an organization, including their organization roles, directory title, and current access state.',\n businessRole: 'Use this resource to browse the organization directory and to manage invitations, membership access, and organization-level authority.',\n lifecycleRole: 'A membership begins as a pending invitation or an active provisioned membership, can be updated or suspended, and ends when the invitation is revoked or the member is removed.',\n audience: LabelAudience.ADMIN,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'OrganizationMemberSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactory: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'organizationMembersResourceConfiguration_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: 'ORGANIZATION_MEMBERS',\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: 'OrganizationMembers_Operations',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n frontendConfigurationSources: [\n {\n packageName: '@wildo-ai/presets-components',\n exportName: 'organizationMembersMainResourceUIBehavior',\n symbolKind: CodeSymbolKind.UI_BEHAVIOR,\n },\n ],\n },\n fields: {\n userId: schemaShape.userId.foreignKeySpec({\n meaning: 'The `USERS` identity this membership grants organization access to — the junction’s subject party.',\n whyItMatters: 'A membership row is a link with no inherent identity; this FK is what a name/email resolves against (via `USER_PROFILES`) and, together with `organizationId`, forms the database-enforced business key that prevents duplicate memberships.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n roles: schemaShape.roles.arraySpec({\n meaning: 'Org-wide roles granted to this member — the authority set every access check evaluates for the user within this organization.',\n elementMeaning: 'One role identifier — a core org role token (`CORE_ORG_ROLES`) or an app-defined custom role string.',\n elementType: {\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CORE_ORG_ROLES',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n }),\n userTitle: schemaShape.userTitle.stringSpec({ meaning: 'Authored job title / role label for the member (e.g. “Engineering Lead”). Distinct from the directory row label — that is the linked user’s name (see `instanceLabel`).' }),\n instanceLabel: schemaShape.instanceLabel.stringSpec({ meaning: 'Computed directory label for the membership — the linked user’s name, forwarded live from `USER_PROFILES` (joining on `userId`, rendering first/last name) and resolved SERVER-SIDE at read time via the virtual-field pipeline. A junction row has no inherent name; this gives it one without denormalizing the mutable name (never stale, tenant-safe, not persisted). The frontend uses it directly as `getFrontendResourceLabel`; it falls back to the immutable `userEmail` when the profile is unavailable.' }),\n userEmail: schemaShape.userEmail.stringSpec({ meaning: 'Denormalized, immutable copy of the linked user’s email captured at membership creation. Two roles: the OWN-FIELD half of member search (first/last name are searched relationally through `USER_PROFILES`, never denormalized), and the secondary label fallback behind the server-resolved `instanceLabel`. The live email lives on `USERS`; this copy is display-hidden and never client-writable.' }),\n status: schemaShape.status.enumSpec({\n meaning: 'Membership lifecycle and access posture in this org.',\n importance: FieldSemanticImportance.PRIMARY,\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'OrganizationMemberStatus',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n values: {\n [OrganizationMemberStatus.INVITED]: { meaning: 'A pending invitation — the membership was extended (via CREATE) but the invitee has not accepted yet. Carries a single-use accept link. Flips to ACTIVE on acceptance; the row is DELETED on decline/revoke (no terminal \"rejected\" status — the invite IS the membership in this pending state).' },\n [OrganizationMemberStatus.ACTIVE]: { meaning: 'Can participate as roles allow.' },\n [OrganizationMemberStatus.INACTIVE]: { meaning: 'Record retained but not participating.' },\n [OrganizationMemberStatus.SUSPENDED]: { meaning: 'Access blocked in-org while row remains.' },\n },\n }),\n scheduledReactivationAt: schemaShape.scheduledReactivationAt.dateSpec({\n meaning: 'When an automated sweep returns this membership to ACTIVE. Set by SUSPEND when the caller time-boxes the suspension (its request contract calls this `suspensionEndDate`), cleared by REACTIVATE. Absent means the suspension is indefinite and only an explicit REACTIVATE lifts it — the default, since an unbounded suspension is the safer reading of “suspend”.',\n whyItMatters: 'Named for the effect rather than the cause so the identical field on `USERS` — which serves both admin suspension and voluntary self-deactivation — carries the same name and the reactivation sweep queries one field everywhere. Server-owned: only the transition operations write it, exactly as for `status`.',\n }),\n },\n operations: {\n [Op.COUNT]: {\n purpose: 'Return the total number of memberships visible in the selected organization or relationship scope.',\n outcome: 'A single non-negative membership count is returned.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The current membership count is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an organization member permitted to read the membership count.' },\n ],\n idempotent: true,\n examples: [{\n title: 'Count organization memberships',\n response: { count: 37 },\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n [Op.CREATE]: {\n purpose: 'Invite a person by email, or provision an existing user through a user-linked relationship route. Email invitations create an INVITED membership; direct provisioning creates an ACTIVE membership.',\n outcome: 'The membership is created with its initial organization roles. An invitation sends one single-use acceptance link; direct provisioning sends no acceptance link. The resolved role grant is recorded in the audit trail.',\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'A membership row was created linking the user to the organization with its initial roles, and the new row is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The user reference, roles, or title fail schema validation.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an organization admin permitted to provision members.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The user already holds a membership in this organization.' },\n ],\n idempotent: false,\n examples: [\n {\n title: 'Invite a member by email with an initial title',\n request: {\n userEmail: 'new.lead@acme.com',\n userTitle: 'Engineering Lead',\n roles: [CORE_ORG_ROLES.ORG_MEMBER],\n },\n response: {\n ...ORGANIZATION_MEMBER_EXAMPLE,\n userEmail: 'new.lead@acme.com',\n userTitle: 'Engineering Lead',\n status: OrganizationMemberStatus.INVITED,\n invitedByUserId: 'user_admin_01HX2EXAMPLE',\n invitedAt: '2026-08-18T08:00:00.000Z',\n },\n forStatus: HttpResponseStatusCode.CREATED_201,\n },\n ],\n },\n [Op.READ]: {\n purpose: 'Retrieve one membership by its route identity.',\n outcome: 'The member’s organization roles, lifecycle state, directory title, and public identifiers are returned.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The membership was found and its roles, title, state, and public identifiers are returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No membership row exists for the supplied id in the caller’s organization.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an organization member permitted to read the membership directory.' },\n ],\n idempotent: true,\n examples: [{\n title: 'Inspect an active organization member',\n response: ORGANIZATION_MEMBER_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n variants: {\n context: {\n examples: [{\n title: 'Inspect a member with relationship identifiers',\n response: ORGANIZATION_MEMBER_CONTEXT_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n summary: {\n examples: [{\n title: 'Inspect the compact member summary',\n response: ORGANIZATION_MEMBER_SUMMARY_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n },\n [Op.LIST]: {\n purpose: 'Browse the organization membership directory as a paginated collection.',\n outcome: 'A page of memberships and pagination metadata is returned.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of membership rows for the organization directory.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an organization member permitted to browse the membership directory.' },\n ],\n idempotent: true,\n examples: [{\n title: 'Browse organization members',\n request: ORGANIZATION_MEMBERS_PAGE_REQUEST,\n response: organizationMembersPage([ORGANIZATION_MEMBER_EXAMPLE]),\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n variants: {\n context: {\n examples: [{\n title: 'Browse members with relationship identifiers',\n request: ORGANIZATION_MEMBERS_PAGE_REQUEST,\n response: organizationMembersPage([{\n ...ORGANIZATION_MEMBER_EXAMPLE,\n user: { _id: ORGANIZATION_MEMBER_EXAMPLE.userId },\n organization: { _id: ORGANIZATION_MEMBER_EXAMPLE.organizationId },\n }]),\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n summary: {\n examples: [{\n title: 'Browse compact member summaries',\n request: ORGANIZATION_MEMBERS_PAGE_REQUEST,\n response: organizationMembersPage([ORGANIZATION_MEMBER_SUMMARY_EXAMPLE]),\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n },\n [Op.SEARCH]: {\n purpose: 'Searchable member roster — matches on the member’s email (own field) and, through the linked user profile, on first/last name.',\n outcome: 'Org members matching the query by email or name, for people pickers and large-roster look-ups.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of members whose email, or whose linked profile’s first/last name, matches the search query.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an organization member permitted to search the membership directory.' },\n ],\n idempotent: true,\n examples: [{\n title: 'Find active members by email or name',\n request: { q: 'alex', status: OrganizationMemberStatus.ACTIVE, page: 1, limit: 20, sort: 'status:asc' },\n response: organizationMembersPage([ORGANIZATION_MEMBER_EXAMPLE]),\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n [Op.UPDATE]: {\n purpose: 'Update a member’s directory title or organization roles. This is the only API operation used to change a membership’s role set.',\n outcome: 'The updated membership is returned. Role changes take effect for subsequent authorization decisions and emit a dedicated authorization audit event with the previous and resulting role sets.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The membership’s title/org-unit/roles were updated and the new state is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The edited title, org-unit, or role set fails schema validation.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No membership row exists for the supplied id in the caller’s organization.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an organization admin permitted to edit memberships.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The edit would remove the LAST administratively usable owner of the organization — either by rewriting `roles` so they no longer confer `ORG_OWNER` (directly or by inheritance), or by moving the membership `status` out of ACTIVE (the only status whose roles reach `initiatorRoles`). Grant an owner role to another active member first. Not a 403: the caller IS authorized — the current state of the organization forbids it. No TENANT authority lifts this floor; a platform administrator can repair an already-stranded organization through `grantOwnership`, which is the only cross-tenant variant this resource declares. An owner counts only when the membership is ACTIVE AND the linked user is ACTIVE; organizations in a terminal state (CANCELLED, DELETED, soft-deleted) are not protected.' },\n ],\n idempotent: true,\n examples: [\n {\n title: 'Update a member’s directory title without changing authority',\n request: { userTitle: 'Staff Engineer' },\n response: {\n ...ORGANIZATION_MEMBER_EXAMPLE,\n userTitle: 'Staff Engineer',\n },\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n [Op.DELETE]: {\n purpose: 'Remove an accepted member from the organization. Use REVOKE instead for a still-pending invitation.',\n outcome: 'The membership and its organization-unit assignments are removed, organization-scoped access ends, and the withdrawn roles and unit grants are recorded in the audit trail.',\n responseStatuses: [\n { code: HttpResponseStatusCode.NO_CONTENT_204, meaning: 'The membership row was removed; no body is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No membership row exists for the supplied id (or it was already removed).' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an organization admin permitted to remove members.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The target is the LAST administratively usable owner of the organization. Destroying the row that holds the last tenant authority strands the organization exactly as demoting it would, so it is refused on the same terms — grant an owner role to another active member first. Also returned when the membership snapshot cannot be read, since the floor must not assume an unreadable row is not the last owner.' },\n ],\n idempotent: true,\n examples: [{\n title: 'Refuse removal of the last usable organization owner',\n response: {\n error: {\n type: ErrorType.CONFLICT,\n severity: ErrorSeverity.MEDIUM,\n message: 'Resource conflict detected',\n customMessage: 'Grant ownership to another active member before removing this member.',\n code: AdministrativeContinuityErrorCode.LAST_ORGANIZATION_OWNER,\n timestamp: '2026-08-18T08:00:00.000Z',\n },\n },\n forStatus: HttpResponseStatusCode.CONFLICT_409,\n }],\n },\n [OrganizationMembers_Operations.SUSPEND]: {\n operationId: OrganizationMembers_Operations.SUSPEND,\n purpose: 'Temporarily block access without deleting the membership record.',\n outcome: 'The membership becomes SUSPENDED and no longer grants organization access. If `suspensionEndDate` is supplied, it is exposed as `scheduledReactivationAt` and the membership is reactivated after that instant; otherwise an administrator must reactivate it explicitly.',\n whenToUse: 'Use for temporary security or policy holds where the membership history must remain available. The last usable organization owner cannot be suspended.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The membership transitioned to suspended and the updated row is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No membership row exists for the supplied id in the caller’s organization.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an organization admin permitted to suspend members.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The operation is unavailable because the membership is not currently ACTIVE.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The membership is not ACTIVE, so this is not a legal transition — an INVITED row has not accepted yet (cancel it with REVOKE, which also revokes the accept token) and an INACTIVE or already-SUSPENDED one is already out. Carries `resource_status_transition_conflict`, whose context names the current status, the target status and the permitted source statuses, so a client can re-read and show the real state rather than treating it as an opaque clash. Most callers meet the earlier `enabledCondition` gate (403) instead; this reference covers the paths that gate does not reach.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The target is the organization’s LAST administratively usable owner (an ACTIVE membership holding a role that confers `ORG_OWNER`, directly or by inheritance, whose linked user is also ACTIVE). Suspending it leaves the organization with no principal able to administer it, so the tenant cannot administer itself afterwards. Grant an owner role to another active member first. Recovery is not impossible \\u2014 a platform administrator holds `grantOwnership` \\u2014 but it is an out-of-tenant escalation, which is why the in-tenant refusal stands. Not a 403: the caller IS authorized; the current state of the organization forbids it. Carries the stable client-branchable `code: LAST_ORGANIZATION_OWNER` — a DIFFERENT code from the application floor, because the remedy is scoped to this organization.' },\n ],\n idempotent: true,\n examples: [\n {\n title: 'Suspend a member until a scheduled review date',\n request: {\n suspensionReason: 'Access paused while the security review is completed.',\n suspensionEndDate: '2026-09-01T09:00:00.000Z',\n },\n response: {\n ...ORGANIZATION_MEMBER_EXAMPLE,\n status: OrganizationMemberStatus.SUSPENDED,\n scheduledReactivationAt: '2026-09-01T09:00:00.000Z',\n },\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n [OrganizationMembers_Operations.REACTIVATE]: {\n operationId: OrganizationMembers_Operations.REACTIVATE,\n purpose: 'Restore access for a currently suspended organization member.',\n outcome: 'The membership becomes ACTIVE with its existing roles and any scheduled reactivation deadline is cleared.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The suspended membership transitioned back to active and the updated row is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No membership row exists for the supplied id in the caller’s organization.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an organization admin permitted to reactivate members.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The operation is unavailable because the membership is not currently SUSPENDED.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The membership is not SUSPENDED, so there is nothing to reactivate — notably an INVITED row is refused here rather than being silently promoted, which would grant a membership nobody accepted. Carries `resource_status_transition_conflict` with the current and permitted statuses in its context.' },\n ],\n idempotent: true,\n examples: [\n {\n title: 'Reactivate a member after the review is complete',\n request: { reason: 'Security review completed without further action.' },\n response: {\n ...ORGANIZATION_MEMBER_EXAMPLE,\n status: OrganizationMemberStatus.ACTIVE,\n },\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n [OrganizationMembers_Operations.REVOKE]: {\n operationId: OrganizationMembers_Operations.REVOKE,\n purpose: 'Cancel a still-pending organization invitation. Use DELETE instead for an accepted member.',\n outcome: 'The INVITED membership is removed, its acceptance token can no longer be used, and the invitee and acting administrator are notified. The optional reason is retained in the audit event.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The pending invitation was revoked (the INVITED membership removed) and a confirmation is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No membership row exists for the supplied id in the caller’s organization.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an organization admin permitted to revoke invitations.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The operation is unavailable because the membership is no longer INVITED.' },\n ],\n idempotent: false,\n examples: [\n {\n title: 'Revoke a pending invitation before it is accepted',\n request: { reason: 'The invitee joined through another organization.' },\n response: { id: ORGANIZATION_MEMBER_EXAMPLE._id, deletedAt: '2026-08-18T08:05:00.000Z' },\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n [OrganizationMembers_Operations.GRANT_OWNERSHIP]: {\n operationId: OrganizationMembers_Operations.GRANT_OWNERSHIP,\n purpose: 'Platform-tier repair door: grant `ORG_OWNER` to an EXISTING member of an organization that has no administratively usable owner left.',\n outcome: 'The existing ACTIVE membership gains the owner-conferring role; no role is removed and no new membership is created. The cross-tenant repair is audited with the required justification and the organization is notified.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The member now holds an owner-conferring role. Idempotent: a member who already owns the organization returns 200 with their role set unchanged.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No membership row exists for the supplied id.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller does not hold `APP_ADMIN_SUPER_ADMIN` at APPLICATION scope. An organization-scope caller who merely writes that string into their own membership `roles` is denied: the role gate resolves an organization-scope entry against the organization role table, which does not contain that key.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The target membership is not administratively usable (only ACTIVE rows confer roles), or the linked user is not usable. Granting either would answer 200 while leaving the organization with zero usable owners \\u2014 a repair that repairs nothing and stops the operator looking. Fix the membership or user lifecycle first. Also returned when the user row cannot be read, since absence is not evidence of a usable owner.' },\n ],\n idempotent: true,\n examples: [\n {\n title: 'Repair a stranded organization by granting an existing member ownership',\n request: { justification: 'Restore tenant administration after the sole owner was removed during account recovery.' },\n response: {\n ...ORGANIZATION_MEMBER_EXAMPLE,\n roles: [CORE_ORG_ROLES.ORG_MEMBER, CORE_ORG_ROLES.ORG_OWNER],\n status: OrganizationMemberStatus.ACTIVE,\n },\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n [OrganizationMembers_Operations.RESEND]: {\n operationId: OrganizationMembers_Operations.RESEND,\n purpose: 'Re-mint and re-send the accept link for a still-pending invitation (an INVITED membership).',\n outcome: 'A fresh single-use accept token is issued (revoking any prior token for this membership) and the invitation email is re-delivered to the invitee.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A new accept token was minted and the invitation email re-sent; a confirmation is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No membership row exists for the supplied id in the caller’s organization.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an organization admin permitted to resend invitations.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The operation is unavailable because the membership is no longer INVITED.' },\n ],\n idempotent: false,\n examples: [{\n title: 'Send a fresh acceptance link for a pending invitation',\n request: {},\n response: {\n ...ORGANIZATION_MEMBER_EXAMPLE,\n status: OrganizationMemberStatus.INVITED,\n invitedByUserId: 'user_admin_01HX2EXAMPLE',\n invitedAt: '2026-08-18T08:00:00.000Z',\n },\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n businessConstraints: [\n 'CREATE is polymorphic: the accept-link email AND the single-use accept token fire ONLY for the INVITE branch (resulting status INVITED). A direct/system provisioning create (userId supplied — founder org-owner grant, SSO JIT, SCIM) persists an ACTIVE row and fires NEITHER side-effect (nothing to accept; its `userEmail` is the member’s own address). The gate is keyed on the resulting `status`, not on which identity field the caller supplied.',\n 'Factory declares userNotifications on several mutations; companion should ground email/SMS copy on runtime `userNotifications[]`, not invent channels absent from the configuration.',\n 'Member SEARCH matches on `userEmail` (a denormalized own field) and on the linked user’s first/last name. The name match is RELATIONAL: the framework runs a secondary search on `USER_PROFILES` and intersects on `userId` — names are read live (never stale) and are not denormalized onto the member row. The result stays scoped to the caller’s organization.',\n ],\n }),\n { resourcePrimaryScope: ResourcePrimaryScope.ORGANIZATIONS },\n ),\n () => ({\n views: {\n [Op.COUNT]: { purpose: 'Header metrics and cap enforcement surfaces.', whenToUse: 'Dashboards, billing seat counts, and upgrade prompts.' },\n [Op.CREATE]: { purpose: 'Invite (writes an INVITED row + emails an accept link) or direct-add flows in org admin UIs.', whenToUse: 'Inviting a teammate by email, onboarding, and bulk import.' },\n [Op.READ]: { purpose: 'Profile drawer and permission summaries.', whenToUse: 'Click-through from directory rows.' },\n [Op.LIST]: { purpose: 'Addressable roster list per merged preset (only `LIST` is addressable).', whenToUse: 'Default org directory experience.' },\n [Op.SEARCH]: { purpose: 'Member discovery by email or name when search is enabled.', whenToUse: 'Large-tenant look-ups and people pickers.' },\n [Op.UPDATE]: { purpose: 'Inline edit of metadata, roles, and org-unit links.', whenToUse: 'HR and IT directory maintenance, and every role change — there is no dedicated promote/demote verb.' },\n [Op.DELETE]: { purpose: 'Revoke and remove directory presence.', whenToUse: 'Offboarding, abuse, and access reviews.' },\n [OrganizationMembers_Operations.SUSPEND]: { purpose: 'Degraded access while retaining audit of membership history.', whenToUse: 'Short-term ToS and security holds.' },\n [OrganizationMembers_Operations.REACTIVATE]: { purpose: 'Re-open access after hold clears.', whenToUse: 'After payment or review completion.' },\n [OrganizationMembers_Operations.REVOKE]: { purpose: 'Cancel a still-pending invitation (deletes the INVITED row + revokes its accept token).', whenToUse: 'From the members list, on a row still showing INVITED.' },\n // GRANT_OWNERSHIP is deliberately ABSENT here, and the omission is the documentation.\n // `views` may only describe operations the merged frontend configuration surfaces\n // (`resourceSpecificationFromFrontendConfiguration` throws otherwise), and this operation has\n // no tenant-facing surface by construction: its caller is a platform operator who is NOT a\n // member of the organization, so the member roster \\u2014 which is a tenant surface \\u2014 is exactly\n // where it must not appear. It is reached from support/operations tooling.\n [OrganizationMembers_Operations.RESEND]: { purpose: 'Re-issue the accept link for a still-pending invitation.', whenToUse: 'When an invitee lost or never received the original invite email.' },\n },\n }),\n);\n"]}
1
+ {"version":3,"file":"organization-members.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/organizations/resources/organization-members.resource.specification.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yCAAyC,IAAI,mCAAmC,EAAE,MAAM,8BAA8B,CAAC;AAChI,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAEpE,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,uBAAuB,GACxB,MAAM,0BA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E,EAAE,OAAO,EAAE,0DAA0D,EAAE,SAAS,EAAE,mEAAmE,EAAE;KACjM;CACF,CAAC,CACH,CAAC","sourcesContent":["import { organizationMembersMainResourceUIBehavior as organizationMembersUIBehaviorSource } 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 AdministrativeContinuityErrorCode,\n CORE_ORG_ROLES,\n CoreResourceOperation as Op,\n ErrorSeverity,\n ErrorType,\n OrganizationMemberSchema,\n OrganizationMemberStatus,\n OrganizationMembers_Operations,\n ResourcePrimaryScope,\n organizationMembersResourceConfiguration_InitializationFactory as organizationMembersFactory,\n} from '@wildo-ai/saas-models';\nimport {\n HttpResponseStatusCode,\n resourceFrontendConfiguration,\n resourceSpecification,\n resourceSpecificationFromFrontendConfiguration,\n} from '~wildo-specifications/_core';\nimport { EngineResourceSubDomain } from '../../engine-resource-sub-domain';\n\ntype Cfg = ReturnType<typeof organizationMembersFactory>;\ntype Custom = NonNullable<Cfg['customOperation']>;\ntype Core = Cfg['coreOperations'][number];\ntype Main = Cfg['mainSchema'];\n\nconst organizationMembersResourceUIBehavior = organizationMembersUIBehaviorSource as ResourceUIBehaviorConfig<Custom, Core, Main>;\n\nconst ORGANIZATION_MEMBER_EXAMPLE = {\n _id: 'organization_member_01HX2EXAMPLE',\n userId: 'user_01HX2EXAMPLE',\n userEmail: 'alex.morgan@example.com',\n organizationId: 'organization_01HX2EXAMPLE',\n roles: [CORE_ORG_ROLES.ORG_MEMBER],\n status: OrganizationMemberStatus.ACTIVE,\n userTitle: 'Staff Engineer',\n instanceLabel: 'Alex Morgan',\n createdAt: '2026-07-03T09:15:00.000Z',\n updatedAt: '2026-08-18T08:00:00.000Z',\n _version: 4,\n} as const;\n\nconst ORGANIZATION_MEMBER_SUMMARY_EXAMPLE = {\n _id: ORGANIZATION_MEMBER_EXAMPLE._id,\n userId: ORGANIZATION_MEMBER_EXAMPLE.userId,\n userEmail: ORGANIZATION_MEMBER_EXAMPLE.userEmail,\n organizationId: ORGANIZATION_MEMBER_EXAMPLE.organizationId,\n roles: ORGANIZATION_MEMBER_EXAMPLE.roles,\n status: ORGANIZATION_MEMBER_EXAMPLE.status,\n userTitle: ORGANIZATION_MEMBER_EXAMPLE.userTitle,\n instanceLabel: ORGANIZATION_MEMBER_EXAMPLE.instanceLabel,\n _version: ORGANIZATION_MEMBER_EXAMPLE._version,\n} as const;\n\nconst ORGANIZATION_MEMBER_CONTEXT_EXAMPLE = {\n ...ORGANIZATION_MEMBER_EXAMPLE,\n user: { _id: ORGANIZATION_MEMBER_EXAMPLE.userId },\n organization: { _id: ORGANIZATION_MEMBER_EXAMPLE.organizationId },\n} as const;\n\nfunction organizationMembersPage<T>(data: readonly T[]) {\n return {\n data,\n pagination: { page: 1, limit: 20, total: data.length, totalPages: data.length === 0 ? 0 : 1 },\n };\n}\n\nconst ORGANIZATION_MEMBERS_PAGE_REQUEST = { page: 1, limit: 20, sort: 'createdAt:desc' } as const;\n\nexport const organizationMembersResourceSpecification = resourceSpecificationFromFrontendConfiguration(\n resourceFrontendConfiguration(organizationMembersResourceUIBehavior),\n resourceSpecification(\n organizationMembersFactory,\n OrganizationMemberSchema,\n ({ schemaShape }) => ({\n purpose: 'Represents one person’s membership in an organization, including their organization roles, directory title, and current access state.',\n businessRole: 'Use this resource to browse the organization directory and to manage invitations, membership access, and organization-level authority.',\n lifecycleRole: 'A membership begins as a pending invitation or an active provisioned membership, can be updated or suspended, and ends when the invitation is revoked or the member is removed.',\n audience: LabelAudience.ADMIN,\n subDomain: EngineResourceSubDomain.ORGANIZATIONS,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'OrganizationMemberSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactory: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'organizationMembersResourceConfiguration_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: 'ORGANIZATION_MEMBERS',\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: 'OrganizationMembers_Operations',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n frontendConfigurationSources: [\n {\n packageName: '@wildo-ai/presets-components',\n exportName: 'organizationMembersMainResourceUIBehavior',\n symbolKind: CodeSymbolKind.UI_BEHAVIOR,\n },\n ],\n },\n fields: {\n userId: schemaShape.userId.foreignKeySpec({\n meaning: 'The `USERS` identity this membership grants organization access to — the junction’s subject party.',\n whyItMatters: 'A membership row is a link with no inherent identity; this FK is what a name/email resolves against (via `USER_PROFILES`) and, together with `organizationId`, forms the database-enforced business key that prevents duplicate memberships.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n roles: schemaShape.roles.arraySpec({\n meaning: 'Org-wide roles granted to this member — the authority set every access check evaluates for the user within this organization.',\n elementMeaning: 'One role identifier — a core org role token (`CORE_ORG_ROLES`) or an app-defined custom role string.',\n elementType: {\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CORE_ORG_ROLES',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n }),\n userTitle: schemaShape.userTitle.stringSpec({ meaning: 'Authored job title / role label for the member (e.g. “Engineering Lead”). Distinct from the directory row label — that is the linked user’s name (see `instanceLabel`).' }),\n instanceLabel: schemaShape.instanceLabel.stringSpec({ meaning: 'Computed directory label for the membership — the linked user’s name, forwarded live from `USER_PROFILES` (joining on `userId`, rendering first/last name) and resolved SERVER-SIDE at read time via the virtual-field pipeline. A junction row has no inherent name; this gives it one without denormalizing the mutable name (never stale, tenant-safe, not persisted). The frontend uses it directly as `getFrontendResourceLabel`; it falls back to the immutable `userEmail` when the profile is unavailable.' }),\n userEmail: schemaShape.userEmail.stringSpec({ meaning: 'Denormalized, immutable copy of the linked user’s email captured at membership creation. Two roles: the OWN-FIELD half of member search (first/last name are searched relationally through `USER_PROFILES`, never denormalized), and the secondary label fallback behind the server-resolved `instanceLabel`. The live email lives on `USERS`; this copy is display-hidden and never client-writable.' }),\n status: schemaShape.status.enumSpec({\n meaning: 'Membership lifecycle and access posture in this org.',\n importance: FieldSemanticImportance.PRIMARY,\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'OrganizationMemberStatus',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n values: {\n [OrganizationMemberStatus.INVITED]: { meaning: 'A pending invitation — the membership was extended (via CREATE) but the invitee has not accepted yet. Carries a single-use accept link. Flips to ACTIVE on acceptance; the row is DELETED on decline/revoke (no terminal \"rejected\" status — the invite IS the membership in this pending state).' },\n [OrganizationMemberStatus.ACTIVE]: { meaning: 'Can participate as roles allow.' },\n [OrganizationMemberStatus.INACTIVE]: { meaning: 'Record retained but not participating.' },\n [OrganizationMemberStatus.SUSPENDED]: { meaning: 'Access blocked in-org while row remains.' },\n },\n }),\n scheduledReactivationAt: schemaShape.scheduledReactivationAt.dateSpec({\n meaning: 'When an automated sweep returns this membership to ACTIVE. Set by SUSPEND when the caller time-boxes the suspension (its request contract calls this `suspensionEndDate`), cleared by REACTIVATE. Absent means the suspension is indefinite and only an explicit REACTIVATE lifts it — the default, since an unbounded suspension is the safer reading of “suspend”.',\n whyItMatters: 'Named for the effect rather than the cause so the identical field on `USERS` — which serves both admin suspension and voluntary self-deactivation — carries the same name and the reactivation sweep queries one field everywhere. Server-owned: only the transition operations write it, exactly as for `status`.',\n }),\n },\n operations: {\n [Op.COUNT]: {\n purpose: 'Return the total number of memberships visible in the selected organization or relationship scope.',\n outcome: 'A single non-negative membership count is returned.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The current membership count is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an organization member permitted to read the membership count.' },\n ],\n idempotent: true,\n examples: [{\n title: 'Count organization memberships',\n response: { count: 37 },\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n [Op.CREATE]: {\n purpose: 'Invite a person by email, or provision an existing user through a user-linked relationship route. Email invitations create an INVITED membership; direct provisioning creates an ACTIVE membership.',\n outcome: 'The membership is created with its initial organization roles. An invitation sends one single-use acceptance link; direct provisioning sends no acceptance link. The resolved role grant is recorded in the audit trail.',\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'A membership row was created linking the user to the organization with its initial roles, and the new row is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The user reference, roles, or title fail schema validation.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an organization admin permitted to provision members.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The user already holds a membership in this organization.' },\n ],\n idempotent: false,\n examples: [\n {\n title: 'Invite a member by email with an initial title',\n request: {\n userEmail: 'new.lead@acme.com',\n userTitle: 'Engineering Lead',\n roles: [CORE_ORG_ROLES.ORG_MEMBER],\n },\n response: {\n ...ORGANIZATION_MEMBER_EXAMPLE,\n userEmail: 'new.lead@acme.com',\n userTitle: 'Engineering Lead',\n status: OrganizationMemberStatus.INVITED,\n invitedByUserId: 'user_admin_01HX2EXAMPLE',\n invitedAt: '2026-08-18T08:00:00.000Z',\n },\n forStatus: HttpResponseStatusCode.CREATED_201,\n },\n ],\n },\n [Op.READ]: {\n purpose: 'Retrieve one membership by its route identity.',\n outcome: 'The member’s organization roles, lifecycle state, directory title, and public identifiers are returned.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The membership was found and its roles, title, state, and public identifiers are returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No membership row exists for the supplied id in the caller’s organization.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an organization member permitted to read the membership directory.' },\n ],\n idempotent: true,\n examples: [{\n title: 'Inspect an active organization member',\n response: ORGANIZATION_MEMBER_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n variants: {\n context: {\n examples: [{\n title: 'Inspect a member with relationship identifiers',\n response: ORGANIZATION_MEMBER_CONTEXT_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n summary: {\n examples: [{\n title: 'Inspect the compact member summary',\n response: ORGANIZATION_MEMBER_SUMMARY_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n },\n [Op.LIST]: {\n purpose: 'Browse the organization membership directory as a paginated collection.',\n outcome: 'A page of memberships and pagination metadata is returned.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of membership rows for the organization directory.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an organization member permitted to browse the membership directory.' },\n ],\n idempotent: true,\n examples: [{\n title: 'Browse organization members',\n request: ORGANIZATION_MEMBERS_PAGE_REQUEST,\n response: organizationMembersPage([ORGANIZATION_MEMBER_EXAMPLE]),\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n variants: {\n context: {\n examples: [{\n title: 'Browse members with relationship identifiers',\n request: ORGANIZATION_MEMBERS_PAGE_REQUEST,\n response: organizationMembersPage([{\n ...ORGANIZATION_MEMBER_EXAMPLE,\n user: { _id: ORGANIZATION_MEMBER_EXAMPLE.userId },\n organization: { _id: ORGANIZATION_MEMBER_EXAMPLE.organizationId },\n }]),\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n summary: {\n examples: [{\n title: 'Browse compact member summaries',\n request: ORGANIZATION_MEMBERS_PAGE_REQUEST,\n response: organizationMembersPage([ORGANIZATION_MEMBER_SUMMARY_EXAMPLE]),\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n },\n [Op.SEARCH]: {\n purpose: 'Searchable member roster — matches on the member’s email (own field) and, through the linked user profile, on first/last name.',\n outcome: 'Org members matching the query by email or name, for people pickers and large-roster look-ups.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of members whose email, or whose linked profile’s first/last name, matches the search query.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an organization member permitted to search the membership directory.' },\n ],\n idempotent: true,\n examples: [{\n title: 'Find active members by email or name',\n request: { q: 'alex', status: OrganizationMemberStatus.ACTIVE, page: 1, limit: 20, sort: 'status:asc' },\n response: organizationMembersPage([ORGANIZATION_MEMBER_EXAMPLE]),\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n [Op.UPDATE]: {\n purpose: 'Update a member’s directory title or organization roles. This is the only API operation used to change a membership’s role set.',\n outcome: 'The updated membership is returned. Role changes take effect for subsequent authorization decisions and emit a dedicated authorization audit event with the previous and resulting role sets.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The membership’s title/org-unit/roles were updated and the new state is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The edited title, org-unit, or role set fails schema validation.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No membership row exists for the supplied id in the caller’s organization.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an organization admin permitted to edit memberships.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The edit would remove the LAST administratively usable owner of the organization — either by rewriting `roles` so they no longer confer `ORG_OWNER` (directly or by inheritance), or by moving the membership `status` out of ACTIVE (the only status whose roles reach `initiatorRoles`). Grant an owner role to another active member first. Not a 403: the caller IS authorized — the current state of the organization forbids it. No TENANT authority lifts this floor; a platform administrator can repair an already-stranded organization through `grantOwnership`, which is the only cross-tenant variant this resource declares. An owner counts only when the membership is ACTIVE AND the linked user is ACTIVE; organizations in a terminal state (CANCELLED, DELETED, soft-deleted) are not protected.' },\n ],\n idempotent: true,\n examples: [\n {\n title: 'Update a member’s directory title without changing authority',\n request: { userTitle: 'Staff Engineer' },\n response: {\n ...ORGANIZATION_MEMBER_EXAMPLE,\n userTitle: 'Staff Engineer',\n },\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n [Op.DELETE]: {\n purpose: 'Remove an accepted member from the organization. Use REVOKE instead for a still-pending invitation.',\n outcome: 'The membership and its organization-unit assignments are removed, organization-scoped access ends, and the withdrawn roles and unit grants are recorded in the audit trail.',\n responseStatuses: [\n { code: HttpResponseStatusCode.NO_CONTENT_204, meaning: 'The membership row was removed; no body is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No membership row exists for the supplied id (or it was already removed).' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an organization admin permitted to remove members.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The target is the LAST administratively usable owner of the organization. Destroying the row that holds the last tenant authority strands the organization exactly as demoting it would, so it is refused on the same terms — grant an owner role to another active member first. Also returned when the membership snapshot cannot be read, since the floor must not assume an unreadable row is not the last owner.' },\n ],\n idempotent: true,\n examples: [{\n title: 'Refuse removal of the last usable organization owner',\n response: {\n error: {\n type: ErrorType.CONFLICT,\n severity: ErrorSeverity.MEDIUM,\n message: 'Resource conflict detected',\n customMessage: 'Grant ownership to another active member before removing this member.',\n code: AdministrativeContinuityErrorCode.LAST_ORGANIZATION_OWNER,\n timestamp: '2026-08-18T08:00:00.000Z',\n },\n },\n forStatus: HttpResponseStatusCode.CONFLICT_409,\n }],\n },\n [OrganizationMembers_Operations.SUSPEND]: {\n operationId: OrganizationMembers_Operations.SUSPEND,\n purpose: 'Temporarily block access without deleting the membership record.',\n outcome: 'The membership becomes SUSPENDED and no longer grants organization access. If `suspensionEndDate` is supplied, it is exposed as `scheduledReactivationAt` and the membership is reactivated after that instant; otherwise an administrator must reactivate it explicitly.',\n whenToUse: 'Use for temporary security or policy holds where the membership history must remain available. The last usable organization owner cannot be suspended.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The membership transitioned to suspended and the updated row is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No membership row exists for the supplied id in the caller’s organization.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an organization admin permitted to suspend members.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The operation is unavailable because the membership is not currently ACTIVE.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The membership is not ACTIVE, so this is not a legal transition — an INVITED row has not accepted yet (cancel it with REVOKE, which also revokes the accept token) and an INACTIVE or already-SUSPENDED one is already out. Carries `resource_status_transition_conflict`, whose context names the current status, the target status and the permitted source statuses, so a client can re-read and show the real state rather than treating it as an opaque clash. Most callers meet the earlier `enabledCondition` gate (403) instead; this reference covers the paths that gate does not reach.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The target is the organization’s LAST administratively usable owner (an ACTIVE membership holding a role that confers `ORG_OWNER`, directly or by inheritance, whose linked user is also ACTIVE). Suspending it leaves the organization with no principal able to administer it, so the tenant cannot administer itself afterwards. Grant an owner role to another active member first. Recovery is not impossible \\u2014 a platform administrator holds `grantOwnership` \\u2014 but it is an out-of-tenant escalation, which is why the in-tenant refusal stands. Not a 403: the caller IS authorized; the current state of the organization forbids it. Carries the stable client-branchable `code: LAST_ORGANIZATION_OWNER` — a DIFFERENT code from the application floor, because the remedy is scoped to this organization.' },\n ],\n idempotent: true,\n examples: [\n {\n title: 'Suspend a member until a scheduled review date',\n request: {\n suspensionReason: 'Access paused while the security review is completed.',\n suspensionEndDate: '2026-09-01T09:00:00.000Z',\n },\n response: {\n ...ORGANIZATION_MEMBER_EXAMPLE,\n status: OrganizationMemberStatus.SUSPENDED,\n scheduledReactivationAt: '2026-09-01T09:00:00.000Z',\n },\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n [OrganizationMembers_Operations.REACTIVATE]: {\n operationId: OrganizationMembers_Operations.REACTIVATE,\n purpose: 'Restore access for a currently suspended organization member.',\n outcome: 'The membership becomes ACTIVE with its existing roles and any scheduled reactivation deadline is cleared.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The suspended membership transitioned back to active and the updated row is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No membership row exists for the supplied id in the caller’s organization.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an organization admin permitted to reactivate members.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The operation is unavailable because the membership is not currently SUSPENDED.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The membership is not SUSPENDED, so there is nothing to reactivate — notably an INVITED row is refused here rather than being silently promoted, which would grant a membership nobody accepted. Carries `resource_status_transition_conflict` with the current and permitted statuses in its context.' },\n ],\n idempotent: true,\n examples: [\n {\n title: 'Reactivate a member after the review is complete',\n request: { reason: 'Security review completed without further action.' },\n response: {\n ...ORGANIZATION_MEMBER_EXAMPLE,\n status: OrganizationMemberStatus.ACTIVE,\n },\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n [OrganizationMembers_Operations.REVOKE]: {\n operationId: OrganizationMembers_Operations.REVOKE,\n purpose: 'Cancel a still-pending organization invitation. Use DELETE instead for an accepted member.',\n outcome: 'The INVITED membership is removed, its acceptance token can no longer be used, and the invitee and acting administrator are notified. The optional reason is retained in the audit event.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The pending invitation was revoked (the INVITED membership removed) and a confirmation is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No membership row exists for the supplied id in the caller’s organization.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an organization admin permitted to revoke invitations.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The operation is unavailable because the membership is no longer INVITED.' },\n ],\n idempotent: false,\n examples: [\n {\n title: 'Revoke a pending invitation before it is accepted',\n request: { reason: 'The invitee joined through another organization.' },\n response: { id: ORGANIZATION_MEMBER_EXAMPLE._id, deletedAt: '2026-08-18T08:05:00.000Z' },\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n [OrganizationMembers_Operations.GRANT_OWNERSHIP]: {\n operationId: OrganizationMembers_Operations.GRANT_OWNERSHIP,\n purpose: 'Platform-tier repair door: grant `ORG_OWNER` to an EXISTING member of an organization that has no administratively usable owner left.',\n outcome: 'The existing ACTIVE membership gains the owner-conferring role; no role is removed and no new membership is created. The cross-tenant repair is audited with the required justification and the organization is notified.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The member now holds an owner-conferring role. Idempotent: a member who already owns the organization returns 200 with their role set unchanged.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No membership row exists for the supplied id.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller does not hold `APP_ADMIN_SUPER_ADMIN` at APPLICATION scope. An organization-scope caller who merely writes that string into their own membership `roles` is denied: the role gate resolves an organization-scope entry against the organization role table, which does not contain that key.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The target membership is not administratively usable (only ACTIVE rows confer roles), or the linked user is not usable. Granting either would answer 200 while leaving the organization with zero usable owners \\u2014 a repair that repairs nothing and stops the operator looking. Fix the membership or user lifecycle first. Also returned when the user row cannot be read, since absence is not evidence of a usable owner.' },\n ],\n idempotent: true,\n examples: [\n {\n title: 'Repair a stranded organization by granting an existing member ownership',\n request: { justification: 'Restore tenant administration after the sole owner was removed during account recovery.' },\n response: {\n ...ORGANIZATION_MEMBER_EXAMPLE,\n roles: [CORE_ORG_ROLES.ORG_MEMBER, CORE_ORG_ROLES.ORG_OWNER],\n status: OrganizationMemberStatus.ACTIVE,\n },\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n [OrganizationMembers_Operations.RESEND]: {\n operationId: OrganizationMembers_Operations.RESEND,\n purpose: 'Re-mint and re-send the accept link for a still-pending invitation (an INVITED membership).',\n outcome: 'A fresh single-use accept token is issued (revoking any prior token for this membership) and the invitation email is re-delivered to the invitee.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A new accept token was minted and the invitation email re-sent; a confirmation is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No membership row exists for the supplied id in the caller’s organization.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an organization admin permitted to resend invitations.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The operation is unavailable because the membership is no longer INVITED.' },\n ],\n idempotent: false,\n examples: [{\n title: 'Send a fresh acceptance link for a pending invitation',\n request: {},\n response: {\n ...ORGANIZATION_MEMBER_EXAMPLE,\n status: OrganizationMemberStatus.INVITED,\n invitedByUserId: 'user_admin_01HX2EXAMPLE',\n invitedAt: '2026-08-18T08:00:00.000Z',\n },\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n businessConstraints: [\n 'CREATE is polymorphic: the accept-link email AND the single-use accept token fire ONLY for the INVITE branch (resulting status INVITED). A direct/system provisioning create (userId supplied — founder org-owner grant, SSO JIT, SCIM) persists an ACTIVE row and fires NEITHER side-effect (nothing to accept; its `userEmail` is the member’s own address). The gate is keyed on the resulting `status`, not on which identity field the caller supplied.',\n 'Factory declares userNotifications on several mutations; companion should ground email/SMS copy on runtime `userNotifications[]`, not invent channels absent from the configuration.',\n 'Member SEARCH matches on `userEmail` (a denormalized own field) and on the linked user’s first/last name. The name match is RELATIONAL: the framework runs a secondary search on `USER_PROFILES` and intersects on `userId` — names are read live (never stale) and are not denormalized onto the member row. The result stays scoped to the caller’s organization.',\n ],\n }),\n { resourcePrimaryScope: ResourcePrimaryScope.ORGANIZATIONS },\n ),\n () => ({\n views: {\n [Op.COUNT]: { purpose: 'Header metrics and cap enforcement surfaces.', whenToUse: 'Dashboards, billing seat counts, and upgrade prompts.' },\n [Op.CREATE]: { purpose: 'Invite (writes an INVITED row + emails an accept link) or direct-add flows in org admin UIs.', whenToUse: 'Inviting a teammate by email, onboarding, and bulk import.' },\n [Op.READ]: { purpose: 'Profile drawer and permission summaries.', whenToUse: 'Click-through from directory rows.' },\n [Op.LIST]: { purpose: 'Addressable roster list per merged preset (only `LIST` is addressable).', whenToUse: 'Default org directory experience.' },\n [Op.SEARCH]: { purpose: 'Member discovery by email or name when search is enabled.', whenToUse: 'Large-tenant look-ups and people pickers.' },\n [Op.UPDATE]: { purpose: 'Inline edit of metadata, roles, and org-unit links.', whenToUse: 'HR and IT directory maintenance, and every role change — there is no dedicated promote/demote verb.' },\n [Op.DELETE]: { purpose: 'Revoke and remove directory presence.', whenToUse: 'Offboarding, abuse, and access reviews.' },\n [OrganizationMembers_Operations.SUSPEND]: { purpose: 'Degraded access while retaining audit of membership history.', whenToUse: 'Short-term ToS and security holds.' },\n [OrganizationMembers_Operations.REACTIVATE]: { purpose: 'Re-open access after hold clears.', whenToUse: 'After payment or review completion.' },\n [OrganizationMembers_Operations.REVOKE]: { purpose: 'Cancel a still-pending invitation (deletes the INVITED row + revokes its accept token).', whenToUse: 'From the members list, on a row still showing INVITED.' },\n // GRANT_OWNERSHIP is deliberately ABSENT here, and the omission is the documentation.\n // `views` may only describe operations the merged frontend configuration surfaces\n // (`resourceSpecificationFromFrontendConfiguration` throws otherwise), and this operation has\n // no tenant-facing surface by construction: its caller is a platform operator who is NOT a\n // member of the organization, so the member roster \\u2014 which is a tenant surface \\u2014 is exactly\n // where it must not appear. It is reached from support/operations tooling.\n [OrganizationMembers_Operations.RESEND]: { purpose: 'Re-issue the accept link for a still-pending invitation.', whenToUse: 'When an invitee lost or never received the original invite email.' },\n },\n }),\n);\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"organization-notifications.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/organizations/resources/organization-notifications.resource.specification.ts"],"names":[],"mappings":"AAQA,OAAO,EAGL,qBAAqB,IAAI,EAAE,EAI5B,MAAM,uBAAuB,CAAC;AAgE/B,eAAO,MAAM,8CAA8C;;;;;;;;;;;;;;;;iCAuL1D,CAAC"}
1
+ {"version":3,"file":"organization-notifications.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/organizations/resources/organization-notifications.resource.specification.ts"],"names":[],"mappings":"AAQA,OAAO,EAGL,qBAAqB,IAAI,EAAE,EAI5B,MAAM,uBAAuB,CAAC;AAiE/B,eAAO,MAAM,8CAA8C;;;;;;;;;;;;;;;;iCAwL1D,CAAC"}
@@ -3,6 +3,7 @@ import { LabelAudience } from '@wildo-ai/presets-components-models';
3
3
  import { CodeDeclarationKind, CodeSymbolKind, FieldSemanticImportance, } from '@wildo-ai/zod-decorators';
4
4
  import { CoreUserNotificationChannel, CoreUserNotificationTarget, CoreResourceOperation as Op, OrganizationNotificationsSchema, ResourcePrimaryScope, organizationNotificationsResourceConfiguration_InitializationFactory as organizationNotificationsFactory, } from '@wildo-ai/saas-models';
5
5
  import { HttpResponseStatusCode, resourceFrontendConfiguration, resourceSpecification, resourceSpecificationFromFrontendConfiguration, } from '../../../_core/index.js';
6
+ import { EngineResourceSubDomain } from '../../engine-resource-sub-domain.js';
6
7
  const organizationNotificationsResourceUIBehavior = organizationNotificationsUIBehaviorSource;
7
8
  const ORGANIZATION_NOTIFICATIONS_EXAMPLE = {
8
9
  _id: 'organization_notifications_01JEXAMPLE',
@@ -50,6 +51,7 @@ export const organizationNotificationsResourceSpecification = resourceSpecificat
50
51
  businessRole: 'Keeps operational notices routed to the teams responsible for each category, independently of individual member preferences.',
51
52
  lifecycleRole: 'Changes when category ownership moves to another mailbox or the organization enables or disables a notice category.',
52
53
  audience: LabelAudience.END_USER,
54
+ subDomain: EngineResourceSubDomain.ORGANIZATIONS,
53
55
  codeHandling: {
54
56
  mainSchema: {
55
57
  packageName: '@wildo-ai/saas-models',
@@ -1 +1 @@
1
- {"version":3,"file":"organization-notifications.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/organizations/resources/organization-notifications.resource.specification.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,+CAA+C,IAAI,yCAAyC,EAAE,MAAM,8BAA8B,CAAC;AAC5I,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAEpE,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,2BAA2B,EAC3B,0BAA0B,EAC1B,qBAAqB,IAAI,EAAE,EAC3B,+BAA+B,EAC/B,oBAAoB,EACpB,oEAAoE,IAAI,gCAAgC,GACzG,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,sBAAsB,EACtB,6BAA6B,EAC7B,qBAAqB,EACrB,8CAA8C,GAC/C,MAAM,6BAA6B,CAAC;AAMrC,MAAM,2CAA2C,GAAG,yCAInD,CAAC;AAEF,MAAM,kCAAkC,GAAG;IACzC,GAAG,EAAE,uCAAuC;IAC5C,cAAc,EAAE,gBAAgB;IAChC,kBAAkB,EAAE;QAClB,mBAAmB,EAAE,yBAAyB;QAC9C,cAAc,EAAE,sBAAsB;QACtC,eAAe,EAAE,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Content":["import { organizationNotificationsMainResourceUIBehavior as organizationNotificationsUIBehaviorSource } 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 CoreUserNotificationChannel,\n CoreUserNotificationTarget,\n CoreResourceOperation as Op,\n OrganizationNotificationsSchema,\n ResourcePrimaryScope,\n organizationNotificationsResourceConfiguration_InitializationFactory as organizationNotificationsFactory,\n} from '@wildo-ai/saas-models';\nimport {\n HttpResponseStatusCode,\n resourceFrontendConfiguration,\n resourceSpecification,\n resourceSpecificationFromFrontendConfiguration,\n} from '~wildo-specifications/_core';\n\ntype Cfg = ReturnType<typeof organizationNotificationsFactory>;\ntype Core = Cfg['coreOperations'][number];\ntype Main = Cfg['mainSchema'];\n\nconst organizationNotificationsResourceUIBehavior = organizationNotificationsUIBehaviorSource as ResourceUIBehaviorConfig<\n Record<string, never>,\n Core,\n Main\n>;\n\nconst ORGANIZATION_NOTIFICATIONS_EXAMPLE = {\n _id: 'organization_notifications_01JEXAMPLE',\n organizationId: 'org_01JEXAMPLE',\n emailNotifications: {\n defaultEmailAddress: 'operations@acme.example',\n billingAddress: 'billing@acme.example',\n securityAddress: 'security@acme.example',\n administrativeAddress: 'administration@acme.example',\n usersManagementAddress: 'identity@acme.example',\n billing: true,\n administrative: true,\n security: true,\n usersManagement: false,\n },\n createdAt: '2026-01-12T09:00:00.000Z',\n updatedAt: '2026-08-20T16:30:00.000Z',\n _version: 3,\n} as const;\n\nconst ORGANIZATION_NOTIFICATIONS_CONTEXT_EXAMPLE = {\n ...ORGANIZATION_NOTIFICATIONS_EXAMPLE,\n organization: { _id: ORGANIZATION_NOTIFICATIONS_EXAMPLE.organizationId },\n} as const;\n\nconst ORGANIZATION_NOTIFICATIONS_SUMMARY_EXAMPLE = {\n _id: ORGANIZATION_NOTIFICATIONS_EXAMPLE._id,\n organizationId: ORGANIZATION_NOTIFICATIONS_EXAMPLE.organizationId,\n emailNotifications: ORGANIZATION_NOTIFICATIONS_EXAMPLE.emailNotifications,\n _version: ORGANIZATION_NOTIFICATIONS_EXAMPLE._version,\n} as const;\n\nconst ORGANIZATION_NOTIFICATIONS_UPDATE_REQUEST_EXAMPLE = {\n emailNotifications: {\n ...ORGANIZATION_NOTIFICATIONS_EXAMPLE.emailNotifications,\n defaultEmailAddress: 'service-operations@acme.example',\n usersManagement: true,\n },\n} as const;\n\nconst ORGANIZATION_NOTIFICATIONS_UPDATE_RESPONSE_EXAMPLE = {\n ...ORGANIZATION_NOTIFICATIONS_EXAMPLE,\n ...ORGANIZATION_NOTIFICATIONS_UPDATE_REQUEST_EXAMPLE,\n updatedAt: '2026-08-21T10:35:00.000Z',\n _version: 4,\n} as const;\n\nexport const organizationNotificationsResourceSpecification = resourceSpecificationFromFrontendConfiguration(\n resourceFrontendConfiguration(organizationNotificationsResourceUIBehavior),\n resourceSpecification(\n organizationNotificationsFactory,\n OrganizationNotificationsSchema,\n ({ schemaShape }) => ({\n purpose: 'Organization email destinations and enablement switches for billing, security, administration, and user-management notices.',\n businessRole: 'Keeps operational notices routed to the teams responsible for each category, independently of individual member preferences.',\n lifecycleRole: 'Changes when category ownership moves to another mailbox or the organization enables or disables a notice category.',\n audience: LabelAudience.END_USER,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'OrganizationNotificationsSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactory: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'organizationNotificationsResourceConfiguration_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: 'ORGANIZATION_NOTIFICATIONS',\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: 'organizationNotificationsMainResourceUIBehavior',\n symbolKind: CodeSymbolKind.UI_BEHAVIOR,\n },\n ],\n notes: ['No custom operations. READ/UPDATE are the member-facing surface; CREATE is INTERNAL_CALL (seeds the row via the ORGANIZATIONS → ORGANIZATION_NOTIFICATIONS `onParentCreate` composition lifecycle — INTERNAL_CALL because `createAsSystem` resolves the seed op through the service tier, which rejects REPOSITORY_ONLY) and DELETE is REPOSITORY_ONLY (tears it down via the paired `onParentDelete` cascade, which runs at the repository tier), neither an addressable route.'],\n },\n fields: {\n _id: schemaShape._id.stringSpec({\n meaning: 'Stable identifier of the organization notification-routing record.',\n }),\n organizationId: schemaShape.organizationId.foreignKeySpec({\n meaning: 'The organization whose notification-routing table this row configures.',\n whyItMatters: 'Scopes the routing map to one tenant so billing/security/admin notices for an org resolve to that org’s configured addresses and never leak across tenants.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n emailNotifications: schemaShape.emailNotifications.objectSpec({\n meaning: 'Per-category email addresses and enablement switches for billing, administration, security, and user-management notices.',\n whyItMatters: 'A category-specific address takes precedence for that category; the default address provides the general destination when a dedicated one is not configured.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n createdAt: schemaShape.createdAt.dateSpec({ meaning: 'When the organization notification-routing record was created.' }),\n updatedAt: schemaShape.updatedAt.dateSpec({ meaning: 'When any routing address or category switch last changed.' }),\n },\n operations: {\n [Op.READ]: {\n purpose: 'Read the organization’s email routing addresses and category switches.',\n outcome: 'The caller can determine the configured destination and enabled state for billing, administrative, security, and user-management notices.',\n whenToUse: 'Use this operation when showing notification settings or checking where an organization-level notice will be routed.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The organization’s notification routing map (per-category addresses and opt-ins) is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not a member of the addressed organization.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No notification-routing record exists for the addressed organization.' },\n ],\n examples: [{\n title: 'Read organization notification routing',\n request: { organizationId: ORGANIZATION_NOTIFICATIONS_EXAMPLE.organizationId },\n response: ORGANIZATION_NOTIFICATIONS_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n variants: {\n context: {\n purpose: 'Read the complete routing record with its organization relationship context.',\n outcome: 'The routing configuration and related organization identifier are returned together.',\n examples: [{\n title: 'Read notification routing with organization context',\n request: { organizationId: ORGANIZATION_NOTIFICATIONS_EXAMPLE.organizationId },\n response: ORGANIZATION_NOTIFICATIONS_CONTEXT_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n summary: {\n purpose: 'Read the compact notification-routing representation.',\n outcome: 'The record identity, organization, complete category-routing block, and resource version are returned.',\n examples: [{\n title: 'Read compact organization notification routing',\n request: { organizationId: ORGANIZATION_NOTIFICATIONS_EXAMPLE.organizationId },\n response: ORGANIZATION_NOTIFICATIONS_SUMMARY_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n idempotent: true,\n },\n [Op.CREATE]: {\n purpose: 'System-seed the org notification-routing row (INTERNAL_CALL, isDefault — the service-tier internal transport `createAsSystem` resolves; REPOSITORY_ONLY is invisible to `getServiceOperationPathDefault`) — fired by the ORGANIZATIONS → ORGANIZATION_NOTIFICATIONS `onParentCreate` composition lifecycle on organization creation, not a member-facing route.',\n outcome: 'A defaults-filled routing table exists for the tenant so downstream email fan-out resolves per-category opt-ins without a missing-row fallback.',\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'A notification-routing row was created for the organization with its `emailNotifications` block defaulted (category opt-ins on, addresses unset).' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The seeded routing payload fails `OrganizationNotificationsSchema` validation.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'A notification-routing row already exists for the organization; the per-org singleton (unique `organizationId`) rejects a second row, keeping the eager seed idempotent.' },\n ],\n idempotent: false,\n },\n [Op.UPDATE]: {\n purpose: 'Replace the organization’s category addresses and notification switches.',\n outcome: 'Subsequent organization notices use the updated routing configuration.',\n whenToUse: 'Use this operation when responsibility for billing, security, administration, or user management moves to a different mailbox, or when a category is enabled or disabled.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The notification routing map was updated and the new effective configuration is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'A routing address is malformed or a category toggle fails schema validation.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller does not hold the organization-administrator authority required to change notification routing.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No notification-routing record exists for the addressed organization.' },\n ],\n examples: [{\n title: 'Update organization notification destinations',\n request: {\n organizationId: ORGANIZATION_NOTIFICATIONS_EXAMPLE.organizationId,\n ...ORGANIZATION_NOTIFICATIONS_UPDATE_REQUEST_EXAMPLE,\n },\n response: ORGANIZATION_NOTIFICATIONS_UPDATE_RESPONSE_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n communications: {\n notification: {\n purpose: 'Confirm in-product that the notification-routing configuration was saved.',\n tone: 'Brief and operational; the confirmation should avoid repeating email addresses unnecessarily.',\n textSlots: { title: { purpose: 'Short success headline for the saved-routing confirmation.' } },\n deliveries: [{\n audience: 'The signed-in organization administrator who performed the update.',\n targetRef: CoreUserNotificationTarget.USER_SELF,\n channelRef: CoreUserNotificationChannel.FRONT_END_SUCCESS,\n }],\n },\n },\n idempotent: true,\n },\n [Op.DELETE]: {\n purpose: 'Repository-only teardown of the organization notification-routing row when its owning organization is deleted (composition `onParentDelete` cascade).',\n outcome: 'The eager-seeded singleton routing row is removed together with the organization — the composition part does not outlive its whole.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The organization notification-routing row was deleted as part of the owning organization’s deletion cascade.' },\n ],\n // REPOSITORY_ONLY variant (ORG_ADMIN) — invoked by the onParentDelete cascade, not a public HTTP endpoint, so no client-facing 400/403/404 are documented.\n idempotent: true,\n },\n },\n businessConstraints: [\n 'The routing record configures destinations; updating it emits only an in-product success confirmation and does not itself send a billing, security, administrative, or user-management email.',\n ],\n }),\n { resourcePrimaryScope: ResourcePrimaryScope.ORGANIZATIONS },\n ),\n () => ({\n // `views` documents FRONTEND operation semantics — only ops the merged frontend\n // configuration surfaces belong here. CREATE is an INTERNAL_CALL system-seed\n // (see config `variantType: INTERNAL_CALL` + the operations[CREATE] backend\n // semantics below), so it is NOT surfaced to the frontend and must not appear\n // in `views` — `validateFrontendSpecificationAgainstConfiguration` fails closed\n // on a views-documented op that no merged frontend config surfaces.\n views: {\n [Op.READ]: { purpose: 'Read-only org notification routing panel.', whenToUse: 'Org admin settings and compliance reviews.' },\n [Op.UPDATE]: { purpose: 'Editable org notification routing when roles permit.', whenToUse: 'Hand-offs between finance, IT, and security teams.' },\n },\n }),\n);\n"]}
1
+ {"version":3,"file":"organization-notifications.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/organizations/resources/organization-notifications.resource.specification.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,+CAA+C,IAAI,yCAAyC,EAAE,MAAM,8BAA8B,CAAC;AAC5I,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAEpE,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,2BAA2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E;aACjK;YACD,2JAA2J;YAC3J,UAAU,EAAE,IAAI;SACjB;KACF;IACD,mBAAmB,EAAE;QACnB,+LAA+L;KAChM;CACF,CAAC,EACF,EAAE,oBAAoB,EAAE,oBAAoB,CAAC,aAAa,EAAE,CAC7D,EACD,GAAG,EAAE,CAAC,CAAC;IACL,gFAAgF;IAChF,6EAA6E;IAC7E,4EAA4E;IAC5E,8EAA8E;IAC9E,gFAAgF;IAChF,oEAAoE;IACpE,KAAK,EAAE;QACL,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,OAAO,EAAE,2CAA2C,EAAE,SAAS,EAAE,4CAA4C,EAAE;QAC5H,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE,sDAAsD,EAAE,SAAS,EAAE,oDAAoD,EAAE;KAClJ;CACF,CAAC,CACH,CAAC","sourcesContent":["import { organizationNotificationsMainResourceUIBehavior as organizationNotificationsUIBehaviorSource } 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 CoreUserNotificationChannel,\n CoreUserNotificationTarget,\n CoreResourceOperation as Op,\n OrganizationNotificationsSchema,\n ResourcePrimaryScope,\n organizationNotificationsResourceConfiguration_InitializationFactory as organizationNotificationsFactory,\n} from '@wildo-ai/saas-models';\nimport {\n HttpResponseStatusCode,\n resourceFrontendConfiguration,\n resourceSpecification,\n resourceSpecificationFromFrontendConfiguration,\n} from '~wildo-specifications/_core';\nimport { EngineResourceSubDomain } from '../../engine-resource-sub-domain';\n\ntype Cfg = ReturnType<typeof organizationNotificationsFactory>;\ntype Core = Cfg['coreOperations'][number];\ntype Main = Cfg['mainSchema'];\n\nconst organizationNotificationsResourceUIBehavior = organizationNotificationsUIBehaviorSource as ResourceUIBehaviorConfig<\n Record<string, never>,\n Core,\n Main\n>;\n\nconst ORGANIZATION_NOTIFICATIONS_EXAMPLE = {\n _id: 'organization_notifications_01JEXAMPLE',\n organizationId: 'org_01JEXAMPLE',\n emailNotifications: {\n defaultEmailAddress: 'operations@acme.example',\n billingAddress: 'billing@acme.example',\n securityAddress: 'security@acme.example',\n administrativeAddress: 'administration@acme.example',\n usersManagementAddress: 'identity@acme.example',\n billing: true,\n administrative: true,\n security: true,\n usersManagement: false,\n },\n createdAt: '2026-01-12T09:00:00.000Z',\n updatedAt: '2026-08-20T16:30:00.000Z',\n _version: 3,\n} as const;\n\nconst ORGANIZATION_NOTIFICATIONS_CONTEXT_EXAMPLE = {\n ...ORGANIZATION_NOTIFICATIONS_EXAMPLE,\n organization: { _id: ORGANIZATION_NOTIFICATIONS_EXAMPLE.organizationId },\n} as const;\n\nconst ORGANIZATION_NOTIFICATIONS_SUMMARY_EXAMPLE = {\n _id: ORGANIZATION_NOTIFICATIONS_EXAMPLE._id,\n organizationId: ORGANIZATION_NOTIFICATIONS_EXAMPLE.organizationId,\n emailNotifications: ORGANIZATION_NOTIFICATIONS_EXAMPLE.emailNotifications,\n _version: ORGANIZATION_NOTIFICATIONS_EXAMPLE._version,\n} as const;\n\nconst ORGANIZATION_NOTIFICATIONS_UPDATE_REQUEST_EXAMPLE = {\n emailNotifications: {\n ...ORGANIZATION_NOTIFICATIONS_EXAMPLE.emailNotifications,\n defaultEmailAddress: 'service-operations@acme.example',\n usersManagement: true,\n },\n} as const;\n\nconst ORGANIZATION_NOTIFICATIONS_UPDATE_RESPONSE_EXAMPLE = {\n ...ORGANIZATION_NOTIFICATIONS_EXAMPLE,\n ...ORGANIZATION_NOTIFICATIONS_UPDATE_REQUEST_EXAMPLE,\n updatedAt: '2026-08-21T10:35:00.000Z',\n _version: 4,\n} as const;\n\nexport const organizationNotificationsResourceSpecification = resourceSpecificationFromFrontendConfiguration(\n resourceFrontendConfiguration(organizationNotificationsResourceUIBehavior),\n resourceSpecification(\n organizationNotificationsFactory,\n OrganizationNotificationsSchema,\n ({ schemaShape }) => ({\n purpose: 'Organization email destinations and enablement switches for billing, security, administration, and user-management notices.',\n businessRole: 'Keeps operational notices routed to the teams responsible for each category, independently of individual member preferences.',\n lifecycleRole: 'Changes when category ownership moves to another mailbox or the organization enables or disables a notice category.',\n audience: LabelAudience.END_USER,\n subDomain: EngineResourceSubDomain.ORGANIZATIONS,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'OrganizationNotificationsSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactory: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'organizationNotificationsResourceConfiguration_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: 'ORGANIZATION_NOTIFICATIONS',\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: 'organizationNotificationsMainResourceUIBehavior',\n symbolKind: CodeSymbolKind.UI_BEHAVIOR,\n },\n ],\n notes: ['No custom operations. READ/UPDATE are the member-facing surface; CREATE is INTERNAL_CALL (seeds the row via the ORGANIZATIONS → ORGANIZATION_NOTIFICATIONS `onParentCreate` composition lifecycle — INTERNAL_CALL because `createAsSystem` resolves the seed op through the service tier, which rejects REPOSITORY_ONLY) and DELETE is REPOSITORY_ONLY (tears it down via the paired `onParentDelete` cascade, which runs at the repository tier), neither an addressable route.'],\n },\n fields: {\n _id: schemaShape._id.stringSpec({\n meaning: 'Stable identifier of the organization notification-routing record.',\n }),\n organizationId: schemaShape.organizationId.foreignKeySpec({\n meaning: 'The organization whose notification-routing table this row configures.',\n whyItMatters: 'Scopes the routing map to one tenant so billing/security/admin notices for an org resolve to that org’s configured addresses and never leak across tenants.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n emailNotifications: schemaShape.emailNotifications.objectSpec({\n meaning: 'Per-category email addresses and enablement switches for billing, administration, security, and user-management notices.',\n whyItMatters: 'A category-specific address takes precedence for that category; the default address provides the general destination when a dedicated one is not configured.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n createdAt: schemaShape.createdAt.dateSpec({ meaning: 'When the organization notification-routing record was created.' }),\n updatedAt: schemaShape.updatedAt.dateSpec({ meaning: 'When any routing address or category switch last changed.' }),\n },\n operations: {\n [Op.READ]: {\n purpose: 'Read the organization’s email routing addresses and category switches.',\n outcome: 'The caller can determine the configured destination and enabled state for billing, administrative, security, and user-management notices.',\n whenToUse: 'Use this operation when showing notification settings or checking where an organization-level notice will be routed.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The organization’s notification routing map (per-category addresses and opt-ins) is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not a member of the addressed organization.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No notification-routing record exists for the addressed organization.' },\n ],\n examples: [{\n title: 'Read organization notification routing',\n request: { organizationId: ORGANIZATION_NOTIFICATIONS_EXAMPLE.organizationId },\n response: ORGANIZATION_NOTIFICATIONS_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n variants: {\n context: {\n purpose: 'Read the complete routing record with its organization relationship context.',\n outcome: 'The routing configuration and related organization identifier are returned together.',\n examples: [{\n title: 'Read notification routing with organization context',\n request: { organizationId: ORGANIZATION_NOTIFICATIONS_EXAMPLE.organizationId },\n response: ORGANIZATION_NOTIFICATIONS_CONTEXT_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n summary: {\n purpose: 'Read the compact notification-routing representation.',\n outcome: 'The record identity, organization, complete category-routing block, and resource version are returned.',\n examples: [{\n title: 'Read compact organization notification routing',\n request: { organizationId: ORGANIZATION_NOTIFICATIONS_EXAMPLE.organizationId },\n response: ORGANIZATION_NOTIFICATIONS_SUMMARY_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n idempotent: true,\n },\n [Op.CREATE]: {\n purpose: 'System-seed the org notification-routing row (INTERNAL_CALL, isDefault — the service-tier internal transport `createAsSystem` resolves; REPOSITORY_ONLY is invisible to `getServiceOperationPathDefault`) — fired by the ORGANIZATIONS → ORGANIZATION_NOTIFICATIONS `onParentCreate` composition lifecycle on organization creation, not a member-facing route.',\n outcome: 'A defaults-filled routing table exists for the tenant so downstream email fan-out resolves per-category opt-ins without a missing-row fallback.',\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'A notification-routing row was created for the organization with its `emailNotifications` block defaulted (category opt-ins on, addresses unset).' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The seeded routing payload fails `OrganizationNotificationsSchema` validation.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'A notification-routing row already exists for the organization; the per-org singleton (unique `organizationId`) rejects a second row, keeping the eager seed idempotent.' },\n ],\n idempotent: false,\n },\n [Op.UPDATE]: {\n purpose: 'Replace the organization’s category addresses and notification switches.',\n outcome: 'Subsequent organization notices use the updated routing configuration.',\n whenToUse: 'Use this operation when responsibility for billing, security, administration, or user management moves to a different mailbox, or when a category is enabled or disabled.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The notification routing map was updated and the new effective configuration is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'A routing address is malformed or a category toggle fails schema validation.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller does not hold the organization-administrator authority required to change notification routing.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No notification-routing record exists for the addressed organization.' },\n ],\n examples: [{\n title: 'Update organization notification destinations',\n request: {\n organizationId: ORGANIZATION_NOTIFICATIONS_EXAMPLE.organizationId,\n ...ORGANIZATION_NOTIFICATIONS_UPDATE_REQUEST_EXAMPLE,\n },\n response: ORGANIZATION_NOTIFICATIONS_UPDATE_RESPONSE_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n communications: {\n notification: {\n purpose: 'Confirm in-product that the notification-routing configuration was saved.',\n tone: 'Brief and operational; the confirmation should avoid repeating email addresses unnecessarily.',\n textSlots: { title: { purpose: 'Short success headline for the saved-routing confirmation.' } },\n deliveries: [{\n audience: 'The signed-in organization administrator who performed the update.',\n targetRef: CoreUserNotificationTarget.USER_SELF,\n channelRef: CoreUserNotificationChannel.FRONT_END_SUCCESS,\n }],\n },\n },\n idempotent: true,\n },\n [Op.DELETE]: {\n purpose: 'Repository-only teardown of the organization notification-routing row when its owning organization is deleted (composition `onParentDelete` cascade).',\n outcome: 'The eager-seeded singleton routing row is removed together with the organization — the composition part does not outlive its whole.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The organization notification-routing row was deleted as part of the owning organization’s deletion cascade.' },\n ],\n // REPOSITORY_ONLY variant (ORG_ADMIN) — invoked by the onParentDelete cascade, not a public HTTP endpoint, so no client-facing 400/403/404 are documented.\n idempotent: true,\n },\n },\n businessConstraints: [\n 'The routing record configures destinations; updating it emits only an in-product success confirmation and does not itself send a billing, security, administrative, or user-management email.',\n ],\n }),\n { resourcePrimaryScope: ResourcePrimaryScope.ORGANIZATIONS },\n ),\n () => ({\n // `views` documents FRONTEND operation semantics — only ops the merged frontend\n // configuration surfaces belong here. CREATE is an INTERNAL_CALL system-seed\n // (see config `variantType: INTERNAL_CALL` + the operations[CREATE] backend\n // semantics below), so it is NOT surfaced to the frontend and must not appear\n // in `views` — `validateFrontendSpecificationAgainstConfiguration` fails closed\n // on a views-documented op that no merged frontend config surfaces.\n views: {\n [Op.READ]: { purpose: 'Read-only org notification routing panel.', whenToUse: 'Org admin settings and compliance reviews.' },\n [Op.UPDATE]: { purpose: 'Editable org notification routing when roles permit.', whenToUse: 'Hand-offs between finance, IT, and security teams.' },\n },\n }),\n);\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"organization-preferences.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/organizations/resources/organization-preferences.resource.specification.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAiB,UAAU,EAAE,MAAM,qCAAqC,CAAC;AAO/G,OAAO,EAGL,qBAAqB,IAAI,EAAE,EAI5B,MAAM,uBAAuB,CAAC;AAwE/B,eAAO,MAAM,4CAA4C;;;;;;;;;;;;;;;;iCA0SxD,CAAC"}
1
+ {"version":3,"file":"organization-preferences.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/organizations/resources/organization-preferences.resource.specification.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAiB,UAAU,EAAE,MAAM,qCAAqC,CAAC;AAO/G,OAAO,EAGL,qBAAqB,IAAI,EAAE,EAI5B,MAAM,uBAAuB,CAAC;AAyE/B,eAAO,MAAM,4CAA4C;;;;;;;;;;;;;;;;iCA2SxD,CAAC"}
@@ -3,6 +3,7 @@ import { AvailableLanguage, DateFormat, LabelAudience, TimeFormat } from '@wildo
3
3
  import { CodeDeclarationKind, CodeSymbolKind, FieldSemanticImportance, } from '@wildo-ai/zod-decorators';
4
4
  import { CoreUserNotificationChannel, CoreUserNotificationTarget, CoreResourceOperation as Op, OrganizationPreferencesSchema, ResourcePrimaryScope, organizationPreferencesResourceConfiguration_InitializationFactory as organizationPreferencesFactory, } from '@wildo-ai/saas-models';
5
5
  import { HttpResponseStatusCode, resourceFrontendConfiguration, resourceSpecification, resourceSpecificationFromFrontendConfiguration, } from '../../../_core/index.js';
6
+ import { EngineResourceSubDomain } from '../../engine-resource-sub-domain.js';
6
7
  const organizationPreferencesResourceUIBehavior = organizationPreferencesUIBehaviorSource;
7
8
  const ORGANIZATION_PREFERENCES_EXAMPLE = {
8
9
  _id: 'organization_preferences_01JEXAMPLE',
@@ -58,6 +59,7 @@ export const organizationPreferencesResourceSpecification = resourceSpecificatio
58
59
  businessRole: 'Gives members and integrations one consistent locale, timezone, language, and email-preference policy for the organization.',
59
60
  lifecycleRole: 'Changes when the organization enters a new region, supports another language, or revises its member override policy.',
60
61
  audience: LabelAudience.ADMIN,
62
+ subDomain: EngineResourceSubDomain.ORGANIZATIONS,
61
63
  codeHandling: {
62
64
  mainSchema: {
63
65
  packageName: '@wildo-ai/saas-models',
@@ -1 +1 @@
1
- {"version":3,"file":"organization-preferences.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/organizations/resources/organization-preferences.resource.specification.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6CAA6C,IAAI,uCAAuC,EAAE,MAAM,8BAA8B,CAAC;AACxI,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AAE/G,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,2BAA2B,EAC3B,0BAA0B,EAC1B,qBAAqB,IAAI,EAAE,EAC3B,6BAA6B,EAC7B,oBAAoB,EACpB,kEAAkE,IAAI,8BAA8B,GACrG,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,sBAAsB,EACtB,6BAA6B,EAC7B,qBAAqB,EACrB,8CAA8C,GAC/C,MAAM,6BAA6B,CAAC;AAMrC,MAAM,yCAAyC,GAAG,uCAIjD,CAAC;AAEF,MAAM,gCAAgC,GAAG;IACvC,GAAG,EA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,EACD,GAAG,EAAE,CAAC,CAAC;IACL,+EAA+E;IAC/E,+EAA+E;IAC/E,6EAA6E;IAC7E,0DAA0D;IAC1D,KAAK,EAAE;QACL,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,OAAO,EAAE,qCAAqC,EAAE,SAAS,EAAE,6DAA6D,EAAE;QACvI,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE,4CAA4C,EAAE,SAAS,EAAE,6DAA6D,EAAE;KACjJ;CACF,CAAC,CACH,CAAC","sourcesContent":["import { organizationPreferencesMainResourceUIBehavior as organizationPreferencesUIBehaviorSource } from '@wildo-ai/presets-components';\nimport { AvailableLanguage, DateFormat, LabelAudience, TimeFormat } 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 CoreUserNotificationChannel,\n CoreUserNotificationTarget,\n CoreResourceOperation as Op,\n OrganizationPreferencesSchema,\n ResourcePrimaryScope,\n organizationPreferencesResourceConfiguration_InitializationFactory as organizationPreferencesFactory,\n} from '@wildo-ai/saas-models';\nimport {\n HttpResponseStatusCode,\n resourceFrontendConfiguration,\n resourceSpecification,\n resourceSpecificationFromFrontendConfiguration,\n} from '~wildo-specifications/_core';\n\ntype Cfg = ReturnType<typeof organizationPreferencesFactory>;\ntype Core = Cfg['coreOperations'][number];\ntype Main = Cfg['mainSchema'];\n\nconst organizationPreferencesResourceUIBehavior = organizationPreferencesUIBehaviorSource as ResourceUIBehaviorConfig<\n Record<string, never>,\n Core,\n Main\n>;\n\nconst ORGANIZATION_PREFERENCES_EXAMPLE = {\n _id: 'organization_preferences_01JEXAMPLE',\n organizationId: 'org_01JEXAMPLE',\n timezone: 'Europe/Luxembourg',\n locale: AvailableLanguage.EN_GB,\n dateFormat: DateFormat.EU_LONG,\n timeFormat: TimeFormat.TWENTY_FOUR_HOUR,\n languagePreferences: {\n primaryLanguage: AvailableLanguage.EN_GB,\n supportedLanguages: [AvailableLanguage.EN_GB, AvailableLanguage.FR, AvailableLanguage.DE],\n allowUserOverride: true,\n enforceForAllMembers: false,\n },\n allowMemberEmailOverride: false,\n createdAt: '2026-01-12T09:00:00.000Z',\n updatedAt: '2026-08-20T16:30:00.000Z',\n _version: 4,\n} as const;\n\nconst ORGANIZATION_PREFERENCES_CONTEXT_EXAMPLE = {\n ...ORGANIZATION_PREFERENCES_EXAMPLE,\n organization: { _id: ORGANIZATION_PREFERENCES_EXAMPLE.organizationId },\n} as const;\n\nconst ORGANIZATION_PREFERENCES_SUMMARY_EXAMPLE = {\n _id: ORGANIZATION_PREFERENCES_EXAMPLE._id,\n organizationId: ORGANIZATION_PREFERENCES_EXAMPLE.organizationId,\n timezone: ORGANIZATION_PREFERENCES_EXAMPLE.timezone,\n locale: ORGANIZATION_PREFERENCES_EXAMPLE.locale,\n languagePreferences: ORGANIZATION_PREFERENCES_EXAMPLE.languagePreferences,\n _version: ORGANIZATION_PREFERENCES_EXAMPLE._version,\n} as const;\n\nconst ORGANIZATION_PREFERENCES_UPDATE_REQUEST_EXAMPLE = {\n timezone: 'Europe/Paris',\n locale: AvailableLanguage.FR,\n dateFormat: DateFormat.EU_SHORT,\n timeFormat: TimeFormat.TWENTY_FOUR_HOUR,\n languagePreferences: {\n primaryLanguage: AvailableLanguage.FR,\n supportedLanguages: [AvailableLanguage.FR, AvailableLanguage.EN_GB, AvailableLanguage.DE],\n allowUserOverride: true,\n enforceForAllMembers: false,\n },\n allowMemberEmailOverride: true,\n} as const;\n\nconst ORGANIZATION_PREFERENCES_UPDATE_RESPONSE_EXAMPLE = {\n ...ORGANIZATION_PREFERENCES_EXAMPLE,\n ...ORGANIZATION_PREFERENCES_UPDATE_REQUEST_EXAMPLE,\n updatedAt: '2026-08-21T10:15:00.000Z',\n _version: 5,\n} as const;\n\nexport const organizationPreferencesResourceSpecification = resourceSpecificationFromFrontendConfiguration(\n resourceFrontendConfiguration(organizationPreferencesResourceUIBehavior),\n resourceSpecification(\n organizationPreferencesFactory,\n OrganizationPreferencesSchema,\n ({ schemaShape }) => ({\n purpose: 'Organization-wide regional and language defaults, formatting conventions, and member override policy.',\n businessRole: 'Gives members and integrations one consistent locale, timezone, language, and email-preference policy for the organization.',\n lifecycleRole: 'Changes when the organization enters a new region, supports another language, or revises its member override policy.',\n audience: LabelAudience.ADMIN,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'OrganizationPreferencesSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactory: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'organizationPreferencesResourceConfiguration_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: 'ORGANIZATION_PREFERENCES',\n },\n operationVocabulary: {\n coreEnum: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceOperation',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n frontendConfigurationSources: [\n {\n packageName: '@wildo-ai/presets-components',\n exportName: 'organizationPreferencesMainResourceUIBehavior',\n symbolKind: CodeSymbolKind.UI_BEHAVIOR,\n },\n ],\n },\n fields: {\n _id: schemaShape._id.stringSpec({\n meaning: 'Stable identifier of the organization-preferences record.',\n }),\n organizationId: schemaShape.organizationId.foreignKeySpec({\n meaning: 'The organization whose regional defaults and language policy this row holds.',\n whyItMatters: 'Anchors the preferences to one tenant so locale/date/time defaults and member-override policy resolve per organization and never bleed across tenants.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n timezone: schemaShape.timezone.stringSpec({ meaning: 'Default IANA-style timezone for org-wide scheduling surfaces.' }),\n locale: schemaShape.locale.enumSpec({\n meaning: 'Default product locale for the organization — drives copy selection and formatting when a member has not overridden it.',\n importance: FieldSemanticImportance.PRIMARY,\n enumDeclaration: {\n packageName: '@wildo-ai/presets-components-models',\n exportName: 'AvailableLanguage',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n values: {\n [AvailableLanguage.EN]: { meaning: 'English (United States).' },\n [AvailableLanguage.EN_GB]: { meaning: 'English (United Kingdom).' },\n [AvailableLanguage.EN_CA]: { meaning: 'English (Canada).' },\n [AvailableLanguage.EN_AU]: { meaning: 'English (Australia).' },\n [AvailableLanguage.ES]: { meaning: 'Spanish (Spain).' },\n [AvailableLanguage.ES_MX]: { meaning: 'Spanish (Mexico).' },\n [AvailableLanguage.ES_AR]: { meaning: 'Spanish (Argentina).' },\n [AvailableLanguage.ES_CO]: { meaning: 'Spanish (Colombia).' },\n [AvailableLanguage.FR]: { meaning: 'French (France).' },\n [AvailableLanguage.FR_CA]: { meaning: 'French (Canada).' },\n [AvailableLanguage.DE]: { meaning: 'German.' },\n [AvailableLanguage.DE_AT]: { meaning: 'German (Austria).' },\n [AvailableLanguage.DE_CH]: { meaning: 'German (Switzerland).' },\n [AvailableLanguage.PT]: { meaning: 'Portuguese (Portugal).' },\n [AvailableLanguage.PT_BR]: { meaning: 'Portuguese (Brazil).' },\n [AvailableLanguage.IT]: { meaning: 'Italian.' },\n [AvailableLanguage.NL]: { meaning: 'Dutch.' },\n [AvailableLanguage.RU]: { meaning: 'Russian.' },\n [AvailableLanguage.ZH]: { meaning: 'Chinese (Simplified).' },\n [AvailableLanguage.ZH_CN]: { meaning: 'Chinese (Simplified, China).' },\n [AvailableLanguage.ZH_TW]: { meaning: 'Chinese (Traditional, Taiwan).' },\n [AvailableLanguage.ZH_HK]: { meaning: 'Chinese (Traditional, Hong Kong).' },\n [AvailableLanguage.JA]: { meaning: 'Japanese.' },\n [AvailableLanguage.KO]: { meaning: 'Korean.' },\n [AvailableLanguage.AR]: { meaning: 'Arabic.' },\n [AvailableLanguage.HI]: { meaning: 'Hindi.' },\n [AvailableLanguage.SV]: { meaning: 'Swedish.' },\n [AvailableLanguage.NO]: { meaning: 'Norwegian.' },\n [AvailableLanguage.DA]: { meaning: 'Danish.' },\n [AvailableLanguage.FI]: { meaning: 'Finnish.' },\n [AvailableLanguage.PL]: { meaning: 'Polish.' },\n [AvailableLanguage.CS]: { meaning: 'Czech.' },\n [AvailableLanguage.HU]: { meaning: 'Hungarian.' },\n [AvailableLanguage.RO]: { meaning: 'Romanian.' },\n [AvailableLanguage.BG]: { meaning: 'Bulgarian.' },\n [AvailableLanguage.HR]: { meaning: 'Croatian.' },\n [AvailableLanguage.SK]: { meaning: 'Slovak.' },\n [AvailableLanguage.SL]: { meaning: 'Slovenian.' },\n [AvailableLanguage.LT]: { meaning: 'Lithuanian.' },\n [AvailableLanguage.LV]: { meaning: 'Latvian.' },\n [AvailableLanguage.ET]: { meaning: 'Estonian.' },\n [AvailableLanguage.EL]: { meaning: 'Greek.' },\n [AvailableLanguage.TR]: { meaning: 'Turkish.' },\n [AvailableLanguage.TH]: { meaning: 'Thai.' },\n [AvailableLanguage.VI]: { meaning: 'Vietnamese.' },\n [AvailableLanguage.ID]: { meaning: 'Indonesian.' },\n [AvailableLanguage.MS]: { meaning: 'Malay.' },\n [AvailableLanguage.TA]: { meaning: 'Tamil.' },\n [AvailableLanguage.BN]: { meaning: 'Bengali.' },\n [AvailableLanguage.UR]: { meaning: 'Urdu.' },\n [AvailableLanguage.FA]: { meaning: 'Persian / Farsi.' },\n [AvailableLanguage.HE]: { meaning: 'Hebrew.' },\n [AvailableLanguage.SW]: { meaning: 'Swahili.' },\n [AvailableLanguage.AF]: { meaning: 'Afrikaans.' },\n [AvailableLanguage.AM]: { meaning: 'Amharic.' },\n [AvailableLanguage.IS]: { meaning: 'Icelandic.' },\n [AvailableLanguage.MT]: { meaning: 'Maltese.' },\n [AvailableLanguage.GA]: { meaning: 'Irish.' },\n [AvailableLanguage.CY]: { meaning: 'Welsh.' },\n [AvailableLanguage.EU]: { meaning: 'Basque.' },\n [AvailableLanguage.CA]: { meaning: 'Catalan.' },\n [AvailableLanguage.GL]: { meaning: 'Galician.' },\n },\n }),\n dateFormat: schemaShape.dateFormat.enumSpec({\n meaning: 'Default date-rendering pattern applied across org-wide surfaces.',\n enumDeclaration: {\n packageName: '@wildo-ai/presets-components-models',\n exportName: 'DateFormat',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n values: {\n [DateFormat.LOCALE_DEFAULT]: { meaning: 'Locale-driven medium date rendered by `Intl.DateTimeFormat` in the viewer\\'s resolved locale (e.g. `Aug 18, 2026` / `18 août 2026`); the engine fallback when no preference is expressed.' },\n [DateFormat.ISO_8601]: { meaning: 'ISO 8601 date, `YYYY-MM-DD`.' },\n [DateFormat.ISO_DATETIME]: { meaning: 'ISO 8601 date-time, `YYYY-MM-DD HH:mm:ss`.' },\n [DateFormat.US_SHORT]: { meaning: 'US short, `MM/DD/YYYY`.' },\n [DateFormat.US_LONG]: { meaning: 'US long, `MMMM DD, YYYY`.' },\n [DateFormat.US_MEDIUM]: { meaning: 'US medium, `MMM DD, YYYY`.' },\n [DateFormat.EU_SHORT]: { meaning: 'European short, `DD/MM/YYYY`.' },\n [DateFormat.EU_LONG]: { meaning: 'European long, `DD MMMM YYYY`.' },\n [DateFormat.EU_MEDIUM]: { meaning: 'European medium, `DD MMM YYYY`.' },\n [DateFormat.DOT_SEPARATED]: { meaning: 'Dot-separated, `DD.MM.YYYY`.' },\n [DateFormat.DASH_SEPARATED]: { meaning: 'Dash-separated, `DD-MM-YYYY`.' },\n [DateFormat.REVERSE_SLASH]: { meaning: 'Reverse slash, `YYYY/MM/DD`.' },\n [DateFormat.COMPACT_US]: { meaning: 'Compact US, `M/D/YY`.' },\n [DateFormat.COMPACT_EU]: { meaning: 'Compact European, `D/M/YY`.' },\n [DateFormat.COMPACT_ISO]: { meaning: 'Compact ISO, `YY-MM-DD`.' },\n },\n }),\n timeFormat: schemaShape.timeFormat.enumSpec({\n meaning: 'Default clock convention (12- vs 24-hour) applied across org-wide surfaces.',\n enumDeclaration: {\n packageName: '@wildo-ai/presets-components-models',\n exportName: 'TimeFormat',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n values: {\n [TimeFormat.TWELVE_HOUR]: { meaning: '12-hour clock with AM/PM.' },\n [TimeFormat.TWENTY_FOUR_HOUR]: { meaning: '24-hour clock.' },\n },\n }),\n languagePreferences: schemaShape.languagePreferences.objectSpec({\n meaning: 'Organization language policy: primary language, supported language set, and whether members may choose a different language.',\n whyItMatters: 'Clients use this policy to offer only supported languages and to decide whether a member-level selection is allowed.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n allowMemberEmailOverride: schemaShape.allowMemberEmailOverride.booleanSpec({\n meaning: 'Whether members may choose email-delivery preferences that differ from the organization default.',\n whyItMatters: 'When false, clients should present organization policy as enforced rather than offering an ineffective member override.',\n }),\n createdAt: schemaShape.createdAt.dateSpec({ meaning: 'When the organization-preferences record was created.' }),\n updatedAt: schemaShape.updatedAt.dateSpec({ meaning: 'When any stored organization preference last changed.' }),\n },\n operations: {\n [Op.READ]: {\n purpose: 'Read the organization’s effective regional and language defaults.',\n outcome: 'The caller receives the timezone, locale, formatting rules, supported-language policy, and member email-override policy.',\n whenToUse: 'Use this operation before formatting organization-wide dates and times or presenting member language and email-preference controls.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The organization’s regional defaults (timezone, locale, supported languages, override policy) are returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not a member of the addressed organization.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No preferences record exists for the addressed organization.' },\n ],\n examples: [{\n title: 'Read organization regional and language preferences',\n request: { organizationId: ORGANIZATION_PREFERENCES_EXAMPLE.organizationId },\n response: ORGANIZATION_PREFERENCES_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n variants: {\n context: {\n purpose: 'Read the complete preferences record with its organization relationship context.',\n outcome: 'The preferences and the related organization identifier are returned together.',\n examples: [{\n title: 'Read organization preferences with context',\n request: { organizationId: ORGANIZATION_PREFERENCES_EXAMPLE.organizationId },\n response: ORGANIZATION_PREFERENCES_CONTEXT_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n summary: {\n purpose: 'Read the compact regional and language-policy representation.',\n outcome: 'The record identity, organization, timezone, locale, language policy, and resource version are returned.',\n examples: [{\n title: 'Read compact organization preferences',\n request: { organizationId: ORGANIZATION_PREFERENCES_EXAMPLE.organizationId },\n response: ORGANIZATION_PREFERENCES_SUMMARY_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n idempotent: true,\n },\n [Op.CREATE]: {\n purpose: 'System-seed the org preferences row (INTERNAL_CALL, isDefault — the service-tier internal transport `createAsSystem` resolves; REPOSITORY_ONLY is invisible to `getServiceOperationPathDefault`) — fired by the ORGANIZATIONS → ORGANIZATION_PREFERENCES `onParentCreate` composition lifecycle on organization creation, not a member-facing route.',\n outcome: 'A defaults-filled preferences row exists for the tenant so regional/locale reads resolve without a lazy fallback.',\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'A preferences row was created for the organization with schema defaults (timezone, locale, supported languages, override policy).' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The seeded preferences payload fails `OrganizationPreferencesSchema` validation.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'A preferences row already exists for the organization; the per-org singleton (unique `organizationId`) rejects a second row, keeping the eager seed idempotent.' },\n ],\n idempotent: false,\n },\n [Op.UPDATE]: {\n purpose: 'Update the organization’s regional, language, and member email-override defaults.',\n outcome: 'The updated preferences become the organization defaults for clients and new member sessions.',\n whenToUse: 'Use this operation when the organization changes operating region, supported languages, formatting conventions, or member override policy.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The regional defaults and enforcement flags were updated and the new effective configuration is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The timezone, locale, or supported-language list fails schema validation.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller does not hold the organization-manager authority required to change organization-wide preferences.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No preferences record exists for the addressed organization.' },\n ],\n examples: [{\n title: 'Change organization locale and language policy',\n request: {\n organizationId: ORGANIZATION_PREFERENCES_EXAMPLE.organizationId,\n ...ORGANIZATION_PREFERENCES_UPDATE_REQUEST_EXAMPLE,\n },\n response: ORGANIZATION_PREFERENCES_UPDATE_RESPONSE_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n communications: {\n notification: {\n purpose: 'Confirm in-product that the organization preferences were saved.',\n tone: 'Brief and operational; the confirmation should not restate the full policy payload.',\n textSlots: { title: { purpose: 'Short success headline for the saved-preferences confirmation.' } },\n deliveries: [{\n audience: 'The signed-in organization manager who performed the update.',\n targetRef: CoreUserNotificationTarget.USER_SELF,\n channelRef: CoreUserNotificationChannel.FRONT_END_SUCCESS,\n }],\n },\n },\n idempotent: true,\n },\n [Op.DELETE]: {\n purpose: 'Repository-only teardown of the organization preferences row when its owning organization is deleted (composition `onParentDelete` cascade).',\n outcome: 'The eager-seeded singleton preferences row is removed together with the organization — the composition part does not outlive its whole.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The organization preferences row was deleted as part of the owning organization’s deletion cascade.' },\n ],\n // REPOSITORY_ONLY variant (ORG_ADMIN) — invoked by the onParentDelete cascade, not a public HTTP endpoint, so no client-facing 400/403/404 are documented.\n idempotent: true,\n },\n },\n businessConstraints: [\n 'Organization preferences supply defaults. A member preference may replace them only where the organization policy explicitly permits an override.',\n ],\n }),\n { resourcePrimaryScope: ResourcePrimaryScope.ORGANIZATIONS },\n ),\n () => ({\n // CREATE is an INTERNAL_CALL system-seed (not surfaced to the frontend), so it\n // must not appear in the `views` (frontend semantics) slice — see the same fix\n // and rationale in organization-notifications.resource.specification.ts. Its\n // backend semantics live in the `operations` block above.\n views: {\n [Op.READ]: { purpose: 'Org regional settings read surface.', whenToUse: 'Check effective defaults before support tickets and audits.' },\n [Op.UPDATE]: { purpose: 'Org admin controlled regional stack edits.', whenToUse: 'New market launches and contract-mandated language support.' },\n },\n }),\n);\n"]}
1
+ {"version":3,"file":"organization-preferences.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/organizations/resources/organization-preferences.resource.specification.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6CAA6C,IAAI,uCAAuC,EAAE,MAAM,8BAA8B,CAAC;AACxI,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AAE/G,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,2BAA2B,EAC3B,0BAA0B,EAC1B,qBAAqB,IAAI,EAAE,EAC3B,6BAA6B,EAC7B,oBAAoB,EACpB,kEAAkE,IAAI,8BAA8B,GACrG,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,sBAAsB,EACtB,6BAA6B,EAC7B,qBAAqB,EACrB,8CAA8C,GAC/C,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAM3E,MAAM,yCAAyC,GAAG,uCAIjD,CAAC;AAEF,MAAM,gCAAgC,GAAG;IACvC,GAAG,EAAE,qCAAqC;I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,CAAC,aAAa,EAAE,CAC7D,EACD,GAAG,EAAE,CAAC,CAAC;IACL,+EAA+E;IAC/E,+EAA+E;IAC/E,6EAA6E;IAC7E,0DAA0D;IAC1D,KAAK,EAAE;QACL,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,OAAO,EAAE,qCAAqC,EAAE,SAAS,EAAE,6DAA6D,EAAE;QACvI,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE,4CAA4C,EAAE,SAAS,EAAE,6DAA6D,EAAE;KACjJ;CACF,CAAC,CACH,CAAC","sourcesContent":["import { organizationPreferencesMainResourceUIBehavior as organizationPreferencesUIBehaviorSource } from '@wildo-ai/presets-components';\nimport { AvailableLanguage, DateFormat, LabelAudience, TimeFormat } 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 CoreUserNotificationChannel,\n CoreUserNotificationTarget,\n CoreResourceOperation as Op,\n OrganizationPreferencesSchema,\n ResourcePrimaryScope,\n organizationPreferencesResourceConfiguration_InitializationFactory as organizationPreferencesFactory,\n} from '@wildo-ai/saas-models';\nimport {\n HttpResponseStatusCode,\n resourceFrontendConfiguration,\n resourceSpecification,\n resourceSpecificationFromFrontendConfiguration,\n} from '~wildo-specifications/_core';\nimport { EngineResourceSubDomain } from '../../engine-resource-sub-domain';\n\ntype Cfg = ReturnType<typeof organizationPreferencesFactory>;\ntype Core = Cfg['coreOperations'][number];\ntype Main = Cfg['mainSchema'];\n\nconst organizationPreferencesResourceUIBehavior = organizationPreferencesUIBehaviorSource as ResourceUIBehaviorConfig<\n Record<string, never>,\n Core,\n Main\n>;\n\nconst ORGANIZATION_PREFERENCES_EXAMPLE = {\n _id: 'organization_preferences_01JEXAMPLE',\n organizationId: 'org_01JEXAMPLE',\n timezone: 'Europe/Luxembourg',\n locale: AvailableLanguage.EN_GB,\n dateFormat: DateFormat.EU_LONG,\n timeFormat: TimeFormat.TWENTY_FOUR_HOUR,\n languagePreferences: {\n primaryLanguage: AvailableLanguage.EN_GB,\n supportedLanguages: [AvailableLanguage.EN_GB, AvailableLanguage.FR, AvailableLanguage.DE],\n allowUserOverride: true,\n enforceForAllMembers: false,\n },\n allowMemberEmailOverride: false,\n createdAt: '2026-01-12T09:00:00.000Z',\n updatedAt: '2026-08-20T16:30:00.000Z',\n _version: 4,\n} as const;\n\nconst ORGANIZATION_PREFERENCES_CONTEXT_EXAMPLE = {\n ...ORGANIZATION_PREFERENCES_EXAMPLE,\n organization: { _id: ORGANIZATION_PREFERENCES_EXAMPLE.organizationId },\n} as const;\n\nconst ORGANIZATION_PREFERENCES_SUMMARY_EXAMPLE = {\n _id: ORGANIZATION_PREFERENCES_EXAMPLE._id,\n organizationId: ORGANIZATION_PREFERENCES_EXAMPLE.organizationId,\n timezone: ORGANIZATION_PREFERENCES_EXAMPLE.timezone,\n locale: ORGANIZATION_PREFERENCES_EXAMPLE.locale,\n languagePreferences: ORGANIZATION_PREFERENCES_EXAMPLE.languagePreferences,\n _version: ORGANIZATION_PREFERENCES_EXAMPLE._version,\n} as const;\n\nconst ORGANIZATION_PREFERENCES_UPDATE_REQUEST_EXAMPLE = {\n timezone: 'Europe/Paris',\n locale: AvailableLanguage.FR,\n dateFormat: DateFormat.EU_SHORT,\n timeFormat: TimeFormat.TWENTY_FOUR_HOUR,\n languagePreferences: {\n primaryLanguage: AvailableLanguage.FR,\n supportedLanguages: [AvailableLanguage.FR, AvailableLanguage.EN_GB, AvailableLanguage.DE],\n allowUserOverride: true,\n enforceForAllMembers: false,\n },\n allowMemberEmailOverride: true,\n} as const;\n\nconst ORGANIZATION_PREFERENCES_UPDATE_RESPONSE_EXAMPLE = {\n ...ORGANIZATION_PREFERENCES_EXAMPLE,\n ...ORGANIZATION_PREFERENCES_UPDATE_REQUEST_EXAMPLE,\n updatedAt: '2026-08-21T10:15:00.000Z',\n _version: 5,\n} as const;\n\nexport const organizationPreferencesResourceSpecification = resourceSpecificationFromFrontendConfiguration(\n resourceFrontendConfiguration(organizationPreferencesResourceUIBehavior),\n resourceSpecification(\n organizationPreferencesFactory,\n OrganizationPreferencesSchema,\n ({ schemaShape }) => ({\n purpose: 'Organization-wide regional and language defaults, formatting conventions, and member override policy.',\n businessRole: 'Gives members and integrations one consistent locale, timezone, language, and email-preference policy for the organization.',\n lifecycleRole: 'Changes when the organization enters a new region, supports another language, or revises its member override policy.',\n audience: LabelAudience.ADMIN,\n subDomain: EngineResourceSubDomain.ORGANIZATIONS,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'OrganizationPreferencesSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactory: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'organizationPreferencesResourceConfiguration_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: 'ORGANIZATION_PREFERENCES',\n },\n operationVocabulary: {\n coreEnum: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceOperation',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n frontendConfigurationSources: [\n {\n packageName: '@wildo-ai/presets-components',\n exportName: 'organizationPreferencesMainResourceUIBehavior',\n symbolKind: CodeSymbolKind.UI_BEHAVIOR,\n },\n ],\n },\n fields: {\n _id: schemaShape._id.stringSpec({\n meaning: 'Stable identifier of the organization-preferences record.',\n }),\n organizationId: schemaShape.organizationId.foreignKeySpec({\n meaning: 'The organization whose regional defaults and language policy this row holds.',\n whyItMatters: 'Anchors the preferences to one tenant so locale/date/time defaults and member-override policy resolve per organization and never bleed across tenants.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n timezone: schemaShape.timezone.stringSpec({ meaning: 'Default IANA-style timezone for org-wide scheduling surfaces.' }),\n locale: schemaShape.locale.enumSpec({\n meaning: 'Default product locale for the organization — drives copy selection and formatting when a member has not overridden it.',\n importance: FieldSemanticImportance.PRIMARY,\n enumDeclaration: {\n packageName: '@wildo-ai/presets-components-models',\n exportName: 'AvailableLanguage',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n values: {\n [AvailableLanguage.EN]: { meaning: 'English (United States).' },\n [AvailableLanguage.EN_GB]: { meaning: 'English (United Kingdom).' },\n [AvailableLanguage.EN_CA]: { meaning: 'English (Canada).' },\n [AvailableLanguage.EN_AU]: { meaning: 'English (Australia).' },\n [AvailableLanguage.ES]: { meaning: 'Spanish (Spain).' },\n [AvailableLanguage.ES_MX]: { meaning: 'Spanish (Mexico).' },\n [AvailableLanguage.ES_AR]: { meaning: 'Spanish (Argentina).' },\n [AvailableLanguage.ES_CO]: { meaning: 'Spanish (Colombia).' },\n [AvailableLanguage.FR]: { meaning: 'French (France).' },\n [AvailableLanguage.FR_CA]: { meaning: 'French (Canada).' },\n [AvailableLanguage.DE]: { meaning: 'German.' },\n [AvailableLanguage.DE_AT]: { meaning: 'German (Austria).' },\n [AvailableLanguage.DE_CH]: { meaning: 'German (Switzerland).' },\n [AvailableLanguage.PT]: { meaning: 'Portuguese (Portugal).' },\n [AvailableLanguage.PT_BR]: { meaning: 'Portuguese (Brazil).' },\n [AvailableLanguage.IT]: { meaning: 'Italian.' },\n [AvailableLanguage.NL]: { meaning: 'Dutch.' },\n [AvailableLanguage.RU]: { meaning: 'Russian.' },\n [AvailableLanguage.ZH]: { meaning: 'Chinese (Simplified).' },\n [AvailableLanguage.ZH_CN]: { meaning: 'Chinese (Simplified, China).' },\n [AvailableLanguage.ZH_TW]: { meaning: 'Chinese (Traditional, Taiwan).' },\n [AvailableLanguage.ZH_HK]: { meaning: 'Chinese (Traditional, Hong Kong).' },\n [AvailableLanguage.JA]: { meaning: 'Japanese.' },\n [AvailableLanguage.KO]: { meaning: 'Korean.' },\n [AvailableLanguage.AR]: { meaning: 'Arabic.' },\n [AvailableLanguage.HI]: { meaning: 'Hindi.' },\n [AvailableLanguage.SV]: { meaning: 'Swedish.' },\n [AvailableLanguage.NO]: { meaning: 'Norwegian.' },\n [AvailableLanguage.DA]: { meaning: 'Danish.' },\n [AvailableLanguage.FI]: { meaning: 'Finnish.' },\n [AvailableLanguage.PL]: { meaning: 'Polish.' },\n [AvailableLanguage.CS]: { meaning: 'Czech.' },\n [AvailableLanguage.HU]: { meaning: 'Hungarian.' },\n [AvailableLanguage.RO]: { meaning: 'Romanian.' },\n [AvailableLanguage.BG]: { meaning: 'Bulgarian.' },\n [AvailableLanguage.HR]: { meaning: 'Croatian.' },\n [AvailableLanguage.SK]: { meaning: 'Slovak.' },\n [AvailableLanguage.SL]: { meaning: 'Slovenian.' },\n [AvailableLanguage.LT]: { meaning: 'Lithuanian.' },\n [AvailableLanguage.LV]: { meaning: 'Latvian.' },\n [AvailableLanguage.ET]: { meaning: 'Estonian.' },\n [AvailableLanguage.EL]: { meaning: 'Greek.' },\n [AvailableLanguage.TR]: { meaning: 'Turkish.' },\n [AvailableLanguage.TH]: { meaning: 'Thai.' },\n [AvailableLanguage.VI]: { meaning: 'Vietnamese.' },\n [AvailableLanguage.ID]: { meaning: 'Indonesian.' },\n [AvailableLanguage.MS]: { meaning: 'Malay.' },\n [AvailableLanguage.TA]: { meaning: 'Tamil.' },\n [AvailableLanguage.BN]: { meaning: 'Bengali.' },\n [AvailableLanguage.UR]: { meaning: 'Urdu.' },\n [AvailableLanguage.FA]: { meaning: 'Persian / Farsi.' },\n [AvailableLanguage.HE]: { meaning: 'Hebrew.' },\n [AvailableLanguage.SW]: { meaning: 'Swahili.' },\n [AvailableLanguage.AF]: { meaning: 'Afrikaans.' },\n [AvailableLanguage.AM]: { meaning: 'Amharic.' },\n [AvailableLanguage.IS]: { meaning: 'Icelandic.' },\n [AvailableLanguage.MT]: { meaning: 'Maltese.' },\n [AvailableLanguage.GA]: { meaning: 'Irish.' },\n [AvailableLanguage.CY]: { meaning: 'Welsh.' },\n [AvailableLanguage.EU]: { meaning: 'Basque.' },\n [AvailableLanguage.CA]: { meaning: 'Catalan.' },\n [AvailableLanguage.GL]: { meaning: 'Galician.' },\n },\n }),\n dateFormat: schemaShape.dateFormat.enumSpec({\n meaning: 'Default date-rendering pattern applied across org-wide surfaces.',\n enumDeclaration: {\n packageName: '@wildo-ai/presets-components-models',\n exportName: 'DateFormat',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n values: {\n [DateFormat.LOCALE_DEFAULT]: { meaning: 'Locale-driven medium date rendered by `Intl.DateTimeFormat` in the viewer\\'s resolved locale (e.g. `Aug 18, 2026` / `18 août 2026`); the engine fallback when no preference is expressed.' },\n [DateFormat.ISO_8601]: { meaning: 'ISO 8601 date, `YYYY-MM-DD`.' },\n [DateFormat.ISO_DATETIME]: { meaning: 'ISO 8601 date-time, `YYYY-MM-DD HH:mm:ss`.' },\n [DateFormat.US_SHORT]: { meaning: 'US short, `MM/DD/YYYY`.' },\n [DateFormat.US_LONG]: { meaning: 'US long, `MMMM DD, YYYY`.' },\n [DateFormat.US_MEDIUM]: { meaning: 'US medium, `MMM DD, YYYY`.' },\n [DateFormat.EU_SHORT]: { meaning: 'European short, `DD/MM/YYYY`.' },\n [DateFormat.EU_LONG]: { meaning: 'European long, `DD MMMM YYYY`.' },\n [DateFormat.EU_MEDIUM]: { meaning: 'European medium, `DD MMM YYYY`.' },\n [DateFormat.DOT_SEPARATED]: { meaning: 'Dot-separated, `DD.MM.YYYY`.' },\n [DateFormat.DASH_SEPARATED]: { meaning: 'Dash-separated, `DD-MM-YYYY`.' },\n [DateFormat.REVERSE_SLASH]: { meaning: 'Reverse slash, `YYYY/MM/DD`.' },\n [DateFormat.COMPACT_US]: { meaning: 'Compact US, `M/D/YY`.' },\n [DateFormat.COMPACT_EU]: { meaning: 'Compact European, `D/M/YY`.' },\n [DateFormat.COMPACT_ISO]: { meaning: 'Compact ISO, `YY-MM-DD`.' },\n },\n }),\n timeFormat: schemaShape.timeFormat.enumSpec({\n meaning: 'Default clock convention (12- vs 24-hour) applied across org-wide surfaces.',\n enumDeclaration: {\n packageName: '@wildo-ai/presets-components-models',\n exportName: 'TimeFormat',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n values: {\n [TimeFormat.TWELVE_HOUR]: { meaning: '12-hour clock with AM/PM.' },\n [TimeFormat.TWENTY_FOUR_HOUR]: { meaning: '24-hour clock.' },\n },\n }),\n languagePreferences: schemaShape.languagePreferences.objectSpec({\n meaning: 'Organization language policy: primary language, supported language set, and whether members may choose a different language.',\n whyItMatters: 'Clients use this policy to offer only supported languages and to decide whether a member-level selection is allowed.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n allowMemberEmailOverride: schemaShape.allowMemberEmailOverride.booleanSpec({\n meaning: 'Whether members may choose email-delivery preferences that differ from the organization default.',\n whyItMatters: 'When false, clients should present organization policy as enforced rather than offering an ineffective member override.',\n }),\n createdAt: schemaShape.createdAt.dateSpec({ meaning: 'When the organization-preferences record was created.' }),\n updatedAt: schemaShape.updatedAt.dateSpec({ meaning: 'When any stored organization preference last changed.' }),\n },\n operations: {\n [Op.READ]: {\n purpose: 'Read the organization’s effective regional and language defaults.',\n outcome: 'The caller receives the timezone, locale, formatting rules, supported-language policy, and member email-override policy.',\n whenToUse: 'Use this operation before formatting organization-wide dates and times or presenting member language and email-preference controls.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The organization’s regional defaults (timezone, locale, supported languages, override policy) are returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not a member of the addressed organization.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No preferences record exists for the addressed organization.' },\n ],\n examples: [{\n title: 'Read organization regional and language preferences',\n request: { organizationId: ORGANIZATION_PREFERENCES_EXAMPLE.organizationId },\n response: ORGANIZATION_PREFERENCES_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n variants: {\n context: {\n purpose: 'Read the complete preferences record with its organization relationship context.',\n outcome: 'The preferences and the related organization identifier are returned together.',\n examples: [{\n title: 'Read organization preferences with context',\n request: { organizationId: ORGANIZATION_PREFERENCES_EXAMPLE.organizationId },\n response: ORGANIZATION_PREFERENCES_CONTEXT_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n summary: {\n purpose: 'Read the compact regional and language-policy representation.',\n outcome: 'The record identity, organization, timezone, locale, language policy, and resource version are returned.',\n examples: [{\n title: 'Read compact organization preferences',\n request: { organizationId: ORGANIZATION_PREFERENCES_EXAMPLE.organizationId },\n response: ORGANIZATION_PREFERENCES_SUMMARY_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n idempotent: true,\n },\n [Op.CREATE]: {\n purpose: 'System-seed the org preferences row (INTERNAL_CALL, isDefault — the service-tier internal transport `createAsSystem` resolves; REPOSITORY_ONLY is invisible to `getServiceOperationPathDefault`) — fired by the ORGANIZATIONS → ORGANIZATION_PREFERENCES `onParentCreate` composition lifecycle on organization creation, not a member-facing route.',\n outcome: 'A defaults-filled preferences row exists for the tenant so regional/locale reads resolve without a lazy fallback.',\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'A preferences row was created for the organization with schema defaults (timezone, locale, supported languages, override policy).' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The seeded preferences payload fails `OrganizationPreferencesSchema` validation.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'A preferences row already exists for the organization; the per-org singleton (unique `organizationId`) rejects a second row, keeping the eager seed idempotent.' },\n ],\n idempotent: false,\n },\n [Op.UPDATE]: {\n purpose: 'Update the organization’s regional, language, and member email-override defaults.',\n outcome: 'The updated preferences become the organization defaults for clients and new member sessions.',\n whenToUse: 'Use this operation when the organization changes operating region, supported languages, formatting conventions, or member override policy.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The regional defaults and enforcement flags were updated and the new effective configuration is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The timezone, locale, or supported-language list fails schema validation.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller does not hold the organization-manager authority required to change organization-wide preferences.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No preferences record exists for the addressed organization.' },\n ],\n examples: [{\n title: 'Change organization locale and language policy',\n request: {\n organizationId: ORGANIZATION_PREFERENCES_EXAMPLE.organizationId,\n ...ORGANIZATION_PREFERENCES_UPDATE_REQUEST_EXAMPLE,\n },\n response: ORGANIZATION_PREFERENCES_UPDATE_RESPONSE_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n communications: {\n notification: {\n purpose: 'Confirm in-product that the organization preferences were saved.',\n tone: 'Brief and operational; the confirmation should not restate the full policy payload.',\n textSlots: { title: { purpose: 'Short success headline for the saved-preferences confirmation.' } },\n deliveries: [{\n audience: 'The signed-in organization manager who performed the update.',\n targetRef: CoreUserNotificationTarget.USER_SELF,\n channelRef: CoreUserNotificationChannel.FRONT_END_SUCCESS,\n }],\n },\n },\n idempotent: true,\n },\n [Op.DELETE]: {\n purpose: 'Repository-only teardown of the organization preferences row when its owning organization is deleted (composition `onParentDelete` cascade).',\n outcome: 'The eager-seeded singleton preferences row is removed together with the organization — the composition part does not outlive its whole.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The organization preferences row was deleted as part of the owning organization’s deletion cascade.' },\n ],\n // REPOSITORY_ONLY variant (ORG_ADMIN) — invoked by the onParentDelete cascade, not a public HTTP endpoint, so no client-facing 400/403/404 are documented.\n idempotent: true,\n },\n },\n businessConstraints: [\n 'Organization preferences supply defaults. A member preference may replace them only where the organization policy explicitly permits an override.',\n ],\n }),\n { resourcePrimaryScope: ResourcePrimaryScope.ORGANIZATIONS },\n ),\n () => ({\n // CREATE is an INTERNAL_CALL system-seed (not surfaced to the frontend), so it\n // must not appear in the `views` (frontend semantics) slice — see the same fix\n // and rationale in organization-notifications.resource.specification.ts. Its\n // backend semantics live in the `operations` block above.\n views: {\n [Op.READ]: { purpose: 'Org regional settings read surface.', whenToUse: 'Check effective defaults before support tickets and audits.' },\n [Op.UPDATE]: { purpose: 'Org admin controlled regional stack edits.', whenToUse: 'New market launches and contract-mandated language support.' },\n },\n }),\n);\n"]}