@wildo-ai/saas-specifications 1.1.0 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (423) hide show
  1. package/dist/assurance/external-framework-mapping.json +980 -0
  2. package/dist/esm/_core/brand/brand.family-aspects.d.ts +3 -0
  3. package/dist/esm/_core/brand/brand.family-aspects.d.ts.map +1 -0
  4. package/dist/esm/_core/brand/brand.family-aspects.js +51 -0
  5. package/dist/esm/_core/brand/brand.family-aspects.js.map +1 -0
  6. package/dist/esm/_core/build-plan/build-plan.family-aspects.d.ts +3 -0
  7. package/dist/esm/_core/build-plan/build-plan.family-aspects.d.ts.map +1 -0
  8. package/dist/esm/_core/build-plan/build-plan.family-aspects.js +28 -0
  9. package/dist/esm/_core/build-plan/build-plan.family-aspects.js.map +1 -0
  10. package/dist/esm/_core/business-model-lite/business-model.family-aspects.d.ts +3 -0
  11. package/dist/esm/_core/business-model-lite/business-model.family-aspects.d.ts.map +1 -0
  12. package/dist/esm/_core/business-model-lite/business-model.family-aspects.js +21 -0
  13. package/dist/esm/_core/business-model-lite/business-model.family-aspects.js.map +1 -0
  14. package/dist/esm/_core/chart-view-specification.schemas.d.ts +11 -0
  15. package/dist/esm/_core/chart-view-specification.schemas.d.ts.map +1 -1
  16. package/dist/esm/_core/chart-view-specification.schemas.js.map +1 -1
  17. package/dist/esm/_core/compliance-documents/compliance-document-candidate-generation.schemas.d.ts +85 -0
  18. package/dist/esm/_core/compliance-documents/compliance-document-candidate-generation.schemas.d.ts.map +1 -1
  19. package/dist/esm/_core/compliance-documents/compliance-document-candidate-generation.schemas.js +41 -0
  20. package/dist/esm/_core/compliance-documents/compliance-document-candidate-generation.schemas.js.map +1 -1
  21. package/dist/esm/_core/compliance-documents/compliance-document-candidate.schemas.d.ts +168 -2
  22. package/dist/esm/_core/compliance-documents/compliance-document-candidate.schemas.d.ts.map +1 -1
  23. package/dist/esm/_core/compliance-documents/compliance-document-candidate.schemas.js +98 -9
  24. package/dist/esm/_core/compliance-documents/compliance-document-candidate.schemas.js.map +1 -1
  25. package/dist/esm/_core/compliance-documents/compliance-documents.family-aspects.d.ts +12 -0
  26. package/dist/esm/_core/compliance-documents/compliance-documents.family-aspects.d.ts.map +1 -0
  27. package/dist/esm/_core/compliance-documents/compliance-documents.family-aspects.js +47 -0
  28. package/dist/esm/_core/compliance-documents/compliance-documents.family-aspects.js.map +1 -0
  29. package/dist/esm/_core/compliance-documents/document-fact-specification-generation.schemas.d.ts.map +1 -1
  30. package/dist/esm/_core/compliance-documents/document-fact-specification-generation.schemas.js +8 -3
  31. package/dist/esm/_core/compliance-documents/document-fact-specification-generation.schemas.js.map +1 -1
  32. package/dist/esm/_core/compliance-documents/processor-register.family-aspects.d.ts +21 -0
  33. package/dist/esm/_core/compliance-documents/processor-register.family-aspects.d.ts.map +1 -0
  34. package/dist/esm/_core/compliance-documents/processor-register.family-aspects.js +40 -0
  35. package/dist/esm/_core/compliance-documents/processor-register.family-aspects.js.map +1 -0
  36. package/dist/esm/_core/composite-view-specification.schemas.d.ts +11 -0
  37. package/dist/esm/_core/composite-view-specification.schemas.d.ts.map +1 -1
  38. package/dist/esm/_core/composite-view-specification.schemas.js.map +1 -1
  39. package/dist/esm/_core/domain-plan/domain-plan.family-aspects.d.ts +3 -0
  40. package/dist/esm/_core/domain-plan/domain-plan.family-aspects.d.ts.map +1 -0
  41. package/dist/esm/_core/domain-plan/domain-plan.family-aspects.js +32 -0
  42. package/dist/esm/_core/domain-plan/domain-plan.family-aspects.js.map +1 -0
  43. package/dist/esm/_core/execution-view-specification.schemas.d.ts +11 -0
  44. package/dist/esm/_core/execution-view-specification.schemas.d.ts.map +1 -1
  45. package/dist/esm/_core/execution-view-specification.schemas.js.map +1 -1
  46. package/dist/esm/_core/family-aspects.registry.d.ts +18 -0
  47. package/dist/esm/_core/family-aspects.registry.d.ts.map +1 -0
  48. package/dist/esm/_core/family-aspects.registry.js +60 -0
  49. package/dist/esm/_core/family-aspects.registry.js.map +1 -0
  50. package/dist/esm/_core/family-aspects.schemas.d.ts +122 -0
  51. package/dist/esm/_core/family-aspects.schemas.d.ts.map +1 -0
  52. package/dist/esm/_core/family-aspects.schemas.js +15 -0
  53. package/dist/esm/_core/family-aspects.schemas.js.map +1 -0
  54. package/dist/esm/_core/feature-drafts/capability-map-output-set-generation.schemas.d.ts +11 -11
  55. package/dist/esm/_core/feature-drafts/feature-drafts.family-aspects.d.ts +3 -0
  56. package/dist/esm/_core/feature-drafts/feature-drafts.family-aspects.d.ts.map +1 -0
  57. package/dist/esm/_core/feature-drafts/feature-drafts.family-aspects.js +25 -0
  58. package/dist/esm/_core/feature-drafts/feature-drafts.family-aspects.js.map +1 -0
  59. package/dist/esm/_core/flows-actors-view-specification.schemas.d.ts +11 -0
  60. package/dist/esm/_core/flows-actors-view-specification.schemas.d.ts.map +1 -1
  61. package/dist/esm/_core/flows-actors-view-specification.schemas.js.map +1 -1
  62. package/dist/esm/_core/frontend-component-specification.schemas.d.ts.map +1 -1
  63. package/dist/esm/_core/frontend-component-specification.schemas.js +19 -1
  64. package/dist/esm/_core/frontend-component-specification.schemas.js.map +1 -1
  65. package/dist/esm/_core/full-custom-view-specification.schemas.d.ts +11 -0
  66. package/dist/esm/_core/full-custom-view-specification.schemas.d.ts.map +1 -1
  67. package/dist/esm/_core/full-custom-view-specification.schemas.js.map +1 -1
  68. package/dist/esm/_core/guidance-flow-specification.schemas.d.ts +11 -0
  69. package/dist/esm/_core/guidance-flow-specification.schemas.d.ts.map +1 -1
  70. package/dist/esm/_core/guidance-flow-specification.schemas.js +14 -0
  71. package/dist/esm/_core/guidance-flow-specification.schemas.js.map +1 -1
  72. package/dist/esm/_core/index.d.ts +2 -0
  73. package/dist/esm/_core/index.d.ts.map +1 -1
  74. package/dist/esm/_core/index.js +2 -0
  75. package/dist/esm/_core/index.js.map +1 -1
  76. package/dist/esm/_core/market/market-snapshot-generation.schemas.d.ts +22 -22
  77. package/dist/esm/_core/market/market.family-aspects.d.ts +9 -0
  78. package/dist/esm/_core/market/market.family-aspects.d.ts.map +1 -0
  79. package/dist/esm/_core/market/market.family-aspects.js +227 -0
  80. package/dist/esm/_core/market/market.family-aspects.js.map +1 -0
  81. package/dist/esm/_core/onboarding-view-specification.schemas.d.ts +11 -0
  82. package/dist/esm/_core/onboarding-view-specification.schemas.d.ts.map +1 -1
  83. package/dist/esm/_core/onboarding-view-specification.schemas.js +14 -0
  84. package/dist/esm/_core/onboarding-view-specification.schemas.js.map +1 -1
  85. package/dist/esm/_core/placement-plan/placement-plan.family-aspects.d.ts +3 -0
  86. package/dist/esm/_core/placement-plan/placement-plan.family-aspects.d.ts.map +1 -0
  87. package/dist/esm/_core/placement-plan/placement-plan.family-aspects.js +31 -0
  88. package/dist/esm/_core/placement-plan/placement-plan.family-aspects.js.map +1 -0
  89. package/dist/esm/_core/requirements/requirements.family-aspects.d.ts +9 -0
  90. package/dist/esm/_core/requirements/requirements.family-aspects.d.ts.map +1 -0
  91. package/dist/esm/_core/requirements/requirements.family-aspects.js +40 -0
  92. package/dist/esm/_core/requirements/requirements.family-aspects.js.map +1 -0
  93. package/dist/esm/_core/resource-specification.schemas.d.ts +22 -0
  94. package/dist/esm/_core/resource-specification.schemas.d.ts.map +1 -1
  95. package/dist/esm/_core/resource-specification.schemas.js.map +1 -1
  96. package/dist/esm/_core/roadmap/roadmap.family-aspects.d.ts +3 -0
  97. package/dist/esm/_core/roadmap/roadmap.family-aspects.d.ts.map +1 -0
  98. package/dist/esm/_core/roadmap/roadmap.family-aspects.js +26 -0
  99. package/dist/esm/_core/roadmap/roadmap.family-aspects.js.map +1 -0
  100. package/dist/esm/_core/vision/vision.family-aspects.d.ts +11 -0
  101. package/dist/esm/_core/vision/vision.family-aspects.d.ts.map +1 -0
  102. package/dist/esm/_core/vision/vision.family-aspects.js +63 -0
  103. package/dist/esm/_core/vision/vision.family-aspects.js.map +1 -0
  104. package/dist/esm/application-creation/application-document-fact-specification.application-creation.schemas.d.ts +188 -33
  105. package/dist/esm/application-creation/application-document-fact-specification.application-creation.schemas.d.ts.map +1 -1
  106. package/dist/esm/application-creation/application-document-fact-specification.application-creation.schemas.js +158 -57
  107. package/dist/esm/application-creation/application-document-fact-specification.application-creation.schemas.js.map +1 -1
  108. package/dist/esm/application-creation/application-specification-family-identity.application-creation.schemas.d.ts +38 -4
  109. package/dist/esm/application-creation/application-specification-family-identity.application-creation.schemas.d.ts.map +1 -1
  110. package/dist/esm/application-creation/application-specification-family-identity.application-creation.schemas.js +37 -3
  111. package/dist/esm/application-creation/application-specification-family-identity.application-creation.schemas.js.map +1 -1
  112. package/dist/esm/application-creation/document-facts.family-aspects.d.ts +12 -0
  113. package/dist/esm/application-creation/document-facts.family-aspects.d.ts.map +1 -0
  114. package/dist/esm/application-creation/document-facts.family-aspects.js +37 -0
  115. package/dist/esm/application-creation/document-facts.family-aspects.js.map +1 -0
  116. package/dist/esm/application-creation/document-release-policy.family-aspects.d.ts +3 -0
  117. package/dist/esm/application-creation/document-release-policy.family-aspects.d.ts.map +1 -0
  118. package/dist/esm/application-creation/document-release-policy.family-aspects.js +23 -0
  119. package/dist/esm/application-creation/document-release-policy.family-aspects.js.map +1 -0
  120. package/dist/esm/application-creation/playbooks.application-creation.schemas.d.ts +93 -62
  121. package/dist/esm/application-creation/playbooks.application-creation.schemas.d.ts.map +1 -1
  122. package/dist/esm/application-creation/playbooks.application-creation.schemas.js +114 -59
  123. package/dist/esm/application-creation/playbooks.application-creation.schemas.js.map +1 -1
  124. package/dist/esm/application-creation/structured-artifact-landing.application-creation.schemas.d.ts +2 -0
  125. package/dist/esm/application-creation/structured-artifact-landing.application-creation.schemas.d.ts.map +1 -1
  126. package/dist/esm/application-creation/structured-artifact-landing.application-creation.schemas.js +2 -0
  127. package/dist/esm/application-creation/structured-artifact-landing.application-creation.schemas.js.map +1 -1
  128. package/dist/esm/application-creation.exports.d.ts +11 -0
  129. package/dist/esm/application-creation.exports.d.ts.map +1 -1
  130. package/dist/esm/application-creation.exports.js +11 -0
  131. package/dist/esm/application-creation.exports.js.map +1 -1
  132. package/dist/esm/assurance/assurance-authority-basis.definitions.d.ts +976 -2
  133. package/dist/esm/assurance/assurance-authority-basis.definitions.d.ts.map +1 -1
  134. package/dist/esm/assurance/assurance-authority-basis.definitions.js +2026 -61
  135. package/dist/esm/assurance/assurance-authority-basis.definitions.js.map +1 -1
  136. package/dist/esm/assurance/assurance-authority-basis.schemas.d.ts +1 -0
  137. package/dist/esm/assurance/assurance-authority-basis.schemas.d.ts.map +1 -1
  138. package/dist/esm/assurance/assurance-document-system.definitions.d.ts.map +1 -1
  139. package/dist/esm/assurance/assurance-document-system.definitions.js +18 -3
  140. package/dist/esm/assurance/assurance-document-system.definitions.js.map +1 -1
  141. package/dist/esm/assurance/assurance-document-system.schemas.d.ts +32 -2
  142. package/dist/esm/assurance/assurance-document-system.schemas.d.ts.map +1 -1
  143. package/dist/esm/assurance/assurance-document-system.schemas.js +32 -2
  144. package/dist/esm/assurance/assurance-document-system.schemas.js.map +1 -1
  145. package/dist/esm/assurance/assurance-external-framework-mapping.d.ts +90 -0
  146. package/dist/esm/assurance/assurance-external-framework-mapping.d.ts.map +1 -0
  147. package/dist/esm/assurance/assurance-external-framework-mapping.js +134 -0
  148. package/dist/esm/assurance/assurance-external-framework-mapping.js.map +1 -0
  149. package/dist/esm/assurance/assurance-objective-catalog.definitions.d.ts +71 -1
  150. package/dist/esm/assurance/assurance-objective-catalog.definitions.d.ts.map +1 -1
  151. package/dist/esm/assurance/assurance-objective-catalog.definitions.js +545 -5
  152. package/dist/esm/assurance/assurance-objective-catalog.definitions.js.map +1 -1
  153. package/dist/esm/assurance/assurance-program-generation.schemas.d.ts +141 -0
  154. package/dist/esm/assurance/assurance-program-generation.schemas.d.ts.map +1 -0
  155. package/dist/esm/assurance/assurance-program-generation.schemas.js +377 -0
  156. package/dist/esm/assurance/assurance-program-generation.schemas.js.map +1 -0
  157. package/dist/esm/assurance/assurance-program.family-aspects.d.ts +13 -0
  158. package/dist/esm/assurance/assurance-program.family-aspects.d.ts.map +1 -0
  159. package/dist/esm/assurance/assurance-program.family-aspects.js +16 -0
  160. package/dist/esm/assurance/assurance-program.family-aspects.js.map +1 -0
  161. package/dist/esm/assurance/assurance-program.schemas.d.ts +30 -6
  162. package/dist/esm/assurance/assurance-program.schemas.d.ts.map +1 -1
  163. package/dist/esm/assurance/assurance-program.schemas.js +29 -6
  164. package/dist/esm/assurance/assurance-program.schemas.js.map +1 -1
  165. package/dist/esm/assurance/assurance-source-registry.definitions.d.ts +1 -0
  166. package/dist/esm/assurance/assurance-source-registry.definitions.d.ts.map +1 -1
  167. package/dist/esm/assurance/assurance-source-registry.definitions.js +12 -0
  168. package/dist/esm/assurance/assurance-source-registry.definitions.js.map +1 -1
  169. package/dist/esm/assurance/assurance-sources.schemas.d.ts +76 -0
  170. package/dist/esm/assurance/assurance-sources.schemas.d.ts.map +1 -1
  171. package/dist/esm/assurance/assurance-sources.schemas.js +59 -0
  172. package/dist/esm/assurance/assurance-sources.schemas.js.map +1 -1
  173. package/dist/esm/assurance/document-publication.family-aspects.d.ts +29 -0
  174. package/dist/esm/assurance/document-publication.family-aspects.d.ts.map +1 -0
  175. package/dist/esm/assurance/document-publication.family-aspects.js +48 -0
  176. package/dist/esm/assurance/document-publication.family-aspects.js.map +1 -0
  177. package/dist/esm/assurance.exports.d.ts +2 -0
  178. package/dist/esm/assurance.exports.d.ts.map +1 -1
  179. package/dist/esm/assurance.exports.js +2 -0
  180. package/dist/esm/assurance.exports.js.map +1 -1
  181. package/dist/esm/companion-exports.d.ts +19 -2
  182. package/dist/esm/companion-exports.d.ts.map +1 -1
  183. package/dist/esm/companion-exports.js.map +1 -1
  184. package/dist/esm/engine/applications/resources/application-api-keys.resource.specification.d.ts.map +1 -1
  185. package/dist/esm/engine/applications/resources/application-api-keys.resource.specification.js +2 -0
  186. package/dist/esm/engine/applications/resources/application-api-keys.resource.specification.js.map +1 -1
  187. package/dist/esm/engine/applications/resources/application-metadata.resource.specification.d.ts.map +1 -1
  188. package/dist/esm/engine/applications/resources/application-metadata.resource.specification.js +3 -1
  189. package/dist/esm/engine/applications/resources/application-metadata.resource.specification.js.map +1 -1
  190. package/dist/esm/engine/applications/resources/application-oauth-clients.resource.specification.d.ts.map +1 -1
  191. package/dist/esm/engine/applications/resources/application-oauth-clients.resource.specification.js +3 -1
  192. package/dist/esm/engine/applications/resources/application-oauth-clients.resource.specification.js.map +1 -1
  193. package/dist/esm/engine/applications/resources/application-versions.resource.specification.d.ts.map +1 -1
  194. package/dist/esm/engine/applications/resources/application-versions.resource.specification.js +3 -1
  195. package/dist/esm/engine/applications/resources/application-versions.resource.specification.js.map +1 -1
  196. package/dist/esm/engine/applications/resources/applications.resource.specification.d.ts.map +1 -1
  197. package/dist/esm/engine/applications/resources/applications.resource.specification.js +3 -1
  198. package/dist/esm/engine/applications/resources/applications.resource.specification.js.map +1 -1
  199. package/dist/esm/engine/auth/resources/consumable-tokens.resource.specification.d.ts +36 -0
  200. package/dist/esm/engine/auth/resources/consumable-tokens.resource.specification.d.ts.map +1 -0
  201. package/dist/esm/engine/auth/resources/consumable-tokens.resource.specification.js +193 -0
  202. package/dist/esm/engine/auth/resources/consumable-tokens.resource.specification.js.map +1 -0
  203. package/dist/esm/engine/auth/resources/oauth-consent-grants.resource.specification.d.ts +1 -1
  204. package/dist/esm/engine/auth/resources/oauth-consent-grants.resource.specification.d.ts.map +1 -1
  205. package/dist/esm/engine/auth/resources/oauth-consent-grants.resource.specification.js +2 -0
  206. package/dist/esm/engine/auth/resources/oauth-consent-grants.resource.specification.js.map +1 -1
  207. package/dist/esm/engine/auth/resources/organization-api-keys.resource.specification.d.ts.map +1 -1
  208. package/dist/esm/engine/auth/resources/organization-api-keys.resource.specification.js +2 -0
  209. package/dist/esm/engine/auth/resources/organization-api-keys.resource.specification.js.map +1 -1
  210. package/dist/esm/engine/auth/resources/organization-oauth-clients.resource.specification.d.ts.map +1 -1
  211. package/dist/esm/engine/auth/resources/organization-oauth-clients.resource.specification.js +3 -1
  212. package/dist/esm/engine/auth/resources/organization-oauth-clients.resource.specification.js.map +1 -1
  213. package/dist/esm/engine/auth/resources/platform-access-grants.resource.specification.d.ts +1 -1
  214. package/dist/esm/engine/auth/resources/platform-access-grants.resource.specification.d.ts.map +1 -1
  215. package/dist/esm/engine/auth/resources/platform-access-grants.resource.specification.js +2 -0
  216. package/dist/esm/engine/auth/resources/platform-access-grants.resource.specification.js.map +1 -1
  217. package/dist/esm/engine/auth/resources/scim-provisioning-config.resource.specification.d.ts.map +1 -1
  218. package/dist/esm/engine/auth/resources/scim-provisioning-config.resource.specification.js +2 -0
  219. package/dist/esm/engine/auth/resources/scim-provisioning-config.resource.specification.js.map +1 -1
  220. package/dist/esm/engine/auth/resources/scim-tokens.resource.specification.d.ts.map +1 -1
  221. package/dist/esm/engine/auth/resources/scim-tokens.resource.specification.js +2 -0
  222. package/dist/esm/engine/auth/resources/scim-tokens.resource.specification.js.map +1 -1
  223. package/dist/esm/engine/auth/resources/siem-delivery-dlq.resource.specification.d.ts.map +1 -1
  224. package/dist/esm/engine/auth/resources/siem-delivery-dlq.resource.specification.js +2 -0
  225. package/dist/esm/engine/auth/resources/siem-delivery-dlq.resource.specification.js.map +1 -1
  226. package/dist/esm/engine/auth/resources/siem-export-config.resource.specification.d.ts.map +1 -1
  227. package/dist/esm/engine/auth/resources/siem-export-config.resource.specification.js +6 -4
  228. package/dist/esm/engine/auth/resources/siem-export-config.resource.specification.js.map +1 -1
  229. package/dist/esm/engine/auth/resources/sso-config.resource.specification.d.ts.map +1 -1
  230. package/dist/esm/engine/auth/resources/sso-config.resource.specification.js +2 -0
  231. package/dist/esm/engine/auth/resources/sso-config.resource.specification.js.map +1 -1
  232. package/dist/esm/engine/auth/resources/sso-connections.resource.specification.d.ts.map +1 -1
  233. package/dist/esm/engine/auth/resources/sso-connections.resource.specification.js +2 -0
  234. package/dist/esm/engine/auth/resources/sso-connections.resource.specification.js.map +1 -1
  235. package/dist/esm/engine/billing/resources/billing-accounts.resource.specification.d.ts +2 -2
  236. package/dist/esm/engine/billing/resources/billing-accounts.resource.specification.d.ts.map +1 -1
  237. package/dist/esm/engine/billing/resources/billing-accounts.resource.specification.js +2 -0
  238. package/dist/esm/engine/billing/resources/billing-accounts.resource.specification.js.map +1 -1
  239. package/dist/esm/engine/billing/resources/credit-pools.resource.specification.d.ts +8 -8
  240. package/dist/esm/engine/billing/resources/credit-pools.resource.specification.d.ts.map +1 -1
  241. package/dist/esm/engine/billing/resources/credit-pools.resource.specification.js +2 -0
  242. package/dist/esm/engine/billing/resources/credit-pools.resource.specification.js.map +1 -1
  243. package/dist/esm/engine/billing/resources/invoice-refs.resource.specification.d.ts +2 -2
  244. package/dist/esm/engine/billing/resources/invoice-refs.resource.specification.d.ts.map +1 -1
  245. package/dist/esm/engine/billing/resources/invoice-refs.resource.specification.js +2 -0
  246. package/dist/esm/engine/billing/resources/invoice-refs.resource.specification.js.map +1 -1
  247. package/dist/esm/engine/billing/resources/prices.resource.specification.d.ts.map +1 -1
  248. package/dist/esm/engine/billing/resources/prices.resource.specification.js +3 -1
  249. package/dist/esm/engine/billing/resources/prices.resource.specification.js.map +1 -1
  250. package/dist/esm/engine/billing/resources/products.resource.specification.d.ts.map +1 -1
  251. package/dist/esm/engine/billing/resources/products.resource.specification.js +3 -1
  252. package/dist/esm/engine/billing/resources/products.resource.specification.js.map +1 -1
  253. package/dist/esm/engine/billing/resources/promotions.resource.specification.d.ts.map +1 -1
  254. package/dist/esm/engine/billing/resources/promotions.resource.specification.js +2 -0
  255. package/dist/esm/engine/billing/resources/promotions.resource.specification.js.map +1 -1
  256. package/dist/esm/engine/billing/resources/referrals.resource.specification.d.ts.map +1 -1
  257. package/dist/esm/engine/billing/resources/referrals.resource.specification.js +3 -1
  258. package/dist/esm/engine/billing/resources/referrals.resource.specification.js.map +1 -1
  259. package/dist/esm/engine/billing/resources/subscriptions.resource.specification.d.ts +6 -6
  260. package/dist/esm/engine/billing/resources/subscriptions.resource.specification.d.ts.map +1 -1
  261. package/dist/esm/engine/billing/resources/subscriptions.resource.specification.js +2 -0
  262. package/dist/esm/engine/billing/resources/subscriptions.resource.specification.js.map +1 -1
  263. package/dist/esm/engine/billing/resources/usage-records.resource.specification.d.ts +6 -6
  264. package/dist/esm/engine/billing/resources/usage-records.resource.specification.d.ts.map +1 -1
  265. package/dist/esm/engine/billing/resources/usage-records.resource.specification.js +2 -0
  266. package/dist/esm/engine/billing/resources/usage-records.resource.specification.js.map +1 -1
  267. package/dist/esm/engine/compliance/resources/audit-logs.resource.specification.d.ts.map +1 -1
  268. package/dist/esm/engine/compliance/resources/audit-logs.resource.specification.js +2 -0
  269. package/dist/esm/engine/compliance/resources/audit-logs.resource.specification.js.map +1 -1
  270. package/dist/esm/engine/engine-resource-specifications.registry.d.ts.map +1 -1
  271. package/dist/esm/engine/engine-resource-specifications.registry.js +5 -0
  272. package/dist/esm/engine/engine-resource-specifications.registry.js.map +1 -1
  273. package/dist/esm/engine/engine-resource-sub-domain.d.ts +63 -0
  274. package/dist/esm/engine/engine-resource-sub-domain.d.ts.map +1 -0
  275. package/dist/esm/engine/engine-resource-sub-domain.js +87 -0
  276. package/dist/esm/engine/engine-resource-sub-domain.js.map +1 -0
  277. package/dist/esm/engine/errors/error-messages.specification.d.ts.map +1 -1
  278. package/dist/esm/engine/errors/error-messages.specification.js +30 -1
  279. package/dist/esm/engine/errors/error-messages.specification.js.map +1 -1
  280. package/dist/esm/engine/features/resources/application-features.resource.specification.d.ts.map +1 -1
  281. package/dist/esm/engine/features/resources/application-features.resource.specification.js +2 -0
  282. package/dist/esm/engine/features/resources/application-features.resource.specification.js.map +1 -1
  283. package/dist/esm/engine/features/resources/organization-features.resource.specification.d.ts.map +1 -1
  284. package/dist/esm/engine/features/resources/organization-features.resource.specification.js +2 -0
  285. package/dist/esm/engine/features/resources/organization-features.resource.specification.js.map +1 -1
  286. package/dist/esm/engine/features/resources/user-features.resource.specification.d.ts +1 -1
  287. package/dist/esm/engine/features/resources/user-features.resource.specification.d.ts.map +1 -1
  288. package/dist/esm/engine/features/resources/user-features.resource.specification.js +2 -0
  289. package/dist/esm/engine/features/resources/user-features.resource.specification.js.map +1 -1
  290. package/dist/esm/engine/files/resources/files.resource.specification.d.ts.map +1 -1
  291. package/dist/esm/engine/files/resources/files.resource.specification.js +2 -0
  292. package/dist/esm/engine/files/resources/files.resource.specification.js.map +1 -1
  293. package/dist/esm/engine/flows-actors/resources/a2a-push-delivery-log.resource.specification.d.ts +3 -3
  294. package/dist/esm/engine/flows-actors/resources/a2a-push-delivery-log.resource.specification.d.ts.map +1 -1
  295. package/dist/esm/engine/flows-actors/resources/a2a-push-delivery-log.resource.specification.js +12 -0
  296. package/dist/esm/engine/flows-actors/resources/a2a-push-delivery-log.resource.specification.js.map +1 -1
  297. package/dist/esm/engine/flows-actors/resources/a2a-token-budget-state.resource.specification.d.ts +3 -3
  298. package/dist/esm/engine/flows-actors/resources/a2a-token-budget-state.resource.specification.d.ts.map +1 -1
  299. package/dist/esm/engine/flows-actors/resources/a2a-token-budget-state.resource.specification.js +2 -0
  300. package/dist/esm/engine/flows-actors/resources/a2a-token-budget-state.resource.specification.js.map +1 -1
  301. package/dist/esm/engine/flows-actors/resources/flow-actor-executions.resource.specification.d.ts +3 -3
  302. package/dist/esm/engine/flows-actors/resources/flow-actor-executions.resource.specification.d.ts.map +1 -1
  303. package/dist/esm/engine/flows-actors/resources/flow-actor-executions.resource.specification.js +2 -0
  304. package/dist/esm/engine/flows-actors/resources/flow-actor-executions.resource.specification.js.map +1 -1
  305. package/dist/esm/engine/flows-actors/resources/flow-actor-tasks.resource.specification.d.ts +3 -3
  306. package/dist/esm/engine/flows-actors/resources/flow-actor-tasks.resource.specification.d.ts.map +1 -1
  307. package/dist/esm/engine/flows-actors/resources/flow-actor-tasks.resource.specification.js +3 -1
  308. package/dist/esm/engine/flows-actors/resources/flow-actor-tasks.resource.specification.js.map +1 -1
  309. package/dist/esm/engine/frontend-components/app/public-layout-main-container.frontend-component.specification.d.ts.map +1 -1
  310. package/dist/esm/engine/frontend-components/app/public-layout-main-container.frontend-component.specification.js +8 -3
  311. package/dist/esm/engine/frontend-components/app/public-layout-main-container.frontend-component.specification.js.map +1 -1
  312. package/dist/esm/engine/guidance/resources/guidance-state.resource.specification.d.ts +1 -1
  313. package/dist/esm/engine/guidance/resources/guidance-state.resource.specification.d.ts.map +1 -1
  314. package/dist/esm/engine/guidance/resources/guidance-state.resource.specification.js +3 -0
  315. package/dist/esm/engine/guidance/resources/guidance-state.resource.specification.js.map +1 -1
  316. package/dist/esm/engine/guidance/resources/lifecycle-state.resource.specification.d.ts +1 -1
  317. package/dist/esm/engine/guidance/resources/lifecycle-state.resource.specification.d.ts.map +1 -1
  318. package/dist/esm/engine/guidance/resources/lifecycle-state.resource.specification.js +3 -0
  319. package/dist/esm/engine/guidance/resources/lifecycle-state.resource.specification.js.map +1 -1
  320. package/dist/esm/engine/guidance/resources/progression-state.resource.specification.d.ts +1 -1
  321. package/dist/esm/engine/guidance/resources/progression-state.resource.specification.d.ts.map +1 -1
  322. package/dist/esm/engine/guidance/resources/progression-state.resource.specification.js +3 -0
  323. package/dist/esm/engine/guidance/resources/progression-state.resource.specification.js.map +1 -1
  324. package/dist/esm/engine/index.d.ts +1 -0
  325. package/dist/esm/engine/index.d.ts.map +1 -1
  326. package/dist/esm/engine/index.js +1 -0
  327. package/dist/esm/engine/index.js.map +1 -1
  328. package/dist/esm/engine/infrastructure/resources/data-seed-runs.resource.specification.d.ts.map +1 -1
  329. package/dist/esm/engine/infrastructure/resources/data-seed-runs.resource.specification.js +2 -0
  330. package/dist/esm/engine/infrastructure/resources/data-seed-runs.resource.specification.js.map +1 -1
  331. package/dist/esm/engine/infrastructure/resources/external-data-pipeline-states.resource.specification.d.ts.map +1 -1
  332. package/dist/esm/engine/infrastructure/resources/external-data-pipeline-states.resource.specification.js +2 -0
  333. package/dist/esm/engine/infrastructure/resources/external-data-pipeline-states.resource.specification.js.map +1 -1
  334. package/dist/esm/engine/infrastructure/resources/job-executions.resource.specification.d.ts.map +1 -1
  335. package/dist/esm/engine/infrastructure/resources/job-executions.resource.specification.js +2 -0
  336. package/dist/esm/engine/infrastructure/resources/job-executions.resource.specification.js.map +1 -1
  337. package/dist/esm/engine/infrastructure/resources/job-payload-storage.resource.specification.d.ts.map +1 -1
  338. package/dist/esm/engine/infrastructure/resources/job-payload-storage.resource.specification.js +2 -0
  339. package/dist/esm/engine/infrastructure/resources/job-payload-storage.resource.specification.js.map +1 -1
  340. package/dist/esm/engine/notifications/resources/m2m-webhook-delivery-log.resource.specification.d.ts.map +1 -1
  341. package/dist/esm/engine/notifications/resources/m2m-webhook-delivery-log.resource.specification.js +2 -0
  342. package/dist/esm/engine/notifications/resources/m2m-webhook-delivery-log.resource.specification.js.map +1 -1
  343. package/dist/esm/engine/notifications/resources/notification-badges.resource.specification.d.ts +1 -1
  344. package/dist/esm/engine/notifications/resources/notification-badges.resource.specification.d.ts.map +1 -1
  345. package/dist/esm/engine/notifications/resources/notification-badges.resource.specification.js +3 -0
  346. package/dist/esm/engine/notifications/resources/notification-badges.resource.specification.js.map +1 -1
  347. package/dist/esm/engine/notifications/resources/webhook-config.resource.specification.d.ts.map +1 -1
  348. package/dist/esm/engine/notifications/resources/webhook-config.resource.specification.js +2 -0
  349. package/dist/esm/engine/notifications/resources/webhook-config.resource.specification.js.map +1 -1
  350. package/dist/esm/engine/organizations/resources/organization-members.resource.specification.d.ts +1 -1
  351. package/dist/esm/engine/organizations/resources/organization-members.resource.specification.d.ts.map +1 -1
  352. package/dist/esm/engine/organizations/resources/organization-members.resource.specification.js +2 -0
  353. package/dist/esm/engine/organizations/resources/organization-members.resource.specification.js.map +1 -1
  354. package/dist/esm/engine/organizations/resources/organization-notifications.resource.specification.d.ts.map +1 -1
  355. package/dist/esm/engine/organizations/resources/organization-notifications.resource.specification.js +2 -0
  356. package/dist/esm/engine/organizations/resources/organization-notifications.resource.specification.js.map +1 -1
  357. package/dist/esm/engine/organizations/resources/organization-preferences.resource.specification.d.ts.map +1 -1
  358. package/dist/esm/engine/organizations/resources/organization-preferences.resource.specification.js +2 -0
  359. package/dist/esm/engine/organizations/resources/organization-preferences.resource.specification.js.map +1 -1
  360. package/dist/esm/engine/organizations/resources/organization-profiles.resource.specification.d.ts.map +1 -1
  361. package/dist/esm/engine/organizations/resources/organization-profiles.resource.specification.js +2 -0
  362. package/dist/esm/engine/organizations/resources/organization-profiles.resource.specification.js.map +1 -1
  363. package/dist/esm/engine/organizations/resources/organization-unit-members.resource.specification.d.ts.map +1 -1
  364. package/dist/esm/engine/organizations/resources/organization-unit-members.resource.specification.js +2 -0
  365. package/dist/esm/engine/organizations/resources/organization-unit-members.resource.specification.js.map +1 -1
  366. package/dist/esm/engine/organizations/resources/organization-units.resource.specification.d.ts.map +1 -1
  367. package/dist/esm/engine/organizations/resources/organization-units.resource.specification.js +2 -0
  368. package/dist/esm/engine/organizations/resources/organization-units.resource.specification.js.map +1 -1
  369. package/dist/esm/engine/organizations/resources/organizations.resource.specification.d.ts.map +1 -1
  370. package/dist/esm/engine/organizations/resources/organizations.resource.specification.js +2 -0
  371. package/dist/esm/engine/organizations/resources/organizations.resource.specification.js.map +1 -1
  372. package/dist/esm/engine/users/resources/anonymous-users.resource.specification.d.ts.map +1 -1
  373. package/dist/esm/engine/users/resources/anonymous-users.resource.specification.js +2 -0
  374. package/dist/esm/engine/users/resources/anonymous-users.resource.specification.js.map +1 -1
  375. package/dist/esm/engine/users/resources/inbound-contacts.resource.specification.d.ts +1 -1
  376. package/dist/esm/engine/users/resources/inbound-contacts.resource.specification.d.ts.map +1 -1
  377. package/dist/esm/engine/users/resources/inbound-contacts.resource.specification.js +2 -0
  378. package/dist/esm/engine/users/resources/inbound-contacts.resource.specification.js.map +1 -1
  379. package/dist/esm/engine/users/resources/user-credentials.resource.specification.d.ts +1 -1
  380. package/dist/esm/engine/users/resources/user-credentials.resource.specification.d.ts.map +1 -1
  381. package/dist/esm/engine/users/resources/user-credentials.resource.specification.js +2 -0
  382. package/dist/esm/engine/users/resources/user-credentials.resource.specification.js.map +1 -1
  383. package/dist/esm/engine/users/resources/user-identity-links.resource.specification.d.ts +1 -1
  384. package/dist/esm/engine/users/resources/user-identity-links.resource.specification.d.ts.map +1 -1
  385. package/dist/esm/engine/users/resources/user-identity-links.resource.specification.js +2 -0
  386. package/dist/esm/engine/users/resources/user-identity-links.resource.specification.js.map +1 -1
  387. package/dist/esm/engine/users/resources/user-preferences.resource.specification.d.ts +1 -1
  388. package/dist/esm/engine/users/resources/user-preferences.resource.specification.d.ts.map +1 -1
  389. package/dist/esm/engine/users/resources/user-preferences.resource.specification.js +2 -0
  390. package/dist/esm/engine/users/resources/user-preferences.resource.specification.js.map +1 -1
  391. package/dist/esm/engine/users/resources/user-profiles.resource.specification.d.ts +1 -1
  392. package/dist/esm/engine/users/resources/user-profiles.resource.specification.d.ts.map +1 -1
  393. package/dist/esm/engine/users/resources/user-profiles.resource.specification.js +2 -0
  394. package/dist/esm/engine/users/resources/user-profiles.resource.specification.js.map +1 -1
  395. package/dist/esm/engine/users/resources/user-self-preferences.resource.specification.d.ts +1 -1
  396. package/dist/esm/engine/users/resources/user-self-preferences.resource.specification.d.ts.map +1 -1
  397. package/dist/esm/engine/users/resources/user-self-preferences.resource.specification.js +2 -0
  398. package/dist/esm/engine/users/resources/user-self-preferences.resource.specification.js.map +1 -1
  399. package/dist/esm/engine/users/resources/user-self-profiles.resource.specification.d.ts +1 -1
  400. package/dist/esm/engine/users/resources/user-self-profiles.resource.specification.d.ts.map +1 -1
  401. package/dist/esm/engine/users/resources/user-self-profiles.resource.specification.js +2 -0
  402. package/dist/esm/engine/users/resources/user-self-profiles.resource.specification.js.map +1 -1
  403. package/dist/esm/engine/users/resources/user-self.resource.specification.d.ts.map +1 -1
  404. package/dist/esm/engine/users/resources/user-self.resource.specification.js +3 -1
  405. package/dist/esm/engine/users/resources/user-self.resource.specification.js.map +1 -1
  406. package/dist/esm/engine/users/resources/users.resource.specification.d.ts.map +1 -1
  407. package/dist/esm/engine/users/resources/users.resource.specification.js +2 -0
  408. package/dist/esm/engine/users/resources/users.resource.specification.js.map +1 -1
  409. package/dist/esm/technical-documentation/engine-documentation-specification-catalog.companion.d.ts +5 -0
  410. package/dist/esm/technical-documentation/engine-documentation-specification-catalog.companion.d.ts.map +1 -1
  411. package/dist/esm/technical-documentation/engine-documentation-specification-catalog.companion.js +385 -9
  412. package/dist/esm/technical-documentation/engine-documentation-specification-catalog.companion.js.map +1 -1
  413. package/dist/esm/technical-documentation/technical-documentation-units.schemas.js +1 -1
  414. package/dist/esm/technical-documentation/technical-documentation-units.schemas.js.map +1 -1
  415. package/dist/tsconfig.build.tsbuildinfo +1 -0
  416. package/package.json +8 -8
  417. package/dist/esm/.builder.pid +0 -9
  418. package/dist/esm/_core/business-coverage/coverage-findings-validation.d.ts +0 -0
  419. package/dist/esm/_core/business-coverage/coverage-findings-validation.d.ts.map +0 -0
  420. package/dist/esm/_core/business-coverage/coverage-findings-validation.js.map +0 -0
  421. package/dist/esm/_core/business-coverage/coverage-findings.schemas.d.ts +0 -0
  422. package/dist/esm/_core/business-coverage/coverage-findings.schemas.d.ts.map +0 -0
  423. package/dist/esm/_core/business-coverage/coverage-findings.schemas.js.map +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"application-features.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/features/resources/application-features.resource.specification.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EACL,0CAA0C,IAAI,8BAA8B,GAC7E,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAEpE,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,8BAA8B,EAC9B,qBAAqB,IAAI,EAAE,EAC3B,oBAAoB,EACpB,gCAAgC,EAChC,8DAA8D,IAAI,0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AK,EAAE,EAAE,OAAO,EAAE,qDAAqD,EAAE;oBACzE,WAAW,EAAE,EAAE,OAAO,EAAE,2GAA2G,EAAE;iBACtI;aACF;SACF;KACF;IACD,KAAK,EAAE;QACL,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,OAAO,EAAE,qCAAqC,EAAE,SAAS,EAAE,kDAAkD,EAAE;QAC5H,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE,0BAA0B,EAAE,SAAS,EAAE,sCAAsC,EAAE;QACvG,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE,sCAAsC,EAAE,SAAS,EAAE,8DAA8D,EAAE;QAC3I,CAAC,8BAA8B,CAAC,cAAc,CAAC,EAAE,EAAE,OAAO,EAAE,kCAAkC,EAAE,SAAS,EAAE,iEAAiE,EAAE;QAC9K,CAAC,8BAA8B,CAAC,eAAe,CAAC,EAAE,EAAE,OAAO,EAAE,mCAAmC,EAAE,SAAS,EAAE,wCAAwC,EAAE;QACvJ,CAAC,8BAA8B,CAAC,cAAc,CAAC,EAAE,EAAE,OAAO,EAAE,mCAAmC,EAAE,SAAS,EAAE,+CAA+C,EAAE;KAC9J;CACF,CAAC,CACH,CAAC","sourcesContent":["/**\n * Resource: `applicationFeatures` — Wildo SaaS engine specification (application scope).\n *\n * Inputs:\n * - Schema: `ScopeFeaturesWithOverridesSchema`\n * - Factory: `applicationFeaturesResourceConfiguration_InitializationFactory`\n * - Custom operations: `ApplicationFeatures_Operations`\n * - Preset: `applicationFeaturesAdminResourceUIBehavior`\n */\n\nimport {\n applicationFeaturesAdminResourceUIBehavior as applicationFeaturesAdminSource,\n} 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 ApplicationFeatures_Operations,\n CoreResourceOperation as Op,\n ResourcePrimaryScope,\n ScopeFeaturesWithOverridesSchema,\n applicationFeaturesResourceConfiguration_InitializationFactory as applicationFeaturesFactory,\n} from '@wildo-ai/saas-models';\nimport {\n HttpResponseStatusCode,\n resourceFrontendConfiguration,\n resourceSpecification,\n resourceSpecificationFromFrontendConfiguration,\n} from '~wildo-specifications/_core';\n\ntype ApplicationFeaturesConfig = ReturnType<typeof applicationFeaturesFactory>;\ntype ApplicationFeaturesCoreOp = ApplicationFeaturesConfig['coreOperations'][number];\ntype ApplicationFeaturesSchema = ApplicationFeaturesConfig['mainSchema'];\n\nconst applicationFeaturesAdminResourceUIBehavior = applicationFeaturesAdminSource as ResourceUIBehaviorConfig<\n typeof ApplicationFeatures_Operations,\n ApplicationFeaturesCoreOp,\n ApplicationFeaturesSchema\n>;\n\nexport const applicationFeaturesResourceSpecification = resourceSpecificationFromFrontendConfiguration(\n resourceFrontendConfiguration(applicationFeaturesAdminResourceUIBehavior),\n resourceSpecification(\n applicationFeaturesFactory,\n ScopeFeaturesWithOverridesSchema,\n ({ schemaShape }) => ({\n purpose: 'Application-wide entitlements: enabled features, limits, and manual overrides for app-scoped capabilities.',\n businessRole: 'Unblocks exact application-scope feature gates such as `M2M_WEBHOOK_DELIVERY` for `WEBHOOK_APPLICATION` delivery without leaking app opt-in to every organization.',\n lifecycleRole: 'Materialized by high-trust admin operations when an application-scope capability needs to be enabled or reset.',\n audience: LabelAudience.ADMIN,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'ScopeFeaturesWithOverridesSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactory: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'applicationFeaturesResourceConfiguration_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: 'APPLICATION_FEATURES',\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: 'ApplicationFeatures_Operations',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n frontendConfigurationSources: [\n {\n packageName: '@wildo-ai/presets-components',\n exportName: 'applicationFeaturesAdminResourceUIBehavior',\n symbolKind: CodeSymbolKind.UI_BEHAVIOR,\n },\n ],\n },\n fields: {\n features: schemaShape.features.clone().arraySpec({\n meaning: 'Enabled application-scope feature keys.',\n whyItMatters: 'The M2M dispatcher checks this ledger for exact app-scope delivery gates.',\n elementMeaning: 'One `CoreFeature` or custom feature key applicable to application scope.',\n elementType: {\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreFeature',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n notes: [\n '`CoreFeature.M2M_WEBHOOK_DELIVERY` is the first application-scope consumer; it is scope-bound and must be enabled independently from organization scope.',\n ],\n },\n }),\n limits: schemaShape.limits.clone().objectSpec({\n meaning: 'Application-level caps keyed by feature or meter identifier.',\n whyItMatters: 'Reserved for app-scoped limits; org/user limits remain in their own ledgers.',\n }),\n manualOverrides: schemaShape.manualOverrides.clone().objectSpec({\n meaning: 'App-admin-applied enable/disable/limit delta that survives config/profile changes until reset.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n },\n operations: {\n [Op.CREATE]: {\n purpose: 'Repository-only bootstrap of the application feature ledger.',\n outcome: 'The application has a singleton entitlement row.',\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'The singleton application-feature ledger row was materialized for the app.' },\n ],\n // REPOSITORY_ONLY variant — invoked by system/admin bootstrap workflows, not exposed as a public HTTP endpoint, so no client-facing 400/403/404 are documented.\n idempotent: false,\n },\n [Op.READ]: {\n purpose: 'Load app-scoped entitlements for super-admin diagnostics.',\n outcome: 'Admin surfaces and gates can inspect application-wide feature state.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The application feature ledger is returned with its effective features, limits, and manual overrides.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an application super-admin; app-scope entitlements are not exposed to lower-trust roles.' },\n ],\n idempotent: true,\n },\n [Op.SEARCH]: {\n purpose: 'Reserved lightweight listing path for app feature rows.',\n outcome: 'Returns rows if a host admin surface enables it.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of application feature ledger rows for super-admin diagnostics.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an application super-admin; the app-feature listing path is admin-only.' },\n ],\n idempotent: true,\n },\n [Op.UPDATE]: {\n purpose: 'Super-admin partial update of the application entitlements document.',\n outcome: 'Application-scope gates observe the updated feature state after cache invalidation.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The application entitlements document was patched and the updated ledger is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The partial entitlements payload fails `ScopeFeaturesWithOverridesSchema.partial()` validation.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an application super-admin; document-level overrides are high-trust only.' },\n ],\n idempotent: true,\n },\n [Op.DELETE]: {\n purpose: 'Repository-only teardown of the application feature ledger when its owning application is deleted (composition `onParentDelete` cascade).',\n outcome: 'The singleton entitlement row is removed together with the application — the composition part does not outlive its whole.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The application-feature ledger row was deleted as part of the owning application’s deletion cascade.' },\n ],\n // REPOSITORY_ONLY variant (super-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 [ApplicationFeatures_Operations.ENABLE_FEATURE]: {\n operationId: ApplicationFeatures_Operations.ENABLE_FEATURE,\n purpose: 'Surgical enable of one application-scope feature.',\n outcome: 'Feature flag flips for the application without knowing `applicationFeaturesId`.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The named feature is now enabled at application scope and the updated ledger is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The `featureId` is not a member of `CoreFeature` (the request DTO is enum-constrained, so an unknown key is a validation failure rather than a 404).', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an application super-admin; feature enablement is admin-gated.' },\n ],\n // Convergent: enabling an already-enabled feature lands the same end state.\n idempotent: true,\n examples: [\n {\n title: 'Enable an application-scope feature',\n request: {\n featureId: 'M2M_WEBHOOK_DELIVERY',\n reason: 'Enable application-wide webhook delivery for the dogfood pilot.',\n },\n response: {\n features: ['M2M_WEBHOOK_DELIVERY'],\n manualOverrides: { M2M_WEBHOOK_DELIVERY: { enabled: true } },\n },\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n [ApplicationFeatures_Operations.DISABLE_FEATURE]: {\n operationId: ApplicationFeatures_Operations.DISABLE_FEATURE,\n purpose: 'Surgical disable of one application-scope feature.',\n outcome: 'Application-scope capability is removed while other overrides remain intact.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The named feature is now disabled at application scope and the updated ledger is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The `featureId` is not a `CoreFeature` member, or the required `reason` is missing/empty.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an application super-admin; feature disablement is admin-gated.' },\n ],\n // Convergent: disabling an already-disabled feature lands the same end state.\n idempotent: true,\n },\n [ApplicationFeatures_Operations.RESET_FEATURES]: {\n operationId: ApplicationFeatures_Operations.RESET_FEATURES,\n purpose: 'Clear all application-scope manual overrides.',\n outcome: 'Application returns to defaults/profile-derived features.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'All application-scope manual overrides were cleared and the defaults-derived ledger is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The required `reason` justification is missing or empty.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an application super-admin; clearing overrides is the highest-trust feature operation.' },\n ],\n // Convergent: this clears overrides back to the defaults baseline, so a repeated reset lands the same cleared state (not an incrementing/event-style mutation).\n idempotent: true,\n },\n },\n businessConstraints: [\n '`APPLICATION_FEATURES` is one-to-one by `appId`; it is not an organization fallback or global feature catalog.',\n 'Do not use app-scope enablement to imply org-scope enablement for `scopeBoundary` features.',\n ],\n }),\n { resourcePrimaryScope: ResourcePrimaryScope.APPLICATION },\n ),\n () => ({\n layout: {\n purpose: 'Show app-scoped entitlement state and manual overrides for high-trust operators.',\n displayPurpose: 'Super-admin-only diagnostic and override surface.',\n summaryPurpose: 'Compact feature and limit summary for application-level gates.',\n sections: {\n overview: {\n purpose: 'Render `features` and `limits` as the engine currently evaluates them at application scope (e.g. `M2M_WEBHOOK_DELIVERY` for `WEBHOOK_APPLICATION`).',\n whenToUse: 'Default super-admin diagnostic page when inspecting why an app-scope gate is open or closed.',\n textSlots: {\n title: { purpose: 'Label the overview area for the application’s effective app-scope entitlements.' },\n description: { purpose: 'Clarify that values reflect application-scope state only — they do NOT imply org-scope enablement for `scopeBoundary` features.' },\n },\n },\n overrides: {\n purpose: 'Author `manualOverrides` deltas (enable / disable / limit patches) when operators intentionally diverge an application from its profile-derived defaults.',\n whenToUse: 'Break-glass enables for app-scope dogfood pilots, incident-driven disables, and bespoke limit adjustments.',\n textSlots: {\n title: { purpose: 'Label the manual-override area for the application.' },\n description: { purpose: 'State that these overrides survive config/profile changes until cleared via the RESET_FEATURES operation.' },\n },\n },\n },\n },\n views: {\n [Op.READ]: { purpose: 'Super-admin app feature inspection.', whenToUse: 'Debug app-scoped gates like WEBHOOK_APPLICATION.' },\n [Op.SEARCH]: { purpose: 'Rare admin listing path.', whenToUse: 'Diagnostics and registry validation.' },\n [Op.UPDATE]: { purpose: 'Super-admin document-level override.', whenToUse: 'Break-glass edits when surgical operations are insufficient.' },\n [ApplicationFeatures_Operations.ENABLE_FEATURE]: { purpose: 'Single-feature app-scope enable.', whenToUse: 'Enable WEBHOOK_APPLICATION dogfood or app-level feature pilots.' },\n [ApplicationFeatures_Operations.DISABLE_FEATURE]: { purpose: 'Single-feature app-scope disable.', whenToUse: 'Incident response or feature rollback.' },\n [ApplicationFeatures_Operations.RESET_FEATURES]: { purpose: 'Clear app-scope manual overrides.', whenToUse: 'Return application to defaults/profile truth.' },\n },\n }),\n);\n"]}
1
+ {"version":3,"file":"application-features.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/features/resources/application-features.resource.specification.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EACL,0CAA0C,IAAI,8BAA8B,GAC7E,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAEpE,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,8BAA8B,EAC9B,qBAAqB,IAAI,EAAE,EAC3B,oBAAoB,EACpB,gCAAgC,EAChC,8DAA8D,IAAI,0BAA0B,GAC7F,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,sBAAsB,EACtB,6B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vH,SAAS,EAAE;oBACT,KAAK,EAAE,EAAE,OAAO,EAAE,qDAAqD,EAAE;oBACzE,WAAW,EAAE,EAAE,OAAO,EAAE,2GAA2G,EAAE;iBACtI;aACF;SACF;KACF;IACD,KAAK,EAAE;QACL,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,OAAO,EAAE,qCAAqC,EAAE,SAAS,EAAE,kDAAkD,EAAE;QAC5H,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE,0BAA0B,EAAE,SAAS,EAAE,sCAAsC,EAAE;QACvG,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE,sCAAsC,EAAE,SAAS,EAAE,8DAA8D,EAAE;QAC3I,CAAC,8BAA8B,CAAC,cAAc,CAAC,EAAE,EAAE,OAAO,EAAE,kCAAkC,EAAE,SAAS,EAAE,iEAAiE,EAAE;QAC9K,CAAC,8BAA8B,CAAC,eAAe,CAAC,EAAE,EAAE,OAAO,EAAE,mCAAmC,EAAE,SAAS,EAAE,wCAAwC,EAAE;QACvJ,CAAC,8BAA8B,CAAC,cAAc,CAAC,EAAE,EAAE,OAAO,EAAE,mCAAmC,EAAE,SAAS,EAAE,+CAA+C,EAAE;KAC9J;CACF,CAAC,CACH,CAAC","sourcesContent":["/**\n * Resource: `applicationFeatures` — Wildo SaaS engine specification (application scope).\n *\n * Inputs:\n * - Schema: `ScopeFeaturesWithOverridesSchema`\n * - Factory: `applicationFeaturesResourceConfiguration_InitializationFactory`\n * - Custom operations: `ApplicationFeatures_Operations`\n * - Preset: `applicationFeaturesAdminResourceUIBehavior`\n */\n\nimport {\n applicationFeaturesAdminResourceUIBehavior as applicationFeaturesAdminSource,\n} 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 ApplicationFeatures_Operations,\n CoreResourceOperation as Op,\n ResourcePrimaryScope,\n ScopeFeaturesWithOverridesSchema,\n applicationFeaturesResourceConfiguration_InitializationFactory as applicationFeaturesFactory,\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 ApplicationFeaturesConfig = ReturnType<typeof applicationFeaturesFactory>;\ntype ApplicationFeaturesCoreOp = ApplicationFeaturesConfig['coreOperations'][number];\ntype ApplicationFeaturesSchema = ApplicationFeaturesConfig['mainSchema'];\n\nconst applicationFeaturesAdminResourceUIBehavior = applicationFeaturesAdminSource as ResourceUIBehaviorConfig<\n typeof ApplicationFeatures_Operations,\n ApplicationFeaturesCoreOp,\n ApplicationFeaturesSchema\n>;\n\nexport const applicationFeaturesResourceSpecification = resourceSpecificationFromFrontendConfiguration(\n resourceFrontendConfiguration(applicationFeaturesAdminResourceUIBehavior),\n resourceSpecification(\n applicationFeaturesFactory,\n ScopeFeaturesWithOverridesSchema,\n ({ schemaShape }) => ({\n purpose: 'Application-wide entitlements: enabled features, limits, and manual overrides for app-scoped capabilities.',\n businessRole: 'Unblocks exact application-scope feature gates such as `M2M_WEBHOOK_DELIVERY` for `WEBHOOK_APPLICATION` delivery without leaking app opt-in to every organization.',\n lifecycleRole: 'Materialized by high-trust admin operations when an application-scope capability needs to be enabled or reset.',\n audience: LabelAudience.ADMIN,\n subDomain: EngineResourceSubDomain.FEATURES,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'ScopeFeaturesWithOverridesSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactory: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'applicationFeaturesResourceConfiguration_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: 'APPLICATION_FEATURES',\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: 'ApplicationFeatures_Operations',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n frontendConfigurationSources: [\n {\n packageName: '@wildo-ai/presets-components',\n exportName: 'applicationFeaturesAdminResourceUIBehavior',\n symbolKind: CodeSymbolKind.UI_BEHAVIOR,\n },\n ],\n },\n fields: {\n features: schemaShape.features.clone().arraySpec({\n meaning: 'Enabled application-scope feature keys.',\n whyItMatters: 'The M2M dispatcher checks this ledger for exact app-scope delivery gates.',\n elementMeaning: 'One `CoreFeature` or custom feature key applicable to application scope.',\n elementType: {\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreFeature',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n notes: [\n '`CoreFeature.M2M_WEBHOOK_DELIVERY` is the first application-scope consumer; it is scope-bound and must be enabled independently from organization scope.',\n ],\n },\n }),\n limits: schemaShape.limits.clone().objectSpec({\n meaning: 'Application-level caps keyed by feature or meter identifier.',\n whyItMatters: 'Reserved for app-scoped limits; org/user limits remain in their own ledgers.',\n }),\n manualOverrides: schemaShape.manualOverrides.clone().objectSpec({\n meaning: 'App-admin-applied enable/disable/limit delta that survives config/profile changes until reset.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n },\n operations: {\n [Op.CREATE]: {\n purpose: 'Repository-only bootstrap of the application feature ledger.',\n outcome: 'The application has a singleton entitlement row.',\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'The singleton application-feature ledger row was materialized for the app.' },\n ],\n // REPOSITORY_ONLY variant — invoked by system/admin bootstrap workflows, not exposed as a public HTTP endpoint, so no client-facing 400/403/404 are documented.\n idempotent: false,\n },\n [Op.READ]: {\n purpose: 'Load app-scoped entitlements for super-admin diagnostics.',\n outcome: 'Admin surfaces and gates can inspect application-wide feature state.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The application feature ledger is returned with its effective features, limits, and manual overrides.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an application super-admin; app-scope entitlements are not exposed to lower-trust roles.' },\n ],\n idempotent: true,\n },\n [Op.SEARCH]: {\n purpose: 'Reserved lightweight listing path for app feature rows.',\n outcome: 'Returns rows if a host admin surface enables it.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of application feature ledger rows for super-admin diagnostics.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an application super-admin; the app-feature listing path is admin-only.' },\n ],\n idempotent: true,\n },\n [Op.UPDATE]: {\n purpose: 'Super-admin partial update of the application entitlements document.',\n outcome: 'Application-scope gates observe the updated feature state after cache invalidation.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The application entitlements document was patched and the updated ledger is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The partial entitlements payload fails `ScopeFeaturesWithOverridesSchema.partial()` validation.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an application super-admin; document-level overrides are high-trust only.' },\n ],\n idempotent: true,\n },\n [Op.DELETE]: {\n purpose: 'Repository-only teardown of the application feature ledger when its owning application is deleted (composition `onParentDelete` cascade).',\n outcome: 'The singleton entitlement row is removed together with the application — the composition part does not outlive its whole.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The application-feature ledger row was deleted as part of the owning application’s deletion cascade.' },\n ],\n // REPOSITORY_ONLY variant (super-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 [ApplicationFeatures_Operations.ENABLE_FEATURE]: {\n operationId: ApplicationFeatures_Operations.ENABLE_FEATURE,\n purpose: 'Surgical enable of one application-scope feature.',\n outcome: 'Feature flag flips for the application without knowing `applicationFeaturesId`.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The named feature is now enabled at application scope and the updated ledger is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The `featureId` is not a member of `CoreFeature` (the request DTO is enum-constrained, so an unknown key is a validation failure rather than a 404).', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an application super-admin; feature enablement is admin-gated.' },\n ],\n // Convergent: enabling an already-enabled feature lands the same end state.\n idempotent: true,\n examples: [\n {\n title: 'Enable an application-scope feature',\n request: {\n featureId: 'M2M_WEBHOOK_DELIVERY',\n reason: 'Enable application-wide webhook delivery for the dogfood pilot.',\n },\n response: {\n features: ['M2M_WEBHOOK_DELIVERY'],\n manualOverrides: { M2M_WEBHOOK_DELIVERY: { enabled: true } },\n },\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n [ApplicationFeatures_Operations.DISABLE_FEATURE]: {\n operationId: ApplicationFeatures_Operations.DISABLE_FEATURE,\n purpose: 'Surgical disable of one application-scope feature.',\n outcome: 'Application-scope capability is removed while other overrides remain intact.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The named feature is now disabled at application scope and the updated ledger is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The `featureId` is not a `CoreFeature` member, or the required `reason` is missing/empty.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an application super-admin; feature disablement is admin-gated.' },\n ],\n // Convergent: disabling an already-disabled feature lands the same end state.\n idempotent: true,\n },\n [ApplicationFeatures_Operations.RESET_FEATURES]: {\n operationId: ApplicationFeatures_Operations.RESET_FEATURES,\n purpose: 'Clear all application-scope manual overrides.',\n outcome: 'Application returns to defaults/profile-derived features.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'All application-scope manual overrides were cleared and the defaults-derived ledger is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The required `reason` justification is missing or empty.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an application super-admin; clearing overrides is the highest-trust feature operation.' },\n ],\n // Convergent: this clears overrides back to the defaults baseline, so a repeated reset lands the same cleared state (not an incrementing/event-style mutation).\n idempotent: true,\n },\n },\n businessConstraints: [\n '`APPLICATION_FEATURES` is one-to-one by `appId`; it is not an organization fallback or global feature catalog.',\n 'Do not use app-scope enablement to imply org-scope enablement for `scopeBoundary` features.',\n ],\n }),\n { resourcePrimaryScope: ResourcePrimaryScope.APPLICATION },\n ),\n () => ({\n layout: {\n purpose: 'Show app-scoped entitlement state and manual overrides for high-trust operators.',\n displayPurpose: 'Super-admin-only diagnostic and override surface.',\n summaryPurpose: 'Compact feature and limit summary for application-level gates.',\n sections: {\n overview: {\n purpose: 'Render `features` and `limits` as the engine currently evaluates them at application scope (e.g. `M2M_WEBHOOK_DELIVERY` for `WEBHOOK_APPLICATION`).',\n whenToUse: 'Default super-admin diagnostic page when inspecting why an app-scope gate is open or closed.',\n textSlots: {\n title: { purpose: 'Label the overview area for the application’s effective app-scope entitlements.' },\n description: { purpose: 'Clarify that values reflect application-scope state only — they do NOT imply org-scope enablement for `scopeBoundary` features.' },\n },\n },\n overrides: {\n purpose: 'Author `manualOverrides` deltas (enable / disable / limit patches) when operators intentionally diverge an application from its profile-derived defaults.',\n whenToUse: 'Break-glass enables for app-scope dogfood pilots, incident-driven disables, and bespoke limit adjustments.',\n textSlots: {\n title: { purpose: 'Label the manual-override area for the application.' },\n description: { purpose: 'State that these overrides survive config/profile changes until cleared via the RESET_FEATURES operation.' },\n },\n },\n },\n },\n views: {\n [Op.READ]: { purpose: 'Super-admin app feature inspection.', whenToUse: 'Debug app-scoped gates like WEBHOOK_APPLICATION.' },\n [Op.SEARCH]: { purpose: 'Rare admin listing path.', whenToUse: 'Diagnostics and registry validation.' },\n [Op.UPDATE]: { purpose: 'Super-admin document-level override.', whenToUse: 'Break-glass edits when surgical operations are insufficient.' },\n [ApplicationFeatures_Operations.ENABLE_FEATURE]: { purpose: 'Single-feature app-scope enable.', whenToUse: 'Enable WEBHOOK_APPLICATION dogfood or app-level feature pilots.' },\n [ApplicationFeatures_Operations.DISABLE_FEATURE]: { purpose: 'Single-feature app-scope disable.', whenToUse: 'Incident response or feature rollback.' },\n [ApplicationFeatures_Operations.RESET_FEATURES]: { purpose: 'Clear app-scope manual overrides.', whenToUse: 'Return application to defaults/profile truth.' },\n },\n }),\n);\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"organization-features.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/features/resources/organization-features.resource.specification.ts"],"names":[],"mappings":"AAWA,OAAO,EACL,WAAW,EACX,qBAAqB,IAAI,EAAE,EAC3B,+BAA+B,EAIhC,MAAM,uBAAuB,CAAC;AA2E/B;;;GAGG;AACH,eAAO,MAAM,yCAAyC;;;;;;;;iCAsUrD,CAAC"}
1
+ {"version":3,"file":"organization-features.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/features/resources/organization-features.resource.specification.ts"],"names":[],"mappings":"AAWA,OAAO,EACL,WAAW,EACX,qBAAqB,IAAI,EAAE,EAC3B,+BAA+B,EAIhC,MAAM,uBAAuB,CAAC;AA4E/B;;;GAGG;AACH,eAAO,MAAM,yCAAyC;;;;;;;;iCAuUrD,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 { CoreFeature, CoreResourceOperation as Op, OrganizationFeatures_Operations, ResourcePrimaryScope, ScopeFeaturesWithOverridesSchema, organizationFeaturesResourceConfiguration_InitializationFactory as organizationFeaturesFactory, } from '@wildo-ai/saas-models';
5
5
  import { HttpResponseStatusCode, mergeResourceFrontendConfigurations, resourceFrontendConfiguration, resourceSpecification, resourceSpecificationFromFrontendConfiguration, } from '../../../_core/index.js';
6
+ import { EngineResourceSubDomain } from '../../engine-resource-sub-domain.js';
6
7
  const organizationFeaturesMainUI = organizationFeaturesMainSource;
7
8
  const organizationFeaturesAdminUI = organizationFeaturesAdminSource;
8
9
  const ORGANIZATION_FEATURE_STATE_EXAMPLE = {
@@ -65,6 +66,7 @@ export const organizationFeaturesResourceSpecification = resourceSpecificationFr
65
66
  businessRole: 'Lets members and integrations understand organization-level availability while giving application administrators controlled entitlement operations.',
66
67
  lifecycleRole: 'Changes when the organization’s plan changes or an application administrator grants, withdraws, or resets an exception.',
67
68
  audience: LabelAudience.ADMIN,
69
+ subDomain: EngineResourceSubDomain.FEATURES,
68
70
  codeHandling: {
69
71
  mainSchema: {
70
72
  packageName: '@wildo-ai/saas-models',
@@ -1 +1 @@
1
- {"version":3,"file":"organization-features.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/features/resources/organization-features.resource.specification.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,2CAA2C,IAAI,+BAA+B,EAC9E,0CAA0C,IAAI,8BAA8B,GAC7E,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,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AE,gDAAgD,EAAE,SAAS,EAAE,uEAAuE,EAAE;QACnM,CAAC,+BAA+B,CAAC,eAAe,CAAC,EAAE,EAAE,OAAO,EAAE,oDAAoD,EAAE,SAAS,EAAE,qEAAqE,EAAE;QACtM,CAAC,+BAA+B,CAAC,cAAc,CAAC,EAAE,EAAE,OAAO,EAAE,oEAAoE,EAAE,SAAS,EAAE,2DAA2D,EAAE;KAC5M;CACF,CAAC,CACH,CAAC","sourcesContent":["import {\n organizationFeaturesAdminResourceUIBehavior as organizationFeaturesAdminSource,\n organizationFeaturesMainResourceUIBehavior as organizationFeaturesMainSource,\n} 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 CoreFeature,\n CoreResourceOperation as Op,\n OrganizationFeatures_Operations,\n ResourcePrimaryScope,\n ScopeFeaturesWithOverridesSchema,\n organizationFeaturesResourceConfiguration_InitializationFactory as organizationFeaturesFactory,\n} from '@wildo-ai/saas-models';\nimport {\n HttpResponseStatusCode,\n mergeResourceFrontendConfigurations,\n resourceFrontendConfiguration,\n resourceSpecification,\n resourceSpecificationFromFrontendConfiguration,\n} from '~wildo-specifications/_core';\n\ntype Cfg = ReturnType<typeof organizationFeaturesFactory>;\ntype Custom = NonNullable<Cfg['customOperation']>;\ntype Core = Cfg['coreOperations'][number];\ntype Main = Cfg['mainSchema'];\n\nconst organizationFeaturesMainUI = organizationFeaturesMainSource as ResourceUIBehaviorConfig<Custom, Core, Main>;\nconst organizationFeaturesAdminUI = organizationFeaturesAdminSource as ResourceUIBehaviorConfig<Custom, Core, Main>;\n\nconst ORGANIZATION_FEATURE_STATE_EXAMPLE = {\n features: [\n CoreFeature.CUSTOM_BRANDING,\n CoreFeature.SINGLE_SIGN_ON,\n CoreFeature.AUDIT_LOGS,\n CoreFeature.M2M_WEBHOOK_DELIVERY,\n ],\n limits: {\n seats: 250,\n monthlyApiRequests: 1_000_000,\n },\n manualOverrides: {\n addedFeatures: [CoreFeature.M2M_WEBHOOK_DELIVERY],\n removedFeatures: [],\n limitOverrides: { seats: 250 },\n },\n} as const;\n\nconst ORGANIZATION_FEATURE_CONTEXT_EXAMPLE = {\n ...ORGANIZATION_FEATURE_STATE_EXAMPLE,\n organization: { _id: 'org_01JEXAMPLE' },\n} as const;\n\nconst ORGANIZATION_FEATURE_SUMMARY_EXAMPLE = {\n features: ORGANIZATION_FEATURE_STATE_EXAMPLE.features,\n limits: ORGANIZATION_FEATURE_STATE_EXAMPLE.limits,\n} as const;\n\nconst ORGANIZATION_FEATURE_UPDATE_REQUEST_EXAMPLE = {\n manualOverrides: {\n addedFeatures: [CoreFeature.ADVANCED_ANALYTICS, CoreFeature.M2M_WEBHOOK_DELIVERY],\n removedFeatures: [],\n limitOverrides: { seats: 300 },\n },\n} as const;\n\nconst ORGANIZATION_FEATURE_UPDATE_RESPONSE_EXAMPLE = {\n ...ORGANIZATION_FEATURE_STATE_EXAMPLE,\n features: [...ORGANIZATION_FEATURE_STATE_EXAMPLE.features, CoreFeature.ADVANCED_ANALYTICS],\n limits: { ...ORGANIZATION_FEATURE_STATE_EXAMPLE.limits, seats: 300 },\n manualOverrides: ORGANIZATION_FEATURE_UPDATE_REQUEST_EXAMPLE.manualOverrides,\n} as const;\n\nconst ORGANIZATION_FEATURE_DISABLE_RESPONSE_EXAMPLE = {\n ...ORGANIZATION_FEATURE_STATE_EXAMPLE,\n features: ORGANIZATION_FEATURE_STATE_EXAMPLE.features.filter((feature) => feature !== CoreFeature.SINGLE_SIGN_ON),\n manualOverrides: {\n ...ORGANIZATION_FEATURE_STATE_EXAMPLE.manualOverrides,\n removedFeatures: [CoreFeature.SINGLE_SIGN_ON],\n },\n} as const;\n\nconst ORGANIZATION_FEATURE_RESET_RESPONSE_EXAMPLE = {\n features: [CoreFeature.CUSTOM_BRANDING, CoreFeature.SINGLE_SIGN_ON, CoreFeature.AUDIT_LOGS],\n limits: { seats: 200, monthlyApiRequests: 1_000_000 },\n manualOverrides: { addedFeatures: [], removedFeatures: [], limitOverrides: {} },\n} as const;\n\n/**\n * Merged `ORGANIZATION_FEATURES` UI: org members can read entitlements, super-admins\n * can override, toggle, or reset the feature bundle (`organizations.resource-presets.tsx`).\n */\nexport const organizationFeaturesResourceSpecification = resourceSpecificationFromFrontendConfiguration(\n mergeResourceFrontendConfigurations(\n resourceFrontendConfiguration(organizationFeaturesMainUI),\n resourceFrontendConfiguration(organizationFeaturesAdminUI),\n ),\n resourceSpecification(\n organizationFeaturesFactory,\n ScopeFeaturesWithOverridesSchema,\n ({ schemaShape }) => ({\n purpose: 'Current features and numeric limits available to one organization, including explicit application-administrator exceptions.',\n businessRole: 'Lets members and integrations understand organization-level availability while giving application administrators controlled entitlement operations.',\n lifecycleRole: 'Changes when the organization’s plan changes or an application administrator grants, withdraws, or resets an exception.',\n audience: LabelAudience.ADMIN,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'ScopeFeaturesWithOverridesSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactory: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'organizationFeaturesResourceConfiguration_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_FEATURES',\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: 'OrganizationFeatures_Operations',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n frontendConfigurationSources: [\n {\n packageName: '@wildo-ai/presets-components',\n exportName: 'organizationFeaturesMainResourceUIBehavior',\n symbolKind: CodeSymbolKind.UI_BEHAVIOR,\n },\n {\n packageName: '@wildo-ai/presets-components',\n exportName: 'organizationFeaturesAdminResourceUIBehavior',\n symbolKind: CodeSymbolKind.UI_BEHAVIOR,\n },\n ],\n },\n fields: {\n // This schema is shared with application and user feature ledgers. Clone\n // every field before adding scope-specific metadata so one specification\n // cannot overwrite another specification's generated descriptions.\n features: schemaShape.features.clone().arraySpec({\n meaning: 'Effective feature keys enabled for this organization.',\n whyItMatters: 'Organization-level capability checks consult this set after plan state and manual overrides are resolved.',\n elementMeaning: 'One framework feature or application-defined entitlement key.',\n elementType: {\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreFeature',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n notes: [\n 'Runtime can union additional custom entitlement feature string keys; `EngineCapability` is not stored here.',\n 'Example `CoreFeature` member: `SINGLE_SIGN_ON` — enterprise IdP and SSO sign-in for the tenant.',\n ],\n },\n }),\n limits: schemaShape.limits.clone().objectSpec({\n meaning: 'Effective numeric caps keyed by feature or meter identifier for this organization.',\n whyItMatters: 'A feature may be enabled while still carrying a quantity limit such as seats, API requests, or storage.',\n }),\n manualOverrides: schemaShape.manualOverrides.clone().objectSpec({\n meaning: 'Application-administrator additions, removals, and limit changes applied on top of this organization’s plan-derived state.',\n whyItMatters: 'These deliberate exceptions survive plan changes until an administrator replaces or resets them.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n },\n operations: {\n [Op.CREATE]: {\n purpose: 'Repository-only bootstrap of the org feature ledger when a system/admin workflow first materializes it.',\n outcome: 'The organization has a singleton entitlement row to receive billing-derived features and manual overrides.',\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'The singleton org-feature ledger row was materialized for the tenant.' },\n ],\n // REPOSITORY_ONLY variant — materialized by system/admin workflows, not a public HTTP endpoint, so no client-facing 400/403/404 are documented.\n idempotent: false,\n },\n [Op.READ]: {\n purpose: 'Read the effective feature entitlements and limits for the addressed organization.',\n outcome: 'The caller receives the resolved feature set, numeric limits, and any administrator-authored override delta.',\n whenToUse: 'Use this representation to explain which organization capabilities are available and which quantitative limits currently apply.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The org feature ledger is returned with its effective features, plan limits, and manual overrides.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not a member of this organization; the effective entitlements ledger is readable by any organization member (writes remain super-admin-only).' },\n ],\n examples: [{\n title: 'Read organization feature entitlements',\n request: { organizationId: 'org_01JEXAMPLE' },\n response: ORGANIZATION_FEATURE_STATE_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n variants: {\n context: {\n purpose: 'Read effective organization feature state with its organization relationship context.',\n outcome: 'The feature state and related organization identifier are returned together.',\n examples: [{\n title: 'Read organization features with context',\n request: { organizationId: 'org_01JEXAMPLE' },\n response: ORGANIZATION_FEATURE_CONTEXT_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n summary: {\n purpose: 'Read the compact effective feature and limit representation.',\n outcome: 'The resolved feature keys and numeric limits are returned without the administrator override details.',\n examples: [{\n title: 'Read compact organization feature state',\n request: { organizationId: 'org_01JEXAMPLE' },\n response: ORGANIZATION_FEATURE_SUMMARY_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n idempotent: true,\n },\n [Op.SEARCH]: {\n purpose: 'Filter the addressed organization’s feature-state row by an enabled feature key.',\n outcome: 'A paginated result contains the singleton feature-state row when it matches, or an empty page when it does not.',\n whenToUse: 'Use this route when a client needs a collection-shaped eligibility check. Use READ when the complete organization feature state is required regardless of one feature.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of org feature rows matching the supplied feature filter.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not a member of this organization; the entitlements search is available to organization members.' },\n ],\n examples: [{\n title: 'Filter organization state by enabled SSO feature',\n request: {\n organizationId: 'org_01JEXAMPLE',\n q: 'single sign on',\n features: CoreFeature.SINGLE_SIGN_ON,\n page: 1,\n limit: 20,\n sort: 'features:asc',\n },\n response: {\n data: [ORGANIZATION_FEATURE_STATE_EXAMPLE],\n pagination: { page: 1, limit: 20, total: 1, totalPages: 1 },\n },\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n idempotent: true,\n },\n [Op.UPDATE]: {\n purpose: 'Replace one or more organization feature-state fields through the application-administration API.',\n outcome: 'The updated effective state and override delta are returned, and subsequent capability checks use the new values.',\n whenToUse: 'Use this operation for a coordinated override change involving several feature or limit entries. Use enable, disable, or reset for one explicit administrative action.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The org entitlements document was patched and the updated ledger is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The partial entitlements payload fails `ScopeFeaturesWithOverridesSchema.partial()` validation.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an application super-admin; document-level overrides are high-trust only.' },\n ],\n examples: [{\n title: 'Update organization feature overrides and seat limit',\n request: {\n organizationId: 'org_01JEXAMPLE',\n ...ORGANIZATION_FEATURE_UPDATE_REQUEST_EXAMPLE,\n },\n response: ORGANIZATION_FEATURE_UPDATE_RESPONSE_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n idempotent: true,\n },\n [Op.DELETE]: {\n purpose: 'Repository-only teardown of the org feature ledger when its owning organization is deleted (composition `onParentDelete` cascade).',\n outcome: 'The singleton entitlement row is removed together with the organization — the composition part does not outlive its whole.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The org-feature ledger row was deleted as part of the owning organization’s deletion cascade.' },\n ],\n // REPOSITORY_ONLY variant (super-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 [OrganizationFeatures_Operations.ENABLE_FEATURE]: {\n operationId: OrganizationFeatures_Operations.ENABLE_FEATURE,\n purpose: 'Add one feature to the organization’s manual enablement overrides.',\n outcome: 'The feature is removed from any disable override, added once to the enable override, and the updated feature ledger is returned.',\n whenToUse: 'Use this command for one deliberate entitlement grant. The optional reason lets the caller explain why the change is being requested.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The named feature is now enabled for the org and the updated ledger is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The `featureId` is not a member of `CoreFeature` (the request DTO is enum-constrained, so an unknown key is a validation failure rather than a 404).', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an application super-admin; feature enablement is administration-gated.' },\n ],\n // Convergent: enabling an already-enabled feature lands the same end state.\n idempotent: true,\n examples: [\n {\n title: 'Enable advanced analytics for an organization',\n request: {\n organizationId: 'org_01JEXAMPLE',\n featureId: CoreFeature.ADVANCED_ANALYTICS,\n reason: 'Advanced analytics is included in the signed enterprise addendum.',\n },\n response: {\n ...ORGANIZATION_FEATURE_STATE_EXAMPLE,\n features: [...ORGANIZATION_FEATURE_STATE_EXAMPLE.features, CoreFeature.ADVANCED_ANALYTICS],\n manualOverrides: {\n ...ORGANIZATION_FEATURE_STATE_EXAMPLE.manualOverrides,\n addedFeatures: [CoreFeature.M2M_WEBHOOK_DELIVERY, CoreFeature.ADVANCED_ANALYTICS],\n },\n },\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n [OrganizationFeatures_Operations.DISABLE_FEATURE]: {\n operationId: OrganizationFeatures_Operations.DISABLE_FEATURE,\n purpose: 'Add one feature to the organization’s manual disablement overrides.',\n outcome: 'The feature is removed from any enable override, added once to the disable override, and the updated feature ledger is returned.',\n whenToUse: 'Use this command for one deliberate entitlement withdrawal. A non-empty reason is required.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The named feature is now disabled for the org and the updated ledger is returned.' },\n ],\n examples: [{\n title: 'Disable organization SSO after contract expiry',\n request: {\n organizationId: 'org_01JEXAMPLE',\n featureId: CoreFeature.SINGLE_SIGN_ON,\n reason: 'The enterprise SSO add-on ended on 2026-08-20.',\n },\n response: ORGANIZATION_FEATURE_DISABLE_RESPONSE_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The `featureId` is not a `CoreFeature` member, or the required `reason` justification is missing/empty.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an application super-admin; feature disablement is administration-gated.' },\n ],\n // Convergent: disabling an already-disabled feature lands the same end state.\n idempotent: true,\n },\n [OrganizationFeatures_Operations.RESET_FEATURES]: {\n operationId: OrganizationFeatures_Operations.RESET_FEATURES,\n purpose: 'Clear every manual organization feature and limit override.',\n outcome: 'The feature ledger returns to its plan-derived feature set and limits, and the updated ledger is returned.',\n whenToUse: 'Use this command after a temporary exception ends or when the organization should again follow its plan without manual additions, removals, or limit changes.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'All org manual overrides were cleared, the ledger was re-synced to plan truth, and the result is returned.' },\n ],\n examples: [{\n title: 'Reset organization features to plan-derived state',\n request: {\n organizationId: 'org_01JEXAMPLE',\n reason: 'Temporary migration entitlements are no longer required.',\n },\n response: ORGANIZATION_FEATURE_RESET_RESPONSE_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The required `reason` justification is missing or empty.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an application super-admin; clearing overrides is the highest-trust feature operation.' },\n ],\n // Convergent: re-syncing to plan defaults lands the same cleared state on repeat, so this is idempotent despite being a high-risk action.\n idempotent: true,\n },\n },\n businessConstraints: [\n 'Each organization has one current feature-state record. The search route therefore returns either that matching record or an empty page; it is not a cross-organization feature catalogue.',\n 'Organization feature state and user feature state are separate entitlement layers. A capability may require both scopes to allow it.',\n ],\n }),\n { resourcePrimaryScope: ResourcePrimaryScope.ORGANIZATIONS },\n ),\n () => ({\n layout: {\n purpose: 'Show effective entitlements and manual deltas for a tenant without mixing in unrelated billing calculations.',\n displayPurpose: 'Read-only for org members; super-admin and platform flows edit overrides in the `overrides` section.',\n summaryPurpose: 'Compact summary of org-level feature chips and high-signal limit highlights.',\n sections: {\n overview: {\n purpose: 'Render `features` and `limits` for the org as the engine currently evaluates them.',\n whenToUse: 'Default org-level feature page and billing alignment reviews.',\n textSlots: {\n title: { purpose: 'Label the overview area for the org’s effective entitlements.' },\n description: { purpose: 'Clarify that values combine plan defaults, org policy, and manual operator overrides.' },\n },\n },\n overrides: {\n purpose: 'Author `manualOverrides` deltas (add/remove and limit patches) when operators intentionally diverge a tenant from plan truth.',\n whenToUse: 'Break-glass support, contract exceptions, and migration assists.',\n textSlots: {\n title: { purpose: 'Label the manual-override area for the organization.' },\n description: { purpose: 'State that these persist across billing plan transitions until reset via policy or the RESET operation.' },\n },\n },\n },\n },\n views: {\n [Op.READ]: { purpose: 'Members and admins read effective entitlements in org settings and billing.', whenToUse: 'Plan comparison and support investigations.' },\n [Op.SEARCH]: { purpose: 'Search across feature metadata in merged main behavior.', whenToUse: 'Large shared catalogs in multi-tenant admin hosts.' },\n [Op.UPDATE]: { purpose: 'Super-admin edit of the entitlements document (admin preset adds this key).', whenToUse: 'Manual break-glass grants when billing cannot respond quickly enough.' },\n [OrganizationFeatures_Operations.ENABLE_FEATURE]: { purpose: 'Single-toggle enable UX tied to the custom op.', whenToUse: 'Sales-assist, pilots, and emergency unlocks with narrow blast radius.' },\n [OrganizationFeatures_Operations.DISABLE_FEATURE]: { purpose: 'Single-toggle disable with required reason string.', whenToUse: 'Abuse, license claw-back, and incident response for one capability.' },\n [OrganizationFeatures_Operations.RESET_FEATURES]: { purpose: 'Nuclear option to return to plan defaults after many manual edits.', whenToUse: 'Offboarding a bespoke bundle or after migration mistakes.' },\n },\n }),\n);\n"]}
1
+ {"version":3,"file":"organization-features.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/features/resources/organization-features.resource.specification.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,2CAA2C,IAAI,+BAA+B,EAC9E,0CAA0C,IAAI,8BAA8B,GAC7E,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAEpE,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,WAAW,EACX,qBAAqB,IAAI,EAAE,EAC3B,+BAA+B,EAC/B,oBAAoB,EACpB,gCAAgC,EAChC,+DAA+D,IAAI,2BAA2B,GAC/F,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,sBAAsB,EACtB,mCAAmC,EACnC,6BAA6B,EAC7B,qBAAqB,EACrB,8CAA8C,GAC/C,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAO3E,MAAM,0BAA0B,GAAG,8BAA8E,CAAC;AAClH,MAAM,2BAA2B,GAAG,+BAA+E,CAAC;AAEpH,MAAM,kCAAkC,GAAG;IACzC,QAAQ,EAAE;QACR,WAAW,CAAC,eAAe;QAC3B,WAAW,CAAC,cAAc;QAC1B,WAAW,CAAC,UAAU;QACtB,WAAW,CAAC,o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EAAE,OAAO,EAAE,+DAA+D,EAAE;oBACnF,WAAW,EAAE,EAAE,OAAO,EAAE,uFAAuF,EAAE;iBAClH;aACF;YACD,SAAS,EAAE;gBACT,OAAO,EAAE,+HAA+H;gBACxI,SAAS,EAAE,kEAAkE;gBAC7E,SAAS,EAAE;oBACT,KAAK,EAAE,EAAE,OAAO,EAAE,sDAAsD,EAAE;oBAC1E,WAAW,EAAE,EAAE,OAAO,EAAE,yGAAyG,EAAE;iBACpI;aACF;SACF;KACF;IACD,KAAK,EAAE;QACL,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,OAAO,EAAE,6EAA6E,EAAE,SAAS,EAAE,6CAA6C,EAAE;QAC/J,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE,yDAAyD,EAAE,SAAS,EAAE,oDAAoD,EAAE;QACpJ,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE,6EAA6E,EAAE,SAAS,EAAE,uEAAuE,EAAE;QAC3L,CAAC,+BAA+B,CAAC,cAAc,CAAC,EAAE,EAAE,OAAO,EAAE,gDAAgD,EAAE,SAAS,EAAE,uEAAuE,EAAE;QACnM,CAAC,+BAA+B,CAAC,eAAe,CAAC,EAAE,EAAE,OAAO,EAAE,oDAAoD,EAAE,SAAS,EAAE,qEAAqE,EAAE;QACtM,CAAC,+BAA+B,CAAC,cAAc,CAAC,EAAE,EAAE,OAAO,EAAE,oEAAoE,EAAE,SAAS,EAAE,2DAA2D,EAAE;KAC5M;CACF,CAAC,CACH,CAAC","sourcesContent":["import {\n organizationFeaturesAdminResourceUIBehavior as organizationFeaturesAdminSource,\n organizationFeaturesMainResourceUIBehavior as organizationFeaturesMainSource,\n} 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 CoreFeature,\n CoreResourceOperation as Op,\n OrganizationFeatures_Operations,\n ResourcePrimaryScope,\n ScopeFeaturesWithOverridesSchema,\n organizationFeaturesResourceConfiguration_InitializationFactory as organizationFeaturesFactory,\n} from '@wildo-ai/saas-models';\nimport {\n HttpResponseStatusCode,\n mergeResourceFrontendConfigurations,\n resourceFrontendConfiguration,\n resourceSpecification,\n resourceSpecificationFromFrontendConfiguration,\n} from '~wildo-specifications/_core';\nimport { EngineResourceSubDomain } from '../../engine-resource-sub-domain';\n\ntype Cfg = ReturnType<typeof organizationFeaturesFactory>;\ntype Custom = NonNullable<Cfg['customOperation']>;\ntype Core = Cfg['coreOperations'][number];\ntype Main = Cfg['mainSchema'];\n\nconst organizationFeaturesMainUI = organizationFeaturesMainSource as ResourceUIBehaviorConfig<Custom, Core, Main>;\nconst organizationFeaturesAdminUI = organizationFeaturesAdminSource as ResourceUIBehaviorConfig<Custom, Core, Main>;\n\nconst ORGANIZATION_FEATURE_STATE_EXAMPLE = {\n features: [\n CoreFeature.CUSTOM_BRANDING,\n CoreFeature.SINGLE_SIGN_ON,\n CoreFeature.AUDIT_LOGS,\n CoreFeature.M2M_WEBHOOK_DELIVERY,\n ],\n limits: {\n seats: 250,\n monthlyApiRequests: 1_000_000,\n },\n manualOverrides: {\n addedFeatures: [CoreFeature.M2M_WEBHOOK_DELIVERY],\n removedFeatures: [],\n limitOverrides: { seats: 250 },\n },\n} as const;\n\nconst ORGANIZATION_FEATURE_CONTEXT_EXAMPLE = {\n ...ORGANIZATION_FEATURE_STATE_EXAMPLE,\n organization: { _id: 'org_01JEXAMPLE' },\n} as const;\n\nconst ORGANIZATION_FEATURE_SUMMARY_EXAMPLE = {\n features: ORGANIZATION_FEATURE_STATE_EXAMPLE.features,\n limits: ORGANIZATION_FEATURE_STATE_EXAMPLE.limits,\n} as const;\n\nconst ORGANIZATION_FEATURE_UPDATE_REQUEST_EXAMPLE = {\n manualOverrides: {\n addedFeatures: [CoreFeature.ADVANCED_ANALYTICS, CoreFeature.M2M_WEBHOOK_DELIVERY],\n removedFeatures: [],\n limitOverrides: { seats: 300 },\n },\n} as const;\n\nconst ORGANIZATION_FEATURE_UPDATE_RESPONSE_EXAMPLE = {\n ...ORGANIZATION_FEATURE_STATE_EXAMPLE,\n features: [...ORGANIZATION_FEATURE_STATE_EXAMPLE.features, CoreFeature.ADVANCED_ANALYTICS],\n limits: { ...ORGANIZATION_FEATURE_STATE_EXAMPLE.limits, seats: 300 },\n manualOverrides: ORGANIZATION_FEATURE_UPDATE_REQUEST_EXAMPLE.manualOverrides,\n} as const;\n\nconst ORGANIZATION_FEATURE_DISABLE_RESPONSE_EXAMPLE = {\n ...ORGANIZATION_FEATURE_STATE_EXAMPLE,\n features: ORGANIZATION_FEATURE_STATE_EXAMPLE.features.filter((feature) => feature !== CoreFeature.SINGLE_SIGN_ON),\n manualOverrides: {\n ...ORGANIZATION_FEATURE_STATE_EXAMPLE.manualOverrides,\n removedFeatures: [CoreFeature.SINGLE_SIGN_ON],\n },\n} as const;\n\nconst ORGANIZATION_FEATURE_RESET_RESPONSE_EXAMPLE = {\n features: [CoreFeature.CUSTOM_BRANDING, CoreFeature.SINGLE_SIGN_ON, CoreFeature.AUDIT_LOGS],\n limits: { seats: 200, monthlyApiRequests: 1_000_000 },\n manualOverrides: { addedFeatures: [], removedFeatures: [], limitOverrides: {} },\n} as const;\n\n/**\n * Merged `ORGANIZATION_FEATURES` UI: org members can read entitlements, super-admins\n * can override, toggle, or reset the feature bundle (`organizations.resource-presets.tsx`).\n */\nexport const organizationFeaturesResourceSpecification = resourceSpecificationFromFrontendConfiguration(\n mergeResourceFrontendConfigurations(\n resourceFrontendConfiguration(organizationFeaturesMainUI),\n resourceFrontendConfiguration(organizationFeaturesAdminUI),\n ),\n resourceSpecification(\n organizationFeaturesFactory,\n ScopeFeaturesWithOverridesSchema,\n ({ schemaShape }) => ({\n purpose: 'Current features and numeric limits available to one organization, including explicit application-administrator exceptions.',\n businessRole: 'Lets members and integrations understand organization-level availability while giving application administrators controlled entitlement operations.',\n lifecycleRole: 'Changes when the organization’s plan changes or an application administrator grants, withdraws, or resets an exception.',\n audience: LabelAudience.ADMIN,\n subDomain: EngineResourceSubDomain.FEATURES,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'ScopeFeaturesWithOverridesSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactory: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'organizationFeaturesResourceConfiguration_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_FEATURES',\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: 'OrganizationFeatures_Operations',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n frontendConfigurationSources: [\n {\n packageName: '@wildo-ai/presets-components',\n exportName: 'organizationFeaturesMainResourceUIBehavior',\n symbolKind: CodeSymbolKind.UI_BEHAVIOR,\n },\n {\n packageName: '@wildo-ai/presets-components',\n exportName: 'organizationFeaturesAdminResourceUIBehavior',\n symbolKind: CodeSymbolKind.UI_BEHAVIOR,\n },\n ],\n },\n fields: {\n // This schema is shared with application and user feature ledgers. Clone\n // every field before adding scope-specific metadata so one specification\n // cannot overwrite another specification's generated descriptions.\n features: schemaShape.features.clone().arraySpec({\n meaning: 'Effective feature keys enabled for this organization.',\n whyItMatters: 'Organization-level capability checks consult this set after plan state and manual overrides are resolved.',\n elementMeaning: 'One framework feature or application-defined entitlement key.',\n elementType: {\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreFeature',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n notes: [\n 'Runtime can union additional custom entitlement feature string keys; `EngineCapability` is not stored here.',\n 'Example `CoreFeature` member: `SINGLE_SIGN_ON` — enterprise IdP and SSO sign-in for the tenant.',\n ],\n },\n }),\n limits: schemaShape.limits.clone().objectSpec({\n meaning: 'Effective numeric caps keyed by feature or meter identifier for this organization.',\n whyItMatters: 'A feature may be enabled while still carrying a quantity limit such as seats, API requests, or storage.',\n }),\n manualOverrides: schemaShape.manualOverrides.clone().objectSpec({\n meaning: 'Application-administrator additions, removals, and limit changes applied on top of this organization’s plan-derived state.',\n whyItMatters: 'These deliberate exceptions survive plan changes until an administrator replaces or resets them.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n },\n operations: {\n [Op.CREATE]: {\n purpose: 'Repository-only bootstrap of the org feature ledger when a system/admin workflow first materializes it.',\n outcome: 'The organization has a singleton entitlement row to receive billing-derived features and manual overrides.',\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'The singleton org-feature ledger row was materialized for the tenant.' },\n ],\n // REPOSITORY_ONLY variant — materialized by system/admin workflows, not a public HTTP endpoint, so no client-facing 400/403/404 are documented.\n idempotent: false,\n },\n [Op.READ]: {\n purpose: 'Read the effective feature entitlements and limits for the addressed organization.',\n outcome: 'The caller receives the resolved feature set, numeric limits, and any administrator-authored override delta.',\n whenToUse: 'Use this representation to explain which organization capabilities are available and which quantitative limits currently apply.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The org feature ledger is returned with its effective features, plan limits, and manual overrides.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not a member of this organization; the effective entitlements ledger is readable by any organization member (writes remain super-admin-only).' },\n ],\n examples: [{\n title: 'Read organization feature entitlements',\n request: { organizationId: 'org_01JEXAMPLE' },\n response: ORGANIZATION_FEATURE_STATE_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n variants: {\n context: {\n purpose: 'Read effective organization feature state with its organization relationship context.',\n outcome: 'The feature state and related organization identifier are returned together.',\n examples: [{\n title: 'Read organization features with context',\n request: { organizationId: 'org_01JEXAMPLE' },\n response: ORGANIZATION_FEATURE_CONTEXT_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n summary: {\n purpose: 'Read the compact effective feature and limit representation.',\n outcome: 'The resolved feature keys and numeric limits are returned without the administrator override details.',\n examples: [{\n title: 'Read compact organization feature state',\n request: { organizationId: 'org_01JEXAMPLE' },\n response: ORGANIZATION_FEATURE_SUMMARY_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n idempotent: true,\n },\n [Op.SEARCH]: {\n purpose: 'Filter the addressed organization’s feature-state row by an enabled feature key.',\n outcome: 'A paginated result contains the singleton feature-state row when it matches, or an empty page when it does not.',\n whenToUse: 'Use this route when a client needs a collection-shaped eligibility check. Use READ when the complete organization feature state is required regardless of one feature.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of org feature rows matching the supplied feature filter.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not a member of this organization; the entitlements search is available to organization members.' },\n ],\n examples: [{\n title: 'Filter organization state by enabled SSO feature',\n request: {\n organizationId: 'org_01JEXAMPLE',\n q: 'single sign on',\n features: CoreFeature.SINGLE_SIGN_ON,\n page: 1,\n limit: 20,\n sort: 'features:asc',\n },\n response: {\n data: [ORGANIZATION_FEATURE_STATE_EXAMPLE],\n pagination: { page: 1, limit: 20, total: 1, totalPages: 1 },\n },\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n idempotent: true,\n },\n [Op.UPDATE]: {\n purpose: 'Replace one or more organization feature-state fields through the application-administration API.',\n outcome: 'The updated effective state and override delta are returned, and subsequent capability checks use the new values.',\n whenToUse: 'Use this operation for a coordinated override change involving several feature or limit entries. Use enable, disable, or reset for one explicit administrative action.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The org entitlements document was patched and the updated ledger is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The partial entitlements payload fails `ScopeFeaturesWithOverridesSchema.partial()` validation.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an application super-admin; document-level overrides are high-trust only.' },\n ],\n examples: [{\n title: 'Update organization feature overrides and seat limit',\n request: {\n organizationId: 'org_01JEXAMPLE',\n ...ORGANIZATION_FEATURE_UPDATE_REQUEST_EXAMPLE,\n },\n response: ORGANIZATION_FEATURE_UPDATE_RESPONSE_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n idempotent: true,\n },\n [Op.DELETE]: {\n purpose: 'Repository-only teardown of the org feature ledger when its owning organization is deleted (composition `onParentDelete` cascade).',\n outcome: 'The singleton entitlement row is removed together with the organization — the composition part does not outlive its whole.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The org-feature ledger row was deleted as part of the owning organization’s deletion cascade.' },\n ],\n // REPOSITORY_ONLY variant (super-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 [OrganizationFeatures_Operations.ENABLE_FEATURE]: {\n operationId: OrganizationFeatures_Operations.ENABLE_FEATURE,\n purpose: 'Add one feature to the organization’s manual enablement overrides.',\n outcome: 'The feature is removed from any disable override, added once to the enable override, and the updated feature ledger is returned.',\n whenToUse: 'Use this command for one deliberate entitlement grant. The optional reason lets the caller explain why the change is being requested.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The named feature is now enabled for the org and the updated ledger is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The `featureId` is not a member of `CoreFeature` (the request DTO is enum-constrained, so an unknown key is a validation failure rather than a 404).', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an application super-admin; feature enablement is administration-gated.' },\n ],\n // Convergent: enabling an already-enabled feature lands the same end state.\n idempotent: true,\n examples: [\n {\n title: 'Enable advanced analytics for an organization',\n request: {\n organizationId: 'org_01JEXAMPLE',\n featureId: CoreFeature.ADVANCED_ANALYTICS,\n reason: 'Advanced analytics is included in the signed enterprise addendum.',\n },\n response: {\n ...ORGANIZATION_FEATURE_STATE_EXAMPLE,\n features: [...ORGANIZATION_FEATURE_STATE_EXAMPLE.features, CoreFeature.ADVANCED_ANALYTICS],\n manualOverrides: {\n ...ORGANIZATION_FEATURE_STATE_EXAMPLE.manualOverrides,\n addedFeatures: [CoreFeature.M2M_WEBHOOK_DELIVERY, CoreFeature.ADVANCED_ANALYTICS],\n },\n },\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n [OrganizationFeatures_Operations.DISABLE_FEATURE]: {\n operationId: OrganizationFeatures_Operations.DISABLE_FEATURE,\n purpose: 'Add one feature to the organization’s manual disablement overrides.',\n outcome: 'The feature is removed from any enable override, added once to the disable override, and the updated feature ledger is returned.',\n whenToUse: 'Use this command for one deliberate entitlement withdrawal. A non-empty reason is required.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The named feature is now disabled for the org and the updated ledger is returned.' },\n ],\n examples: [{\n title: 'Disable organization SSO after contract expiry',\n request: {\n organizationId: 'org_01JEXAMPLE',\n featureId: CoreFeature.SINGLE_SIGN_ON,\n reason: 'The enterprise SSO add-on ended on 2026-08-20.',\n },\n response: ORGANIZATION_FEATURE_DISABLE_RESPONSE_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The `featureId` is not a `CoreFeature` member, or the required `reason` justification is missing/empty.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an application super-admin; feature disablement is administration-gated.' },\n ],\n // Convergent: disabling an already-disabled feature lands the same end state.\n idempotent: true,\n },\n [OrganizationFeatures_Operations.RESET_FEATURES]: {\n operationId: OrganizationFeatures_Operations.RESET_FEATURES,\n purpose: 'Clear every manual organization feature and limit override.',\n outcome: 'The feature ledger returns to its plan-derived feature set and limits, and the updated ledger is returned.',\n whenToUse: 'Use this command after a temporary exception ends or when the organization should again follow its plan without manual additions, removals, or limit changes.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'All org manual overrides were cleared, the ledger was re-synced to plan truth, and the result is returned.' },\n ],\n examples: [{\n title: 'Reset organization features to plan-derived state',\n request: {\n organizationId: 'org_01JEXAMPLE',\n reason: 'Temporary migration entitlements are no longer required.',\n },\n response: ORGANIZATION_FEATURE_RESET_RESPONSE_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The required `reason` justification is missing or empty.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an application super-admin; clearing overrides is the highest-trust feature operation.' },\n ],\n // Convergent: re-syncing to plan defaults lands the same cleared state on repeat, so this is idempotent despite being a high-risk action.\n idempotent: true,\n },\n },\n businessConstraints: [\n 'Each organization has one current feature-state record. The search route therefore returns either that matching record or an empty page; it is not a cross-organization feature catalogue.',\n 'Organization feature state and user feature state are separate entitlement layers. A capability may require both scopes to allow it.',\n ],\n }),\n { resourcePrimaryScope: ResourcePrimaryScope.ORGANIZATIONS },\n ),\n () => ({\n layout: {\n purpose: 'Show effective entitlements and manual deltas for a tenant without mixing in unrelated billing calculations.',\n displayPurpose: 'Read-only for org members; super-admin and platform flows edit overrides in the `overrides` section.',\n summaryPurpose: 'Compact summary of org-level feature chips and high-signal limit highlights.',\n sections: {\n overview: {\n purpose: 'Render `features` and `limits` for the org as the engine currently evaluates them.',\n whenToUse: 'Default org-level feature page and billing alignment reviews.',\n textSlots: {\n title: { purpose: 'Label the overview area for the org’s effective entitlements.' },\n description: { purpose: 'Clarify that values combine plan defaults, org policy, and manual operator overrides.' },\n },\n },\n overrides: {\n purpose: 'Author `manualOverrides` deltas (add/remove and limit patches) when operators intentionally diverge a tenant from plan truth.',\n whenToUse: 'Break-glass support, contract exceptions, and migration assists.',\n textSlots: {\n title: { purpose: 'Label the manual-override area for the organization.' },\n description: { purpose: 'State that these persist across billing plan transitions until reset via policy or the RESET operation.' },\n },\n },\n },\n },\n views: {\n [Op.READ]: { purpose: 'Members and admins read effective entitlements in org settings and billing.', whenToUse: 'Plan comparison and support investigations.' },\n [Op.SEARCH]: { purpose: 'Search across feature metadata in merged main behavior.', whenToUse: 'Large shared catalogs in multi-tenant admin hosts.' },\n [Op.UPDATE]: { purpose: 'Super-admin edit of the entitlements document (admin preset adds this key).', whenToUse: 'Manual break-glass grants when billing cannot respond quickly enough.' },\n [OrganizationFeatures_Operations.ENABLE_FEATURE]: { purpose: 'Single-toggle enable UX tied to the custom op.', whenToUse: 'Sales-assist, pilots, and emergency unlocks with narrow blast radius.' },\n [OrganizationFeatures_Operations.DISABLE_FEATURE]: { purpose: 'Single-toggle disable with required reason string.', whenToUse: 'Abuse, license claw-back, and incident response for one capability.' },\n [OrganizationFeatures_Operations.RESET_FEATURES]: { purpose: 'Nuclear option to return to plan defaults after many manual edits.', whenToUse: 'Offboarding a bespoke bundle or after migration mistakes.' },\n },\n }),\n);\n"]}
@@ -8,7 +8,7 @@
8
8
  * - Presets: `userFeaturesMainResourceUIBehavior` + `userFeaturesAdminResourceUIBehavior` (identity)
9
9
  */
10
10
  import { CoreResourceOperation as Op } from '@wildo-ai/saas-models';
11
- export declare const userFeaturesResourceSpecification: import("../../../_core").ResourceSpecificationConfig<Record<string, never>, Op.READ | Op.UPDATE | Op.DELETE | Op.CREATE | Op.SEARCH, import("zod").ZodObject<{
11
+ export declare const userFeaturesResourceSpecification: import("../../../_core").ResourceSpecificationConfig<Record<string, never>, Op.READ | Op.UPDATE | Op.UPDATE_MANY | Op.DELETE | Op.CREATE | Op.LIST | Op.SEARCH, import("zod").ZodObject<{
12
12
  features: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodUnion<readonly [import("zod").ZodEnum<typeof import("@wildo-ai/saas-models").CoreFeature>, import("zod").ZodString]>>>>>;
13
13
  limits: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodDefault<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodNumber>>>>;
14
14
  manualOverrides: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodDefault<import("zod").ZodObject<{
@@ -1 +1 @@
1
- {"version":3,"file":"user-features.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/features/resources/user-features.resource.specification.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAaH,OAAO,EACL,qBAAqB,IAAI,EAAE,EAI5B,MAAM,uBAAuB,CAAC;AAyB/B,eAAO,MAAM,iCAAiC;;;;;;;;iCAmM7C,CAAC"}
1
+ {"version":3,"file":"user-features.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/features/resources/user-features.resource.specification.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAaH,OAAO,EACL,qBAAqB,IAAI,EAAE,EAI5B,MAAM,uBAAuB,CAAC;AA0B/B,eAAO,MAAM,iCAAiC;;;;;;;;iCAoM7C,CAAC"}
@@ -12,6 +12,7 @@ import { LabelAudience } from '@wildo-ai/presets-components-models';
12
12
  import { CodeDeclarationKind, CodeSymbolKind, FieldSemanticImportance, } from '@wildo-ai/zod-decorators';
13
13
  import { CoreResourceOperation as Op, ResourcePrimaryScope, ScopeFeaturesWithOverridesSchema, userFeaturesResourceConfiguration_InitializationFactory as userFeaturesFactory, } from '@wildo-ai/saas-models';
14
14
  import { HttpResponseStatusCode, mergeResourceFrontendConfigurations, resourceFrontendConfiguration, resourceSpecification, resourceSpecificationFromFrontendConfiguration, } from '../../../_core/index.js';
15
+ import { EngineResourceSubDomain } from '../../engine-resource-sub-domain.js';
15
16
  const userFeaturesMainResourceUIBehavior = userFeaturesMainResourceUIBehaviorSource;
16
17
  const userFeaturesAdminResourceUIBehavior = userFeaturesAdminResourceUIBehaviorSource;
17
18
  export const userFeaturesResourceSpecification = resourceSpecificationFromFrontendConfiguration(mergeResourceFrontendConfigurations(resourceFrontendConfiguration(userFeaturesMainResourceUIBehavior), resourceFrontendConfiguration(userFeaturesAdminResourceUIBehavior)), resourceSpecification(userFeaturesFactory, ScopeFeaturesWithOverridesSchema, ({ schemaShape }) => ({
@@ -19,6 +20,7 @@ export const userFeaturesResourceSpecification = resourceSpecificationFromFronte
19
20
  businessRole: 'The user-scoped feature ledger backing progressive rollout, org plans, and manual operator grants in admin UI.',
20
21
  lifecycleRole: 'Recomputed as billing, profile, and admin edits land — overrides persist until explicitly cleared or superseded by policy.',
21
22
  audience: LabelAudience.ADMIN,
23
+ subDomain: EngineResourceSubDomain.FEATURES,
22
24
  codeHandling: {
23
25
  mainSchema: {
24
26
  packageName: '@wildo-ai/saas-models',
@@ -1 +1 @@
1
- {"version":3,"file":"user-features.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/features/resources/user-features.resource.specification.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EACL,mCAAmC,IAAI,yCAAyC,EAChF,kCAAkC,IAAI,wCAAwC,GAC/E,M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AE;QACL,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE;YACT,OAAO,EAAE,mFAAmF;YAC5F,SAAS,EAAE,qEAAqE;SACjF;QACD,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE;YACX,OAAO,EAAE,yFAAyF;YAClG,SAAS,EAAE,qDAAqD;SACjE;QACD,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE;YACX,OAAO,EAAE,qDAAqD;YAC9D,SAAS,EAAE,0FAA0F;SACtG;KACF;CACF,CAAC,CACH,CAAC","sourcesContent":["/**\n * Resource: `userFeatures` — Wildo SaaS engine specification (mixed).\n *\n * Inputs:\n * - Schema: `ScopeFeaturesWithOverridesSchema` in `engine/saas-models/src/features/scope-features.shared.schemas.ts`\n * - Factory: `userFeaturesResourceConfiguration_InitializationFactory` in `user-features.shared.resources-config.schemas.ts`\n * - Custom operations: none (`Record<string, never>`)\n * - Presets: `userFeaturesMainResourceUIBehavior` + `userFeaturesAdminResourceUIBehavior` (identity)\n */\n\nimport {\n userFeaturesAdminResourceUIBehavior as userFeaturesAdminResourceUIBehaviorSource,\n userFeaturesMainResourceUIBehavior as userFeaturesMainResourceUIBehaviorSource,\n} from '@wildo-ai/presets-components';\nimport { LabelAudience } from '@wildo-ai/presets-components-models';\nimport type { ResourceUIBehaviorConfig } from '@wildo-ai/saas-frontend-lib/companion';\nimport {\n CodeDeclarationKind,\n CodeSymbolKind,\n FieldSemanticImportance,\n} from '@wildo-ai/zod-decorators';\nimport {\n CoreResourceOperation as Op,\n ResourcePrimaryScope,\n ScopeFeaturesWithOverridesSchema,\n userFeaturesResourceConfiguration_InitializationFactory as userFeaturesFactory,\n} from '@wildo-ai/saas-models';\nimport {\n HttpResponseStatusCode,\n mergeResourceFrontendConfigurations,\n resourceFrontendConfiguration,\n resourceSpecification,\n resourceSpecificationFromFrontendConfiguration,\n} from '~wildo-specifications/_core';\n\ntype UserFeaturesConfig = ReturnType<typeof userFeaturesFactory>;\ntype UserFeaturesCoreOp = UserFeaturesConfig['coreOperations'][number];\ntype UserFeaturesSchema = UserFeaturesConfig['mainSchema'];\n\nconst userFeaturesMainResourceUIBehavior = userFeaturesMainResourceUIBehaviorSource as ResourceUIBehaviorConfig<\n Record<string, never>,\n UserFeaturesCoreOp,\n UserFeaturesSchema\n>;\n\nconst userFeaturesAdminResourceUIBehavior = userFeaturesAdminResourceUIBehaviorSource as ResourceUIBehaviorConfig<\n Record<string, never>,\n UserFeaturesCoreOp,\n UserFeaturesSchema\n>;\n\nexport const userFeaturesResourceSpecification = resourceSpecificationFromFrontendConfiguration(\n mergeResourceFrontendConfigurations(\n resourceFrontendConfiguration(userFeaturesMainResourceUIBehavior),\n resourceFrontendConfiguration(userFeaturesAdminResourceUIBehavior),\n ),\n resourceSpecification(\n userFeaturesFactory,\n ScopeFeaturesWithOverridesSchema,\n ({ schemaShape }) => ({\n purpose: 'Per-user entitlements: enabled engine features, numeric limits, and admin overrides that survive billing churn.',\n businessRole: 'The user-scoped feature ledger backing progressive rollout, org plans, and manual operator grants in admin UI.',\n lifecycleRole: 'Recomputed as billing, profile, and admin edits land — overrides persist until explicitly cleared or superseded by policy.',\n audience: LabelAudience.ADMIN,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'ScopeFeaturesWithOverridesSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactory: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'userFeaturesResourceConfiguration_InitializationFactory',\n symbolKind: CodeSymbolKind.FACTORY,\n declarationKind: CodeDeclarationKind.FUNCTION,\n },\n resourceType: {\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceType',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n memberName: 'USER_FEATURES',\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: 'userFeaturesMainResourceUIBehavior',\n symbolKind: CodeSymbolKind.UI_BEHAVIOR,\n },\n {\n packageName: '@wildo-ai/presets-components',\n exportName: 'userFeaturesAdminResourceUIBehavior',\n symbolKind: CodeSymbolKind.UI_BEHAVIOR,\n },\n ],\n notes: [\n 'Runtime has no `userNotifications` / `m2mNotifications` on READ/SEARCH/UPDATE — do not add communications.* (DF-1).',\n ],\n },\n\n fields: {\n features: schemaShape.features.clone().arraySpec({\n meaning: 'Boolean feature switches currently enabled for this user (union of `CoreFeature` and custom entitlement feature keys).',\n whyItMatters: 'Feature gates across the product consult this set when evaluating user-level entitlements.',\n elementMeaning: 'One feature key — an engine feature enum member, a connector capability, or a tenant-specific string key.',\n elementType: {\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreFeature',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n notes: [\n 'Runtime union is `CoreFeature | string`; `EngineCapability` is SaaS/framework activation and is not an entitlement feature id.',\n 'Representative `CoreFeature` members: `CUSTOM_BRANDING` (white-label / themes), `ADVANCED_ANALYTICS`, `SINGLE_SIGN_ON` (IdP + SSO), `AUDIT_LOGS`, `SECURITY_EVENT_EXPORT` (SIEM), `DIRECTORY_PROVISIONING` (SCIM), `M2M_WEBHOOK_DELIVERY`.',\n ],\n },\n }),\n\n limits: schemaShape.limits.clone().objectSpec({\n meaning: 'Numeric caps keyed by feature identifier — `FEATURES_UNLIMITED` convention marks no cap in consuming services.',\n whyItMatters: 'Distinguishes “feature on” from “how much of it” (seats, API units, etc.).',\n }),\n\n manualOverrides: schemaShape.manualOverrides.clone().objectSpec({\n meaning: 'Admin-edited delta applied on top of plan defaults — survives subscription changes until cleared.',\n whyItMatters: 'Carries “grant/deny and bespoke limits” the billing engine would not infer automatically.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n },\n\n operations: {\n [Op.CREATE]: {\n purpose: 'Repository-only bootstrap of the user feature ledger when a backend workflow first materializes it.',\n outcome: 'The user has a singleton entitlement row to receive plan-derived state and manual overrides.',\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'The singleton user-feature ledger row was materialized for the user.' },\n ],\n // REPOSITORY_ONLY variant (super-admin) — created by backend workflows, not a public HTTP endpoint, so no client-facing 400/403/404 are documented.\n idempotent: false,\n },\n [Op.READ]: {\n purpose: 'Load the effective user feature state for the current org + user context.',\n outcome: 'Clients render gates, admin consoles show truth, and services evaluate entitlements without recomputing from billing alone.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The user feature ledger is returned with its effective features, limits, and manual overrides.' },\n ],\n errorScenarios: [\n // READ is an ORG_MEMBER-scoped API call over the caller's own entitlements; the failure is \"not authenticated\" (401), not a role denial (403).\n { code: HttpResponseStatusCode.UNAUTHORIZED_401, when: 'The request carries no authenticated member session, so the user entitlement context cannot be resolved.' },\n ],\n idempotent: true,\n },\n [Op.SEARCH]: {\n purpose: 'Reserved lightweight listing path — runtime marks search with empty searchable metadata for this resource.',\n outcome: 'Returns paginated rows when a platform adds filters; do not expect rich full-text on this type by default.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of user feature rows; search metadata is intentionally minimal for this resource.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.UNAUTHORIZED_401, when: 'The request carries no authenticated member session for the entitlement search context.' },\n ],\n idempotent: true,\n },\n [Op.UPDATE]: {\n purpose: 'Super-admin override of a user’s feature set or limits (high-trust).',\n outcome: 'Manual grants or revocations apply immediately to authorization and feature gating for that user.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The user’s entitlements were overridden and the updated ledger is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The entitlements payload fails `ScopeFeaturesWithOverridesSchema` validation.', errorCode: 'VALIDATION_FAILED' },\n // UPDATE is an APP_ADMIN_SUPER_ADMIN API call (unlike the ORG_MEMBER reads), so a non-admin caller is forbidden (403).\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an application super-admin; overriding a user’s entitlements is high-trust.' },\n ],\n idempotent: true,\n },\n [Op.DELETE]: {\n purpose: 'Repository-only teardown of the user feature ledger when its owning user is deleted (composition `onParentDelete` cascade).',\n outcome: 'The singleton entitlement row is removed together with the user — the composition part does not outlive its whole.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The user-feature ledger row was deleted as part of the owning user’s deletion cascade.' },\n ],\n // REPOSITORY_ONLY variant (super-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\n businessConstraints: [\n 'The registry anchors `USER_FEATURES` under `USERS` with a one-to-one STANDALONE composition rel — the declared `resourcePrimaryScope` is `USER_SELF` to match the factory’s self-anchor, not a free-floating application catalog record.',\n 'Elements in `features` are entitlement feature ids. Provider-backed runtime needs live in `engineCapabilities`, not in this resource.',\n ],\n }),\n { resourcePrimaryScope: ResourcePrimaryScope.USER_SELF },\n ),\n () => ({\n layout: {\n purpose: 'Present effective entitlements and manual deltas without overwhelming operators with internal billing math.',\n displayPurpose: 'Read-only for members; super-admin update uses the same layout with editable controls in the override section.',\n summaryPurpose: 'Compact chip-style summary of enabled features and limit highlights.',\n sections: {\n overview: {\n purpose: 'Show the net effective `features` and `limits` as the system understands them for this user.',\n whenToUse: 'Default landing area on the feature-entitlement page.',\n textSlots: {\n title: { purpose: 'Label the overview card for feature and limit summary.' },\n description: { purpose: 'Explain that values may combine billing, org policy, and manual overrides.' },\n },\n },\n overrides: {\n purpose: 'Surface `manualOverrides` (added/removed features and per-key limit patches).',\n whenToUse: 'Admin workflows that intentionally deviate a single user from plan defaults.',\n textSlots: {\n title: { purpose: 'Label the manual-override area.' },\n description: { purpose: 'Clarify that these survive billing changes until explicitly removed.' },\n },\n },\n },\n },\n views: {\n [Op.READ]: {\n purpose: 'End-user or member visibility of their effective entitlements in standard app UI.',\n whenToUse: 'Profile/settings surfaces that need honest “what you can use” data.',\n },\n [Op.SEARCH]: {\n purpose: 'Administrative or platform search across user entitlements (when enabled in host apps).',\n whenToUse: 'Rare — prefer user-scoped READ for the common case.',\n },\n [Op.UPDATE]: {\n purpose: 'Super-admin “edit entitlements for this user” path.',\n whenToUse: 'Support, sales-assist, or break-glass grants that cannot wait for a billing plan change.',\n },\n },\n }),\n);\n"]}
1
+ {"version":3,"file":"user-features.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/features/resources/user-features.resource.specification.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EACL,mCAAmC,IAAI,yCAAyC,EAChF,kCAAkC,IAAI,wCAAwC,GAC/E,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAEpE,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,qBAAqB,IAAI,EAAE,EAC3B,oBAAoB,EACpB,gCAAgC,EAChC,uDAAuD,IAAI,mBAAmB,GAC/E,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,sBAAsB,EACtB,mCAAmC,EACnC,6BAA6B,EAC7B,qBAAqB,EACrB,8CAA8C,GAC/C,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAM3E,MAAM,kCAAkC,GAAG,wCAI1C,CAAC;AAEF,MAAM,mCAAmC,GAAG,yCAI3C,CAAC;AAEF,MAAM,CAAC,MAAM,iCAAiC,GAAG,8CAA8C,CAC7F,mCAAmC,C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6J;YAC7J,UAAU,EAAE,IAAI;SACjB;KACF;IAED,mBAAmB,EAAE;QACnB,0OAA0O;QAC1O,uIAAuI;KACxI;CACF,CAAC,EACF,EAAE,oBAAoB,EAAE,oBAAoB,CAAC,SAAS,EAAE,CACzD,EACD,GAAG,EAAE,CAAC,CAAC;IACL,MAAM,EAAE;QACN,OAAO,EAAE,6GAA6G;QACtH,cAAc,EAAE,gHAAgH;QAChI,cAAc,EAAE,sEAAsE;QACtF,QAAQ,EAAE;YACR,QAAQ,EAAE;gBACR,OAAO,EAAE,8FAA8F;gBACvG,SAAS,EAAE,uDAAuD;gBAClE,SAAS,EAAE;oBACT,KAAK,EAAE,EAAE,OAAO,EAAE,wDAAwD,EAAE;oBAC5E,WAAW,EAAE,EAAE,OAAO,EAAE,4EAA4E,EAAE;iBACvG;aACF;YACD,SAAS,EAAE;gBACT,OAAO,EAAE,+EAA+E;gBACxF,SAAS,EAAE,8EAA8E;gBACzF,SAAS,EAAE;oBACT,KAAK,EAAE,EAAE,OAAO,EAAE,iCAAiC,EAAE;oBACrD,WAAW,EAAE,EAAE,OAAO,EAAE,sEAAsE,EAAE;iBACjG;aACF;SACF;KACF;IACD,KAAK,EAAE;QACL,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE;YACT,OAAO,EAAE,mFAAmF;YAC5F,SAAS,EAAE,qEAAqE;SACjF;QACD,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE;YACX,OAAO,EAAE,yFAAyF;YAClG,SAAS,EAAE,qDAAqD;SACjE;QACD,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE;YACX,OAAO,EAAE,qDAAqD;YAC9D,SAAS,EAAE,0FAA0F;SACtG;KACF;CACF,CAAC,CACH,CAAC","sourcesContent":["/**\n * Resource: `userFeatures` — Wildo SaaS engine specification (mixed).\n *\n * Inputs:\n * - Schema: `ScopeFeaturesWithOverridesSchema` in `engine/saas-models/src/features/scope-features.shared.schemas.ts`\n * - Factory: `userFeaturesResourceConfiguration_InitializationFactory` in `user-features.shared.resources-config.schemas.ts`\n * - Custom operations: none (`Record<string, never>`)\n * - Presets: `userFeaturesMainResourceUIBehavior` + `userFeaturesAdminResourceUIBehavior` (identity)\n */\n\nimport {\n userFeaturesAdminResourceUIBehavior as userFeaturesAdminResourceUIBehaviorSource,\n userFeaturesMainResourceUIBehavior as userFeaturesMainResourceUIBehaviorSource,\n} from '@wildo-ai/presets-components';\nimport { LabelAudience } from '@wildo-ai/presets-components-models';\nimport type { ResourceUIBehaviorConfig } from '@wildo-ai/saas-frontend-lib/companion';\nimport {\n CodeDeclarationKind,\n CodeSymbolKind,\n FieldSemanticImportance,\n} from '@wildo-ai/zod-decorators';\nimport {\n CoreResourceOperation as Op,\n ResourcePrimaryScope,\n ScopeFeaturesWithOverridesSchema,\n userFeaturesResourceConfiguration_InitializationFactory as userFeaturesFactory,\n} from '@wildo-ai/saas-models';\nimport {\n HttpResponseStatusCode,\n mergeResourceFrontendConfigurations,\n resourceFrontendConfiguration,\n resourceSpecification,\n resourceSpecificationFromFrontendConfiguration,\n} from '~wildo-specifications/_core';\nimport { EngineResourceSubDomain } from '../../engine-resource-sub-domain';\n\ntype UserFeaturesConfig = ReturnType<typeof userFeaturesFactory>;\ntype UserFeaturesCoreOp = UserFeaturesConfig['coreOperations'][number];\ntype UserFeaturesSchema = UserFeaturesConfig['mainSchema'];\n\nconst userFeaturesMainResourceUIBehavior = userFeaturesMainResourceUIBehaviorSource as ResourceUIBehaviorConfig<\n Record<string, never>,\n UserFeaturesCoreOp,\n UserFeaturesSchema\n>;\n\nconst userFeaturesAdminResourceUIBehavior = userFeaturesAdminResourceUIBehaviorSource as ResourceUIBehaviorConfig<\n Record<string, never>,\n UserFeaturesCoreOp,\n UserFeaturesSchema\n>;\n\nexport const userFeaturesResourceSpecification = resourceSpecificationFromFrontendConfiguration(\n mergeResourceFrontendConfigurations(\n resourceFrontendConfiguration(userFeaturesMainResourceUIBehavior),\n resourceFrontendConfiguration(userFeaturesAdminResourceUIBehavior),\n ),\n resourceSpecification(\n userFeaturesFactory,\n ScopeFeaturesWithOverridesSchema,\n ({ schemaShape }) => ({\n purpose: 'Per-user entitlements: enabled engine features, numeric limits, and admin overrides that survive billing churn.',\n businessRole: 'The user-scoped feature ledger backing progressive rollout, org plans, and manual operator grants in admin UI.',\n lifecycleRole: 'Recomputed as billing, profile, and admin edits land — overrides persist until explicitly cleared or superseded by policy.',\n audience: LabelAudience.ADMIN,\n subDomain: EngineResourceSubDomain.FEATURES,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'ScopeFeaturesWithOverridesSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactory: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'userFeaturesResourceConfiguration_InitializationFactory',\n symbolKind: CodeSymbolKind.FACTORY,\n declarationKind: CodeDeclarationKind.FUNCTION,\n },\n resourceType: {\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceType',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n memberName: 'USER_FEATURES',\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: 'userFeaturesMainResourceUIBehavior',\n symbolKind: CodeSymbolKind.UI_BEHAVIOR,\n },\n {\n packageName: '@wildo-ai/presets-components',\n exportName: 'userFeaturesAdminResourceUIBehavior',\n symbolKind: CodeSymbolKind.UI_BEHAVIOR,\n },\n ],\n notes: [\n 'Runtime has no `userNotifications` / `m2mNotifications` on READ/SEARCH/UPDATE — do not add communications.* (DF-1).',\n ],\n },\n\n fields: {\n features: schemaShape.features.clone().arraySpec({\n meaning: 'Boolean feature switches currently enabled for this user (union of `CoreFeature` and custom entitlement feature keys).',\n whyItMatters: 'Feature gates across the product consult this set when evaluating user-level entitlements.',\n elementMeaning: 'One feature key — an engine feature enum member, a connector capability, or a tenant-specific string key.',\n elementType: {\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreFeature',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n notes: [\n 'Runtime union is `CoreFeature | string`; `EngineCapability` is SaaS/framework activation and is not an entitlement feature id.',\n 'Representative `CoreFeature` members: `CUSTOM_BRANDING` (white-label / themes), `ADVANCED_ANALYTICS`, `SINGLE_SIGN_ON` (IdP + SSO), `AUDIT_LOGS`, `SECURITY_EVENT_EXPORT` (SIEM), `DIRECTORY_PROVISIONING` (SCIM), `M2M_WEBHOOK_DELIVERY`.',\n ],\n },\n }),\n\n limits: schemaShape.limits.clone().objectSpec({\n meaning: 'Numeric caps keyed by feature identifier — `FEATURES_UNLIMITED` convention marks no cap in consuming services.',\n whyItMatters: 'Distinguishes “feature on” from “how much of it” (seats, API units, etc.).',\n }),\n\n manualOverrides: schemaShape.manualOverrides.clone().objectSpec({\n meaning: 'Admin-edited delta applied on top of plan defaults — survives subscription changes until cleared.',\n whyItMatters: 'Carries “grant/deny and bespoke limits” the billing engine would not infer automatically.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n },\n\n operations: {\n [Op.CREATE]: {\n purpose: 'Repository-only bootstrap of the user feature ledger when a backend workflow first materializes it.',\n outcome: 'The user has a singleton entitlement row to receive plan-derived state and manual overrides.',\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'The singleton user-feature ledger row was materialized for the user.' },\n ],\n // REPOSITORY_ONLY variant (super-admin) — created by backend workflows, not a public HTTP endpoint, so no client-facing 400/403/404 are documented.\n idempotent: false,\n },\n [Op.READ]: {\n purpose: 'Load the effective user feature state for the current org + user context.',\n outcome: 'Clients render gates, admin consoles show truth, and services evaluate entitlements without recomputing from billing alone.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The user feature ledger is returned with its effective features, limits, and manual overrides.' },\n ],\n errorScenarios: [\n // READ is an ORG_MEMBER-scoped API call over the caller's own entitlements; the failure is \"not authenticated\" (401), not a role denial (403).\n { code: HttpResponseStatusCode.UNAUTHORIZED_401, when: 'The request carries no authenticated member session, so the user entitlement context cannot be resolved.' },\n ],\n idempotent: true,\n },\n [Op.SEARCH]: {\n purpose: 'Reserved lightweight listing path — runtime marks search with empty searchable metadata for this resource.',\n outcome: 'Returns paginated rows when a platform adds filters; do not expect rich full-text on this type by default.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of user feature rows; search metadata is intentionally minimal for this resource.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.UNAUTHORIZED_401, when: 'The request carries no authenticated member session for the entitlement search context.' },\n ],\n idempotent: true,\n },\n [Op.UPDATE]: {\n purpose: 'Super-admin override of a user’s feature set or limits (high-trust).',\n outcome: 'Manual grants or revocations apply immediately to authorization and feature gating for that user.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The user’s entitlements were overridden and the updated ledger is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The entitlements payload fails `ScopeFeaturesWithOverridesSchema` validation.', errorCode: 'VALIDATION_FAILED' },\n // UPDATE is an APP_ADMIN_SUPER_ADMIN API call (unlike the ORG_MEMBER reads), so a non-admin caller is forbidden (403).\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an application super-admin; overriding a user’s entitlements is high-trust.' },\n ],\n idempotent: true,\n },\n [Op.DELETE]: {\n purpose: 'Repository-only teardown of the user feature ledger when its owning user is deleted (composition `onParentDelete` cascade).',\n outcome: 'The singleton entitlement row is removed together with the user — the composition part does not outlive its whole.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The user-feature ledger row was deleted as part of the owning user’s deletion cascade.' },\n ],\n // REPOSITORY_ONLY variant (super-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\n businessConstraints: [\n 'The registry anchors `USER_FEATURES` under `USERS` with a one-to-one STANDALONE composition rel — the declared `resourcePrimaryScope` is `USER_SELF` to match the factory’s self-anchor, not a free-floating application catalog record.',\n 'Elements in `features` are entitlement feature ids. Provider-backed runtime needs live in `engineCapabilities`, not in this resource.',\n ],\n }),\n { resourcePrimaryScope: ResourcePrimaryScope.USER_SELF },\n ),\n () => ({\n layout: {\n purpose: 'Present effective entitlements and manual deltas without overwhelming operators with internal billing math.',\n displayPurpose: 'Read-only for members; super-admin update uses the same layout with editable controls in the override section.',\n summaryPurpose: 'Compact chip-style summary of enabled features and limit highlights.',\n sections: {\n overview: {\n purpose: 'Show the net effective `features` and `limits` as the system understands them for this user.',\n whenToUse: 'Default landing area on the feature-entitlement page.',\n textSlots: {\n title: { purpose: 'Label the overview card for feature and limit summary.' },\n description: { purpose: 'Explain that values may combine billing, org policy, and manual overrides.' },\n },\n },\n overrides: {\n purpose: 'Surface `manualOverrides` (added/removed features and per-key limit patches).',\n whenToUse: 'Admin workflows that intentionally deviate a single user from plan defaults.',\n textSlots: {\n title: { purpose: 'Label the manual-override area.' },\n description: { purpose: 'Clarify that these survive billing changes until explicitly removed.' },\n },\n },\n },\n },\n views: {\n [Op.READ]: {\n purpose: 'End-user or member visibility of their effective entitlements in standard app UI.',\n whenToUse: 'Profile/settings surfaces that need honest “what you can use” data.',\n },\n [Op.SEARCH]: {\n purpose: 'Administrative or platform search across user entitlements (when enabled in host apps).',\n whenToUse: 'Rare — prefer user-scoped READ for the common case.',\n },\n [Op.UPDATE]: {\n purpose: 'Super-admin “edit entitlements for this user” path.',\n whenToUse: 'Support, sales-assist, or break-glass grants that cannot wait for a billing plan change.',\n },\n },\n }),\n);\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"files.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/files/resources/files.resource.specification.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,EAIL,iBAAiB,EACjB,mBAAmB,EACnB,sBAAsB,EACvB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,qBAAqB,IAAI,EAAE,EAE3B,UAAU,EAEV,oBAAoB,EACrB,MAAM,uBAAuB,CAAC;AAG/B,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCA+WtC,CAAC"}
1
+ {"version":3,"file":"files.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/files/resources/files.resource.specification.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,EAIL,iBAAiB,EACjB,mBAAmB,EACnB,sBAAsB,EACvB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,qBAAqB,IAAI,EAAE,EAE3B,UAAU,EAEV,oBAAoB,EACrB,MAAM,uBAAuB,CAAC;AAI/B,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAgXtC,CAAC"}
@@ -12,11 +12,13 @@ import { LabelAudience } from '@wildo-ai/presets-components-models';
12
12
  import { CodeDeclarationKind, CodeSymbolKind, FieldSemanticImportance, FileDisplayNature, FileStorageAccepted, FileUploaderEntityType, } from '@wildo-ai/zod-decorators';
13
13
  import { CoreResourceOperation as Op, FileSchema, FileStatus, filesResourceConfiguration_InitializationFactory, ResourcePrimaryScope, } from '@wildo-ai/saas-models';
14
14
  import { HttpResponseStatusCode, resourceSpecification } from '../../../_core/index.js';
15
+ import { EngineResourceSubDomain } from '../../engine-resource-sub-domain.js';
15
16
  export const filesResourceSpecification = resourceSpecification(filesResourceConfiguration_InitializationFactory, FileSchema, ({ schemaShape }) => ({
16
17
  purpose: 'Store file metadata (name, MIME, storage pointers, lifecycle, and scope) for assets managed by the platform file service.',
17
18
  businessRole: 'The shared “file row” truth that links uploaded bytes in object storage to domain resources through `linkedResource*` fields.',
18
19
  lifecycleRole: 'Moves from `PENDING` upload through `UPLOADED`, optional AV / extraction states, linking to business records, and eventual `DELETED` / `ORPHANED` cleanup.',
19
20
  audience: LabelAudience.END_USER,
21
+ subDomain: EngineResourceSubDomain.FILES,
20
22
  codeHandling: {
21
23
  mainSchema: {
22
24
  packageName: '@wildo-ai/saas-models',