@wildo-ai/saas-specifications 1.1.2 → 1.1.3

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 (410) hide show
  1. package/dist/esm/_core/brand/brand-asset.schemas.d.ts +4 -6
  2. package/dist/esm/_core/brand/brand-asset.schemas.d.ts.map +1 -1
  3. package/dist/esm/_core/brand/brand-asset.schemas.js +4 -12
  4. package/dist/esm/_core/brand/brand-asset.schemas.js.map +1 -1
  5. package/dist/esm/_core/brand/brand-generation.schemas.d.ts +5 -3
  6. package/dist/esm/_core/brand/brand-generation.schemas.d.ts.map +1 -1
  7. package/dist/esm/_core/brand/brand-generation.schemas.js +5 -2
  8. package/dist/esm/_core/brand/brand-generation.schemas.js.map +1 -1
  9. package/dist/esm/_core/brand/brand-snapshot.schemas.d.ts +10 -3
  10. package/dist/esm/_core/brand/brand-snapshot.schemas.d.ts.map +1 -1
  11. package/dist/esm/_core/brand/brand-snapshot.schemas.js +10 -2
  12. package/dist/esm/_core/brand/brand-snapshot.schemas.js.map +1 -1
  13. package/dist/esm/_core/build-plan/build-plan-task-graph-generation.schemas.d.ts.map +1 -1
  14. package/dist/esm/_core/build-plan/build-plan-task-graph-generation.schemas.js +15 -5
  15. package/dist/esm/_core/build-plan/build-plan-task-graph-generation.schemas.js.map +1 -1
  16. package/dist/esm/_core/build-plan/build-plan-task-graph-validation.d.ts +40 -3
  17. package/dist/esm/_core/build-plan/build-plan-task-graph-validation.d.ts.map +1 -1
  18. package/dist/esm/_core/build-plan/build-plan-task-graph-validation.js +85 -6
  19. package/dist/esm/_core/build-plan/build-plan-task-graph-validation.js.map +1 -1
  20. package/dist/esm/_core/business-model-lite/business-model-lite-snapshot-generation.schemas.d.ts.map +1 -1
  21. package/dist/esm/_core/business-model-lite/business-model-lite-snapshot-generation.schemas.js +10 -4
  22. package/dist/esm/_core/business-model-lite/business-model-lite-snapshot-generation.schemas.js.map +1 -1
  23. package/dist/esm/_core/business-model-lite/business-model-lite-snapshot-validation.d.ts +15 -0
  24. package/dist/esm/_core/business-model-lite/business-model-lite-snapshot-validation.d.ts.map +1 -1
  25. package/dist/esm/_core/business-model-lite/business-model-lite-snapshot-validation.js.map +1 -1
  26. package/dist/esm/_core/compliance-documents/compliance-document-candidate.schemas.d.ts +10 -0
  27. package/dist/esm/_core/compliance-documents/compliance-document-candidate.schemas.d.ts.map +1 -1
  28. package/dist/esm/_core/compliance-documents/compliance-document-candidate.schemas.js +17 -0
  29. package/dist/esm/_core/compliance-documents/compliance-document-candidate.schemas.js.map +1 -1
  30. package/dist/esm/_core/expert-personas/expert-persona-charter.schemas.d.ts +6 -7
  31. package/dist/esm/_core/expert-personas/expert-persona-charter.schemas.d.ts.map +1 -1
  32. package/dist/esm/_core/expert-personas/expert-persona-charter.schemas.js +6 -13
  33. package/dist/esm/_core/expert-personas/expert-persona-charter.schemas.js.map +1 -1
  34. package/dist/esm/_core/expert-personas/expert-persona-validation.d.ts +0 -11
  35. package/dist/esm/_core/expert-personas/expert-persona-validation.d.ts.map +1 -1
  36. package/dist/esm/_core/expert-personas/expert-persona-validation.js +0 -19
  37. package/dist/esm/_core/expert-personas/expert-persona-validation.js.map +1 -1
  38. package/dist/esm/_core/expert-personas/expert-role-template.schemas.d.ts +1 -2
  39. package/dist/esm/_core/expert-personas/expert-role-template.schemas.d.ts.map +1 -1
  40. package/dist/esm/_core/expert-personas/expert-role-template.schemas.js +1 -2
  41. package/dist/esm/_core/expert-personas/expert-role-template.schemas.js.map +1 -1
  42. package/dist/esm/_core/feature-drafts/feature-specification-drafts-generation.schemas.d.ts.map +1 -1
  43. package/dist/esm/_core/feature-drafts/feature-specification-drafts-generation.schemas.js +17 -4
  44. package/dist/esm/_core/feature-drafts/feature-specification-drafts-generation.schemas.js.map +1 -1
  45. package/dist/esm/_core/index.d.ts +1 -0
  46. package/dist/esm/_core/index.d.ts.map +1 -1
  47. package/dist/esm/_core/index.js +1 -0
  48. package/dist/esm/_core/index.js.map +1 -1
  49. package/dist/esm/_core/market/market-snapshot-generation.schemas.d.ts.map +1 -1
  50. package/dist/esm/_core/market/market-snapshot-generation.schemas.js +5 -40
  51. package/dist/esm/_core/market/market-snapshot-generation.schemas.js.map +1 -1
  52. package/dist/esm/_core/market/market-snapshot-validation.d.ts +15 -0
  53. package/dist/esm/_core/market/market-snapshot-validation.d.ts.map +1 -1
  54. package/dist/esm/_core/market/market-snapshot-validation.js.map +1 -1
  55. package/dist/esm/_core/placement-plan/placement-plan-generation.schemas.d.ts.map +1 -1
  56. package/dist/esm/_core/placement-plan/placement-plan-generation.schemas.js +11 -5
  57. package/dist/esm/_core/placement-plan/placement-plan-generation.schemas.js.map +1 -1
  58. package/dist/esm/_core/placement-plan/placement-plan-validation.d.ts +66 -9
  59. package/dist/esm/_core/placement-plan/placement-plan-validation.d.ts.map +1 -1
  60. package/dist/esm/_core/placement-plan/placement-plan-validation.js +62 -20
  61. package/dist/esm/_core/placement-plan/placement-plan-validation.js.map +1 -1
  62. package/dist/esm/_core/placement-plan/placement-plan.schemas.d.ts +4 -1
  63. package/dist/esm/_core/placement-plan/placement-plan.schemas.d.ts.map +1 -1
  64. package/dist/esm/_core/placement-plan/placement-plan.schemas.js +4 -1
  65. package/dist/esm/_core/placement-plan/placement-plan.schemas.js.map +1 -1
  66. package/dist/esm/_core/provider-specification.schemas.d.ts +82 -0
  67. package/dist/esm/_core/provider-specification.schemas.d.ts.map +1 -0
  68. package/dist/esm/_core/provider-specification.schemas.js +144 -0
  69. package/dist/esm/_core/provider-specification.schemas.js.map +1 -0
  70. package/dist/esm/_core/requirements/requirements-snapshot-generation.schemas.d.ts.map +1 -1
  71. package/dist/esm/_core/requirements/requirements-snapshot-generation.schemas.js +13 -8
  72. package/dist/esm/_core/requirements/requirements-snapshot-generation.schemas.js.map +1 -1
  73. package/dist/esm/_core/requirements/requirements-snapshot-validation.d.ts +15 -0
  74. package/dist/esm/_core/requirements/requirements-snapshot-validation.d.ts.map +1 -1
  75. package/dist/esm/_core/requirements/requirements-snapshot-validation.js.map +1 -1
  76. package/dist/esm/_core/roadmap/roadmap-snapshot-generation.schemas.d.ts.map +1 -1
  77. package/dist/esm/_core/roadmap/roadmap-snapshot-generation.schemas.js +7 -2
  78. package/dist/esm/_core/roadmap/roadmap-snapshot-generation.schemas.js.map +1 -1
  79. package/dist/esm/_core/roadmap/roadmap-snapshot-validation.d.ts +15 -0
  80. package/dist/esm/_core/roadmap/roadmap-snapshot-validation.d.ts.map +1 -1
  81. package/dist/esm/_core/roadmap/roadmap-snapshot-validation.js.map +1 -1
  82. package/dist/esm/_core/utils/family-ref-stamping.d.ts +64 -0
  83. package/dist/esm/_core/utils/family-ref-stamping.d.ts.map +1 -0
  84. package/dist/esm/_core/utils/family-ref-stamping.js +73 -0
  85. package/dist/esm/_core/utils/family-ref-stamping.js.map +1 -0
  86. package/dist/esm/_core/vision/vision-snapshot-generation.schemas.d.ts.map +1 -1
  87. package/dist/esm/_core/vision/vision-snapshot-generation.schemas.js +23 -9
  88. package/dist/esm/_core/vision/vision-snapshot-generation.schemas.js.map +1 -1
  89. package/dist/esm/application-creation/application-coding-tasks.application-creation.schemas.d.ts +0 -4
  90. package/dist/esm/application-creation/application-coding-tasks.application-creation.schemas.d.ts.map +1 -1
  91. package/dist/esm/application-creation/application-document-fact-specification.application-creation.schemas.d.ts +7 -7
  92. package/dist/esm/application-creation/application-document-fact-specification.application-creation.schemas.d.ts.map +1 -1
  93. package/dist/esm/application-creation/application-document-fact-specification.application-creation.schemas.js +6 -7
  94. package/dist/esm/application-creation/application-document-fact-specification.application-creation.schemas.js.map +1 -1
  95. package/dist/esm/application-creation/application-document-release-policy-specification.application-creation.schemas.d.ts +3 -3
  96. package/dist/esm/application-creation/application-document-release-policy-specification.application-creation.schemas.js +3 -3
  97. package/dist/esm/application-creation/application-document-release-policy-specification.application-creation.schemas.js.map +1 -1
  98. package/dist/esm/application-creation/application-specification-family-identity.application-creation.schemas.d.ts +2 -2
  99. package/dist/esm/application-creation/application-specification-family-identity.application-creation.schemas.js +2 -2
  100. package/dist/esm/application-creation/application-specification-family-identity.application-creation.schemas.js.map +1 -1
  101. package/dist/esm/application-creation/journey.application-creation.schemas.d.ts +18 -6
  102. package/dist/esm/application-creation/journey.application-creation.schemas.d.ts.map +1 -1
  103. package/dist/esm/application-creation/journey.application-creation.schemas.js +18 -6
  104. package/dist/esm/application-creation/journey.application-creation.schemas.js.map +1 -1
  105. package/dist/esm/application-creation/playbooks.application-creation.schemas.d.ts +8 -23
  106. package/dist/esm/application-creation/playbooks.application-creation.schemas.d.ts.map +1 -1
  107. package/dist/esm/application-creation/playbooks.application-creation.schemas.js +57 -27
  108. package/dist/esm/application-creation/playbooks.application-creation.schemas.js.map +1 -1
  109. package/dist/esm/assurance/application-document-publication.schemas.d.ts +20 -6
  110. package/dist/esm/assurance/application-document-publication.schemas.d.ts.map +1 -1
  111. package/dist/esm/assurance/application-document-publication.schemas.js +26 -10
  112. package/dist/esm/assurance/application-document-publication.schemas.js.map +1 -1
  113. package/dist/esm/assurance/assurance-authority-basis.definitions.d.ts +72 -49
  114. package/dist/esm/assurance/assurance-authority-basis.definitions.d.ts.map +1 -1
  115. package/dist/esm/assurance/assurance-authority-basis.definitions.js +161 -60
  116. package/dist/esm/assurance/assurance-authority-basis.definitions.js.map +1 -1
  117. package/dist/esm/assurance/assurance-authority-basis.schemas.d.ts +25 -0
  118. package/dist/esm/assurance/assurance-authority-basis.schemas.d.ts.map +1 -1
  119. package/dist/esm/assurance/assurance-evidence-requirement-bodies.definitions.d.ts +36 -0
  120. package/dist/esm/assurance/assurance-evidence-requirement-bodies.definitions.d.ts.map +1 -0
  121. package/dist/esm/assurance/assurance-evidence-requirement-bodies.definitions.js +859 -0
  122. package/dist/esm/assurance/assurance-evidence-requirement-bodies.definitions.js.map +1 -0
  123. package/dist/esm/assurance/assurance-foundation.schemas.d.ts +43 -0
  124. package/dist/esm/assurance/assurance-foundation.schemas.d.ts.map +1 -1
  125. package/dist/esm/assurance/assurance-foundation.schemas.js +56 -0
  126. package/dist/esm/assurance/assurance-foundation.schemas.js.map +1 -1
  127. package/dist/esm/assurance/assurance-objective-catalog.definitions.d.ts +14 -7
  128. package/dist/esm/assurance/assurance-objective-catalog.definitions.d.ts.map +1 -1
  129. package/dist/esm/assurance/assurance-objective-catalog.definitions.js +24 -7
  130. package/dist/esm/assurance/assurance-objective-catalog.definitions.js.map +1 -1
  131. package/dist/esm/assurance/assurance-program-generation.schemas.d.ts +8 -1
  132. package/dist/esm/assurance/assurance-program-generation.schemas.d.ts.map +1 -1
  133. package/dist/esm/assurance/assurance-program-generation.schemas.js +10 -2
  134. package/dist/esm/assurance/assurance-program-generation.schemas.js.map +1 -1
  135. package/dist/esm/assurance/assurance-program.schemas.d.ts +447 -11
  136. package/dist/esm/assurance/assurance-program.schemas.d.ts.map +1 -1
  137. package/dist/esm/assurance/assurance-program.schemas.js +293 -5
  138. package/dist/esm/assurance/assurance-program.schemas.js.map +1 -1
  139. package/dist/esm/assurance/assurance-verification-requirement-bodies.definitions.d.ts +35 -0
  140. package/dist/esm/assurance/assurance-verification-requirement-bodies.definitions.d.ts.map +1 -0
  141. package/dist/esm/assurance/assurance-verification-requirement-bodies.definitions.js +999 -0
  142. package/dist/esm/assurance/assurance-verification-requirement-bodies.definitions.js.map +1 -0
  143. package/dist/esm/companion-exports.d.ts +7 -6
  144. package/dist/esm/companion-exports.d.ts.map +1 -1
  145. package/dist/esm/companion-exports.js.map +1 -1
  146. package/dist/esm/engine/_bootstrap.js +3 -1
  147. package/dist/esm/engine/_bootstrap.js.map +1 -1
  148. package/dist/esm/engine/applications/resources/application-api-keys.resource.specification.d.ts.map +1 -1
  149. package/dist/esm/engine/applications/resources/application-api-keys.resource.specification.js +13 -1
  150. package/dist/esm/engine/applications/resources/application-api-keys.resource.specification.js.map +1 -1
  151. package/dist/esm/engine/applications/resources/application-metadata.resource.specification.js +1 -1
  152. package/dist/esm/engine/applications/resources/application-metadata.resource.specification.js.map +1 -1
  153. package/dist/esm/engine/applications/resources/application-oauth-clients.resource.specification.d.ts +2 -0
  154. package/dist/esm/engine/applications/resources/application-oauth-clients.resource.specification.d.ts.map +1 -1
  155. package/dist/esm/engine/applications/resources/application-oauth-clients.resource.specification.js +14 -2
  156. package/dist/esm/engine/applications/resources/application-oauth-clients.resource.specification.js.map +1 -1
  157. package/dist/esm/engine/applications/resources/application-versions.resource.specification.js +9 -9
  158. package/dist/esm/engine/applications/resources/application-versions.resource.specification.js.map +1 -1
  159. package/dist/esm/engine/applications/resources/applications.resource.specification.js +1 -1
  160. package/dist/esm/engine/applications/resources/applications.resource.specification.js.map +1 -1
  161. package/dist/esm/engine/auth/resources/consumable-tokens.resource.specification.js +3 -3
  162. package/dist/esm/engine/auth/resources/consumable-tokens.resource.specification.js.map +1 -1
  163. package/dist/esm/engine/auth/resources/oauth-consent-grants.resource.specification.js +1 -1
  164. package/dist/esm/engine/auth/resources/oauth-consent-grants.resource.specification.js.map +1 -1
  165. package/dist/esm/engine/auth/resources/organization-api-keys.resource.specification.d.ts.map +1 -1
  166. package/dist/esm/engine/auth/resources/organization-api-keys.resource.specification.js +13 -1
  167. package/dist/esm/engine/auth/resources/organization-api-keys.resource.specification.js.map +1 -1
  168. package/dist/esm/engine/auth/resources/organization-oauth-clients.resource.specification.d.ts +2 -0
  169. package/dist/esm/engine/auth/resources/organization-oauth-clients.resource.specification.d.ts.map +1 -1
  170. package/dist/esm/engine/auth/resources/organization-oauth-clients.resource.specification.js +14 -2
  171. package/dist/esm/engine/auth/resources/organization-oauth-clients.resource.specification.js.map +1 -1
  172. package/dist/esm/engine/auth/resources/organization-provider-credentials.resource.specification.d.ts +32 -0
  173. package/dist/esm/engine/auth/resources/organization-provider-credentials.resource.specification.d.ts.map +1 -0
  174. package/dist/esm/engine/auth/resources/organization-provider-credentials.resource.specification.js +308 -0
  175. package/dist/esm/engine/auth/resources/organization-provider-credentials.resource.specification.js.map +1 -0
  176. package/dist/esm/engine/auth/resources/platform-access-grants.resource.specification.js +4 -4
  177. package/dist/esm/engine/auth/resources/platform-access-grants.resource.specification.js.map +1 -1
  178. package/dist/esm/engine/auth/resources/scim-provisioning-config.resource.specification.js +2 -2
  179. package/dist/esm/engine/auth/resources/scim-provisioning-config.resource.specification.js.map +1 -1
  180. package/dist/esm/engine/auth/resources/scim-tokens.resource.specification.js +6 -6
  181. package/dist/esm/engine/auth/resources/scim-tokens.resource.specification.js.map +1 -1
  182. package/dist/esm/engine/auth/resources/siem-delivery-dlq.resource.specification.js +9 -9
  183. package/dist/esm/engine/auth/resources/siem-delivery-dlq.resource.specification.js.map +1 -1
  184. package/dist/esm/engine/auth/resources/siem-export-config.resource.specification.js +2 -2
  185. package/dist/esm/engine/auth/resources/siem-export-config.resource.specification.js.map +1 -1
  186. package/dist/esm/engine/auth/resources/sso-config.resource.specification.d.ts +9 -25
  187. package/dist/esm/engine/auth/resources/sso-config.resource.specification.d.ts.map +1 -1
  188. package/dist/esm/engine/auth/resources/sso-config.resource.specification.js +104 -10
  189. package/dist/esm/engine/auth/resources/sso-config.resource.specification.js.map +1 -1
  190. package/dist/esm/engine/auth/resources/sso-connections.resource.specification.d.ts +0 -6
  191. package/dist/esm/engine/auth/resources/sso-connections.resource.specification.d.ts.map +1 -1
  192. package/dist/esm/engine/auth/resources/user-provider-credentials.resource.specification.d.ts +32 -0
  193. package/dist/esm/engine/auth/resources/user-provider-credentials.resource.specification.d.ts.map +1 -0
  194. package/dist/esm/engine/auth/resources/user-provider-credentials.resource.specification.js +297 -0
  195. package/dist/esm/engine/auth/resources/user-provider-credentials.resource.specification.js.map +1 -0
  196. package/dist/esm/engine/billing/resources/billing-accounts.resource.specification.d.ts.map +1 -1
  197. package/dist/esm/engine/billing/resources/billing-accounts.resource.specification.js +4 -3
  198. package/dist/esm/engine/billing/resources/billing-accounts.resource.specification.js.map +1 -1
  199. package/dist/esm/engine/billing/resources/credit-pools.resource.specification.js +2 -2
  200. package/dist/esm/engine/billing/resources/credit-pools.resource.specification.js.map +1 -1
  201. package/dist/esm/engine/billing/resources/invoice-refs.resource.specification.js +3 -3
  202. package/dist/esm/engine/billing/resources/invoice-refs.resource.specification.js.map +1 -1
  203. package/dist/esm/engine/billing/resources/prices.resource.specification.js +7 -7
  204. package/dist/esm/engine/billing/resources/prices.resource.specification.js.map +1 -1
  205. package/dist/esm/engine/billing/resources/products.resource.specification.js +7 -7
  206. package/dist/esm/engine/billing/resources/products.resource.specification.js.map +1 -1
  207. package/dist/esm/engine/billing/resources/promotions.resource.specification.d.ts.map +1 -1
  208. package/dist/esm/engine/billing/resources/promotions.resource.specification.js +14 -12
  209. package/dist/esm/engine/billing/resources/promotions.resource.specification.js.map +1 -1
  210. package/dist/esm/engine/billing/resources/referrals.resource.specification.js +7 -7
  211. package/dist/esm/engine/billing/resources/referrals.resource.specification.js.map +1 -1
  212. package/dist/esm/engine/billing/resources/subscriptions.resource.specification.d.ts.map +1 -1
  213. package/dist/esm/engine/billing/resources/subscriptions.resource.specification.js +6 -3
  214. package/dist/esm/engine/billing/resources/subscriptions.resource.specification.js.map +1 -1
  215. package/dist/esm/engine/billing/resources/usage-records.resource.specification.d.ts +7 -3
  216. package/dist/esm/engine/billing/resources/usage-records.resource.specification.d.ts.map +1 -1
  217. package/dist/esm/engine/billing/resources/usage-records.resource.specification.js +28 -11
  218. package/dist/esm/engine/billing/resources/usage-records.resource.specification.js.map +1 -1
  219. package/dist/esm/engine/compliance/resources/audit-logs.resource.specification.js +8 -8
  220. package/dist/esm/engine/compliance/resources/audit-logs.resource.specification.js.map +1 -1
  221. package/dist/esm/engine/engine-resource-specifications.registry.d.ts +2 -2
  222. package/dist/esm/engine/engine-resource-specifications.registry.d.ts.map +1 -1
  223. package/dist/esm/engine/engine-resource-specifications.registry.js +6 -2
  224. package/dist/esm/engine/engine-resource-specifications.registry.js.map +1 -1
  225. package/dist/esm/engine/engine-resource-sub-domain.d.ts +20 -0
  226. package/dist/esm/engine/engine-resource-sub-domain.d.ts.map +1 -1
  227. package/dist/esm/engine/engine-resource-sub-domain.js +66 -0
  228. package/dist/esm/engine/engine-resource-sub-domain.js.map +1 -1
  229. package/dist/esm/engine/errors/error-messages.specification.d.ts.map +1 -1
  230. package/dist/esm/engine/errors/error-messages.specification.js +14 -0
  231. package/dist/esm/engine/errors/error-messages.specification.js.map +1 -1
  232. package/dist/esm/engine/features/audit-logs.feature.specification.js +4 -4
  233. package/dist/esm/engine/features/audit-logs.feature.specification.js.map +1 -1
  234. package/dist/esm/engine/features/core-limits.feature.specifications.js +7 -7
  235. package/dist/esm/engine/features/core-limits.feature.specifications.js.map +1 -1
  236. package/dist/esm/engine/features/resources/application-features.resource.specification.js +3 -3
  237. package/dist/esm/engine/features/resources/application-features.resource.specification.js.map +1 -1
  238. package/dist/esm/engine/features/resources/organization-features.resource.specification.js +3 -3
  239. package/dist/esm/engine/features/resources/organization-features.resource.specification.js.map +1 -1
  240. package/dist/esm/engine/features/resources/user-features.resource.specification.js +3 -3
  241. package/dist/esm/engine/features/resources/user-features.resource.specification.js.map +1 -1
  242. package/dist/esm/engine/files/resources/files.resource.specification.js +10 -10
  243. package/dist/esm/engine/files/resources/files.resource.specification.js.map +1 -1
  244. package/dist/esm/engine/flows-actors/resources/a2a-push-delivery-log.resource.specification.js +11 -11
  245. package/dist/esm/engine/flows-actors/resources/a2a-push-delivery-log.resource.specification.js.map +1 -1
  246. package/dist/esm/engine/flows-actors/resources/a2a-token-budget-state.resource.specification.js +4 -4
  247. package/dist/esm/engine/flows-actors/resources/a2a-token-budget-state.resource.specification.js.map +1 -1
  248. package/dist/esm/engine/flows-actors/resources/flow-actor-executions.resource.specification.js +2 -2
  249. package/dist/esm/engine/flows-actors/resources/flow-actor-executions.resource.specification.js.map +1 -1
  250. package/dist/esm/engine/frontend-components/app/app-layout-connected-accounts-settings.frontend-component.specification.d.ts +5 -0
  251. package/dist/esm/engine/frontend-components/app/app-layout-connected-accounts-settings.frontend-component.specification.d.ts.map +1 -0
  252. package/dist/esm/engine/frontend-components/app/app-layout-connected-accounts-settings.frontend-component.specification.js +81 -0
  253. package/dist/esm/engine/frontend-components/app/app-layout-connected-accounts-settings.frontend-component.specification.js.map +1 -0
  254. package/dist/esm/engine/frontend-components/app/public-layout-file-upload-grant.frontend-component.specification.d.ts +4 -0
  255. package/dist/esm/engine/frontend-components/app/public-layout-file-upload-grant.frontend-component.specification.d.ts.map +1 -0
  256. package/dist/esm/engine/frontend-components/app/public-layout-file-upload-grant.frontend-component.specification.js +22 -0
  257. package/dist/esm/engine/frontend-components/app/public-layout-file-upload-grant.frontend-component.specification.js.map +1 -0
  258. package/dist/esm/engine/frontend-components/billing/billing-plan-change-preview.frontend-component.specification.d.ts +0 -4
  259. package/dist/esm/engine/frontend-components/billing/billing-plan-change-preview.frontend-component.specification.d.ts.map +0 -1
  260. package/dist/esm/engine/frontend-components/billing/billing-plan-change-preview.frontend-component.specification.js +0 -21
  261. package/dist/esm/engine/frontend-components/billing/billing-plan-change-preview.frontend-component.specification.js.map +0 -1
  262. package/dist/esm/engine/frontend-components/billing/billing-promotion-code-input.frontend-component.specification.d.ts +0 -4
  263. package/dist/esm/engine/frontend-components/billing/billing-promotion-code-input.frontend-component.specification.d.ts.map +0 -1
  264. package/dist/esm/engine/frontend-components/billing/billing-promotion-code-input.frontend-component.specification.js +0 -21
  265. package/dist/esm/engine/frontend-components/billing/billing-promotion-code-input.frontend-component.specification.js.map +0 -1
  266. package/dist/esm/engine/frontend-components/index.d.ts +0 -2
  267. package/dist/esm/engine/frontend-components/index.d.ts.map +1 -1
  268. package/dist/esm/engine/frontend-components/index.js +4 -6
  269. package/dist/esm/engine/frontend-components/index.js.map +1 -1
  270. package/dist/esm/engine/guidance/resources/guidance-state.resource.specification.js +12 -12
  271. package/dist/esm/engine/guidance/resources/guidance-state.resource.specification.js.map +1 -1
  272. package/dist/esm/engine/guidance/resources/lifecycle-state.resource.specification.js +9 -9
  273. package/dist/esm/engine/guidance/resources/lifecycle-state.resource.specification.js.map +1 -1
  274. package/dist/esm/engine/guidance/resources/progression-state.resource.specification.d.ts +8 -0
  275. package/dist/esm/engine/guidance/resources/progression-state.resource.specification.d.ts.map +1 -1
  276. package/dist/esm/engine/guidance/resources/progression-state.resource.specification.js +6 -6
  277. package/dist/esm/engine/guidance/resources/progression-state.resource.specification.js.map +1 -1
  278. package/dist/esm/engine/index.d.ts +1 -0
  279. package/dist/esm/engine/index.d.ts.map +1 -1
  280. package/dist/esm/engine/index.js +1 -0
  281. package/dist/esm/engine/index.js.map +1 -1
  282. package/dist/esm/engine/infrastructure/resources/data-seed-runs.resource.specification.js +17 -17
  283. package/dist/esm/engine/infrastructure/resources/data-seed-runs.resource.specification.js.map +1 -1
  284. package/dist/esm/engine/infrastructure/resources/external-data-pipeline-states.resource.specification.js +7 -7
  285. package/dist/esm/engine/infrastructure/resources/external-data-pipeline-states.resource.specification.js.map +1 -1
  286. package/dist/esm/engine/infrastructure/resources/job-executions.resource.specification.js +8 -8
  287. package/dist/esm/engine/infrastructure/resources/job-executions.resource.specification.js.map +1 -1
  288. package/dist/esm/engine/infrastructure/resources/job-payload-storage.resource.specification.d.ts +7 -2
  289. package/dist/esm/engine/infrastructure/resources/job-payload-storage.resource.specification.d.ts.map +1 -1
  290. package/dist/esm/engine/infrastructure/resources/job-payload-storage.resource.specification.js +10 -5
  291. package/dist/esm/engine/infrastructure/resources/job-payload-storage.resource.specification.js.map +1 -1
  292. package/dist/esm/engine/notifications/resources/m2m-webhook-delivery-log.resource.specification.d.ts.map +1 -1
  293. package/dist/esm/engine/notifications/resources/m2m-webhook-delivery-log.resource.specification.js +20 -15
  294. package/dist/esm/engine/notifications/resources/m2m-webhook-delivery-log.resource.specification.js.map +1 -1
  295. package/dist/esm/engine/notifications/resources/notification-badges.resource.specification.d.ts.map +1 -1
  296. package/dist/esm/engine/notifications/resources/notification-badges.resource.specification.js +11 -10
  297. package/dist/esm/engine/notifications/resources/notification-badges.resource.specification.js.map +1 -1
  298. package/dist/esm/engine/notifications/resources/webhook-config.resource.specification.d.ts.map +1 -1
  299. package/dist/esm/engine/notifications/resources/webhook-config.resource.specification.js +29 -6
  300. package/dist/esm/engine/notifications/resources/webhook-config.resource.specification.js.map +1 -1
  301. package/dist/esm/engine/organizations/resources/organization-members.resource.specification.js +9 -9
  302. package/dist/esm/engine/organizations/resources/organization-members.resource.specification.js.map +1 -1
  303. package/dist/esm/engine/organizations/resources/organization-notifications.resource.specification.js +3 -3
  304. package/dist/esm/engine/organizations/resources/organization-notifications.resource.specification.js.map +1 -1
  305. package/dist/esm/engine/organizations/resources/organization-preferences.resource.specification.js +4 -4
  306. package/dist/esm/engine/organizations/resources/organization-preferences.resource.specification.js.map +1 -1
  307. package/dist/esm/engine/organizations/resources/organization-profiles.resource.specification.js +2 -2
  308. package/dist/esm/engine/organizations/resources/organization-profiles.resource.specification.js.map +1 -1
  309. package/dist/esm/engine/organizations/resources/organization-unit-members.resource.specification.js +1 -1
  310. package/dist/esm/engine/organizations/resources/organization-unit-members.resource.specification.js.map +1 -1
  311. package/dist/esm/engine/organizations/resources/organizations.resource.specification.js +7 -7
  312. package/dist/esm/engine/organizations/resources/organizations.resource.specification.js.map +1 -1
  313. package/dist/esm/engine/providers/_engine-provider-shared.d.ts +9 -0
  314. package/dist/esm/engine/providers/_engine-provider-shared.d.ts.map +1 -0
  315. package/dist/esm/engine/providers/_engine-provider-shared.js +19 -0
  316. package/dist/esm/engine/providers/_engine-provider-shared.js.map +1 -0
  317. package/dist/esm/engine/providers/anthropic.provider.specification.d.ts +7 -0
  318. package/dist/esm/engine/providers/anthropic.provider.specification.d.ts.map +1 -0
  319. package/dist/esm/engine/providers/anthropic.provider.specification.js +33 -0
  320. package/dist/esm/engine/providers/anthropic.provider.specification.js.map +1 -0
  321. package/dist/esm/engine/providers/apple.provider.specification.d.ts +7 -0
  322. package/dist/esm/engine/providers/apple.provider.specification.d.ts.map +1 -0
  323. package/dist/esm/engine/providers/apple.provider.specification.js +35 -0
  324. package/dist/esm/engine/providers/apple.provider.specification.js.map +1 -0
  325. package/dist/esm/engine/providers/email-preview.provider.specification.d.ts +7 -0
  326. package/dist/esm/engine/providers/email-preview.provider.specification.d.ts.map +1 -0
  327. package/dist/esm/engine/providers/email-preview.provider.specification.js +31 -0
  328. package/dist/esm/engine/providers/email-preview.provider.specification.js.map +1 -0
  329. package/dist/esm/engine/providers/github.provider.specification.d.ts +7 -0
  330. package/dist/esm/engine/providers/github.provider.specification.d.ts.map +1 -0
  331. package/dist/esm/engine/providers/github.provider.specification.js +30 -0
  332. package/dist/esm/engine/providers/github.provider.specification.js.map +1 -0
  333. package/dist/esm/engine/providers/google.provider.specification.d.ts +7 -0
  334. package/dist/esm/engine/providers/google.provider.specification.d.ts.map +1 -0
  335. package/dist/esm/engine/providers/google.provider.specification.js +34 -0
  336. package/dist/esm/engine/providers/google.provider.specification.js.map +1 -0
  337. package/dist/esm/engine/providers/grok.provider.specification.d.ts +7 -0
  338. package/dist/esm/engine/providers/grok.provider.specification.d.ts.map +1 -0
  339. package/dist/esm/engine/providers/grok.provider.specification.js +30 -0
  340. package/dist/esm/engine/providers/grok.provider.specification.js.map +1 -0
  341. package/dist/esm/engine/providers/index.d.ts +23 -0
  342. package/dist/esm/engine/providers/index.d.ts.map +1 -0
  343. package/dist/esm/engine/providers/index.js +37 -0
  344. package/dist/esm/engine/providers/index.js.map +1 -0
  345. package/dist/esm/engine/providers/microsoft.provider.specification.d.ts +7 -0
  346. package/dist/esm/engine/providers/microsoft.provider.specification.d.ts.map +1 -0
  347. package/dist/esm/engine/providers/microsoft.provider.specification.js +30 -0
  348. package/dist/esm/engine/providers/microsoft.provider.specification.js.map +1 -0
  349. package/dist/esm/engine/providers/mistral.provider.specification.d.ts +7 -0
  350. package/dist/esm/engine/providers/mistral.provider.specification.d.ts.map +1 -0
  351. package/dist/esm/engine/providers/mistral.provider.specification.js +33 -0
  352. package/dist/esm/engine/providers/mistral.provider.specification.js.map +1 -0
  353. package/dist/esm/engine/providers/openai.provider.specification.d.ts +7 -0
  354. package/dist/esm/engine/providers/openai.provider.specification.d.ts.map +1 -0
  355. package/dist/esm/engine/providers/openai.provider.specification.js +43 -0
  356. package/dist/esm/engine/providers/openai.provider.specification.js.map +1 -0
  357. package/dist/esm/engine/providers/opencode.provider.specification.d.ts +7 -0
  358. package/dist/esm/engine/providers/opencode.provider.specification.d.ts.map +1 -0
  359. package/dist/esm/engine/providers/opencode.provider.specification.js +50 -0
  360. package/dist/esm/engine/providers/opencode.provider.specification.js.map +1 -0
  361. package/dist/esm/engine/providers/perplexity.provider.specification.d.ts +7 -0
  362. package/dist/esm/engine/providers/perplexity.provider.specification.d.ts.map +1 -0
  363. package/dist/esm/engine/providers/perplexity.provider.specification.js +30 -0
  364. package/dist/esm/engine/providers/perplexity.provider.specification.js.map +1 -0
  365. package/dist/esm/engine/providers/resend.provider.specification.d.ts +7 -0
  366. package/dist/esm/engine/providers/resend.provider.specification.d.ts.map +1 -0
  367. package/dist/esm/engine/providers/resend.provider.specification.js +33 -0
  368. package/dist/esm/engine/providers/resend.provider.specification.js.map +1 -0
  369. package/dist/esm/engine/providers/stripe.provider.specification.d.ts +7 -0
  370. package/dist/esm/engine/providers/stripe.provider.specification.d.ts.map +1 -0
  371. package/dist/esm/engine/providers/stripe.provider.specification.js +35 -0
  372. package/dist/esm/engine/providers/stripe.provider.specification.js.map +1 -0
  373. package/dist/esm/engine/providers/twilio.provider.specification.d.ts +7 -0
  374. package/dist/esm/engine/providers/twilio.provider.specification.d.ts.map +1 -0
  375. package/dist/esm/engine/providers/twilio.provider.specification.js +33 -0
  376. package/dist/esm/engine/providers/twilio.provider.specification.js.map +1 -0
  377. package/dist/esm/engine/users/resources/anonymous-users.resource.specification.js +7 -7
  378. package/dist/esm/engine/users/resources/anonymous-users.resource.specification.js.map +1 -1
  379. package/dist/esm/engine/users/resources/inbound-contacts.resource.specification.js +9 -9
  380. package/dist/esm/engine/users/resources/inbound-contacts.resource.specification.js.map +1 -1
  381. package/dist/esm/engine/users/resources/user-credentials.resource.specification.js +2 -2
  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.js +8 -8
  384. package/dist/esm/engine/users/resources/user-identity-links.resource.specification.js.map +1 -1
  385. package/dist/esm/engine/users/resources/user-preferences.resource.specification.d.ts +4 -4
  386. package/dist/esm/engine/users/resources/user-preferences.resource.specification.js +4 -4
  387. package/dist/esm/engine/users/resources/user-preferences.resource.specification.js.map +1 -1
  388. package/dist/esm/engine/users/resources/user-profiles.resource.specification.js +2 -2
  389. package/dist/esm/engine/users/resources/user-profiles.resource.specification.js.map +1 -1
  390. package/dist/esm/engine/users/resources/user-self-preferences.resource.specification.d.ts +4 -4
  391. package/dist/esm/engine/users/resources/user-self-preferences.resource.specification.d.ts.map +1 -1
  392. package/dist/esm/engine/users/resources/user-self-preferences.resource.specification.js +13 -11
  393. package/dist/esm/engine/users/resources/user-self-preferences.resource.specification.js.map +1 -1
  394. package/dist/esm/engine/users/resources/user-self-profiles.resource.specification.js +1 -1
  395. package/dist/esm/engine/users/resources/user-self-profiles.resource.specification.js.map +1 -1
  396. package/dist/esm/engine/users/resources/user-self.resource.specification.js +8 -8
  397. package/dist/esm/engine/users/resources/user-self.resource.specification.js.map +1 -1
  398. package/dist/esm/engine/users/resources/users.resource.specification.d.ts.map +1 -1
  399. package/dist/esm/engine/users/resources/users.resource.specification.js +93 -0
  400. package/dist/esm/engine/users/resources/users.resource.specification.js.map +1 -1
  401. package/dist/esm/technical-documentation/engine-documentation-specification-catalog.companion.d.ts.map +1 -1
  402. package/dist/esm/technical-documentation/engine-documentation-specification-catalog.companion.js +95 -45
  403. package/dist/esm/technical-documentation/engine-documentation-specification-catalog.companion.js.map +1 -1
  404. package/dist/esm/technical-documentation/technical-documentation-units.schemas.d.ts +37 -1
  405. package/dist/esm/technical-documentation/technical-documentation-units.schemas.d.ts.map +1 -1
  406. package/dist/esm/technical-documentation/technical-documentation-units.schemas.js +36 -0
  407. package/dist/esm/technical-documentation/technical-documentation-units.schemas.js.map +1 -1
  408. package/dist/tsconfig.build.tsbuildinfo +1 -1
  409. package/package.json +8 -8
  410. package/dist/assurance/external-framework-mapping.json +0 -980
@@ -54,7 +54,7 @@ export const applicationVersionsResourceSpecification = resourceSpecificationFro
54
54
  },
55
55
  fields: {
56
56
  appId: schemaShape.appId.foreignKeySpec({
57
- meaning: 'The owning `applications` row this release belongs to; immutable after create.',
57
+ meaning: 'The owning `applications` record this release belongs to; immutable after create.',
58
58
  whyItMatters: 'Scopes the version history to a single application so roll-forward/rollback and changelog surfaces only ever mix builds of the same app.',
59
59
  importance: FieldSemanticImportance.PRIMARY,
60
60
  }),
@@ -67,7 +67,7 @@ export const applicationVersionsResourceSpecification = resourceSpecificationFro
67
67
  purpose: 'Record a new build row when a pipeline produces artifacts.',
68
68
  outcome: 'Appears in history tables and can be selected for traffic.',
69
69
  responseStatuses: [
70
- { code: HttpResponseStatusCode.CREATED_201, meaning: 'The release row was recorded for the owning application and is returned with its id.' },
70
+ { code: HttpResponseStatusCode.CREATED_201, meaning: 'The release record was recorded for the owning application and is returned with its id.' },
71
71
  ],
72
72
  errorScenarios: [
73
73
  { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The version string or release fields fail schema validation.', errorCode: 'VALIDATION_FAILED' },
@@ -97,7 +97,7 @@ export const applicationVersionsResourceSpecification = resourceSpecificationFro
97
97
  purpose: 'Detail view for a single release, including long notes.',
98
98
  outcome: 'Support and SRE can verify exactly what shipped.',
99
99
  responseStatuses: [
100
- { code: HttpResponseStatusCode.OK_200, meaning: 'The release row was found and its full detail (including notes) is returned.' },
100
+ { code: HttpResponseStatusCode.OK_200, meaning: 'The release record was found and its full detail (including notes) is returned.' },
101
101
  ],
102
102
  errorScenarios: [
103
103
  { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No release row exists for the supplied id in the caller’s scope.' },
@@ -108,15 +108,15 @@ export const applicationVersionsResourceSpecification = resourceSpecificationFro
108
108
  purpose: 'Paginated history for the owning application.',
109
109
  outcome: 'Ordered timeline for “what’s live” decisions.',
110
110
  responseStatuses: [
111
- { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of release rows for the owning application.' },
111
+ { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of release records for the owning application.' },
112
112
  ],
113
113
  idempotent: true,
114
114
  },
115
115
  [Op.SEARCH]: {
116
- purpose: 'Search or filter the release log when the factory enables it.',
117
- outcome: 'Narrowed rows for big tenants with frequent deploys.',
116
+ purpose: 'Search or filter the release log.',
117
+ outcome: 'A narrowed result set for tenants that deploy frequently.',
118
118
  responseStatuses: [
119
- { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of release rows matching the version/notes query.' },
119
+ { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of release records matching the version/notes query.' },
120
120
  ],
121
121
  idempotent: true,
122
122
  },
@@ -124,7 +124,7 @@ export const applicationVersionsResourceSpecification = resourceSpecificationFro
124
124
  purpose: 'Patch release notes or metadata where mutability is allowed by policy.',
125
125
  outcome: 'Correct typos in notes without re-running the build.',
126
126
  responseStatuses: [
127
- { code: HttpResponseStatusCode.OK_200, meaning: 'The release row was patched and the updated record is returned.' },
127
+ { code: HttpResponseStatusCode.OK_200, meaning: 'The release record was patched and the updated record is returned.' },
128
128
  ],
129
129
  errorScenarios: [
130
130
  { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The edited release fields fail schema validation.', errorCode: 'VALIDATION_FAILED' },
@@ -137,7 +137,7 @@ export const applicationVersionsResourceSpecification = resourceSpecificationFro
137
137
  purpose: 'Remove errant or superseded records when legal policy allows hard delete.',
138
138
  outcome: 'Row absent from public history; audit events may still exist outside this resource.',
139
139
  responseStatuses: [
140
- { code: HttpResponseStatusCode.NO_CONTENT_204, meaning: 'The release row was deleted; no body is returned.' },
140
+ { code: HttpResponseStatusCode.NO_CONTENT_204, meaning: 'The release record was deleted; no body is returned.' },
141
141
  ],
142
142
  errorScenarios: [
143
143
  { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an org admin for the owning application; deleting releases is org-admin gated.' },
@@ -1 +1 @@
1
- {"version":3,"file":"application-versions.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/applications/resources/application-versions.resource.specification.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0CAA0C,IAAI,yBAAyB,EAAE,MAAM,8BAA8B,CAAC;AACvH,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAEpE,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,wBAAwB,EACxB,qBAAqB,IAAI,EAAE,EAC3B,oBAAoB,EACpB,8DAA8D,IAAI,0BAA0B,GAC7F,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,sBAAsB,EACtB,6BAA6B,EAC7B,qBAAqB,EACrB,8CAA8C,GAC/C,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAO3E,MAAM,qBAAqB,GAAG,yBAAyE,CAAC;AAExG,MAAM,CAAC,MAAM,wCAAwC,GAAG,8CAA8C,CACpG,6BAA6B,CAAC,qBAAqB,CAAC,EACpD,qBAAqB,CACnB,0BAA0B,EAC1B,wBAAwB,EACxB,CAAC,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC,CAAC;IACpB,OAAO,EAAE,2JAA2J;IACpK,YAAY,EAAE,0IAA0I;IACxJ,aAAa,EAAE,wRAAwR;IACvS,QAAQ,EAAE,aAAa,CAAC,SAAS;IACjC,SAAS,EAAE,uBAAuB,CAAC,YAAY;IAC/C,YAAY,EAAE;QACZ,UAAU,EAAE;YACV,WAAW,EAAE,uBAAuB;YACpC,UAAU,EAAE,0BAA0B;YACtC,UAAU,EAAE,cAAc,CAAC,MAAM;YACjC,eAAe,EAAE,mBAAmB,CAAC,UAAU;SAChD;QACD,eAAe,EAAE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EAAE,kGAAkG,EAAE;gBACxJ,EAAE,IAAI,EAAE,sBAAsB,CAAC,aAAa,EAAE,IAAI,EAAE,wEAAwE,EAAE;aAC/H;YACD,UAAU,EAAE,IAAI;SACjB;KACF;IACD,mBAAmB,EAAE;QACnB,0JAA0J;QAC1J,+fAA+f;KAChgB;CACF,CAAC,EACF,EAAE,oBAAoB,EAAE,oBAAoB,CAAC,WAAW,EAAE,CAC3D,EACD,GAAG,EAAE,CAAC,CAAC;IACL,KAAK,EAAE;QACL,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE,kDAAkD,EAAE,SAAS,EAAE,6CAA6C,EAAE;QACtI,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,OAAO,EAAE,8CAA8C,EAAE,SAAS,EAAE,4CAA4C,EAAE;QAC/H,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,OAAO,EAAE,oCAAoC,EAAE,SAAS,EAAE,qCAAqC,EAAE;QAC9G,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE,kEAAkE,EAAE,SAAS,EAAE,4CAA4C,EAAE;QACrJ,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE,2EAA2E,EAAE,SAAS,EAAE,oDAAoD,EAAE;QACtK,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE,sDAAsD,EAAE,SAAS,EAAE,qDAAqD,EAAE;KACnJ;CACF,CAAC,CACH,CAAC","sourcesContent":["import { applicationVersionsAdminResourceUIBehavior as applicationVersionsSource } 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 ApplicationVersionSchema,\n CoreResourceOperation as Op,\n ResourcePrimaryScope,\n applicationVersionsResourceConfiguration_InitializationFactory as applicationVersionsFactory,\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 applicationVersionsFactory>;\ntype Custom = NonNullable<Cfg['customOperation']>;\ntype Core = Cfg['coreOperations'][number];\ntype Main = Cfg['mainSchema'];\n\nconst applicationVersionsUI = applicationVersionsSource as ResourceUIBehaviorConfig<Custom, Core, Main>;\n\nexport const applicationVersionsResourceSpecification = resourceSpecificationFromFrontendConfiguration(\n resourceFrontendConfiguration(applicationVersionsUI),\n resourceSpecification(\n applicationVersionsFactory,\n ApplicationVersionSchema,\n ({ schemaShape }) => ({\n purpose: 'The application\\'s published releases: one record per version, with its release notes and publication date. A published version is not edited afterwards.',\n businessRole: 'Serves as the application’s changelog of record — what shipped, when, and with which notes — for support, audit, and migration planning.',\n lifecycleRole: 'Grows an append-mostly history over time through core CRUD; it records releases and does not control them. Deployment (which build runs where) is owned by the CLI self-host lane, and the framework is mono-env, so no promotion/rollback/deprecation state lives on the version row.',\n audience: LabelAudience.DEVELOPER,\n subDomain: EngineResourceSubDomain.APPLICATIONS,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'ApplicationVersionSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactory: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'applicationVersionsResourceConfiguration_InitializationFactory',\n symbolKind: CodeSymbolKind.FACTORY,\n declarationKind: CodeDeclarationKind.FUNCTION,\n },\n resourceType: {\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceType',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n memberName: 'APPLICATION_VERSIONS',\n },\n // No `customEnum`: this resource has no custom operations. The former\n // `ApplicationVersion_Operations` enum was removed on 2026-08-01 along with its three\n // release-management verbs (see `businessConstraints`).\n operationVocabulary: {\n coreEnum: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceOperation',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n frontendConfigurationSources: [\n {\n packageName: '@wildo-ai/presets-components',\n exportName: 'applicationVersionsAdminResourceUIBehavior',\n symbolKind: CodeSymbolKind.UI_BEHAVIOR,\n },\n ],\n },\n fields: {\n appId: schemaShape.appId.foreignKeySpec({\n meaning: 'The owning `applications` row this release belongs to; immutable after create.',\n whyItMatters: 'Scopes the version history to a single application so roll-forward/rollback and changelog surfaces only ever mix builds of the same app.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n version: schemaShape.version.stringSpec({ meaning: 'Semver (or product-specific) string for this build.', importance: FieldSemanticImportance.PRIMARY }),\n releaseDate: schemaShape.releaseDate.dateSpec({ meaning: 'Publish timestamp for the cut.' }),\n releaseNotes: schemaShape.releaseNotes.stringSpec({ meaning: 'Changelog and migration notes for operators and support.' }),\n },\n operations: {\n [Op.CREATE]: {\n purpose: 'Record a new build row when a pipeline produces artifacts.',\n outcome: 'Appears in history tables and can be selected for traffic.',\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'The release row was recorded for the owning application and is returned with its id.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The version string or release fields fail schema validation.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an org admin for the owning application; recording releases is org-admin gated.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'The owning application referenced by this release does not exist in the caller’s scope.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'A release row with the same version string already exists for this application.' },\n ],\n idempotent: false,\n examples: [\n {\n title: 'Record a new release',\n request: {\n version: '2.4.0',\n releaseDate: '2026-06-15T09:00:00.000Z',\n releaseNotes: 'Adds bulk task completion and fixes the assignee filter.',\n },\n response: {\n version: '2.4.0',\n releaseDate: '2026-06-15T09:00:00.000Z',\n releaseNotes: 'Adds bulk task completion and fixes the assignee filter.',\n },\n forStatus: HttpResponseStatusCode.CREATED_201,\n },\n ],\n },\n [Op.READ]: {\n purpose: 'Detail view for a single release, including long notes.',\n outcome: 'Support and SRE can verify exactly what shipped.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The release row was found and its full detail (including notes) is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No release row exists for the supplied id in the caller’s scope.' },\n ],\n idempotent: true,\n },\n [Op.LIST]: {\n purpose: 'Paginated history for the owning application.',\n outcome: 'Ordered timeline for “what’s live” decisions.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of release rows for the owning application.' },\n ],\n idempotent: true,\n },\n [Op.SEARCH]: {\n purpose: 'Search or filter the release log when the factory enables it.',\n outcome: 'Narrowed rows for big tenants with frequent deploys.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of release rows matching the version/notes query.' },\n ],\n idempotent: true,\n },\n [Op.UPDATE]: {\n purpose: 'Patch release notes or metadata where mutability is allowed by policy.',\n outcome: 'Correct typos in notes without re-running the build.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The release row was patched and the updated record is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The edited release fields fail schema validation.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an org admin for the owning application; editing releases is org-admin gated.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No release row exists for the supplied id in the caller’s scope.' },\n ],\n idempotent: true,\n },\n [Op.DELETE]: {\n purpose: 'Remove errant or superseded records when legal policy allows hard delete.',\n outcome: 'Row absent from public history; audit events may still exist outside this resource.',\n responseStatuses: [\n { code: HttpResponseStatusCode.NO_CONTENT_204, meaning: 'The release row was deleted; no body is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an org admin for the owning application; deleting releases is org-admin gated.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No release row exists for the supplied id (or it was already deleted).' },\n ],\n idempotent: true,\n },\n },\n businessConstraints: [\n 'Only the admin `application` preset materializes the versions relationship tab; end-user `APPLICATION` main preset keeps versions hidden in merged maps.',\n 'This resource RECORDS releases; it does not control them. `PROMOTE` / `ROLLBACK` / `DEPRECATE` were declared here and removed on 2026-08-01 — all three were routed but wrote nothing, and the state they implied cannot live on this row: the framework is mono-env (each deployment has its own infrastructure and database), so \"which build is live in environment X\" is not a fact this application\\'s database can hold, and deploying a built image is owned by the CLI self-host lane rather than by a resource verb.',\n ],\n }),\n { resourcePrimaryScope: ResourcePrimaryScope.APPLICATION },\n ),\n () => ({\n views: {\n [Op.CREATE]: { purpose: 'Register a new row after CI publishes artifacts.', whenToUse: 'Release automation and manual hotfix entry.' },\n [Op.READ]: { purpose: 'Detail drawer in admin for one release line.', whenToUse: 'Comparing notes during migration planning.' },\n [Op.LIST]: { purpose: 'History tab in admin apps surface.', whenToUse: 'Default release browser experience.' },\n [Op.SEARCH]: { purpose: 'Search the release log when search is enabled in factory config.', whenToUse: 'Large app histories in enterprise tenants.' },\n [Op.UPDATE]: { purpose: 'Note edits for clarifications or legal redactions in displayed changelog.', whenToUse: 'When marketing updates copy without changing bits.' },\n [Op.DELETE]: { purpose: 'Remove mistaken rows in exceptional migration flows.', whenToUse: 'Test builds accidentally captured as prod releases.' },\n },\n }),\n);\n"]}
1
+ {"version":3,"file":"application-versions.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/eng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AAE;QACnB,0JAA0J;QAC1J,+fAA+f;KAChgB;CACF,CAAC,EACF,EAAE,oBAAoB,EAAE,oBAAoB,CAAC,WAAW,EAAE,CAC3D,EACD,GAAG,EAAE,CAAC,CAAC;IACL,KAAK,EAAE;QACL,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE,kDAAkD,EAAE,SAAS,EAAE,6CAA6C,EAAE;QACtI,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,OAAO,EAAE,8CAA8C,EAAE,SAAS,EAAE,4CAA4C,EAAE;QAC/H,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,OAAO,EAAE,oCAAoC,EAAE,SAAS,EAAE,qCAAqC,EAAE;QAC9G,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE,kEAAkE,EAAE,SAAS,EAAE,4CAA4C,EAAE;QACrJ,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE,2EAA2E,EAAE,SAAS,EAAE,oDAAoD,EAAE;QACtK,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE,sDAAsD,EAAE,SAAS,EAAE,qDAAqD,EAAE;KACnJ;CACF,CAAC,CACH,CAAC","sourcesContent":["import { applicationVersionsAdminResourceUIBehavior as applicationVersionsSource } 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 ApplicationVersionSchema,\n CoreResourceOperation as Op,\n ResourcePrimaryScope,\n applicationVersionsResourceConfiguration_InitializationFactory as applicationVersionsFactory,\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 applicationVersionsFactory>;\ntype Custom = NonNullable<Cfg['customOperation']>;\ntype Core = Cfg['coreOperations'][number];\ntype Main = Cfg['mainSchema'];\n\nconst applicationVersionsUI = applicationVersionsSource as ResourceUIBehaviorConfig<Custom, Core, Main>;\n\nexport const applicationVersionsResourceSpecification = resourceSpecificationFromFrontendConfiguration(\n resourceFrontendConfiguration(applicationVersionsUI),\n resourceSpecification(\n applicationVersionsFactory,\n ApplicationVersionSchema,\n ({ schemaShape }) => ({\n purpose: 'The application\\'s published releases: one record per version, with its release notes and publication date. A published version is not edited afterwards.',\n businessRole: 'Serves as the application’s changelog of record — what shipped, when, and with which notes — for support, audit, and migration planning.',\n lifecycleRole: 'Grows an append-mostly history over time through core CRUD; it records releases and does not control them. Deployment (which build runs where) is owned by the CLI self-host lane, and the framework is mono-env, so no promotion/rollback/deprecation state lives on the version row.',\n audience: LabelAudience.DEVELOPER,\n subDomain: EngineResourceSubDomain.APPLICATIONS,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'ApplicationVersionSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactory: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'applicationVersionsResourceConfiguration_InitializationFactory',\n symbolKind: CodeSymbolKind.FACTORY,\n declarationKind: CodeDeclarationKind.FUNCTION,\n },\n resourceType: {\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceType',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n memberName: 'APPLICATION_VERSIONS',\n },\n // No `customEnum`: this resource has no custom operations. The former\n // `ApplicationVersion_Operations` enum was removed on 2026-08-01 along with its three\n // release-management verbs (see `businessConstraints`).\n operationVocabulary: {\n coreEnum: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceOperation',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n frontendConfigurationSources: [\n {\n packageName: '@wildo-ai/presets-components',\n exportName: 'applicationVersionsAdminResourceUIBehavior',\n symbolKind: CodeSymbolKind.UI_BEHAVIOR,\n },\n ],\n },\n fields: {\n appId: schemaShape.appId.foreignKeySpec({\n meaning: 'The owning `applications` record this release belongs to; immutable after create.',\n whyItMatters: 'Scopes the version history to a single application so roll-forward/rollback and changelog surfaces only ever mix builds of the same app.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n version: schemaShape.version.stringSpec({ meaning: 'Semver (or product-specific) string for this build.', importance: FieldSemanticImportance.PRIMARY }),\n releaseDate: schemaShape.releaseDate.dateSpec({ meaning: 'Publish timestamp for the cut.' }),\n releaseNotes: schemaShape.releaseNotes.stringSpec({ meaning: 'Changelog and migration notes for operators and support.' }),\n },\n operations: {\n [Op.CREATE]: {\n purpose: 'Record a new build row when a pipeline produces artifacts.',\n outcome: 'Appears in history tables and can be selected for traffic.',\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'The release record was recorded for the owning application and is returned with its id.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The version string or release fields fail schema validation.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an org admin for the owning application; recording releases is org-admin gated.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'The owning application referenced by this release does not exist in the caller’s scope.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'A release row with the same version string already exists for this application.' },\n ],\n idempotent: false,\n examples: [\n {\n title: 'Record a new release',\n request: {\n version: '2.4.0',\n releaseDate: '2026-06-15T09:00:00.000Z',\n releaseNotes: 'Adds bulk task completion and fixes the assignee filter.',\n },\n response: {\n version: '2.4.0',\n releaseDate: '2026-06-15T09:00:00.000Z',\n releaseNotes: 'Adds bulk task completion and fixes the assignee filter.',\n },\n forStatus: HttpResponseStatusCode.CREATED_201,\n },\n ],\n },\n [Op.READ]: {\n purpose: 'Detail view for a single release, including long notes.',\n outcome: 'Support and SRE can verify exactly what shipped.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The release record was found and its full detail (including notes) is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No release row exists for the supplied id in the caller’s scope.' },\n ],\n idempotent: true,\n },\n [Op.LIST]: {\n purpose: 'Paginated history for the owning application.',\n outcome: 'Ordered timeline for “what’s live” decisions.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of release records for the owning application.' },\n ],\n idempotent: true,\n },\n [Op.SEARCH]: {\n purpose: 'Search or filter the release log.',\n outcome: 'A narrowed result set for tenants that deploy frequently.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of release records matching the version/notes query.' },\n ],\n idempotent: true,\n },\n [Op.UPDATE]: {\n purpose: 'Patch release notes or metadata where mutability is allowed by policy.',\n outcome: 'Correct typos in notes without re-running the build.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The release record was patched and the updated record is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The edited release fields fail schema validation.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an org admin for the owning application; editing releases is org-admin gated.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No release row exists for the supplied id in the caller’s scope.' },\n ],\n idempotent: true,\n },\n [Op.DELETE]: {\n purpose: 'Remove errant or superseded records when legal policy allows hard delete.',\n outcome: 'Row absent from public history; audit events may still exist outside this resource.',\n responseStatuses: [\n { code: HttpResponseStatusCode.NO_CONTENT_204, meaning: 'The release record was deleted; no body is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an org admin for the owning application; deleting releases is org-admin gated.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No release row exists for the supplied id (or it was already deleted).' },\n ],\n idempotent: true,\n },\n },\n businessConstraints: [\n 'Only the admin `application` preset materializes the versions relationship tab; end-user `APPLICATION` main preset keeps versions hidden in merged maps.',\n 'This resource RECORDS releases; it does not control them. `PROMOTE` / `ROLLBACK` / `DEPRECATE` were declared here and removed on 2026-08-01 — all three were routed but wrote nothing, and the state they implied cannot live on this row: the framework is mono-env (each deployment has its own infrastructure and database), so \"which build is live in environment X\" is not a fact this application\\'s database can hold, and deploying a built image is owned by the CLI self-host lane rather than by a resource verb.',\n ],\n }),\n { resourcePrimaryScope: ResourcePrimaryScope.APPLICATION },\n ),\n () => ({\n views: {\n [Op.CREATE]: { purpose: 'Register a new row after CI publishes artifacts.', whenToUse: 'Release automation and manual hotfix entry.' },\n [Op.READ]: { purpose: 'Detail drawer in admin for one release line.', whenToUse: 'Comparing notes during migration planning.' },\n [Op.LIST]: { purpose: 'History tab in admin apps surface.', whenToUse: 'Default release browser experience.' },\n [Op.SEARCH]: { purpose: 'Search the release log when search is enabled in factory config.', whenToUse: 'Large app histories in enterprise tenants.' },\n [Op.UPDATE]: { purpose: 'Note edits for clarifications or legal redactions in displayed changelog.', whenToUse: 'When marketing updates copy without changing bits.' },\n [Op.DELETE]: { purpose: 'Remove mistaken rows in exceptional migration flows.', whenToUse: 'Test builds accidentally captured as prod releases.' },\n },\n }),\n);\n"]}
@@ -76,7 +76,7 @@ export const applicationsResourceSpecification = resourceSpecificationFromFronte
76
76
  purpose: 'Members read a lightweight about row; app admins read the full row; platform admins use `admin` variants.',
77
77
  outcome: 'Clients hydrate shell chrome and about surfaces.',
78
78
  responseStatuses: [
79
- { code: HttpResponseStatusCode.OK_200, meaning: 'The application row was found and the variant-appropriate projection (about row vs full record) is returned.' },
79
+ { code: HttpResponseStatusCode.OK_200, meaning: 'The application was found and the projection the variant asks for is returned — the short “about” view or the full record.' },
80
80
  ],
81
81
  errorScenarios: [
82
82
  { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No application exists for the supplied id in the caller’s scope.' },
@@ -1 +1 @@
1
- {"version":3,"file":"applications.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/applications/resources/applications.resource.specification.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,6CAA6C,IAAI,uBAAuB,EACxE,4CAA4C,IAAI,sBAAsB,GACvE,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAEpE,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,iBAAiB,EACjB,qBAAqB,IAAI,EAAE,EAC3B,oBAAoB,EACpB,sDAAsD,IAAI,mBAAmB,GAC9E,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,sBAAsB,EACtB,mCAAmC,EACnC,6BAA6B,EAC7B,qBAAqB,EACrB,8CAA8C,GAC/C,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAM3E,+FAA+F;AAC/F,mGAAmG;AACnG,MAAM,kBAAkB,GAAG,sBAAyE,CAAC;AACrG,MAAM,mBAAmB,GAAG,uBAA0E,CAAC;AAEvG,MAAM,CAAC,MAAM,iCAAiC,GAAG,8CAA8C,CAC7F,mCAAmC,CACjC,6BAA6B,CAAC,kBAAkB,CAAC,EACjD,6BAA6B,CAAC,mBAAmB,CAAC,CACnD,EACD,qBAAqB,CACnB,mBAAmB,EACnB,iBAAiB,EACjB,CAAC,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC,CAAC;IACpB,OAAO,EAAE,0HAA0H;IACnI,YAAY,EAAE,0GAA0G;IACxH,aAAa,EAAE,6MAA6M;IAC5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AAO,EAAE,kEAAkE,EAAE,SAAS,EAAE,wDAAwD,EAAE;QACjK,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE,sEAAsE,EAAE,SAAS,EAAE,yCAAyC,EAAE;KACvJ;CACF,CAAC,CACH,CAAC","sourcesContent":["import {\n applicationAdminApplicationResourceUIBehavior as applicationsAdminSource,\n applicationMainApplicationResourceUIBehavior as applicationsMainSource,\n} from '@wildo-ai/presets-components';\nimport { LabelAudience } from '@wildo-ai/presets-components-models';\nimport type { ResourceUIBehaviorConfig } from '@wildo-ai/saas-frontend-lib/companion';\nimport {\n CodeDeclarationKind,\n CodeSymbolKind,\n FieldSemanticImportance,\n} from '@wildo-ai/zod-decorators';\nimport {\n ApplicationSchema,\n CoreResourceOperation as Op,\n ResourcePrimaryScope,\n applicationResourceConfiguration_InitializationFactory as applicationsFactory,\n} from '@wildo-ai/saas-models';\nimport {\n HttpResponseStatusCode,\n mergeResourceFrontendConfigurations,\n resourceFrontendConfiguration,\n resourceSpecification,\n resourceSpecificationFromFrontendConfiguration,\n} from '~wildo-specifications/_core';\nimport { EngineResourceSubDomain } from '../../engine-resource-sub-domain';\n\ntype Cfg = ReturnType<typeof applicationsFactory>;\ntype Core = Cfg['coreOperations'][number];\ntype Main = Cfg['mainSchema'];\n\n// `undefined` custom-operation parameter: `APPLICATION` declares no custom operations (see the\n// operationVocabulary note below). Same shape as `application-metadata.resource.specification.ts`.\nconst applicationsMainUI = applicationsMainSource as ResourceUIBehaviorConfig<undefined, Core, Main>;\nconst applicationsAdminUI = applicationsAdminSource as ResourceUIBehaviorConfig<undefined, Core, Main>;\n\nexport const applicationsResourceSpecification = resourceSpecificationFromFrontendConfiguration(\n mergeResourceFrontendConfigurations(\n resourceFrontendConfiguration(applicationsMainUI),\n resourceFrontendConfiguration(applicationsAdminUI),\n ),\n resourceSpecification(\n applicationsFactory,\n ApplicationSchema,\n ({ schemaShape }) => ({\n purpose: 'The application\\'s own identity record: its slug, display name and how it is registered with the platform that hosts it.',\n businessRole: 'Anchor for all app-scoped entitlements, versions, and infrastructure configuration in the control plane.',\n lifecycleRole: 'Provisioned through platform bootstrap, managed by admins, and suspended or re-activated under governance. Its tenancy is fixed at creation — an application cannot be re-parented to another organization.',\n audience: LabelAudience.ADMIN,\n subDomain: EngineResourceSubDomain.APPLICATIONS,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'ApplicationSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactory: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'applicationResourceConfiguration_InitializationFactory',\n symbolKind: CodeSymbolKind.FACTORY,\n declarationKind: CodeDeclarationKind.FUNCTION,\n },\n resourceType: {\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceType',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n memberName: 'APPLICATION',\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 // No `customEnum`: `APPLICATION` declares no custom operations. TRANSFER, ACTIVATE and\n // SUSPEND were all removed on 2026-08-01 (see businessConstraints), emptying the\n // `Application_Operations` enum, which was deleted with them.\n },\n frontendConfigurationSources: [\n {\n packageName: '@wildo-ai/presets-components',\n exportName: 'applicationMainApplicationResourceUIBehavior',\n symbolKind: CodeSymbolKind.UI_BEHAVIOR,\n },\n {\n packageName: '@wildo-ai/presets-components',\n exportName: 'applicationAdminApplicationResourceUIBehavior',\n symbolKind: CodeSymbolKind.UI_BEHAVIOR,\n },\n ],\n },\n fields: {\n appDisplayName: schemaShape.appDisplayName.stringSpec({\n meaning: 'Operator-facing name shown in org and platform consoles.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n appSlug: schemaShape.appSlug.stringSpec({\n meaning: 'Immutable routing key and DNS-safe identifier for the app install.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n lastVersion: schemaShape.lastVersion.stringSpec({ meaning: 'Most recent published semver for this application. Read-only on the API (excluded from create and update); it is written by platform provisioning, not by application traffic, and is absent until provisioning sets it.' }),\n },\n operations: {\n [Op.READ]: {\n purpose: 'Members read a lightweight about row; app admins read the full row; platform admins use `admin` variants.',\n outcome: 'Clients hydrate shell chrome and about surfaces.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The application row was found and the variant-appropriate projection (about row vs full record) is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No application exists for the supplied id in the caller’s scope.' },\n ],\n idempotent: true,\n },\n [Op.LIST]: {\n purpose: 'Paginated apps in org or platform directory views.',\n outcome: 'Rows for org multi-app and platform overviews.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of applications visible to the caller (org-scoped by default, all apps via the `admin` variant).' },\n ],\n idempotent: true,\n },\n [Op.SEARCH]: {\n purpose: 'Filter apps by display name, slug, or health metadata where indexed.',\n outcome: 'Matches for back-office and org admin tools.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of applications matching the display-name/slug query in the caller’s scope.' },\n ],\n idempotent: true,\n },\n [Op.CREATE]: {\n purpose: 'Provision a new app under an org or for a customer in platform mode.',\n outcome: 'New `APPLICATION` and downstream bootstrap hooks.',\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'The application was provisioned under the org and is returned with its server-assigned id and slug.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The display name or slug payload fails schema validation.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is neither an org admin (for their own org) nor a platform super-admin (for any org); app provisioning is admin gated.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The requested `appSlug` is already taken — slugs are immutable routing keys and must be unique.' },\n ],\n idempotent: false,\n examples: [\n {\n title: 'Provision a new application',\n request: {\n appDisplayName: 'Wonder Todos',\n appSlug: 'wonder-todos',\n },\n response: {\n appDisplayName: 'Wonder Todos',\n appSlug: 'wonder-todos',\n lastVersion: null,\n },\n forStatus: HttpResponseStatusCode.CREATED_201,\n },\n ],\n },\n [Op.UPDATE]: {\n purpose: 'Change display name or mutable metadata; slug remains immutable in normal flows.',\n outcome: 'Updated copy and routing for dependent services.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The mutable application fields were updated and the new state is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The edited fields fail schema validation (e.g. attempting to mutate the immutable slug).', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an org admin (or platform super-admin) for this application; edits are admin gated.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No application exists for the supplied id in the caller’s scope.' },\n ],\n idempotent: true,\n },\n [Op.DELETE]: {\n purpose: 'Remove an application record and cascade per registry (high risk).',\n outcome: 'Tombstone/soft delete varies by product policy.',\n responseStatuses: [\n { code: HttpResponseStatusCode.NO_CONTENT_204, meaning: 'The application (and its composed children) were removed per the registry cascade; no body is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an org admin (or platform super-admin) for this application; this is a critical-risk admin-gated operation.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'Both variants declare `requiresStepUpAuthentication`, and the request carried no valid single-use re-authentication token. Obtain one from the re-authentication route and retry with it — an application is a top-level scope, so its deletion destroys everything scoped beneath it and a live session alone is deliberately not sufficient.', errorCode: 'STEP_UP_REQUIRED' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No application exists for the supplied id (or it was already deleted).' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'Product policy blocks the delete because the application has dependents that cannot be cascaded automatically (e.g. it is still active or has bound infrastructure).' },\n ],\n idempotent: true,\n },\n },\n businessConstraints: [\n '`APPLICATION` is the self-anchor for `APPLICATION` primary scope; align the declared `resourcePrimaryScope` with the registry for companion prompts.',\n 'Cross-organization application transfer is intentionally NOT a framework capability. A `TRANSFER` operation was declared here in two variants and removed on 2026-08-01: it was routed but wrote nothing, and the move it named is incoherent in this model. `APPLICATION` is the self-anchored top-level scope — the application IS the tenant container and organizations are a sibling scope inside its tenancy — so there is no owning-organization field to re-point and no `ORGANIZATIONS → APPLICATION` relationship in the registry. This mirrors the framework’s refusal of cross-organization MEMBER transfer as a tenant-boundary crossing it does not sanction.',\n 'Application status lifecycle is intentionally NOT a framework capability. `ACTIVATE` and `SUSPEND` were declared here as super-admin verbs (each with a generated bulk variant) and removed on 2026-08-01: they were routed but wrote nothing, because this resource carries no lifecycle state to write. `APPLICATION` is an identity row (`appSlug`, `appDisplayName`, `lastVersion`, `platformAppId`); an application’s real operational state lives one tier up, at `PLATFORM_APPLICATIONS` / `Wildo_Application_Config`, managed by the platform apps-manager. Halting an application is a platform-tier action, not a field flip on the application’s own registry entry — and by ground 3 above, the suspending super-admin’s session lives inside the container being suspended. Re-declaring these verbs requires the per-organization application-ownership model first, not an `ApplicationStatus` field bolted on to satisfy two buttons.',\n ],\n }),\n { resourcePrimaryScope: ResourcePrimaryScope.APPLICATION },\n ),\n () => ({\n views: {\n [Op.READ]: {\n variants: {\n default: {\n purpose: 'Read-only \"about this app\" shell entry for end users in merged main preset.',\n whenToUse: 'In-app about drawer when org members cannot manage versions directly.',\n },\n admin: {\n purpose: 'App-admin and platform read for full fields and child relationships.',\n whenToUse: 'Admin area host surfaces (`application` preset wires metadata/versions as tabs in admin).',\n },\n },\n },\n [Op.LIST]: { purpose: 'Directory listing in admin and platform UIs (admin variants only in merged map).', whenToUse: 'Multi-app org view and support consoles.' },\n [Op.SEARCH]: { purpose: 'Search in admin and platform UIs for application discovery.', whenToUse: 'When many apps exist in one org or in global catalog.' },\n [Op.CREATE]: { purpose: 'App creation in admin and platform (merged preset adds `admin` variant addressability).', whenToUse: 'Onboarding a new app id under customer contract.' },\n [Op.UPDATE]: { purpose: 'Administrator edits the mutable fields on the `APPLICATION` row.', whenToUse: 'Rebranding, slug freeze exceptions, and support edits.' },\n [Op.DELETE]: { purpose: 'Destructive removal when policy allows a hard delete in admin flows.', whenToUse: 'Pilots, migrations, and contract exits.' },\n },\n }),\n);\n"]}
1
+ {"version":3,"file":"applications.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/applications/resources/applications.resource.specification.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,6CAA6C,IAAI,uBAAuB,EACxE,4CAA4C,IAAI,sBAAsB,GACvE,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAEpE,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,iBAAiB,EACjB,qBAAqB,IAAI,EAAE,EAC3B,oBAAoB,EACpB,sDAAsD,IAAI,mBAAmB,GAC9E,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,sBAAsB,EACtB,mCAAmC,EACnC,6BAA6B,EAC7B,qBAAqB,EACrB,8CAA8C,GAC/C,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAM3E,+FAA+F;AAC/F,mGAAmG;AACnG,MAAM,kBAAkB,GAAG,sBAAyE,CAAC;AACrG,MAAM,mBAAmB,GAAG,uBAA0E,CAAC;AAEvG,MAAM,CAAC,MAAM,iCAAiC,GAAG,8CAA8C,CAC7F,mCAAmC,CACjC,6BAA6B,CAAC,kBAAkB,CAAC,EACjD,6BAA6B,CAAC,mBAAmB,CAAC,CACnD,EACD,qBAA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EAAE,uDAAuD,EAAE;QAC3J,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE,yFAAyF,EAAE,SAAS,EAAE,kDAAkD,EAAE;QAClL,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE,kEAAkE,EAAE,SAAS,EAAE,wDAAwD,EAAE;QACjK,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE,sEAAsE,EAAE,SAAS,EAAE,yCAAyC,EAAE;KACvJ;CACF,CAAC,CACH,CAAC","sourcesContent":["import {\n applicationAdminApplicationResourceUIBehavior as applicationsAdminSource,\n applicationMainApplicationResourceUIBehavior as applicationsMainSource,\n} from '@wildo-ai/presets-components';\nimport { LabelAudience } from '@wildo-ai/presets-components-models';\nimport type { ResourceUIBehaviorConfig } from '@wildo-ai/saas-frontend-lib/companion';\nimport {\n CodeDeclarationKind,\n CodeSymbolKind,\n FieldSemanticImportance,\n} from '@wildo-ai/zod-decorators';\nimport {\n ApplicationSchema,\n CoreResourceOperation as Op,\n ResourcePrimaryScope,\n applicationResourceConfiguration_InitializationFactory as applicationsFactory,\n} from '@wildo-ai/saas-models';\nimport {\n HttpResponseStatusCode,\n mergeResourceFrontendConfigurations,\n resourceFrontendConfiguration,\n resourceSpecification,\n resourceSpecificationFromFrontendConfiguration,\n} from '~wildo-specifications/_core';\nimport { EngineResourceSubDomain } from '../../engine-resource-sub-domain';\n\ntype Cfg = ReturnType<typeof applicationsFactory>;\ntype Core = Cfg['coreOperations'][number];\ntype Main = Cfg['mainSchema'];\n\n// `undefined` custom-operation parameter: `APPLICATION` declares no custom operations (see the\n// operationVocabulary note below). Same shape as `application-metadata.resource.specification.ts`.\nconst applicationsMainUI = applicationsMainSource as ResourceUIBehaviorConfig<undefined, Core, Main>;\nconst applicationsAdminUI = applicationsAdminSource as ResourceUIBehaviorConfig<undefined, Core, Main>;\n\nexport const applicationsResourceSpecification = resourceSpecificationFromFrontendConfiguration(\n mergeResourceFrontendConfigurations(\n resourceFrontendConfiguration(applicationsMainUI),\n resourceFrontendConfiguration(applicationsAdminUI),\n ),\n resourceSpecification(\n applicationsFactory,\n ApplicationSchema,\n ({ schemaShape }) => ({\n purpose: 'The application\\'s own identity record: its slug, display name and how it is registered with the platform that hosts it.',\n businessRole: 'Anchor for all app-scoped entitlements, versions, and infrastructure configuration in the control plane.',\n lifecycleRole: 'Provisioned through platform bootstrap, managed by admins, and suspended or re-activated under governance. Its tenancy is fixed at creation — an application cannot be re-parented to another organization.',\n audience: LabelAudience.ADMIN,\n subDomain: EngineResourceSubDomain.APPLICATIONS,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'ApplicationSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactory: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'applicationResourceConfiguration_InitializationFactory',\n symbolKind: CodeSymbolKind.FACTORY,\n declarationKind: CodeDeclarationKind.FUNCTION,\n },\n resourceType: {\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceType',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n memberName: 'APPLICATION',\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 // No `customEnum`: `APPLICATION` declares no custom operations. TRANSFER, ACTIVATE and\n // SUSPEND were all removed on 2026-08-01 (see businessConstraints), emptying the\n // `Application_Operations` enum, which was deleted with them.\n },\n frontendConfigurationSources: [\n {\n packageName: '@wildo-ai/presets-components',\n exportName: 'applicationMainApplicationResourceUIBehavior',\n symbolKind: CodeSymbolKind.UI_BEHAVIOR,\n },\n {\n packageName: '@wildo-ai/presets-components',\n exportName: 'applicationAdminApplicationResourceUIBehavior',\n symbolKind: CodeSymbolKind.UI_BEHAVIOR,\n },\n ],\n },\n fields: {\n appDisplayName: schemaShape.appDisplayName.stringSpec({\n meaning: 'Operator-facing name shown in org and platform consoles.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n appSlug: schemaShape.appSlug.stringSpec({\n meaning: 'Immutable routing key and DNS-safe identifier for the app install.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n lastVersion: schemaShape.lastVersion.stringSpec({ meaning: 'Most recent published semver for this application. Read-only on the API (excluded from create and update); it is written by platform provisioning, not by application traffic, and is absent until provisioning sets it.' }),\n },\n operations: {\n [Op.READ]: {\n purpose: 'Members read a lightweight about row; app admins read the full row; platform admins use `admin` variants.',\n outcome: 'Clients hydrate shell chrome and about surfaces.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The application was found and the projection the variant asks for is returned — the short “about” view or the full record.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No application exists for the supplied id in the caller’s scope.' },\n ],\n idempotent: true,\n },\n [Op.LIST]: {\n purpose: 'Paginated apps in org or platform directory views.',\n outcome: 'Rows for org multi-app and platform overviews.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of applications visible to the caller (org-scoped by default, all apps via the `admin` variant).' },\n ],\n idempotent: true,\n },\n [Op.SEARCH]: {\n purpose: 'Filter apps by display name, slug, or health metadata where indexed.',\n outcome: 'Matches for back-office and org admin tools.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of applications matching the display-name/slug query in the caller’s scope.' },\n ],\n idempotent: true,\n },\n [Op.CREATE]: {\n purpose: 'Provision a new app under an org or for a customer in platform mode.',\n outcome: 'New `APPLICATION` and downstream bootstrap hooks.',\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'The application was provisioned under the org and is returned with its server-assigned id and slug.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The display name or slug payload fails schema validation.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is neither an org admin (for their own org) nor a platform super-admin (for any org); app provisioning is admin gated.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The requested `appSlug` is already taken — slugs are immutable routing keys and must be unique.' },\n ],\n idempotent: false,\n examples: [\n {\n title: 'Provision a new application',\n request: {\n appDisplayName: 'Wonder Todos',\n appSlug: 'wonder-todos',\n },\n response: {\n appDisplayName: 'Wonder Todos',\n appSlug: 'wonder-todos',\n lastVersion: null,\n },\n forStatus: HttpResponseStatusCode.CREATED_201,\n },\n ],\n },\n [Op.UPDATE]: {\n purpose: 'Change display name or mutable metadata; slug remains immutable in normal flows.',\n outcome: 'Updated copy and routing for dependent services.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The mutable application fields were updated and the new state is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The edited fields fail schema validation (e.g. attempting to mutate the immutable slug).', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an org admin (or platform super-admin) for this application; edits are admin gated.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No application exists for the supplied id in the caller’s scope.' },\n ],\n idempotent: true,\n },\n [Op.DELETE]: {\n purpose: 'Remove an application record and cascade per registry (high risk).',\n outcome: 'Tombstone/soft delete varies by product policy.',\n responseStatuses: [\n { code: HttpResponseStatusCode.NO_CONTENT_204, meaning: 'The application (and its composed children) were removed per the registry cascade; no body is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an org admin (or platform super-admin) for this application; this is a critical-risk admin-gated operation.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'Both variants declare `requiresStepUpAuthentication`, and the request carried no valid single-use re-authentication token. Obtain one from the re-authentication route and retry with it — an application is a top-level scope, so its deletion destroys everything scoped beneath it and a live session alone is deliberately not sufficient.', errorCode: 'STEP_UP_REQUIRED' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No application exists for the supplied id (or it was already deleted).' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'Product policy blocks the delete because the application has dependents that cannot be cascaded automatically (e.g. it is still active or has bound infrastructure).' },\n ],\n idempotent: true,\n },\n },\n businessConstraints: [\n '`APPLICATION` is the self-anchor for `APPLICATION` primary scope; align the declared `resourcePrimaryScope` with the registry for companion prompts.',\n 'Cross-organization application transfer is intentionally NOT a framework capability. A `TRANSFER` operation was declared here in two variants and removed on 2026-08-01: it was routed but wrote nothing, and the move it named is incoherent in this model. `APPLICATION` is the self-anchored top-level scope — the application IS the tenant container and organizations are a sibling scope inside its tenancy — so there is no owning-organization field to re-point and no `ORGANIZATIONS → APPLICATION` relationship in the registry. This mirrors the framework’s refusal of cross-organization MEMBER transfer as a tenant-boundary crossing it does not sanction.',\n 'Application status lifecycle is intentionally NOT a framework capability. `ACTIVATE` and `SUSPEND` were declared here as super-admin verbs (each with a generated bulk variant) and removed on 2026-08-01: they were routed but wrote nothing, because this resource carries no lifecycle state to write. `APPLICATION` is an identity row (`appSlug`, `appDisplayName`, `lastVersion`, `platformAppId`); an application’s real operational state lives one tier up, at `PLATFORM_APPLICATIONS` / `Wildo_Application_Config`, managed by the platform apps-manager. Halting an application is a platform-tier action, not a field flip on the application’s own registry entry — and by ground 3 above, the suspending super-admin’s session lives inside the container being suspended. Re-declaring these verbs requires the per-organization application-ownership model first, not an `ApplicationStatus` field bolted on to satisfy two buttons.',\n ],\n }),\n { resourcePrimaryScope: ResourcePrimaryScope.APPLICATION },\n ),\n () => ({\n views: {\n [Op.READ]: {\n variants: {\n default: {\n purpose: 'Read-only \"about this app\" shell entry for end users in merged main preset.',\n whenToUse: 'In-app about drawer when org members cannot manage versions directly.',\n },\n admin: {\n purpose: 'App-admin and platform read for full fields and child relationships.',\n whenToUse: 'Admin area host surfaces (`application` preset wires metadata/versions as tabs in admin).',\n },\n },\n },\n [Op.LIST]: { purpose: 'Directory listing in admin and platform UIs (admin variants only in merged map).', whenToUse: 'Multi-app org view and support consoles.' },\n [Op.SEARCH]: { purpose: 'Search in admin and platform UIs for application discovery.', whenToUse: 'When many apps exist in one org or in global catalog.' },\n [Op.CREATE]: { purpose: 'App creation in admin and platform (merged preset adds `admin` variant addressability).', whenToUse: 'Onboarding a new app id under customer contract.' },\n [Op.UPDATE]: { purpose: 'Administrator edits the mutable fields on the `APPLICATION` row.', whenToUse: 'Rebranding, slug freeze exceptions, and support edits.' },\n [Op.DELETE]: { purpose: 'Destructive removal when policy allows a hard delete in admin flows.', whenToUse: 'Pilots, migrations, and contract exits.' },\n },\n }),\n);\n"]}
@@ -84,7 +84,7 @@ ConsumableTokenSchemaBase, ({ schemaShape }) => ({
84
84
  },
85
85
  fields: {
86
86
  _id: schemaShape._id.stringSpec({
87
- meaning: 'Stable identifier of one issued token row.',
87
+ meaning: 'Stable identifier of one issued token record.',
88
88
  whyItMatters: 'It is what an operator addresses when revoking a specific issuance, and what a delivery record refers back to.',
89
89
  semanticRole: 'identifier',
90
90
  importance: FieldSemanticImportance.PRIMARY,
@@ -131,7 +131,7 @@ ConsumableTokenSchemaBase, ({ schemaShape }) => ({
131
131
  importance: FieldSemanticImportance.CONTEXTUAL,
132
132
  }),
133
133
  resourceIdentifier: schemaShape.resourceIdentifier.stringSpec({
134
- meaning: 'Names what `relatedId` points at, when what it points at is a resource row.',
134
+ meaning: 'Names what `relatedId` points at, when what it points at is a resource record.',
135
135
  whyItMatters: 'Without it a correlator holding an id says which id but not of what.',
136
136
  importance: FieldSemanticImportance.CONTEXTUAL,
137
137
  }),
@@ -176,7 +176,7 @@ ConsumableTokenSchemaBase, ({ schemaShape }) => ({
176
176
  importance: FieldSemanticImportance.CONTEXTUAL,
177
177
  }),
178
178
  updatedAt: schemaShape.updatedAt.dateSpec({
179
- meaning: 'When the row last changed.',
179
+ meaning: 'When the record last changed.',
180
180
  whyItMatters: 'For a settled token this is when it settled.',
181
181
  importance: FieldSemanticImportance.CONTEXTUAL,
182
182
  }),
@@ -1 +1 @@
1
- {"version":3,"file":"consumable-tokens.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/auth/resources/consumable-tokens.resource.specification.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,yBAAyB,EACzB,4DAA4D,IAAI,uBAAuB,GACxF,MAAM,oDAAoD,CAAC;AAC5D,OAAO,EAAE,+BAA+B,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC9F,OAAO,EAAuC,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACzG,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAE3E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,MAAM,CAAC,MAAM,qCAAqC,GAAmC,qBAAqB,CACxG,uBAAuB;AACvB;;;;;;GAMG;AACH,yBAAyB,EACzB,CAAC,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC,CAAC;IACpB,OAAO,EAAE,6OAA6O;IACtP,YAAY,EAAE,gPAAgP;IAC9P,aAAa,EAAE,4QAA4Q;IAC3R,QAAQ,EAAE,aAAa,CAAC,SAAS;IACjC,SAAS,EAAE,uBAAuB,CAAC,IAAI;IACvC,YAAY,EAAE;QACZ,UAAU,EAAE;YACV,WAAW,EAAE,4BAA4B;YACzC,UAAU,EAAE,uBAAuB;YACnC,UAAU,EAAE,cAAc,CAAC,MAAM;YACjC,eAAe,EAAE,mBAAmB,CAAC,UAAU;SAChD;QACD,eAAe,EAAE;YACf,WAAW,EAAE,4BAA4B;YACzC,UAA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KACH;CACF,CAAC;AACF;;;;;;GAMG;AACH,EAAE,oBAAoB,EAAE,oBAAoB,CAAC,WAAW,EAAE,CAC3D,CAAC","sourcesContent":["import { LabelAudience } from '@wildo-ai/presets-components-models';\nimport {\n CodeDeclarationKind,\n CodeSymbolKind,\n FieldSemanticImportance,\n} from '@wildo-ai/zod-decorators';\nimport {\n ConsumableTokenSchemaBase,\n consumableTokens_ResourceConfiguration_InitializationFactory as consumableTokensFactory,\n} from '@wildo-ai/saas-backend-lib/consumable-token-models';\nimport { ConsumableToken_ConsumptionMode, ResourcePrimaryScope } from '@wildo-ai/saas-models';\nimport { type AnyResourceSpecificationConfig, resourceSpecification } from '~wildo-specifications/_core';\nimport { EngineResourceSubDomain } from '../../engine-resource-sub-domain';\n\n/**\n * Framework-owned specification for `consumableTokens` — the one bearer secret the engine mints on a\n * user's behalf, and, until this file existed, the ONLY registered engine resource with no\n * specification at all.\n *\n * ## Why it was the last one, and how that surfaced\n *\n * `backend-resource-registry.exports.ts` had already written the prediction down: *\"`CONSUMABLE_TOKENS`\n * has the identical shape [to `dataSeedRuns`] and was orphan-free only because nobody had authored its\n * spec yet.\"* What made the omission visible rather than merely known was the domain-model graph\n * grouping the engine by `subDomain` — 84 of 85 resources fell into a named box and this one landed in\n * a box called `unclassified`, which is exactly what that box exists to make impossible to miss.\n *\n * ## Audience is DEVELOPER, and that is a decision\n *\n * A token row is never rendered to the person it authenticates: they receive a link or a code, and the\n * row behind it is read by an operator diagnosing why a reset link was refused. `END_USER` would make\n * the label generator write consumer copy for a table whose only reader is debugging an auth flow.\n *\n * ## What this spec does NOT say\n *\n * Nothing here describes how a token is minted, exchanged or revoked — that is\n * `ConsumableTokenBackendService`'s contract, and this resource's own CRUD surface is not how any flow\n * uses it. The field prose below explains what a persisted row MEANS, which is the question an operator\n * reading one actually has.\n *\n * WHY THE EXPLICIT TYPE ANNOTATION: the same reason `data-seed-runs.resource.specification.ts` records\n * at length. This resource's schema and factory come from `@wildo-ai/saas-backend-lib`, not\n * `@wildo-ai/saas-models`, so the inferred type is nameable only through a non-portable nested path and\n * declaration emit rejects it with TS2742. `AnyResourceSpecificationConfig` loses nothing at the only\n * consumption point — `engineResourceSpecificationsByType` is `Record<string, AnyResourceSpecificationConfig>`,\n * so the precise instantiation was already erased there.\n */\nexport const consumableTokensResourceSpecification: AnyResourceSpecificationConfig = resourceSpecification(\n consumableTokensFactory,\n /*\n * The BASE, not the discriminated union. `ConsumableTokenSchema` is the union over the three\n * consumption modes, and a union has no `shape` for the callback to hand back — which is also why\n * the resource configuration itself is built from the base. `maxUses` therefore has no field spec\n * here: it exists only on the BOUNDED_REUSE variant, and its meaning is carried by the\n * `consumptionMode` enum spec that decides whether it is present at all.\n */\n ConsumableTokenSchemaBase,\n ({ schemaShape }) => ({\n purpose: 'Hold one bearer secret the engine issued on a principal’s behalf — a password-reset link, an email verification, an invitation acceptance, an OTP — together with the conditions under which presenting it is still allowed to do anything.',\n businessRole: 'The engine’s single answer to \"is this link or code still good, who does it act for, and what may it authorize once?\" — so every flow that mints a secret shares one expiry, revocation and consumption contract instead of inventing its own.',\n lifecycleRole: 'Minted with an expiry and a consumption mode, then ends exactly once: consumed (single-use), exhausted (bounded reuse), revoked, or expired. A settled row is kept as evidence rather than deleted, so an operator can tell \"never issued\" from \"issued and already used\".',\n audience: LabelAudience.DEVELOPER,\n subDomain: EngineResourceSubDomain.AUTH,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-backend-lib',\n exportName: 'ConsumableTokenSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactory: {\n packageName: '@wildo-ai/saas-backend-lib',\n exportName: 'consumableTokens_ResourceConfiguration_InitializationFactory',\n symbolKind: CodeSymbolKind.FACTORY,\n declarationKind: CodeDeclarationKind.FUNCTION,\n },\n resourceType: {\n enumDeclaration: {\n packageName: '@wildo-ai/saas-backend-lib',\n exportName: 'BackendResourceType',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n memberName: 'CONSUMABLE_TOKENS',\n },\n operationVocabulary: {\n coreEnum: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceOperation',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n },\n\n fields: {\n _id: schemaShape._id.stringSpec({\n meaning: 'Stable identifier of one issued token row.',\n whyItMatters: 'It is what an operator addresses when revoking a specific issuance, and what a delivery record refers back to.',\n semanticRole: 'identifier',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n token: schemaShape.token.stringSpec({\n meaning: 'The secret itself — the value carried in the link or entered by the person.',\n whyItMatters: 'This field IS the credential, which is why it is declared as personal data of the credentials category and why the row is globally unique on it. Anything that can read this column can act as the principal the row names.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n tokenType: schemaShape.tokenType.stringSpec({\n meaning: 'Which flow issued this token — password reset, email verification, invitation, OTP, a file upload grant, and so on.',\n whyItMatters: 'It is the discriminator every consuming flow filters on, so a token minted for one purpose can never be redeemed by another.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n consumptionMode: schemaShape.consumptionMode.enumSpec({\n meaning: 'How many times presenting this token is allowed to succeed.',\n whyItMatters: 'It decides when the row settles, and it is the discriminator of the schema family: only BOUNDED_REUSE carries a maximum, so reading a use count without reading this first says nothing.',\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'ConsumableToken_ConsumptionMode',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n values: {\n [ConsumableToken_ConsumptionMode.SINGLE_USE]: { meaning: 'One successful presentation settles the token. The shape of a reset link or an invitation.' },\n [ConsumableToken_ConsumptionMode.BOUNDED_REUSE]: { meaning: 'Succeeds up to a declared maximum, then settles. The shape of an OTP a person may mistype.' },\n [ConsumableToken_ConsumptionMode.EPHEMERAL_STATE]: { meaning: 'Carries state across a redirect rather than authorizing an action; it expires rather than being consumed.' },\n },\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n userId: schemaShape.userId.stringSpec({\n meaning: 'The user this token acts on behalf of, when it acts for one.',\n whyItMatters: 'Optional because some flows mint before an identity exists — a phone verification keyed on the number, an invitation keyed on the membership.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n organizationId: schemaShape.organizationId.stringSpec({\n meaning: 'The tenant the token was issued within, when it was issued within one.',\n whyItMatters: 'It is what keeps a token minted in one tenant from being redeemed against another.',\n importance: FieldSemanticImportance.CONTEXTUAL,\n }),\n\n relatedId: schemaShape.relatedId.stringSpec({\n meaning: 'Whatever the issuing flow keys on: a membership id, a user id, or a phone number.',\n whyItMatters: 'Deliberately NOT a foreign key — the value set has no single target resource and its members are not all ids. Reading it as a reference is how phone-keyed tokens were made to fail on one database adapter and not the other.',\n importance: FieldSemanticImportance.CONTEXTUAL,\n }),\n\n resourceIdentifier: schemaShape.resourceIdentifier.stringSpec({\n meaning: 'Names what `relatedId` points at, when what it points at is a resource row.',\n whyItMatters: 'Without it a correlator holding an id says which id but not of what.',\n importance: FieldSemanticImportance.CONTEXTUAL,\n }),\n\n expiresAt: schemaShape.expiresAt.dateSpec({\n meaning: 'The moment after which presenting this token can no longer succeed.',\n whyItMatters: 'Every flow sets its own window, and this is the only field that ends a token nobody ever presents — so it is the first thing to read when a link \"stopped working\" with no consumption recorded.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n isConsumed: schemaShape.isConsumed.booleanSpec({\n meaning: 'Whether this token has settled and can no longer succeed.',\n whyItMatters: 'It is the difference between a link that was never used and one that already did its work — the distinction an operator is almost always trying to make.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n usesCount: schemaShape.usesCount.numberSpec({\n meaning: 'How many times this token has been successfully presented.',\n whyItMatters: 'Only meaningful against the consumption mode: under BOUNDED_REUSE it is read against the declared maximum, and under the other two a value above zero means the token is already settled.',\n importance: FieldSemanticImportance.CONTEXTUAL,\n }),\n\n revokedAt: schemaShape.revokedAt.dateSpec({\n meaning: 'When this token was withdrawn before it was used or expired.',\n whyItMatters: 'A revoked token and an expired one both refuse, and only this field says which happened — which is the difference between \"someone cancelled it\" and \"it timed out\".',\n importance: FieldSemanticImportance.CONTEXTUAL,\n }),\n\n activeGenerationKey: schemaShape.activeGenerationKey.stringSpec({\n meaning: 'A sparse unique slot held by the currently live issuance of a replace-existing token.',\n whyItMatters: 'It makes two concurrent \"resend\" attempts contend at the database boundary instead of minting two simultaneously valid links; consuming or revoking releases the slot.',\n importance: FieldSemanticImportance.CONTEXTUAL,\n }),\n\n createsOneOffSession: schemaShape.createsOneOffSession.booleanSpec({\n meaning: 'Whether redeeming this token establishes a short session rather than only authorizing one action.',\n whyItMatters: 'It is the token’s most powerful property and is deliberately unwritable through the resource CREATE and UPDATE pipelines — only the minting service sets it, which is what keeps the session-lifetime ceiling unbypassable.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n metadata: schemaShape.metadata.objectSpec({\n meaning: 'Free-form payload the issuing flow needs back when the token is redeemed.',\n whyItMatters: 'It is flow-defined and unvalidated by this resource, so its contents mean whatever the flow named in `tokenType` says they mean.',\n importance: FieldSemanticImportance.CONTEXTUAL,\n }),\n\n createdAt: schemaShape.createdAt.dateSpec({\n meaning: 'When the token was issued.',\n whyItMatters: 'Read against `expiresAt` it gives the window the issuing flow chose, which is how an unexpectedly short-lived link is diagnosed.',\n importance: FieldSemanticImportance.CONTEXTUAL,\n }),\n\n updatedAt: schemaShape.updatedAt.dateSpec({\n meaning: 'When the row last changed.',\n whyItMatters: 'For a settled token this is when it settled.',\n importance: FieldSemanticImportance.CONTEXTUAL,\n }),\n },\n }),\n /*\n * APPLICATION, from the relationship that declares it: `APPLICATION → CONSUMABLE_TOKENS` carries\n * `isPrimaryScope: true`, while the `ORGANIZATIONS` relationship beside it is OPTIONAL and\n * STANDALONE — a token may be issued inside a tenant and may equally be issued before one exists\n * (a signup verification, a phone check). Declaring the tenant as the scope would make the second\n * shape unrepresentable.\n */\n { resourcePrimaryScope: ResourcePrimaryScope.APPLICATION },\n);\n"]}
1
+ {"version":3,"file":"consumable-tokens.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/auth/resources/consumable-tokens.resource.specification.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,yBAAyB,EACzB,4DAA4D,IAAI,uBAAuB,GACxF,MAAM,oDAAoD,CAAC;AAC5D,OAAO,EAAE,+BAA+B,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC9F,OAAO,EAAuC,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACzG,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAE3E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,MAAM,CAAC,MAAM,qCAAqC,GAAmC,qBAAqB,CACxG,uBAAuB;AACvB;;;;;;GAMG;AACH,yBAAyB,EACzB,CAAC,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC,CAAC;IACpB,OAAO,EAAE,6OAA6O;IACtP,YAAY,EAAE,gPAAgP;IAC9P,aAAa,EAAE,4QAA4Q;IAC3R,QAAQ,EAAE,aAAa,CAAC,SAAS;IACjC,SAAS,EAAE,uBAAuB,CAAC,IAAI;IACvC,YAAY,EAAE;QACZ,UAAU,EAAE;YACV,WAAW,EAAE,4BAA4B;YACzC,UAAU,EAAE,uBAAuB;YACnC,UAAU,EAAE,cAAc,CAAC,MAAM;YACjC,eAAe,EAAE,mBAAmB,CAAC,UAAU;SAChD;QACD,eAAe,EAAE;YACf,WAAW,EAAE,4BAA4B;YACzC,UAAU,EAAE,8DAA8D;YAC1E,UAAU,EAAE,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,EAAE,oBAAoB,EAAE,oBAAoB,CAAC,WAAW,EAAE,CAC3D,CAAC","sourcesContent":["import { LabelAudience } from '@wildo-ai/presets-components-models';\nimport {\n CodeDeclarationKind,\n CodeSymbolKind,\n FieldSemanticImportance,\n} from '@wildo-ai/zod-decorators';\nimport {\n ConsumableTokenSchemaBase,\n consumableTokens_ResourceConfiguration_InitializationFactory as consumableTokensFactory,\n} from '@wildo-ai/saas-backend-lib/consumable-token-models';\nimport { ConsumableToken_ConsumptionMode, ResourcePrimaryScope } from '@wildo-ai/saas-models';\nimport { type AnyResourceSpecificationConfig, resourceSpecification } from '~wildo-specifications/_core';\nimport { EngineResourceSubDomain } from '../../engine-resource-sub-domain';\n\n/**\n * Framework-owned specification for `consumableTokens` — the one bearer secret the engine mints on a\n * user's behalf, and, until this file existed, the ONLY registered engine resource with no\n * specification at all.\n *\n * ## Why it was the last one, and how that surfaced\n *\n * `backend-resource-registry.exports.ts` had already written the prediction down: *\"`CONSUMABLE_TOKENS`\n * has the identical shape [to `dataSeedRuns`] and was orphan-free only because nobody had authored its\n * spec yet.\"* What made the omission visible rather than merely known was the domain-model graph\n * grouping the engine by `subDomain` — 84 of 85 resources fell into a named box and this one landed in\n * a box called `unclassified`, which is exactly what that box exists to make impossible to miss.\n *\n * ## Audience is DEVELOPER, and that is a decision\n *\n * A token row is never rendered to the person it authenticates: they receive a link or a code, and the\n * row behind it is read by an operator diagnosing why a reset link was refused. `END_USER` would make\n * the label generator write consumer copy for a table whose only reader is debugging an auth flow.\n *\n * ## What this spec does NOT say\n *\n * Nothing here describes how a token is minted, exchanged or revoked — that is\n * `ConsumableTokenBackendService`'s contract, and this resource's own CRUD surface is not how any flow\n * uses it. The field prose below explains what a persisted row MEANS, which is the question an operator\n * reading one actually has.\n *\n * WHY THE EXPLICIT TYPE ANNOTATION: the same reason `data-seed-runs.resource.specification.ts` records\n * at length. This resource's schema and factory come from `@wildo-ai/saas-backend-lib`, not\n * `@wildo-ai/saas-models`, so the inferred type is nameable only through a non-portable nested path and\n * declaration emit rejects it with TS2742. `AnyResourceSpecificationConfig` loses nothing at the only\n * consumption point — `engineResourceSpecificationsByType` is `Record<string, AnyResourceSpecificationConfig>`,\n * so the precise instantiation was already erased there.\n */\nexport const consumableTokensResourceSpecification: AnyResourceSpecificationConfig = resourceSpecification(\n consumableTokensFactory,\n /*\n * The BASE, not the discriminated union. `ConsumableTokenSchema` is the union over the three\n * consumption modes, and a union has no `shape` for the callback to hand back — which is also why\n * the resource configuration itself is built from the base. `maxUses` therefore has no field spec\n * here: it exists only on the BOUNDED_REUSE variant, and its meaning is carried by the\n * `consumptionMode` enum spec that decides whether it is present at all.\n */\n ConsumableTokenSchemaBase,\n ({ schemaShape }) => ({\n purpose: 'Hold one bearer secret the engine issued on a principal’s behalf — a password-reset link, an email verification, an invitation acceptance, an OTP — together with the conditions under which presenting it is still allowed to do anything.',\n businessRole: 'The engine’s single answer to \"is this link or code still good, who does it act for, and what may it authorize once?\" — so every flow that mints a secret shares one expiry, revocation and consumption contract instead of inventing its own.',\n lifecycleRole: 'Minted with an expiry and a consumption mode, then ends exactly once: consumed (single-use), exhausted (bounded reuse), revoked, or expired. A settled row is kept as evidence rather than deleted, so an operator can tell \"never issued\" from \"issued and already used\".',\n audience: LabelAudience.DEVELOPER,\n subDomain: EngineResourceSubDomain.AUTH,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-backend-lib',\n exportName: 'ConsumableTokenSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactory: {\n packageName: '@wildo-ai/saas-backend-lib',\n exportName: 'consumableTokens_ResourceConfiguration_InitializationFactory',\n symbolKind: CodeSymbolKind.FACTORY,\n declarationKind: CodeDeclarationKind.FUNCTION,\n },\n resourceType: {\n enumDeclaration: {\n packageName: '@wildo-ai/saas-backend-lib',\n exportName: 'BackendResourceType',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n memberName: 'CONSUMABLE_TOKENS',\n },\n operationVocabulary: {\n coreEnum: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceOperation',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n },\n\n fields: {\n _id: schemaShape._id.stringSpec({\n meaning: 'Stable identifier of one issued token record.',\n whyItMatters: 'It is what an operator addresses when revoking a specific issuance, and what a delivery record refers back to.',\n semanticRole: 'identifier',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n token: schemaShape.token.stringSpec({\n meaning: 'The secret itself — the value carried in the link or entered by the person.',\n whyItMatters: 'This field IS the credential, which is why it is declared as personal data of the credentials category and why the row is globally unique on it. Anything that can read this column can act as the principal the row names.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n tokenType: schemaShape.tokenType.stringSpec({\n meaning: 'Which flow issued this token — password reset, email verification, invitation, OTP, a file upload grant, and so on.',\n whyItMatters: 'It is the discriminator every consuming flow filters on, so a token minted for one purpose can never be redeemed by another.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n consumptionMode: schemaShape.consumptionMode.enumSpec({\n meaning: 'How many times presenting this token is allowed to succeed.',\n whyItMatters: 'It decides when the row settles, and it is the discriminator of the schema family: only BOUNDED_REUSE carries a maximum, so reading a use count without reading this first says nothing.',\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'ConsumableToken_ConsumptionMode',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n values: {\n [ConsumableToken_ConsumptionMode.SINGLE_USE]: { meaning: 'One successful presentation settles the token. The shape of a reset link or an invitation.' },\n [ConsumableToken_ConsumptionMode.BOUNDED_REUSE]: { meaning: 'Succeeds up to a declared maximum, then settles. The shape of an OTP a person may mistype.' },\n [ConsumableToken_ConsumptionMode.EPHEMERAL_STATE]: { meaning: 'Carries state across a redirect rather than authorizing an action; it expires rather than being consumed.' },\n },\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n userId: schemaShape.userId.stringSpec({\n meaning: 'The user this token acts on behalf of, when it acts for one.',\n whyItMatters: 'Optional because some flows mint before an identity exists — a phone verification keyed on the number, an invitation keyed on the membership.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n organizationId: schemaShape.organizationId.stringSpec({\n meaning: 'The tenant the token was issued within, when it was issued within one.',\n whyItMatters: 'It is what keeps a token minted in one tenant from being redeemed against another.',\n importance: FieldSemanticImportance.CONTEXTUAL,\n }),\n\n relatedId: schemaShape.relatedId.stringSpec({\n meaning: 'Whatever the issuing flow keys on: a membership id, a user id, or a phone number.',\n whyItMatters: 'Deliberately NOT a foreign key — the value set has no single target resource and its members are not all ids. Reading it as a reference is how phone-keyed tokens were made to fail on one database adapter and not the other.',\n importance: FieldSemanticImportance.CONTEXTUAL,\n }),\n\n resourceIdentifier: schemaShape.resourceIdentifier.stringSpec({\n meaning: 'Names what `relatedId` points at, when what it points at is a resource record.',\n whyItMatters: 'Without it a correlator holding an id says which id but not of what.',\n importance: FieldSemanticImportance.CONTEXTUAL,\n }),\n\n expiresAt: schemaShape.expiresAt.dateSpec({\n meaning: 'The moment after which presenting this token can no longer succeed.',\n whyItMatters: 'Every flow sets its own window, and this is the only field that ends a token nobody ever presents — so it is the first thing to read when a link \"stopped working\" with no consumption recorded.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n isConsumed: schemaShape.isConsumed.booleanSpec({\n meaning: 'Whether this token has settled and can no longer succeed.',\n whyItMatters: 'It is the difference between a link that was never used and one that already did its work — the distinction an operator is almost always trying to make.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n usesCount: schemaShape.usesCount.numberSpec({\n meaning: 'How many times this token has been successfully presented.',\n whyItMatters: 'Only meaningful against the consumption mode: under BOUNDED_REUSE it is read against the declared maximum, and under the other two a value above zero means the token is already settled.',\n importance: FieldSemanticImportance.CONTEXTUAL,\n }),\n\n revokedAt: schemaShape.revokedAt.dateSpec({\n meaning: 'When this token was withdrawn before it was used or expired.',\n whyItMatters: 'A revoked token and an expired one both refuse, and only this field says which happened — which is the difference between \"someone cancelled it\" and \"it timed out\".',\n importance: FieldSemanticImportance.CONTEXTUAL,\n }),\n\n activeGenerationKey: schemaShape.activeGenerationKey.stringSpec({\n meaning: 'A sparse unique slot held by the currently live issuance of a replace-existing token.',\n whyItMatters: 'It makes two concurrent \"resend\" attempts contend at the database boundary instead of minting two simultaneously valid links; consuming or revoking releases the slot.',\n importance: FieldSemanticImportance.CONTEXTUAL,\n }),\n\n createsOneOffSession: schemaShape.createsOneOffSession.booleanSpec({\n meaning: 'Whether redeeming this token establishes a short session rather than only authorizing one action.',\n whyItMatters: 'It is the token’s most powerful property and is deliberately unwritable through the resource CREATE and UPDATE pipelines — only the minting service sets it, which is what keeps the session-lifetime ceiling unbypassable.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n metadata: schemaShape.metadata.objectSpec({\n meaning: 'Free-form payload the issuing flow needs back when the token is redeemed.',\n whyItMatters: 'It is flow-defined and unvalidated by this resource, so its contents mean whatever the flow named in `tokenType` says they mean.',\n importance: FieldSemanticImportance.CONTEXTUAL,\n }),\n\n createdAt: schemaShape.createdAt.dateSpec({\n meaning: 'When the token was issued.',\n whyItMatters: 'Read against `expiresAt` it gives the window the issuing flow chose, which is how an unexpectedly short-lived link is diagnosed.',\n importance: FieldSemanticImportance.CONTEXTUAL,\n }),\n\n updatedAt: schemaShape.updatedAt.dateSpec({\n meaning: 'When the record last changed.',\n whyItMatters: 'For a settled token this is when it settled.',\n importance: FieldSemanticImportance.CONTEXTUAL,\n }),\n },\n }),\n /*\n * APPLICATION, from the relationship that declares it: `APPLICATION → CONSUMABLE_TOKENS` carries\n * `isPrimaryScope: true`, while the `ORGANIZATIONS` relationship beside it is OPTIONAL and\n * STANDALONE — a token may be issued inside a tenant and may equally be issued before one exists\n * (a signup verification, a phone check). Declaring the tenant as the scope would make the second\n * shape unrepresentable.\n */\n { resourcePrimaryScope: ResourcePrimaryScope.APPLICATION },\n);\n"]}
@@ -106,7 +106,7 @@ export const oauthConsentGrantsResourceSpecification = resourceSpecification(oau
106
106
  },
107
107
  fields: {
108
108
  _id: schemaShape._id.stringSpec({
109
- meaning: 'Identifier for one persistent consent grant row.',
109
+ meaning: 'Identifier for one persistent consent grant record.',
110
110
  whyItMatters: 'The revoke target when a user removes an authorized app.',
111
111
  semanticRole: 'identifier',
112
112
  importance: FieldSemanticImportance.PRIMARY,
@@ -1 +1 @@
1
- {"version":3,"file":"oauth-consent-grants.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/auth/resources/oauth-consent-grants.resource.specification.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,qBAAqB,IAAI,EAAE,EAC3B,uBAAuB,EACvB,oBAAoB,EACpB,6DAA6D,GAC9D,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAC5F,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAE3E,MAAM,8BAA8B,GAAG,gDAAgD,CAAC;AACxF,MAAM,mCAAmC,GAAG,gDAAgD,CAAC;AAC7F,MAAM,mCAAmC,GAAG,iCAAiC,CAAC;AAE9E,MAAM,kCAAkC,GAAG;IACzC,GAAG,EAAE,8BAA8B;IACnC,MAAM,EAAE,mCAAmC;IAC3C,QAAQ,EAAE,+BAA+B;IACzC,QAAQ,EAAE,4CAA4C;IACtD,MAAM,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,OAAO,CAAC;IACtC,SAAS,EAAE,0BAA0B;IACrC,SAAS,EAAE,0BAA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sourcesContent":["/**\n * Resource: `oauthConsentGrants` — Wildo SaaS engine specification (backend-managed, user-scoped).\n *\n * Inputs:\n * - Schema: engine/saas-models/src/security/oauth-clients/oauth-consent-grants.shared.schemas.ts → `OAuthConsentGrantSchema`\n * - Factory: engine/saas-models/src/security/oauth-clients/oauth-consent-grants.shared.resources-config.schemas.ts\n * → `oauthConsentGrantsResourceConfiguration_InitializationFactory`\n * - Custom operations: none\n * - UI presets: none (no engine `resourceUIBehavior` preset; the OIDC consent flow + a future\n * \"authorized apps\" settings surface consume the owner READ/LIST/DELETE API).\n */\n\nimport { LabelAudience } from '@wildo-ai/presets-components-models';\nimport {\n CodeDeclarationKind,\n CodeSymbolKind,\n FieldSemanticImportance,\n} from '@wildo-ai/zod-decorators';\nimport {\n CoreResourceOperation as Op,\n OAuthConsentGrantSchema,\n ResourcePrimaryScope,\n oauthConsentGrantsResourceConfiguration_InitializationFactory,\n} from '@wildo-ai/saas-models';\nimport { HttpResponseStatusCode, resourceSpecification } from '~wildo-specifications/_core';\nimport { EngineResourceSubDomain } from '../../engine-resource-sub-domain';\n\nconst OAUTH_CONSENT_GRANT_EXAMPLE_ID = 'oauth_consent_grant_01J4M2N8K3PX7Q9R5T6V0W1Y2Z';\nconst OAUTH_CONSENT_GRANT_OIDC_EXAMPLE_ID = 'oauth_consent_grant_01J4M2S1F8C6H7K9P0Q3R5T6V8';\nconst OAUTH_CONSENT_GRANT_EXAMPLE_USER_ID = 'user_01J4M1Z2X3C4V5B6N7M8Q9R0ST';\n\nconst oauthConsentGrantDelegationExample = {\n _id: OAUTH_CONSENT_GRANT_EXAMPLE_ID,\n userId: OAUTH_CONSENT_GRANT_EXAMPLE_USER_ID,\n clientId: 'oc_01J4M24B7N8Q9R0ST1V2W3X4YZ',\n resource: 'https://api.example.com/agents/procurement',\n scopes: ['openid', 'profile', 'email'],\n createdAt: '2026-08-18T09:30:00.000Z',\n updatedAt: '2026-08-18T09:30:00.000Z',\n};\n\nconst oauthConsentGrantOidcExample = {\n _id: OAUTH_CONSENT_GRANT_OIDC_EXAMPLE_ID,\n userId: OAUTH_CONSENT_GRANT_EXAMPLE_USER_ID,\n clientId: 'oc_01J4M28D2F3G4H5J6K7P8Q9R0S',\n scopes: ['openid', 'profile'],\n createdAt: '2026-08-17T14:05:00.000Z',\n updatedAt: '2026-08-17T14:05:00.000Z',\n};\n\nconst oauthConsentGrantDelegationSummaryExample = {\n _id: oauthConsentGrantDelegationExample._id,\n userId: oauthConsentGrantDelegationExample.userId,\n clientId: oauthConsentGrantDelegationExample.clientId,\n resource: oauthConsentGrantDelegationExample.resource,\n createdAt: oauthConsentGrantDelegationExample.createdAt,\n};\n\nconst oauthConsentGrantOidcSummaryExample = {\n _id: oauthConsentGrantOidcExample._id,\n userId: oauthConsentGrantOidcExample.userId,\n clientId: oauthConsentGrantOidcExample.clientId,\n createdAt: oauthConsentGrantOidcExample.createdAt,\n};\n\nconst OAUTH_CONSENT_GRANT_PAGE_REQUEST = {\n page: 1,\n limit: 20,\n sort: 'createdAt:desc',\n};\n\nfunction oauthConsentGrantPage<T>(data: readonly T[]) {\n return {\n data,\n pagination: {\n page: 1,\n limit: 20,\n total: data.length,\n totalPages: data.length === 0 ? 0 : 1,\n },\n };\n}\n\nexport const oauthConsentGrantsResourceSpecification = resourceSpecification(\n oauthConsentGrantsResourceConfiguration_InitializationFactory,\n OAuthConsentGrantSchema,\n ({ schemaShape }) => ({\n purpose: 'Record the third-party applications a signed-in user chose to remember after granting OIDC consent, so the application can avoid repeating an unchanged consent prompt.',\n businessRole: 'The user-facing \"authorized apps\" inventory: each grant identifies one registered OAuth client, the identity scopes the user approved and, when present, the RFC 8707 resource that delegation targets.',\n lifecycleRole: 'Created when the user approves an interactive consent request and chooses to remember the application, widened only after a later explicit approval, and retained until it expires or the user revokes it.',\n audience: LabelAudience.END_USER,\n subDomain: EngineResourceSubDomain.AUTH,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'OAuthConsentGrantSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactory: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'oauthConsentGrantsResourceConfiguration_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: 'OAUTH_CONSENT_GRANTS',\n },\n operationVocabulary: {\n coreEnum: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceOperation',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n notes: [\n 'READ/LIST/DELETE are owner-facing (API_CALL + APP_USER): the USER_SELF primary-scope filter restricts every result to the authenticated user\\'s own grants. CREATE/UPDATE are INTERNAL_CALL — the OIDC consent-decision endpoint is the sole writer via createAsSystem/updateAsSystem.',\n 'No `userNotifications` / `m2mNotifications` — granting or revoking consent is not an email/alert event.',\n ],\n },\n\n fields: {\n _id: schemaShape._id.stringSpec({\n meaning: 'Identifier for one persistent consent grant row.',\n whyItMatters: 'The revoke target when a user removes an authorized app.',\n semanticRole: 'identifier',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n userId: schemaShape.userId.foreignKeySpec({\n meaning: 'The Wildo user who granted consent — the USER_SELF scope owner.',\n whyItMatters: 'Scopes every read/list/delete to this user\\'s own grants and drives the cascade delete when the user is removed.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n clientId: schemaShape.clientId.stringSpec({\n meaning: 'The registered OAuth client the user authorized (its `_id`).',\n whyItMatters: 'Half of the grant identity — a grant authorizes exactly one client.',\n semanticRole: 'identifier',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n resource: schemaShape.resource.stringSpec({\n meaning: 'The RFC 8707 resource (target A2A/MCP agent endpoint) this grant covers; absent for an OIDC-only login.',\n whyItMatters: 'Part of the grant grain — consent to act at one agent endpoint does not extend to another; a different resource requires fresh consent.',\n semanticRole: 'uri',\n }),\n scopes: schemaShape.scopes.arraySpec({\n meaning: 'The identity scopes (e.g. openid, profile, email) the user granted this client.',\n whyItMatters: 'A later authorize whose requested scopes are a SUBSET of these skips the prompt; a request for a scope not in the grant re-prompts (no silent scope expansion).',\n elementMeaning: 'One granted OIDC identity scope string.',\n }),\n expiresAt: schemaShape.expiresAt.dateSpec({\n meaning: 'Optional expiry after which the grant is ignored (fail-closed to a fresh prompt). Unset in v1 — grants persist until revoked.',\n whyItMatters: 'Future-proofs an operator consent-TTL policy without a schema change.',\n temporalRole: 'expiration',\n }),\n createdAt: schemaShape.createdAt.dateSpec({\n meaning: 'When the grant was first stored.',\n whyItMatters: 'Ordering for the \"authorized apps\" list.',\n temporalRole: 'creation',\n }),\n updatedAt: schemaShape.updatedAt.dateSpec({\n meaning: 'When the approved scope set was last changed.',\n whyItMatters: 'Lets a user or support workflow distinguish the original approval from a later explicit scope expansion.',\n temporalRole: 'modified',\n }),\n },\n\n operations: {\n [Op.READ]: {\n purpose: 'Fetch one of the caller\\'s own consent grants.',\n outcome: 'The caller receives the authorized client, approved identity scopes, optional target resource and grant timestamps.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The caller\\'s own grant was found and returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The authenticated caller does not have the application-user authority required for this self-service API.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No grant with the supplied id is visible in the caller\\'s user-self scope; nonexistent and other users\\' grants are indistinguishable.' },\n ],\n idempotent: true,\n examples: [{\n title: 'Inspect a remembered agent delegation',\n request: { oauthConsentGrantId: OAUTH_CONSENT_GRANT_EXAMPLE_ID },\n response: oauthConsentGrantDelegationExample,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n variants: {\n context: {\n examples: [{\n title: 'Inspect the grant with available relationship context',\n request: { oauthConsentGrantId: OAUTH_CONSENT_GRANT_EXAMPLE_ID },\n response: oauthConsentGrantDelegationExample,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n summary: {\n examples: [{\n title: 'Inspect the compact grant summary',\n request: { oauthConsentGrantId: OAUTH_CONSENT_GRANT_EXAMPLE_ID },\n response: oauthConsentGrantDelegationSummaryExample,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n },\n [Op.LIST]: {\n purpose: 'List the caller\\'s own consent grants — the \"authorized apps\" surface.',\n outcome: 'The user sees every client they have authorized and can choose which to revoke.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) set of the caller\\'s own consent grants.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks APP_USER; a user may only list their own grants (never another user\\'s).' },\n ],\n idempotent: true,\n examples: [{\n title: 'List remembered applications and delegations',\n request: OAUTH_CONSENT_GRANT_PAGE_REQUEST,\n response: oauthConsentGrantPage([\n oauthConsentGrantDelegationExample,\n oauthConsentGrantOidcExample,\n ]),\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n variants: {\n context: {\n examples: [{\n title: 'List grants with available relationship context',\n request: OAUTH_CONSENT_GRANT_PAGE_REQUEST,\n response: oauthConsentGrantPage([\n oauthConsentGrantDelegationExample,\n oauthConsentGrantOidcExample,\n ]),\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n summary: {\n examples: [{\n title: 'List compact grant summaries',\n request: OAUTH_CONSENT_GRANT_PAGE_REQUEST,\n response: oauthConsentGrantPage([\n oauthConsentGrantDelegationSummaryExample,\n oauthConsentGrantOidcSummaryExample,\n ]),\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n },\n [Op.CREATE]: {\n purpose: 'Store a new grant when the user approves consent and opts to remember the app (system write from the consent-decision endpoint).',\n outcome: 'Subsequent authorize requests the grant covers skip the consent prompt.',\n whenToUse: 'Only from the OIDC consent-decision endpoint via createAsSystem — never a public create.',\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'A new consent grant is stored for the user + client + resource.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The grant payload fails schema validation.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'A non-system caller attempts a create (this resource has no public CREATE surface).' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'A grant already exists for this (user, client, resource) — a re-consent UPDATES the scopes instead.' },\n ],\n idempotent: false,\n },\n [Op.UPDATE]: {\n purpose: 'Widen a grant\\'s scopes when the user re-consents to the same client + resource with additional scopes (system write).',\n outcome: 'The stored grant reflects the newly approved scope set.',\n whenToUse: 'Only from the consent-decision endpoint via updateAsSystem.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The grant\\'s scopes were updated.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The updated scopes fail schema validation.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'A non-system caller attempts an update.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No grant exists for the supplied id.' },\n ],\n idempotent: true,\n },\n [Op.DELETE]: {\n purpose: 'Revoke one of the caller\\'s remembered application grants.',\n outcome: 'The client is re-prompted for consent on its next authorize request.',\n whenToUse: 'When the signed-in user no longer trusts the client or wants to review its requested scopes again on the next authorization.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.NO_CONTENT_204, meaning: 'The grant was revoked; the client must obtain fresh consent next time. No body.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The authenticated caller does not have the application-user authority required for this self-service API.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No grant with the supplied id is visible in the caller\\'s user-self scope; this includes grants that were already revoked.' },\n ],\n idempotent: true,\n examples: [{\n title: 'Revoke a remembered agent delegation',\n request: { oauthConsentGrantId: OAUTH_CONSENT_GRANT_EXAMPLE_ID },\n forStatus: HttpResponseStatusCode.NO_CONTENT_204,\n }],\n },\n },\n\n businessConstraints: [\n 'The uniqueness grain is `(userId, clientId, resource)` — one grant per client per resource; a re-consent updates that row rather than inserting a duplicate.',\n 'Consent-skip matching is scope-SUBSET: a stored grant lets `/oauth/authorize` skip the prompt only when the requested scopes are all already granted; a request for any new scope re-prompts (silent scope expansion is forbidden).',\n 'Scopes are identity-only and carry no authorization weight (authorization is roles-only); a consent grant records what the user agreed to disclose, not what the client may do.',\n ],\n }),\n { resourcePrimaryScope: ResourcePrimaryScope.USER_SELF },\n);\n"]}
1
+ {"version":3,"file":"oauth-consent-grants.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/auth/resources/oauth-consent-grants.resource.specification.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,qBAAqB,IAAI,EAAE,EAC3B,uBAAuB,EACvB,oBAAoB,EACpB,6DAA6D,GAC9D,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAC5F,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAE3E,MAAM,8BAA8B,GAAG,gDAAgD,CAAC;AACxF,MAAM,mCAAmC,GAAG,gDAAgD,CAAC;AAC7F,MAAM,mCAAmC,GAAG,iCAAiC,CAAC;AAE9E,MAAM,kCAAkC,GAAG;IACzC,GAAG,EAAE,8BAA8B;IACnC,M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BAAsB,CAAC,cAAc;iBACjD,CAAC;SACH;KACF;IAED,mBAAmB,EAAE;QACnB,8JAA8J;QAC9J,qOAAqO;QACrO,iLAAiL;KAClL;CACF,CAAC,EACF,EAAE,oBAAoB,EAAE,oBAAoB,CAAC,SAAS,EAAE,CACzD,CAAC","sourcesContent":["/**\n * Resource: `oauthConsentGrants` — Wildo SaaS engine specification (backend-managed, user-scoped).\n *\n * Inputs:\n * - Schema: engine/saas-models/src/security/oauth-clients/oauth-consent-grants.shared.schemas.ts → `OAuthConsentGrantSchema`\n * - Factory: engine/saas-models/src/security/oauth-clients/oauth-consent-grants.shared.resources-config.schemas.ts\n * → `oauthConsentGrantsResourceConfiguration_InitializationFactory`\n * - Custom operations: none\n * - UI presets: none (no engine `resourceUIBehavior` preset; the OIDC consent flow + a future\n * \"authorized apps\" settings surface consume the owner READ/LIST/DELETE API).\n */\n\nimport { LabelAudience } from '@wildo-ai/presets-components-models';\nimport {\n CodeDeclarationKind,\n CodeSymbolKind,\n FieldSemanticImportance,\n} from '@wildo-ai/zod-decorators';\nimport {\n CoreResourceOperation as Op,\n OAuthConsentGrantSchema,\n ResourcePrimaryScope,\n oauthConsentGrantsResourceConfiguration_InitializationFactory,\n} from '@wildo-ai/saas-models';\nimport { HttpResponseStatusCode, resourceSpecification } from '~wildo-specifications/_core';\nimport { EngineResourceSubDomain } from '../../engine-resource-sub-domain';\n\nconst OAUTH_CONSENT_GRANT_EXAMPLE_ID = 'oauth_consent_grant_01J4M2N8K3PX7Q9R5T6V0W1Y2Z';\nconst OAUTH_CONSENT_GRANT_OIDC_EXAMPLE_ID = 'oauth_consent_grant_01J4M2S1F8C6H7K9P0Q3R5T6V8';\nconst OAUTH_CONSENT_GRANT_EXAMPLE_USER_ID = 'user_01J4M1Z2X3C4V5B6N7M8Q9R0ST';\n\nconst oauthConsentGrantDelegationExample = {\n _id: OAUTH_CONSENT_GRANT_EXAMPLE_ID,\n userId: OAUTH_CONSENT_GRANT_EXAMPLE_USER_ID,\n clientId: 'oc_01J4M24B7N8Q9R0ST1V2W3X4YZ',\n resource: 'https://api.example.com/agents/procurement',\n scopes: ['openid', 'profile', 'email'],\n createdAt: '2026-08-18T09:30:00.000Z',\n updatedAt: '2026-08-18T09:30:00.000Z',\n};\n\nconst oauthConsentGrantOidcExample = {\n _id: OAUTH_CONSENT_GRANT_OIDC_EXAMPLE_ID,\n userId: OAUTH_CONSENT_GRANT_EXAMPLE_USER_ID,\n clientId: 'oc_01J4M28D2F3G4H5J6K7P8Q9R0S',\n scopes: ['openid', 'profile'],\n createdAt: '2026-08-17T14:05:00.000Z',\n updatedAt: '2026-08-17T14:05:00.000Z',\n};\n\nconst oauthConsentGrantDelegationSummaryExample = {\n _id: oauthConsentGrantDelegationExample._id,\n userId: oauthConsentGrantDelegationExample.userId,\n clientId: oauthConsentGrantDelegationExample.clientId,\n resource: oauthConsentGrantDelegationExample.resource,\n createdAt: oauthConsentGrantDelegationExample.createdAt,\n};\n\nconst oauthConsentGrantOidcSummaryExample = {\n _id: oauthConsentGrantOidcExample._id,\n userId: oauthConsentGrantOidcExample.userId,\n clientId: oauthConsentGrantOidcExample.clientId,\n createdAt: oauthConsentGrantOidcExample.createdAt,\n};\n\nconst OAUTH_CONSENT_GRANT_PAGE_REQUEST = {\n page: 1,\n limit: 20,\n sort: 'createdAt:desc',\n};\n\nfunction oauthConsentGrantPage<T>(data: readonly T[]) {\n return {\n data,\n pagination: {\n page: 1,\n limit: 20,\n total: data.length,\n totalPages: data.length === 0 ? 0 : 1,\n },\n };\n}\n\nexport const oauthConsentGrantsResourceSpecification = resourceSpecification(\n oauthConsentGrantsResourceConfiguration_InitializationFactory,\n OAuthConsentGrantSchema,\n ({ schemaShape }) => ({\n purpose: 'Record the third-party applications a signed-in user chose to remember after granting OIDC consent, so the application can avoid repeating an unchanged consent prompt.',\n businessRole: 'The user-facing \"authorized apps\" inventory: each grant identifies one registered OAuth client, the identity scopes the user approved and, when present, the RFC 8707 resource that delegation targets.',\n lifecycleRole: 'Created when the user approves an interactive consent request and chooses to remember the application, widened only after a later explicit approval, and retained until it expires or the user revokes it.',\n audience: LabelAudience.END_USER,\n subDomain: EngineResourceSubDomain.AUTH,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'OAuthConsentGrantSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactory: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'oauthConsentGrantsResourceConfiguration_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: 'OAUTH_CONSENT_GRANTS',\n },\n operationVocabulary: {\n coreEnum: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceOperation',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n notes: [\n 'READ/LIST/DELETE are owner-facing (API_CALL + APP_USER): the USER_SELF primary-scope filter restricts every result to the authenticated user\\'s own grants. CREATE/UPDATE are INTERNAL_CALL — the OIDC consent-decision endpoint is the sole writer via createAsSystem/updateAsSystem.',\n 'No `userNotifications` / `m2mNotifications` — granting or revoking consent is not an email/alert event.',\n ],\n },\n\n fields: {\n _id: schemaShape._id.stringSpec({\n meaning: 'Identifier for one persistent consent grant record.',\n whyItMatters: 'The revoke target when a user removes an authorized app.',\n semanticRole: 'identifier',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n userId: schemaShape.userId.foreignKeySpec({\n meaning: 'The Wildo user who granted consent — the USER_SELF scope owner.',\n whyItMatters: 'Scopes every read/list/delete to this user\\'s own grants and drives the cascade delete when the user is removed.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n clientId: schemaShape.clientId.stringSpec({\n meaning: 'The registered OAuth client the user authorized (its `_id`).',\n whyItMatters: 'Half of the grant identity — a grant authorizes exactly one client.',\n semanticRole: 'identifier',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n resource: schemaShape.resource.stringSpec({\n meaning: 'The RFC 8707 resource (target A2A/MCP agent endpoint) this grant covers; absent for an OIDC-only login.',\n whyItMatters: 'Part of the grant grain — consent to act at one agent endpoint does not extend to another; a different resource requires fresh consent.',\n semanticRole: 'uri',\n }),\n scopes: schemaShape.scopes.arraySpec({\n meaning: 'The identity scopes (e.g. openid, profile, email) the user granted this client.',\n whyItMatters: 'A later authorize whose requested scopes are a SUBSET of these skips the prompt; a request for a scope not in the grant re-prompts (no silent scope expansion).',\n elementMeaning: 'One granted OIDC identity scope string.',\n }),\n expiresAt: schemaShape.expiresAt.dateSpec({\n meaning: 'Optional expiry after which the grant is ignored (fail-closed to a fresh prompt). Unset in v1 — grants persist until revoked.',\n whyItMatters: 'Future-proofs an operator consent-TTL policy without a schema change.',\n temporalRole: 'expiration',\n }),\n createdAt: schemaShape.createdAt.dateSpec({\n meaning: 'When the grant was first stored.',\n whyItMatters: 'Ordering for the \"authorized apps\" list.',\n temporalRole: 'creation',\n }),\n updatedAt: schemaShape.updatedAt.dateSpec({\n meaning: 'When the approved scope set was last changed.',\n whyItMatters: 'Lets a user or support workflow distinguish the original approval from a later explicit scope expansion.',\n temporalRole: 'modified',\n }),\n },\n\n operations: {\n [Op.READ]: {\n purpose: 'Fetch one of the caller\\'s own consent grants.',\n outcome: 'The caller receives the authorized client, approved identity scopes, optional target resource and grant timestamps.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The caller\\'s own grant was found and returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The authenticated caller does not have the application-user authority required for this self-service API.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No grant with the supplied id is visible in the caller\\'s user-self scope; nonexistent and other users\\' grants are indistinguishable.' },\n ],\n idempotent: true,\n examples: [{\n title: 'Inspect a remembered agent delegation',\n request: { oauthConsentGrantId: OAUTH_CONSENT_GRANT_EXAMPLE_ID },\n response: oauthConsentGrantDelegationExample,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n variants: {\n context: {\n examples: [{\n title: 'Inspect the grant with available relationship context',\n request: { oauthConsentGrantId: OAUTH_CONSENT_GRANT_EXAMPLE_ID },\n response: oauthConsentGrantDelegationExample,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n summary: {\n examples: [{\n title: 'Inspect the compact grant summary',\n request: { oauthConsentGrantId: OAUTH_CONSENT_GRANT_EXAMPLE_ID },\n response: oauthConsentGrantDelegationSummaryExample,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n },\n [Op.LIST]: {\n purpose: 'List the caller\\'s own consent grants — the \"authorized apps\" surface.',\n outcome: 'The user sees every client they have authorized and can choose which to revoke.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) set of the caller\\'s own consent grants.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks APP_USER; a user may only list their own grants (never another user\\'s).' },\n ],\n idempotent: true,\n examples: [{\n title: 'List remembered applications and delegations',\n request: OAUTH_CONSENT_GRANT_PAGE_REQUEST,\n response: oauthConsentGrantPage([\n oauthConsentGrantDelegationExample,\n oauthConsentGrantOidcExample,\n ]),\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n variants: {\n context: {\n examples: [{\n title: 'List grants with available relationship context',\n request: OAUTH_CONSENT_GRANT_PAGE_REQUEST,\n response: oauthConsentGrantPage([\n oauthConsentGrantDelegationExample,\n oauthConsentGrantOidcExample,\n ]),\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n summary: {\n examples: [{\n title: 'List compact grant summaries',\n request: OAUTH_CONSENT_GRANT_PAGE_REQUEST,\n response: oauthConsentGrantPage([\n oauthConsentGrantDelegationSummaryExample,\n oauthConsentGrantOidcSummaryExample,\n ]),\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n },\n [Op.CREATE]: {\n purpose: 'Store a new grant when the user approves consent and opts to remember the app (system write from the consent-decision endpoint).',\n outcome: 'Subsequent authorize requests the grant covers skip the consent prompt.',\n whenToUse: 'Only from the OIDC consent-decision endpoint via createAsSystem — never a public create.',\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'A new consent grant is stored for the user + client + resource.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The grant payload fails schema validation.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'A non-system caller attempts a create (this resource has no public CREATE surface).' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'A grant already exists for this (user, client, resource) — a re-consent UPDATES the scopes instead.' },\n ],\n idempotent: false,\n },\n [Op.UPDATE]: {\n purpose: 'Widen a grant\\'s scopes when the user re-consents to the same client + resource with additional scopes (system write).',\n outcome: 'The stored grant reflects the newly approved scope set.',\n whenToUse: 'Only from the consent-decision endpoint via updateAsSystem.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The grant\\'s scopes were updated.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The updated scopes fail schema validation.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'A non-system caller attempts an update.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No grant exists for the supplied id.' },\n ],\n idempotent: true,\n },\n [Op.DELETE]: {\n purpose: 'Revoke one of the caller\\'s remembered application grants.',\n outcome: 'The client is re-prompted for consent on its next authorize request.',\n whenToUse: 'When the signed-in user no longer trusts the client or wants to review its requested scopes again on the next authorization.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.NO_CONTENT_204, meaning: 'The grant was revoked; the client must obtain fresh consent next time. No body.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The authenticated caller does not have the application-user authority required for this self-service API.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No grant with the supplied id is visible in the caller\\'s user-self scope; this includes grants that were already revoked.' },\n ],\n idempotent: true,\n examples: [{\n title: 'Revoke a remembered agent delegation',\n request: { oauthConsentGrantId: OAUTH_CONSENT_GRANT_EXAMPLE_ID },\n forStatus: HttpResponseStatusCode.NO_CONTENT_204,\n }],\n },\n },\n\n businessConstraints: [\n 'The uniqueness grain is `(userId, clientId, resource)` — one grant per client per resource; a re-consent updates that row rather than inserting a duplicate.',\n 'Consent-skip matching is scope-SUBSET: a stored grant lets `/oauth/authorize` skip the prompt only when the requested scopes are all already granted; a request for any new scope re-prompts (silent scope expansion is forbidden).',\n 'Scopes are identity-only and carry no authorization weight (authorization is roles-only); a consent grant records what the user agreed to disclose, not what the client may do.',\n ],\n }),\n { resourcePrimaryScope: ResourcePrimaryScope.USER_SELF },\n);\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"organization-api-keys.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/auth/resources/organization-api-keys.resource.specification.ts"],"names":[],"mappings":"AAWA,OAAO,EAEL,WAAW,EACX,YAAY,EACZ,cAAc,EACd,qBAAqB,IAAI,EAAE,EAC3B,qBAAqB,EAGtB,MAAM,uBAAuB,CAAC;AA4C/B,eAAO,MAAM,wCAAwC;;;;;;;;;;;;;;;;;iCAmfpD,CAAC"}
1
+ {"version":3,"file":"organization-api-keys.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/auth/resources/organization-api-keys.resource.specification.ts"],"names":[],"mappings":"AAWA,OAAO,EAEL,WAAW,EACX,YAAY,EACZ,cAAc,EACd,qBAAqB,IAAI,EAAE,EAC3B,qBAAqB,EAGtB,MAAM,uBAAuB,CAAC;AA4C/B,eAAO,MAAM,wCAAwC;;;;;;;;;;;;;;;;;iCA+fpD,CAAC"}
@@ -106,7 +106,7 @@ export const organizationApiKeysResourceSpecification = resourceSpecificationFro
106
106
  },
107
107
  }),
108
108
  keyPrefix: schemaShape.keyPrefix.stringSpec({
109
- meaning: 'Short public prefix of the key material for list rows and support correlation.',
109
+ meaning: 'Short public prefix of the key material for list records and support correlation.',
110
110
  }),
111
111
  roles: schemaShape.roles.arraySpec({
112
112
  meaning: 'Roles embedded on the key; every request authenticated with it inherits exactly these roles, bounding what the integration or automation user may do (least-privilege).',
@@ -303,6 +303,18 @@ export const organizationApiKeysResourceSpecification = resourceSpecificationFro
303
303
  forStatus: HttpResponseStatusCode.OK_200,
304
304
  }],
305
305
  },
306
+ /**
307
+ * INTERNAL_CALL, so this entry documents SEMANTICS and deliberately carries no HTTP
308
+ * response statuses, error scenarios or examples: there is no route to call and no
309
+ * response a consumer receives. Authoring a `200 OK` example here would document a door
310
+ * that does not exist, which is worse than the silence.
311
+ */
312
+ [OrgApiKeys_Operations.EXPIRE]: {
313
+ operationId: OrgApiKeys_Operations.EXPIRE,
314
+ purpose: 'Record that a key’s validity window has elapsed, so a listing shows it as expired rather than active.',
315
+ outcome: 'Status becomes expired. Nothing about authentication changes — the key already stopped working the instant its expiry passed.',
316
+ whenToUse: 'Never called directly. The nightly credential-expiry sweep dispatches it; an administrator who wants a key gone sooner deactivates it, and one who wants it to last longer extends its expiry.',
317
+ },
306
318
  [OrgApiKeys_Operations.DEACTIVATE]: {
307
319
  operationId: OrgApiKeys_Operations.DEACTIVATE,
308
320
  purpose: 'Turn off authentication for an active key without deleting its metadata.',