@wildo-ai/saas-specifications 1.1.1 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (423) hide show
  1. package/dist/assurance/external-framework-mapping.json +980 -0
  2. package/dist/esm/_core/brand/brand.family-aspects.d.ts +3 -0
  3. package/dist/esm/_core/brand/brand.family-aspects.d.ts.map +1 -0
  4. package/dist/esm/_core/brand/brand.family-aspects.js +51 -0
  5. package/dist/esm/_core/brand/brand.family-aspects.js.map +1 -0
  6. package/dist/esm/_core/build-plan/build-plan.family-aspects.d.ts +3 -0
  7. package/dist/esm/_core/build-plan/build-plan.family-aspects.d.ts.map +1 -0
  8. package/dist/esm/_core/build-plan/build-plan.family-aspects.js +28 -0
  9. package/dist/esm/_core/build-plan/build-plan.family-aspects.js.map +1 -0
  10. package/dist/esm/_core/business-model-lite/business-model.family-aspects.d.ts +3 -0
  11. package/dist/esm/_core/business-model-lite/business-model.family-aspects.d.ts.map +1 -0
  12. package/dist/esm/_core/business-model-lite/business-model.family-aspects.js +21 -0
  13. package/dist/esm/_core/business-model-lite/business-model.family-aspects.js.map +1 -0
  14. package/dist/esm/_core/chart-view-specification.schemas.d.ts +11 -0
  15. package/dist/esm/_core/chart-view-specification.schemas.d.ts.map +1 -1
  16. package/dist/esm/_core/chart-view-specification.schemas.js.map +1 -1
  17. package/dist/esm/_core/compliance-documents/compliance-document-candidate-generation.schemas.d.ts +85 -0
  18. package/dist/esm/_core/compliance-documents/compliance-document-candidate-generation.schemas.d.ts.map +1 -1
  19. package/dist/esm/_core/compliance-documents/compliance-document-candidate-generation.schemas.js +41 -0
  20. package/dist/esm/_core/compliance-documents/compliance-document-candidate-generation.schemas.js.map +1 -1
  21. package/dist/esm/_core/compliance-documents/compliance-document-candidate.schemas.d.ts +168 -2
  22. package/dist/esm/_core/compliance-documents/compliance-document-candidate.schemas.d.ts.map +1 -1
  23. package/dist/esm/_core/compliance-documents/compliance-document-candidate.schemas.js +98 -9
  24. package/dist/esm/_core/compliance-documents/compliance-document-candidate.schemas.js.map +1 -1
  25. package/dist/esm/_core/compliance-documents/compliance-documents.family-aspects.d.ts +12 -0
  26. package/dist/esm/_core/compliance-documents/compliance-documents.family-aspects.d.ts.map +1 -0
  27. package/dist/esm/_core/compliance-documents/compliance-documents.family-aspects.js +47 -0
  28. package/dist/esm/_core/compliance-documents/compliance-documents.family-aspects.js.map +1 -0
  29. package/dist/esm/_core/compliance-documents/document-fact-specification-generation.schemas.d.ts.map +1 -1
  30. package/dist/esm/_core/compliance-documents/document-fact-specification-generation.schemas.js +8 -3
  31. package/dist/esm/_core/compliance-documents/document-fact-specification-generation.schemas.js.map +1 -1
  32. package/dist/esm/_core/compliance-documents/processor-register.family-aspects.d.ts +21 -0
  33. package/dist/esm/_core/compliance-documents/processor-register.family-aspects.d.ts.map +1 -0
  34. package/dist/esm/_core/compliance-documents/processor-register.family-aspects.js +40 -0
  35. package/dist/esm/_core/compliance-documents/processor-register.family-aspects.js.map +1 -0
  36. package/dist/esm/_core/composite-view-specification.schemas.d.ts +11 -0
  37. package/dist/esm/_core/composite-view-specification.schemas.d.ts.map +1 -1
  38. package/dist/esm/_core/composite-view-specification.schemas.js.map +1 -1
  39. package/dist/esm/_core/domain-plan/domain-plan.family-aspects.d.ts +3 -0
  40. package/dist/esm/_core/domain-plan/domain-plan.family-aspects.d.ts.map +1 -0
  41. package/dist/esm/_core/domain-plan/domain-plan.family-aspects.js +32 -0
  42. package/dist/esm/_core/domain-plan/domain-plan.family-aspects.js.map +1 -0
  43. package/dist/esm/_core/execution-view-specification.schemas.d.ts +11 -0
  44. package/dist/esm/_core/execution-view-specification.schemas.d.ts.map +1 -1
  45. package/dist/esm/_core/execution-view-specification.schemas.js.map +1 -1
  46. package/dist/esm/_core/family-aspects.registry.d.ts +18 -0
  47. package/dist/esm/_core/family-aspects.registry.d.ts.map +1 -0
  48. package/dist/esm/_core/family-aspects.registry.js +60 -0
  49. package/dist/esm/_core/family-aspects.registry.js.map +1 -0
  50. package/dist/esm/_core/family-aspects.schemas.d.ts +122 -0
  51. package/dist/esm/_core/family-aspects.schemas.d.ts.map +1 -0
  52. package/dist/esm/_core/family-aspects.schemas.js +15 -0
  53. package/dist/esm/_core/family-aspects.schemas.js.map +1 -0
  54. package/dist/esm/_core/feature-drafts/capability-map-output-set-generation.schemas.d.ts +11 -11
  55. package/dist/esm/_core/feature-drafts/feature-drafts.family-aspects.d.ts +3 -0
  56. package/dist/esm/_core/feature-drafts/feature-drafts.family-aspects.d.ts.map +1 -0
  57. package/dist/esm/_core/feature-drafts/feature-drafts.family-aspects.js +25 -0
  58. package/dist/esm/_core/feature-drafts/feature-drafts.family-aspects.js.map +1 -0
  59. package/dist/esm/_core/flows-actors-view-specification.schemas.d.ts +11 -0
  60. package/dist/esm/_core/flows-actors-view-specification.schemas.d.ts.map +1 -1
  61. package/dist/esm/_core/flows-actors-view-specification.schemas.js.map +1 -1
  62. package/dist/esm/_core/frontend-component-specification.schemas.d.ts.map +1 -1
  63. package/dist/esm/_core/frontend-component-specification.schemas.js +19 -1
  64. package/dist/esm/_core/frontend-component-specification.schemas.js.map +1 -1
  65. package/dist/esm/_core/full-custom-view-specification.schemas.d.ts +11 -0
  66. package/dist/esm/_core/full-custom-view-specification.schemas.d.ts.map +1 -1
  67. package/dist/esm/_core/full-custom-view-specification.schemas.js.map +1 -1
  68. package/dist/esm/_core/guidance-flow-specification.schemas.d.ts +11 -0
  69. package/dist/esm/_core/guidance-flow-specification.schemas.d.ts.map +1 -1
  70. package/dist/esm/_core/guidance-flow-specification.schemas.js +14 -0
  71. package/dist/esm/_core/guidance-flow-specification.schemas.js.map +1 -1
  72. package/dist/esm/_core/index.d.ts +2 -0
  73. package/dist/esm/_core/index.d.ts.map +1 -1
  74. package/dist/esm/_core/index.js +2 -0
  75. package/dist/esm/_core/index.js.map +1 -1
  76. package/dist/esm/_core/market/market-snapshot-generation.schemas.d.ts +22 -22
  77. package/dist/esm/_core/market/market.family-aspects.d.ts +9 -0
  78. package/dist/esm/_core/market/market.family-aspects.d.ts.map +1 -0
  79. package/dist/esm/_core/market/market.family-aspects.js +227 -0
  80. package/dist/esm/_core/market/market.family-aspects.js.map +1 -0
  81. package/dist/esm/_core/onboarding-view-specification.schemas.d.ts +11 -0
  82. package/dist/esm/_core/onboarding-view-specification.schemas.d.ts.map +1 -1
  83. package/dist/esm/_core/onboarding-view-specification.schemas.js +14 -0
  84. package/dist/esm/_core/onboarding-view-specification.schemas.js.map +1 -1
  85. package/dist/esm/_core/placement-plan/placement-plan.family-aspects.d.ts +3 -0
  86. package/dist/esm/_core/placement-plan/placement-plan.family-aspects.d.ts.map +1 -0
  87. package/dist/esm/_core/placement-plan/placement-plan.family-aspects.js +31 -0
  88. package/dist/esm/_core/placement-plan/placement-plan.family-aspects.js.map +1 -0
  89. package/dist/esm/_core/requirements/requirements.family-aspects.d.ts +9 -0
  90. package/dist/esm/_core/requirements/requirements.family-aspects.d.ts.map +1 -0
  91. package/dist/esm/_core/requirements/requirements.family-aspects.js +40 -0
  92. package/dist/esm/_core/requirements/requirements.family-aspects.js.map +1 -0
  93. package/dist/esm/_core/resource-specification.schemas.d.ts +22 -0
  94. package/dist/esm/_core/resource-specification.schemas.d.ts.map +1 -1
  95. package/dist/esm/_core/resource-specification.schemas.js.map +1 -1
  96. package/dist/esm/_core/roadmap/roadmap.family-aspects.d.ts +3 -0
  97. package/dist/esm/_core/roadmap/roadmap.family-aspects.d.ts.map +1 -0
  98. package/dist/esm/_core/roadmap/roadmap.family-aspects.js +26 -0
  99. package/dist/esm/_core/roadmap/roadmap.family-aspects.js.map +1 -0
  100. package/dist/esm/_core/vision/vision.family-aspects.d.ts +11 -0
  101. package/dist/esm/_core/vision/vision.family-aspects.d.ts.map +1 -0
  102. package/dist/esm/_core/vision/vision.family-aspects.js +63 -0
  103. package/dist/esm/_core/vision/vision.family-aspects.js.map +1 -0
  104. package/dist/esm/application-creation/application-document-fact-specification.application-creation.schemas.d.ts +188 -33
  105. package/dist/esm/application-creation/application-document-fact-specification.application-creation.schemas.d.ts.map +1 -1
  106. package/dist/esm/application-creation/application-document-fact-specification.application-creation.schemas.js +158 -57
  107. package/dist/esm/application-creation/application-document-fact-specification.application-creation.schemas.js.map +1 -1
  108. package/dist/esm/application-creation/application-specification-family-identity.application-creation.schemas.d.ts +38 -4
  109. package/dist/esm/application-creation/application-specification-family-identity.application-creation.schemas.d.ts.map +1 -1
  110. package/dist/esm/application-creation/application-specification-family-identity.application-creation.schemas.js +37 -3
  111. package/dist/esm/application-creation/application-specification-family-identity.application-creation.schemas.js.map +1 -1
  112. package/dist/esm/application-creation/document-facts.family-aspects.d.ts +12 -0
  113. package/dist/esm/application-creation/document-facts.family-aspects.d.ts.map +1 -0
  114. package/dist/esm/application-creation/document-facts.family-aspects.js +37 -0
  115. package/dist/esm/application-creation/document-facts.family-aspects.js.map +1 -0
  116. package/dist/esm/application-creation/document-release-policy.family-aspects.d.ts +3 -0
  117. package/dist/esm/application-creation/document-release-policy.family-aspects.d.ts.map +1 -0
  118. package/dist/esm/application-creation/document-release-policy.family-aspects.js +23 -0
  119. package/dist/esm/application-creation/document-release-policy.family-aspects.js.map +1 -0
  120. package/dist/esm/application-creation/playbooks.application-creation.schemas.d.ts +93 -62
  121. package/dist/esm/application-creation/playbooks.application-creation.schemas.d.ts.map +1 -1
  122. package/dist/esm/application-creation/playbooks.application-creation.schemas.js +114 -59
  123. package/dist/esm/application-creation/playbooks.application-creation.schemas.js.map +1 -1
  124. package/dist/esm/application-creation/structured-artifact-landing.application-creation.schemas.d.ts +2 -0
  125. package/dist/esm/application-creation/structured-artifact-landing.application-creation.schemas.d.ts.map +1 -1
  126. package/dist/esm/application-creation/structured-artifact-landing.application-creation.schemas.js +2 -0
  127. package/dist/esm/application-creation/structured-artifact-landing.application-creation.schemas.js.map +1 -1
  128. package/dist/esm/application-creation.exports.d.ts +11 -0
  129. package/dist/esm/application-creation.exports.d.ts.map +1 -1
  130. package/dist/esm/application-creation.exports.js +11 -0
  131. package/dist/esm/application-creation.exports.js.map +1 -1
  132. package/dist/esm/assurance/assurance-authority-basis.definitions.d.ts +976 -2
  133. package/dist/esm/assurance/assurance-authority-basis.definitions.d.ts.map +1 -1
  134. package/dist/esm/assurance/assurance-authority-basis.definitions.js +2026 -61
  135. package/dist/esm/assurance/assurance-authority-basis.definitions.js.map +1 -1
  136. package/dist/esm/assurance/assurance-authority-basis.schemas.d.ts +1 -0
  137. package/dist/esm/assurance/assurance-authority-basis.schemas.d.ts.map +1 -1
  138. package/dist/esm/assurance/assurance-document-system.definitions.d.ts.map +1 -1
  139. package/dist/esm/assurance/assurance-document-system.definitions.js +18 -3
  140. package/dist/esm/assurance/assurance-document-system.definitions.js.map +1 -1
  141. package/dist/esm/assurance/assurance-document-system.schemas.d.ts +32 -2
  142. package/dist/esm/assurance/assurance-document-system.schemas.d.ts.map +1 -1
  143. package/dist/esm/assurance/assurance-document-system.schemas.js +32 -2
  144. package/dist/esm/assurance/assurance-document-system.schemas.js.map +1 -1
  145. package/dist/esm/assurance/assurance-external-framework-mapping.d.ts +90 -0
  146. package/dist/esm/assurance/assurance-external-framework-mapping.d.ts.map +1 -0
  147. package/dist/esm/assurance/assurance-external-framework-mapping.js +134 -0
  148. package/dist/esm/assurance/assurance-external-framework-mapping.js.map +1 -0
  149. package/dist/esm/assurance/assurance-objective-catalog.definitions.d.ts +71 -1
  150. package/dist/esm/assurance/assurance-objective-catalog.definitions.d.ts.map +1 -1
  151. package/dist/esm/assurance/assurance-objective-catalog.definitions.js +545 -5
  152. package/dist/esm/assurance/assurance-objective-catalog.definitions.js.map +1 -1
  153. package/dist/esm/assurance/assurance-program-generation.schemas.d.ts +141 -0
  154. package/dist/esm/assurance/assurance-program-generation.schemas.d.ts.map +1 -0
  155. package/dist/esm/assurance/assurance-program-generation.schemas.js +377 -0
  156. package/dist/esm/assurance/assurance-program-generation.schemas.js.map +1 -0
  157. package/dist/esm/assurance/assurance-program.family-aspects.d.ts +13 -0
  158. package/dist/esm/assurance/assurance-program.family-aspects.d.ts.map +1 -0
  159. package/dist/esm/assurance/assurance-program.family-aspects.js +16 -0
  160. package/dist/esm/assurance/assurance-program.family-aspects.js.map +1 -0
  161. package/dist/esm/assurance/assurance-program.schemas.d.ts +30 -6
  162. package/dist/esm/assurance/assurance-program.schemas.d.ts.map +1 -1
  163. package/dist/esm/assurance/assurance-program.schemas.js +29 -6
  164. package/dist/esm/assurance/assurance-program.schemas.js.map +1 -1
  165. package/dist/esm/assurance/assurance-source-registry.definitions.d.ts +1 -0
  166. package/dist/esm/assurance/assurance-source-registry.definitions.d.ts.map +1 -1
  167. package/dist/esm/assurance/assurance-source-registry.definitions.js +12 -0
  168. package/dist/esm/assurance/assurance-source-registry.definitions.js.map +1 -1
  169. package/dist/esm/assurance/assurance-sources.schemas.d.ts +76 -0
  170. package/dist/esm/assurance/assurance-sources.schemas.d.ts.map +1 -1
  171. package/dist/esm/assurance/assurance-sources.schemas.js +59 -0
  172. package/dist/esm/assurance/assurance-sources.schemas.js.map +1 -1
  173. package/dist/esm/assurance/document-publication.family-aspects.d.ts +29 -0
  174. package/dist/esm/assurance/document-publication.family-aspects.d.ts.map +1 -0
  175. package/dist/esm/assurance/document-publication.family-aspects.js +48 -0
  176. package/dist/esm/assurance/document-publication.family-aspects.js.map +1 -0
  177. package/dist/esm/assurance.exports.d.ts +2 -0
  178. package/dist/esm/assurance.exports.d.ts.map +1 -1
  179. package/dist/esm/assurance.exports.js +2 -0
  180. package/dist/esm/assurance.exports.js.map +1 -1
  181. package/dist/esm/companion-exports.d.ts +19 -2
  182. package/dist/esm/companion-exports.d.ts.map +1 -1
  183. package/dist/esm/companion-exports.js.map +1 -1
  184. package/dist/esm/engine/applications/resources/application-api-keys.resource.specification.d.ts.map +1 -1
  185. package/dist/esm/engine/applications/resources/application-api-keys.resource.specification.js +2 -0
  186. package/dist/esm/engine/applications/resources/application-api-keys.resource.specification.js.map +1 -1
  187. package/dist/esm/engine/applications/resources/application-metadata.resource.specification.d.ts.map +1 -1
  188. package/dist/esm/engine/applications/resources/application-metadata.resource.specification.js +3 -1
  189. package/dist/esm/engine/applications/resources/application-metadata.resource.specification.js.map +1 -1
  190. package/dist/esm/engine/applications/resources/application-oauth-clients.resource.specification.d.ts.map +1 -1
  191. package/dist/esm/engine/applications/resources/application-oauth-clients.resource.specification.js +3 -1
  192. package/dist/esm/engine/applications/resources/application-oauth-clients.resource.specification.js.map +1 -1
  193. package/dist/esm/engine/applications/resources/application-versions.resource.specification.d.ts.map +1 -1
  194. package/dist/esm/engine/applications/resources/application-versions.resource.specification.js +3 -1
  195. package/dist/esm/engine/applications/resources/application-versions.resource.specification.js.map +1 -1
  196. package/dist/esm/engine/applications/resources/applications.resource.specification.d.ts.map +1 -1
  197. package/dist/esm/engine/applications/resources/applications.resource.specification.js +3 -1
  198. package/dist/esm/engine/applications/resources/applications.resource.specification.js.map +1 -1
  199. package/dist/esm/engine/auth/resources/consumable-tokens.resource.specification.d.ts +36 -0
  200. package/dist/esm/engine/auth/resources/consumable-tokens.resource.specification.d.ts.map +1 -0
  201. package/dist/esm/engine/auth/resources/consumable-tokens.resource.specification.js +193 -0
  202. package/dist/esm/engine/auth/resources/consumable-tokens.resource.specification.js.map +1 -0
  203. package/dist/esm/engine/auth/resources/oauth-consent-grants.resource.specification.d.ts +1 -1
  204. package/dist/esm/engine/auth/resources/oauth-consent-grants.resource.specification.d.ts.map +1 -1
  205. package/dist/esm/engine/auth/resources/oauth-consent-grants.resource.specification.js +2 -0
  206. package/dist/esm/engine/auth/resources/oauth-consent-grants.resource.specification.js.map +1 -1
  207. package/dist/esm/engine/auth/resources/organization-api-keys.resource.specification.d.ts.map +1 -1
  208. package/dist/esm/engine/auth/resources/organization-api-keys.resource.specification.js +2 -0
  209. package/dist/esm/engine/auth/resources/organization-api-keys.resource.specification.js.map +1 -1
  210. package/dist/esm/engine/auth/resources/organization-oauth-clients.resource.specification.d.ts.map +1 -1
  211. package/dist/esm/engine/auth/resources/organization-oauth-clients.resource.specification.js +3 -1
  212. package/dist/esm/engine/auth/resources/organization-oauth-clients.resource.specification.js.map +1 -1
  213. package/dist/esm/engine/auth/resources/platform-access-grants.resource.specification.d.ts +1 -1
  214. package/dist/esm/engine/auth/resources/platform-access-grants.resource.specification.d.ts.map +1 -1
  215. package/dist/esm/engine/auth/resources/platform-access-grants.resource.specification.js +2 -0
  216. package/dist/esm/engine/auth/resources/platform-access-grants.resource.specification.js.map +1 -1
  217. package/dist/esm/engine/auth/resources/scim-provisioning-config.resource.specification.d.ts.map +1 -1
  218. package/dist/esm/engine/auth/resources/scim-provisioning-config.resource.specification.js +2 -0
  219. package/dist/esm/engine/auth/resources/scim-provisioning-config.resource.specification.js.map +1 -1
  220. package/dist/esm/engine/auth/resources/scim-tokens.resource.specification.d.ts.map +1 -1
  221. package/dist/esm/engine/auth/resources/scim-tokens.resource.specification.js +2 -0
  222. package/dist/esm/engine/auth/resources/scim-tokens.resource.specification.js.map +1 -1
  223. package/dist/esm/engine/auth/resources/siem-delivery-dlq.resource.specification.d.ts.map +1 -1
  224. package/dist/esm/engine/auth/resources/siem-delivery-dlq.resource.specification.js +2 -0
  225. package/dist/esm/engine/auth/resources/siem-delivery-dlq.resource.specification.js.map +1 -1
  226. package/dist/esm/engine/auth/resources/siem-export-config.resource.specification.d.ts.map +1 -1
  227. package/dist/esm/engine/auth/resources/siem-export-config.resource.specification.js +6 -4
  228. package/dist/esm/engine/auth/resources/siem-export-config.resource.specification.js.map +1 -1
  229. package/dist/esm/engine/auth/resources/sso-config.resource.specification.d.ts.map +1 -1
  230. package/dist/esm/engine/auth/resources/sso-config.resource.specification.js +2 -0
  231. package/dist/esm/engine/auth/resources/sso-config.resource.specification.js.map +1 -1
  232. package/dist/esm/engine/auth/resources/sso-connections.resource.specification.d.ts.map +1 -1
  233. package/dist/esm/engine/auth/resources/sso-connections.resource.specification.js +2 -0
  234. package/dist/esm/engine/auth/resources/sso-connections.resource.specification.js.map +1 -1
  235. package/dist/esm/engine/billing/resources/billing-accounts.resource.specification.d.ts +2 -2
  236. package/dist/esm/engine/billing/resources/billing-accounts.resource.specification.d.ts.map +1 -1
  237. package/dist/esm/engine/billing/resources/billing-accounts.resource.specification.js +2 -0
  238. package/dist/esm/engine/billing/resources/billing-accounts.resource.specification.js.map +1 -1
  239. package/dist/esm/engine/billing/resources/credit-pools.resource.specification.d.ts +8 -8
  240. package/dist/esm/engine/billing/resources/credit-pools.resource.specification.d.ts.map +1 -1
  241. package/dist/esm/engine/billing/resources/credit-pools.resource.specification.js +2 -0
  242. package/dist/esm/engine/billing/resources/credit-pools.resource.specification.js.map +1 -1
  243. package/dist/esm/engine/billing/resources/invoice-refs.resource.specification.d.ts +2 -2
  244. package/dist/esm/engine/billing/resources/invoice-refs.resource.specification.d.ts.map +1 -1
  245. package/dist/esm/engine/billing/resources/invoice-refs.resource.specification.js +2 -0
  246. package/dist/esm/engine/billing/resources/invoice-refs.resource.specification.js.map +1 -1
  247. package/dist/esm/engine/billing/resources/prices.resource.specification.d.ts.map +1 -1
  248. package/dist/esm/engine/billing/resources/prices.resource.specification.js +3 -1
  249. package/dist/esm/engine/billing/resources/prices.resource.specification.js.map +1 -1
  250. package/dist/esm/engine/billing/resources/products.resource.specification.d.ts.map +1 -1
  251. package/dist/esm/engine/billing/resources/products.resource.specification.js +3 -1
  252. package/dist/esm/engine/billing/resources/products.resource.specification.js.map +1 -1
  253. package/dist/esm/engine/billing/resources/promotions.resource.specification.d.ts.map +1 -1
  254. package/dist/esm/engine/billing/resources/promotions.resource.specification.js +2 -0
  255. package/dist/esm/engine/billing/resources/promotions.resource.specification.js.map +1 -1
  256. package/dist/esm/engine/billing/resources/referrals.resource.specification.d.ts.map +1 -1
  257. package/dist/esm/engine/billing/resources/referrals.resource.specification.js +3 -1
  258. package/dist/esm/engine/billing/resources/referrals.resource.specification.js.map +1 -1
  259. package/dist/esm/engine/billing/resources/subscriptions.resource.specification.d.ts +6 -6
  260. package/dist/esm/engine/billing/resources/subscriptions.resource.specification.d.ts.map +1 -1
  261. package/dist/esm/engine/billing/resources/subscriptions.resource.specification.js +2 -0
  262. package/dist/esm/engine/billing/resources/subscriptions.resource.specification.js.map +1 -1
  263. package/dist/esm/engine/billing/resources/usage-records.resource.specification.d.ts +6 -6
  264. package/dist/esm/engine/billing/resources/usage-records.resource.specification.d.ts.map +1 -1
  265. package/dist/esm/engine/billing/resources/usage-records.resource.specification.js +2 -0
  266. package/dist/esm/engine/billing/resources/usage-records.resource.specification.js.map +1 -1
  267. package/dist/esm/engine/compliance/resources/audit-logs.resource.specification.d.ts.map +1 -1
  268. package/dist/esm/engine/compliance/resources/audit-logs.resource.specification.js +2 -0
  269. package/dist/esm/engine/compliance/resources/audit-logs.resource.specification.js.map +1 -1
  270. package/dist/esm/engine/engine-resource-specifications.registry.d.ts.map +1 -1
  271. package/dist/esm/engine/engine-resource-specifications.registry.js +5 -0
  272. package/dist/esm/engine/engine-resource-specifications.registry.js.map +1 -1
  273. package/dist/esm/engine/engine-resource-sub-domain.d.ts +63 -0
  274. package/dist/esm/engine/engine-resource-sub-domain.d.ts.map +1 -0
  275. package/dist/esm/engine/engine-resource-sub-domain.js +87 -0
  276. package/dist/esm/engine/engine-resource-sub-domain.js.map +1 -0
  277. package/dist/esm/engine/errors/error-messages.specification.d.ts.map +1 -1
  278. package/dist/esm/engine/errors/error-messages.specification.js +30 -1
  279. package/dist/esm/engine/errors/error-messages.specification.js.map +1 -1
  280. package/dist/esm/engine/features/resources/application-features.resource.specification.d.ts.map +1 -1
  281. package/dist/esm/engine/features/resources/application-features.resource.specification.js +2 -0
  282. package/dist/esm/engine/features/resources/application-features.resource.specification.js.map +1 -1
  283. package/dist/esm/engine/features/resources/organization-features.resource.specification.d.ts.map +1 -1
  284. package/dist/esm/engine/features/resources/organization-features.resource.specification.js +2 -0
  285. package/dist/esm/engine/features/resources/organization-features.resource.specification.js.map +1 -1
  286. package/dist/esm/engine/features/resources/user-features.resource.specification.d.ts +1 -1
  287. package/dist/esm/engine/features/resources/user-features.resource.specification.d.ts.map +1 -1
  288. package/dist/esm/engine/features/resources/user-features.resource.specification.js +2 -0
  289. package/dist/esm/engine/features/resources/user-features.resource.specification.js.map +1 -1
  290. package/dist/esm/engine/files/resources/files.resource.specification.d.ts.map +1 -1
  291. package/dist/esm/engine/files/resources/files.resource.specification.js +2 -0
  292. package/dist/esm/engine/files/resources/files.resource.specification.js.map +1 -1
  293. package/dist/esm/engine/flows-actors/resources/a2a-push-delivery-log.resource.specification.d.ts +3 -3
  294. package/dist/esm/engine/flows-actors/resources/a2a-push-delivery-log.resource.specification.d.ts.map +1 -1
  295. package/dist/esm/engine/flows-actors/resources/a2a-push-delivery-log.resource.specification.js +12 -0
  296. package/dist/esm/engine/flows-actors/resources/a2a-push-delivery-log.resource.specification.js.map +1 -1
  297. package/dist/esm/engine/flows-actors/resources/a2a-token-budget-state.resource.specification.d.ts +3 -3
  298. package/dist/esm/engine/flows-actors/resources/a2a-token-budget-state.resource.specification.d.ts.map +1 -1
  299. package/dist/esm/engine/flows-actors/resources/a2a-token-budget-state.resource.specification.js +2 -0
  300. package/dist/esm/engine/flows-actors/resources/a2a-token-budget-state.resource.specification.js.map +1 -1
  301. package/dist/esm/engine/flows-actors/resources/flow-actor-executions.resource.specification.d.ts +3 -3
  302. package/dist/esm/engine/flows-actors/resources/flow-actor-executions.resource.specification.d.ts.map +1 -1
  303. package/dist/esm/engine/flows-actors/resources/flow-actor-executions.resource.specification.js +2 -0
  304. package/dist/esm/engine/flows-actors/resources/flow-actor-executions.resource.specification.js.map +1 -1
  305. package/dist/esm/engine/flows-actors/resources/flow-actor-tasks.resource.specification.d.ts +3 -3
  306. package/dist/esm/engine/flows-actors/resources/flow-actor-tasks.resource.specification.d.ts.map +1 -1
  307. package/dist/esm/engine/flows-actors/resources/flow-actor-tasks.resource.specification.js +3 -1
  308. package/dist/esm/engine/flows-actors/resources/flow-actor-tasks.resource.specification.js.map +1 -1
  309. package/dist/esm/engine/frontend-components/app/public-layout-main-container.frontend-component.specification.d.ts.map +1 -1
  310. package/dist/esm/engine/frontend-components/app/public-layout-main-container.frontend-component.specification.js +8 -3
  311. package/dist/esm/engine/frontend-components/app/public-layout-main-container.frontend-component.specification.js.map +1 -1
  312. package/dist/esm/engine/guidance/resources/guidance-state.resource.specification.d.ts +1 -1
  313. package/dist/esm/engine/guidance/resources/guidance-state.resource.specification.d.ts.map +1 -1
  314. package/dist/esm/engine/guidance/resources/guidance-state.resource.specification.js +3 -0
  315. package/dist/esm/engine/guidance/resources/guidance-state.resource.specification.js.map +1 -1
  316. package/dist/esm/engine/guidance/resources/lifecycle-state.resource.specification.d.ts +1 -1
  317. package/dist/esm/engine/guidance/resources/lifecycle-state.resource.specification.d.ts.map +1 -1
  318. package/dist/esm/engine/guidance/resources/lifecycle-state.resource.specification.js +3 -0
  319. package/dist/esm/engine/guidance/resources/lifecycle-state.resource.specification.js.map +1 -1
  320. package/dist/esm/engine/guidance/resources/progression-state.resource.specification.d.ts +1 -1
  321. package/dist/esm/engine/guidance/resources/progression-state.resource.specification.d.ts.map +1 -1
  322. package/dist/esm/engine/guidance/resources/progression-state.resource.specification.js +3 -0
  323. package/dist/esm/engine/guidance/resources/progression-state.resource.specification.js.map +1 -1
  324. package/dist/esm/engine/index.d.ts +1 -0
  325. package/dist/esm/engine/index.d.ts.map +1 -1
  326. package/dist/esm/engine/index.js +1 -0
  327. package/dist/esm/engine/index.js.map +1 -1
  328. package/dist/esm/engine/infrastructure/resources/data-seed-runs.resource.specification.d.ts.map +1 -1
  329. package/dist/esm/engine/infrastructure/resources/data-seed-runs.resource.specification.js +2 -0
  330. package/dist/esm/engine/infrastructure/resources/data-seed-runs.resource.specification.js.map +1 -1
  331. package/dist/esm/engine/infrastructure/resources/external-data-pipeline-states.resource.specification.d.ts.map +1 -1
  332. package/dist/esm/engine/infrastructure/resources/external-data-pipeline-states.resource.specification.js +2 -0
  333. package/dist/esm/engine/infrastructure/resources/external-data-pipeline-states.resource.specification.js.map +1 -1
  334. package/dist/esm/engine/infrastructure/resources/job-executions.resource.specification.d.ts.map +1 -1
  335. package/dist/esm/engine/infrastructure/resources/job-executions.resource.specification.js +2 -0
  336. package/dist/esm/engine/infrastructure/resources/job-executions.resource.specification.js.map +1 -1
  337. package/dist/esm/engine/infrastructure/resources/job-payload-storage.resource.specification.d.ts.map +1 -1
  338. package/dist/esm/engine/infrastructure/resources/job-payload-storage.resource.specification.js +2 -0
  339. package/dist/esm/engine/infrastructure/resources/job-payload-storage.resource.specification.js.map +1 -1
  340. package/dist/esm/engine/notifications/resources/m2m-webhook-delivery-log.resource.specification.d.ts.map +1 -1
  341. package/dist/esm/engine/notifications/resources/m2m-webhook-delivery-log.resource.specification.js +2 -0
  342. package/dist/esm/engine/notifications/resources/m2m-webhook-delivery-log.resource.specification.js.map +1 -1
  343. package/dist/esm/engine/notifications/resources/notification-badges.resource.specification.d.ts +1 -1
  344. package/dist/esm/engine/notifications/resources/notification-badges.resource.specification.d.ts.map +1 -1
  345. package/dist/esm/engine/notifications/resources/notification-badges.resource.specification.js +3 -0
  346. package/dist/esm/engine/notifications/resources/notification-badges.resource.specification.js.map +1 -1
  347. package/dist/esm/engine/notifications/resources/webhook-config.resource.specification.d.ts.map +1 -1
  348. package/dist/esm/engine/notifications/resources/webhook-config.resource.specification.js +2 -0
  349. package/dist/esm/engine/notifications/resources/webhook-config.resource.specification.js.map +1 -1
  350. package/dist/esm/engine/organizations/resources/organization-members.resource.specification.d.ts +1 -1
  351. package/dist/esm/engine/organizations/resources/organization-members.resource.specification.d.ts.map +1 -1
  352. package/dist/esm/engine/organizations/resources/organization-members.resource.specification.js +2 -0
  353. package/dist/esm/engine/organizations/resources/organization-members.resource.specification.js.map +1 -1
  354. package/dist/esm/engine/organizations/resources/organization-notifications.resource.specification.d.ts.map +1 -1
  355. package/dist/esm/engine/organizations/resources/organization-notifications.resource.specification.js +2 -0
  356. package/dist/esm/engine/organizations/resources/organization-notifications.resource.specification.js.map +1 -1
  357. package/dist/esm/engine/organizations/resources/organization-preferences.resource.specification.d.ts.map +1 -1
  358. package/dist/esm/engine/organizations/resources/organization-preferences.resource.specification.js +2 -0
  359. package/dist/esm/engine/organizations/resources/organization-preferences.resource.specification.js.map +1 -1
  360. package/dist/esm/engine/organizations/resources/organization-profiles.resource.specification.d.ts.map +1 -1
  361. package/dist/esm/engine/organizations/resources/organization-profiles.resource.specification.js +2 -0
  362. package/dist/esm/engine/organizations/resources/organization-profiles.resource.specification.js.map +1 -1
  363. package/dist/esm/engine/organizations/resources/organization-unit-members.resource.specification.d.ts.map +1 -1
  364. package/dist/esm/engine/organizations/resources/organization-unit-members.resource.specification.js +2 -0
  365. package/dist/esm/engine/organizations/resources/organization-unit-members.resource.specification.js.map +1 -1
  366. package/dist/esm/engine/organizations/resources/organization-units.resource.specification.d.ts.map +1 -1
  367. package/dist/esm/engine/organizations/resources/organization-units.resource.specification.js +2 -0
  368. package/dist/esm/engine/organizations/resources/organization-units.resource.specification.js.map +1 -1
  369. package/dist/esm/engine/organizations/resources/organizations.resource.specification.d.ts.map +1 -1
  370. package/dist/esm/engine/organizations/resources/organizations.resource.specification.js +2 -0
  371. package/dist/esm/engine/organizations/resources/organizations.resource.specification.js.map +1 -1
  372. package/dist/esm/engine/users/resources/anonymous-users.resource.specification.d.ts.map +1 -1
  373. package/dist/esm/engine/users/resources/anonymous-users.resource.specification.js +2 -0
  374. package/dist/esm/engine/users/resources/anonymous-users.resource.specification.js.map +1 -1
  375. package/dist/esm/engine/users/resources/inbound-contacts.resource.specification.d.ts +1 -1
  376. package/dist/esm/engine/users/resources/inbound-contacts.resource.specification.d.ts.map +1 -1
  377. package/dist/esm/engine/users/resources/inbound-contacts.resource.specification.js +2 -0
  378. package/dist/esm/engine/users/resources/inbound-contacts.resource.specification.js.map +1 -1
  379. package/dist/esm/engine/users/resources/user-credentials.resource.specification.d.ts +1 -1
  380. package/dist/esm/engine/users/resources/user-credentials.resource.specification.d.ts.map +1 -1
  381. package/dist/esm/engine/users/resources/user-credentials.resource.specification.js +2 -0
  382. package/dist/esm/engine/users/resources/user-credentials.resource.specification.js.map +1 -1
  383. package/dist/esm/engine/users/resources/user-identity-links.resource.specification.d.ts +1 -1
  384. package/dist/esm/engine/users/resources/user-identity-links.resource.specification.d.ts.map +1 -1
  385. package/dist/esm/engine/users/resources/user-identity-links.resource.specification.js +2 -0
  386. package/dist/esm/engine/users/resources/user-identity-links.resource.specification.js.map +1 -1
  387. package/dist/esm/engine/users/resources/user-preferences.resource.specification.d.ts +1 -1
  388. package/dist/esm/engine/users/resources/user-preferences.resource.specification.d.ts.map +1 -1
  389. package/dist/esm/engine/users/resources/user-preferences.resource.specification.js +2 -0
  390. package/dist/esm/engine/users/resources/user-preferences.resource.specification.js.map +1 -1
  391. package/dist/esm/engine/users/resources/user-profiles.resource.specification.d.ts +1 -1
  392. package/dist/esm/engine/users/resources/user-profiles.resource.specification.d.ts.map +1 -1
  393. package/dist/esm/engine/users/resources/user-profiles.resource.specification.js +2 -0
  394. package/dist/esm/engine/users/resources/user-profiles.resource.specification.js.map +1 -1
  395. package/dist/esm/engine/users/resources/user-self-preferences.resource.specification.d.ts +1 -1
  396. package/dist/esm/engine/users/resources/user-self-preferences.resource.specification.d.ts.map +1 -1
  397. package/dist/esm/engine/users/resources/user-self-preferences.resource.specification.js +2 -0
  398. package/dist/esm/engine/users/resources/user-self-preferences.resource.specification.js.map +1 -1
  399. package/dist/esm/engine/users/resources/user-self-profiles.resource.specification.d.ts +1 -1
  400. package/dist/esm/engine/users/resources/user-self-profiles.resource.specification.d.ts.map +1 -1
  401. package/dist/esm/engine/users/resources/user-self-profiles.resource.specification.js +2 -0
  402. package/dist/esm/engine/users/resources/user-self-profiles.resource.specification.js.map +1 -1
  403. package/dist/esm/engine/users/resources/user-self.resource.specification.d.ts.map +1 -1
  404. package/dist/esm/engine/users/resources/user-self.resource.specification.js +3 -1
  405. package/dist/esm/engine/users/resources/user-self.resource.specification.js.map +1 -1
  406. package/dist/esm/engine/users/resources/users.resource.specification.d.ts.map +1 -1
  407. package/dist/esm/engine/users/resources/users.resource.specification.js +2 -0
  408. package/dist/esm/engine/users/resources/users.resource.specification.js.map +1 -1
  409. package/dist/esm/technical-documentation/engine-documentation-specification-catalog.companion.d.ts +5 -0
  410. package/dist/esm/technical-documentation/engine-documentation-specification-catalog.companion.d.ts.map +1 -1
  411. package/dist/esm/technical-documentation/engine-documentation-specification-catalog.companion.js +385 -9
  412. package/dist/esm/technical-documentation/engine-documentation-specification-catalog.companion.js.map +1 -1
  413. package/dist/esm/technical-documentation/technical-documentation-units.schemas.js +1 -1
  414. package/dist/esm/technical-documentation/technical-documentation-units.schemas.js.map +1 -1
  415. package/dist/tsconfig.build.tsbuildinfo +1 -0
  416. package/package.json +8 -8
  417. package/dist/esm/.builder.pid +0 -9
  418. package/dist/esm/_core/business-coverage/coverage-findings-validation.d.ts +0 -0
  419. package/dist/esm/_core/business-coverage/coverage-findings-validation.d.ts.map +0 -0
  420. package/dist/esm/_core/business-coverage/coverage-findings-validation.js.map +0 -0
  421. package/dist/esm/_core/business-coverage/coverage-findings.schemas.d.ts +0 -0
  422. package/dist/esm/_core/business-coverage/coverage-findings.schemas.d.ts.map +0 -0
  423. package/dist/esm/_core/business-coverage/coverage-findings.schemas.js.map +0 -0
@@ -4,6 +4,7 @@ import { CodeDeclarationKind, CodeSymbolKind, FieldSemanticImportance } from '@w
4
4
  import { CoreResourceOperation as Op, CoreResourceType, ResourcePrimaryScope, UsageRecordSchema, UsageSourceType, usageRecordsPolymorphicFactories, } from '@wildo-ai/saas-models';
5
5
  import { HttpResponseStatusCode, mergeResourceFrontendConfigurations, resourceFrontendConfiguration, resourceSpecification, resourceSpecificationFromFrontendConfiguration, } from '../../../_core/index.js';
6
6
  import { BILLING_API_REFERENCE_PAGE_REQUEST, billingApiReferencePage, createBillingApiReferenceScopeExample, } from './billing-api-reference-examples.js';
7
+ import { EngineResourceSubDomain } from '../../engine-resource-sub-domain.js';
7
8
  const usageResourcePrimaryScopeByResourceType = {
8
9
  [CoreResourceType.ORGANIZATION_USAGE_RECORDS]: ResourcePrimaryScope.ORGANIZATIONS,
9
10
  [CoreResourceType.USER_USAGE_RECORDS]: ResourcePrimaryScope.USER_SELF,
@@ -46,6 +47,7 @@ function buildUsageRecordBase(resourceType, memberName) {
46
47
  businessRole: 'Feeds METERED pricing and entitlements; aggregated in analytics and in `BillingState` responses.',
47
48
  lifecycleRole: 'Created by application metering and exposed as a read-only record. `reportedToProvider` becomes true after the billing provider acknowledges the measured usage.',
48
49
  audience: LabelAudience.ADMIN,
50
+ subDomain: EngineResourceSubDomain.BILLING,
49
51
  codeHandling: {
50
52
  mainSchema: { packageName: '@wildo-ai/saas-models', exportName: 'UsageRecordSchema', symbolKind: CodeSymbolKind.SCHEMA, declarationKind: CodeDeclarationKind.ZOD_SCHEMA },
51
53
  resourceFactoryCollectionEntry: {
@@ -1 +1 @@
1
- {"version":3,"file":"usage-records.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/billing/resources/usage-records.resource.specification.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AACvF,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAEpE,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AACxG,OAAO,EACL,qBAAqB,IAAI,EAAE,EAC3B,gBAAgB,EAChB,oBAAoB,EACpB,iBAAiB,EACjB,eAAe,EACf,gCAAgC,GACjC,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,sBAAsB,EACtB,mCAAmC,EACnC,6BAA6B,EAC7B,qBAAqB,EACrB,8CAA8C,GAC/C,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,kCAAkC,EAClC,uBAAuB,EACvB,qCAAqC,GAEtC,MAAM,kCAAkC,CAAC;AAK1C,MAAM,uCAAuC,GAA+D;IAC1G,CA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AAE;iBAClI;gBACD,UAAU,EAAE,IAAI;aACjB;SACF;QACD,mBAAmB,EAAE,CAAC,2HAA2H,CAAC;KACnJ,CAAC,EACF,EAAE,oBAAoB,EAAE,uCAAuC,CAAC,YAAY,CAAC,EAAE,CAChF,CAAC;AACJ,CAAC;AAED,SAAS,oBAAoB,CAAC,YAA+B,EAAE,UAAmC;IAChG,MAAM,IAAI,GAAG,oBAAoB,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC;IAC5D,MAAM,IAAI,GAAG,cAAc,CAAC,kBAAsD,EAAE,YAAY,EAAE,oBAAoB,CAAC,CAAC;IACxH,MAAM,KAAK,GAAG,cAAc,CAAC,mBAAuD,EAAE,YAAY,EAAE,qBAAqB,CAAC,CAAC;IAC3H,OAAO,8CAA8C,CACnD,mCAAmC,CAAC,6BAA6B,CAAC,IAAI,CAAC,EAAE,6BAA6B,CAAC,KAAK,CAAC,CAAC,EAC9G,IAAI,EACJ,GAAG,EAAE,CAAC,CAAC;QACL,KAAK,EAAE,EAAE,OAAO,EAAE,8DAA8D,EAAE;QAClF,KAAK,EAAE;YACL,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,OAAO,EAAE,4FAA4F,EAAE,SAAS,EAAE,sCAAsC,EAAE;YACvK,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,OAAO,EAAE,+CAA+C,EAAE,SAAS,EAAE,qCAAqC,EAAE;SAC1H;KACF,CAAC,CACH,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,6CAA6C,GAAG,oBAAoB,CAC/E,gBAAgB,CAAC,0BAA0B,EAC3C,4BAA4B,CAC7B,CAAC;AAEF,MAAM,CAAC,MAAM,qCAAqC,GAAG,oBAAoB,CACvE,gBAAgB,CAAC,kBAAkB,EACnC,oBAAoB,CACrB,CAAC","sourcesContent":["import { billingAdminPresets, billingMainPresets } from '@wildo-ai/presets-components';\nimport { LabelAudience } from '@wildo-ai/presets-components-models';\nimport type { ResourceUIBehaviorConfig } from '@wildo-ai/saas-frontend-lib/companion';\nimport { CodeDeclarationKind, CodeSymbolKind, FieldSemanticImportance } from '@wildo-ai/zod-decorators';\nimport {\n CoreResourceOperation as Op,\n CoreResourceType,\n ResourcePrimaryScope,\n UsageRecordSchema,\n UsageSourceType,\n usageRecordsPolymorphicFactories,\n} from '@wildo-ai/saas-models';\nimport {\n HttpResponseStatusCode,\n mergeResourceFrontendConfigurations,\n resourceFrontendConfiguration,\n resourceSpecification,\n resourceSpecificationFromFrontendConfiguration,\n} from '~wildo-specifications/_core';\nimport {\n BILLING_API_REFERENCE_PAGE_REQUEST,\n billingApiReferencePage,\n createBillingApiReferenceScopeExample,\n type BillingApiReferenceExampleScope,\n} from './billing-api-reference-examples';\n\ntype UsageResourceType = CoreResourceType.ORGANIZATION_USAGE_RECORDS | CoreResourceType.USER_USAGE_RECORDS;\ntype UsageResourceTypeMember = 'ORGANIZATION_USAGE_RECORDS' | 'USER_USAGE_RECORDS';\n\nconst usageResourcePrimaryScopeByResourceType: Record<UsageResourceType, BillingApiReferenceExampleScope> = {\n [CoreResourceType.ORGANIZATION_USAGE_RECORDS]: ResourcePrimaryScope.ORGANIZATIONS,\n [CoreResourceType.USER_USAGE_RECORDS]: ResourcePrimaryScope.USER_SELF,\n};\n\ntype Cfg = ReturnType<(typeof usageRecordsPolymorphicFactories)[CoreResourceType.ORGANIZATION_USAGE_RECORDS]>;\ntype Core = Cfg['coreOperations'][number];\ntype Main = typeof UsageRecordSchema;\ntype UsageFrontend = ResourceUIBehaviorConfig<undefined, Core, Main>;\n\nfunction resolveUsageUI(source: Partial<Record<string, unknown>>, resourceType: UsageResourceType, sourceName: string): UsageFrontend {\n const uiBehavior = source[resourceType] as UsageFrontend | undefined;\n if (!uiBehavior) {\n throw new Error(`Missing \"${resourceType}\" UI behavior in ${sourceName}.`);\n }\n return uiBehavior;\n}\n\nfunction buildUsageRecordBase(resourceType: UsageResourceType, memberName: UsageResourceTypeMember) {\n const exampleScope = createBillingApiReferenceScopeExample(\n usageResourcePrimaryScopeByResourceType[resourceType],\n );\n const usageRecordExample = {\n _id: 'usage_record_01HX2EXAMPLE',\n ...exampleScope.billingAccountIdentity,\n productKey: 'api_calls',\n quantity: 1250,\n timestamp: '2026-06-15T12:00:00.000Z',\n source: {\n type: UsageSourceType.OPERATION,\n resourceType: 'documents',\n operationIdentifier: 'create',\n },\n reportedToProvider: true,\n reportedAt: '2026-06-15T12:05:00.000Z',\n metadata: { region: 'eu-west' },\n createdAt: '2026-06-15T12:00:01.000Z',\n ...exampleScope.scopeIdentity,\n };\n const usageRecordSummaryExample = {\n _id: usageRecordExample._id,\n ...exampleScope.billingAccountIdentity,\n productKey: usageRecordExample.productKey,\n quantity: usageRecordExample.quantity,\n timestamp: usageRecordExample.timestamp,\n };\n\n return resourceSpecification<undefined, Core, Main>(\n usageRecordsPolymorphicFactories[resourceType],\n UsageRecordSchema,\n ({ schemaShape }) => ({\n purpose:\n 'Metered-usage record for a product key: exposes the measured quantity, event timestamp, reporting state, and the API or workflow source that produced it.',\n businessRole: 'Feeds METERED pricing and entitlements; aggregated in analytics and in `BillingState` responses.',\n lifecycleRole:\n 'Created by application metering and exposed as a read-only record. `reportedToProvider` becomes true after the billing provider acknowledges the measured usage.',\n audience: LabelAudience.ADMIN,\n codeHandling: {\n mainSchema: { packageName: '@wildo-ai/saas-models', exportName: 'UsageRecordSchema', symbolKind: CodeSymbolKind.SCHEMA, declarationKind: CodeDeclarationKind.ZOD_SCHEMA },\n resourceFactoryCollectionEntry: {\n collectionSymbol: { packageName: '@wildo-ai/saas-models', exportName: 'usageRecordsPolymorphicFactories', symbolKind: CodeSymbolKind.FACTORY },\n identifierField: 'collectionKey',\n identifierValue: resourceType,\n },\n resourceType: { enumDeclaration: { packageName: '@wildo-ai/saas-models', exportName: 'CoreResourceType', symbolKind: CodeSymbolKind.ENUM, declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM }, memberName },\n operationVocabulary: { coreEnum: { packageName: '@wildo-ai/saas-models', exportName: 'CoreResourceOperation', symbolKind: CodeSymbolKind.ENUM, declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM } },\n frontendConfigurationSourceEntries: [\n { collectionSymbol: { packageName: '@wildo-ai/presets-components', exportName: 'billingMainPresets', symbolKind: CodeSymbolKind.UI_BEHAVIOR }, identifierField: 'collectionKey', identifierValue: resourceType },\n { collectionSymbol: { packageName: '@wildo-ai/presets-components', exportName: 'billingAdminPresets', symbolKind: CodeSymbolKind.UI_BEHAVIOR }, identifierField: 'collectionKey', identifierValue: resourceType },\n ],\n },\n fields: {\n _id: schemaShape._id.stringSpec({ meaning: 'Usage document id.', importance: FieldSemanticImportance.PRIMARY, semanticRole: 'identifier' }),\n billingAccountId: schemaShape.billingAccountId.stringSpec({ meaning: 'Polymorphic parent billing account FK.', importance: FieldSemanticImportance.PRIMARY }),\n productKey: schemaShape.productKey.stringSpec({ meaning: 'Catalog product key the usage row charges against (matches product definition).', importance: FieldSemanticImportance.PRIMARY }),\n quantity: schemaShape.quantity.numberSpec({ meaning: 'Non-negative usage amount for the metering window captured in this record.' }),\n timestamp: schemaShape.timestamp.dateSpec({ meaning: 'When the usage event occurred in product time.', temporalRole: 'occurred' }),\n source: schemaShape.source.objectSpec({ meaning: 'Optional origin metadata (type, resourceType, operation id) for support and audits.' }),\n reportedToProvider: schemaShape.reportedToProvider.booleanSpec({ meaning: 'Whether a flush job has pushed this row to the billing provider.' }),\n reportedAt: schemaShape.reportedAt.dateSpec({ meaning: 'When provider acknowledgement happened.', temporalRole: 'modified' }),\n metadata: schemaShape.metadata.objectSpec({ meaning: 'Extra string tags for product-specific accounting.' }),\n createdAt: schemaShape.createdAt.dateSpec({ meaning: 'Row insert time.', temporalRole: 'creation' }),\n },\n operations: {\n [Op.READ]: {\n purpose: 'Inspect a single usage row in admin or support tools.',\n outcome: 'Full quantity, timestamp, and source block.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The usage row was found and its quantity, timestamp, and source block are returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the org-owner/org-admin role required to read metered-usage rows (reads are org-owner/org-admin-scoped API operations; writes stay system-scoped internal service-pipeline ops, not HTTP-exposed).' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No usage record exists for the supplied id in the caller’s billing scope.' },\n ],\n idempotent: true,\n examples: [{\n title: 'Inspect one reported API-usage record',\n response: usageRecordExample,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n variants: {\n context: {\n examples: [{\n title: 'Inspect a usage record with available relationship context',\n response: usageRecordExample,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n summary: {\n examples: [{\n title: 'Inspect the compact usage summary',\n response: usageRecordSummaryExample,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n },\n [Op.LIST]: {\n purpose: 'Paginated usage history for a billing account (metering explorer).',\n outcome: 'Chronological rows for charts and export.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) chronological page of usage rows for the billing account.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the org-owner/org-admin role required to enumerate metered-usage history.' },\n ],\n idempotent: true,\n examples: [{\n title: 'Browse metered usage chronologically',\n request: BILLING_API_REFERENCE_PAGE_REQUEST,\n response: billingApiReferencePage([usageRecordExample]),\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n variants: {\n context: {\n examples: [{\n title: 'Browse usage records with relationship context',\n request: BILLING_API_REFERENCE_PAGE_REQUEST,\n response: billingApiReferencePage([usageRecordExample]),\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n summary: {\n examples: [{\n title: 'Browse compact metered-usage summaries',\n request: BILLING_API_REFERENCE_PAGE_REQUEST,\n response: billingApiReferencePage([usageRecordSummaryExample]),\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n },\n [Op.CREATE]: {\n purpose: 'Record an occurrence of metered consumption from application code or workers.',\n outcome: 'New immutable-ish line with not-editable fields enforced in schema.',\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'A metered-usage line was appended for the product key and is returned with its server-assigned id and creation time.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The usage payload is malformed — negative `quantity`, unknown `productKey`, or a non-editable field supplied by the caller.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not the trusted system/metering identity authorised to append usage (the op is an internal service-pipeline op, not exposed over HTTP for arbitrary client writes).' },\n ],\n // Append-only event write: each call records a distinct metered occurrence, so\n // repeating it inserts another row. The runtime does not key these on an\n // idempotency token, so two identical requests double-count by design.\n idempotent: false,\n rateLimitNote: 'High-volume ingestion path — metering hooks and workers should batch and back off; bursty per-event writes may be throttled by the platform.',\n examples: [\n {\n title: 'Record one metered consumption event',\n request: {\n ...exampleScope.billingAccountIdentity,\n productKey: 'api_calls',\n quantity: 1,\n timestamp: '2026-06-15T12:00:00.000Z',\n source: {\n type: UsageSourceType.OPERATION,\n resourceType: 'documents',\n operationIdentifier: 'create',\n },\n },\n response: {\n _id: 'usage_record_unreported_01HX2EXAMPLE',\n ...exampleScope.billingAccountIdentity,\n productKey: 'api_calls',\n quantity: 1,\n timestamp: '2026-06-15T12:00:00.000Z',\n source: {\n type: UsageSourceType.OPERATION,\n resourceType: 'documents',\n operationIdentifier: 'create',\n },\n reportedToProvider: false,\n createdAt: '2026-06-15T12:00:01.000Z',\n ...exampleScope.scopeIdentity,\n },\n forStatus: HttpResponseStatusCode.CREATED_201,\n },\n ],\n },\n [Op.UPDATE]: {\n purpose: 'Rare correction or provider sync patch paths when policy allows; many fields are not editable in zod for safety.',\n outcome: 'Patched metadata or report flags in implementation.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The editable subset (metadata / report flags) was patched and the updated usage row is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'A non-editable usage field (`quantity`, `productKey`, `timestamp`) was supplied, or the patch otherwise fails schema validation.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the org-owner / system role required to correct or re-sync usage rows.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No usage record exists for the supplied id in the caller’s billing scope.' },\n ],\n idempotent: true,\n },\n },\n businessConstraints: ['High-volume append-only usage — UI should not imply arbitrary user edits to historical quantities without a dedicated op.'],\n }),\n { resourcePrimaryScope: usageResourcePrimaryScopeByResourceType[resourceType] },\n );\n}\n\nfunction buildUsageRecordSpec(resourceType: UsageResourceType, memberName: UsageResourceTypeMember) {\n const base = buildUsageRecordBase(resourceType, memberName);\n const main = resolveUsageUI(billingMainPresets as Partial<Record<string, unknown>>, resourceType, 'billingMainPresets');\n const admin = resolveUsageUI(billingAdminPresets as Partial<Record<string, unknown>>, resourceType, 'billingAdminPresets');\n return resourceSpecificationFromFrontendConfiguration(\n mergeResourceFrontendConfigurations(resourceFrontendConfiguration(main), resourceFrontendConfiguration(admin)),\n base,\n () => ({\n label: { purpose: 'Preset stringifies `productKey · quantity` for dense tables.' },\n views: {\n [Op.LIST]: { purpose: 'List op in merged `views` as non-addressable; keep spec aligned with merged preset op map.', whenToUse: 'Embedded list under billing account.' },\n [Op.READ]: { purpose: 'Read op in merged `views` as non-addressable.', whenToUse: 'Row detail in inspector when wired.' },\n },\n }),\n );\n}\n\nexport const organizationUsageRecordsResourceSpecification = buildUsageRecordSpec(\n CoreResourceType.ORGANIZATION_USAGE_RECORDS,\n 'ORGANIZATION_USAGE_RECORDS',\n);\n\nexport const userUsageRecordsResourceSpecification = buildUsageRecordSpec(\n CoreResourceType.USER_USAGE_RECORDS,\n 'USER_USAGE_RECORDS',\n);\n"]}
1
+ {"version":3,"file":"usage-records.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/billing/resources/usage-records.res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AC,KAAK,CAAC,CAAC,EAC9G,IAAI,EACJ,GAAG,EAAE,CAAC,CAAC;QACL,KAAK,EAAE,EAAE,OAAO,EAAE,8DAA8D,EAAE;QAClF,KAAK,EAAE;YACL,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,OAAO,EAAE,4FAA4F,EAAE,SAAS,EAAE,sCAAsC,EAAE;YACvK,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,OAAO,EAAE,+CAA+C,EAAE,SAAS,EAAE,qCAAqC,EAAE;SAC1H;KACF,CAAC,CACH,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,6CAA6C,GAAG,oBAAoB,CAC/E,gBAAgB,CAAC,0BAA0B,EAC3C,4BAA4B,CAC7B,CAAC;AAEF,MAAM,CAAC,MAAM,qCAAqC,GAAG,oBAAoB,CACvE,gBAAgB,CAAC,kBAAkB,EACnC,oBAAoB,CACrB,CAAC","sourcesContent":["import { billingAdminPresets, billingMainPresets } from '@wildo-ai/presets-components';\nimport { LabelAudience } from '@wildo-ai/presets-components-models';\nimport type { ResourceUIBehaviorConfig } from '@wildo-ai/saas-frontend-lib/companion';\nimport { CodeDeclarationKind, CodeSymbolKind, FieldSemanticImportance } from '@wildo-ai/zod-decorators';\nimport {\n CoreResourceOperation as Op,\n CoreResourceType,\n ResourcePrimaryScope,\n UsageRecordSchema,\n UsageSourceType,\n usageRecordsPolymorphicFactories,\n} from '@wildo-ai/saas-models';\nimport {\n HttpResponseStatusCode,\n mergeResourceFrontendConfigurations,\n resourceFrontendConfiguration,\n resourceSpecification,\n resourceSpecificationFromFrontendConfiguration,\n} from '~wildo-specifications/_core';\nimport {\n BILLING_API_REFERENCE_PAGE_REQUEST,\n billingApiReferencePage,\n createBillingApiReferenceScopeExample,\n type BillingApiReferenceExampleScope,\n} from './billing-api-reference-examples';\nimport { EngineResourceSubDomain } from '../../engine-resource-sub-domain';\n\ntype UsageResourceType = CoreResourceType.ORGANIZATION_USAGE_RECORDS | CoreResourceType.USER_USAGE_RECORDS;\ntype UsageResourceTypeMember = 'ORGANIZATION_USAGE_RECORDS' | 'USER_USAGE_RECORDS';\n\nconst usageResourcePrimaryScopeByResourceType: Record<UsageResourceType, BillingApiReferenceExampleScope> = {\n [CoreResourceType.ORGANIZATION_USAGE_RECORDS]: ResourcePrimaryScope.ORGANIZATIONS,\n [CoreResourceType.USER_USAGE_RECORDS]: ResourcePrimaryScope.USER_SELF,\n};\n\ntype Cfg = ReturnType<(typeof usageRecordsPolymorphicFactories)[CoreResourceType.ORGANIZATION_USAGE_RECORDS]>;\ntype Core = Cfg['coreOperations'][number];\ntype Main = typeof UsageRecordSchema;\ntype UsageFrontend = ResourceUIBehaviorConfig<undefined, Core, Main>;\n\nfunction resolveUsageUI(source: Partial<Record<string, unknown>>, resourceType: UsageResourceType, sourceName: string): UsageFrontend {\n const uiBehavior = source[resourceType] as UsageFrontend | undefined;\n if (!uiBehavior) {\n throw new Error(`Missing \"${resourceType}\" UI behavior in ${sourceName}.`);\n }\n return uiBehavior;\n}\n\nfunction buildUsageRecordBase(resourceType: UsageResourceType, memberName: UsageResourceTypeMember) {\n const exampleScope = createBillingApiReferenceScopeExample(\n usageResourcePrimaryScopeByResourceType[resourceType],\n );\n const usageRecordExample = {\n _id: 'usage_record_01HX2EXAMPLE',\n ...exampleScope.billingAccountIdentity,\n productKey: 'api_calls',\n quantity: 1250,\n timestamp: '2026-06-15T12:00:00.000Z',\n source: {\n type: UsageSourceType.OPERATION,\n resourceType: 'documents',\n operationIdentifier: 'create',\n },\n reportedToProvider: true,\n reportedAt: '2026-06-15T12:05:00.000Z',\n metadata: { region: 'eu-west' },\n createdAt: '2026-06-15T12:00:01.000Z',\n ...exampleScope.scopeIdentity,\n };\n const usageRecordSummaryExample = {\n _id: usageRecordExample._id,\n ...exampleScope.billingAccountIdentity,\n productKey: usageRecordExample.productKey,\n quantity: usageRecordExample.quantity,\n timestamp: usageRecordExample.timestamp,\n };\n\n return resourceSpecification<undefined, Core, Main>(\n usageRecordsPolymorphicFactories[resourceType],\n UsageRecordSchema,\n ({ schemaShape }) => ({\n purpose:\n 'Metered-usage record for a product key: exposes the measured quantity, event timestamp, reporting state, and the API or workflow source that produced it.',\n businessRole: 'Feeds METERED pricing and entitlements; aggregated in analytics and in `BillingState` responses.',\n lifecycleRole:\n 'Created by application metering and exposed as a read-only record. `reportedToProvider` becomes true after the billing provider acknowledges the measured usage.',\n audience: LabelAudience.ADMIN,\n subDomain: EngineResourceSubDomain.BILLING,\n codeHandling: {\n mainSchema: { packageName: '@wildo-ai/saas-models', exportName: 'UsageRecordSchema', symbolKind: CodeSymbolKind.SCHEMA, declarationKind: CodeDeclarationKind.ZOD_SCHEMA },\n resourceFactoryCollectionEntry: {\n collectionSymbol: { packageName: '@wildo-ai/saas-models', exportName: 'usageRecordsPolymorphicFactories', symbolKind: CodeSymbolKind.FACTORY },\n identifierField: 'collectionKey',\n identifierValue: resourceType,\n },\n resourceType: { enumDeclaration: { packageName: '@wildo-ai/saas-models', exportName: 'CoreResourceType', symbolKind: CodeSymbolKind.ENUM, declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM }, memberName },\n operationVocabulary: { coreEnum: { packageName: '@wildo-ai/saas-models', exportName: 'CoreResourceOperation', symbolKind: CodeSymbolKind.ENUM, declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM } },\n frontendConfigurationSourceEntries: [\n { collectionSymbol: { packageName: '@wildo-ai/presets-components', exportName: 'billingMainPresets', symbolKind: CodeSymbolKind.UI_BEHAVIOR }, identifierField: 'collectionKey', identifierValue: resourceType },\n { collectionSymbol: { packageName: '@wildo-ai/presets-components', exportName: 'billingAdminPresets', symbolKind: CodeSymbolKind.UI_BEHAVIOR }, identifierField: 'collectionKey', identifierValue: resourceType },\n ],\n },\n fields: {\n _id: schemaShape._id.stringSpec({ meaning: 'Usage document id.', importance: FieldSemanticImportance.PRIMARY, semanticRole: 'identifier' }),\n billingAccountId: schemaShape.billingAccountId.stringSpec({ meaning: 'Polymorphic parent billing account FK.', importance: FieldSemanticImportance.PRIMARY }),\n productKey: schemaShape.productKey.stringSpec({ meaning: 'Catalog product key the usage row charges against (matches product definition).', importance: FieldSemanticImportance.PRIMARY }),\n quantity: schemaShape.quantity.numberSpec({ meaning: 'Non-negative usage amount for the metering window captured in this record.' }),\n timestamp: schemaShape.timestamp.dateSpec({ meaning: 'When the usage event occurred in product time.', temporalRole: 'occurred' }),\n source: schemaShape.source.objectSpec({ meaning: 'Optional origin metadata (type, resourceType, operation id) for support and audits.' }),\n reportedToProvider: schemaShape.reportedToProvider.booleanSpec({ meaning: 'Whether a flush job has pushed this row to the billing provider.' }),\n reportedAt: schemaShape.reportedAt.dateSpec({ meaning: 'When provider acknowledgement happened.', temporalRole: 'modified' }),\n metadata: schemaShape.metadata.objectSpec({ meaning: 'Extra string tags for product-specific accounting.' }),\n createdAt: schemaShape.createdAt.dateSpec({ meaning: 'Row insert time.', temporalRole: 'creation' }),\n },\n operations: {\n [Op.READ]: {\n purpose: 'Inspect a single usage row in admin or support tools.',\n outcome: 'Full quantity, timestamp, and source block.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The usage row was found and its quantity, timestamp, and source block are returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the org-owner/org-admin role required to read metered-usage rows (reads are org-owner/org-admin-scoped API operations; writes stay system-scoped internal service-pipeline ops, not HTTP-exposed).' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No usage record exists for the supplied id in the caller’s billing scope.' },\n ],\n idempotent: true,\n examples: [{\n title: 'Inspect one reported API-usage record',\n response: usageRecordExample,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n variants: {\n context: {\n examples: [{\n title: 'Inspect a usage record with available relationship context',\n response: usageRecordExample,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n summary: {\n examples: [{\n title: 'Inspect the compact usage summary',\n response: usageRecordSummaryExample,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n },\n [Op.LIST]: {\n purpose: 'Paginated usage history for a billing account (metering explorer).',\n outcome: 'Chronological rows for charts and export.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) chronological page of usage rows for the billing account.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the org-owner/org-admin role required to enumerate metered-usage history.' },\n ],\n idempotent: true,\n examples: [{\n title: 'Browse metered usage chronologically',\n request: BILLING_API_REFERENCE_PAGE_REQUEST,\n response: billingApiReferencePage([usageRecordExample]),\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n variants: {\n context: {\n examples: [{\n title: 'Browse usage records with relationship context',\n request: BILLING_API_REFERENCE_PAGE_REQUEST,\n response: billingApiReferencePage([usageRecordExample]),\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n summary: {\n examples: [{\n title: 'Browse compact metered-usage summaries',\n request: BILLING_API_REFERENCE_PAGE_REQUEST,\n response: billingApiReferencePage([usageRecordSummaryExample]),\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n },\n [Op.CREATE]: {\n purpose: 'Record an occurrence of metered consumption from application code or workers.',\n outcome: 'New immutable-ish line with not-editable fields enforced in schema.',\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'A metered-usage line was appended for the product key and is returned with its server-assigned id and creation time.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The usage payload is malformed — negative `quantity`, unknown `productKey`, or a non-editable field supplied by the caller.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not the trusted system/metering identity authorised to append usage (the op is an internal service-pipeline op, not exposed over HTTP for arbitrary client writes).' },\n ],\n // Append-only event write: each call records a distinct metered occurrence, so\n // repeating it inserts another row. The runtime does not key these on an\n // idempotency token, so two identical requests double-count by design.\n idempotent: false,\n rateLimitNote: 'High-volume ingestion path — metering hooks and workers should batch and back off; bursty per-event writes may be throttled by the platform.',\n examples: [\n {\n title: 'Record one metered consumption event',\n request: {\n ...exampleScope.billingAccountIdentity,\n productKey: 'api_calls',\n quantity: 1,\n timestamp: '2026-06-15T12:00:00.000Z',\n source: {\n type: UsageSourceType.OPERATION,\n resourceType: 'documents',\n operationIdentifier: 'create',\n },\n },\n response: {\n _id: 'usage_record_unreported_01HX2EXAMPLE',\n ...exampleScope.billingAccountIdentity,\n productKey: 'api_calls',\n quantity: 1,\n timestamp: '2026-06-15T12:00:00.000Z',\n source: {\n type: UsageSourceType.OPERATION,\n resourceType: 'documents',\n operationIdentifier: 'create',\n },\n reportedToProvider: false,\n createdAt: '2026-06-15T12:00:01.000Z',\n ...exampleScope.scopeIdentity,\n },\n forStatus: HttpResponseStatusCode.CREATED_201,\n },\n ],\n },\n [Op.UPDATE]: {\n purpose: 'Rare correction or provider sync patch paths when policy allows; many fields are not editable in zod for safety.',\n outcome: 'Patched metadata or report flags in implementation.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The editable subset (metadata / report flags) was patched and the updated usage row is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'A non-editable usage field (`quantity`, `productKey`, `timestamp`) was supplied, or the patch otherwise fails schema validation.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the org-owner / system role required to correct or re-sync usage rows.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No usage record exists for the supplied id in the caller’s billing scope.' },\n ],\n idempotent: true,\n },\n },\n businessConstraints: ['High-volume append-only usage — UI should not imply arbitrary user edits to historical quantities without a dedicated op.'],\n }),\n { resourcePrimaryScope: usageResourcePrimaryScopeByResourceType[resourceType] },\n );\n}\n\nfunction buildUsageRecordSpec(resourceType: UsageResourceType, memberName: UsageResourceTypeMember) {\n const base = buildUsageRecordBase(resourceType, memberName);\n const main = resolveUsageUI(billingMainPresets as Partial<Record<string, unknown>>, resourceType, 'billingMainPresets');\n const admin = resolveUsageUI(billingAdminPresets as Partial<Record<string, unknown>>, resourceType, 'billingAdminPresets');\n return resourceSpecificationFromFrontendConfiguration(\n mergeResourceFrontendConfigurations(resourceFrontendConfiguration(main), resourceFrontendConfiguration(admin)),\n base,\n () => ({\n label: { purpose: 'Preset stringifies `productKey · quantity` for dense tables.' },\n views: {\n [Op.LIST]: { purpose: 'List op in merged `views` as non-addressable; keep spec aligned with merged preset op map.', whenToUse: 'Embedded list under billing account.' },\n [Op.READ]: { purpose: 'Read op in merged `views` as non-addressable.', whenToUse: 'Row detail in inspector when wired.' },\n },\n }),\n );\n}\n\nexport const organizationUsageRecordsResourceSpecification = buildUsageRecordSpec(\n CoreResourceType.ORGANIZATION_USAGE_RECORDS,\n 'ORGANIZATION_USAGE_RECORDS',\n);\n\nexport const userUsageRecordsResourceSpecification = buildUsageRecordSpec(\n CoreResourceType.USER_USAGE_RECORDS,\n 'USER_USAGE_RECORDS',\n);\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"audit-logs.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/compliance/resources/audit-logs.resource.specification.ts"],"names":[],"mappings":"AAQA,OAAO,EAEL,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,IAAI,EAAE,EAE3B,0BAA0B,EAC1B,oBAAoB,EAErB,MAAM,uBAAuB,CAAC;AA2F/B,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;iCA2U1C,CAAC"}
1
+ {"version":3,"file":"audit-logs.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/compliance/resources/audit-logs.resource.specification.ts"],"names":[],"mappings":"AAQA,OAAO,EAEL,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,IAAI,EAAE,EAE3B,0BAA0B,EAC1B,oBAAoB,EAErB,MAAM,uBAAuB,CAAC;AA4F/B,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;iCA4U1C,CAAC"}
@@ -3,6 +3,7 @@ import { LabelAudience } from '@wildo-ai/presets-components-models';
3
3
  import { CodeDeclarationKind, CodeSymbolKind, FieldSemanticImportance, } from '@wildo-ai/zod-decorators';
4
4
  import { AuditableEvent_BaseSchema, AuditEventCategory, AuditEventSeverity, CoreResourceOperation as Op, ResourcePrimaryScope, ResourceOperationRiskLevel, AuditLogs_Operations, auditLogsResourceConfiguration_InitializationFactory as auditLogsFactory, } from '@wildo-ai/saas-models';
5
5
  import { HttpResponseStatusCode, resourceFrontendConfiguration, resourceSpecification, resourceSpecificationFromFrontendConfiguration, } from '../../../_core/index.js';
6
+ import { EngineResourceSubDomain } from '../../engine-resource-sub-domain.js';
6
7
  const auditLogsUIBehavior = auditLogsUIBehaviorSource;
7
8
  const AUDIT_ORGANIZATION_ID = 'organization_01JEXAMPLE';
8
9
  const AUDIT_APPLICATION_ID = 'application_01JEXAMPLE';
@@ -77,6 +78,7 @@ export const auditLogsResourceSpecification = resourceSpecificationFromFrontendC
77
78
  businessRole: 'Supports investigation and compliance review by showing what happened, when it happened, who acted when known, and how the event was classified.',
78
79
  lifecycleRole: 'Events are appended by the application, can be read, filtered, and exported through the API, and cannot be updated or deleted through customer APIs.',
79
80
  audience: LabelAudience.ADMIN,
81
+ subDomain: EngineResourceSubDomain.COMPLIANCE,
80
82
  codeHandling: {
81
83
  mainSchema: {
82
84
  packageName: '@wildo-ai/saas-models',
@@ -1 +1 @@
1
- {"version":3,"file":"audit-logs.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/compliance/resources/audit-logs.resource.specification.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,+BAA+B,IAAI,yBAAyB,EAAE,MAAM,8BAA8B,CAAC;AAC5G,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAEpE,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,uBAAuB,GACxB,MAAM,0BAA0B,CAA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Audience } 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 AuditableEvent_BaseSchema,\n AuditEventCategory,\n AuditEventSeverity,\n CoreResourceOperation as Op,\n ResourcePrimaryScope,\n ResourceOperationRiskLevel,\n AuditLogs_Operations,\n auditLogsResourceConfiguration_InitializationFactory as auditLogsFactory,\n} from '@wildo-ai/saas-models';\nimport {\n HttpResponseStatusCode,\n resourceFrontendConfiguration,\n resourceSpecification,\n resourceSpecificationFromFrontendConfiguration,\n} from '~wildo-specifications/_core';\n\ntype Cfg = ReturnType<typeof auditLogsFactory>;\ntype Custom = NonNullable<Cfg['customOperation']>;\ntype Core = Cfg['coreOperations'][number];\ntype Main = Cfg['mainSchema'];\n\nconst auditLogsUIBehavior = auditLogsUIBehaviorSource as ResourceUIBehaviorConfig<Custom, Core, Main>;\n\nconst AUDIT_ORGANIZATION_ID = 'organization_01JEXAMPLE';\nconst AUDIT_APPLICATION_ID = 'application_01JEXAMPLE';\nconst AUDIT_LOG_ID = 'audit_log_01JEXAMPLE';\n\nconst AUDIT_LOG_EXAMPLE = {\n _id: AUDIT_LOG_ID,\n eventId: 'a5ad8e36-7f34-4f0e-a7f4-1454a7997721',\n userId: 'user_01JEXAMPLE',\n organizationId: AUDIT_ORGANIZATION_ID,\n applicationId: AUDIT_APPLICATION_ID,\n correlationId: 'request_01JEXAMPLE',\n frontendServiceName: 'app',\n clientInstanceId: 'client_instance_01JEXAMPLE',\n riskLevel: ResourceOperationRiskLevel.HIGH,\n eventType: 'organization.member.role.changed',\n eventData: {\n targetUserId: 'user_01JTARGET',\n previousRoles: ['ORG_MEMBER'],\n newRoles: ['ORG_ADMIN'],\n },\n eventCategory: AuditEventCategory.ORG_MANAGEMENT,\n severity: AuditEventSeverity.WARNING,\n createdAt: '2026-08-20T14:32:10.000Z',\n updatedAt: '2026-08-20T14:32:10.000Z',\n _version: 1,\n} as const;\n\nconst AUDIT_LOG_CONTEXT_EXAMPLE = {\n ...AUDIT_LOG_EXAMPLE,\n organization: { _id: AUDIT_ORGANIZATION_ID },\n} as const;\n\nconst AUDIT_LOG_SUMMARY_EXAMPLE = {\n _id: AUDIT_LOG_EXAMPLE._id,\n userId: AUDIT_LOG_EXAMPLE.userId,\n organizationId: AUDIT_LOG_EXAMPLE.organizationId,\n applicationId: AUDIT_LOG_EXAMPLE.applicationId,\n correlationId: AUDIT_LOG_EXAMPLE.correlationId,\n frontendServiceName: AUDIT_LOG_EXAMPLE.frontendServiceName,\n clientInstanceId: AUDIT_LOG_EXAMPLE.clientInstanceId,\n riskLevel: AUDIT_LOG_EXAMPLE.riskLevel,\n eventType: AUDIT_LOG_EXAMPLE.eventType,\n eventCategory: AUDIT_LOG_EXAMPLE.eventCategory,\n severity: AUDIT_LOG_EXAMPLE.severity,\n createdAt: AUDIT_LOG_EXAMPLE.createdAt,\n _version: AUDIT_LOG_EXAMPLE._version,\n} as const;\n\nconst AUDIT_LOG_PAGE = {\n data: [AUDIT_LOG_EXAMPLE],\n pagination: { page: 1, limit: 20, total: 1, totalPages: 1 },\n} as const;\n\nconst AUDIT_LOG_CONTEXT_PAGE = {\n data: [AUDIT_LOG_CONTEXT_EXAMPLE],\n pagination: AUDIT_LOG_PAGE.pagination,\n} as const;\n\nconst AUDIT_LOG_SUMMARY_PAGE = {\n data: [AUDIT_LOG_SUMMARY_EXAMPLE],\n pagination: AUDIT_LOG_PAGE.pagination,\n} as const;\n\nconst AUDIT_LOG_LIST_REQUEST = {\n organizationId: AUDIT_ORGANIZATION_ID,\n eventCategory: AuditEventCategory.ORG_MANAGEMENT,\n severity: AuditEventSeverity.WARNING,\n createdAt: {\n startDate: '2026-08-20T00:00:00.000Z',\n endDate: '2026-08-21T00:00:00.000Z',\n },\n page: 1,\n limit: 20,\n sort: 'createdAt:desc,eventId:desc',\n} as const;\n\nexport const auditLogsResourceSpecification = resourceSpecificationFromFrontendConfiguration(\n resourceFrontendConfiguration(auditLogsUIBehavior),\n resourceSpecification(\n auditLogsFactory,\n AuditableEvent_BaseSchema,\n ({ schemaShape }) => ({\n purpose: 'Immutable evidence records for security, access, administration, and data events within the addressed organization.',\n businessRole: 'Supports investigation and compliance review by showing what happened, when it happened, who acted when known, and how the event was classified.',\n lifecycleRole: 'Events are appended by the application, can be read, filtered, and exported through the API, and cannot be updated or deleted through customer APIs.',\n audience: LabelAudience.ADMIN,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'AuditableEvent_BaseSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactory: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'auditLogsResourceConfiguration_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: 'AUDIT_LOGS',\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: 'AuditLogs_Operations',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n frontendConfigurationSources: [\n {\n packageName: '@wildo-ai/presets-components',\n exportName: 'auditLogsMainResourceUIBehavior',\n symbolKind: CodeSymbolKind.UI_BEHAVIOR,\n },\n ],\n notes: [\n 'Registry `AUDIT_LOGS` links optionally to both `ORGANIZATIONS` and `APPLICATION`; the application relationship carries the canonical `isPrimaryScope: true` classification used for the spec’s `resourcePrimaryScope`, while individual organization-scoped, user-only, and system rows may omit `applicationId`.',\n ],\n },\n fields: {\n eventType: schemaShape.eventType.stringSpec({\n meaning: 'Stable event name identifying what happened, such as a role change or authentication outcome.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n eventId: schemaShape.eventId.stringSpec({\n meaning: 'Stable identifier for the event itself. Use it to match the same event across API results, exports, and configured external audit sinks.',\n }),\n correlationId: schemaShape.correlationId.stringSpec({\n meaning: 'Identifier shared by events and operational records produced by one request or background execution. Use it to investigate related activity as one sequence.',\n }),\n eventCategory: schemaShape.eventCategory.enumSpec({\n meaning: 'High-level area for navigation, filters, and export groupings (populated by the service classifier).',\n importance: FieldSemanticImportance.PRIMARY,\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'AuditEventCategory',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n values: {\n [AuditEventCategory.AUTHENTICATION]: { meaning: 'Sign-in, session, and credential events.' },\n [AuditEventCategory.AUTHORIZATION]: { meaning: 'Access control and policy evaluation outcomes when classified here.' },\n [AuditEventCategory.USER_LIFECYCLE]: { meaning: 'User profile and account lifecycle when classified here.' },\n [AuditEventCategory.ORG_MANAGEMENT]: { meaning: 'Org structure, membership, and org-scoped security configuration changes when classified here.' },\n [AuditEventCategory.DATA_ACCESS]: { meaning: 'Sensitive or tracked data read/write and export when classified here.' },\n },\n }),\n severity: schemaShape.severity.enumSpec({\n meaning: 'UI and export triage level for a row (populated with `eventCategory` by the service classifier on CREATE).',\n importance: FieldSemanticImportance.PRIMARY,\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'AuditEventSeverity',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n values: {\n [AuditEventSeverity.INFO]: { meaning: 'Normal operational or informational log lines.' },\n [AuditEventSeverity.WARNING]: { meaning: 'Notable but not always urgent — worth review when scanning.' },\n [AuditEventSeverity.CRITICAL]: { meaning: 'Escalation-tier events in product triage and export filters.' },\n },\n }),\n userId: schemaShape.userId.stringSpec({ meaning: 'Acting user when known; may be empty for system-only events.' }),\n organizationId: schemaShape.organizationId.foreignKeySpec({\n meaning: 'The `organizations` row that owns the tenant context of this event; used to scope and filter the trail per tenant. Optional in cross-tenant or user-only events where no single org owns the row.',\n }),\n applicationId: schemaShape.applicationId.foreignKeySpec({\n meaning: 'The `applications` row that owns an application-scoped event. Kept distinct from organization tenancy so application SSO and machine-auth trails never synthesize an organization.',\n }),\n frontendServiceName: schemaShape.frontendServiceName.stringSpec({\n meaning: 'Frontend surface from which the action originated, when the event came from an interactive request. It can be absent for background or internal activity.',\n }),\n clientInstanceId: schemaShape.clientInstanceId.stringSpec({\n meaning: 'Optional pseudonymous browser or device-install identifier used to group activity across sessions when client-instance collection is enabled for the application.',\n }),\n eventData: schemaShape.eventData.objectSpec({\n meaning: 'Event-specific JSON details. Its keys depend on `eventType`; clients must not assume one payload shape across all event types.',\n }),\n riskLevel: schemaShape.riskLevel.enumSpec({\n meaning: 'Resource-operation risk tier for the action that generated this log row, when the classifier can map it.',\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'ResourceOperationRiskLevel',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n values: {\n [ResourceOperationRiskLevel.LOW]: { meaning: 'Low-impact action that still warrants audit in policy.' },\n [ResourceOperationRiskLevel.MEDIUM]: { meaning: 'Moderate risk — policy-sensitive changes or data movement.' },\n [ResourceOperationRiskLevel.HIGH]: { meaning: 'High impact — should stand out in review queues.' },\n [ResourceOperationRiskLevel.CRITICAL]: { meaning: 'Maximum tier — may trigger paging or runbooks when surfaced to operators.' },\n },\n }),\n createdAt: schemaShape.createdAt.dateSpec({ meaning: 'When the auditable event was recorded.' }),\n },\n operations: {\n [Op.READ]: {\n purpose: 'Read one immutable audit event in the addressed organization.',\n outcome: 'The event’s classification, actor and origin identifiers, timestamp, risk level, and event-specific details are returned.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The immutable audit event row for the supplied id was found and its classification, actor, risk tier, and payload are returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No audit event row exists for the supplied id in the caller’s scope.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is neither an organization member or administrator nor an application super administrator for the addressed scope.' },\n ],\n idempotent: true,\n examples: [{\n title: 'Inspect one organization role-change event',\n request: { organizationId: AUDIT_ORGANIZATION_ID, auditLogId: AUDIT_LOG_ID },\n response: AUDIT_LOG_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n variants: {\n context: {\n examples: [{\n title: 'Inspect an event with its organization context',\n request: { organizationId: AUDIT_ORGANIZATION_ID, auditLogId: AUDIT_LOG_ID },\n response: AUDIT_LOG_CONTEXT_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n summary: {\n examples: [{\n title: 'Inspect a compact event summary',\n request: { organizationId: AUDIT_ORGANIZATION_ID, auditLogId: AUDIT_LOG_ID },\n response: AUDIT_LOG_SUMMARY_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n },\n [Op.LIST]: {\n purpose: 'List immutable audit events in the addressed organization, optionally filtering by classification, actor, application, correlation, client instance, or time window.',\n outcome: 'A newest-first paginated page of matching events is returned, up to 100 records per page.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) paginated page of audit event rows in the caller’s scope.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is neither an organization member or administrator nor an application super administrator for the addressed scope.' },\n ],\n idempotent: true,\n examples: [{\n title: 'List warning-level organization-management events',\n request: AUDIT_LOG_LIST_REQUEST,\n response: AUDIT_LOG_PAGE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n variants: {\n context: {\n examples: [{\n title: 'List events with their organization context',\n request: AUDIT_LOG_LIST_REQUEST,\n response: AUDIT_LOG_CONTEXT_PAGE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n summary: {\n examples: [{\n title: 'List compact event summaries',\n request: AUDIT_LOG_LIST_REQUEST,\n response: AUDIT_LOG_SUMMARY_PAGE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n },\n [Op.SEARCH]: {\n purpose: 'Filter the organization audit trail by structured fields. This operation does not perform free-text search.',\n outcome: 'A paginated page of events matching every supplied filter is returned.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of audit rows matching the category / severity / time-window / actor filters.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is neither an organization member or administrator nor an application super administrator for the addressed scope.' },\n ],\n idempotent: true,\n examples: [{\n title: 'Filter warning-level organization changes by time window',\n request: {\n ...AUDIT_LOG_LIST_REQUEST,\n severity: AuditEventSeverity.WARNING,\n limit: 100,\n sort: 'createdAt:desc',\n },\n response: {\n ...AUDIT_LOG_PAGE,\n pagination: { ...AUDIT_LOG_PAGE.pagination, limit: 100 },\n },\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n [Op.CREATE]: {\n purpose: 'Internal write path for new audit rows; repository-only in factory for ingesters.',\n outcome: 'Immutable append to the log collection under service controls.',\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'An immutable audit row was appended to the log collection. Internal/service write path — the classifier/ingester appends rows; this is never a self-serve API create, and rows are never updated or deleted afterward.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The event fails schema validation (e.g. missing the service-classified `eventCategory` / `severity`, or an unknown `eventType`).', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'A non-ingester caller attempts to append an audit row — only internal service ingesters may write to the immutable trail.' },\n ],\n idempotent: false,\n },\n [AuditLogs_Operations.EXPORT_AUDIT_LOGS]: {\n operationId: AuditLogs_Operations.EXPORT_AUDIT_LOGS,\n purpose: 'Export a bounded, filtered JSON window from the addressed organization’s immutable audit trail.',\n outcome: 'Returns up to 100 audit events and the total number of matching events in the caller’s authorized scope.',\n whenToUse: 'Use when an investigation or compliance workflow needs a small synchronous JSON data set. For larger or continuously delivered data, use the separately configured SIEM delivery capability.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A synchronous JSON response containing `records`, the fixed `format: \"json\"`, and `totalCount`. It is not a file download or an asynchronous archive job.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The export filter DTO is malformed (for example, an invalid date range or `maxRecords` outside 1–100).', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an organization administrator or application super administrator for the addressed scope.' },\n ],\n idempotent: true,\n rateLimitNote: 'Each request performs a bounded read of at most 100 audit events; apply a service-level rate limit before repeatedly scanning broad date ranges.',\n examples: [{\n title: 'Export warning-level organization-management events',\n request: {\n organizationId: AUDIT_ORGANIZATION_ID,\n eventCategory: AuditEventCategory.ORG_MANAGEMENT,\n severity: AuditEventSeverity.WARNING,\n userId: AUDIT_LOG_EXAMPLE.userId,\n createdAt: AUDIT_LOG_LIST_REQUEST.createdAt,\n maxRecords: 100,\n },\n response: {\n records: [AUDIT_LOG_EXAMPLE],\n format: 'json',\n totalCount: 1,\n },\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n businessConstraints: [\n 'Audit events cannot be updated or deleted through customer APIs. A correction or reversal must be represented by a new event rather than changing history.',\n 'The application assigns `eventCategory` and `severity` when recording an event; API clients use those values for filtering and must not treat them as editable labels.',\n ],\n }),\n // Scope mirrors the registry-derived value: the `APPLICATION → AUDIT_LOGS`\n // relationship in `resources-registry.shared.core.definitions.ts` carries\n // `isPrimaryScope: true`, so the factory derives APPLICATION. Audit rows are\n // an app-wide compliance ledger (rows carry an `organizationId` column for\n // per-tenant filtering, but the resource itself is anchored at the\n // application). Was ORGANIZATIONS until the companion alignment guard\n // started pairing engine specs with materialized core configs (2026-07-02)\n // and flagged the drift.\n { resourcePrimaryScope: ResourcePrimaryScope.APPLICATION },\n ),\n () => ({\n label: {\n purpose: 'Default merged preset builds a string from `eventType` and `createdAt` for the row label; the spec’s label purpose is to keep human-readable one-line context in list surfaces.',\n },\n layout: {\n purpose: 'Align `security` audit log templates with `overview` (event identity), `actors` (who/where), and `payload` (payload JSON / structured data).',\n displayPurpose: 'Read-only list + detail: display template wires these sections; there is no edit layout for immutable rows in default presets.',\n sections: {\n overview: {\n purpose: 'Event type, severity, risk, and time — first screen when triaging a row.',\n whenToUse: 'Summary cards and the top of a detail drawer.',\n textSlots: {\n title: { purpose: 'Name the current audit event in human language (often event type + time).' },\n description: { purpose: 'Clarify that rows are point-in-time records and are not user-editable in product.' },\n },\n },\n actors: {\n purpose: 'User, org, and related actor identifiers when present on the row.',\n whenToUse: 'Answering “who was involved” before reading payload content.',\n textSlots: {\n title: { purpose: 'Label the parties block.' },\n description: { purpose: 'Tie the row to people and org context without over-claiming attribution when fields are empty.' },\n },\n },\n payload: {\n purpose: 'Structured `eventData` and any redacted or expanded technical fields per template rules.',\n whenToUse: 'Deep inspection and support debugging after orientation from overview/actors.',\n textSlots: {\n title: { purpose: 'Label the payload/technical area.' },\n description: { purpose: 'Caution that shape varies by `eventType`; do not assert a single fixed JSON schema in prose.' },\n },\n },\n },\n },\n views: {\n [Op.LIST]: { purpose: 'Primary addressable trail view in merged security preset wiring — dashboard-style: `severity` quick-filter tab strip + `createdAt` day-bucket grouping via `collectionDisplayConfig` (both fields are in the LIST op\\'s declared `filterFields`; `createdAt` is a summary field).', whenToUse: 'Org and app security audit log routes when enabled; severity tabs are the review entry point.' },\n [Op.SEARCH]: { purpose: 'Addressable search surface when the merged preset flags search as addressable for this resource.', whenToUse: 'Investigators filtering by category, time, and severity in large environments.' },\n [Op.READ]: { purpose: 'Single-event inspection; not addressable in the default `views` array but still modeled for read shells.', whenToUse: 'Drill-in from a list row in audit viewers.' },\n [AuditLogs_Operations.EXPORT_AUDIT_LOGS]: { purpose: 'Bounded JSON retrieval flow with filter DTO; non-addressable in the default `views` array but invoked from admin/audit UIs when wired.', whenToUse: 'Focused investigation and compliance review where the requested window fits within 100 events.' },\n },\n }),\n);\n"]}
1
+ {"version":3,"file":"audit-logs.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/compliance/resources/audit-logs.resource.specification.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,+BAA+B,IAAI,yBAAyB,EAAE,MAAM,8BAA8B,CAAC;AAC5G,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAEpE,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,yBAAyB,EACzB,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,IAAI,EAAE,EAC3B,oBAAoB,EACpB,0BAA0B,EAC1B,oBAAoB,EACpB,oDAAoD,IAAI,gBAAgB,GACzE,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,sBAAsB,EACtB,6BAA6B,EAC7B,qBAAqB,EACrB,8CAA8C,GAC/C,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAO3E,MAAM,mBAAmB,GAAG,yBAAyE,CAAC;AAEtG,MAAM,qBAAqB,GAAG,yBAAyB,CAAC;AACxD,MAAM,oBAAoB,GAAG,wBAAwB,CAAC;AACtD,MAAM,YAAY,GAAG,sBAAsB,CAAC;AAE5C,MAAM,iBAAiB,GAAG;IACxB,GAAG,EAAE,YAAY;IACjB,OAAO,EAAE,sCAAsC;IAC/C,MAAM,EAAE,iBAAiB;IACzB,cAAc,EAAE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nG,SAAS,EAAE,+EAA+E;gBAC1F,SAAS,EAAE;oBACT,KAAK,EAAE,EAAE,OAAO,EAAE,mCAAmC,EAAE;oBACvD,WAAW,EAAE,EAAE,OAAO,EAAE,8FAA8F,EAAE;iBACzH;aACF;SACF;KACF;IACD,KAAK,EAAE;QACL,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,OAAO,EAAE,mRAAmR,EAAE,SAAS,EAAE,+FAA+F,EAAE;QACvZ,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE,kGAAkG,EAAE,SAAS,EAAE,gFAAgF,EAAE;QACzN,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,OAAO,EAAE,0GAA0G,EAAE,SAAS,EAAE,4CAA4C,EAAE;QAC3L,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,EAAE,OAAO,EAAE,wIAAwI,EAAE,SAAS,EAAE,gGAAgG,EAAE;KAC7S;CACF,CAAC,CACH,CAAC","sourcesContent":["import { auditLogsMainResourceUIBehavior as auditLogsUIBehaviorSource } 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 AuditableEvent_BaseSchema,\n AuditEventCategory,\n AuditEventSeverity,\n CoreResourceOperation as Op,\n ResourcePrimaryScope,\n ResourceOperationRiskLevel,\n AuditLogs_Operations,\n auditLogsResourceConfiguration_InitializationFactory as auditLogsFactory,\n} from '@wildo-ai/saas-models';\nimport {\n HttpResponseStatusCode,\n resourceFrontendConfiguration,\n resourceSpecification,\n resourceSpecificationFromFrontendConfiguration,\n} from '~wildo-specifications/_core';\nimport { EngineResourceSubDomain } from '../../engine-resource-sub-domain';\n\ntype Cfg = ReturnType<typeof auditLogsFactory>;\ntype Custom = NonNullable<Cfg['customOperation']>;\ntype Core = Cfg['coreOperations'][number];\ntype Main = Cfg['mainSchema'];\n\nconst auditLogsUIBehavior = auditLogsUIBehaviorSource as ResourceUIBehaviorConfig<Custom, Core, Main>;\n\nconst AUDIT_ORGANIZATION_ID = 'organization_01JEXAMPLE';\nconst AUDIT_APPLICATION_ID = 'application_01JEXAMPLE';\nconst AUDIT_LOG_ID = 'audit_log_01JEXAMPLE';\n\nconst AUDIT_LOG_EXAMPLE = {\n _id: AUDIT_LOG_ID,\n eventId: 'a5ad8e36-7f34-4f0e-a7f4-1454a7997721',\n userId: 'user_01JEXAMPLE',\n organizationId: AUDIT_ORGANIZATION_ID,\n applicationId: AUDIT_APPLICATION_ID,\n correlationId: 'request_01JEXAMPLE',\n frontendServiceName: 'app',\n clientInstanceId: 'client_instance_01JEXAMPLE',\n riskLevel: ResourceOperationRiskLevel.HIGH,\n eventType: 'organization.member.role.changed',\n eventData: {\n targetUserId: 'user_01JTARGET',\n previousRoles: ['ORG_MEMBER'],\n newRoles: ['ORG_ADMIN'],\n },\n eventCategory: AuditEventCategory.ORG_MANAGEMENT,\n severity: AuditEventSeverity.WARNING,\n createdAt: '2026-08-20T14:32:10.000Z',\n updatedAt: '2026-08-20T14:32:10.000Z',\n _version: 1,\n} as const;\n\nconst AUDIT_LOG_CONTEXT_EXAMPLE = {\n ...AUDIT_LOG_EXAMPLE,\n organization: { _id: AUDIT_ORGANIZATION_ID },\n} as const;\n\nconst AUDIT_LOG_SUMMARY_EXAMPLE = {\n _id: AUDIT_LOG_EXAMPLE._id,\n userId: AUDIT_LOG_EXAMPLE.userId,\n organizationId: AUDIT_LOG_EXAMPLE.organizationId,\n applicationId: AUDIT_LOG_EXAMPLE.applicationId,\n correlationId: AUDIT_LOG_EXAMPLE.correlationId,\n frontendServiceName: AUDIT_LOG_EXAMPLE.frontendServiceName,\n clientInstanceId: AUDIT_LOG_EXAMPLE.clientInstanceId,\n riskLevel: AUDIT_LOG_EXAMPLE.riskLevel,\n eventType: AUDIT_LOG_EXAMPLE.eventType,\n eventCategory: AUDIT_LOG_EXAMPLE.eventCategory,\n severity: AUDIT_LOG_EXAMPLE.severity,\n createdAt: AUDIT_LOG_EXAMPLE.createdAt,\n _version: AUDIT_LOG_EXAMPLE._version,\n} as const;\n\nconst AUDIT_LOG_PAGE = {\n data: [AUDIT_LOG_EXAMPLE],\n pagination: { page: 1, limit: 20, total: 1, totalPages: 1 },\n} as const;\n\nconst AUDIT_LOG_CONTEXT_PAGE = {\n data: [AUDIT_LOG_CONTEXT_EXAMPLE],\n pagination: AUDIT_LOG_PAGE.pagination,\n} as const;\n\nconst AUDIT_LOG_SUMMARY_PAGE = {\n data: [AUDIT_LOG_SUMMARY_EXAMPLE],\n pagination: AUDIT_LOG_PAGE.pagination,\n} as const;\n\nconst AUDIT_LOG_LIST_REQUEST = {\n organizationId: AUDIT_ORGANIZATION_ID,\n eventCategory: AuditEventCategory.ORG_MANAGEMENT,\n severity: AuditEventSeverity.WARNING,\n createdAt: {\n startDate: '2026-08-20T00:00:00.000Z',\n endDate: '2026-08-21T00:00:00.000Z',\n },\n page: 1,\n limit: 20,\n sort: 'createdAt:desc,eventId:desc',\n} as const;\n\nexport const auditLogsResourceSpecification = resourceSpecificationFromFrontendConfiguration(\n resourceFrontendConfiguration(auditLogsUIBehavior),\n resourceSpecification(\n auditLogsFactory,\n AuditableEvent_BaseSchema,\n ({ schemaShape }) => ({\n purpose: 'Immutable evidence records for security, access, administration, and data events within the addressed organization.',\n businessRole: 'Supports investigation and compliance review by showing what happened, when it happened, who acted when known, and how the event was classified.',\n lifecycleRole: 'Events are appended by the application, can be read, filtered, and exported through the API, and cannot be updated or deleted through customer APIs.',\n audience: LabelAudience.ADMIN,\n subDomain: EngineResourceSubDomain.COMPLIANCE,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'AuditableEvent_BaseSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactory: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'auditLogsResourceConfiguration_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: 'AUDIT_LOGS',\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: 'AuditLogs_Operations',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n frontendConfigurationSources: [\n {\n packageName: '@wildo-ai/presets-components',\n exportName: 'auditLogsMainResourceUIBehavior',\n symbolKind: CodeSymbolKind.UI_BEHAVIOR,\n },\n ],\n notes: [\n 'Registry `AUDIT_LOGS` links optionally to both `ORGANIZATIONS` and `APPLICATION`; the application relationship carries the canonical `isPrimaryScope: true` classification used for the spec’s `resourcePrimaryScope`, while individual organization-scoped, user-only, and system rows may omit `applicationId`.',\n ],\n },\n fields: {\n eventType: schemaShape.eventType.stringSpec({\n meaning: 'Stable event name identifying what happened, such as a role change or authentication outcome.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n eventId: schemaShape.eventId.stringSpec({\n meaning: 'Stable identifier for the event itself. Use it to match the same event across API results, exports, and configured external audit sinks.',\n }),\n correlationId: schemaShape.correlationId.stringSpec({\n meaning: 'Identifier shared by events and operational records produced by one request or background execution. Use it to investigate related activity as one sequence.',\n }),\n eventCategory: schemaShape.eventCategory.enumSpec({\n meaning: 'High-level area for navigation, filters, and export groupings (populated by the service classifier).',\n importance: FieldSemanticImportance.PRIMARY,\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'AuditEventCategory',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n values: {\n [AuditEventCategory.AUTHENTICATION]: { meaning: 'Sign-in, session, and credential events.' },\n [AuditEventCategory.AUTHORIZATION]: { meaning: 'Access control and policy evaluation outcomes when classified here.' },\n [AuditEventCategory.USER_LIFECYCLE]: { meaning: 'User profile and account lifecycle when classified here.' },\n [AuditEventCategory.ORG_MANAGEMENT]: { meaning: 'Org structure, membership, and org-scoped security configuration changes when classified here.' },\n [AuditEventCategory.DATA_ACCESS]: { meaning: 'Sensitive or tracked data read/write and export when classified here.' },\n },\n }),\n severity: schemaShape.severity.enumSpec({\n meaning: 'UI and export triage level for a row (populated with `eventCategory` by the service classifier on CREATE).',\n importance: FieldSemanticImportance.PRIMARY,\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'AuditEventSeverity',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n values: {\n [AuditEventSeverity.INFO]: { meaning: 'Normal operational or informational log lines.' },\n [AuditEventSeverity.WARNING]: { meaning: 'Notable but not always urgent — worth review when scanning.' },\n [AuditEventSeverity.CRITICAL]: { meaning: 'Escalation-tier events in product triage and export filters.' },\n },\n }),\n userId: schemaShape.userId.stringSpec({ meaning: 'Acting user when known; may be empty for system-only events.' }),\n organizationId: schemaShape.organizationId.foreignKeySpec({\n meaning: 'The `organizations` row that owns the tenant context of this event; used to scope and filter the trail per tenant. Optional in cross-tenant or user-only events where no single org owns the row.',\n }),\n applicationId: schemaShape.applicationId.foreignKeySpec({\n meaning: 'The `applications` row that owns an application-scoped event. Kept distinct from organization tenancy so application SSO and machine-auth trails never synthesize an organization.',\n }),\n frontendServiceName: schemaShape.frontendServiceName.stringSpec({\n meaning: 'Frontend surface from which the action originated, when the event came from an interactive request. It can be absent for background or internal activity.',\n }),\n clientInstanceId: schemaShape.clientInstanceId.stringSpec({\n meaning: 'Optional pseudonymous browser or device-install identifier used to group activity across sessions when client-instance collection is enabled for the application.',\n }),\n eventData: schemaShape.eventData.objectSpec({\n meaning: 'Event-specific JSON details. Its keys depend on `eventType`; clients must not assume one payload shape across all event types.',\n }),\n riskLevel: schemaShape.riskLevel.enumSpec({\n meaning: 'Resource-operation risk tier for the action that generated this log row, when the classifier can map it.',\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'ResourceOperationRiskLevel',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n values: {\n [ResourceOperationRiskLevel.LOW]: { meaning: 'Low-impact action that still warrants audit in policy.' },\n [ResourceOperationRiskLevel.MEDIUM]: { meaning: 'Moderate risk — policy-sensitive changes or data movement.' },\n [ResourceOperationRiskLevel.HIGH]: { meaning: 'High impact — should stand out in review queues.' },\n [ResourceOperationRiskLevel.CRITICAL]: { meaning: 'Maximum tier — may trigger paging or runbooks when surfaced to operators.' },\n },\n }),\n createdAt: schemaShape.createdAt.dateSpec({ meaning: 'When the auditable event was recorded.' }),\n },\n operations: {\n [Op.READ]: {\n purpose: 'Read one immutable audit event in the addressed organization.',\n outcome: 'The event’s classification, actor and origin identifiers, timestamp, risk level, and event-specific details are returned.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The immutable audit event row for the supplied id was found and its classification, actor, risk tier, and payload are returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No audit event row exists for the supplied id in the caller’s scope.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is neither an organization member or administrator nor an application super administrator for the addressed scope.' },\n ],\n idempotent: true,\n examples: [{\n title: 'Inspect one organization role-change event',\n request: { organizationId: AUDIT_ORGANIZATION_ID, auditLogId: AUDIT_LOG_ID },\n response: AUDIT_LOG_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n variants: {\n context: {\n examples: [{\n title: 'Inspect an event with its organization context',\n request: { organizationId: AUDIT_ORGANIZATION_ID, auditLogId: AUDIT_LOG_ID },\n response: AUDIT_LOG_CONTEXT_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n summary: {\n examples: [{\n title: 'Inspect a compact event summary',\n request: { organizationId: AUDIT_ORGANIZATION_ID, auditLogId: AUDIT_LOG_ID },\n response: AUDIT_LOG_SUMMARY_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n },\n [Op.LIST]: {\n purpose: 'List immutable audit events in the addressed organization, optionally filtering by classification, actor, application, correlation, client instance, or time window.',\n outcome: 'A newest-first paginated page of matching events is returned, up to 100 records per page.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) paginated page of audit event rows in the caller’s scope.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is neither an organization member or administrator nor an application super administrator for the addressed scope.' },\n ],\n idempotent: true,\n examples: [{\n title: 'List warning-level organization-management events',\n request: AUDIT_LOG_LIST_REQUEST,\n response: AUDIT_LOG_PAGE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n variants: {\n context: {\n examples: [{\n title: 'List events with their organization context',\n request: AUDIT_LOG_LIST_REQUEST,\n response: AUDIT_LOG_CONTEXT_PAGE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n summary: {\n examples: [{\n title: 'List compact event summaries',\n request: AUDIT_LOG_LIST_REQUEST,\n response: AUDIT_LOG_SUMMARY_PAGE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n },\n [Op.SEARCH]: {\n purpose: 'Filter the organization audit trail by structured fields. This operation does not perform free-text search.',\n outcome: 'A paginated page of events matching every supplied filter is returned.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of audit rows matching the category / severity / time-window / actor filters.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is neither an organization member or administrator nor an application super administrator for the addressed scope.' },\n ],\n idempotent: true,\n examples: [{\n title: 'Filter warning-level organization changes by time window',\n request: {\n ...AUDIT_LOG_LIST_REQUEST,\n severity: AuditEventSeverity.WARNING,\n limit: 100,\n sort: 'createdAt:desc',\n },\n response: {\n ...AUDIT_LOG_PAGE,\n pagination: { ...AUDIT_LOG_PAGE.pagination, limit: 100 },\n },\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n [Op.CREATE]: {\n purpose: 'Internal write path for new audit rows; repository-only in factory for ingesters.',\n outcome: 'Immutable append to the log collection under service controls.',\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'An immutable audit row was appended to the log collection. Internal/service write path — the classifier/ingester appends rows; this is never a self-serve API create, and rows are never updated or deleted afterward.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The event fails schema validation (e.g. missing the service-classified `eventCategory` / `severity`, or an unknown `eventType`).', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'A non-ingester caller attempts to append an audit row — only internal service ingesters may write to the immutable trail.' },\n ],\n idempotent: false,\n },\n [AuditLogs_Operations.EXPORT_AUDIT_LOGS]: {\n operationId: AuditLogs_Operations.EXPORT_AUDIT_LOGS,\n purpose: 'Export a bounded, filtered JSON window from the addressed organization’s immutable audit trail.',\n outcome: 'Returns up to 100 audit events and the total number of matching events in the caller’s authorized scope.',\n whenToUse: 'Use when an investigation or compliance workflow needs a small synchronous JSON data set. For larger or continuously delivered data, use the separately configured SIEM delivery capability.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A synchronous JSON response containing `records`, the fixed `format: \"json\"`, and `totalCount`. It is not a file download or an asynchronous archive job.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The export filter DTO is malformed (for example, an invalid date range or `maxRecords` outside 1–100).', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an organization administrator or application super administrator for the addressed scope.' },\n ],\n idempotent: true,\n rateLimitNote: 'Each request performs a bounded read of at most 100 audit events; apply a service-level rate limit before repeatedly scanning broad date ranges.',\n examples: [{\n title: 'Export warning-level organization-management events',\n request: {\n organizationId: AUDIT_ORGANIZATION_ID,\n eventCategory: AuditEventCategory.ORG_MANAGEMENT,\n severity: AuditEventSeverity.WARNING,\n userId: AUDIT_LOG_EXAMPLE.userId,\n createdAt: AUDIT_LOG_LIST_REQUEST.createdAt,\n maxRecords: 100,\n },\n response: {\n records: [AUDIT_LOG_EXAMPLE],\n format: 'json',\n totalCount: 1,\n },\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n businessConstraints: [\n 'Audit events cannot be updated or deleted through customer APIs. A correction or reversal must be represented by a new event rather than changing history.',\n 'The application assigns `eventCategory` and `severity` when recording an event; API clients use those values for filtering and must not treat them as editable labels.',\n ],\n }),\n // Scope mirrors the registry-derived value: the `APPLICATION → AUDIT_LOGS`\n // relationship in `resources-registry.shared.core.definitions.ts` carries\n // `isPrimaryScope: true`, so the factory derives APPLICATION. Audit rows are\n // an app-wide compliance ledger (rows carry an `organizationId` column for\n // per-tenant filtering, but the resource itself is anchored at the\n // application). Was ORGANIZATIONS until the companion alignment guard\n // started pairing engine specs with materialized core configs (2026-07-02)\n // and flagged the drift.\n { resourcePrimaryScope: ResourcePrimaryScope.APPLICATION },\n ),\n () => ({\n label: {\n purpose: 'Default merged preset builds a string from `eventType` and `createdAt` for the row label; the spec’s label purpose is to keep human-readable one-line context in list surfaces.',\n },\n layout: {\n purpose: 'Align `security` audit log templates with `overview` (event identity), `actors` (who/where), and `payload` (payload JSON / structured data).',\n displayPurpose: 'Read-only list + detail: display template wires these sections; there is no edit layout for immutable rows in default presets.',\n sections: {\n overview: {\n purpose: 'Event type, severity, risk, and time — first screen when triaging a row.',\n whenToUse: 'Summary cards and the top of a detail drawer.',\n textSlots: {\n title: { purpose: 'Name the current audit event in human language (often event type + time).' },\n description: { purpose: 'Clarify that rows are point-in-time records and are not user-editable in product.' },\n },\n },\n actors: {\n purpose: 'User, org, and related actor identifiers when present on the row.',\n whenToUse: 'Answering “who was involved” before reading payload content.',\n textSlots: {\n title: { purpose: 'Label the parties block.' },\n description: { purpose: 'Tie the row to people and org context without over-claiming attribution when fields are empty.' },\n },\n },\n payload: {\n purpose: 'Structured `eventData` and any redacted or expanded technical fields per template rules.',\n whenToUse: 'Deep inspection and support debugging after orientation from overview/actors.',\n textSlots: {\n title: { purpose: 'Label the payload/technical area.' },\n description: { purpose: 'Caution that shape varies by `eventType`; do not assert a single fixed JSON schema in prose.' },\n },\n },\n },\n },\n views: {\n [Op.LIST]: { purpose: 'Primary addressable trail view in merged security preset wiring — dashboard-style: `severity` quick-filter tab strip + `createdAt` day-bucket grouping via `collectionDisplayConfig` (both fields are in the LIST op\\'s declared `filterFields`; `createdAt` is a summary field).', whenToUse: 'Org and app security audit log routes when enabled; severity tabs are the review entry point.' },\n [Op.SEARCH]: { purpose: 'Addressable search surface when the merged preset flags search as addressable for this resource.', whenToUse: 'Investigators filtering by category, time, and severity in large environments.' },\n [Op.READ]: { purpose: 'Single-event inspection; not addressable in the default `views` array but still modeled for read shells.', whenToUse: 'Drill-in from a list row in audit viewers.' },\n [AuditLogs_Operations.EXPORT_AUDIT_LOGS]: { purpose: 'Bounded JSON retrieval flow with filter DTO; non-addressable in the default `views` array but invoked from admin/audit UIs when wired.', whenToUse: 'Focused investigation and compliance review where the requested window fits within 100 events.' },\n },\n }),\n);\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"engine-resource-specifications.registry.d.ts","sourceRoot":"","sources":["../../../../src/engine/engine-resource-specifications.registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AAIH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AA6IzE;;;;;GAKG;AACH,eAAO,MAAM,kCAAkC,EAAE,qBAsGhD,CAAC"}
1
+ {"version":3,"file":"engine-resource-specifications.registry.d.ts","sourceRoot":"","sources":["../../../../src/engine/engine-resource-specifications.registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AAIH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AA8IzE;;;;;GAKG;AACH,eAAO,MAAM,kCAAkC,EAAE,qBA0GhD,CAAC"}
@@ -50,6 +50,7 @@ import { applicationsResourceSpecification } from './applications/resources/appl
50
50
  // auth
51
51
  import { organizationApiKeysResourceSpecification } from './auth/resources/organization-api-keys.resource.specification.js';
52
52
  import { organizationOAuthClientsResourceSpecification } from './auth/resources/organization-oauth-clients.resource.specification.js';
53
+ import { consumableTokensResourceSpecification } from './auth/resources/consumable-tokens.resource.specification.js';
53
54
  import { oauthConsentGrantsResourceSpecification } from './auth/resources/oauth-consent-grants.resource.specification.js';
54
55
  import { platformAccessGrantsResourceSpecification } from './auth/resources/platform-access-grants.resource.specification.js';
55
56
  import { applicationScimProvisioningConfigResourceSpecification, organizationScimProvisioningConfigResourceSpecification, } from './auth/resources/scim-provisioning-config.resource.specification.js';
@@ -129,6 +130,10 @@ export const engineResourceSpecificationsByType = {
129
130
  [CoreResourceType.APPLICATION_VERSIONS]: applicationVersionsResourceSpecification,
130
131
  [CoreResourceType.APPLICATION]: applicationsResourceSpecification,
131
132
  // auth
133
+ // `consumableTokens` is a BackendResourceType, not a CoreResourceType — same situation as
134
+ // `dataSeedRuns` below, so it is keyed by its literal resource-type string and sits outside the
135
+ // core-registry alignment guard's population by construction.
136
+ consumableTokens: consumableTokensResourceSpecification,
132
137
  [CoreResourceType.ORG_API_KEYS]: organizationApiKeysResourceSpecification,
133
138
  [CoreResourceType.OAUTH_CLIENTS_ORGANIZATION]: organizationOAuthClientsResourceSpecification,
134
139
  [CoreResourceType.ORGANIZATION_SCIM_PROVISIONING_CONFIG]: organizationScimProvisioningConfigResourceSpecification,
@@ -1 +1 @@
1
- {"version":3,"file":"engine-resource-specifications.registry.js","sourceRoot":"","sources":["../../../../src/engine/engine-resource-specifications.registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAIzD,eAAe;AACf,OAAO,EAAE,uCAAuC,EAAE,MAAM,sEAAsE,CAAC;AAC/H,OAAO,EAAE,wCAAwC,EAAE,MAAM,sEAAsE,CAAC;AAChI,OAAO,EAAE,4CAA4C,EAAE,MAAM,2EAA2E,CAAC;AACzI,OAAO,EAAE,wCAAwC,EAAE,MAAM,sEAAsE,CAAC;AAChI,OAAO,EAAE,iCAAiC,EAAE,MAAM,8DAA8D,CAAC;AACjH,OAAO;AACP,OAAO,EAAE,wCAAwC,EAAE,MAAM,+DAA+D,CAAC;AACzH,OAAO,EAAE,6CAA6C,EAAE,MAAM,oEAAoE,CAAC;AACnI,OAAO,EAAE,uCAAuC,EAAE,MAAM,8DAA8D,CAAC;AACvH,OAAO,EAAE,yCAAyC,EAAE,MAAM,gEAAgE,CAAC;AAC3H,OAAO,EACL,sDAAsD,EACtD,uDAAuD,GACxD,MAAM,kEAAkE,CAAC;AAC1E,8EAA8E;AAC9E,0FAA0F;AAC1F,OAAO,EAAE,2CAA2C,EAAE,MAAM,qDAAqD,CAAC;AAClH,OAAO,EACL,+CAA+C,EAC/C,gDAAgD,GACjD,MAAM,2DAA2D,CAAC;AACnE,OAAO,EACL,gDAAgD,EAChD,iDAAiD,GAClD,MAAM,4DAA4D,CAAC;AACpE,OAAO,EACL,yCAAyC,EACzC,0CAA0C,GAC3C,MAAM,oDAAoD,CAAC;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oB,CAAC,EAAE,uCAAuC;IAChF,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,EAAE,oCAAoC;IACzE,CAAC,gBAAgB,CAAC,aAAa,CAAC,EAAE,iCAAiC;IACnE,CAAC,gBAAgB,CAAC,qBAAqB,CAAC,EAAE,wCAAwC;IAClF,CAAC,gBAAgB,CAAC,kBAAkB,CAAC,EAAE,qCAAqC;IAC5E,CAAC,gBAAgB,CAAC,SAAS,CAAC,EAAE,6BAA6B;IAC3D,CAAC,gBAAgB,CAAC,KAAK,CAAC,EAAE,0BAA0B;CACrD,CAAC","sourcesContent":["/**\n * Aggregated engine resource-specification overlay, keyed by `CoreResourceType`.\n *\n * # Purpose\n *\n * Every engine `*.resource.specification.ts` authors Tier-1/2/3 documentation\n * (operation summary/description, field/enum/tag descriptions, response statuses,\n * error scenarios, idempotency, rate-limit notes, examples). Those specs are\n * exported file-by-file with no aggregation. This registry collects all of them\n * into a single `Record<resourceType, ResourceSpecificationConfig>` so the\n * **companion OpenAPI projector** can attach the authored documentation as an\n * overlay when it projects core (engine) resources into an application's\n * generated OpenAPI (`apiDocResources` in `WildoTechnicalDocConfig`).\n *\n * # Consumption model (merged into an app's `resourceSpecifications` overlay)\n *\n * Applications spread this registry FIRST into their specifications package's\n * `resourceSpecifications` companion export (app-authored specs override on a\n * shared `resourceType`) so the companion can resolve engine-resource\n * per-field / per-operation semantics for labelling, translation, and\n * `wildo context spec`. The companion's `resource-specifications` handler runs\n * `assertResourceSpecificationsAlignWithRegistry` over that merged overlay\n * against a registry view that mirrors the backend runtime merge: the app's\n * shared registry PLUS the core configs materialized from\n * `coreShared_ResourcesConfigurations_FactoryMap` (app registrations win).\n * Every spec here that declares `resourcePrimaryScope` is therefore\n * scope-checked against its materialized core config on every introspection\n * call — a declared scope that drifts from the registry-derived scope fails\n * fast at the companion. The OpenAPI projector consumes the same registry to\n * overlay Tier-1/2/3 documentation onto the core resources it materializes.\n *\n * # Keying\n *\n * Keys are `CoreResourceType` members and MUST match the keys of\n * `coreShared_ResourcesConfigurations_FactoryMap` (`@wildo-ai/saas-models`) so\n * the projector's `engineResourceSpecificationsByType[resourceType]` lookup\n * resolves the overlay for the materialized config. Polymorphic resources\n * (org/app/user variants) contribute one entry per variant.\n *\n * One entry per exported `*ResourceSpecification` const across all engine\n * resource specs (77 total).\n */\n\nimport { CoreResourceType } from '@wildo-ai/saas-models';\n\nimport type { ResourceSpecification } from '~wildo-specifications/_core';\n\n// applications\nimport { applicationApiKeysResourceSpecification } from './applications/resources/application-api-keys.resource.specification';\nimport { applicationMetadataResourceSpecification } from './applications/resources/application-metadata.resource.specification';\nimport { applicationOAuthClientsResourceSpecification } from './applications/resources/application-oauth-clients.resource.specification';\nimport { applicationVersionsResourceSpecification } from './applications/resources/application-versions.resource.specification';\nimport { applicationsResourceSpecification } from './applications/resources/applications.resource.specification';\n// auth\nimport { organizationApiKeysResourceSpecification } from './auth/resources/organization-api-keys.resource.specification';\nimport { organizationOAuthClientsResourceSpecification } from './auth/resources/organization-oauth-clients.resource.specification';\nimport { oauthConsentGrantsResourceSpecification } from './auth/resources/oauth-consent-grants.resource.specification';\nimport { platformAccessGrantsResourceSpecification } from './auth/resources/platform-access-grants.resource.specification';\nimport {\n applicationScimProvisioningConfigResourceSpecification,\n organizationScimProvisioningConfigResourceSpecification,\n} from './auth/resources/scim-provisioning-config.resource.specification';\n// SCIM bearer credentials are organization-scoped until an application-scoped\n// SCIM protocol and authorizer actually exist; do not register a documentation-only twin.\nimport { organizationScimTokensResourceSpecification } from './auth/resources/scim-tokens.resource.specification';\nimport {\n applicationSiemDeliveryDlqResourceSpecification,\n organizationSiemDeliveryDlqResourceSpecification,\n} from './auth/resources/siem-delivery-dlq.resource.specification';\nimport {\n applicationSiemExportConfigResourceSpecification,\n organizationSiemExportConfigResourceSpecification,\n} from './auth/resources/siem-export-config.resource.specification';\nimport {\n applicationSsoConfigResourceSpecification,\n organizationSsoConfigResourceSpecification,\n} from './auth/resources/sso-config.resource.specification';\nimport {\n applicationSsoConnectionsResourceSpecification,\n organizationSsoConnectionsResourceSpecification,\n} from './auth/resources/sso-connections.resource.specification';\n// billing\nimport {\n organizationBillingAccountsResourceSpecification,\n userBillingAccountsResourceSpecification,\n} from './billing/resources/billing-accounts.resource.specification';\nimport {\n organizationCreditPoolsResourceSpecification,\n userCreditPoolsResourceSpecification,\n} from './billing/resources/credit-pools.resource.specification';\nimport {\n organizationInvoiceRefsResourceSpecification,\n userInvoiceRefsResourceSpecification,\n} from './billing/resources/invoice-refs.resource.specification';\nimport { pricesResourceSpecification } from './billing/resources/prices.resource.specification';\nimport { productsResourceSpecification } from './billing/resources/products.resource.specification';\nimport { promotionsResourceSpecification } from './billing/resources/promotions.resource.specification';\nimport { referralsResourceSpecification } from './billing/resources/referrals.resource.specification';\nimport {\n organizationSubscriptionsResourceSpecification,\n userSubscriptionsResourceSpecification,\n} from './billing/resources/subscriptions.resource.specification';\nimport {\n organizationUsageRecordsResourceSpecification,\n userUsageRecordsResourceSpecification,\n} from './billing/resources/usage-records.resource.specification';\n// compliance\nimport { auditLogsResourceSpecification } from './compliance/resources/audit-logs.resource.specification';\n// features\nimport { applicationFeaturesResourceSpecification } from './features/resources/application-features.resource.specification';\nimport { organizationFeaturesResourceSpecification } from './features/resources/organization-features.resource.specification';\nimport { userFeaturesResourceSpecification } from './features/resources/user-features.resource.specification';\n// files\nimport { filesResourceSpecification } from './files/resources/files.resource.specification';\n// guidance\nimport {\n organizationGuidanceStateResourceSpecification,\n userGuidanceStateResourceSpecification,\n} from './guidance/resources/guidance-state.resource.specification';\nimport {\n organizationLifecycleStateResourceSpecification,\n userLifecycleStateResourceSpecification,\n} from './guidance/resources/lifecycle-state.resource.specification';\nimport {\n organizationProgressionStateResourceSpecification,\n userProgressionStateResourceSpecification,\n} from './guidance/resources/progression-state.resource.specification';\n// infrastructure\nimport { dataSeedRunsResourceSpecification } from './infrastructure/resources/data-seed-runs.resource.specification';\nimport { externalDataPipelineStatesResourceSpecification } from './infrastructure/resources/external-data-pipeline-states.resource.specification';\nimport { jobExecutionsResourceSpecification } from './infrastructure/resources/job-executions.resource.specification';\nimport { jobPayloadStorageResourceSpecification } from './infrastructure/resources/job-payload-storage.resource.specification';\n// flows-actors\nimport {\n applicationA2aTokenBudgetStateResourceSpecification,\n organizationA2aTokenBudgetStateResourceSpecification,\n userA2aTokenBudgetStateResourceSpecification,\n} from './flows-actors/resources/a2a-token-budget-state.resource.specification';\nimport {\n userA2aPushDeliveryLogResourceSpecification,\n organizationA2aPushDeliveryLogResourceSpecification,\n applicationA2aPushDeliveryLogResourceSpecification,\n} from './flows-actors/resources/a2a-push-delivery-log.resource.specification';\nimport {\n applicationFlowActorExecutionsResourceSpecification,\n organizationFlowActorExecutionsResourceSpecification,\n userFlowActorExecutionsResourceSpecification,\n} from './flows-actors/resources/flow-actor-executions.resource.specification';\nimport {\n applicationFlowActorTasksResourceSpecification,\n organizationFlowActorTasksResourceSpecification,\n userFlowActorTasksResourceSpecification,\n} from './flows-actors/resources/flow-actor-tasks.resource.specification';\n// notifications\nimport {\n applicationM2mWebhookDeliveryLogResourceSpecification,\n organizationM2mWebhookDeliveryLogResourceSpecification,\n} from './notifications/resources/m2m-webhook-delivery-log.resource.specification';\nimport {\n organizationNotificationBadgesResourceSpecification,\n userNotificationBadgesResourceSpecification,\n} from './notifications/resources/notification-badges.resource.specification';\nimport {\n applicationWebhookConfigResourceSpecification,\n organizationWebhookConfigResourceSpecification,\n} from './notifications/resources/webhook-config.resource.specification';\n// organizations\nimport { organizationMembersResourceSpecification } from './organizations/resources/organization-members.resource.specification';\nimport { organizationNotificationsResourceSpecification } from './organizations/resources/organization-notifications.resource.specification';\nimport { organizationPreferencesResourceSpecification } from './organizations/resources/organization-preferences.resource.specification';\nimport { organizationProfilesResourceSpecification } from './organizations/resources/organization-profiles.resource.specification';\nimport { organizationUnitMembersResourceSpecification } from './organizations/resources/organization-unit-members.resource.specification';\nimport { organizationUnitsResourceSpecification } from './organizations/resources/organization-units.resource.specification';\nimport { organizationsResourceSpecification } from './organizations/resources/organizations.resource.specification';\n// users\nimport { anonymousUsersResourceSpecification } from './users/resources/anonymous-users.resource.specification';\nimport { inboundContactsResourceSpecification } from './users/resources/inbound-contacts.resource.specification';\nimport { userCredentialsResourceSpecification } from './users/resources/user-credentials.resource.specification';\nimport { userIdentityLinksResourceSpecification } from './users/resources/user-identity-links.resource.specification';\nimport { userPreferencesResourceSpecification } from './users/resources/user-preferences.resource.specification';\nimport { userProfilesResourceSpecification } from './users/resources/user-profiles.resource.specification';\nimport { userSelfPreferencesResourceSpecification } from './users/resources/user-self-preferences.resource.specification';\nimport { userSelfProfilesResourceSpecification } from './users/resources/user-self-profiles.resource.specification';\nimport { userSelfResourceSpecification } from './users/resources/user-self.resource.specification';\nimport { usersResourceSpecification } from './users/resources/users.resource.specification';\n\n/**\n * All engine resource specifications keyed by their `CoreResourceType`.\n * Consumed by the companion OpenAPI projector as a documentation overlay for\n * core resources (see file-level JSDoc). Explicit type annotation keeps the\n * export `isolatedDeclarations`-safe.\n */\nexport const engineResourceSpecificationsByType: ResourceSpecification = {\n // applications\n [CoreResourceType.APPLICATION_API_KEYS]: applicationApiKeysResourceSpecification,\n [CoreResourceType.APPLICATION_METADATA]: applicationMetadataResourceSpecification,\n [CoreResourceType.OAUTH_CLIENTS_APPLICATION]: applicationOAuthClientsResourceSpecification,\n [CoreResourceType.APPLICATION_VERSIONS]: applicationVersionsResourceSpecification,\n [CoreResourceType.APPLICATION]: applicationsResourceSpecification,\n // auth\n [CoreResourceType.ORG_API_KEYS]: organizationApiKeysResourceSpecification,\n [CoreResourceType.OAUTH_CLIENTS_ORGANIZATION]: organizationOAuthClientsResourceSpecification,\n [CoreResourceType.ORGANIZATION_SCIM_PROVISIONING_CONFIG]: organizationScimProvisioningConfigResourceSpecification,\n [CoreResourceType.APPLICATION_SCIM_PROVISIONING_CONFIG]: applicationScimProvisioningConfigResourceSpecification,\n [CoreResourceType.ORGANIZATION_SCIM_TOKENS]: organizationScimTokensResourceSpecification,\n [CoreResourceType.ORGANIZATION_SIEM_DELIVERY_DLQ]: organizationSiemDeliveryDlqResourceSpecification,\n [CoreResourceType.APPLICATION_SIEM_DELIVERY_DLQ]: applicationSiemDeliveryDlqResourceSpecification,\n [CoreResourceType.ORGANIZATION_SIEM_EXPORT_CONFIG]: organizationSiemExportConfigResourceSpecification,\n [CoreResourceType.APPLICATION_SIEM_EXPORT_CONFIG]: applicationSiemExportConfigResourceSpecification,\n [CoreResourceType.ORGANIZATION_SSO_CONFIG]: organizationSsoConfigResourceSpecification,\n [CoreResourceType.APPLICATION_SSO_CONFIG]: applicationSsoConfigResourceSpecification,\n [CoreResourceType.ORGANIZATION_SSO_CONNECTIONS]: organizationSsoConnectionsResourceSpecification,\n [CoreResourceType.APPLICATION_SSO_CONNECTIONS]: applicationSsoConnectionsResourceSpecification,\n [CoreResourceType.PLATFORM_ACCESS_GRANTS]: platformAccessGrantsResourceSpecification,\n // billing\n [CoreResourceType.ORGANIZATION_BILLING_ACCOUNTS]: organizationBillingAccountsResourceSpecification,\n [CoreResourceType.USER_BILLING_ACCOUNTS]: userBillingAccountsResourceSpecification,\n [CoreResourceType.ORGANIZATION_CREDIT_POOLS]: organizationCreditPoolsResourceSpecification,\n [CoreResourceType.USER_CREDIT_POOLS]: userCreditPoolsResourceSpecification,\n [CoreResourceType.ORGANIZATION_INVOICE_REFS]: organizationInvoiceRefsResourceSpecification,\n [CoreResourceType.USER_INVOICE_REFS]: userInvoiceRefsResourceSpecification,\n [CoreResourceType.PRICES]: pricesResourceSpecification,\n [CoreResourceType.PRODUCTS]: productsResourceSpecification,\n [CoreResourceType.PROMOTIONS]: promotionsResourceSpecification,\n [CoreResourceType.REFERRALS]: referralsResourceSpecification,\n [CoreResourceType.ORGANIZATION_SUBSCRIPTIONS]: organizationSubscriptionsResourceSpecification,\n [CoreResourceType.USER_SUBSCRIPTIONS]: userSubscriptionsResourceSpecification,\n [CoreResourceType.ORGANIZATION_USAGE_RECORDS]: organizationUsageRecordsResourceSpecification,\n [CoreResourceType.USER_USAGE_RECORDS]: userUsageRecordsResourceSpecification,\n // compliance\n [CoreResourceType.AUDIT_LOGS]: auditLogsResourceSpecification,\n // features\n [CoreResourceType.APPLICATION_FEATURES]: applicationFeaturesResourceSpecification,\n [CoreResourceType.ORGANIZATION_FEATURES]: organizationFeaturesResourceSpecification,\n [CoreResourceType.USER_FEATURES]: userFeaturesResourceSpecification,\n // files\n [CoreResourceType.FILES]: filesResourceSpecification,\n // guidance\n [CoreResourceType.USER_GUIDANCE_STATE]: userGuidanceStateResourceSpecification,\n [CoreResourceType.ORGANIZATION_GUIDANCE_STATE]: organizationGuidanceStateResourceSpecification,\n [CoreResourceType.USER_LIFECYCLE_STATE]: userLifecycleStateResourceSpecification,\n [CoreResourceType.ORGANIZATION_LIFECYCLE_STATE]: organizationLifecycleStateResourceSpecification,\n [CoreResourceType.USER_PROGRESSION_STATE]: userProgressionStateResourceSpecification,\n [CoreResourceType.ORGANIZATION_PROGRESSION_STATE]: organizationProgressionStateResourceSpecification,\n // infrastructure\n [CoreResourceType.JOB_EXECUTIONS]: jobExecutionsResourceSpecification,\n // `dataSeedRuns` is a BackendResourceType, not a CoreResourceType, so it is keyed by its\n // literal resource-type string. The registry is Record<string, …> and the runtime-scope\n // alignment guard intersects with the CORE registry, so this entry is outside that guard's\n // population by construction rather than by omission.\n dataSeedRuns: dataSeedRunsResourceSpecification,\n // `etlPipelineStates` — same BackendResourceType situation as `dataSeedRuns` above.\n etlPipelineStates: externalDataPipelineStatesResourceSpecification,\n [CoreResourceType.JOB_PAYLOAD_STORAGE]: jobPayloadStorageResourceSpecification,\n // flows-actors\n [CoreResourceType.USER_FLOW_ACTOR_TASKS]: userFlowActorTasksResourceSpecification,\n [CoreResourceType.ORGANIZATION_FLOW_ACTOR_TASKS]: organizationFlowActorTasksResourceSpecification,\n [CoreResourceType.APPLICATION_FLOW_ACTOR_TASKS]: applicationFlowActorTasksResourceSpecification,\n [CoreResourceType.USER_FLOW_ACTOR_EXECUTIONS]: userFlowActorExecutionsResourceSpecification,\n [CoreResourceType.ORGANIZATION_FLOW_ACTOR_EXECUTIONS]: organizationFlowActorExecutionsResourceSpecification,\n [CoreResourceType.APPLICATION_FLOW_ACTOR_EXECUTIONS]: applicationFlowActorExecutionsResourceSpecification,\n [CoreResourceType.USER_A2A_TOKEN_BUDGET_STATE]: userA2aTokenBudgetStateResourceSpecification,\n [CoreResourceType.ORGANIZATION_A2A_TOKEN_BUDGET_STATE]: organizationA2aTokenBudgetStateResourceSpecification,\n [CoreResourceType.APPLICATION_A2A_TOKEN_BUDGET_STATE]: applicationA2aTokenBudgetStateResourceSpecification,\n [CoreResourceType.USER_A2A_PUSH_DELIVERY_LOG]: userA2aPushDeliveryLogResourceSpecification,\n [CoreResourceType.ORGANIZATION_A2A_PUSH_DELIVERY_LOG]: organizationA2aPushDeliveryLogResourceSpecification,\n [CoreResourceType.APPLICATION_A2A_PUSH_DELIVERY_LOG]: applicationA2aPushDeliveryLogResourceSpecification,\n // notifications\n [CoreResourceType.ORGANIZATION_M2M_WEBHOOK_DELIVERY_LOG]: organizationM2mWebhookDeliveryLogResourceSpecification,\n [CoreResourceType.APPLICATION_M2M_WEBHOOK_DELIVERY_LOG]: applicationM2mWebhookDeliveryLogResourceSpecification,\n [CoreResourceType.USER_NOTIFICATION_BADGES]: userNotificationBadgesResourceSpecification,\n [CoreResourceType.ORGANIZATION_NOTIFICATION_BADGES]: organizationNotificationBadgesResourceSpecification,\n [CoreResourceType.ORGANIZATION_WEBHOOK_CONFIG]: organizationWebhookConfigResourceSpecification,\n [CoreResourceType.APPLICATION_WEBHOOK_CONFIG]: applicationWebhookConfigResourceSpecification,\n // organizations\n [CoreResourceType.ORGANIZATION_MEMBERS]: organizationMembersResourceSpecification,\n [CoreResourceType.ORGANIZATION_NOTIFICATIONS]: organizationNotificationsResourceSpecification,\n [CoreResourceType.ORGANIZATION_PREFERENCES]: organizationPreferencesResourceSpecification,\n [CoreResourceType.ORGANIZATION_PROFILES]: organizationProfilesResourceSpecification,\n [CoreResourceType.ORGANIZATION_UNIT_MEMBERS]: organizationUnitMembersResourceSpecification,\n [CoreResourceType.ORGANIZATION_UNITS]: organizationUnitsResourceSpecification,\n [CoreResourceType.ORGANIZATIONS]: organizationsResourceSpecification,\n // users\n [CoreResourceType.ANONYMOUS_USERS]: anonymousUsersResourceSpecification,\n [CoreResourceType.INBOUND_CONTACTS]: inboundContactsResourceSpecification,\n [CoreResourceType.USER_CREDENTIALS]: userCredentialsResourceSpecification,\n [CoreResourceType.USER_IDENTITY_LINKS]: userIdentityLinksResourceSpecification,\n [CoreResourceType.OAUTH_CONSENT_GRANTS]: oauthConsentGrantsResourceSpecification,\n [CoreResourceType.USER_PREFERENCES]: userPreferencesResourceSpecification,\n [CoreResourceType.USER_PROFILES]: userProfilesResourceSpecification,\n [CoreResourceType.USER_SELF_PREFERENCES]: userSelfPreferencesResourceSpecification,\n [CoreResourceType.USER_SELF_PROFILES]: userSelfProfilesResourceSpecification,\n [CoreResourceType.USER_SELF]: userSelfResourceSpecification,\n [CoreResourceType.USERS]: usersResourceSpecification,\n};\n"]}
1
+ {"version":3,"file":"engine-resource-specifications.registry.js","sourceRoot":"","sources":["../../../../src/engine/engine-resource-specifications.registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAIzD,eAAe;AACf,OAAO,EAAE,uCAAuC,EAAE,MAAM,sEAAsE,CAAC;AAC/H,OAAO,EAAE,wCAAwC,EAAE,MAAM,sEAAsE,CAAC;AAChI,OAAO,EAAE,4CAA4C,EAAE,MAAM,2EAA2E,CAAC;AACzI,OAAO,EAAE,wCAAwC,EAAE,MAAM,sEAAsE,CAAC;AAChI,OAAO,EAAE,iCAAiC,EAAE,MAAM,8DAA8D,CAAC;AACjH,OAAO;AACP,OAAO,EAA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,6CAA6C;IAC5F,gBAAgB;IAChB,CAAC,gBAAgB,CAAC,oBAAoB,CAAC,EAAE,wCAAwC;IACjF,CAAC,gBAAgB,CAAC,0BAA0B,CAAC,EAAE,8CAA8C;IAC7F,CAAC,gBAAgB,CAAC,wBAAwB,CAAC,EAAE,4CAA4C;IACzF,CAAC,gBAAgB,CAAC,qBAAqB,CAAC,EAAE,yCAAyC;IACnF,CAAC,gBAAgB,CAAC,yBAAyB,CAAC,EAAE,4CAA4C;IAC1F,CAAC,gBAAgB,CAAC,kBAAkB,CAAC,EAAE,sCAAsC;IAC7E,CAAC,gBAAgB,CAAC,aAAa,CAAC,EAAE,kCAAkC;IACpE,QAAQ;IACR,CAAC,gBAAgB,CAAC,eAAe,CAAC,EAAE,mCAAmC;IACvE,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,EAAE,oCAAoC;IACzE,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,EAAE,oCAAoC;IACzE,CAAC,gBAAgB,CAAC,mBAAmB,CAAC,EAAE,sCAAsC;IAC9E,CAAC,gBAAgB,CAAC,oBAAoB,CAAC,EAAE,uCAAuC;IAChF,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,EAAE,oCAAoC;IACzE,CAAC,gBAAgB,CAAC,aAAa,CAAC,EAAE,iCAAiC;IACnE,CAAC,gBAAgB,CAAC,qBAAqB,CAAC,EAAE,wCAAwC;IAClF,CAAC,gBAAgB,CAAC,kBAAkB,CAAC,EAAE,qCAAqC;IAC5E,CAAC,gBAAgB,CAAC,SAAS,CAAC,EAAE,6BAA6B;IAC3D,CAAC,gBAAgB,CAAC,KAAK,CAAC,EAAE,0BAA0B;CACrD,CAAC","sourcesContent":["/**\n * Aggregated engine resource-specification overlay, keyed by `CoreResourceType`.\n *\n * # Purpose\n *\n * Every engine `*.resource.specification.ts` authors Tier-1/2/3 documentation\n * (operation summary/description, field/enum/tag descriptions, response statuses,\n * error scenarios, idempotency, rate-limit notes, examples). Those specs are\n * exported file-by-file with no aggregation. This registry collects all of them\n * into a single `Record<resourceType, ResourceSpecificationConfig>` so the\n * **companion OpenAPI projector** can attach the authored documentation as an\n * overlay when it projects core (engine) resources into an application's\n * generated OpenAPI (`apiDocResources` in `WildoTechnicalDocConfig`).\n *\n * # Consumption model (merged into an app's `resourceSpecifications` overlay)\n *\n * Applications spread this registry FIRST into their specifications package's\n * `resourceSpecifications` companion export (app-authored specs override on a\n * shared `resourceType`) so the companion can resolve engine-resource\n * per-field / per-operation semantics for labelling, translation, and\n * `wildo context spec`. The companion's `resource-specifications` handler runs\n * `assertResourceSpecificationsAlignWithRegistry` over that merged overlay\n * against a registry view that mirrors the backend runtime merge: the app's\n * shared registry PLUS the core configs materialized from\n * `coreShared_ResourcesConfigurations_FactoryMap` (app registrations win).\n * Every spec here that declares `resourcePrimaryScope` is therefore\n * scope-checked against its materialized core config on every introspection\n * call — a declared scope that drifts from the registry-derived scope fails\n * fast at the companion. The OpenAPI projector consumes the same registry to\n * overlay Tier-1/2/3 documentation onto the core resources it materializes.\n *\n * # Keying\n *\n * Keys are `CoreResourceType` members and MUST match the keys of\n * `coreShared_ResourcesConfigurations_FactoryMap` (`@wildo-ai/saas-models`) so\n * the projector's `engineResourceSpecificationsByType[resourceType]` lookup\n * resolves the overlay for the materialized config. Polymorphic resources\n * (org/app/user variants) contribute one entry per variant.\n *\n * One entry per exported `*ResourceSpecification` const across all engine\n * resource specs (77 total).\n */\n\nimport { CoreResourceType } from '@wildo-ai/saas-models';\n\nimport type { ResourceSpecification } from '~wildo-specifications/_core';\n\n// applications\nimport { applicationApiKeysResourceSpecification } from './applications/resources/application-api-keys.resource.specification';\nimport { applicationMetadataResourceSpecification } from './applications/resources/application-metadata.resource.specification';\nimport { applicationOAuthClientsResourceSpecification } from './applications/resources/application-oauth-clients.resource.specification';\nimport { applicationVersionsResourceSpecification } from './applications/resources/application-versions.resource.specification';\nimport { applicationsResourceSpecification } from './applications/resources/applications.resource.specification';\n// auth\nimport { organizationApiKeysResourceSpecification } from './auth/resources/organization-api-keys.resource.specification';\nimport { organizationOAuthClientsResourceSpecification } from './auth/resources/organization-oauth-clients.resource.specification';\nimport { consumableTokensResourceSpecification } from './auth/resources/consumable-tokens.resource.specification';\nimport { oauthConsentGrantsResourceSpecification } from './auth/resources/oauth-consent-grants.resource.specification';\nimport { platformAccessGrantsResourceSpecification } from './auth/resources/platform-access-grants.resource.specification';\nimport {\n applicationScimProvisioningConfigResourceSpecification,\n organizationScimProvisioningConfigResourceSpecification,\n} from './auth/resources/scim-provisioning-config.resource.specification';\n// SCIM bearer credentials are organization-scoped until an application-scoped\n// SCIM protocol and authorizer actually exist; do not register a documentation-only twin.\nimport { organizationScimTokensResourceSpecification } from './auth/resources/scim-tokens.resource.specification';\nimport {\n applicationSiemDeliveryDlqResourceSpecification,\n organizationSiemDeliveryDlqResourceSpecification,\n} from './auth/resources/siem-delivery-dlq.resource.specification';\nimport {\n applicationSiemExportConfigResourceSpecification,\n organizationSiemExportConfigResourceSpecification,\n} from './auth/resources/siem-export-config.resource.specification';\nimport {\n applicationSsoConfigResourceSpecification,\n organizationSsoConfigResourceSpecification,\n} from './auth/resources/sso-config.resource.specification';\nimport {\n applicationSsoConnectionsResourceSpecification,\n organizationSsoConnectionsResourceSpecification,\n} from './auth/resources/sso-connections.resource.specification';\n// billing\nimport {\n organizationBillingAccountsResourceSpecification,\n userBillingAccountsResourceSpecification,\n} from './billing/resources/billing-accounts.resource.specification';\nimport {\n organizationCreditPoolsResourceSpecification,\n userCreditPoolsResourceSpecification,\n} from './billing/resources/credit-pools.resource.specification';\nimport {\n organizationInvoiceRefsResourceSpecification,\n userInvoiceRefsResourceSpecification,\n} from './billing/resources/invoice-refs.resource.specification';\nimport { pricesResourceSpecification } from './billing/resources/prices.resource.specification';\nimport { productsResourceSpecification } from './billing/resources/products.resource.specification';\nimport { promotionsResourceSpecification } from './billing/resources/promotions.resource.specification';\nimport { referralsResourceSpecification } from './billing/resources/referrals.resource.specification';\nimport {\n organizationSubscriptionsResourceSpecification,\n userSubscriptionsResourceSpecification,\n} from './billing/resources/subscriptions.resource.specification';\nimport {\n organizationUsageRecordsResourceSpecification,\n userUsageRecordsResourceSpecification,\n} from './billing/resources/usage-records.resource.specification';\n// compliance\nimport { auditLogsResourceSpecification } from './compliance/resources/audit-logs.resource.specification';\n// features\nimport { applicationFeaturesResourceSpecification } from './features/resources/application-features.resource.specification';\nimport { organizationFeaturesResourceSpecification } from './features/resources/organization-features.resource.specification';\nimport { userFeaturesResourceSpecification } from './features/resources/user-features.resource.specification';\n// files\nimport { filesResourceSpecification } from './files/resources/files.resource.specification';\n// guidance\nimport {\n organizationGuidanceStateResourceSpecification,\n userGuidanceStateResourceSpecification,\n} from './guidance/resources/guidance-state.resource.specification';\nimport {\n organizationLifecycleStateResourceSpecification,\n userLifecycleStateResourceSpecification,\n} from './guidance/resources/lifecycle-state.resource.specification';\nimport {\n organizationProgressionStateResourceSpecification,\n userProgressionStateResourceSpecification,\n} from './guidance/resources/progression-state.resource.specification';\n// infrastructure\nimport { dataSeedRunsResourceSpecification } from './infrastructure/resources/data-seed-runs.resource.specification';\nimport { externalDataPipelineStatesResourceSpecification } from './infrastructure/resources/external-data-pipeline-states.resource.specification';\nimport { jobExecutionsResourceSpecification } from './infrastructure/resources/job-executions.resource.specification';\nimport { jobPayloadStorageResourceSpecification } from './infrastructure/resources/job-payload-storage.resource.specification';\n// flows-actors\nimport {\n applicationA2aTokenBudgetStateResourceSpecification,\n organizationA2aTokenBudgetStateResourceSpecification,\n userA2aTokenBudgetStateResourceSpecification,\n} from './flows-actors/resources/a2a-token-budget-state.resource.specification';\nimport {\n userA2aPushDeliveryLogResourceSpecification,\n organizationA2aPushDeliveryLogResourceSpecification,\n applicationA2aPushDeliveryLogResourceSpecification,\n} from './flows-actors/resources/a2a-push-delivery-log.resource.specification';\nimport {\n applicationFlowActorExecutionsResourceSpecification,\n organizationFlowActorExecutionsResourceSpecification,\n userFlowActorExecutionsResourceSpecification,\n} from './flows-actors/resources/flow-actor-executions.resource.specification';\nimport {\n applicationFlowActorTasksResourceSpecification,\n organizationFlowActorTasksResourceSpecification,\n userFlowActorTasksResourceSpecification,\n} from './flows-actors/resources/flow-actor-tasks.resource.specification';\n// notifications\nimport {\n applicationM2mWebhookDeliveryLogResourceSpecification,\n organizationM2mWebhookDeliveryLogResourceSpecification,\n} from './notifications/resources/m2m-webhook-delivery-log.resource.specification';\nimport {\n organizationNotificationBadgesResourceSpecification,\n userNotificationBadgesResourceSpecification,\n} from './notifications/resources/notification-badges.resource.specification';\nimport {\n applicationWebhookConfigResourceSpecification,\n organizationWebhookConfigResourceSpecification,\n} from './notifications/resources/webhook-config.resource.specification';\n// organizations\nimport { organizationMembersResourceSpecification } from './organizations/resources/organization-members.resource.specification';\nimport { organizationNotificationsResourceSpecification } from './organizations/resources/organization-notifications.resource.specification';\nimport { organizationPreferencesResourceSpecification } from './organizations/resources/organization-preferences.resource.specification';\nimport { organizationProfilesResourceSpecification } from './organizations/resources/organization-profiles.resource.specification';\nimport { organizationUnitMembersResourceSpecification } from './organizations/resources/organization-unit-members.resource.specification';\nimport { organizationUnitsResourceSpecification } from './organizations/resources/organization-units.resource.specification';\nimport { organizationsResourceSpecification } from './organizations/resources/organizations.resource.specification';\n// users\nimport { anonymousUsersResourceSpecification } from './users/resources/anonymous-users.resource.specification';\nimport { inboundContactsResourceSpecification } from './users/resources/inbound-contacts.resource.specification';\nimport { userCredentialsResourceSpecification } from './users/resources/user-credentials.resource.specification';\nimport { userIdentityLinksResourceSpecification } from './users/resources/user-identity-links.resource.specification';\nimport { userPreferencesResourceSpecification } from './users/resources/user-preferences.resource.specification';\nimport { userProfilesResourceSpecification } from './users/resources/user-profiles.resource.specification';\nimport { userSelfPreferencesResourceSpecification } from './users/resources/user-self-preferences.resource.specification';\nimport { userSelfProfilesResourceSpecification } from './users/resources/user-self-profiles.resource.specification';\nimport { userSelfResourceSpecification } from './users/resources/user-self.resource.specification';\nimport { usersResourceSpecification } from './users/resources/users.resource.specification';\n\n/**\n * All engine resource specifications keyed by their `CoreResourceType`.\n * Consumed by the companion OpenAPI projector as a documentation overlay for\n * core resources (see file-level JSDoc). Explicit type annotation keeps the\n * export `isolatedDeclarations`-safe.\n */\nexport const engineResourceSpecificationsByType: ResourceSpecification = {\n // applications\n [CoreResourceType.APPLICATION_API_KEYS]: applicationApiKeysResourceSpecification,\n [CoreResourceType.APPLICATION_METADATA]: applicationMetadataResourceSpecification,\n [CoreResourceType.OAUTH_CLIENTS_APPLICATION]: applicationOAuthClientsResourceSpecification,\n [CoreResourceType.APPLICATION_VERSIONS]: applicationVersionsResourceSpecification,\n [CoreResourceType.APPLICATION]: applicationsResourceSpecification,\n // auth\n // `consumableTokens` is a BackendResourceType, not a CoreResourceType — same situation as\n // `dataSeedRuns` below, so it is keyed by its literal resource-type string and sits outside the\n // core-registry alignment guard's population by construction.\n consumableTokens: consumableTokensResourceSpecification,\n [CoreResourceType.ORG_API_KEYS]: organizationApiKeysResourceSpecification,\n [CoreResourceType.OAUTH_CLIENTS_ORGANIZATION]: organizationOAuthClientsResourceSpecification,\n [CoreResourceType.ORGANIZATION_SCIM_PROVISIONING_CONFIG]: organizationScimProvisioningConfigResourceSpecification,\n [CoreResourceType.APPLICATION_SCIM_PROVISIONING_CONFIG]: applicationScimProvisioningConfigResourceSpecification,\n [CoreResourceType.ORGANIZATION_SCIM_TOKENS]: organizationScimTokensResourceSpecification,\n [CoreResourceType.ORGANIZATION_SIEM_DELIVERY_DLQ]: organizationSiemDeliveryDlqResourceSpecification,\n [CoreResourceType.APPLICATION_SIEM_DELIVERY_DLQ]: applicationSiemDeliveryDlqResourceSpecification,\n [CoreResourceType.ORGANIZATION_SIEM_EXPORT_CONFIG]: organizationSiemExportConfigResourceSpecification,\n [CoreResourceType.APPLICATION_SIEM_EXPORT_CONFIG]: applicationSiemExportConfigResourceSpecification,\n [CoreResourceType.ORGANIZATION_SSO_CONFIG]: organizationSsoConfigResourceSpecification,\n [CoreResourceType.APPLICATION_SSO_CONFIG]: applicationSsoConfigResourceSpecification,\n [CoreResourceType.ORGANIZATION_SSO_CONNECTIONS]: organizationSsoConnectionsResourceSpecification,\n [CoreResourceType.APPLICATION_SSO_CONNECTIONS]: applicationSsoConnectionsResourceSpecification,\n [CoreResourceType.PLATFORM_ACCESS_GRANTS]: platformAccessGrantsResourceSpecification,\n // billing\n [CoreResourceType.ORGANIZATION_BILLING_ACCOUNTS]: organizationBillingAccountsResourceSpecification,\n [CoreResourceType.USER_BILLING_ACCOUNTS]: userBillingAccountsResourceSpecification,\n [CoreResourceType.ORGANIZATION_CREDIT_POOLS]: organizationCreditPoolsResourceSpecification,\n [CoreResourceType.USER_CREDIT_POOLS]: userCreditPoolsResourceSpecification,\n [CoreResourceType.ORGANIZATION_INVOICE_REFS]: organizationInvoiceRefsResourceSpecification,\n [CoreResourceType.USER_INVOICE_REFS]: userInvoiceRefsResourceSpecification,\n [CoreResourceType.PRICES]: pricesResourceSpecification,\n [CoreResourceType.PRODUCTS]: productsResourceSpecification,\n [CoreResourceType.PROMOTIONS]: promotionsResourceSpecification,\n [CoreResourceType.REFERRALS]: referralsResourceSpecification,\n [CoreResourceType.ORGANIZATION_SUBSCRIPTIONS]: organizationSubscriptionsResourceSpecification,\n [CoreResourceType.USER_SUBSCRIPTIONS]: userSubscriptionsResourceSpecification,\n [CoreResourceType.ORGANIZATION_USAGE_RECORDS]: organizationUsageRecordsResourceSpecification,\n [CoreResourceType.USER_USAGE_RECORDS]: userUsageRecordsResourceSpecification,\n // compliance\n [CoreResourceType.AUDIT_LOGS]: auditLogsResourceSpecification,\n // features\n [CoreResourceType.APPLICATION_FEATURES]: applicationFeaturesResourceSpecification,\n [CoreResourceType.ORGANIZATION_FEATURES]: organizationFeaturesResourceSpecification,\n [CoreResourceType.USER_FEATURES]: userFeaturesResourceSpecification,\n // files\n [CoreResourceType.FILES]: filesResourceSpecification,\n // guidance\n [CoreResourceType.USER_GUIDANCE_STATE]: userGuidanceStateResourceSpecification,\n [CoreResourceType.ORGANIZATION_GUIDANCE_STATE]: organizationGuidanceStateResourceSpecification,\n [CoreResourceType.USER_LIFECYCLE_STATE]: userLifecycleStateResourceSpecification,\n [CoreResourceType.ORGANIZATION_LIFECYCLE_STATE]: organizationLifecycleStateResourceSpecification,\n [CoreResourceType.USER_PROGRESSION_STATE]: userProgressionStateResourceSpecification,\n [CoreResourceType.ORGANIZATION_PROGRESSION_STATE]: organizationProgressionStateResourceSpecification,\n // infrastructure\n [CoreResourceType.JOB_EXECUTIONS]: jobExecutionsResourceSpecification,\n // `dataSeedRuns` is a BackendResourceType, not a CoreResourceType, so it is keyed by its\n // literal resource-type string. The registry is Record<string, …> and the runtime-scope\n // alignment guard intersects with the CORE registry, so this entry is outside that guard's\n // population by construction rather than by omission.\n dataSeedRuns: dataSeedRunsResourceSpecification,\n // `etlPipelineStates` — same BackendResourceType situation as `dataSeedRuns` above.\n etlPipelineStates: externalDataPipelineStatesResourceSpecification,\n [CoreResourceType.JOB_PAYLOAD_STORAGE]: jobPayloadStorageResourceSpecification,\n // flows-actors\n [CoreResourceType.USER_FLOW_ACTOR_TASKS]: userFlowActorTasksResourceSpecification,\n [CoreResourceType.ORGANIZATION_FLOW_ACTOR_TASKS]: organizationFlowActorTasksResourceSpecification,\n [CoreResourceType.APPLICATION_FLOW_ACTOR_TASKS]: applicationFlowActorTasksResourceSpecification,\n [CoreResourceType.USER_FLOW_ACTOR_EXECUTIONS]: userFlowActorExecutionsResourceSpecification,\n [CoreResourceType.ORGANIZATION_FLOW_ACTOR_EXECUTIONS]: organizationFlowActorExecutionsResourceSpecification,\n [CoreResourceType.APPLICATION_FLOW_ACTOR_EXECUTIONS]: applicationFlowActorExecutionsResourceSpecification,\n [CoreResourceType.USER_A2A_TOKEN_BUDGET_STATE]: userA2aTokenBudgetStateResourceSpecification,\n [CoreResourceType.ORGANIZATION_A2A_TOKEN_BUDGET_STATE]: organizationA2aTokenBudgetStateResourceSpecification,\n [CoreResourceType.APPLICATION_A2A_TOKEN_BUDGET_STATE]: applicationA2aTokenBudgetStateResourceSpecification,\n [CoreResourceType.USER_A2A_PUSH_DELIVERY_LOG]: userA2aPushDeliveryLogResourceSpecification,\n [CoreResourceType.ORGANIZATION_A2A_PUSH_DELIVERY_LOG]: organizationA2aPushDeliveryLogResourceSpecification,\n [CoreResourceType.APPLICATION_A2A_PUSH_DELIVERY_LOG]: applicationA2aPushDeliveryLogResourceSpecification,\n // notifications\n [CoreResourceType.ORGANIZATION_M2M_WEBHOOK_DELIVERY_LOG]: organizationM2mWebhookDeliveryLogResourceSpecification,\n [CoreResourceType.APPLICATION_M2M_WEBHOOK_DELIVERY_LOG]: applicationM2mWebhookDeliveryLogResourceSpecification,\n [CoreResourceType.USER_NOTIFICATION_BADGES]: userNotificationBadgesResourceSpecification,\n [CoreResourceType.ORGANIZATION_NOTIFICATION_BADGES]: organizationNotificationBadgesResourceSpecification,\n [CoreResourceType.ORGANIZATION_WEBHOOK_CONFIG]: organizationWebhookConfigResourceSpecification,\n [CoreResourceType.APPLICATION_WEBHOOK_CONFIG]: applicationWebhookConfigResourceSpecification,\n // organizations\n [CoreResourceType.ORGANIZATION_MEMBERS]: organizationMembersResourceSpecification,\n [CoreResourceType.ORGANIZATION_NOTIFICATIONS]: organizationNotificationsResourceSpecification,\n [CoreResourceType.ORGANIZATION_PREFERENCES]: organizationPreferencesResourceSpecification,\n [CoreResourceType.ORGANIZATION_PROFILES]: organizationProfilesResourceSpecification,\n [CoreResourceType.ORGANIZATION_UNIT_MEMBERS]: organizationUnitMembersResourceSpecification,\n [CoreResourceType.ORGANIZATION_UNITS]: organizationUnitsResourceSpecification,\n [CoreResourceType.ORGANIZATIONS]: organizationsResourceSpecification,\n // users\n [CoreResourceType.ANONYMOUS_USERS]: anonymousUsersResourceSpecification,\n [CoreResourceType.INBOUND_CONTACTS]: inboundContactsResourceSpecification,\n [CoreResourceType.USER_CREDENTIALS]: userCredentialsResourceSpecification,\n [CoreResourceType.USER_IDENTITY_LINKS]: userIdentityLinksResourceSpecification,\n [CoreResourceType.OAUTH_CONSENT_GRANTS]: oauthConsentGrantsResourceSpecification,\n [CoreResourceType.USER_PREFERENCES]: userPreferencesResourceSpecification,\n [CoreResourceType.USER_PROFILES]: userProfilesResourceSpecification,\n [CoreResourceType.USER_SELF_PREFERENCES]: userSelfPreferencesResourceSpecification,\n [CoreResourceType.USER_SELF_PROFILES]: userSelfProfilesResourceSpecification,\n [CoreResourceType.USER_SELF]: userSelfResourceSpecification,\n [CoreResourceType.USERS]: usersResourceSpecification,\n};\n"]}
@@ -0,0 +1,63 @@
1
+ /**
2
+ * Which part of the ENGINE a resource belongs to.
3
+ *
4
+ * ## Why this exists
5
+ *
6
+ * An application's own resources are grouped by the module that registers them, and the engine's are
7
+ * grouped by nothing at all. Every engine resource arrives as one flat set of 85 — `users` beside
8
+ * `stripeWebhookEvents` beside `flowsActorsTaskEvents` — so any surface that has to present them
9
+ * (the domain-model graph, `wildo context`, generated documentation, an application-creation
10
+ * playbook deciding what to show a builder) either shows all 85 undifferentiated or invents its own
11
+ * grouping and drifts from the next surface that does the same.
12
+ *
13
+ * The grouping is not new: it has existed since the specs were written, as the DIRECTORY each spec
14
+ * lives in and as a matching row of `// auth`, `// billing`, `// users` banner comments in
15
+ * `engine-resource-specifications.registry.ts`. Both are hand-maintained, neither is reachable at
16
+ * runtime, and nothing checks that they agree. This enum is those same twelve values made addressable
17
+ * — a name a member's meaning can be written next to, which a folder name cannot carry.
18
+ *
19
+ * ## What this is NOT
20
+ *
21
+ * - **Not `ApplicationModuleKind`** (`'domain' | 'engine'`). That decides whether a resource is the
22
+ * application's or the engine's; this subdivides the engine's half, which that axis cannot do.
23
+ * - **Not `EngineCapability`.** That is a PROCUREMENT axis — which external provider fills a slot
24
+ * (`BILLING`, `AI_LLM`, `SMS`). Most engine resources map to none of it (`users`, `roles`,
25
+ * `sessions`, `apiKeys`), and reusing it would fuse "who supplies this" with "what part of the
26
+ * product this is".
27
+ * - **Not a scope, a tenancy axis or an authorization boundary.** `ResourcePrimaryScope` answers who
28
+ * a row belongs to; this answers what it is about. A single sub-domain spans several scopes.
29
+ *
30
+ * ## Its counterpart on an application's side
31
+ *
32
+ * `ResourceSpecificationConfig.subDomain` is typed `string`, not this enum, because an application's
33
+ * sub-domains are its own and this repository cannot enumerate them. This is the ENGINE's closed
34
+ * vocabulary for that open field — the one named runtime source for the twelve values engine specs
35
+ * are allowed to use.
36
+ */
37
+ export declare enum EngineResourceSubDomain {
38
+ /** The application itself as a record: its metadata, versions, API keys and OAuth clients. */
39
+ APPLICATIONS = "applications",
40
+ /** Proving who is calling and what they may delegate: sessions, MFA, SSO/SCIM, OAuth, consumable tokens. */
41
+ AUTH = "auth",
42
+ /** Money: products, plans, subscriptions, invoices, payments and the provider events behind them. */
43
+ BILLING = "billing",
44
+ /** What an operator must be able to SAY: governed documents, privacy notices, evidence. */
45
+ COMPLIANCE = "compliance",
46
+ /** What the application offers and to whom: features, products, milestones. */
47
+ FEATURES = "features",
48
+ /** Uploaded bytes and the metadata that links them to a domain row. */
49
+ FILES = "files",
50
+ /** Work that runs: flows, actors, tasks, agents and their execution records. */
51
+ FLOWS_ACTORS = "flows-actors",
52
+ /** Leading a user through something: onboarding, guidance flows, their state. */
53
+ GUIDANCE = "guidance",
54
+ /** The machinery an application runs ON: jobs, seeding, ETL, webhooks, integration plumbing. */
55
+ INFRASTRUCTURE = "infrastructure",
56
+ /** Telling someone: email, in-app notifications, their templates and delivery records. */
57
+ NOTIFICATIONS = "notifications",
58
+ /** The tenant: organizations, their members, invitations, units and settings. */
59
+ ORGANIZATIONS = "organizations",
60
+ /** The person: user records, profiles, preferences, roles and their assignments. */
61
+ USERS = "users"
62
+ }
63
+ //# sourceMappingURL=engine-resource-sub-domain.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"engine-resource-sub-domain.d.ts","sourceRoot":"","sources":["../../../../src/engine/engine-resource-sub-domain.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,oBAAY,uBAAuB;IACjC,8FAA8F;IAC9F,YAAY,iBAAiB;IAC7B,4GAA4G;IAC5G,IAAI,SAAS;IACb,qGAAqG;IACrG,OAAO,YAAY;IACnB,2FAA2F;IAC3F,UAAU,eAAe;IACzB,+EAA+E;IAC/E,QAAQ,aAAa;IACrB,uEAAuE;IACvE,KAAK,UAAU;IACf,gFAAgF;IAChF,YAAY,iBAAiB;IAC7B,iFAAiF;IACjF,QAAQ,aAAa;IACrB,gGAAgG;IAChG,cAAc,mBAAmB;IACjC,0FAA0F;IAC1F,aAAa,kBAAkB;IAC/B,iFAAiF;IACjF,aAAa,kBAAkB;IAC/B,oFAAoF;IACpF,KAAK,UAAU;CAChB"}