@wildo-ai/saas-specifications 1.1.3 → 1.1.5

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 (950) hide show
  1. package/dist/assurance/external-framework-mapping.json +1228 -0
  2. package/dist/esm/_core/application-maturity/application-maturity-validation.d.ts +34 -0
  3. package/dist/esm/_core/application-maturity/application-maturity-validation.d.ts.map +1 -0
  4. package/dist/esm/_core/application-maturity/application-maturity-validation.js +66 -0
  5. package/dist/esm/_core/application-maturity/application-maturity-validation.js.map +1 -0
  6. package/dist/esm/_core/application-maturity/application-maturity.family-aspects.d.ts +3 -0
  7. package/dist/esm/_core/application-maturity/application-maturity.family-aspects.d.ts.map +1 -0
  8. package/dist/esm/_core/application-maturity/application-maturity.family-aspects.js +48 -0
  9. package/dist/esm/_core/application-maturity/application-maturity.family-aspects.js.map +1 -0
  10. package/dist/esm/_core/application-maturity/application-maturity.schemas.d.ts +201 -0
  11. package/dist/esm/_core/application-maturity/application-maturity.schemas.d.ts.map +1 -0
  12. package/dist/esm/_core/application-maturity/application-maturity.schemas.js +306 -0
  13. package/dist/esm/_core/application-maturity/application-maturity.schemas.js.map +1 -0
  14. package/dist/esm/_core/application-specification-family-identity.schemas.d.ts +304 -0
  15. package/dist/esm/_core/application-specification-family-identity.schemas.d.ts.map +1 -0
  16. package/dist/esm/_core/application-specification-family-identity.schemas.js +314 -0
  17. package/dist/esm/_core/application-specification-family-identity.schemas.js.map +1 -0
  18. package/dist/esm/_core/assertions/assertion-authored-metadata.schemas.d.ts +2 -1
  19. package/dist/esm/_core/assertions/assertion-authored-metadata.schemas.d.ts.map +1 -1
  20. package/dist/esm/_core/assertions/assertion-authored-metadata.schemas.js +4 -1
  21. package/dist/esm/_core/assertions/assertion-authored-metadata.schemas.js.map +1 -1
  22. package/dist/esm/_core/assertions/assertion-behaviors.schemas.d.ts +4 -4
  23. package/dist/esm/_core/assertions/assertion-specification.schemas.d.ts +5 -4
  24. package/dist/esm/_core/assertions/assertion-specification.schemas.d.ts.map +1 -1
  25. package/dist/esm/_core/assertions/assertion-specification.schemas.js +4 -1
  26. package/dist/esm/_core/assertions/assertion-specification.schemas.js.map +1 -1
  27. package/dist/esm/_core/brand/brand-asset.schemas.d.ts +5 -4
  28. package/dist/esm/_core/brand/brand-asset.schemas.d.ts.map +1 -1
  29. package/dist/esm/_core/brand/brand-asset.schemas.js +7 -4
  30. package/dist/esm/_core/brand/brand-asset.schemas.js.map +1 -1
  31. package/dist/esm/_core/brand/brand-audience.schemas.d.ts +31 -0
  32. package/dist/esm/_core/brand/brand-audience.schemas.d.ts.map +1 -0
  33. package/dist/esm/_core/brand/brand-audience.schemas.js +29 -0
  34. package/dist/esm/_core/brand/brand-audience.schemas.js.map +1 -0
  35. package/dist/esm/_core/brand/brand-authored-metadata.schemas.d.ts +3 -2
  36. package/dist/esm/_core/brand/brand-authored-metadata.schemas.d.ts.map +1 -1
  37. package/dist/esm/_core/brand/brand-authored-metadata.schemas.js +5 -2
  38. package/dist/esm/_core/brand/brand-authored-metadata.schemas.js.map +1 -1
  39. package/dist/esm/_core/brand/brand-generation.schemas.d.ts +4 -4
  40. package/dist/esm/_core/brand/brand-logo-direction.schemas.d.ts +12 -9
  41. package/dist/esm/_core/brand/brand-logo-direction.schemas.d.ts.map +1 -1
  42. package/dist/esm/_core/brand/brand-logo-direction.schemas.js +12 -7
  43. package/dist/esm/_core/brand/brand-logo-direction.schemas.js.map +1 -1
  44. package/dist/esm/_core/brand/brand-name.schemas.d.ts +2 -2
  45. package/dist/esm/_core/brand/brand-snapshot-validation.d.ts.map +1 -1
  46. package/dist/esm/_core/brand/brand-snapshot-validation.js +1 -8
  47. package/dist/esm/_core/brand/brand-snapshot-validation.js.map +1 -1
  48. package/dist/esm/_core/brand/brand-snapshot.schemas.d.ts +23 -12
  49. package/dist/esm/_core/brand/brand-snapshot.schemas.d.ts.map +1 -1
  50. package/dist/esm/_core/brand/brand-snapshot.schemas.js +7 -0
  51. package/dist/esm/_core/brand/brand-snapshot.schemas.js.map +1 -1
  52. package/dist/esm/_core/brand/brand-visual-tone.schemas.d.ts +2 -2
  53. package/dist/esm/_core/brand/brand.family-aspects.d.ts.map +1 -1
  54. package/dist/esm/_core/brand/brand.family-aspects.js +12 -1
  55. package/dist/esm/_core/brand/brand.family-aspects.js.map +1 -1
  56. package/dist/esm/_core/build-plan/build-plan-task-graph-generation.schemas.d.ts +252 -2
  57. package/dist/esm/_core/build-plan/build-plan-task-graph-generation.schemas.d.ts.map +1 -1
  58. package/dist/esm/_core/build-plan/build-plan-task-graph-generation.schemas.js +19 -1
  59. package/dist/esm/_core/build-plan/build-plan-task-graph-generation.schemas.js.map +1 -1
  60. package/dist/esm/_core/build-plan/build-plan-task-graph-validation.d.ts +121 -1
  61. package/dist/esm/_core/build-plan/build-plan-task-graph-validation.d.ts.map +1 -1
  62. package/dist/esm/_core/build-plan/build-plan-task-graph-validation.js +215 -2
  63. package/dist/esm/_core/build-plan/build-plan-task-graph-validation.js.map +1 -1
  64. package/dist/esm/_core/build-plan/build-plan-task-graph.schemas.d.ts +703 -14
  65. package/dist/esm/_core/build-plan/build-plan-task-graph.schemas.d.ts.map +1 -1
  66. package/dist/esm/_core/build-plan/build-plan-task-graph.schemas.js +536 -7
  67. package/dist/esm/_core/build-plan/build-plan-task-graph.schemas.js.map +1 -1
  68. package/dist/esm/_core/build-plan/build-plan.family-aspects.d.ts.map +1 -1
  69. package/dist/esm/_core/build-plan/build-plan.family-aspects.js +82 -2
  70. package/dist/esm/_core/build-plan/build-plan.family-aspects.js.map +1 -1
  71. package/dist/esm/_core/business-model-lite/business-model-authored-metadata.schemas.d.ts +3 -2
  72. package/dist/esm/_core/business-model-lite/business-model-authored-metadata.schemas.d.ts.map +1 -1
  73. package/dist/esm/_core/business-model-lite/business-model-authored-metadata.schemas.js +5 -2
  74. package/dist/esm/_core/business-model-lite/business-model-authored-metadata.schemas.js.map +1 -1
  75. package/dist/esm/_core/business-model-lite/business-model-lite-snapshot.schemas.d.ts +3 -3
  76. package/dist/esm/_core/business-model-lite/business-model.family-aspects.js +1 -1
  77. package/dist/esm/_core/business-model-lite/business-model.family-aspects.js.map +1 -1
  78. package/dist/esm/_core/business-model-lite/pricing-plan.schemas.d.ts +4 -3
  79. package/dist/esm/_core/business-model-lite/pricing-plan.schemas.d.ts.map +1 -1
  80. package/dist/esm/_core/business-model-lite/pricing-plan.schemas.js +4 -1
  81. package/dist/esm/_core/business-model-lite/pricing-plan.schemas.js.map +1 -1
  82. package/dist/esm/_core/business-semantics.specifications.schemas.d.ts +36 -0
  83. package/dist/esm/_core/business-semantics.specifications.schemas.d.ts.map +1 -1
  84. package/dist/esm/_core/business-semantics.specifications.schemas.js +52 -1
  85. package/dist/esm/_core/business-semantics.specifications.schemas.js.map +1 -1
  86. package/dist/esm/_core/capability-composition/capability-composition-validation.d.ts +22 -0
  87. package/dist/esm/_core/capability-composition/capability-composition-validation.d.ts.map +1 -0
  88. package/dist/esm/_core/capability-composition/capability-composition-validation.js +89 -0
  89. package/dist/esm/_core/capability-composition/capability-composition-validation.js.map +1 -0
  90. package/dist/esm/_core/capability-composition/capability-composition.family-aspects.d.ts +3 -0
  91. package/dist/esm/_core/capability-composition/capability-composition.family-aspects.d.ts.map +1 -0
  92. package/dist/esm/_core/capability-composition/capability-composition.family-aspects.js +26 -0
  93. package/dist/esm/_core/capability-composition/capability-composition.family-aspects.js.map +1 -0
  94. package/dist/esm/_core/capability-composition/capability-composition.schemas.d.ts +141 -0
  95. package/dist/esm/_core/capability-composition/capability-composition.schemas.d.ts.map +1 -0
  96. package/dist/esm/_core/capability-composition/capability-composition.schemas.js +147 -0
  97. package/dist/esm/_core/capability-composition/capability-composition.schemas.js.map +1 -0
  98. package/dist/esm/_core/compliance-documents/compliance-document-candidate-generation.schemas.d.ts +160 -0
  99. package/dist/esm/_core/compliance-documents/compliance-document-candidate-generation.schemas.d.ts.map +1 -1
  100. package/dist/esm/_core/compliance-documents/compliance-document-candidate-generation.schemas.js +124 -4
  101. package/dist/esm/_core/compliance-documents/compliance-document-candidate-generation.schemas.js.map +1 -1
  102. package/dist/esm/_core/compliance-documents/compliance-document-candidate-set.schemas.d.ts +95 -0
  103. package/dist/esm/_core/compliance-documents/compliance-document-candidate-set.schemas.d.ts.map +1 -0
  104. package/dist/esm/_core/compliance-documents/compliance-document-candidate-set.schemas.js +85 -0
  105. package/dist/esm/_core/compliance-documents/compliance-document-candidate-set.schemas.js.map +1 -0
  106. package/dist/esm/_core/compliance-documents/compliance-document-candidate.schemas.d.ts +743 -14
  107. package/dist/esm/_core/compliance-documents/compliance-document-candidate.schemas.d.ts.map +1 -1
  108. package/dist/esm/_core/compliance-documents/compliance-document-candidate.schemas.js +699 -22
  109. package/dist/esm/_core/compliance-documents/compliance-document-candidate.schemas.js.map +1 -1
  110. package/dist/esm/_core/compliance-documents/compliance-documents.family-aspects.d.ts +98 -6
  111. package/dist/esm/_core/compliance-documents/compliance-documents.family-aspects.d.ts.map +1 -1
  112. package/dist/esm/_core/compliance-documents/compliance-documents.family-aspects.js +197 -8
  113. package/dist/esm/_core/compliance-documents/compliance-documents.family-aspects.js.map +1 -1
  114. package/dist/esm/_core/compliance-documents/computed-document-facts.schemas.d.ts +64 -0
  115. package/dist/esm/_core/compliance-documents/computed-document-facts.schemas.d.ts.map +1 -0
  116. package/dist/esm/_core/compliance-documents/computed-document-facts.schemas.js +283 -0
  117. package/dist/esm/_core/compliance-documents/computed-document-facts.schemas.js.map +1 -0
  118. package/dist/esm/_core/compliance-documents/document-fact-specification-generation.schemas.d.ts.map +1 -1
  119. package/dist/esm/_core/compliance-documents/document-fact-specification-generation.schemas.js +30 -1
  120. package/dist/esm/_core/compliance-documents/document-fact-specification-generation.schemas.js.map +1 -1
  121. package/dist/esm/_core/compliance-documents/processor-register.family-aspects.js +1 -1
  122. package/dist/esm/_core/compliance-documents/processor-register.family-aspects.js.map +1 -1
  123. package/dist/esm/_core/compliance-documents/processor-register.schemas.d.ts +220 -4
  124. package/dist/esm/_core/compliance-documents/processor-register.schemas.d.ts.map +1 -1
  125. package/dist/esm/_core/compliance-documents/processor-register.schemas.js +149 -2
  126. package/dist/esm/_core/compliance-documents/processor-register.schemas.js.map +1 -1
  127. package/dist/esm/_core/compliance-documents/required-document-set.schemas.d.ts +70 -3
  128. package/dist/esm/_core/compliance-documents/required-document-set.schemas.d.ts.map +1 -1
  129. package/dist/esm/_core/compliance-documents/required-document-set.schemas.js +75 -3
  130. package/dist/esm/_core/compliance-documents/required-document-set.schemas.js.map +1 -1
  131. package/dist/esm/_core/composite-view-specification.schemas.d.ts +14 -0
  132. package/dist/esm/_core/composite-view-specification.schemas.d.ts.map +1 -1
  133. package/dist/esm/_core/composite-view-specification.schemas.js +13 -0
  134. package/dist/esm/_core/composite-view-specification.schemas.js.map +1 -1
  135. package/dist/esm/_core/cross-registry-assertions.d.ts +6 -4
  136. package/dist/esm/_core/cross-registry-assertions.d.ts.map +1 -1
  137. package/dist/esm/_core/cross-registry-assertions.js +7 -5
  138. package/dist/esm/_core/cross-registry-assertions.js.map +1 -1
  139. package/dist/esm/_core/domain-plan/domain-plan-output-set.schemas.d.ts +5 -4
  140. package/dist/esm/_core/domain-plan/domain-plan-output-set.schemas.d.ts.map +1 -1
  141. package/dist/esm/_core/domain-plan/domain-plan-output-set.schemas.js +5 -2
  142. package/dist/esm/_core/domain-plan/domain-plan-output-set.schemas.js.map +1 -1
  143. package/dist/esm/_core/domain-plan/domain-plan.family-aspects.d.ts +30 -0
  144. package/dist/esm/_core/domain-plan/domain-plan.family-aspects.d.ts.map +1 -1
  145. package/dist/esm/_core/domain-plan/domain-plan.family-aspects.js +99 -6
  146. package/dist/esm/_core/domain-plan/domain-plan.family-aspects.js.map +1 -1
  147. package/dist/esm/_core/experience-plan/experience-plan-generation.schemas.d.ts +58 -0
  148. package/dist/esm/_core/experience-plan/experience-plan-generation.schemas.d.ts.map +1 -0
  149. package/dist/esm/_core/experience-plan/experience-plan-generation.schemas.js +71 -0
  150. package/dist/esm/_core/experience-plan/experience-plan-generation.schemas.js.map +1 -0
  151. package/dist/esm/_core/experience-plan/experience-plan-validation.d.ts +37 -0
  152. package/dist/esm/_core/experience-plan/experience-plan-validation.d.ts.map +1 -0
  153. package/dist/esm/_core/experience-plan/experience-plan-validation.js +83 -0
  154. package/dist/esm/_core/experience-plan/experience-plan-validation.js.map +1 -0
  155. package/dist/esm/_core/experience-plan/experience-plan.family-aspects.d.ts +3 -0
  156. package/dist/esm/_core/experience-plan/experience-plan.family-aspects.d.ts.map +1 -0
  157. package/dist/esm/_core/experience-plan/experience-plan.family-aspects.js +78 -0
  158. package/dist/esm/_core/experience-plan/experience-plan.family-aspects.js.map +1 -0
  159. package/dist/esm/_core/experience-plan/experience-plan.schemas.d.ts +285 -0
  160. package/dist/esm/_core/experience-plan/experience-plan.schemas.d.ts.map +1 -0
  161. package/dist/esm/_core/experience-plan/experience-plan.schemas.js +293 -0
  162. package/dist/esm/_core/experience-plan/experience-plan.schemas.js.map +1 -0
  163. package/dist/esm/_core/expert-personas/expert-persona-authored-metadata.schemas.d.ts +3 -2
  164. package/dist/esm/_core/expert-personas/expert-persona-authored-metadata.schemas.d.ts.map +1 -1
  165. package/dist/esm/_core/expert-personas/expert-persona-authored-metadata.schemas.js +5 -2
  166. package/dist/esm/_core/expert-personas/expert-persona-authored-metadata.schemas.js.map +1 -1
  167. package/dist/esm/_core/expert-personas/expert-persona-charter.schemas.d.ts +9 -2
  168. package/dist/esm/_core/expert-personas/expert-persona-charter.schemas.d.ts.map +1 -1
  169. package/dist/esm/_core/expert-personas/expert-persona-charter.schemas.js +7 -0
  170. package/dist/esm/_core/expert-personas/expert-persona-charter.schemas.js.map +1 -1
  171. package/dist/esm/_core/expert-personas/expert-personas.family-aspects.d.ts +18 -0
  172. package/dist/esm/_core/expert-personas/expert-personas.family-aspects.d.ts.map +1 -0
  173. package/dist/esm/_core/expert-personas/expert-personas.family-aspects.js +21 -0
  174. package/dist/esm/_core/expert-personas/expert-personas.family-aspects.js.map +1 -0
  175. package/dist/esm/_core/expert-personas/expert-role-template.schemas.d.ts +19 -0
  176. package/dist/esm/_core/expert-personas/expert-role-template.schemas.d.ts.map +1 -1
  177. package/dist/esm/_core/expert-personas/expert-role-template.schemas.js +23 -0
  178. package/dist/esm/_core/expert-personas/expert-role-template.schemas.js.map +1 -1
  179. package/dist/esm/_core/family-aspects.registry.d.ts.map +1 -1
  180. package/dist/esm/_core/family-aspects.registry.js +22 -1
  181. package/dist/esm/_core/family-aspects.registry.js.map +1 -1
  182. package/dist/esm/_core/family-aspects.schemas.d.ts +64 -1
  183. package/dist/esm/_core/family-aspects.schemas.d.ts.map +1 -1
  184. package/dist/esm/_core/family-aspects.schemas.js.map +1 -1
  185. package/dist/esm/_core/feature-drafts/capability-map-output-set-generation.schemas.d.ts +27 -27
  186. package/dist/esm/_core/feature-drafts/capability-map-output-set.schemas.d.ts +59 -59
  187. package/dist/esm/_core/feature-drafts/feature-drafts.family-aspects.js +1 -1
  188. package/dist/esm/_core/feature-drafts/feature-drafts.family-aspects.js.map +1 -1
  189. package/dist/esm/_core/feature-drafts/feature-specification-drafts.schemas.d.ts.map +1 -1
  190. package/dist/esm/_core/feature-drafts/feature-specification-drafts.schemas.js +6 -1
  191. package/dist/esm/_core/feature-drafts/feature-specification-drafts.schemas.js.map +1 -1
  192. package/dist/esm/_core/guidance-flow-specification.schemas.d.ts +11 -15
  193. package/dist/esm/_core/guidance-flow-specification.schemas.d.ts.map +1 -1
  194. package/dist/esm/_core/guidance-flow-specification.schemas.js +12 -11
  195. package/dist/esm/_core/guidance-flow-specification.schemas.js.map +1 -1
  196. package/dist/esm/_core/index.d.ts +16 -0
  197. package/dist/esm/_core/index.d.ts.map +1 -1
  198. package/dist/esm/_core/index.js +16 -0
  199. package/dist/esm/_core/index.js.map +1 -1
  200. package/dist/esm/_core/integration-plan/integration-plan-generation.schemas.d.ts +52 -0
  201. package/dist/esm/_core/integration-plan/integration-plan-generation.schemas.d.ts.map +1 -0
  202. package/dist/esm/_core/integration-plan/integration-plan-generation.schemas.js +50 -0
  203. package/dist/esm/_core/integration-plan/integration-plan-generation.schemas.js.map +1 -0
  204. package/dist/esm/_core/integration-plan/integration-plan-validation.d.ts +27 -0
  205. package/dist/esm/_core/integration-plan/integration-plan-validation.d.ts.map +1 -0
  206. package/dist/esm/_core/integration-plan/integration-plan-validation.js +63 -0
  207. package/dist/esm/_core/integration-plan/integration-plan-validation.js.map +1 -0
  208. package/dist/esm/_core/integration-plan/integration-plan.family-aspects.d.ts +3 -0
  209. package/dist/esm/_core/integration-plan/integration-plan.family-aspects.d.ts.map +1 -0
  210. package/dist/esm/_core/integration-plan/integration-plan.family-aspects.js +52 -0
  211. package/dist/esm/_core/integration-plan/integration-plan.family-aspects.js.map +1 -0
  212. package/dist/esm/_core/integration-plan/integration-plan.schemas.d.ts +168 -0
  213. package/dist/esm/_core/integration-plan/integration-plan.schemas.d.ts.map +1 -0
  214. package/dist/esm/_core/integration-plan/integration-plan.schemas.js +170 -0
  215. package/dist/esm/_core/integration-plan/integration-plan.schemas.js.map +1 -0
  216. package/dist/esm/_core/market/feature-benefit.schemas.d.ts +6 -5
  217. package/dist/esm/_core/market/feature-benefit.schemas.d.ts.map +1 -1
  218. package/dist/esm/_core/market/feature-benefit.schemas.js +5 -2
  219. package/dist/esm/_core/market/feature-benefit.schemas.js.map +1 -1
  220. package/dist/esm/_core/market/market-alternative.schemas.d.ts +4 -3
  221. package/dist/esm/_core/market/market-alternative.schemas.d.ts.map +1 -1
  222. package/dist/esm/_core/market/market-alternative.schemas.js +4 -1
  223. package/dist/esm/_core/market/market-alternative.schemas.js.map +1 -1
  224. package/dist/esm/_core/market/market-authored-metadata.schemas.d.ts +11 -9
  225. package/dist/esm/_core/market/market-authored-metadata.schemas.d.ts.map +1 -1
  226. package/dist/esm/_core/market/market-authored-metadata.schemas.js +13 -10
  227. package/dist/esm/_core/market/market-authored-metadata.schemas.js.map +1 -1
  228. package/dist/esm/_core/market/market-buying-journey.schemas.d.ts +5 -4
  229. package/dist/esm/_core/market/market-buying-journey.schemas.d.ts.map +1 -1
  230. package/dist/esm/_core/market/market-buying-journey.schemas.js +4 -1
  231. package/dist/esm/_core/market/market-buying-journey.schemas.js.map +1 -1
  232. package/dist/esm/_core/market/market-category.schemas.d.ts +2 -2
  233. package/dist/esm/_core/market/market-channel.schemas.d.ts +6 -5
  234. package/dist/esm/_core/market/market-channel.schemas.d.ts.map +1 -1
  235. package/dist/esm/_core/market/market-channel.schemas.js +6 -3
  236. package/dist/esm/_core/market/market-channel.schemas.js.map +1 -1
  237. package/dist/esm/_core/market/market-gain.schemas.d.ts +4 -3
  238. package/dist/esm/_core/market/market-gain.schemas.d.ts.map +1 -1
  239. package/dist/esm/_core/market/market-gain.schemas.js +4 -1
  240. package/dist/esm/_core/market/market-gain.schemas.js.map +1 -1
  241. package/dist/esm/_core/market/market-icp.schemas.d.ts +12 -11
  242. package/dist/esm/_core/market/market-icp.schemas.d.ts.map +1 -1
  243. package/dist/esm/_core/market/market-icp.schemas.js +12 -9
  244. package/dist/esm/_core/market/market-icp.schemas.js.map +1 -1
  245. package/dist/esm/_core/market/market-job.schemas.d.ts +4 -3
  246. package/dist/esm/_core/market/market-job.schemas.d.ts.map +1 -1
  247. package/dist/esm/_core/market/market-job.schemas.js +4 -1
  248. package/dist/esm/_core/market/market-job.schemas.js.map +1 -1
  249. package/dist/esm/_core/market/market-message-template.schemas.d.ts +5 -4
  250. package/dist/esm/_core/market/market-message-template.schemas.d.ts.map +1 -1
  251. package/dist/esm/_core/market/market-message-template.schemas.js +5 -2
  252. package/dist/esm/_core/market/market-message-template.schemas.js.map +1 -1
  253. package/dist/esm/_core/market/market-objection.schemas.d.ts +4 -3
  254. package/dist/esm/_core/market/market-objection.schemas.d.ts.map +1 -1
  255. package/dist/esm/_core/market/market-objection.schemas.js +4 -1
  256. package/dist/esm/_core/market/market-objection.schemas.js.map +1 -1
  257. package/dist/esm/_core/market/market-pain.schemas.d.ts +4 -3
  258. package/dist/esm/_core/market/market-pain.schemas.d.ts.map +1 -1
  259. package/dist/esm/_core/market/market-pain.schemas.js +4 -1
  260. package/dist/esm/_core/market/market-pain.schemas.js.map +1 -1
  261. package/dist/esm/_core/market/market-persona.schemas.d.ts +5 -4
  262. package/dist/esm/_core/market/market-persona.schemas.d.ts.map +1 -1
  263. package/dist/esm/_core/market/market-persona.schemas.js +5 -2
  264. package/dist/esm/_core/market/market-persona.schemas.js.map +1 -1
  265. package/dist/esm/_core/market/market-positioning.schemas.d.ts +2 -2
  266. package/dist/esm/_core/market/market-proof.schemas.d.ts +4 -3
  267. package/dist/esm/_core/market/market-proof.schemas.d.ts.map +1 -1
  268. package/dist/esm/_core/market/market-proof.schemas.js +4 -1
  269. package/dist/esm/_core/market/market-proof.schemas.js.map +1 -1
  270. package/dist/esm/_core/market/market-snapshot-generation.schemas.d.ts +54 -54
  271. package/dist/esm/_core/market/market-snapshot.schemas.d.ts +59 -59
  272. package/dist/esm/_core/market/market-tone-of-voice.schemas.d.ts +4 -3
  273. package/dist/esm/_core/market/market-tone-of-voice.schemas.d.ts.map +1 -1
  274. package/dist/esm/_core/market/market-tone-of-voice.schemas.js +4 -1
  275. package/dist/esm/_core/market/market-tone-of-voice.schemas.js.map +1 -1
  276. package/dist/esm/_core/market/market-trigger.schemas.d.ts +4 -3
  277. package/dist/esm/_core/market/market-trigger.schemas.d.ts.map +1 -1
  278. package/dist/esm/_core/market/market-trigger.schemas.js +4 -1
  279. package/dist/esm/_core/market/market-trigger.schemas.js.map +1 -1
  280. package/dist/esm/_core/market/market.family-aspects.d.ts.map +1 -1
  281. package/dist/esm/_core/market/market.family-aspects.js +25 -1
  282. package/dist/esm/_core/market/market.family-aspects.js.map +1 -1
  283. package/dist/esm/_core/onboarding-view-specification.schemas.d.ts +27 -22
  284. package/dist/esm/_core/onboarding-view-specification.schemas.d.ts.map +1 -1
  285. package/dist/esm/_core/onboarding-view-specification.schemas.js +7 -12
  286. package/dist/esm/_core/onboarding-view-specification.schemas.js.map +1 -1
  287. package/dist/esm/_core/placement-plan/placement-plan-generation.schemas.d.ts +21 -21
  288. package/dist/esm/_core/placement-plan/placement-plan-validation.d.ts +30 -16
  289. package/dist/esm/_core/placement-plan/placement-plan-validation.d.ts.map +1 -1
  290. package/dist/esm/_core/placement-plan/placement-plan-validation.js +34 -12
  291. package/dist/esm/_core/placement-plan/placement-plan-validation.js.map +1 -1
  292. package/dist/esm/_core/placement-plan/placement-plan.family-aspects.d.ts.map +1 -1
  293. package/dist/esm/_core/placement-plan/placement-plan.family-aspects.js +24 -1
  294. package/dist/esm/_core/placement-plan/placement-plan.family-aspects.js.map +1 -1
  295. package/dist/esm/_core/placement-plan/placement-plan.schemas.d.ts +78 -47
  296. package/dist/esm/_core/placement-plan/placement-plan.schemas.d.ts.map +1 -1
  297. package/dist/esm/_core/placement-plan/placement-plan.schemas.js +62 -24
  298. package/dist/esm/_core/placement-plan/placement-plan.schemas.js.map +1 -1
  299. package/dist/esm/_core/provider-specification.schemas.d.ts +19 -0
  300. package/dist/esm/_core/provider-specification.schemas.d.ts.map +1 -1
  301. package/dist/esm/_core/provider-specification.schemas.js +0 -20
  302. package/dist/esm/_core/provider-specification.schemas.js.map +1 -1
  303. package/dist/esm/_core/requirements/functional-requirement.schemas.d.ts +2 -2
  304. package/dist/esm/_core/requirements/non-functional-requirement.schemas.d.ts +2 -2
  305. package/dist/esm/_core/requirements/requirements-authored-metadata.schemas.d.ts +3 -2
  306. package/dist/esm/_core/requirements/requirements-authored-metadata.schemas.d.ts.map +1 -1
  307. package/dist/esm/_core/requirements/requirements-authored-metadata.schemas.js +5 -2
  308. package/dist/esm/_core/requirements/requirements-authored-metadata.schemas.js.map +1 -1
  309. package/dist/esm/_core/requirements/requirements-snapshot.schemas.d.ts +4 -4
  310. package/dist/esm/_core/requirements/requirements.family-aspects.d.ts.map +1 -1
  311. package/dist/esm/_core/requirements/requirements.family-aspects.js +3 -1
  312. package/dist/esm/_core/requirements/requirements.family-aspects.js.map +1 -1
  313. package/dist/esm/_core/resource-specification.schemas.d.ts +8 -0
  314. package/dist/esm/_core/resource-specification.schemas.d.ts.map +1 -1
  315. package/dist/esm/_core/resource-specification.schemas.js.map +1 -1
  316. package/dist/esm/_core/roadmap/roadmap-authored-metadata.schemas.d.ts +3 -2
  317. package/dist/esm/_core/roadmap/roadmap-authored-metadata.schemas.d.ts.map +1 -1
  318. package/dist/esm/_core/roadmap/roadmap-authored-metadata.schemas.js +5 -2
  319. package/dist/esm/_core/roadmap/roadmap-authored-metadata.schemas.js.map +1 -1
  320. package/dist/esm/_core/roadmap/roadmap-phase.schemas.d.ts +2 -2
  321. package/dist/esm/_core/roadmap/roadmap-snapshot-validation.d.ts +5 -0
  322. package/dist/esm/_core/roadmap/roadmap-snapshot-validation.d.ts.map +1 -1
  323. package/dist/esm/_core/roadmap/roadmap-snapshot-validation.js +1 -8
  324. package/dist/esm/_core/roadmap/roadmap-snapshot-validation.js.map +1 -1
  325. package/dist/esm/_core/roadmap/roadmap-snapshot.schemas.d.ts +2 -2
  326. package/dist/esm/_core/roadmap/roadmap.family-aspects.js +1 -1
  327. package/dist/esm/_core/roadmap/roadmap.family-aspects.js.map +1 -1
  328. package/dist/esm/_core/utils/extract-field-specs.d.ts.map +1 -1
  329. package/dist/esm/_core/utils/extract-field-specs.js +4 -2
  330. package/dist/esm/_core/utils/extract-field-specs.js.map +1 -1
  331. package/dist/esm/_core/vision/vision-authored-metadata.schemas.d.ts +3 -2
  332. package/dist/esm/_core/vision/vision-authored-metadata.schemas.d.ts.map +1 -1
  333. package/dist/esm/_core/vision/vision-authored-metadata.schemas.js +5 -2
  334. package/dist/esm/_core/vision/vision-authored-metadata.schemas.js.map +1 -1
  335. package/dist/esm/_core/vision/vision-constraint.schemas.d.ts +2 -2
  336. package/dist/esm/_core/vision/vision-idea.schemas.d.ts +2 -2
  337. package/dist/esm/_core/vision/vision-mission.schemas.d.ts +2 -2
  338. package/dist/esm/_core/vision/vision-problem.schemas.d.ts +2 -2
  339. package/dist/esm/_core/vision/vision-snapshot.schemas.d.ts +10 -10
  340. package/dist/esm/_core/vision/vision-success-criterion.schemas.d.ts +2 -2
  341. package/dist/esm/_core/vision/vision.family-aspects.js +1 -1
  342. package/dist/esm/_core/vision/vision.family-aspects.js.map +1 -1
  343. package/dist/esm/_core/website-plan/website-plan-generation.schemas.d.ts +45 -0
  344. package/dist/esm/_core/website-plan/website-plan-generation.schemas.d.ts.map +1 -0
  345. package/dist/esm/_core/website-plan/website-plan-generation.schemas.js +55 -0
  346. package/dist/esm/_core/website-plan/website-plan-generation.schemas.js.map +1 -0
  347. package/dist/esm/_core/website-plan/website-plan-validation.d.ts +37 -0
  348. package/dist/esm/_core/website-plan/website-plan-validation.d.ts.map +1 -0
  349. package/dist/esm/_core/website-plan/website-plan-validation.js +77 -0
  350. package/dist/esm/_core/website-plan/website-plan-validation.js.map +1 -0
  351. package/dist/esm/_core/website-plan/website-plan.family-aspects.d.ts +3 -0
  352. package/dist/esm/_core/website-plan/website-plan.family-aspects.d.ts.map +1 -0
  353. package/dist/esm/_core/website-plan/website-plan.family-aspects.js +35 -0
  354. package/dist/esm/_core/website-plan/website-plan.family-aspects.js.map +1 -0
  355. package/dist/esm/_core/website-plan/website-plan.schemas.d.ts +194 -0
  356. package/dist/esm/_core/website-plan/website-plan.schemas.d.ts.map +1 -0
  357. package/dist/esm/_core/website-plan/website-plan.schemas.js +193 -0
  358. package/dist/esm/_core/website-plan/website-plan.schemas.js.map +1 -0
  359. package/dist/esm/_core/zod-core-nameability.d.ts +47 -0
  360. package/dist/esm/_core/zod-core-nameability.d.ts.map +1 -0
  361. package/dist/esm/_core/zod-core-nameability.js +1 -0
  362. package/dist/esm/_core/zod-core-nameability.js.map +1 -0
  363. package/dist/esm/application-creation/application-creator-inputs.application-creation.schemas.d.ts +86 -0
  364. package/dist/esm/application-creation/application-creator-inputs.application-creation.schemas.d.ts.map +1 -0
  365. package/dist/esm/application-creation/application-creator-inputs.application-creation.schemas.js +96 -0
  366. package/dist/esm/application-creation/application-creator-inputs.application-creation.schemas.js.map +1 -0
  367. package/dist/esm/application-creation/application-document-fact-specification.application-creation.schemas.d.ts +139 -34
  368. package/dist/esm/application-creation/application-document-fact-specification.application-creation.schemas.d.ts.map +1 -1
  369. package/dist/esm/application-creation/application-document-fact-specification.application-creation.schemas.js +182 -11
  370. package/dist/esm/application-creation/application-document-fact-specification.application-creation.schemas.js.map +1 -1
  371. package/dist/esm/application-creation/application-document-release-policy-specification.application-creation.schemas.d.ts +71 -2
  372. package/dist/esm/application-creation/application-document-release-policy-specification.application-creation.schemas.d.ts.map +1 -1
  373. package/dist/esm/application-creation/application-document-release-policy-specification.application-creation.schemas.js +88 -1
  374. package/dist/esm/application-creation/application-document-release-policy-specification.application-creation.schemas.js.map +1 -1
  375. package/dist/esm/application-creation/creator-inputs.family-aspects.d.ts +14 -0
  376. package/dist/esm/application-creation/creator-inputs.family-aspects.d.ts.map +1 -0
  377. package/dist/esm/application-creation/creator-inputs.family-aspects.js +17 -0
  378. package/dist/esm/application-creation/creator-inputs.family-aspects.js.map +1 -0
  379. package/dist/esm/application-creation/document-facts.family-aspects.d.ts.map +1 -1
  380. package/dist/esm/application-creation/document-facts.family-aspects.js +25 -1
  381. package/dist/esm/application-creation/document-facts.family-aspects.js.map +1 -1
  382. package/dist/esm/application-creation/document-release-policy.family-aspects.js +1 -1
  383. package/dist/esm/application-creation/document-release-policy.family-aspects.js.map +1 -1
  384. package/dist/esm/application-creation/journey.application-creation.schemas.d.ts +14 -48
  385. package/dist/esm/application-creation/journey.application-creation.schemas.d.ts.map +1 -1
  386. package/dist/esm/application-creation/journey.application-creation.schemas.js +52 -52
  387. package/dist/esm/application-creation/journey.application-creation.schemas.js.map +1 -1
  388. package/dist/esm/application-creation/playbooks.application-creation.schemas.d.ts +209 -495
  389. package/dist/esm/application-creation/playbooks.application-creation.schemas.d.ts.map +1 -1
  390. package/dist/esm/application-creation/playbooks.application-creation.schemas.js +257 -534
  391. package/dist/esm/application-creation/playbooks.application-creation.schemas.js.map +1 -1
  392. package/dist/esm/application-creation/structured-artifact-landing.application-creation.schemas.d.ts +10 -0
  393. package/dist/esm/application-creation/structured-artifact-landing.application-creation.schemas.d.ts.map +1 -1
  394. package/dist/esm/application-creation/structured-artifact-landing.application-creation.schemas.js +10 -0
  395. package/dist/esm/application-creation/structured-artifact-landing.application-creation.schemas.js.map +1 -1
  396. package/dist/esm/application-creation.exports.d.ts +73 -8
  397. package/dist/esm/application-creation.exports.d.ts.map +1 -1
  398. package/dist/esm/application-creation.exports.js +103 -8
  399. package/dist/esm/application-creation.exports.js.map +1 -1
  400. package/dist/esm/assurance/__tests__/authority-evaluation-instant.fixture.d.ts +24 -0
  401. package/dist/esm/assurance/__tests__/authority-evaluation-instant.fixture.d.ts.map +1 -0
  402. package/dist/esm/assurance/__tests__/authority-evaluation-instant.fixture.js +24 -0
  403. package/dist/esm/assurance/__tests__/authority-evaluation-instant.fixture.js.map +1 -0
  404. package/dist/esm/assurance/application-document-publication.schemas.d.ts +49 -0
  405. package/dist/esm/assurance/application-document-publication.schemas.d.ts.map +1 -1
  406. package/dist/esm/assurance/application-document-publication.schemas.js +51 -0
  407. package/dist/esm/assurance/application-document-publication.schemas.js.map +1 -1
  408. package/dist/esm/assurance/application-document-release-set.schemas.d.ts +161 -0
  409. package/dist/esm/assurance/application-document-release-set.schemas.d.ts.map +1 -0
  410. package/dist/esm/assurance/application-document-release-set.schemas.js +138 -0
  411. package/dist/esm/assurance/application-document-release-set.schemas.js.map +1 -0
  412. package/dist/esm/assurance/application-risk-register.family-aspects.d.ts +28 -0
  413. package/dist/esm/assurance/application-risk-register.family-aspects.d.ts.map +1 -0
  414. package/dist/esm/assurance/application-risk-register.family-aspects.js +58 -0
  415. package/dist/esm/assurance/application-risk-register.family-aspects.js.map +1 -0
  416. package/dist/esm/assurance/application-risk-register.schemas.d.ts +172 -0
  417. package/dist/esm/assurance/application-risk-register.schemas.d.ts.map +1 -0
  418. package/dist/esm/assurance/application-risk-register.schemas.js +192 -0
  419. package/dist/esm/assurance/application-risk-register.schemas.js.map +1 -0
  420. package/dist/esm/assurance/application-risk-signals.derivations.d.ts +177 -0
  421. package/dist/esm/assurance/application-risk-signals.derivations.d.ts.map +1 -0
  422. package/dist/esm/assurance/application-risk-signals.derivations.js +229 -0
  423. package/dist/esm/assurance/application-risk-signals.derivations.js.map +1 -0
  424. package/dist/esm/assurance/assurance-authority-basis.definitions.d.ts +257 -13
  425. package/dist/esm/assurance/assurance-authority-basis.definitions.d.ts.map +1 -1
  426. package/dist/esm/assurance/assurance-authority-basis.definitions.js +836 -69
  427. package/dist/esm/assurance/assurance-authority-basis.definitions.js.map +1 -1
  428. package/dist/esm/assurance/assurance-authority-basis.schemas.d.ts +99 -33
  429. package/dist/esm/assurance/assurance-authority-basis.schemas.d.ts.map +1 -1
  430. package/dist/esm/assurance/assurance-authority-basis.schemas.js +38 -1
  431. package/dist/esm/assurance/assurance-authority-basis.schemas.js.map +1 -1
  432. package/dist/esm/assurance/assurance-document-blueprint-selection.d.ts +30 -0
  433. package/dist/esm/assurance/assurance-document-blueprint-selection.d.ts.map +1 -1
  434. package/dist/esm/assurance/assurance-document-blueprint-selection.js +40 -0
  435. package/dist/esm/assurance/assurance-document-blueprint-selection.js.map +1 -1
  436. package/dist/esm/assurance/assurance-document-system.definitions.d.ts.map +1 -1
  437. package/dist/esm/assurance/assurance-document-system.definitions.js +99 -8
  438. package/dist/esm/assurance/assurance-document-system.definitions.js.map +1 -1
  439. package/dist/esm/assurance/assurance-document-system.schemas.d.ts +133 -41
  440. package/dist/esm/assurance/assurance-document-system.schemas.d.ts.map +1 -1
  441. package/dist/esm/assurance/assurance-document-system.schemas.js +60 -11
  442. package/dist/esm/assurance/assurance-document-system.schemas.js.map +1 -1
  443. package/dist/esm/assurance/assurance-evidence-judgement.schemas.d.ts +470 -0
  444. package/dist/esm/assurance/assurance-evidence-judgement.schemas.d.ts.map +1 -0
  445. package/dist/esm/assurance/assurance-evidence-judgement.schemas.js +451 -0
  446. package/dist/esm/assurance/assurance-evidence-judgement.schemas.js.map +1 -0
  447. package/dist/esm/assurance/assurance-evidence-requirement-bodies.definitions.d.ts +0 -33
  448. package/dist/esm/assurance/assurance-evidence-requirement-bodies.definitions.d.ts.map +1 -1
  449. package/dist/esm/assurance/assurance-evidence-requirement-bodies.definitions.js +3339 -159
  450. package/dist/esm/assurance/assurance-evidence-requirement-bodies.definitions.js.map +1 -1
  451. package/dist/esm/assurance/assurance-foundation.schemas.d.ts +21 -0
  452. package/dist/esm/assurance/assurance-foundation.schemas.d.ts.map +1 -1
  453. package/dist/esm/assurance/assurance-foundation.schemas.js +21 -0
  454. package/dist/esm/assurance/assurance-foundation.schemas.js.map +1 -1
  455. package/dist/esm/assurance/assurance-objective-catalog.definitions.d.ts +32 -2
  456. package/dist/esm/assurance/assurance-objective-catalog.definitions.d.ts.map +1 -1
  457. package/dist/esm/assurance/assurance-objective-catalog.definitions.js +148 -5
  458. package/dist/esm/assurance/assurance-objective-catalog.definitions.js.map +1 -1
  459. package/dist/esm/assurance/assurance-program-generation.schemas.d.ts +257 -14
  460. package/dist/esm/assurance/assurance-program-generation.schemas.d.ts.map +1 -1
  461. package/dist/esm/assurance/assurance-program-generation.schemas.js +588 -45
  462. package/dist/esm/assurance/assurance-program-generation.schemas.js.map +1 -1
  463. package/dist/esm/assurance/assurance-program.family-aspects.d.ts +32 -8
  464. package/dist/esm/assurance/assurance-program.family-aspects.d.ts.map +1 -1
  465. package/dist/esm/assurance/assurance-program.family-aspects.js +288 -10
  466. package/dist/esm/assurance/assurance-program.family-aspects.js.map +1 -1
  467. package/dist/esm/assurance/assurance-program.schemas.d.ts +1182 -333
  468. package/dist/esm/assurance/assurance-program.schemas.d.ts.map +1 -1
  469. package/dist/esm/assurance/assurance-program.schemas.js +460 -68
  470. package/dist/esm/assurance/assurance-program.schemas.js.map +1 -1
  471. package/dist/esm/assurance/assurance-source-registry.definitions.d.ts.map +1 -1
  472. package/dist/esm/assurance/assurance-source-registry.definitions.js +70 -2
  473. package/dist/esm/assurance/assurance-source-registry.definitions.js.map +1 -1
  474. package/dist/esm/assurance/assurance-sources.schemas.d.ts +17 -0
  475. package/dist/esm/assurance/assurance-sources.schemas.d.ts.map +1 -1
  476. package/dist/esm/assurance/assurance-sources.schemas.js +17 -0
  477. package/dist/esm/assurance/assurance-sources.schemas.js.map +1 -1
  478. package/dist/esm/assurance/assurance-verification-requirement-bodies.definitions.d.ts.map +1 -1
  479. package/dist/esm/assurance/assurance-verification-requirement-bodies.definitions.js +205 -3
  480. package/dist/esm/assurance/assurance-verification-requirement-bodies.definitions.js.map +1 -1
  481. package/dist/esm/assurance/document-publication.family-aspects.js +1 -1
  482. package/dist/esm/assurance/document-publication.family-aspects.js.map +1 -1
  483. package/dist/esm/assurance/document-release-set.family-aspects.d.ts +11 -0
  484. package/dist/esm/assurance/document-release-set.family-aspects.d.ts.map +1 -0
  485. package/dist/esm/assurance/document-release-set.family-aspects.js +36 -0
  486. package/dist/esm/assurance/document-release-set.family-aspects.js.map +1 -0
  487. package/dist/esm/assurance/governed-document-release.d.ts +211 -0
  488. package/dist/esm/assurance/governed-document-release.d.ts.map +1 -0
  489. package/dist/esm/assurance/governed-document-release.js +314 -0
  490. package/dist/esm/assurance/governed-document-release.js.map +1 -0
  491. package/dist/esm/assurance.exports.d.ts +5 -0
  492. package/dist/esm/assurance.exports.d.ts.map +1 -1
  493. package/dist/esm/assurance.exports.js +5 -0
  494. package/dist/esm/assurance.exports.js.map +1 -1
  495. package/dist/esm/companion-exports.d.ts +135 -11
  496. package/dist/esm/companion-exports.d.ts.map +1 -1
  497. package/dist/esm/companion-exports.js.map +1 -1
  498. package/dist/esm/engine/_bootstrap.d.ts +1 -1
  499. package/dist/esm/engine/_bootstrap.js +1 -1
  500. package/dist/esm/engine/_bootstrap.js.map +1 -1
  501. package/dist/esm/engine/applications/resources/application-metadata.resource.specification.d.ts +1 -1
  502. package/dist/esm/engine/applications/resources/application-metadata.resource.specification.js +1 -1
  503. package/dist/esm/engine/applications/resources/application-metadata.resource.specification.js.map +1 -1
  504. package/dist/esm/engine/applications/resources/application-oauth-clients.resource.specification.d.ts +0 -23
  505. package/dist/esm/engine/applications/resources/application-oauth-clients.resource.specification.d.ts.map +1 -1
  506. package/dist/esm/engine/applications/resources/application-oauth-clients.resource.specification.js +110 -28
  507. package/dist/esm/engine/applications/resources/application-oauth-clients.resource.specification.js.map +1 -1
  508. package/dist/esm/engine/applications/resources/application-versions.resource.specification.d.ts +1 -1
  509. package/dist/esm/engine/applications/resources/application-versions.resource.specification.js +1 -1
  510. package/dist/esm/engine/applications/resources/application-versions.resource.specification.js.map +1 -1
  511. package/dist/esm/engine/applications/resources/applications.resource.specification.d.ts +1 -0
  512. package/dist/esm/engine/applications/resources/applications.resource.specification.d.ts.map +1 -1
  513. package/dist/esm/engine/auth/resources/application-access-grants.resource.specification.d.ts +57 -0
  514. package/dist/esm/engine/auth/resources/application-access-grants.resource.specification.d.ts.map +1 -0
  515. package/dist/esm/engine/auth/resources/application-access-grants.resource.specification.js +412 -0
  516. package/dist/esm/engine/auth/resources/application-access-grants.resource.specification.js.map +1 -0
  517. package/dist/esm/engine/auth/resources/index.d.ts +2 -0
  518. package/dist/esm/engine/auth/resources/index.d.ts.map +1 -1
  519. package/dist/esm/engine/auth/resources/index.js +2 -0
  520. package/dist/esm/engine/auth/resources/index.js.map +1 -1
  521. package/dist/esm/engine/auth/resources/organization-oauth-clients.resource.specification.d.ts +4 -4
  522. package/dist/esm/engine/auth/resources/organization-oauth-clients.resource.specification.d.ts.map +1 -1
  523. package/dist/esm/engine/auth/resources/organization-oauth-clients.resource.specification.js +57 -6
  524. package/dist/esm/engine/auth/resources/organization-oauth-clients.resource.specification.js.map +1 -1
  525. package/dist/esm/engine/auth/resources/organization-onboarding-operations.resource.specification.d.ts +9 -0
  526. package/dist/esm/engine/auth/resources/organization-onboarding-operations.resource.specification.d.ts.map +1 -0
  527. package/dist/esm/engine/auth/resources/organization-onboarding-operations.resource.specification.js +141 -0
  528. package/dist/esm/engine/auth/resources/organization-onboarding-operations.resource.specification.js.map +1 -0
  529. package/dist/esm/engine/auth/resources/organization-provider-credentials.resource.specification.d.ts +4 -1
  530. package/dist/esm/engine/auth/resources/organization-provider-credentials.resource.specification.d.ts.map +1 -1
  531. package/dist/esm/engine/auth/resources/organization-provider-credentials.resource.specification.js +10 -6
  532. package/dist/esm/engine/auth/resources/organization-provider-credentials.resource.specification.js.map +1 -1
  533. package/dist/esm/engine/auth/resources/scim-provisioning-config.resource.specification.d.ts.map +1 -1
  534. package/dist/esm/engine/auth/resources/scim-provisioning-config.resource.specification.js +5 -4
  535. package/dist/esm/engine/auth/resources/scim-provisioning-config.resource.specification.js.map +1 -1
  536. package/dist/esm/engine/auth/resources/siem-delivery-outbox.resource.specification.d.ts +4 -0
  537. package/dist/esm/engine/auth/resources/siem-delivery-outbox.resource.specification.d.ts.map +1 -0
  538. package/dist/esm/engine/auth/resources/siem-delivery-outbox.resource.specification.js +129 -0
  539. package/dist/esm/engine/auth/resources/siem-delivery-outbox.resource.specification.js.map +1 -0
  540. package/dist/esm/engine/auth/resources/siem-export-config.resource.specification.d.ts +19 -7
  541. package/dist/esm/engine/auth/resources/siem-export-config.resource.specification.d.ts.map +1 -1
  542. package/dist/esm/engine/auth/resources/siem-export-config.resource.specification.js +24 -13
  543. package/dist/esm/engine/auth/resources/siem-export-config.resource.specification.js.map +1 -1
  544. package/dist/esm/engine/auth/resources/sso-config.resource.specification.d.ts +0 -40
  545. package/dist/esm/engine/auth/resources/sso-config.resource.specification.d.ts.map +1 -1
  546. package/dist/esm/engine/auth/resources/sso-config.resource.specification.js +14 -27
  547. package/dist/esm/engine/auth/resources/sso-config.resource.specification.js.map +1 -1
  548. package/dist/esm/engine/auth/resources/sso-connections.resource.specification.d.ts +8 -2
  549. package/dist/esm/engine/auth/resources/sso-connections.resource.specification.d.ts.map +1 -1
  550. package/dist/esm/engine/auth/resources/sso-connections.resource.specification.js +16 -3
  551. package/dist/esm/engine/auth/resources/sso-connections.resource.specification.js.map +1 -1
  552. package/dist/esm/engine/auth/resources/user-provider-credentials.resource.specification.d.ts +5 -2
  553. package/dist/esm/engine/auth/resources/user-provider-credentials.resource.specification.d.ts.map +1 -1
  554. package/dist/esm/engine/auth/resources/user-provider-credentials.resource.specification.js +10 -16
  555. package/dist/esm/engine/auth/resources/user-provider-credentials.resource.specification.js.map +1 -1
  556. package/dist/esm/engine/billing/resources/billing-accounts.resource.specification.d.ts.map +1 -1
  557. package/dist/esm/engine/billing/resources/billing-accounts.resource.specification.js +15 -5
  558. package/dist/esm/engine/billing/resources/billing-accounts.resource.specification.js.map +1 -1
  559. package/dist/esm/engine/billing/resources/billing-effect-outbox.resource.specification.d.ts +9 -0
  560. package/dist/esm/engine/billing/resources/billing-effect-outbox.resource.specification.d.ts.map +1 -0
  561. package/dist/esm/engine/billing/resources/billing-effect-outbox.resource.specification.js +164 -0
  562. package/dist/esm/engine/billing/resources/billing-effect-outbox.resource.specification.js.map +1 -0
  563. package/dist/esm/engine/billing/resources/billing-provider-event-settlements.resource.specification.d.ts +14 -0
  564. package/dist/esm/engine/billing/resources/billing-provider-event-settlements.resource.specification.d.ts.map +1 -0
  565. package/dist/esm/engine/billing/resources/billing-provider-event-settlements.resource.specification.js +124 -0
  566. package/dist/esm/engine/billing/resources/billing-provider-event-settlements.resource.specification.js.map +1 -0
  567. package/dist/esm/engine/billing/resources/billing-subscription-mutation-completions.resource.specification.d.ts +9 -0
  568. package/dist/esm/engine/billing/resources/billing-subscription-mutation-completions.resource.specification.d.ts.map +1 -0
  569. package/dist/esm/engine/billing/resources/billing-subscription-mutation-completions.resource.specification.js +123 -0
  570. package/dist/esm/engine/billing/resources/billing-subscription-mutation-completions.resource.specification.js.map +1 -0
  571. package/dist/esm/engine/billing/resources/billing-subscription-mutation-intents.resource.specification.d.ts +11 -0
  572. package/dist/esm/engine/billing/resources/billing-subscription-mutation-intents.resource.specification.d.ts.map +1 -0
  573. package/dist/esm/engine/billing/resources/billing-subscription-mutation-intents.resource.specification.js +172 -0
  574. package/dist/esm/engine/billing/resources/billing-subscription-mutation-intents.resource.specification.js.map +1 -0
  575. package/dist/esm/engine/billing/resources/index.d.ts +4 -0
  576. package/dist/esm/engine/billing/resources/index.d.ts.map +1 -1
  577. package/dist/esm/engine/billing/resources/index.js +4 -0
  578. package/dist/esm/engine/billing/resources/index.js.map +1 -1
  579. package/dist/esm/engine/billing/resources/prices.resource.specification.d.ts +3 -3
  580. package/dist/esm/engine/billing/resources/products.resource.specification.d.ts +3 -3
  581. package/dist/esm/engine/billing/resources/products.resource.specification.js +1 -1
  582. package/dist/esm/engine/billing/resources/products.resource.specification.js.map +1 -1
  583. package/dist/esm/engine/billing/resources/subscriptions.resource.specification.d.ts.map +1 -1
  584. package/dist/esm/engine/billing/resources/subscriptions.resource.specification.js +92 -36
  585. package/dist/esm/engine/billing/resources/subscriptions.resource.specification.js.map +1 -1
  586. package/dist/esm/engine/compliance/resources/application-audit-logs.resource.specification.d.ts +77 -0
  587. package/dist/esm/engine/compliance/resources/application-audit-logs.resource.specification.d.ts.map +1 -0
  588. package/dist/esm/engine/compliance/resources/application-audit-logs.resource.specification.js +375 -0
  589. package/dist/esm/engine/compliance/resources/application-audit-logs.resource.specification.js.map +1 -0
  590. package/dist/esm/engine/compliance/resources/audit-logs.resource.specification.d.ts +1 -1
  591. package/dist/esm/engine/compliance/resources/index.d.ts +2 -0
  592. package/dist/esm/engine/compliance/resources/index.d.ts.map +1 -1
  593. package/dist/esm/engine/compliance/resources/index.js +2 -0
  594. package/dist/esm/engine/compliance/resources/index.js.map +1 -1
  595. package/dist/esm/engine/compliance/resources/user-governed-document-acceptances.resource.specification.d.ts +16 -0
  596. package/dist/esm/engine/compliance/resources/user-governed-document-acceptances.resource.specification.d.ts.map +1 -0
  597. package/dist/esm/engine/compliance/resources/user-governed-document-acceptances.resource.specification.js +183 -0
  598. package/dist/esm/engine/compliance/resources/user-governed-document-acceptances.resource.specification.js.map +1 -0
  599. package/dist/esm/engine/engine-resource-specifications.registry.d.ts.map +1 -1
  600. package/dist/esm/engine/engine-resource-specifications.registry.js +28 -0
  601. package/dist/esm/engine/engine-resource-specifications.registry.js.map +1 -1
  602. package/dist/esm/engine/errors/error-messages.specification.d.ts.map +1 -1
  603. package/dist/esm/engine/errors/error-messages.specification.js +123 -19
  604. package/dist/esm/engine/errors/error-messages.specification.js.map +1 -1
  605. package/dist/esm/engine/features/resources/application-features.resource.specification.d.ts.map +1 -1
  606. package/dist/esm/engine/features/resources/application-features.resource.specification.js +2 -1
  607. package/dist/esm/engine/features/resources/application-features.resource.specification.js.map +1 -1
  608. package/dist/esm/engine/features/resources/organization-features.resource.specification.d.ts.map +1 -1
  609. package/dist/esm/engine/features/resources/organization-features.resource.specification.js +1 -0
  610. package/dist/esm/engine/features/resources/organization-features.resource.specification.js.map +1 -1
  611. package/dist/esm/engine/features/resources/user-features.resource.specification.d.ts +1 -1
  612. package/dist/esm/engine/features/resources/user-features.resource.specification.d.ts.map +1 -1
  613. package/dist/esm/engine/features/resources/user-features.resource.specification.js +4 -1
  614. package/dist/esm/engine/features/resources/user-features.resource.specification.js.map +1 -1
  615. package/dist/esm/engine/files/resources/files.resource.specification.d.ts.map +1 -1
  616. package/dist/esm/engine/files/resources/files.resource.specification.js +15 -3
  617. package/dist/esm/engine/files/resources/files.resource.specification.js.map +1 -1
  618. package/dist/esm/engine/flows-actors/resources/flow-actor-executions.resource.specification.d.ts +3 -0
  619. package/dist/esm/engine/flows-actors/resources/flow-actor-executions.resource.specification.d.ts.map +1 -1
  620. package/dist/esm/engine/flows-actors/resources/flow-actor-executions.resource.specification.js +1 -1
  621. package/dist/esm/engine/flows-actors/resources/flow-actor-executions.resource.specification.js.map +1 -1
  622. package/dist/esm/engine/flows-actors/resources/flow-actor-tasks.resource.specification.d.ts +3 -3
  623. package/dist/esm/engine/flows-actors/resources/provider-call-records.resource.specification.d.ts +14 -0
  624. package/dist/esm/engine/flows-actors/resources/provider-call-records.resource.specification.d.ts.map +1 -0
  625. package/dist/esm/engine/flows-actors/resources/provider-call-records.resource.specification.js +184 -0
  626. package/dist/esm/engine/flows-actors/resources/provider-call-records.resource.specification.js.map +1 -0
  627. package/dist/esm/engine/frontend-components/actions/button-group-separator.frontend-component.specification.js +3 -3
  628. package/dist/esm/engine/frontend-components/actions/button-group-separator.frontend-component.specification.js.map +1 -1
  629. package/dist/esm/engine/frontend-components/actions/button-group.frontend-component.specification.d.ts.map +1 -1
  630. package/dist/esm/engine/frontend-components/actions/button-group.frontend-component.specification.js +3 -2
  631. package/dist/esm/engine/frontend-components/actions/button-group.frontend-component.specification.js.map +1 -1
  632. package/dist/esm/engine/frontend-components/actions/button.frontend-component.specification.d.ts.map +1 -1
  633. package/dist/esm/engine/frontend-components/actions/button.frontend-component.specification.js +18 -0
  634. package/dist/esm/engine/frontend-components/actions/button.frontend-component.specification.js.map +1 -1
  635. package/dist/esm/engine/frontend-components/ai-elements/artifacts/ai-diff-block.frontend-component.specification.d.ts +4 -0
  636. package/dist/esm/engine/frontend-components/ai-elements/artifacts/ai-diff-block.frontend-component.specification.d.ts.map +1 -0
  637. package/dist/esm/engine/frontend-components/ai-elements/artifacts/ai-diff-block.frontend-component.specification.js +21 -0
  638. package/dist/esm/engine/frontend-components/ai-elements/artifacts/ai-diff-block.frontend-component.specification.js.map +1 -0
  639. package/dist/esm/engine/frontend-components/ai-elements/trace/ai-chain-of-thought.frontend-component.specification.js +1 -1
  640. package/dist/esm/engine/frontend-components/ai-elements/trace/ai-chain-of-thought.frontend-component.specification.js.map +1 -1
  641. package/dist/esm/engine/frontend-components/app/app-layout-billing-settings.frontend-component.specification.d.ts +5 -0
  642. package/dist/esm/engine/frontend-components/app/app-layout-billing-settings.frontend-component.specification.d.ts.map +1 -0
  643. package/dist/esm/engine/frontend-components/app/app-layout-billing-settings.frontend-component.specification.js +82 -0
  644. package/dist/esm/engine/frontend-components/app/app-layout-billing-settings.frontend-component.specification.js.map +1 -0
  645. package/dist/esm/engine/frontend-components/app/app-layout-connected-accounts-settings.frontend-component.specification.d.ts.map +1 -1
  646. package/dist/esm/engine/frontend-components/app/app-layout-connected-accounts-settings.frontend-component.specification.js +6 -5
  647. package/dist/esm/engine/frontend-components/app/app-layout-connected-accounts-settings.frontend-component.specification.js.map +1 -1
  648. package/dist/esm/engine/frontend-components/app/app-layout-consent-gate.frontend-component.specification.d.ts +4 -0
  649. package/dist/esm/engine/frontend-components/app/app-layout-consent-gate.frontend-component.specification.d.ts.map +1 -0
  650. package/dist/esm/engine/frontend-components/app/app-layout-consent-gate.frontend-component.specification.js +22 -0
  651. package/dist/esm/engine/frontend-components/app/app-layout-consent-gate.frontend-component.specification.js.map +1 -0
  652. package/dist/esm/engine/frontend-components/app/app-layout-document-acceptance-gate.frontend-component.specification.d.ts +4 -0
  653. package/dist/esm/engine/frontend-components/app/app-layout-document-acceptance-gate.frontend-component.specification.d.ts.map +1 -0
  654. package/dist/esm/engine/frontend-components/app/app-layout-document-acceptance-gate.frontend-component.specification.js +22 -0
  655. package/dist/esm/engine/frontend-components/app/app-layout-document-acceptance-gate.frontend-component.specification.js.map +1 -0
  656. package/dist/esm/engine/frontend-components/app/app-layout-surface-error-boundary.frontend-component.specification.d.ts +5 -0
  657. package/dist/esm/engine/frontend-components/app/app-layout-surface-error-boundary.frontend-component.specification.d.ts.map +1 -0
  658. package/dist/esm/engine/frontend-components/app/app-layout-surface-error-boundary.frontend-component.specification.js +81 -0
  659. package/dist/esm/engine/frontend-components/app/app-layout-surface-error-boundary.frontend-component.specification.js.map +1 -0
  660. package/dist/esm/engine/frontend-components/app/public-layout-main-container.frontend-component.specification.d.ts.map +1 -1
  661. package/dist/esm/engine/frontend-components/app/public-layout-main-container.frontend-component.specification.js +4 -2
  662. package/dist/esm/engine/frontend-components/app/public-layout-main-container.frontend-component.specification.js.map +1 -1
  663. package/dist/esm/engine/frontend-components/app/public-layout-terms.frontend-component.specification.js +4 -4
  664. package/dist/esm/engine/frontend-components/app/public-layout-terms.frontend-component.specification.js.map +1 -1
  665. package/dist/esm/engine/frontend-components/auth/public-layout-auth-callback.frontend-component.specification.d.ts.map +1 -1
  666. package/dist/esm/engine/frontend-components/auth/public-layout-auth-callback.frontend-component.specification.js +3 -2
  667. package/dist/esm/engine/frontend-components/auth/public-layout-auth-callback.frontend-component.specification.js.map +1 -1
  668. package/dist/esm/engine/frontend-components/auth/public-layout-enrollment-required.frontend-component.specification.js +4 -4
  669. package/dist/esm/engine/frontend-components/auth/public-layout-enrollment-required.frontend-component.specification.js.map +1 -1
  670. package/dist/esm/engine/frontend-components/auth/public-layout-magic-link-verify.frontend-component.specification.js +1 -1
  671. package/dist/esm/engine/frontend-components/auth/public-layout-magic-link-verify.frontend-component.specification.js.map +1 -1
  672. package/dist/esm/engine/frontend-components/auth/public-layout-organization-onboarding.frontend-component.specification.d.ts +4 -0
  673. package/dist/esm/engine/frontend-components/auth/public-layout-organization-onboarding.frontend-component.specification.d.ts.map +1 -0
  674. package/dist/esm/engine/frontend-components/auth/public-layout-organization-onboarding.frontend-component.specification.js +22 -0
  675. package/dist/esm/engine/frontend-components/auth/public-layout-organization-onboarding.frontend-component.specification.js.map +1 -0
  676. package/dist/esm/engine/frontend-components/auth/public-layout-user-auth.frontend-component.specification.js +1 -1
  677. package/dist/esm/engine/frontend-components/auth/public-layout-user-auth.frontend-component.specification.js.map +1 -1
  678. package/dist/esm/engine/frontend-components/auth/public-layout-user-register.frontend-component.specification.d.ts.map +1 -1
  679. package/dist/esm/engine/frontend-components/auth/public-layout-user-register.frontend-component.specification.js +4 -4
  680. package/dist/esm/engine/frontend-components/auth/public-layout-user-register.frontend-component.specification.js.map +1 -1
  681. package/dist/esm/engine/frontend-components/billing/billing-invoice-history.frontend-component.specification.js +1 -1
  682. package/dist/esm/engine/frontend-components/billing/billing-invoice-history.frontend-component.specification.js.map +1 -1
  683. package/dist/esm/engine/frontend-components/billing/billing-plan-change-preview.frontend-component.specification.d.ts +4 -0
  684. package/dist/esm/engine/frontend-components/billing/billing-plan-change-preview.frontend-component.specification.d.ts.map +1 -0
  685. package/dist/esm/engine/frontend-components/billing/billing-plan-change-preview.frontend-component.specification.js +21 -0
  686. package/dist/esm/engine/frontend-components/billing/billing-plan-change-preview.frontend-component.specification.js.map +1 -0
  687. package/dist/esm/engine/frontend-components/billing/billing-portal-link.frontend-component.specification.js +1 -1
  688. package/dist/esm/engine/frontend-components/billing/billing-portal-link.frontend-component.specification.js.map +1 -1
  689. package/dist/esm/engine/frontend-components/billing/billing-pricing-table.frontend-component.specification.js +2 -2
  690. package/dist/esm/engine/frontend-components/billing/billing-pricing-table.frontend-component.specification.js.map +1 -1
  691. package/dist/esm/engine/frontend-components/billing/billing-subscription-status.frontend-component.specification.js +1 -1
  692. package/dist/esm/engine/frontend-components/billing/billing-subscription-status.frontend-component.specification.js.map +1 -1
  693. package/dist/esm/engine/frontend-components/billing/billing-usage-dashboard.frontend-component.specification.js +1 -1
  694. package/dist/esm/engine/frontend-components/billing/billing-usage-dashboard.frontend-component.specification.js.map +1 -1
  695. package/dist/esm/engine/frontend-components/data-display/description-list.frontend-component.specification.d.ts.map +1 -1
  696. package/dist/esm/engine/frontend-components/data-display/description-list.frontend-component.specification.js +20 -2
  697. package/dist/esm/engine/frontend-components/data-display/description-list.frontend-component.specification.js.map +1 -1
  698. package/dist/esm/engine/frontend-components/data-display/duration.frontend-component.specification.d.ts +5 -0
  699. package/dist/esm/engine/frontend-components/data-display/duration.frontend-component.specification.d.ts.map +1 -0
  700. package/dist/esm/engine/frontend-components/data-display/duration.frontend-component.specification.js +177 -0
  701. package/dist/esm/engine/frontend-components/data-display/duration.frontend-component.specification.js.map +1 -0
  702. package/dist/esm/engine/frontend-components/data-display/formatters/display-field-address.frontend-component.specification.d.ts +5 -0
  703. package/dist/esm/engine/frontend-components/data-display/formatters/display-field-address.frontend-component.specification.d.ts.map +1 -0
  704. package/dist/esm/engine/frontend-components/data-display/formatters/display-field-address.frontend-component.specification.js +22 -0
  705. package/dist/esm/engine/frontend-components/data-display/formatters/display-field-address.frontend-component.specification.js.map +1 -0
  706. package/dist/esm/engine/frontend-components/data-display/formatters/display-field-file-document.frontend-component.specification.d.ts.map +1 -1
  707. package/dist/esm/engine/frontend-components/data-display/formatters/display-field-file-document.frontend-component.specification.js +10 -2
  708. package/dist/esm/engine/frontend-components/data-display/formatters/display-field-file-document.frontend-component.specification.js.map +1 -1
  709. package/dist/esm/engine/frontend-components/data-display/identifier.frontend-component.specification.d.ts +5 -0
  710. package/dist/esm/engine/frontend-components/data-display/identifier.frontend-component.specification.d.ts.map +1 -0
  711. package/dist/esm/engine/frontend-components/data-display/identifier.frontend-component.specification.js +166 -0
  712. package/dist/esm/engine/frontend-components/data-display/identifier.frontend-component.specification.js.map +1 -0
  713. package/dist/esm/engine/frontend-components/data-display/kbd.frontend-component.specification.d.ts +5 -0
  714. package/dist/esm/engine/frontend-components/data-display/kbd.frontend-component.specification.d.ts.map +1 -0
  715. package/dist/esm/engine/frontend-components/data-display/kbd.frontend-component.specification.js +122 -0
  716. package/dist/esm/engine/frontend-components/data-display/kbd.frontend-component.specification.js.map +1 -0
  717. package/dist/esm/engine/frontend-components/data-display/timeline.frontend-component.specification.d.ts +5 -0
  718. package/dist/esm/engine/frontend-components/data-display/timeline.frontend-component.specification.d.ts.map +1 -0
  719. package/dist/esm/engine/frontend-components/data-display/timeline.frontend-component.specification.js +152 -0
  720. package/dist/esm/engine/frontend-components/data-display/timeline.frontend-component.specification.js.map +1 -0
  721. package/dist/esm/engine/frontend-components/feedback/celebration-overlay.frontend-component.specification.d.ts.map +1 -1
  722. package/dist/esm/engine/frontend-components/feedback/celebration-overlay.frontend-component.specification.js +13 -0
  723. package/dist/esm/engine/frontend-components/feedback/celebration-overlay.frontend-component.specification.js.map +1 -1
  724. package/dist/esm/engine/frontend-components/flows-actors/low-level-ai-approval.frontend-component.specification.js +1 -1
  725. package/dist/esm/engine/frontend-components/flows-actors/low-level-ai-approval.frontend-component.specification.js.map +1 -1
  726. package/dist/esm/engine/frontend-components/form/controls/string/inline-edit-text.frontend-component.specification.d.ts +5 -0
  727. package/dist/esm/engine/frontend-components/form/controls/string/inline-edit-text.frontend-component.specification.d.ts.map +1 -0
  728. package/dist/esm/engine/frontend-components/form/controls/string/inline-edit-text.frontend-component.specification.js +92 -0
  729. package/dist/esm/engine/frontend-components/form/controls/string/inline-edit-text.frontend-component.specification.js.map +1 -0
  730. package/dist/esm/engine/frontend-components/form/fields/form-field-address.frontend-component.specification.d.ts +5 -0
  731. package/dist/esm/engine/frontend-components/form/fields/form-field-address.frontend-component.specification.d.ts.map +1 -0
  732. package/dist/esm/engine/frontend-components/form/fields/form-field-address.frontend-component.specification.js +29 -0
  733. package/dist/esm/engine/frontend-components/form/fields/form-field-address.frontend-component.specification.js.map +1 -0
  734. package/dist/esm/engine/frontend-components/form/fields/form-field-enum.frontend-component.specification.js +1 -1
  735. package/dist/esm/engine/frontend-components/form/fields/form-field-enum.frontend-component.specification.js.map +1 -1
  736. package/dist/esm/engine/frontend-components/form/fields/form-field-file.frontend-component.specification.js +1 -1
  737. package/dist/esm/engine/frontend-components/form/fields/form-field-file.frontend-component.specification.js.map +1 -1
  738. package/dist/esm/engine/frontend-components/index.d.ts +12 -0
  739. package/dist/esm/engine/frontend-components/index.d.ts.map +1 -1
  740. package/dist/esm/engine/frontend-components/index.js +40 -0
  741. package/dist/esm/engine/frontend-components/index.js.map +1 -1
  742. package/dist/esm/engine/frontend-components/internal/_tier2-virtual-slot-spec.factory.d.ts +25 -1
  743. package/dist/esm/engine/frontend-components/internal/_tier2-virtual-slot-spec.factory.d.ts.map +1 -1
  744. package/dist/esm/engine/frontend-components/internal/_tier2-virtual-slot-spec.factory.js +16 -2
  745. package/dist/esm/engine/frontend-components/internal/_tier2-virtual-slot-spec.factory.js.map +1 -1
  746. package/dist/esm/engine/frontend-components/navigation/app-level/navigation-back.frontend-component.specification.js +1 -1
  747. package/dist/esm/engine/frontend-components/navigation/app-level/navigation-back.frontend-component.specification.js.map +1 -1
  748. package/dist/esm/engine/frontend-components/progression/progression-milestone-tracker.frontend-component.specification.d.ts +9 -0
  749. package/dist/esm/engine/frontend-components/progression/progression-milestone-tracker.frontend-component.specification.d.ts.map +1 -1
  750. package/dist/esm/engine/frontend-components/progression/progression-milestone-tracker.frontend-component.specification.js +91 -7
  751. package/dist/esm/engine/frontend-components/progression/progression-milestone-tracker.frontend-component.specification.js.map +1 -1
  752. package/dist/esm/engine/frontend-components/sections/accordion.frontend-component.specification.d.ts.map +1 -1
  753. package/dist/esm/engine/frontend-components/sections/accordion.frontend-component.specification.js +9 -3
  754. package/dist/esm/engine/frontend-components/sections/accordion.frontend-component.specification.js.map +1 -1
  755. package/dist/esm/engine/frontend-components/sections/card.frontend-component.specification.d.ts.map +1 -1
  756. package/dist/esm/engine/frontend-components/sections/card.frontend-component.specification.js +41 -1
  757. package/dist/esm/engine/frontend-components/sections/card.frontend-component.specification.js.map +1 -1
  758. package/dist/esm/engine/frontend-components/sections/collapsible.frontend-component.specification.js +2 -2
  759. package/dist/esm/engine/frontend-components/sections/collapsible.frontend-component.specification.js.map +1 -1
  760. package/dist/esm/engine/frontend-components/sections/tabs.frontend-component.specification.d.ts.map +1 -1
  761. package/dist/esm/engine/frontend-components/sections/tabs.frontend-component.specification.js +19 -1
  762. package/dist/esm/engine/frontend-components/sections/tabs.frontend-component.specification.js.map +1 -1
  763. package/dist/esm/engine/frontend-components/typography/link.frontend-component.specification.js +3 -3
  764. package/dist/esm/engine/frontend-components/typography/link.frontend-component.specification.js.map +1 -1
  765. package/dist/esm/engine/frontend-components/typography/text.frontend-component.specification.d.ts.map +1 -1
  766. package/dist/esm/engine/frontend-components/typography/text.frontend-component.specification.js +21 -1
  767. package/dist/esm/engine/frontend-components/typography/text.frontend-component.specification.js.map +1 -1
  768. package/dist/esm/engine/guidance/resources/progression-state.resource.specification.d.ts +2 -0
  769. package/dist/esm/engine/guidance/resources/progression-state.resource.specification.d.ts.map +1 -1
  770. package/dist/esm/engine/infrastructure/resources/external-data-pipeline-membership.resource.specification.d.ts +4 -0
  771. package/dist/esm/engine/infrastructure/resources/external-data-pipeline-membership.resource.specification.d.ts.map +1 -0
  772. package/dist/esm/engine/infrastructure/resources/external-data-pipeline-membership.resource.specification.js +48 -0
  773. package/dist/esm/engine/infrastructure/resources/external-data-pipeline-membership.resource.specification.js.map +1 -0
  774. package/dist/esm/engine/infrastructure/resources/external-data-pipeline-states.resource.specification.d.ts.map +1 -1
  775. package/dist/esm/engine/infrastructure/resources/external-data-pipeline-states.resource.specification.js +3 -2
  776. package/dist/esm/engine/infrastructure/resources/external-data-pipeline-states.resource.specification.js.map +1 -1
  777. package/dist/esm/engine/infrastructure/resources/job-executions.resource.specification.d.ts +77 -3
  778. package/dist/esm/engine/infrastructure/resources/job-executions.resource.specification.d.ts.map +1 -1
  779. package/dist/esm/engine/infrastructure/resources/job-executions.resource.specification.js +11 -3
  780. package/dist/esm/engine/infrastructure/resources/job-executions.resource.specification.js.map +1 -1
  781. package/dist/esm/engine/infrastructure/resources/job-payload-storage.resource.specification.d.ts +26 -1
  782. package/dist/esm/engine/infrastructure/resources/job-payload-storage.resource.specification.d.ts.map +1 -1
  783. package/dist/esm/engine/infrastructure/resources/job-payload-storage.resource.specification.js +17 -8
  784. package/dist/esm/engine/infrastructure/resources/job-payload-storage.resource.specification.js.map +1 -1
  785. package/dist/esm/engine/infrastructure/resources/system-of-record-partition-assignments.resource.specification.d.ts +49 -0
  786. package/dist/esm/engine/infrastructure/resources/system-of-record-partition-assignments.resource.specification.d.ts.map +1 -0
  787. package/dist/esm/engine/infrastructure/resources/system-of-record-partition-assignments.resource.specification.js +293 -0
  788. package/dist/esm/engine/infrastructure/resources/system-of-record-partition-assignments.resource.specification.js.map +1 -0
  789. package/dist/esm/engine/notifications/resources/m2m-webhook-delivery-log.resource.specification.js +5 -5
  790. package/dist/esm/engine/notifications/resources/m2m-webhook-delivery-log.resource.specification.js.map +1 -1
  791. package/dist/esm/engine/notifications/resources/notification-badges.resource.specification.d.ts +1 -1
  792. package/dist/esm/engine/notifications/resources/webhook-config.resource.specification.js +6 -6
  793. package/dist/esm/engine/notifications/resources/webhook-config.resource.specification.js.map +1 -1
  794. package/dist/esm/engine/notifications/system-emails/security.system-emails.specification.js +3 -3
  795. package/dist/esm/engine/notifications/system-emails/security.system-emails.specification.js.map +1 -1
  796. package/dist/esm/engine/organizations/resources/organization-members.resource.specification.d.ts +1 -1
  797. package/dist/esm/engine/organizations/resources/organization-profiles.resource.specification.js +2 -2
  798. package/dist/esm/engine/organizations/resources/organization-profiles.resource.specification.js.map +1 -1
  799. package/dist/esm/engine/organizations/resources/organization-units.resource.specification.d.ts +3 -1
  800. package/dist/esm/engine/organizations/resources/organization-units.resource.specification.d.ts.map +1 -1
  801. package/dist/esm/engine/organizations/resources/organization-units.resource.specification.js +27 -5
  802. package/dist/esm/engine/organizations/resources/organization-units.resource.specification.js.map +1 -1
  803. package/dist/esm/engine/organizations/resources/organizations.resource.specification.d.ts +1 -1
  804. package/dist/esm/engine/organizations/resources/organizations.resource.specification.d.ts.map +1 -1
  805. package/dist/esm/engine/organizations/resources/organizations.resource.specification.js +31 -12
  806. package/dist/esm/engine/organizations/resources/organizations.resource.specification.js.map +1 -1
  807. package/dist/esm/engine/providers/anthropic.provider.specification.d.ts.map +1 -1
  808. package/dist/esm/engine/providers/anthropic.provider.specification.js +10 -1
  809. package/dist/esm/engine/providers/anthropic.provider.specification.js.map +1 -1
  810. package/dist/esm/engine/providers/apple.provider.specification.d.ts.map +1 -1
  811. package/dist/esm/engine/providers/apple.provider.specification.js +12 -1
  812. package/dist/esm/engine/providers/apple.provider.specification.js.map +1 -1
  813. package/dist/esm/engine/providers/email-preview.provider.specification.d.ts.map +1 -1
  814. package/dist/esm/engine/providers/email-preview.provider.specification.js +9 -1
  815. package/dist/esm/engine/providers/email-preview.provider.specification.js.map +1 -1
  816. package/dist/esm/engine/providers/github.provider.specification.d.ts.map +1 -1
  817. package/dist/esm/engine/providers/github.provider.specification.js +12 -1
  818. package/dist/esm/engine/providers/github.provider.specification.js.map +1 -1
  819. package/dist/esm/engine/providers/google.provider.specification.d.ts.map +1 -1
  820. package/dist/esm/engine/providers/google.provider.specification.js +12 -1
  821. package/dist/esm/engine/providers/google.provider.specification.js.map +1 -1
  822. package/dist/esm/engine/providers/grok.provider.specification.d.ts.map +1 -1
  823. package/dist/esm/engine/providers/grok.provider.specification.js +10 -1
  824. package/dist/esm/engine/providers/grok.provider.specification.js.map +1 -1
  825. package/dist/esm/engine/providers/microsoft.provider.specification.d.ts.map +1 -1
  826. package/dist/esm/engine/providers/microsoft.provider.specification.js +22 -1
  827. package/dist/esm/engine/providers/microsoft.provider.specification.js.map +1 -1
  828. package/dist/esm/engine/providers/mistral.provider.specification.d.ts.map +1 -1
  829. package/dist/esm/engine/providers/mistral.provider.specification.js +10 -1
  830. package/dist/esm/engine/providers/mistral.provider.specification.js.map +1 -1
  831. package/dist/esm/engine/providers/openai.provider.specification.d.ts.map +1 -1
  832. package/dist/esm/engine/providers/openai.provider.specification.js +10 -1
  833. package/dist/esm/engine/providers/openai.provider.specification.js.map +1 -1
  834. package/dist/esm/engine/providers/opencode.provider.specification.d.ts.map +1 -1
  835. package/dist/esm/engine/providers/opencode.provider.specification.js +9 -1
  836. package/dist/esm/engine/providers/opencode.provider.specification.js.map +1 -1
  837. package/dist/esm/engine/providers/perplexity.provider.specification.d.ts.map +1 -1
  838. package/dist/esm/engine/providers/perplexity.provider.specification.js +10 -1
  839. package/dist/esm/engine/providers/perplexity.provider.specification.js.map +1 -1
  840. package/dist/esm/engine/providers/resend.provider.specification.d.ts.map +1 -1
  841. package/dist/esm/engine/providers/resend.provider.specification.js +10 -1
  842. package/dist/esm/engine/providers/resend.provider.specification.js.map +1 -1
  843. package/dist/esm/engine/providers/stripe.provider.specification.d.ts.map +1 -1
  844. package/dist/esm/engine/providers/stripe.provider.specification.js +10 -1
  845. package/dist/esm/engine/providers/stripe.provider.specification.js.map +1 -1
  846. package/dist/esm/engine/providers/twilio.provider.specification.d.ts.map +1 -1
  847. package/dist/esm/engine/providers/twilio.provider.specification.js +10 -1
  848. package/dist/esm/engine/providers/twilio.provider.specification.js.map +1 -1
  849. package/dist/esm/engine/roles/app-audit-evidence-reader.role.specification.d.ts +2 -0
  850. package/dist/esm/engine/roles/app-audit-evidence-reader.role.specification.d.ts.map +1 -0
  851. package/dist/esm/engine/roles/app-audit-evidence-reader.role.specification.js +21 -0
  852. package/dist/esm/engine/roles/app-audit-evidence-reader.role.specification.js.map +1 -0
  853. package/dist/esm/engine/roles/index.d.ts +4 -3
  854. package/dist/esm/engine/roles/index.d.ts.map +1 -1
  855. package/dist/esm/engine/roles/index.js +6 -4
  856. package/dist/esm/engine/roles/index.js.map +1 -1
  857. package/dist/esm/engine/users/resources/anonymous-users.resource.specification.d.ts +5 -3
  858. package/dist/esm/engine/users/resources/anonymous-users.resource.specification.d.ts.map +1 -1
  859. package/dist/esm/engine/users/resources/anonymous-users.resource.specification.js +2 -2
  860. package/dist/esm/engine/users/resources/anonymous-users.resource.specification.js.map +1 -1
  861. package/dist/esm/engine/users/resources/inbound-contacts.resource.specification.d.ts +2 -1
  862. package/dist/esm/engine/users/resources/inbound-contacts.resource.specification.d.ts.map +1 -1
  863. package/dist/esm/engine/users/resources/inbound-contacts.resource.specification.js +2 -2
  864. package/dist/esm/engine/users/resources/inbound-contacts.resource.specification.js.map +1 -1
  865. package/dist/esm/engine/users/resources/user-identity-links.resource.specification.d.ts +1 -0
  866. package/dist/esm/engine/users/resources/user-identity-links.resource.specification.d.ts.map +1 -1
  867. package/dist/esm/engine/users/resources/user-identity-links.resource.specification.js +8 -3
  868. package/dist/esm/engine/users/resources/user-identity-links.resource.specification.js.map +1 -1
  869. package/dist/esm/engine/users/resources/user-preferences-api-reference.examples.d.ts +2 -2
  870. package/dist/esm/engine/users/resources/user-preferences-api-reference.examples.js +2 -2
  871. package/dist/esm/engine/users/resources/user-preferences-api-reference.examples.js.map +1 -1
  872. package/dist/esm/engine/users/resources/user-preferences.resource.specification.d.ts +5 -5
  873. package/dist/esm/engine/users/resources/user-preferences.resource.specification.js +1 -1
  874. package/dist/esm/engine/users/resources/user-preferences.resource.specification.js.map +1 -1
  875. package/dist/esm/engine/users/resources/user-self-preferences.resource.specification.d.ts +4 -4
  876. package/dist/esm/engine/users/resources/user-self-preferences.resource.specification.js +3 -3
  877. package/dist/esm/engine/users/resources/user-self-preferences.resource.specification.js.map +1 -1
  878. package/dist/esm/engine/users/resources/user-self.resource.specification.d.ts +1 -0
  879. package/dist/esm/engine/users/resources/user-self.resource.specification.d.ts.map +1 -1
  880. package/dist/esm/engine/users/resources/user-self.resource.specification.js +1 -1
  881. package/dist/esm/engine/users/resources/user-self.resource.specification.js.map +1 -1
  882. package/dist/esm/engine/users/resources/users.resource.specification.d.ts +1 -0
  883. package/dist/esm/engine/users/resources/users.resource.specification.d.ts.map +1 -1
  884. package/dist/esm/engine/users/resources/users.resource.specification.js +2 -2
  885. package/dist/esm/engine/users/resources/users.resource.specification.js.map +1 -1
  886. package/dist/esm/index.d.ts +39 -0
  887. package/dist/esm/index.d.ts.map +1 -1
  888. package/dist/esm/index.js +39 -0
  889. package/dist/esm/index.js.map +1 -1
  890. package/dist/esm/technical-documentation/application-documentation-chapters.schemas.d.ts +134 -0
  891. package/dist/esm/technical-documentation/application-documentation-chapters.schemas.d.ts.map +1 -0
  892. package/dist/esm/technical-documentation/application-documentation-chapters.schemas.js +142 -0
  893. package/dist/esm/technical-documentation/application-documentation-chapters.schemas.js.map +1 -0
  894. package/dist/esm/technical-documentation/application-documentation-plan-generation.schemas.d.ts +35 -0
  895. package/dist/esm/technical-documentation/application-documentation-plan-generation.schemas.d.ts.map +1 -0
  896. package/dist/esm/technical-documentation/application-documentation-plan-generation.schemas.js +45 -0
  897. package/dist/esm/technical-documentation/application-documentation-plan-generation.schemas.js.map +1 -0
  898. package/dist/esm/technical-documentation/application-documentation-plan-validation.d.ts +33 -0
  899. package/dist/esm/technical-documentation/application-documentation-plan-validation.d.ts.map +1 -0
  900. package/dist/esm/technical-documentation/application-documentation-plan-validation.js +77 -0
  901. package/dist/esm/technical-documentation/application-documentation-plan-validation.js.map +1 -0
  902. package/dist/esm/technical-documentation/application-documentation-plan.family-aspects.d.ts +3 -0
  903. package/dist/esm/technical-documentation/application-documentation-plan.family-aspects.d.ts.map +1 -0
  904. package/dist/esm/technical-documentation/application-documentation-plan.family-aspects.js +40 -0
  905. package/dist/esm/technical-documentation/application-documentation-plan.family-aspects.js.map +1 -0
  906. package/dist/esm/technical-documentation/application-documentation-plan.schemas.d.ts +122 -0
  907. package/dist/esm/technical-documentation/application-documentation-plan.schemas.d.ts.map +1 -0
  908. package/dist/esm/technical-documentation/application-documentation-plan.schemas.js +138 -0
  909. package/dist/esm/technical-documentation/application-documentation-plan.schemas.js.map +1 -0
  910. package/dist/esm/technical-documentation/engine-documentation-specification-catalog.companion.d.ts.map +1 -1
  911. package/dist/esm/technical-documentation/engine-documentation-specification-catalog.companion.js +7 -15
  912. package/dist/esm/technical-documentation/engine-documentation-specification-catalog.companion.js.map +1 -1
  913. package/dist/esm/technical-documentation/technical-documentation-assets.schemas.js +1 -1
  914. package/dist/esm/technical-documentation/technical-documentation-assets.schemas.js.map +1 -1
  915. package/dist/esm/technical-documentation/technical-documentation-capture.schemas.js +1 -1
  916. package/dist/esm/technical-documentation/technical-documentation-capture.schemas.js.map +1 -1
  917. package/dist/esm/technical-documentation/technical-documentation-common.schemas.js +1 -1
  918. package/dist/esm/technical-documentation/technical-documentation-common.schemas.js.map +1 -1
  919. package/dist/esm/technical-documentation/technical-documentation-evidence.schemas.js +1 -1
  920. package/dist/esm/technical-documentation/technical-documentation-evidence.schemas.js.map +1 -1
  921. package/dist/esm/technical-documentation/technical-documentation-lifecycle.schemas.js +1 -1
  922. package/dist/esm/technical-documentation/technical-documentation-lifecycle.schemas.js.map +1 -1
  923. package/dist/esm/technical-documentation/technical-documentation-publication.schemas.js +1 -1
  924. package/dist/esm/technical-documentation/technical-documentation-publication.schemas.js.map +1 -1
  925. package/dist/esm/technical-documentation/technical-documentation-units.schemas.d.ts +14 -0
  926. package/dist/esm/technical-documentation/technical-documentation-units.schemas.d.ts.map +1 -1
  927. package/dist/esm/technical-documentation/technical-documentation-units.schemas.js +16 -3
  928. package/dist/esm/technical-documentation/technical-documentation-units.schemas.js.map +1 -1
  929. package/dist/esm/technical-documentation.exports.d.ts +4 -0
  930. package/dist/esm/technical-documentation.exports.d.ts.map +1 -1
  931. package/dist/esm/technical-documentation.exports.js +24 -0
  932. package/dist/esm/technical-documentation.exports.js.map +1 -1
  933. package/dist/tsconfig.build.tsbuildinfo +1 -1
  934. package/package.json +8 -13
  935. package/dist/esm/application-creation/application-coding-tasks.application-creation.schemas.d.ts +0 -103
  936. package/dist/esm/application-creation/application-coding-tasks.application-creation.schemas.d.ts.map +0 -1
  937. package/dist/esm/application-creation/application-coding-tasks.application-creation.schemas.js +0 -76
  938. package/dist/esm/application-creation/application-coding-tasks.application-creation.schemas.js.map +0 -1
  939. package/dist/esm/application-creation/application-specification-family-identity.application-creation.schemas.d.ts +0 -108
  940. package/dist/esm/application-creation/application-specification-family-identity.application-creation.schemas.d.ts.map +0 -1
  941. package/dist/esm/application-creation/application-specification-family-identity.application-creation.schemas.js +0 -119
  942. package/dist/esm/application-creation/application-specification-family-identity.application-creation.schemas.js.map +0 -1
  943. package/dist/esm/application-creation-playbook-runtime.exports.d.ts +0 -3
  944. package/dist/esm/application-creation-playbook-runtime.exports.d.ts.map +0 -1
  945. package/dist/esm/application-creation-playbook-runtime.exports.js +0 -3
  946. package/dist/esm/application-creation-playbook-runtime.exports.js.map +0 -1
  947. package/dist/esm/engine/frontend-components/billing/billing-promotion-code-input.frontend-component.specification.d.ts +0 -0
  948. package/dist/esm/engine/frontend-components/billing/billing-promotion-code-input.frontend-component.specification.d.ts.map +0 -0
  949. package/dist/esm/engine/frontend-components/billing/billing-promotion-code-input.frontend-component.specification.js +0 -0
  950. package/dist/esm/engine/frontend-components/billing/billing-promotion-code-input.frontend-component.specification.js.map +0 -0
@@ -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,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,oBAAoB;KACjC;IACD,MAAM,EAAE;QACN,KAAK,EAAE,GAAG;QACV,kBAAkB,EAAE,SAAS;KAC9B;IACD,eAAe,EAAE;QACf,aAAa,EAAE,CAAC,WAAW,CAAC,oBAAoB,CAAC;QACjD,eAAe,EAAE,EAAE;QACnB,cAAc,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE;KAC/B;CACO,CAAC;AAEX,MAAM,oCAAoC,GAAG;IAC3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E,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 record 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 records 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 record 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,EA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E,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 record 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 records 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 record 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 'ENABLE_FEATURE, DISABLE_FEATURE and RESET_FEATURES record a committed RESOURCE_OPERATION_PERFORMED event with the persisted feature-ledger id, override change and supplied reason. Enable accepts an optional reason; disable and reset require one. Audit history survives later override changes and resets.',\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.UPDATE_MANY | Op.DELETE | Op.CREATE | Op.LIST | Op.SEARCH, import("zod").ZodObject<{
11
+ export declare const userFeaturesResourceSpecification: import("../../../_core").ResourceSpecificationConfig<Record<string, never>, Op.READ | Op.UPDATE | Op.DELETE | Op.CREATE | 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;AA0B/B,eAAO,MAAM,iCAAiC;;;;;;;;iCAoM7C,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;;;;;;;;iCAuM7C,CAAC"}
@@ -130,7 +130,10 @@ export const userFeaturesResourceSpecification = resourceSpecificationFromFronte
130
130
  },
131
131
  [Op.UPDATE]: {
132
132
  purpose: 'Super-admin override of a user’s feature set or limits (high-trust).',
133
- outcome: 'Manual grants or revocations apply immediately to authorization and feature gating for that user.',
133
+ // The variant admits cross-subject user administration (`admitsCrossSubjectUserAdministration`): the
134
+ // super-admin addresses ANY user's ledger, not only their own. The USER_SELF scope would otherwise refuse
135
+ // every row but the caller's (#1030).
136
+ outcome: 'Manual grants or revocations apply immediately to authorization and feature gating for that user — any user the super-admin addresses, not only the caller.',
134
137
  importance: FieldSemanticImportance.PRIMARY,
135
138
  responseStatuses: [
136
139
  { code: HttpResponseStatusCode.OK_200, meaning: 'The user’s entitlements were overridden and the updated ledger is returned.' },
@@ -1 +1 @@
1
- {"version":3,"file":"user-features.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/features/resources/user-features.resource.specification.ts"],"names":[],"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E,+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 record 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 records; 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 record 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,6B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,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 record 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 records; 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 // The variant admits cross-subject user administration (`admitsCrossSubjectUserAdministration`): the\n // super-admin addresses ANY user's ledger, not only their own. The USER_SELF scope would otherwise refuse\n // every row but the caller's (#1030).\n outcome: 'Manual grants or revocations apply immediately to authorization and feature gating for that user — any user the super-admin addresses, not only the caller.',\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 record 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;AAI/B,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAgXtC,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCA4XtC,CAAC"}
@@ -50,6 +50,7 @@ export const filesResourceSpecification = resourceSpecification(filesResourceCon
50
50
  },
51
51
  },
52
52
  notes: [
53
+ 'Upload and metadata responses derive FileReadiness from lifecycle status; readiness is not a persisted field. READY admits a new reference, PROCESSING requires refresh, ATTACHED represents an existing link and UNAVAILABLE refuses new attachment. Standard forms wait before publishing new references.',
53
54
  'Repository-only resource: all operations are `REPOSITORY_ONLY` — `FilesBackendService` is the intended entry point, not public CRUD controllers.',
54
55
  'Per-record `primaryScope` + scope id fields can represent APPLICATION, ORGANIZATIONS, or USER_SELF rows; the resource-level `resourcePrimaryScope` declared here is the registry default for the FILES type, not every row’s dynamic scope.',
55
56
  ],
@@ -99,9 +100,20 @@ export const filesResourceSpecification = resourceSpecification(filesResourceCon
99
100
  values: {
100
101
  [FileStorageAccepted.WILDO_MANAGED]: { meaning: 'Managed object storage (S3-compatible) selected by the platform default configuration.' },
101
102
  [FileStorageAccepted.LOCAL_DIRECTORY]: { meaning: 'Local filesystem directory for development or air-gapped single-node installs.' },
102
- [FileStorageAccepted.ONEDRIVE]: { meaning: 'Optional Microsoft OneDrive-backed storage when an app enables the connector.' },
103
- [FileStorageAccepted.GOOGLE_DRIVE]: { meaning: 'Optional Google Drive-backed storage when an app enables the connector.' },
104
- [FileStorageAccepted.DROPBOX]: { meaning: 'Optional Dropbox-backed storage when an app enables the connector.' },
103
+ [FileStorageAccepted.ONEDRIVE]: {
104
+ meaning: 'DECLARABLE BUT NOT IMPLEMENTED: the engine ships no OneDrive storage provider, so a field declaring this is refused at boot and at upload. '
105
+ + 'There is no connector to enable and no environment variable that would serve it. OneDrive files can still be ATTACHED — the `microsoft-onedrive` '
106
+ + 'provider contributes a v7.2 picker whose selections are ingested into the field\'s own storage — but they are not STORED in OneDrive. '
107
+ + 'The governed path is deferred by decision (#570); the member is kept declarable so the refusal can name it.',
108
+ },
109
+ [FileStorageAccepted.GOOGLE_DRIVE]: { meaning: 'Google Drive-backed storage: the bytes stay in the Drive of the person who linked (via the Drive picker) or uploaded the file, and are read through that person\'s delegated grant — never an application credential. Deleting the row forgets the reference and leaves the file in their Drive.' },
110
+ [FileStorageAccepted.DROPBOX]: {
111
+ meaning: 'DECLARABLE BUT NOT IMPLEMENTED: the engine ships no Dropbox storage provider, so a field declaring this is refused at boot and at upload. '
112
+ + 'There is no connector to enable and no environment variable that would serve it. Dropbox files can still be ATTACHED — the `dropbox` provider '
113
+ + 'contributes a Chooser whose selections arrive as credential-free links and are ingested into the field\'s own storage — but they are not STORED '
114
+ + 'in Dropbox. Deliberately the same posture as ONEDRIVE, so that the governed path has one PROVEN implementation (GOOGLE_DRIVE) rather than three '
115
+ + 'unproven ones; the member is kept declarable so the refusal can name it (#460).',
116
+ },
105
117
  },
106
118
  }),
107
119
  storageRef: schemaShape.storageRef.stringSpec({
@@ -1 +1 @@
1
- {"version":3,"file":"files.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/files/resources/files.resource.specification.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,uBAAuB,EACvB,iBAAiB,EACjB,mBAAmB,EACnB,sBAAsB,GACvB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,qBAAqB,IAAI,EAAE,EAC3B,UAAU,EACV,UAAU,EACV,gDAAgD,EAChD,oBAAoB,GACrB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAC5F,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAE3E,MAAM,CAAC,MAAM,0BAA0B,GAAG,qBAAqB,CAC7D,gDAAgD,EAChD,UAAU,EACV,CAAC,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC,CAAC;IACpB,OAAO,EAAE,2HAA2H;IACpI,YAAY,EAAE,+HAA+H;IAC7I,aAAa,EAAE,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AAsB,CAAC,eAAe,EAAE,IAAI,EAAE,+HAA+H,EAAE,SAAS,EAAE,mBAAmB,EAAE;gBACvN,EAAE,IAAI,EAAE,sBAAsB,CAAC,aAAa,EAAE,IAAI,EAAE,8GAA8G,EAAE;aACrK;YACD,UAAU,EAAE,IAAI;SACjB;QAED,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE;YACX,OAAO,EAAE,iFAAiF;YAC1F,OAAO,EAAE,wGAAwG;YACjH,SAAS,EAAE,yGAAyG;YACpH,UAAU,EAAE,uBAAuB,CAAC,OAAO;YAC3C,gBAAgB,EAAE;gBAChB,EAAE,IAAI,EAAE,sBAAsB,CAAC,cAAc,EAAE,OAAO,EAAE,yLAAyL,EAAE;aACpP;YACD,cAAc,EAAE;gBACd,EAAE,IAAI,EAAE,sBAAsB,CAAC,aAAa,EAAE,IAAI,EAAE,oFAAoF,EAAE;gBAC1I,EAAE,IAAI,EAAE,sBAAsB,CAAC,aAAa,EAAE,IAAI,EAAE,kEAAkE,EAAE;aACzH;YACD,UAAU,EAAE,IAAI;SACjB;KACF;IAED,mBAAmB,EAAE;QACnB,gfAAgf;QAChf,oNAAoN;KACrN;CACF,CAAC;AACF,sEAAsE;AACtE,0EAA0E;AAC1E,2EAA2E;AAC3E,6EAA6E;AAC7E,4EAA4E;AAC5E,6EAA6E;AAC7E,wEAAwE;AACxE,2EAA2E;AAC3E,SAAS;AACT,EAAE,oBAAoB,EAAE,oBAAoB,CAAC,WAAW,EAAE,CAC3D,CAAC","sourcesContent":["/**\n * Resource: `files` — Wildo SaaS engine specification (backend-only).\n *\n * Inputs:\n * - Schema: engine/saas-models/src/files/files.shared.schemas.ts → `FileSchema`\n * - Factory: engine/saas-models/src/files/files.shared.resources-config.schemas.ts\n * → `filesResourceConfiguration_InitializationFactory`\n * - Custom operations: none\n * - UI presets: none\n */\n\nimport { LabelAudience } from '@wildo-ai/presets-components-models';\nimport {\n CodeDeclarationKind,\n CodeSymbolKind,\n FieldSemanticImportance,\n FileDisplayNature,\n FileStorageAccepted,\n FileUploaderEntityType,\n} from '@wildo-ai/zod-decorators';\nimport {\n CoreResourceOperation as Op,\n FileSchema,\n FileStatus,\n filesResourceConfiguration_InitializationFactory,\n ResourcePrimaryScope,\n} from '@wildo-ai/saas-models';\nimport { HttpResponseStatusCode, resourceSpecification } from '~wildo-specifications/_core';\nimport { EngineResourceSubDomain } from '../../engine-resource-sub-domain';\n\nexport const filesResourceSpecification = resourceSpecification(\n filesResourceConfiguration_InitializationFactory,\n FileSchema,\n ({ schemaShape }) => ({\n purpose: 'Store file metadata (name, MIME, storage pointers, lifecycle, and scope) for assets managed by the platform file service.',\n businessRole: 'The shared “file row” truth that links uploaded bytes in object storage to domain resources through `linkedResource*` fields.',\n lifecycleRole: 'Moves from `PENDING` upload through `UPLOADED`, optional AV / extraction states, linking to business records, and eventual `DELETED` / `ORPHANED` cleanup.',\n audience: LabelAudience.END_USER,\n subDomain: EngineResourceSubDomain.FILES,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'FileSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactory: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'filesResourceConfiguration_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: 'FILES',\n },\n operationVocabulary: {\n coreEnum: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceOperation',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n notes: [\n 'Repository-only resource: all operations are `REPOSITORY_ONLY` — `FilesBackendService` is the intended entry point, not public CRUD controllers.',\n 'Per-record `primaryScope` + scope id fields can represent APPLICATION, ORGANIZATIONS, or USER_SELF rows; the resource-level `resourcePrimaryScope` declared here is the registry default for the FILES type, not every row’s dynamic scope.',\n ],\n },\n\n fields: {\n fileId: schemaShape.fileId.stringSpec({\n meaning: 'Stable public identifier for this file metadata document, embedded in storage keys and download URLs. It is a virtual projection of the document’s underlying Mongo `_id` (`fileId === String(_id)`), so the file has a single stored identity and there is no separate persisted `fileId` field.',\n whyItMatters: 'This is the identifier other resources store in `z_file()` fields and that presigned URL flows reference. Because it projects `_id`, the value is allocated by the database at insert time rather than minted before the row exists, so creation is insert-first.',\n semanticRole: 'identifier',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n filename: schemaShape.filename.stringSpec({\n meaning: 'Sanitized filename used in UI and download headers.',\n importance: FieldSemanticImportance.PRIMARY,\n semanticRole: 'label',\n }),\n\n originalFilename: schemaShape.originalFilename.stringSpec({\n meaning: 'Original client-provided filename before sanitization for audit/support.',\n semanticRole: 'label',\n }),\n\n mimeType: schemaShape.mimeType.stringSpec({\n meaning: 'IANA-style MIME classification for validation, AV routing, and viewer choice.',\n importance: FieldSemanticImportance.PRIMARY,\n semanticRole: 'code',\n }),\n\n size: schemaShape.size.numberSpec({\n meaning: 'Byte length of the stored object after upload completes.',\n unit: 'bytes',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n extension: schemaShape.extension.stringSpec({\n meaning: 'Filename extension snapshot (without dot) for quick filtering when MIME is generic.',\n semanticRole: 'code',\n }),\n\n checksum: schemaShape.checksum.stringSpec({\n meaning: 'Optional content hash for deduplication and integrity checks after upload.',\n semanticRole: 'code',\n }),\n\n storageProvider: schemaShape.storageProvider.enumSpec({\n meaning: 'Which registered storage backend (S3-compatible, local, …) holds the bytes.',\n enumDeclaration: {\n packageName: '@wildo-ai/zod-decorators',\n exportName: 'FileStorageAccepted',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n values: {\n [FileStorageAccepted.WILDO_MANAGED]: { meaning: 'Managed object storage (S3-compatible) selected by the platform default configuration.' },\n [FileStorageAccepted.LOCAL_DIRECTORY]: { meaning: 'Local filesystem directory for development or air-gapped single-node installs.' },\n [FileStorageAccepted.ONEDRIVE]: { meaning: 'Optional Microsoft OneDrive-backed storage when an app enables the connector.' },\n [FileStorageAccepted.GOOGLE_DRIVE]: { meaning: 'Optional Google Drive-backed storage when an app enables the connector.' },\n [FileStorageAccepted.DROPBOX]: { meaning: 'Optional Dropbox-backed storage when an app enables the connector.' },\n },\n }),\n\n storageRef: schemaShape.storageRef.stringSpec({\n meaning: 'Opaque handle the active storage adapter uses to retrieve bytes (bucket/key tuple is adapter-specific).',\n importance: FieldSemanticImportance.PRIMARY,\n semanticRole: 'identifier',\n }),\n\n storageKey: schemaShape.storageKey.stringSpec({\n meaning: 'Derived, human-debuggable key encoding the scope path (`app/...`, `org/...`, `user/...`) and `fileId`, used in logs and migrations. Because it depends on the database-assigned `fileId`, it is populated immediately after insert and is optional at rest until then.',\n importance: FieldSemanticImportance.PRIMARY,\n semanticRole: 'code',\n }),\n\n url: schemaShape.url.stringSpec({\n meaning: 'Cached HTTP(S) URL when a long-lived public or CDN URL is available (may be presigned elsewhere).',\n semanticRole: 'uri',\n }),\n\n status: schemaShape.status.enumSpec({\n meaning: 'Lifecycle state for upload, AV, linkage, and deletion. Text extraction/indexing state is NOT here — it lives on the per-field RAG chunk records.',\n importance: FieldSemanticImportance.PRIMARY,\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'FileStatus',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n values: {\n [FileStatus.PENDING]: { meaning: 'Upload not finished — metadata record exists, bytes not ready yet.' },\n [FileStatus.UPLOADED]: { meaning: 'Bytes are stored and ready for post-processing or linking.' },\n [FileStatus.LINKED]: { meaning: 'Bound to a parent resource’s `z_file()` field; primary happy path for production assets.' },\n [FileStatus.DELETED]: { meaning: 'Soft-deleted; bytes may still exist until vacuum jobs run.' },\n [FileStatus.ORPHANED]: { meaning: 'No live parent link — retained for re-link or background cleanup only.' },\n [FileStatus.FAILED]: { meaning: 'Upload or processing failed irrecoverably for this record.' },\n [FileStatus.SCANNING]: { meaning: 'AV pipeline is running before download is allowed in hardened tenants.' },\n [FileStatus.CLEAN]: { meaning: 'AV says the payload is not malicious.' },\n [FileStatus.INFECTED]: { meaning: 'Quarantine candidate — do not serve for download.' },\n [FileStatus.QUARANTINED]: { meaning: 'Isolated for operator review; download blocked by policy.' },\n },\n }),\n\n nature: schemaShape.nature.enumSpec({\n meaning: 'Resolved high-level file kind (image / video / document) used for template selection, not raw MIME subtypes alone.',\n enumDeclaration: {\n packageName: '@wildo-ai/zod-decorators',\n exportName: 'FileDisplayNature',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n values: {\n [FileDisplayNature.IMAGE]: { meaning: 'Raster/vector still asset suitable for lightbox and thumbnail UIs.' },\n [FileDisplayNature.VIDEO]: { meaning: 'Time-based media; shows duration and streaming-friendly player chrome.' },\n [FileDisplayNature.AUDIO]: { meaning: 'Sound-only media with duration metadata.' },\n [FileDisplayNature.DOCUMENT]: { meaning: 'Text-first assets such as office/PDF/structured docs.' },\n [FileDisplayNature.GENERIC]: { meaning: 'Fallback bucket when a generic download affordance is enough.' },\n },\n }),\n\n width: schemaShape.width.numberSpec({ meaning: 'Image/video width in pixels when known.' }),\n height: schemaShape.height.numberSpec({ meaning: 'Image/video height in pixels when known.' }),\n duration: schemaShape.duration.numberSpec({ meaning: 'Audio/video length in seconds when analyzers provide it.' }),\n pageCount: schemaShape.pageCount.numberSpec({ meaning: 'Page count for paginated document previews when the analyzer could infer it.' }),\n\n thumbnailUrl: schemaShape.thumbnailUrl.stringSpec({\n meaning: 'Optional derived thumbnail or poster frame URL for list/grid UIs.',\n semanticRole: 'uri',\n }),\n\n linkedResourceType: schemaShape.linkedResourceType.stringSpec({\n meaning: 'When linked, the `CoreResourceType` (string form) of the parent record carrying the `z_file()` field.',\n semanticRole: 'code',\n }),\n\n linkedResourceId: schemaShape.linkedResourceId.stringSpec({\n meaning: 'Primary id of the parent resource using this file, when linked.',\n semanticRole: 'identifier',\n }),\n\n linkedFieldName: schemaShape.linkedFieldName.stringSpec({\n meaning: 'Field name on the parent schema (e.g. `avatarId`) to support multi-file parents.',\n semanticRole: 'code',\n }),\n\n primaryScope: schemaShape.primaryScope.enumSpec({\n meaning: 'Which isolation bucket this record participates in: app-wide, org-wide, or user-private (within an org).',\n whyItMatters:\n 'Field is optional at rest until an upload binds scope identifiers; `FileSchema` superRefine enforces consistency between `primaryScope` and the id triple.',\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'ResourcePrimaryScope',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n values: {\n [ResourcePrimaryScope.APPLICATION]: { meaning: 'App-wide marketing/branding or singleton assets (uses `applicationId` only).' },\n [ResourcePrimaryScope.ORGANIZATIONS]: { meaning: 'Shared within a tenant; uses `organizationId` only.' },\n [ResourcePrimaryScope.USER_SELF]: { meaning: 'Private to a user, but still in org context; requires `organizationId` + `userId` per file scope rules.' },\n },\n }),\n\n applicationId: schemaShape.applicationId.stringSpec({\n meaning: 'Parent application id when `primaryScope` is `APPLICATION`.',\n semanticRole: 'identifier',\n }),\n\n organizationId: schemaShape.organizationId.stringSpec({\n meaning: 'Org id for org-scoped files and as local context for user-private files.',\n semanticRole: 'identifier',\n }),\n\n userId: schemaShape.userId.stringSpec({\n meaning: 'User id for `USER_SELF` scoped file records, paired with `organizationId` as required by `validateFileScopeIdentifiers`.',\n semanticRole: 'identifier',\n }),\n\n uploadedBy: schemaShape.uploadedBy.stringSpec({\n meaning: 'Raw uploader id when the uploader is not necessarily a Wildo `users` record (service principal, system job, …).',\n semanticRole: 'identifier',\n }),\n\n uploadedByEntityType: schemaShape.uploadedByEntityType.enumSpec({\n meaning: 'What kind of principal `uploadedBy` references so hydration code can disambiguate cross-entity uploaders.',\n enumDeclaration: {\n packageName: '@wildo-ai/zod-decorators',\n exportName: 'FileUploaderEntityType',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n values: {\n [FileUploaderEntityType.USER]: { meaning: 'Uploader is a people identity from the `users` table.' },\n [FileUploaderEntityType.ANONYMOUS_USER]: { meaning: 'Uploader is an anonymous marketing-site session before account creation.' },\n [FileUploaderEntityType.ORGANIZATION_MACHINE]: { meaning: 'Uploader is an org-scoped MACHINE principal (M2M automation) — an api-key OR an OAuth client; the specific credential kind + id are on `initiatorIds.machineCredential`.' },\n [FileUploaderEntityType.APPLICATION_MACHINE]: { meaning: 'Uploader is an app-scoped MACHINE principal (integration jobs) — an api-key OR an OAuth client; the specific credential kind + id are on `initiatorIds.machineCredential`.' },\n },\n }),\n\n uploadedAt: schemaShape.uploadedAt.dateSpec({\n meaning: 'When the file bytes finished uploading to storage.',\n temporalRole: 'occurred',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n updatedAt: schemaShape.updatedAt.dateSpec({\n meaning: 'Last time metadata or link state on this document changed (excluding every storage adapter retry).',\n temporalRole: 'modified',\n }),\n\n deletedAt: schemaShape.deletedAt.dateSpec({\n meaning: 'When the file entered a soft-deleted / tombstone state for background purge.',\n temporalRole: 'occurred',\n }),\n },\n\n operations: {\n [Op.READ]: {\n purpose: 'Resolve a single `File` row, usually when issuing download authorization or parent hydration.',\n outcome: 'Callers can trust storage pointers, status, and linkage fields before streaming bytes to the client.',\n whenToUse: 'Use in server-side `FilesBackendService` flows — not exposed to anonymous callers for arbitrary ids.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The file metadata record for the supplied `fileId` was found and its storage pointers, lifecycle `status`, and `linkedResource*` fields are returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No file metadata row exists for the supplied `fileId` (never created, or already hard-deleted after soft-delete vacuum).' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not authorized for the row’s scope — download authorization must still re-check the parent `z_file()` ACL; this row alone is not a permission boundary (see `businessConstraints`).' },\n ],\n idempotent: true,\n },\n\n [Op.LIST]: {\n purpose: 'Enumerate file rows filtered by uploader, parent linkage, or scope in repository queries.',\n outcome: 'Background jobs and admin UIs can page through the storage ledger under org/app isolation.',\n whenToUse: 'Use in cleanup jobs, quota dashboards, or when syncing CDN metadata for the tenant.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of file metadata records matching the uploader / linkage / scope filters under org/app isolation.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the role required to page the storage ledger for the requested scope.' },\n ],\n idempotent: true,\n },\n\n [Op.CREATE]: {\n purpose: 'Materialize a new metadata document for an upload flow; the database assigns the row’s identity (`_id`, projected as `fileId`) at insert, so the row — and its `fileId` — can be created before or after the bytes exist.',\n outcome: 'The system gets a first-class file row that can track upload progress, checksums, and eventual linking.',\n whenToUse: 'Use on upload start or completion events before linking to a parent resource’s `z_file()` slot.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'A file metadata record was materialized with its server-assigned `fileId` and initial `PENDING`/`UPLOADED` status. Internal/service write path — `FilesBackendService` drives this from upload flows, not a public CRUD controller.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The upload metadata fails validation — a disallowed `mimeType`, a `size` over the configured per-scope upload limit (over-size is surfaced here, not as a transport-level 413), or scope ids inconsistent with `primaryScope` per `validateFileScopeIdentifiers`.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not authorized to upload into the requested scope (org/app/user-self isolation bucket).' },\n ],\n idempotent: false,\n examples: [\n {\n title: 'Materialize a file row on upload start',\n request: {\n filename: 'release-notes.pdf',\n mimeType: 'application/pdf',\n size: 248213,\n primaryScope: ResourcePrimaryScope.ORGANIZATIONS,\n organizationId: 'org_01HX2…',\n },\n response: {\n fileId: 'file_01HX2…',\n filename: 'release-notes.pdf',\n mimeType: 'application/pdf',\n size: 248213,\n status: FileStatus.PENDING,\n primaryScope: ResourcePrimaryScope.ORGANIZATIONS,\n },\n forStatus: HttpResponseStatusCode.CREATED_201,\n },\n ],\n rateLimitNote: 'Upload materialization is the hot path for client file submissions; throttle per uploader/scope to bound abusive bulk-upload bursts against object storage.',\n },\n\n [Op.UPDATE]: {\n purpose: 'Patch metadata (status, linkage, size, storage pointers, media analytics) as upload/analyze/link/cleanup events occur.',\n outcome: 'The row stays synchronized with object storage, AV/extraction, and the parent business record that references the file.',\n whenToUse: 'Use in workers and trusted services; users never mutate this row ad hoc in consumer APIs.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The metadata patch (lifecycle `status`, `linkedResource*`, `size`, storage pointers, or media analytics) was applied and the updated record is returned. Internal/service write path owned by workers and trusted services.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No file metadata row exists for the supplied `fileId` to patch.' },\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The patch fails validation (e.g. an illegal `status` transition or a `linkedResource*` triple that breaks scope consistency).', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'A consumer caller attempts to mutate the row ad hoc — only workers and trusted services patch file metadata.' },\n ],\n idempotent: true,\n },\n\n [Op.DELETE]: {\n purpose: 'Mark or remove file metadata in coordination with object-storage deletion jobs.',\n outcome: 'The platform can enforce retention, GDPR erasure, and org teardown without orphan metadata references.',\n whenToUse: 'Use in compliance purges, org deletion, or when a business record severs a file attachment permanently.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.NO_CONTENT_204, meaning: 'The file metadata was soft-deleted / removed in coordination with object-storage cleanup; no body is returned. Internal/service path used in retention, GDPR erasure, and org teardown.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No file metadata row exists for the supplied `fileId` (or it was already deleted).' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not authorized to delete files in the row’s scope.' },\n ],\n idempotent: true,\n },\n },\n\n businessConstraints: [\n 'FILES declares NO `persistenceAdapter` — it follows the application default, so a file-metadata row and the resource row that owns it share one store and one native transaction (the pin that used to force MongoDB here was removed by the persistence-adapter parity work). This resource is precisely the case that must NOT declare one: it is written inside cross-resource atomic boundaries by design, so it could never make the `persistenceAdapterIsolation` claim that admits a divergent adapter.',\n 'Download authorization must still re-check the parent `z_file()` access policy: this row alone is not a permission boundary; `linkedResource*` fields and scope ids must be evaluated together with resource ACLs.',\n ],\n }),\n // Scope mirrors the registry-derived value: the `APPLICATION → FILES`\n // relationship in `resources-registry.shared.core.definitions.ts` carries\n // `isPrimaryScope: true` (applicationId is propagated to every file record\n // from the execution context), so the factory derives APPLICATION. Per-org /\n // per-user containment is enforced through the `linkedResource*` fields and\n // the parent `z_file()` access policy, not through the primary scope anchor.\n // Was ORGANIZATIONS until the companion alignment guard started pairing\n // engine specs with materialized core configs (2026-07-02) and flagged the\n // drift.\n { resourcePrimaryScope: ResourcePrimaryScope.APPLICATION },\n);\n"]}
1
+ {"version":3,"file":"files.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/files/resources/files.resource.specification.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,uBAAuB,EACvB,iBAAiB,EACjB,mBAAmB,EACnB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AkE,EAAE;aACzH;YACD,UAAU,EAAE,IAAI;SACjB;KACF;IAED,mBAAmB,EAAE;QACnB,gfAAgf;QAChf,oNAAoN;KACrN;CACF,CAAC;AACF,sEAAsE;AACtE,0EAA0E;AAC1E,2EAA2E;AAC3E,6EAA6E;AAC7E,4EAA4E;AAC5E,6EAA6E;AAC7E,wEAAwE;AACxE,2EAA2E;AAC3E,SAAS;AACT,EAAE,oBAAoB,EAAE,oBAAoB,CAAC,WAAW,EAAE,CAC3D,CAAC","sourcesContent":["/**\n * Resource: `files` — Wildo SaaS engine specification (backend-only).\n *\n * Inputs:\n * - Schema: engine/saas-models/src/files/files.shared.schemas.ts → `FileSchema`\n * - Factory: engine/saas-models/src/files/files.shared.resources-config.schemas.ts\n * → `filesResourceConfiguration_InitializationFactory`\n * - Custom operations: none\n * - UI presets: none\n */\n\nimport { LabelAudience } from '@wildo-ai/presets-components-models';\nimport {\n CodeDeclarationKind,\n CodeSymbolKind,\n FieldSemanticImportance,\n FileDisplayNature,\n FileStorageAccepted,\n FileUploaderEntityType,\n} from '@wildo-ai/zod-decorators';\nimport {\n CoreResourceOperation as Op,\n FileSchema,\n FileStatus,\n filesResourceConfiguration_InitializationFactory,\n ResourcePrimaryScope,\n} from '@wildo-ai/saas-models';\nimport { HttpResponseStatusCode, resourceSpecification } from '~wildo-specifications/_core';\nimport { EngineResourceSubDomain } from '../../engine-resource-sub-domain';\n\nexport const filesResourceSpecification = resourceSpecification(\n filesResourceConfiguration_InitializationFactory,\n FileSchema,\n ({ schemaShape }) => ({\n purpose: 'Store file metadata (name, MIME, storage pointers, lifecycle, and scope) for assets managed by the platform file service.',\n businessRole: 'The shared “file row” truth that links uploaded bytes in object storage to domain resources through `linkedResource*` fields.',\n lifecycleRole: 'Moves from `PENDING` upload through `UPLOADED`, optional AV / extraction states, linking to business records, and eventual `DELETED` / `ORPHANED` cleanup.',\n audience: LabelAudience.END_USER,\n subDomain: EngineResourceSubDomain.FILES,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'FileSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactory: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'filesResourceConfiguration_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: 'FILES',\n },\n operationVocabulary: {\n coreEnum: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceOperation',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n notes: [\n 'Upload and metadata responses derive FileReadiness from lifecycle status; readiness is not a persisted field. READY admits a new reference, PROCESSING requires refresh, ATTACHED represents an existing link and UNAVAILABLE refuses new attachment. Standard forms wait before publishing new references.',\n 'Repository-only resource: all operations are `REPOSITORY_ONLY` — `FilesBackendService` is the intended entry point, not public CRUD controllers.',\n 'Per-record `primaryScope` + scope id fields can represent APPLICATION, ORGANIZATIONS, or USER_SELF rows; the resource-level `resourcePrimaryScope` declared here is the registry default for the FILES type, not every row’s dynamic scope.',\n ],\n },\n\n fields: {\n fileId: schemaShape.fileId.stringSpec({\n meaning: 'Stable public identifier for this file metadata document, embedded in storage keys and download URLs. It is a virtual projection of the document’s underlying Mongo `_id` (`fileId === String(_id)`), so the file has a single stored identity and there is no separate persisted `fileId` field.',\n whyItMatters: 'This is the identifier other resources store in `z_file()` fields and that presigned URL flows reference. Because it projects `_id`, the value is allocated by the database at insert time rather than minted before the row exists, so creation is insert-first.',\n semanticRole: 'identifier',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n filename: schemaShape.filename.stringSpec({\n meaning: 'Sanitized filename used in UI and download headers.',\n importance: FieldSemanticImportance.PRIMARY,\n semanticRole: 'label',\n }),\n\n originalFilename: schemaShape.originalFilename.stringSpec({\n meaning: 'Original client-provided filename before sanitization for audit/support.',\n semanticRole: 'label',\n }),\n\n mimeType: schemaShape.mimeType.stringSpec({\n meaning: 'IANA-style MIME classification for validation, AV routing, and viewer choice.',\n importance: FieldSemanticImportance.PRIMARY,\n semanticRole: 'code',\n }),\n\n size: schemaShape.size.numberSpec({\n meaning: 'Byte length of the stored object after upload completes.',\n unit: 'bytes',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n extension: schemaShape.extension.stringSpec({\n meaning: 'Filename extension snapshot (without dot) for quick filtering when MIME is generic.',\n semanticRole: 'code',\n }),\n\n checksum: schemaShape.checksum.stringSpec({\n meaning: 'Optional content hash for deduplication and integrity checks after upload.',\n semanticRole: 'code',\n }),\n\n storageProvider: schemaShape.storageProvider.enumSpec({\n meaning: 'Which registered storage backend (S3-compatible, local, …) holds the bytes.',\n enumDeclaration: {\n packageName: '@wildo-ai/zod-decorators',\n exportName: 'FileStorageAccepted',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n values: {\n [FileStorageAccepted.WILDO_MANAGED]: { meaning: 'Managed object storage (S3-compatible) selected by the platform default configuration.' },\n [FileStorageAccepted.LOCAL_DIRECTORY]: { meaning: 'Local filesystem directory for development or air-gapped single-node installs.' },\n [FileStorageAccepted.ONEDRIVE]: {\n meaning: 'DECLARABLE BUT NOT IMPLEMENTED: the engine ships no OneDrive storage provider, so a field declaring this is refused at boot and at upload. '\n + 'There is no connector to enable and no environment variable that would serve it. OneDrive files can still be ATTACHED — the `microsoft-onedrive` '\n + 'provider contributes a v7.2 picker whose selections are ingested into the field\\'s own storage — but they are not STORED in OneDrive. '\n + 'The governed path is deferred by decision (#570); the member is kept declarable so the refusal can name it.',\n },\n [FileStorageAccepted.GOOGLE_DRIVE]: { meaning: 'Google Drive-backed storage: the bytes stay in the Drive of the person who linked (via the Drive picker) or uploaded the file, and are read through that person\\'s delegated grant — never an application credential. Deleting the row forgets the reference and leaves the file in their Drive.' },\n [FileStorageAccepted.DROPBOX]: {\n meaning: 'DECLARABLE BUT NOT IMPLEMENTED: the engine ships no Dropbox storage provider, so a field declaring this is refused at boot and at upload. '\n + 'There is no connector to enable and no environment variable that would serve it. Dropbox files can still be ATTACHED — the `dropbox` provider '\n + 'contributes a Chooser whose selections arrive as credential-free links and are ingested into the field\\'s own storage — but they are not STORED '\n + 'in Dropbox. Deliberately the same posture as ONEDRIVE, so that the governed path has one PROVEN implementation (GOOGLE_DRIVE) rather than three '\n + 'unproven ones; the member is kept declarable so the refusal can name it (#460).',\n },\n },\n }),\n\n storageRef: schemaShape.storageRef.stringSpec({\n meaning: 'Opaque handle the active storage adapter uses to retrieve bytes (bucket/key tuple is adapter-specific).',\n importance: FieldSemanticImportance.PRIMARY,\n semanticRole: 'identifier',\n }),\n\n storageKey: schemaShape.storageKey.stringSpec({\n meaning: 'Derived, human-debuggable key encoding the scope path (`app/...`, `org/...`, `user/...`) and `fileId`, used in logs and migrations. Because it depends on the database-assigned `fileId`, it is populated immediately after insert and is optional at rest until then.',\n importance: FieldSemanticImportance.PRIMARY,\n semanticRole: 'code',\n }),\n\n url: schemaShape.url.stringSpec({\n meaning: 'Cached HTTP(S) URL when a long-lived public or CDN URL is available (may be presigned elsewhere).',\n semanticRole: 'uri',\n }),\n\n status: schemaShape.status.enumSpec({\n meaning: 'Lifecycle state for upload, AV, linkage, and deletion. Text extraction/indexing state is NOT here — it lives on the per-field RAG chunk records.',\n importance: FieldSemanticImportance.PRIMARY,\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'FileStatus',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n values: {\n [FileStatus.PENDING]: { meaning: 'Upload not finished — metadata record exists, bytes not ready yet.' },\n [FileStatus.UPLOADED]: { meaning: 'Bytes are stored and ready for post-processing or linking.' },\n [FileStatus.LINKED]: { meaning: 'Bound to a parent resource’s `z_file()` field; primary happy path for production assets.' },\n [FileStatus.DELETED]: { meaning: 'Soft-deleted; bytes may still exist until vacuum jobs run.' },\n [FileStatus.ORPHANED]: { meaning: 'No live parent link — retained for re-link or background cleanup only.' },\n [FileStatus.FAILED]: { meaning: 'Upload or processing failed irrecoverably for this record.' },\n [FileStatus.SCANNING]: { meaning: 'AV pipeline is running before download is allowed in hardened tenants.' },\n [FileStatus.CLEAN]: { meaning: 'AV says the payload is not malicious.' },\n [FileStatus.INFECTED]: { meaning: 'Quarantine candidate — do not serve for download.' },\n [FileStatus.QUARANTINED]: { meaning: 'Isolated for operator review; download blocked by policy.' },\n },\n }),\n\n nature: schemaShape.nature.enumSpec({\n meaning: 'Resolved high-level file kind (image / video / document) used for template selection, not raw MIME subtypes alone.',\n enumDeclaration: {\n packageName: '@wildo-ai/zod-decorators',\n exportName: 'FileDisplayNature',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n values: {\n [FileDisplayNature.IMAGE]: { meaning: 'Raster/vector still asset suitable for lightbox and thumbnail UIs.' },\n [FileDisplayNature.VIDEO]: { meaning: 'Time-based media; shows duration and streaming-friendly player chrome.' },\n [FileDisplayNature.AUDIO]: { meaning: 'Sound-only media with duration metadata.' },\n [FileDisplayNature.DOCUMENT]: { meaning: 'Text-first assets such as office/PDF/structured docs.' },\n [FileDisplayNature.GENERIC]: { meaning: 'Fallback bucket when a generic download affordance is enough.' },\n },\n }),\n\n width: schemaShape.width.numberSpec({ meaning: 'Image/video width in pixels when known.' }),\n height: schemaShape.height.numberSpec({ meaning: 'Image/video height in pixels when known.' }),\n duration: schemaShape.duration.numberSpec({ meaning: 'Audio/video length in seconds when analyzers provide it.' }),\n pageCount: schemaShape.pageCount.numberSpec({ meaning: 'Page count for paginated document previews when the analyzer could infer it.' }),\n\n thumbnailUrl: schemaShape.thumbnailUrl.stringSpec({\n meaning: 'Optional derived thumbnail or poster frame URL for list/grid UIs.',\n semanticRole: 'uri',\n }),\n\n linkedResourceType: schemaShape.linkedResourceType.stringSpec({\n meaning: 'When linked, the `CoreResourceType` (string form) of the parent record carrying the `z_file()` field.',\n semanticRole: 'code',\n }),\n\n linkedResourceId: schemaShape.linkedResourceId.stringSpec({\n meaning: 'Primary id of the parent resource using this file, when linked.',\n semanticRole: 'identifier',\n }),\n\n linkedFieldName: schemaShape.linkedFieldName.stringSpec({\n meaning: 'Field name on the parent schema (e.g. `avatarId`) to support multi-file parents.',\n semanticRole: 'code',\n }),\n\n primaryScope: schemaShape.primaryScope.enumSpec({\n meaning: 'Which isolation bucket this record participates in: app-wide, org-wide, or user-private (within an org).',\n whyItMatters:\n 'Field is optional at rest until an upload binds scope identifiers; `FileSchema` superRefine enforces consistency between `primaryScope` and the id triple.',\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'ResourcePrimaryScope',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n values: {\n [ResourcePrimaryScope.APPLICATION]: { meaning: 'App-wide marketing/branding or singleton assets (uses `applicationId` only).' },\n [ResourcePrimaryScope.ORGANIZATIONS]: { meaning: 'Shared within a tenant; uses `organizationId` only.' },\n [ResourcePrimaryScope.USER_SELF]: { meaning: 'Private to a user, but still in org context; requires `organizationId` + `userId` per file scope rules.' },\n },\n }),\n\n applicationId: schemaShape.applicationId.stringSpec({\n meaning: 'Parent application id when `primaryScope` is `APPLICATION`.',\n semanticRole: 'identifier',\n }),\n\n organizationId: schemaShape.organizationId.stringSpec({\n meaning: 'Org id for org-scoped files and as local context for user-private files.',\n semanticRole: 'identifier',\n }),\n\n userId: schemaShape.userId.stringSpec({\n meaning: 'User id for `USER_SELF` scoped file records, paired with `organizationId` as required by `validateFileScopeIdentifiers`.',\n semanticRole: 'identifier',\n }),\n\n uploadedBy: schemaShape.uploadedBy.stringSpec({\n meaning: 'Raw uploader id when the uploader is not necessarily a Wildo `users` record (service principal, system job, …).',\n semanticRole: 'identifier',\n }),\n\n uploadedByEntityType: schemaShape.uploadedByEntityType.enumSpec({\n meaning: 'What kind of principal `uploadedBy` references so hydration code can disambiguate cross-entity uploaders.',\n enumDeclaration: {\n packageName: '@wildo-ai/zod-decorators',\n exportName: 'FileUploaderEntityType',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n values: {\n [FileUploaderEntityType.USER]: { meaning: 'Uploader is a people identity from the `users` table.' },\n [FileUploaderEntityType.ANONYMOUS_USER]: { meaning: 'Uploader is an anonymous marketing-site session before account creation.' },\n [FileUploaderEntityType.ORGANIZATION_MACHINE]: { meaning: 'Uploader is an org-scoped MACHINE principal (M2M automation) — an api-key OR an OAuth client; the specific credential kind + id are on `initiatorIds.machineCredential`.' },\n [FileUploaderEntityType.APPLICATION_MACHINE]: { meaning: 'Uploader is an app-scoped MACHINE principal (integration jobs) — an api-key OR an OAuth client; the specific credential kind + id are on `initiatorIds.machineCredential`.' },\n },\n }),\n\n uploadedAt: schemaShape.uploadedAt.dateSpec({\n meaning: 'When the file bytes finished uploading to storage.',\n temporalRole: 'occurred',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n updatedAt: schemaShape.updatedAt.dateSpec({\n meaning: 'Last time metadata or link state on this document changed (excluding every storage adapter retry).',\n temporalRole: 'modified',\n }),\n\n deletedAt: schemaShape.deletedAt.dateSpec({\n meaning: 'When the file entered a soft-deleted / tombstone state for background purge.',\n temporalRole: 'occurred',\n }),\n },\n\n operations: {\n [Op.READ]: {\n purpose: 'Resolve a single `File` row, usually when issuing download authorization or parent hydration.',\n outcome: 'Callers can trust storage pointers, status, and linkage fields before streaming bytes to the client.',\n whenToUse: 'Use in server-side `FilesBackendService` flows — not exposed to anonymous callers for arbitrary ids.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The file metadata record for the supplied `fileId` was found and its storage pointers, lifecycle `status`, and `linkedResource*` fields are returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No file metadata row exists for the supplied `fileId` (never created, or already hard-deleted after soft-delete vacuum).' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not authorized for the row’s scope — download authorization must still re-check the parent `z_file()` ACL; this row alone is not a permission boundary (see `businessConstraints`).' },\n ],\n idempotent: true,\n },\n\n [Op.LIST]: {\n purpose: 'Enumerate file rows filtered by uploader, parent linkage, or scope in repository queries.',\n outcome: 'Background jobs and admin UIs can page through the storage ledger under org/app isolation.',\n whenToUse: 'Use in cleanup jobs, quota dashboards, or when syncing CDN metadata for the tenant.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of file metadata records matching the uploader / linkage / scope filters under org/app isolation.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the role required to page the storage ledger for the requested scope.' },\n ],\n idempotent: true,\n },\n\n [Op.CREATE]: {\n purpose: 'Materialize a new metadata document for an upload flow; the database assigns the row’s identity (`_id`, projected as `fileId`) at insert, so the row — and its `fileId` — can be created before or after the bytes exist.',\n outcome: 'The system gets a first-class file row that can track upload progress, checksums, and eventual linking.',\n whenToUse: 'Use on upload start or completion events before linking to a parent resource’s `z_file()` slot.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'A file metadata record was materialized with its server-assigned `fileId` and initial `PENDING`/`UPLOADED` status. Internal/service write path — `FilesBackendService` drives this from upload flows, not a public CRUD controller.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The upload metadata fails validation — a disallowed `mimeType`, a `size` over the configured per-scope upload limit (over-size is surfaced here, not as a transport-level 413), or scope ids inconsistent with `primaryScope` per `validateFileScopeIdentifiers`.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not authorized to upload into the requested scope (org/app/user-self isolation bucket).' },\n ],\n idempotent: false,\n examples: [\n {\n title: 'Materialize a file row on upload start',\n request: {\n filename: 'release-notes.pdf',\n mimeType: 'application/pdf',\n size: 248213,\n primaryScope: ResourcePrimaryScope.ORGANIZATIONS,\n organizationId: 'org_01HX2…',\n },\n response: {\n fileId: 'file_01HX2…',\n filename: 'release-notes.pdf',\n mimeType: 'application/pdf',\n size: 248213,\n status: FileStatus.PENDING,\n primaryScope: ResourcePrimaryScope.ORGANIZATIONS,\n },\n forStatus: HttpResponseStatusCode.CREATED_201,\n },\n ],\n rateLimitNote: 'Upload materialization is the hot path for client file submissions; throttle per uploader/scope to bound abusive bulk-upload bursts against object storage.',\n },\n\n [Op.UPDATE]: {\n purpose: 'Patch metadata (status, linkage, size, storage pointers, media analytics) as upload/analyze/link/cleanup events occur.',\n outcome: 'The row stays synchronized with object storage, AV/extraction, and the parent business record that references the file.',\n whenToUse: 'Use in workers and trusted services; users never mutate this row ad hoc in consumer APIs.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The metadata patch (lifecycle `status`, `linkedResource*`, `size`, storage pointers, or media analytics) was applied and the updated record is returned. Internal/service write path owned by workers and trusted services.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No file metadata row exists for the supplied `fileId` to patch.' },\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The patch fails validation (e.g. an illegal `status` transition or a `linkedResource*` triple that breaks scope consistency).', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'A consumer caller attempts to mutate the row ad hoc — only workers and trusted services patch file metadata.' },\n ],\n idempotent: true,\n },\n\n [Op.DELETE]: {\n purpose: 'Mark or remove file metadata in coordination with object-storage deletion jobs.',\n outcome: 'The platform can enforce retention, GDPR erasure, and org teardown without orphan metadata references.',\n whenToUse: 'Use in compliance purges, org deletion, or when a business record severs a file attachment permanently.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.NO_CONTENT_204, meaning: 'The file metadata was soft-deleted / removed in coordination with object-storage cleanup; no body is returned. Internal/service path used in retention, GDPR erasure, and org teardown.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No file metadata row exists for the supplied `fileId` (or it was already deleted).' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not authorized to delete files in the row’s scope.' },\n ],\n idempotent: true,\n },\n },\n\n businessConstraints: [\n 'FILES declares NO `persistenceAdapter` — it follows the application default, so a file-metadata row and the resource row that owns it share one store and one native transaction (the pin that used to force MongoDB here was removed by the persistence-adapter parity work). This resource is precisely the case that must NOT declare one: it is written inside cross-resource atomic boundaries by design, so it could never make the `persistenceAdapterIsolation` claim that admits a divergent adapter.',\n 'Download authorization must still re-check the parent `z_file()` access policy: this row alone is not a permission boundary; `linkedResource*` fields and scope ids must be evaluated together with resource ACLs.',\n ],\n }),\n // Scope mirrors the registry-derived value: the `APPLICATION → FILES`\n // relationship in `resources-registry.shared.core.definitions.ts` carries\n // `isPrimaryScope: true` (applicationId is propagated to every file record\n // from the execution context), so the factory derives APPLICATION. Per-org /\n // per-user containment is enforced through the `linkedResource*` fields and\n // the parent `z_file()` access policy, not through the primary scope anchor.\n // Was ORGANIZATIONS until the companion alignment guard started pairing\n // engine specs with materialized core configs (2026-07-02) and flagged the\n // drift.\n { resourcePrimaryScope: ResourcePrimaryScope.APPLICATION },\n);\n"]}
@@ -6,6 +6,7 @@ export declare const userFlowActorExecutionsResourceSpecification: import("../..
6
6
  kind: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodEnum<typeof FlowActorSystem_Kind>>>>;
7
7
  resourceServerInstanceRef: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodString>;
8
8
  machineCredentialId: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodString>;
9
+ contextRef: import("zod").ZodDefault<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodString>>>;
9
10
  status: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodEnum<typeof FlowsActors_Status>>>;
10
11
  statusChanges: import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodObject<{
11
12
  status: import("zod").ZodEnum<typeof FlowsActors_Status>;
@@ -31,6 +32,7 @@ export declare const organizationFlowActorExecutionsResourceSpecification: impor
31
32
  kind: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodEnum<typeof FlowActorSystem_Kind>>>>;
32
33
  resourceServerInstanceRef: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodString>;
33
34
  machineCredentialId: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodString>;
35
+ contextRef: import("zod").ZodDefault<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodString>>>;
34
36
  status: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodEnum<typeof FlowsActors_Status>>>;
35
37
  statusChanges: import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodObject<{
36
38
  status: import("zod").ZodEnum<typeof FlowsActors_Status>;
@@ -56,6 +58,7 @@ export declare const applicationFlowActorExecutionsResourceSpecification: import
56
58
  kind: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodEnum<typeof FlowActorSystem_Kind>>>>;
57
59
  resourceServerInstanceRef: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodString>;
58
60
  machineCredentialId: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodString>;
61
+ contextRef: import("zod").ZodDefault<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodString>>>;
59
62
  status: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodEnum<typeof FlowsActors_Status>>>;
60
63
  statusChanges: import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodObject<{
61
64
  status: import("zod").ZodEnum<typeof FlowsActors_Status>;
@@ -1 +1 @@
1
- {"version":3,"file":"flow-actor-executions.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/flows-actors/resources/flow-actor-executions.resource.specification.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,qBAAqB,IAAI,EAAE,EAI3B,4BAA4B,EAC5B,8BAA8B,EAC9B,oBAAoB,EACpB,kBAAkB,EAGnB,MAAM,uBAAuB,CAAC;AA8Y/B,eAAO,MAAM,4CAA4C;;;;;;;;;;;;;;;;;;;;;;;;iCAGxD,CAAC;AAEF,eAAO,MAAM,oDAAoD;;;;;;;;;;;;;;;;;;;;;;;;iCAGhE,CAAC;AAEF,eAAO,MAAM,mDAAmD;;;;;;;;;;;;;;;;;;;;;;;;iCAG/D,CAAC"}
1
+ {"version":3,"file":"flow-actor-executions.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/flows-actors/resources/flow-actor-executions.resource.specification.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,qBAAqB,IAAI,EAAE,EAI3B,4BAA4B,EAC5B,8BAA8B,EAC9B,oBAAoB,EACpB,kBAAkB,EAGnB,MAAM,uBAAuB,CAAC;AA8Y/B,eAAO,MAAM,4CAA4C;;;;;;;;;;;;;;;;;;;;;;;;;iCAGxD,CAAC;AAEF,eAAO,MAAM,oDAAoD;;;;;;;;;;;;;;;;;;;;;;;;;iCAGhE,CAAC;AAEF,eAAO,MAAM,mDAAmD;;;;;;;;;;;;;;;;;;;;;;;;;iCAG/D,CAAC"}
@@ -192,7 +192,7 @@ function buildFlowActorExecutionResourceSpecification(resourceType, resourceType
192
192
  [FlowsActors_Status.READY]: { meaning: 'Created and ready to begin processing.' },
193
193
  [FlowsActors_Status.PENDING]: { meaning: 'Accepted but not yet actively processing.' },
194
194
  [FlowsActors_Status.PROCESSING]: { meaning: 'Actively running — the agent is responding / tools are executing.' },
195
- [FlowsActors_Status.AWAITING_APPROVAL]: { meaning: 'Suspended at a human-in-the-loop approval boundary — the agent called an approval-gated tool and the turn is waiting for a human decision before resuming. Non-terminal; resolves to PROCESSING→COMPLETED on approval or a terminal state on denial/expiry.' },
195
+ [FlowsActors_Status.AWAITING_APPROVAL]: { meaning: 'Suspended at a human-in-the-loop approval boundary — the agent called an approval-gated tool and the turn is waiting for a human decision before resuming. Non-terminal. A decision — approval or denial — resumes it to PROCESSING (a denial resumes so the agent can respond to the refusal). If nobody answers before its approval window closes it becomes FAILED: a decision arriving late is refused, and an hourly sweep fails a pause that was never answered.' },
196
196
  [FlowsActors_Status.COMPLETED]: { meaning: 'Finished successfully.' },
197
197
  [FlowsActors_Status.FAILED]: { meaning: 'Finished unsuccessfully and stands in a failed state.' },
198
198
  [FlowsActors_Status.CANCELLED]: { meaning: 'Intentionally stopped before completion.' },