@wildo-ai/saas-specifications 1.1.1 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (423) hide show
  1. package/dist/assurance/external-framework-mapping.json +980 -0
  2. package/dist/esm/_core/brand/brand.family-aspects.d.ts +3 -0
  3. package/dist/esm/_core/brand/brand.family-aspects.d.ts.map +1 -0
  4. package/dist/esm/_core/brand/brand.family-aspects.js +51 -0
  5. package/dist/esm/_core/brand/brand.family-aspects.js.map +1 -0
  6. package/dist/esm/_core/build-plan/build-plan.family-aspects.d.ts +3 -0
  7. package/dist/esm/_core/build-plan/build-plan.family-aspects.d.ts.map +1 -0
  8. package/dist/esm/_core/build-plan/build-plan.family-aspects.js +28 -0
  9. package/dist/esm/_core/build-plan/build-plan.family-aspects.js.map +1 -0
  10. package/dist/esm/_core/business-model-lite/business-model.family-aspects.d.ts +3 -0
  11. package/dist/esm/_core/business-model-lite/business-model.family-aspects.d.ts.map +1 -0
  12. package/dist/esm/_core/business-model-lite/business-model.family-aspects.js +21 -0
  13. package/dist/esm/_core/business-model-lite/business-model.family-aspects.js.map +1 -0
  14. package/dist/esm/_core/chart-view-specification.schemas.d.ts +11 -0
  15. package/dist/esm/_core/chart-view-specification.schemas.d.ts.map +1 -1
  16. package/dist/esm/_core/chart-view-specification.schemas.js.map +1 -1
  17. package/dist/esm/_core/compliance-documents/compliance-document-candidate-generation.schemas.d.ts +85 -0
  18. package/dist/esm/_core/compliance-documents/compliance-document-candidate-generation.schemas.d.ts.map +1 -1
  19. package/dist/esm/_core/compliance-documents/compliance-document-candidate-generation.schemas.js +41 -0
  20. package/dist/esm/_core/compliance-documents/compliance-document-candidate-generation.schemas.js.map +1 -1
  21. package/dist/esm/_core/compliance-documents/compliance-document-candidate.schemas.d.ts +168 -2
  22. package/dist/esm/_core/compliance-documents/compliance-document-candidate.schemas.d.ts.map +1 -1
  23. package/dist/esm/_core/compliance-documents/compliance-document-candidate.schemas.js +98 -9
  24. package/dist/esm/_core/compliance-documents/compliance-document-candidate.schemas.js.map +1 -1
  25. package/dist/esm/_core/compliance-documents/compliance-documents.family-aspects.d.ts +12 -0
  26. package/dist/esm/_core/compliance-documents/compliance-documents.family-aspects.d.ts.map +1 -0
  27. package/dist/esm/_core/compliance-documents/compliance-documents.family-aspects.js +47 -0
  28. package/dist/esm/_core/compliance-documents/compliance-documents.family-aspects.js.map +1 -0
  29. package/dist/esm/_core/compliance-documents/document-fact-specification-generation.schemas.d.ts.map +1 -1
  30. package/dist/esm/_core/compliance-documents/document-fact-specification-generation.schemas.js +8 -3
  31. package/dist/esm/_core/compliance-documents/document-fact-specification-generation.schemas.js.map +1 -1
  32. package/dist/esm/_core/compliance-documents/processor-register.family-aspects.d.ts +21 -0
  33. package/dist/esm/_core/compliance-documents/processor-register.family-aspects.d.ts.map +1 -0
  34. package/dist/esm/_core/compliance-documents/processor-register.family-aspects.js +40 -0
  35. package/dist/esm/_core/compliance-documents/processor-register.family-aspects.js.map +1 -0
  36. package/dist/esm/_core/composite-view-specification.schemas.d.ts +11 -0
  37. package/dist/esm/_core/composite-view-specification.schemas.d.ts.map +1 -1
  38. package/dist/esm/_core/composite-view-specification.schemas.js.map +1 -1
  39. package/dist/esm/_core/domain-plan/domain-plan.family-aspects.d.ts +3 -0
  40. package/dist/esm/_core/domain-plan/domain-plan.family-aspects.d.ts.map +1 -0
  41. package/dist/esm/_core/domain-plan/domain-plan.family-aspects.js +32 -0
  42. package/dist/esm/_core/domain-plan/domain-plan.family-aspects.js.map +1 -0
  43. package/dist/esm/_core/execution-view-specification.schemas.d.ts +11 -0
  44. package/dist/esm/_core/execution-view-specification.schemas.d.ts.map +1 -1
  45. package/dist/esm/_core/execution-view-specification.schemas.js.map +1 -1
  46. package/dist/esm/_core/family-aspects.registry.d.ts +18 -0
  47. package/dist/esm/_core/family-aspects.registry.d.ts.map +1 -0
  48. package/dist/esm/_core/family-aspects.registry.js +60 -0
  49. package/dist/esm/_core/family-aspects.registry.js.map +1 -0
  50. package/dist/esm/_core/family-aspects.schemas.d.ts +122 -0
  51. package/dist/esm/_core/family-aspects.schemas.d.ts.map +1 -0
  52. package/dist/esm/_core/family-aspects.schemas.js +15 -0
  53. package/dist/esm/_core/family-aspects.schemas.js.map +1 -0
  54. package/dist/esm/_core/feature-drafts/capability-map-output-set-generation.schemas.d.ts +11 -11
  55. package/dist/esm/_core/feature-drafts/feature-drafts.family-aspects.d.ts +3 -0
  56. package/dist/esm/_core/feature-drafts/feature-drafts.family-aspects.d.ts.map +1 -0
  57. package/dist/esm/_core/feature-drafts/feature-drafts.family-aspects.js +25 -0
  58. package/dist/esm/_core/feature-drafts/feature-drafts.family-aspects.js.map +1 -0
  59. package/dist/esm/_core/flows-actors-view-specification.schemas.d.ts +11 -0
  60. package/dist/esm/_core/flows-actors-view-specification.schemas.d.ts.map +1 -1
  61. package/dist/esm/_core/flows-actors-view-specification.schemas.js.map +1 -1
  62. package/dist/esm/_core/frontend-component-specification.schemas.d.ts.map +1 -1
  63. package/dist/esm/_core/frontend-component-specification.schemas.js +19 -1
  64. package/dist/esm/_core/frontend-component-specification.schemas.js.map +1 -1
  65. package/dist/esm/_core/full-custom-view-specification.schemas.d.ts +11 -0
  66. package/dist/esm/_core/full-custom-view-specification.schemas.d.ts.map +1 -1
  67. package/dist/esm/_core/full-custom-view-specification.schemas.js.map +1 -1
  68. package/dist/esm/_core/guidance-flow-specification.schemas.d.ts +11 -0
  69. package/dist/esm/_core/guidance-flow-specification.schemas.d.ts.map +1 -1
  70. package/dist/esm/_core/guidance-flow-specification.schemas.js +14 -0
  71. package/dist/esm/_core/guidance-flow-specification.schemas.js.map +1 -1
  72. package/dist/esm/_core/index.d.ts +2 -0
  73. package/dist/esm/_core/index.d.ts.map +1 -1
  74. package/dist/esm/_core/index.js +2 -0
  75. package/dist/esm/_core/index.js.map +1 -1
  76. package/dist/esm/_core/market/market-snapshot-generation.schemas.d.ts +22 -22
  77. package/dist/esm/_core/market/market.family-aspects.d.ts +9 -0
  78. package/dist/esm/_core/market/market.family-aspects.d.ts.map +1 -0
  79. package/dist/esm/_core/market/market.family-aspects.js +227 -0
  80. package/dist/esm/_core/market/market.family-aspects.js.map +1 -0
  81. package/dist/esm/_core/onboarding-view-specification.schemas.d.ts +11 -0
  82. package/dist/esm/_core/onboarding-view-specification.schemas.d.ts.map +1 -1
  83. package/dist/esm/_core/onboarding-view-specification.schemas.js +14 -0
  84. package/dist/esm/_core/onboarding-view-specification.schemas.js.map +1 -1
  85. package/dist/esm/_core/placement-plan/placement-plan.family-aspects.d.ts +3 -0
  86. package/dist/esm/_core/placement-plan/placement-plan.family-aspects.d.ts.map +1 -0
  87. package/dist/esm/_core/placement-plan/placement-plan.family-aspects.js +31 -0
  88. package/dist/esm/_core/placement-plan/placement-plan.family-aspects.js.map +1 -0
  89. package/dist/esm/_core/requirements/requirements.family-aspects.d.ts +9 -0
  90. package/dist/esm/_core/requirements/requirements.family-aspects.d.ts.map +1 -0
  91. package/dist/esm/_core/requirements/requirements.family-aspects.js +40 -0
  92. package/dist/esm/_core/requirements/requirements.family-aspects.js.map +1 -0
  93. package/dist/esm/_core/resource-specification.schemas.d.ts +22 -0
  94. package/dist/esm/_core/resource-specification.schemas.d.ts.map +1 -1
  95. package/dist/esm/_core/resource-specification.schemas.js.map +1 -1
  96. package/dist/esm/_core/roadmap/roadmap.family-aspects.d.ts +3 -0
  97. package/dist/esm/_core/roadmap/roadmap.family-aspects.d.ts.map +1 -0
  98. package/dist/esm/_core/roadmap/roadmap.family-aspects.js +26 -0
  99. package/dist/esm/_core/roadmap/roadmap.family-aspects.js.map +1 -0
  100. package/dist/esm/_core/vision/vision.family-aspects.d.ts +11 -0
  101. package/dist/esm/_core/vision/vision.family-aspects.d.ts.map +1 -0
  102. package/dist/esm/_core/vision/vision.family-aspects.js +63 -0
  103. package/dist/esm/_core/vision/vision.family-aspects.js.map +1 -0
  104. package/dist/esm/application-creation/application-document-fact-specification.application-creation.schemas.d.ts +188 -33
  105. package/dist/esm/application-creation/application-document-fact-specification.application-creation.schemas.d.ts.map +1 -1
  106. package/dist/esm/application-creation/application-document-fact-specification.application-creation.schemas.js +158 -57
  107. package/dist/esm/application-creation/application-document-fact-specification.application-creation.schemas.js.map +1 -1
  108. package/dist/esm/application-creation/application-specification-family-identity.application-creation.schemas.d.ts +38 -4
  109. package/dist/esm/application-creation/application-specification-family-identity.application-creation.schemas.d.ts.map +1 -1
  110. package/dist/esm/application-creation/application-specification-family-identity.application-creation.schemas.js +37 -3
  111. package/dist/esm/application-creation/application-specification-family-identity.application-creation.schemas.js.map +1 -1
  112. package/dist/esm/application-creation/document-facts.family-aspects.d.ts +12 -0
  113. package/dist/esm/application-creation/document-facts.family-aspects.d.ts.map +1 -0
  114. package/dist/esm/application-creation/document-facts.family-aspects.js +37 -0
  115. package/dist/esm/application-creation/document-facts.family-aspects.js.map +1 -0
  116. package/dist/esm/application-creation/document-release-policy.family-aspects.d.ts +3 -0
  117. package/dist/esm/application-creation/document-release-policy.family-aspects.d.ts.map +1 -0
  118. package/dist/esm/application-creation/document-release-policy.family-aspects.js +23 -0
  119. package/dist/esm/application-creation/document-release-policy.family-aspects.js.map +1 -0
  120. package/dist/esm/application-creation/playbooks.application-creation.schemas.d.ts +93 -62
  121. package/dist/esm/application-creation/playbooks.application-creation.schemas.d.ts.map +1 -1
  122. package/dist/esm/application-creation/playbooks.application-creation.schemas.js +114 -59
  123. package/dist/esm/application-creation/playbooks.application-creation.schemas.js.map +1 -1
  124. package/dist/esm/application-creation/structured-artifact-landing.application-creation.schemas.d.ts +2 -0
  125. package/dist/esm/application-creation/structured-artifact-landing.application-creation.schemas.d.ts.map +1 -1
  126. package/dist/esm/application-creation/structured-artifact-landing.application-creation.schemas.js +2 -0
  127. package/dist/esm/application-creation/structured-artifact-landing.application-creation.schemas.js.map +1 -1
  128. package/dist/esm/application-creation.exports.d.ts +11 -0
  129. package/dist/esm/application-creation.exports.d.ts.map +1 -1
  130. package/dist/esm/application-creation.exports.js +11 -0
  131. package/dist/esm/application-creation.exports.js.map +1 -1
  132. package/dist/esm/assurance/assurance-authority-basis.definitions.d.ts +976 -2
  133. package/dist/esm/assurance/assurance-authority-basis.definitions.d.ts.map +1 -1
  134. package/dist/esm/assurance/assurance-authority-basis.definitions.js +2026 -61
  135. package/dist/esm/assurance/assurance-authority-basis.definitions.js.map +1 -1
  136. package/dist/esm/assurance/assurance-authority-basis.schemas.d.ts +1 -0
  137. package/dist/esm/assurance/assurance-authority-basis.schemas.d.ts.map +1 -1
  138. package/dist/esm/assurance/assurance-document-system.definitions.d.ts.map +1 -1
  139. package/dist/esm/assurance/assurance-document-system.definitions.js +18 -3
  140. package/dist/esm/assurance/assurance-document-system.definitions.js.map +1 -1
  141. package/dist/esm/assurance/assurance-document-system.schemas.d.ts +32 -2
  142. package/dist/esm/assurance/assurance-document-system.schemas.d.ts.map +1 -1
  143. package/dist/esm/assurance/assurance-document-system.schemas.js +32 -2
  144. package/dist/esm/assurance/assurance-document-system.schemas.js.map +1 -1
  145. package/dist/esm/assurance/assurance-external-framework-mapping.d.ts +90 -0
  146. package/dist/esm/assurance/assurance-external-framework-mapping.d.ts.map +1 -0
  147. package/dist/esm/assurance/assurance-external-framework-mapping.js +134 -0
  148. package/dist/esm/assurance/assurance-external-framework-mapping.js.map +1 -0
  149. package/dist/esm/assurance/assurance-objective-catalog.definitions.d.ts +71 -1
  150. package/dist/esm/assurance/assurance-objective-catalog.definitions.d.ts.map +1 -1
  151. package/dist/esm/assurance/assurance-objective-catalog.definitions.js +545 -5
  152. package/dist/esm/assurance/assurance-objective-catalog.definitions.js.map +1 -1
  153. package/dist/esm/assurance/assurance-program-generation.schemas.d.ts +141 -0
  154. package/dist/esm/assurance/assurance-program-generation.schemas.d.ts.map +1 -0
  155. package/dist/esm/assurance/assurance-program-generation.schemas.js +377 -0
  156. package/dist/esm/assurance/assurance-program-generation.schemas.js.map +1 -0
  157. package/dist/esm/assurance/assurance-program.family-aspects.d.ts +13 -0
  158. package/dist/esm/assurance/assurance-program.family-aspects.d.ts.map +1 -0
  159. package/dist/esm/assurance/assurance-program.family-aspects.js +16 -0
  160. package/dist/esm/assurance/assurance-program.family-aspects.js.map +1 -0
  161. package/dist/esm/assurance/assurance-program.schemas.d.ts +30 -6
  162. package/dist/esm/assurance/assurance-program.schemas.d.ts.map +1 -1
  163. package/dist/esm/assurance/assurance-program.schemas.js +29 -6
  164. package/dist/esm/assurance/assurance-program.schemas.js.map +1 -1
  165. package/dist/esm/assurance/assurance-source-registry.definitions.d.ts +1 -0
  166. package/dist/esm/assurance/assurance-source-registry.definitions.d.ts.map +1 -1
  167. package/dist/esm/assurance/assurance-source-registry.definitions.js +12 -0
  168. package/dist/esm/assurance/assurance-source-registry.definitions.js.map +1 -1
  169. package/dist/esm/assurance/assurance-sources.schemas.d.ts +76 -0
  170. package/dist/esm/assurance/assurance-sources.schemas.d.ts.map +1 -1
  171. package/dist/esm/assurance/assurance-sources.schemas.js +59 -0
  172. package/dist/esm/assurance/assurance-sources.schemas.js.map +1 -1
  173. package/dist/esm/assurance/document-publication.family-aspects.d.ts +29 -0
  174. package/dist/esm/assurance/document-publication.family-aspects.d.ts.map +1 -0
  175. package/dist/esm/assurance/document-publication.family-aspects.js +48 -0
  176. package/dist/esm/assurance/document-publication.family-aspects.js.map +1 -0
  177. package/dist/esm/assurance.exports.d.ts +2 -0
  178. package/dist/esm/assurance.exports.d.ts.map +1 -1
  179. package/dist/esm/assurance.exports.js +2 -0
  180. package/dist/esm/assurance.exports.js.map +1 -1
  181. package/dist/esm/companion-exports.d.ts +19 -2
  182. package/dist/esm/companion-exports.d.ts.map +1 -1
  183. package/dist/esm/companion-exports.js.map +1 -1
  184. package/dist/esm/engine/applications/resources/application-api-keys.resource.specification.d.ts.map +1 -1
  185. package/dist/esm/engine/applications/resources/application-api-keys.resource.specification.js +2 -0
  186. package/dist/esm/engine/applications/resources/application-api-keys.resource.specification.js.map +1 -1
  187. package/dist/esm/engine/applications/resources/application-metadata.resource.specification.d.ts.map +1 -1
  188. package/dist/esm/engine/applications/resources/application-metadata.resource.specification.js +3 -1
  189. package/dist/esm/engine/applications/resources/application-metadata.resource.specification.js.map +1 -1
  190. package/dist/esm/engine/applications/resources/application-oauth-clients.resource.specification.d.ts.map +1 -1
  191. package/dist/esm/engine/applications/resources/application-oauth-clients.resource.specification.js +3 -1
  192. package/dist/esm/engine/applications/resources/application-oauth-clients.resource.specification.js.map +1 -1
  193. package/dist/esm/engine/applications/resources/application-versions.resource.specification.d.ts.map +1 -1
  194. package/dist/esm/engine/applications/resources/application-versions.resource.specification.js +3 -1
  195. package/dist/esm/engine/applications/resources/application-versions.resource.specification.js.map +1 -1
  196. package/dist/esm/engine/applications/resources/applications.resource.specification.d.ts.map +1 -1
  197. package/dist/esm/engine/applications/resources/applications.resource.specification.js +3 -1
  198. package/dist/esm/engine/applications/resources/applications.resource.specification.js.map +1 -1
  199. package/dist/esm/engine/auth/resources/consumable-tokens.resource.specification.d.ts +36 -0
  200. package/dist/esm/engine/auth/resources/consumable-tokens.resource.specification.d.ts.map +1 -0
  201. package/dist/esm/engine/auth/resources/consumable-tokens.resource.specification.js +193 -0
  202. package/dist/esm/engine/auth/resources/consumable-tokens.resource.specification.js.map +1 -0
  203. package/dist/esm/engine/auth/resources/oauth-consent-grants.resource.specification.d.ts +1 -1
  204. package/dist/esm/engine/auth/resources/oauth-consent-grants.resource.specification.d.ts.map +1 -1
  205. package/dist/esm/engine/auth/resources/oauth-consent-grants.resource.specification.js +2 -0
  206. package/dist/esm/engine/auth/resources/oauth-consent-grants.resource.specification.js.map +1 -1
  207. package/dist/esm/engine/auth/resources/organization-api-keys.resource.specification.d.ts.map +1 -1
  208. package/dist/esm/engine/auth/resources/organization-api-keys.resource.specification.js +2 -0
  209. package/dist/esm/engine/auth/resources/organization-api-keys.resource.specification.js.map +1 -1
  210. package/dist/esm/engine/auth/resources/organization-oauth-clients.resource.specification.d.ts.map +1 -1
  211. package/dist/esm/engine/auth/resources/organization-oauth-clients.resource.specification.js +3 -1
  212. package/dist/esm/engine/auth/resources/organization-oauth-clients.resource.specification.js.map +1 -1
  213. package/dist/esm/engine/auth/resources/platform-access-grants.resource.specification.d.ts +1 -1
  214. package/dist/esm/engine/auth/resources/platform-access-grants.resource.specification.d.ts.map +1 -1
  215. package/dist/esm/engine/auth/resources/platform-access-grants.resource.specification.js +2 -0
  216. package/dist/esm/engine/auth/resources/platform-access-grants.resource.specification.js.map +1 -1
  217. package/dist/esm/engine/auth/resources/scim-provisioning-config.resource.specification.d.ts.map +1 -1
  218. package/dist/esm/engine/auth/resources/scim-provisioning-config.resource.specification.js +2 -0
  219. package/dist/esm/engine/auth/resources/scim-provisioning-config.resource.specification.js.map +1 -1
  220. package/dist/esm/engine/auth/resources/scim-tokens.resource.specification.d.ts.map +1 -1
  221. package/dist/esm/engine/auth/resources/scim-tokens.resource.specification.js +2 -0
  222. package/dist/esm/engine/auth/resources/scim-tokens.resource.specification.js.map +1 -1
  223. package/dist/esm/engine/auth/resources/siem-delivery-dlq.resource.specification.d.ts.map +1 -1
  224. package/dist/esm/engine/auth/resources/siem-delivery-dlq.resource.specification.js +2 -0
  225. package/dist/esm/engine/auth/resources/siem-delivery-dlq.resource.specification.js.map +1 -1
  226. package/dist/esm/engine/auth/resources/siem-export-config.resource.specification.d.ts.map +1 -1
  227. package/dist/esm/engine/auth/resources/siem-export-config.resource.specification.js +6 -4
  228. package/dist/esm/engine/auth/resources/siem-export-config.resource.specification.js.map +1 -1
  229. package/dist/esm/engine/auth/resources/sso-config.resource.specification.d.ts.map +1 -1
  230. package/dist/esm/engine/auth/resources/sso-config.resource.specification.js +2 -0
  231. package/dist/esm/engine/auth/resources/sso-config.resource.specification.js.map +1 -1
  232. package/dist/esm/engine/auth/resources/sso-connections.resource.specification.d.ts.map +1 -1
  233. package/dist/esm/engine/auth/resources/sso-connections.resource.specification.js +2 -0
  234. package/dist/esm/engine/auth/resources/sso-connections.resource.specification.js.map +1 -1
  235. package/dist/esm/engine/billing/resources/billing-accounts.resource.specification.d.ts +2 -2
  236. package/dist/esm/engine/billing/resources/billing-accounts.resource.specification.d.ts.map +1 -1
  237. package/dist/esm/engine/billing/resources/billing-accounts.resource.specification.js +2 -0
  238. package/dist/esm/engine/billing/resources/billing-accounts.resource.specification.js.map +1 -1
  239. package/dist/esm/engine/billing/resources/credit-pools.resource.specification.d.ts +8 -8
  240. package/dist/esm/engine/billing/resources/credit-pools.resource.specification.d.ts.map +1 -1
  241. package/dist/esm/engine/billing/resources/credit-pools.resource.specification.js +2 -0
  242. package/dist/esm/engine/billing/resources/credit-pools.resource.specification.js.map +1 -1
  243. package/dist/esm/engine/billing/resources/invoice-refs.resource.specification.d.ts +2 -2
  244. package/dist/esm/engine/billing/resources/invoice-refs.resource.specification.d.ts.map +1 -1
  245. package/dist/esm/engine/billing/resources/invoice-refs.resource.specification.js +2 -0
  246. package/dist/esm/engine/billing/resources/invoice-refs.resource.specification.js.map +1 -1
  247. package/dist/esm/engine/billing/resources/prices.resource.specification.d.ts.map +1 -1
  248. package/dist/esm/engine/billing/resources/prices.resource.specification.js +3 -1
  249. package/dist/esm/engine/billing/resources/prices.resource.specification.js.map +1 -1
  250. package/dist/esm/engine/billing/resources/products.resource.specification.d.ts.map +1 -1
  251. package/dist/esm/engine/billing/resources/products.resource.specification.js +3 -1
  252. package/dist/esm/engine/billing/resources/products.resource.specification.js.map +1 -1
  253. package/dist/esm/engine/billing/resources/promotions.resource.specification.d.ts.map +1 -1
  254. package/dist/esm/engine/billing/resources/promotions.resource.specification.js +2 -0
  255. package/dist/esm/engine/billing/resources/promotions.resource.specification.js.map +1 -1
  256. package/dist/esm/engine/billing/resources/referrals.resource.specification.d.ts.map +1 -1
  257. package/dist/esm/engine/billing/resources/referrals.resource.specification.js +3 -1
  258. package/dist/esm/engine/billing/resources/referrals.resource.specification.js.map +1 -1
  259. package/dist/esm/engine/billing/resources/subscriptions.resource.specification.d.ts +6 -6
  260. package/dist/esm/engine/billing/resources/subscriptions.resource.specification.d.ts.map +1 -1
  261. package/dist/esm/engine/billing/resources/subscriptions.resource.specification.js +2 -0
  262. package/dist/esm/engine/billing/resources/subscriptions.resource.specification.js.map +1 -1
  263. package/dist/esm/engine/billing/resources/usage-records.resource.specification.d.ts +6 -6
  264. package/dist/esm/engine/billing/resources/usage-records.resource.specification.d.ts.map +1 -1
  265. package/dist/esm/engine/billing/resources/usage-records.resource.specification.js +2 -0
  266. package/dist/esm/engine/billing/resources/usage-records.resource.specification.js.map +1 -1
  267. package/dist/esm/engine/compliance/resources/audit-logs.resource.specification.d.ts.map +1 -1
  268. package/dist/esm/engine/compliance/resources/audit-logs.resource.specification.js +2 -0
  269. package/dist/esm/engine/compliance/resources/audit-logs.resource.specification.js.map +1 -1
  270. package/dist/esm/engine/engine-resource-specifications.registry.d.ts.map +1 -1
  271. package/dist/esm/engine/engine-resource-specifications.registry.js +5 -0
  272. package/dist/esm/engine/engine-resource-specifications.registry.js.map +1 -1
  273. package/dist/esm/engine/engine-resource-sub-domain.d.ts +63 -0
  274. package/dist/esm/engine/engine-resource-sub-domain.d.ts.map +1 -0
  275. package/dist/esm/engine/engine-resource-sub-domain.js +87 -0
  276. package/dist/esm/engine/engine-resource-sub-domain.js.map +1 -0
  277. package/dist/esm/engine/errors/error-messages.specification.d.ts.map +1 -1
  278. package/dist/esm/engine/errors/error-messages.specification.js +30 -1
  279. package/dist/esm/engine/errors/error-messages.specification.js.map +1 -1
  280. package/dist/esm/engine/features/resources/application-features.resource.specification.d.ts.map +1 -1
  281. package/dist/esm/engine/features/resources/application-features.resource.specification.js +2 -0
  282. package/dist/esm/engine/features/resources/application-features.resource.specification.js.map +1 -1
  283. package/dist/esm/engine/features/resources/organization-features.resource.specification.d.ts.map +1 -1
  284. package/dist/esm/engine/features/resources/organization-features.resource.specification.js +2 -0
  285. package/dist/esm/engine/features/resources/organization-features.resource.specification.js.map +1 -1
  286. package/dist/esm/engine/features/resources/user-features.resource.specification.d.ts +1 -1
  287. package/dist/esm/engine/features/resources/user-features.resource.specification.d.ts.map +1 -1
  288. package/dist/esm/engine/features/resources/user-features.resource.specification.js +2 -0
  289. package/dist/esm/engine/features/resources/user-features.resource.specification.js.map +1 -1
  290. package/dist/esm/engine/files/resources/files.resource.specification.d.ts.map +1 -1
  291. package/dist/esm/engine/files/resources/files.resource.specification.js +2 -0
  292. package/dist/esm/engine/files/resources/files.resource.specification.js.map +1 -1
  293. package/dist/esm/engine/flows-actors/resources/a2a-push-delivery-log.resource.specification.d.ts +3 -3
  294. package/dist/esm/engine/flows-actors/resources/a2a-push-delivery-log.resource.specification.d.ts.map +1 -1
  295. package/dist/esm/engine/flows-actors/resources/a2a-push-delivery-log.resource.specification.js +12 -0
  296. package/dist/esm/engine/flows-actors/resources/a2a-push-delivery-log.resource.specification.js.map +1 -1
  297. package/dist/esm/engine/flows-actors/resources/a2a-token-budget-state.resource.specification.d.ts +3 -3
  298. package/dist/esm/engine/flows-actors/resources/a2a-token-budget-state.resource.specification.d.ts.map +1 -1
  299. package/dist/esm/engine/flows-actors/resources/a2a-token-budget-state.resource.specification.js +2 -0
  300. package/dist/esm/engine/flows-actors/resources/a2a-token-budget-state.resource.specification.js.map +1 -1
  301. package/dist/esm/engine/flows-actors/resources/flow-actor-executions.resource.specification.d.ts +3 -3
  302. package/dist/esm/engine/flows-actors/resources/flow-actor-executions.resource.specification.d.ts.map +1 -1
  303. package/dist/esm/engine/flows-actors/resources/flow-actor-executions.resource.specification.js +2 -0
  304. package/dist/esm/engine/flows-actors/resources/flow-actor-executions.resource.specification.js.map +1 -1
  305. package/dist/esm/engine/flows-actors/resources/flow-actor-tasks.resource.specification.d.ts +3 -3
  306. package/dist/esm/engine/flows-actors/resources/flow-actor-tasks.resource.specification.d.ts.map +1 -1
  307. package/dist/esm/engine/flows-actors/resources/flow-actor-tasks.resource.specification.js +3 -1
  308. package/dist/esm/engine/flows-actors/resources/flow-actor-tasks.resource.specification.js.map +1 -1
  309. package/dist/esm/engine/frontend-components/app/public-layout-main-container.frontend-component.specification.d.ts.map +1 -1
  310. package/dist/esm/engine/frontend-components/app/public-layout-main-container.frontend-component.specification.js +8 -3
  311. package/dist/esm/engine/frontend-components/app/public-layout-main-container.frontend-component.specification.js.map +1 -1
  312. package/dist/esm/engine/guidance/resources/guidance-state.resource.specification.d.ts +1 -1
  313. package/dist/esm/engine/guidance/resources/guidance-state.resource.specification.d.ts.map +1 -1
  314. package/dist/esm/engine/guidance/resources/guidance-state.resource.specification.js +3 -0
  315. package/dist/esm/engine/guidance/resources/guidance-state.resource.specification.js.map +1 -1
  316. package/dist/esm/engine/guidance/resources/lifecycle-state.resource.specification.d.ts +1 -1
  317. package/dist/esm/engine/guidance/resources/lifecycle-state.resource.specification.d.ts.map +1 -1
  318. package/dist/esm/engine/guidance/resources/lifecycle-state.resource.specification.js +3 -0
  319. package/dist/esm/engine/guidance/resources/lifecycle-state.resource.specification.js.map +1 -1
  320. package/dist/esm/engine/guidance/resources/progression-state.resource.specification.d.ts +1 -1
  321. package/dist/esm/engine/guidance/resources/progression-state.resource.specification.d.ts.map +1 -1
  322. package/dist/esm/engine/guidance/resources/progression-state.resource.specification.js +3 -0
  323. package/dist/esm/engine/guidance/resources/progression-state.resource.specification.js.map +1 -1
  324. package/dist/esm/engine/index.d.ts +1 -0
  325. package/dist/esm/engine/index.d.ts.map +1 -1
  326. package/dist/esm/engine/index.js +1 -0
  327. package/dist/esm/engine/index.js.map +1 -1
  328. package/dist/esm/engine/infrastructure/resources/data-seed-runs.resource.specification.d.ts.map +1 -1
  329. package/dist/esm/engine/infrastructure/resources/data-seed-runs.resource.specification.js +2 -0
  330. package/dist/esm/engine/infrastructure/resources/data-seed-runs.resource.specification.js.map +1 -1
  331. package/dist/esm/engine/infrastructure/resources/external-data-pipeline-states.resource.specification.d.ts.map +1 -1
  332. package/dist/esm/engine/infrastructure/resources/external-data-pipeline-states.resource.specification.js +2 -0
  333. package/dist/esm/engine/infrastructure/resources/external-data-pipeline-states.resource.specification.js.map +1 -1
  334. package/dist/esm/engine/infrastructure/resources/job-executions.resource.specification.d.ts.map +1 -1
  335. package/dist/esm/engine/infrastructure/resources/job-executions.resource.specification.js +2 -0
  336. package/dist/esm/engine/infrastructure/resources/job-executions.resource.specification.js.map +1 -1
  337. package/dist/esm/engine/infrastructure/resources/job-payload-storage.resource.specification.d.ts.map +1 -1
  338. package/dist/esm/engine/infrastructure/resources/job-payload-storage.resource.specification.js +2 -0
  339. package/dist/esm/engine/infrastructure/resources/job-payload-storage.resource.specification.js.map +1 -1
  340. package/dist/esm/engine/notifications/resources/m2m-webhook-delivery-log.resource.specification.d.ts.map +1 -1
  341. package/dist/esm/engine/notifications/resources/m2m-webhook-delivery-log.resource.specification.js +2 -0
  342. package/dist/esm/engine/notifications/resources/m2m-webhook-delivery-log.resource.specification.js.map +1 -1
  343. package/dist/esm/engine/notifications/resources/notification-badges.resource.specification.d.ts +1 -1
  344. package/dist/esm/engine/notifications/resources/notification-badges.resource.specification.d.ts.map +1 -1
  345. package/dist/esm/engine/notifications/resources/notification-badges.resource.specification.js +3 -0
  346. package/dist/esm/engine/notifications/resources/notification-badges.resource.specification.js.map +1 -1
  347. package/dist/esm/engine/notifications/resources/webhook-config.resource.specification.d.ts.map +1 -1
  348. package/dist/esm/engine/notifications/resources/webhook-config.resource.specification.js +2 -0
  349. package/dist/esm/engine/notifications/resources/webhook-config.resource.specification.js.map +1 -1
  350. package/dist/esm/engine/organizations/resources/organization-members.resource.specification.d.ts +1 -1
  351. package/dist/esm/engine/organizations/resources/organization-members.resource.specification.d.ts.map +1 -1
  352. package/dist/esm/engine/organizations/resources/organization-members.resource.specification.js +2 -0
  353. package/dist/esm/engine/organizations/resources/organization-members.resource.specification.js.map +1 -1
  354. package/dist/esm/engine/organizations/resources/organization-notifications.resource.specification.d.ts.map +1 -1
  355. package/dist/esm/engine/organizations/resources/organization-notifications.resource.specification.js +2 -0
  356. package/dist/esm/engine/organizations/resources/organization-notifications.resource.specification.js.map +1 -1
  357. package/dist/esm/engine/organizations/resources/organization-preferences.resource.specification.d.ts.map +1 -1
  358. package/dist/esm/engine/organizations/resources/organization-preferences.resource.specification.js +2 -0
  359. package/dist/esm/engine/organizations/resources/organization-preferences.resource.specification.js.map +1 -1
  360. package/dist/esm/engine/organizations/resources/organization-profiles.resource.specification.d.ts.map +1 -1
  361. package/dist/esm/engine/organizations/resources/organization-profiles.resource.specification.js +2 -0
  362. package/dist/esm/engine/organizations/resources/organization-profiles.resource.specification.js.map +1 -1
  363. package/dist/esm/engine/organizations/resources/organization-unit-members.resource.specification.d.ts.map +1 -1
  364. package/dist/esm/engine/organizations/resources/organization-unit-members.resource.specification.js +2 -0
  365. package/dist/esm/engine/organizations/resources/organization-unit-members.resource.specification.js.map +1 -1
  366. package/dist/esm/engine/organizations/resources/organization-units.resource.specification.d.ts.map +1 -1
  367. package/dist/esm/engine/organizations/resources/organization-units.resource.specification.js +2 -0
  368. package/dist/esm/engine/organizations/resources/organization-units.resource.specification.js.map +1 -1
  369. package/dist/esm/engine/organizations/resources/organizations.resource.specification.d.ts.map +1 -1
  370. package/dist/esm/engine/organizations/resources/organizations.resource.specification.js +2 -0
  371. package/dist/esm/engine/organizations/resources/organizations.resource.specification.js.map +1 -1
  372. package/dist/esm/engine/users/resources/anonymous-users.resource.specification.d.ts.map +1 -1
  373. package/dist/esm/engine/users/resources/anonymous-users.resource.specification.js +2 -0
  374. package/dist/esm/engine/users/resources/anonymous-users.resource.specification.js.map +1 -1
  375. package/dist/esm/engine/users/resources/inbound-contacts.resource.specification.d.ts +1 -1
  376. package/dist/esm/engine/users/resources/inbound-contacts.resource.specification.d.ts.map +1 -1
  377. package/dist/esm/engine/users/resources/inbound-contacts.resource.specification.js +2 -0
  378. package/dist/esm/engine/users/resources/inbound-contacts.resource.specification.js.map +1 -1
  379. package/dist/esm/engine/users/resources/user-credentials.resource.specification.d.ts +1 -1
  380. package/dist/esm/engine/users/resources/user-credentials.resource.specification.d.ts.map +1 -1
  381. package/dist/esm/engine/users/resources/user-credentials.resource.specification.js +2 -0
  382. package/dist/esm/engine/users/resources/user-credentials.resource.specification.js.map +1 -1
  383. package/dist/esm/engine/users/resources/user-identity-links.resource.specification.d.ts +1 -1
  384. package/dist/esm/engine/users/resources/user-identity-links.resource.specification.d.ts.map +1 -1
  385. package/dist/esm/engine/users/resources/user-identity-links.resource.specification.js +2 -0
  386. package/dist/esm/engine/users/resources/user-identity-links.resource.specification.js.map +1 -1
  387. package/dist/esm/engine/users/resources/user-preferences.resource.specification.d.ts +1 -1
  388. package/dist/esm/engine/users/resources/user-preferences.resource.specification.d.ts.map +1 -1
  389. package/dist/esm/engine/users/resources/user-preferences.resource.specification.js +2 -0
  390. package/dist/esm/engine/users/resources/user-preferences.resource.specification.js.map +1 -1
  391. package/dist/esm/engine/users/resources/user-profiles.resource.specification.d.ts +1 -1
  392. package/dist/esm/engine/users/resources/user-profiles.resource.specification.d.ts.map +1 -1
  393. package/dist/esm/engine/users/resources/user-profiles.resource.specification.js +2 -0
  394. package/dist/esm/engine/users/resources/user-profiles.resource.specification.js.map +1 -1
  395. package/dist/esm/engine/users/resources/user-self-preferences.resource.specification.d.ts +1 -1
  396. package/dist/esm/engine/users/resources/user-self-preferences.resource.specification.d.ts.map +1 -1
  397. package/dist/esm/engine/users/resources/user-self-preferences.resource.specification.js +2 -0
  398. package/dist/esm/engine/users/resources/user-self-preferences.resource.specification.js.map +1 -1
  399. package/dist/esm/engine/users/resources/user-self-profiles.resource.specification.d.ts +1 -1
  400. package/dist/esm/engine/users/resources/user-self-profiles.resource.specification.d.ts.map +1 -1
  401. package/dist/esm/engine/users/resources/user-self-profiles.resource.specification.js +2 -0
  402. package/dist/esm/engine/users/resources/user-self-profiles.resource.specification.js.map +1 -1
  403. package/dist/esm/engine/users/resources/user-self.resource.specification.d.ts.map +1 -1
  404. package/dist/esm/engine/users/resources/user-self.resource.specification.js +3 -1
  405. package/dist/esm/engine/users/resources/user-self.resource.specification.js.map +1 -1
  406. package/dist/esm/engine/users/resources/users.resource.specification.d.ts.map +1 -1
  407. package/dist/esm/engine/users/resources/users.resource.specification.js +2 -0
  408. package/dist/esm/engine/users/resources/users.resource.specification.js.map +1 -1
  409. package/dist/esm/technical-documentation/engine-documentation-specification-catalog.companion.d.ts +5 -0
  410. package/dist/esm/technical-documentation/engine-documentation-specification-catalog.companion.d.ts.map +1 -1
  411. package/dist/esm/technical-documentation/engine-documentation-specification-catalog.companion.js +385 -9
  412. package/dist/esm/technical-documentation/engine-documentation-specification-catalog.companion.js.map +1 -1
  413. package/dist/esm/technical-documentation/technical-documentation-units.schemas.js +1 -1
  414. package/dist/esm/technical-documentation/technical-documentation-units.schemas.js.map +1 -1
  415. package/dist/tsconfig.build.tsbuildinfo +1 -0
  416. package/package.json +8 -8
  417. package/dist/esm/.builder.pid +0 -9
  418. package/dist/esm/_core/business-coverage/coverage-findings-validation.d.ts +0 -0
  419. package/dist/esm/_core/business-coverage/coverage-findings-validation.d.ts.map +0 -0
  420. package/dist/esm/_core/business-coverage/coverage-findings-validation.js.map +0 -0
  421. package/dist/esm/_core/business-coverage/coverage-findings.schemas.d.ts +0 -0
  422. package/dist/esm/_core/business-coverage/coverage-findings.schemas.d.ts.map +0 -0
  423. package/dist/esm/_core/business-coverage/coverage-findings.schemas.js.map +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"organization-api-keys.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/auth/resources/organization-api-keys.resource.specification.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iCAAiC,IAAI,qBAAqB,EAC1D,gCAAgC,IAAI,oBAAoB,GACzD,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,wBAAwB,EACxB,WAAW,EACX,YAAY,EACZ,cAAc,EACd,qBAAqB,IAAI,EAAE,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F;QACD,CAAC,qBAAqB,CAAC,WAAW,CAAC,EAAE;YACnC,OAAO,EAAE,uFAAuF;YAChG,SAAS,EAAE,2DAA2D;YACtE,QAAQ,EAAE;gBACR,OAAO,EAAE,EAAE,OAAO,EAAE,4CAA4C,EAAE,SAAS,EAAE,0CAA0C,EAAE;gBACzH,KAAK,EAAE,EAAE,OAAO,EAAE,6CAA6C,EAAE,SAAS,EAAE,sCAAsC,EAAE;aACrH;SACF;KACF;CACF,CAAC,CACH,CAAC","sourcesContent":["import {\n orgApiKeysAdminResourceUIBehavior as orgApiKeysAdminSource,\n orgApiKeysMainResourceUIBehavior as orgApiKeysMainSource,\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 ApiKeyOrganizationSchema,\n ApiKeyScope,\n ApiKeyStatus,\n CORE_ORG_ROLES,\n CoreResourceOperation as Op,\n OrgApiKeys_Operations,\n ResourcePrimaryScope,\n orgApiKeysResourceConfiguration_InitializationFactory as orgApiKeysFactory,\n} from '@wildo-ai/saas-models';\nimport {\n HttpResponseStatusCode,\n mergeResourceFrontendConfigurations,\n resourceFrontendConfiguration,\n resourceSpecification,\n resourceSpecificationFromFrontendConfiguration,\n} from '~wildo-specifications/_core';\n\ntype Cfg = ReturnType<typeof orgApiKeysFactory>;\ntype Custom = NonNullable<Cfg['customOperation']>;\ntype Core = Cfg['coreOperations'][number];\ntype Main = Cfg['mainSchema'];\n\nconst orgApiKeysMainUIBehavior = orgApiKeysMainSource as ResourceUIBehaviorConfig<Custom, Core, Main>;\nconst orgApiKeysAdminUIBehavior = orgApiKeysAdminSource as ResourceUIBehaviorConfig<Custom, Core, Main>;\n\n/**\n * One schema-complete, non-secret record used by READ and collection examples.\n * Credential-issuing operations extend it with their one-time fields so the\n * OpenAPI examples cannot accidentally teach that `plainKey` is available on a\n * later READ.\n */\nconst ORGANIZATION_API_KEY_RECORD_EXAMPLE = {\n _id: 'orgkey_01JEXAMPLE',\n name: 'Production order sync',\n description: 'Least-privilege credential used by the order synchronization worker.',\n scope: ApiKeyScope.ORGANIZATION,\n roles: [CORE_ORG_ROLES.ORG_MEMBER],\n status: ApiKeyStatus.ACTIVE,\n expiresAt: '2099-01-01T00:00:00.000Z',\n lastUsedAt: '2026-08-18T09:42:12.000Z',\n createdAt: '2026-06-01T08:00:00.000Z',\n updatedAt: '2026-08-18T09:42:12.000Z',\n organizationId: 'org_01JEXAMPLE',\n keyPrefix: 'sk_org_a',\n} as const;\n\nconst ORGANIZATION_API_KEY_PAGE_EXAMPLE = {\n data: [ORGANIZATION_API_KEY_RECORD_EXAMPLE],\n pagination: { page: 1, limit: 20, total: 1, totalPages: 1 },\n} as const;\n\nexport const organizationApiKeysResourceSpecification = resourceSpecificationFromFrontendConfiguration(\n mergeResourceFrontendConfigurations(\n resourceFrontendConfiguration(orgApiKeysMainUIBehavior),\n resourceFrontendConfiguration(orgApiKeysAdminUIBehavior),\n ),\n resourceSpecification(\n orgApiKeysFactory,\n ApiKeyOrganizationSchema,\n ({ schemaShape }) => ({\n purpose: 'Organization-scoped API keys: secrets used by org administrators and integrations to call backend APIs in tenant context.',\n businessRole: 'First-class auth credential for automation and partner integrations, distinct from end-user sessions.',\n lifecycleRole: 'Created with optional expiry, then rotated, deactivated or deleted by organization administrators. Per-key request analytics are not currently recorded.',\n audience: LabelAudience.DEVELOPER,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'ApiKeyOrganizationSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactory: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'orgApiKeysResourceConfiguration_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: 'ORG_API_KEYS',\n },\n operationVocabulary: {\n coreEnum: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceOperation',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n customEnum: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'OrgApiKeys_Operations',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n frontendConfigurationSources: [\n {\n packageName: '@wildo-ai/presets-components',\n exportName: 'orgApiKeysMainResourceUIBehavior',\n symbolKind: CodeSymbolKind.UI_BEHAVIOR,\n },\n {\n packageName: '@wildo-ai/presets-components',\n exportName: 'orgApiKeysAdminResourceUIBehavior',\n symbolKind: CodeSymbolKind.UI_BEHAVIOR,\n },\n ],\n },\n fields: {\n name: schemaShape.name.stringSpec({\n meaning: 'Human label for the key in admin UI and support.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n status: schemaShape.status.enumSpec({\n meaning: 'Whether the key can authenticate traffic.',\n importance: FieldSemanticImportance.PRIMARY,\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'ApiKeyStatus',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n values: {\n [ApiKeyStatus.ACTIVE]: { meaning: 'Key may be used within policy and expiry.' },\n [ApiKeyStatus.INACTIVE]: { meaning: 'Revoked or disabled; authentications should fail.' },\n [ApiKeyStatus.EXPIRED]: { meaning: 'Past its validity window; treat as invalid.' },\n },\n }),\n keyPrefix: schemaShape.keyPrefix.stringSpec({\n meaning: 'Short public prefix of the key material for list rows and support correlation.',\n }),\n roles: schemaShape.roles.arraySpec({\n 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).',\n elementMeaning: 'One role identifier — a core app/org role token or an app-defined custom role string.',\n // Element is a union of `CORE_APP_ROLES` + `CORE_ORG_ROLES` + a free\n // custom-role string; the shape validator requires ONE enum vocabulary\n // to advertise, so we name the org-scope enum (the primary vocabulary\n // for an organization key). App tokens and custom strings remain valid\n // per `elementMeaning`.\n elementType: {\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CORE_ORG_ROLES',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n }),\n organizationId: schemaShape.organizationId.stringSpec({\n meaning: 'Owning organization; immutable after create.',\n }),\n expiresAt: schemaShape.expiresAt.dateSpec({ meaning: 'Optional automatic invalidation time.' }),\n previousKeyInvalidationDate: schemaShape.previousKeyInvalidationDate.dateSpec({\n meaning: 'After a rotation, when the PRIOR secret stops authenticating. During this grace window both the new and previous secrets work so integrations can migrate without downtime; absent/null after a regenerate means the prior secret stays valid until the next rotation.',\n }),\n },\n operations: {\n [Op.COUNT]: {\n purpose: 'Repository-only counts for entitlements and feature metering.',\n outcome: 'Numeric total of keys per scope without a public list.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The count of API keys in scope is returned for entitlement/metering checks.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the operator/metering role; this repository-only count is not a member-facing surface.' },\n ],\n idempotent: true,\n },\n [Op.READ]: {\n purpose: 'Inspect one key (org admin default; app super-admin `admin` variant for cross-tenant).',\n outcome: 'Metadata and status without revealing raw secret material.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The key’s metadata and status are returned (never the raw secret material).' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an org admin for this key’s tenant (or lacks the super-admin `admin` role for cross-tenant reads).' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No API key exists for the supplied id in the caller’s visible scope.' },\n ],\n idempotent: true,\n examples: [{\n title: 'Inspect an active integration key',\n response: ORGANIZATION_API_KEY_RECORD_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n variants: {\n context: { examples: [] },\n summary: { examples: [] },\n },\n },\n [Op.LIST]: {\n purpose: 'Enumerate keys the caller may see; members see a reduced roster vs admins.',\n outcome: 'Rows for security settings and admin consoles.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of API keys the caller is permitted to see.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks any role that grants visibility into the organization’s API-key roster.' },\n ],\n idempotent: true,\n examples: [{\n title: 'Browse organization integration keys',\n request: { page: 1, limit: 20, sort: 'createdAt:desc' },\n response: ORGANIZATION_API_KEY_PAGE_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n variants: {\n context: { examples: [] },\n summary: { examples: [] },\n },\n },\n [Op.SEARCH]: {\n purpose: 'Filter/sort with broader fields on the super-admin `admin` search variant.',\n outcome: 'Matching keys in large-tenant and platform views.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of API keys matching the search/filter query.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the role for the requested search scope (the broader-field filters require the super-admin `admin` variant).' },\n ],\n idempotent: true,\n examples: [{\n title: 'Find active expiring production keys',\n request: { q: 'production', status: ApiKeyStatus.ACTIVE, hasExpiration: true, page: 1, limit: 20, sort: 'lastUsedAt:desc' },\n response: ORGANIZATION_API_KEY_PAGE_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n [Op.CREATE]: {\n purpose: 'Create a new organization API key for an integration or automation client.',\n outcome: 'The key is created and its plaintext value is returned exactly once. Store it before dismissing the response; later reads expose only its prefix.',\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'A new API key is minted; the org-admin path returns the full plaintext secret exactly once in this response.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The create payload fails schema validation (e.g. missing `name`, malformed `expiresAt`).', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an org admin (or app-admin acting on the tenant) authorized to mint API keys.' },\n ],\n idempotent: false,\n rateLimitNote: 'Key minting is a credential-issuance path and may be rate-limited per organization to slow brute-force credential creation.',\n examples: [\n {\n title: 'Mint an organization API key with an expiry',\n request: {\n name: 'Production order sync',\n description: 'Least-privilege credential used by the order synchronization worker.',\n roles: [CORE_ORG_ROLES.ORG_MEMBER],\n status: ApiKeyStatus.ACTIVE,\n expiresAt: '2099-01-01T00:00:00.000Z',\n },\n response: {\n ...ORGANIZATION_API_KEY_RECORD_EXAMPLE,\n hashedKey: '4e47f19d78f4dba34a69075f877494db564faca7327849e6c15a47921a72e931',\n plainKey: 'sk_org_a_example-secret-returned-once',\n },\n forStatus: HttpResponseStatusCode.CREATED_201,\n },\n ],\n },\n [Op.DELETE]: {\n purpose: 'Permanently remove an organization API key that is no longer needed.',\n outcome: 'The key can no longer authenticate API traffic.',\n responseStatuses: [\n { code: HttpResponseStatusCode.NO_CONTENT_204, meaning: 'The key was deleted and can no longer authenticate; no body is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the org-admin (or app-admin) role required to retire keys.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No API key exists for the supplied id (or it was already deleted).' },\n ],\n idempotent: true,\n },\n [OrgApiKeys_Operations.ROTATE]: {\n operationId: OrgApiKeys_Operations.ROTATE,\n purpose: 'Issue a new secret and schedule invalidation of the previous material.',\n outcome: 'The new plaintext key is returned exactly once. The previous key remains valid until the requested invalidation time so callers can migrate without downtime.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A fresh secret is issued and returned once; the previous material is scheduled for invalidation.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the role to rotate this key (org-admin in tenant scope, or app-admin cross-tenant).' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The operation declares `requiresStepUpAuthentication`, and the request carried no valid single-use re-authentication token. Rotation hands back the replacement in plaintext and establishes when the previous key becomes unusable, so holding a live session is deliberately not sufficient — obtain a token from the re-authentication route and retry with it.', errorCode: 'STEP_UP_REQUIRED' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No API key exists for the supplied id in the caller’s scope.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The key is in a state that cannot be rotated (e.g. already revoked/expired), so reissuing the secret is an illegal transition.' },\n ],\n idempotent: false,\n rateLimitNote: 'Rotation issues new secret material and may be rate-limited to prevent rapid churn of live credentials.',\n examples: [{\n title: 'Rotate with a 24-hour migration window',\n request: { oldKeyInvalidationDate: '2099-01-02T00:00:00.000Z' },\n response: {\n ...ORGANIZATION_API_KEY_RECORD_EXAMPLE,\n keyPrefix: 'sk_org_b',\n previousKeyPrefix: ORGANIZATION_API_KEY_RECORD_EXAMPLE.keyPrefix,\n previousKeyInvalidationDate: '2099-01-02T00:00:00.000Z',\n plainKey: 'sk_org_b_example-secret-returned-once',\n oldKeyId: ORGANIZATION_API_KEY_RECORD_EXAMPLE._id,\n oldKeyInvalidationDate: '2099-01-02T00:00:00.000Z',\n },\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n [OrgApiKeys_Operations.REGENERATE]: {\n operationId: OrgApiKeys_Operations.REGENERATE,\n purpose: 'Generate a new secret without a mandatory invalidation window for the old key yet.',\n outcome: 'The new plaintext key is returned exactly once while the previous key remains valid until a later rotation completes the cutover.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A new secret is generated and returned once; the prior material stays valid to allow an overlap window.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the role to regenerate this key’s secret.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No API key exists for the supplied id in the caller’s scope.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The key is not in a regenerable state (e.g. permanently revoked), so issuing fresh material is rejected.' },\n ],\n idempotent: false,\n rateLimitNote: 'Secret regeneration is a credential-issuance path and may be rate-limited per key.',\n examples: [{\n title: 'Regenerate while retaining the previous secret',\n request: {},\n response: {\n ...ORGANIZATION_API_KEY_RECORD_EXAMPLE,\n keyPrefix: 'sk_org_c',\n previousKeyPrefix: ORGANIZATION_API_KEY_RECORD_EXAMPLE.keyPrefix,\n plainKey: 'sk_org_c_example-secret-returned-once',\n },\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n [OrgApiKeys_Operations.DEACTIVATE]: {\n operationId: OrgApiKeys_Operations.DEACTIVATE,\n purpose: 'Turn off authentication for an active key without deleting its metadata.',\n outcome: 'Status becomes inactive; reactivation is a separate op when allowed.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The key’s status is set to inactive and it can no longer authenticate until reactivated. This operation accepts an empty JSON object.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the role to disable this key.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No API key exists for the supplied id in the caller’s scope.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The key is already inactive or expired, so deactivation is not a legal transition.' },\n ],\n // NOT idempotent: the ACTIVE precondition flips on the first call, so a repeat is the\n // 409 above rather than a second 200.\n idempotent: false,\n examples: [{\n title: 'Deactivate a compromised integration key',\n request: {},\n response: { ...ORGANIZATION_API_KEY_RECORD_EXAMPLE, status: ApiKeyStatus.INACTIVE },\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n [OrgApiKeys_Operations.REACTIVATE]: {\n operationId: OrgApiKeys_Operations.REACTIVATE,\n purpose: 'Re-enable a previously inactive key if policy still permits.',\n outcome: 'The key returns to an active state and may authenticate again, provided it has not expired.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The key’s status returns to active and it may authenticate traffic again. This operation accepts an empty JSON object.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the role to re-enable this key.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No API key exists for the supplied id in the caller’s scope.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The key is expired or already active, so reactivation is not a legal transition.' },\n ],\n // NOT idempotent: the INACTIVE precondition flips on the first call, so a repeat is the\n // 409 above rather than a second 200.\n idempotent: false,\n examples: [{\n title: 'Reactivate a remediated integration key',\n request: {},\n response: ORGANIZATION_API_KEY_RECORD_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n [OrgApiKeys_Operations.EXTEND_EXPIRY]: {\n operationId: OrgApiKeys_Operations.EXTEND_EXPIRY,\n purpose: 'Push the expiration time when a dated key is still in use.',\n outcome: 'Updated validity; only meaningful when the key has an expiry set.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The key’s `expiresAt` is pushed to the requested future time and the updated validity window is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The requested expiry is missing or not a future date per the request DTO contract.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the role to extend this key’s validity.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No API key exists for the supplied id in the caller’s scope.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The key has no expiry set, so there is no expiration window to extend.' },\n ],\n idempotent: false,\n examples: [{\n title: 'Extend a key before its scheduled expiry',\n request: { newExpiresAt: '2099-06-30T00:00:00.000Z' },\n response: { ...ORGANIZATION_API_KEY_RECORD_EXAMPLE, expiresAt: '2099-06-30T00:00:00.000Z' },\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n [OrgApiKeys_Operations.USAGE_STATS]: {\n operationId: OrgApiKeys_Operations.USAGE_STATS,\n purpose: 'Return the current API-key usage-statistics response contract.',\n outcome: 'The current runtime has no per-key usage data source and returns an explicit all-zero placeholder; it must not be interpreted as proof that the key was unused.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A schema-valid all-zero placeholder is returned until per-key usage tracking is implemented.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the role to view this key’s usage analytics.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No API key exists for the supplied id in the caller’s scope.' },\n ],\n idempotent: true,\n examples: [{\n title: 'Current all-zero placeholder',\n response: {\n keyId: ORGANIZATION_API_KEY_RECORD_EXAMPLE._id,\n totalRequests: 0,\n requestsLastHour: 0,\n requestsLastDay: 0,\n requestsLastWeek: 0,\n errorRate: 0,\n rateLimitHits: 0,\n },\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n businessConstraints: [\n 'The plaintext key is only returned on create/rotate paths where the factory sets ephemeral response DTOs; companion copy must not imply clients can re-fetch full secrets later.',\n 'Super-admin `admin` HTTP variants mirror org-admin operations across tenants; wire RBAC to factory roles, not guesswork.',\n 'ROTATE/REGENERATE keep the PRIOR secret authenticating during a grace window (rotate: until `previousKeyInvalidationDate`; regenerate: until the next rotation), so API-key authentication accepts the current OR the not-yet-invalidated previous secret — a rotation is an immediate hard cutover only when `oldKeyInvalidationDate` is now (the default).',\n ],\n }),\n { resourcePrimaryScope: ResourcePrimaryScope.ORGANIZATIONS },\n ),\n () => ({\n label: {\n purpose: 'Use the key `name` as the list and detail title so support can match rows to user-provided labels.',\n },\n layout: {\n purpose: 'Split overview, access (roles, description), and lifecycle for keys — aligned with the merged `security` presets.',\n displayPurpose: 'Display and edit templates from `orgApiKeys` presets share the same `overview` / `access` / `lifecycle` section model.',\n sections: {\n overview: {\n purpose: 'Name, key prefix, status, and scope for quick recognition.',\n whenToUse: 'List summaries and read-only key inspection.',\n textSlots: {\n title: { purpose: 'Label the identity and status card.' },\n description: { purpose: 'Clarify that the visible prefix is not the full secret.' },\n },\n },\n access: {\n purpose: 'Roles and description the caller configured for the integration using this key.',\n whenToUse: 'Edits in access settings and read views when explaining scope.',\n textSlots: {\n title: { purpose: 'Label the access policy block.' },\n description: { purpose: 'Explain that roles are embedded on the key record for this integration path.' },\n },\n },\n lifecycle: {\n purpose: 'Expiry, last use, and audit-friendly timestamps for rotation decisions.',\n whenToUse: 'Lifecycle maintenance and reactivation/extend-expiry entry points.',\n textSlots: {\n title: { purpose: 'Label the lifecycle and usage strip.' },\n description: { purpose: 'Tie time-based fields to rotation and deactivation policy.' },\n },\n },\n },\n },\n views: {\n [Op.LIST]: { purpose: 'The addressable list surface in merged presets; primary navigation for key inventory.', whenToUse: 'Org security settings and app-admin org drill-downs.' },\n [Op.READ]: {\n purpose: 'Read shell for a single key record.',\n whenToUse: 'When operators open a key from a list; non-addressable in primary preset wiring.',\n variants: {\n default: { purpose: 'Org context read for org admins and members with factory visibility.', whenToUse: 'Tenant self-service key management.' },\n admin: { purpose: 'App super-admin read across organizations.', whenToUse: 'Platform support and cross-tenant key inspection.' },\n },\n },\n [Op.CREATE]: {\n purpose: 'Create flow surfaced as the Create action on the list toolbar + empty-state in merged presets — a NON-addressable (overlay) surface, drilled in within the Settings Hub panel. Action visibility is governed by `actionVisibility` + the declared view, NOT by URL-addressability. Merged admin uses `admin` API variants.',\n whenToUse: 'When minting a new org key from the product UI (Settings Hub → API keys) or app-admin.',\n variants: {\n default: { purpose: 'Org-admin create with ephemeral full key on success.', whenToUse: 'In-org automation onboarding.' },\n admin: { purpose: 'App-admin key creation on behalf of a tenant when enabled.', whenToUse: 'Back-office and migration support.' },\n },\n },\n [Op.SEARCH]: {\n purpose: 'Search and sort where the factory enables searchable variants.',\n whenToUse: 'Large rosters; admin variant extends filters per factory.',\n variants: {\n default: { purpose: 'Member/operator search in tenant scope.', whenToUse: 'Finding keys by name in standard org UIs.' },\n admin: { purpose: 'Super-admin search with additional filter fields in factory config.', whenToUse: 'Platform-wide directory maintenance.' },\n },\n },\n [Op.DELETE]: {\n purpose: 'Delete one or more keys with optional bulk in factory config.',\n whenToUse: 'Key retirement and offboarding when policy allows API delete.',\n variants: {\n default: { purpose: 'Org admin delete within the tenant boundary.', whenToUse: 'Normal tenant-driven removal.' },\n admin: { purpose: 'App-admin delete in elevated contexts.', whenToUse: 'Abuse, migration, and forced key retirement.' },\n },\n },\n [OrgApiKeys_Operations.ROTATE]: {\n purpose: 'High-risk reissuance; typically non-addressable as a custom route from read/create flows.',\n whenToUse: 'Planned or incident-driven rotation; notifications follow factory `userNotifications`.',\n variants: {\n default: { purpose: 'Org admin rotation in tenant scope.', whenToUse: 'When operators rotate integration secrets.' },\n admin: { purpose: 'App-admin rotation of org keys in cross-tenant mode.', whenToUse: 'Assisted support rotations.' },\n },\n },\n [OrgApiKeys_Operations.REGENERATE]: {\n purpose: 'Generate a new secret without the same invalidation story as full rotation when supported.',\n whenToUse: 'When overlap between old and new is acceptable; non-addressable in default preset wiring.',\n variants: {\n default: { purpose: 'Org-admin path.', whenToUse: 'Refresh keys where invalidation of the prior secret is not immediate.' },\n admin: { purpose: 'App-admin path.', whenToUse: 'Platform-assisted reissue across tenants.' },\n },\n },\n [OrgApiKeys_Operations.DEACTIVATE]: {\n purpose: 'Soft-disable a key in place; enabled only when the current row is active.',\n whenToUse: 'Stop traffic quickly without schema removal.',\n variants: {\n default: { purpose: 'Org-admin deactivation.', whenToUse: 'Temporarily block API key use.' },\n admin: { purpose: 'App-admin deactivation in elevated contexts.', whenToUse: 'Enforcement and incident response from platform roles.' },\n },\n },\n [OrgApiKeys_Operations.REACTIVATE]: {\n purpose: 'Re-enable a key that is inactive; enabled when status matches factory condition.',\n whenToUse: 'After mistaken deactivation or policy-driven reinstatement.',\n variants: {\n default: { purpose: 'Org-admin reactivation.', whenToUse: 'Bringing a key back for an org-owned integration.' },\n admin: { purpose: 'App-admin reactivation.', whenToUse: 'Cross-tenant re-enablement for support cases.' },\n },\n },\n [OrgApiKeys_Operations.EXTEND_EXPIRY]: {\n purpose: 'Update expiration when the key already has an expiry; requires future date in request DTO per factory.',\n whenToUse: 'Renewal before automated expiry cuts traffic.',\n variants: {\n default: { purpose: 'Org-admin extension within tenant context.', whenToUse: 'Standard renewal flows.' },\n admin: { purpose: 'App-admin extension when operating on any org’s keys.', whenToUse: 'Assisted long-lived integrations.' },\n },\n },\n [OrgApiKeys_Operations.USAGE_STATS]: {\n purpose: 'Read-side analytics (requests, error rate) for a key, modeled like READ in risk tier.',\n whenToUse: 'Dashboards; non-addressable in default preset list views.',\n variants: {\n default: { purpose: 'Org members and admins with factory roles.', whenToUse: 'Self-service key health in tenant scope.' },\n admin: { purpose: 'App super-admin stats in cross-tenant mode.', whenToUse: 'Support triage and capacity reviews.' },\n },\n },\n },\n }),\n);\n"]}
1
+ {"version":3,"file":"organization-api-keys.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/auth/resources/organization-api-keys.resource.specification.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iCAAiC,IAAI,qBAAqB,EAC1D,gCAAgC,IAAI,oBAAoB,GACzD,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,wBAAwB,EACxB,WAAW,EACX,YAAY,EACZ,cAAc,EACd,qBAAqB,IAAI,EAAE,EAC3B,qBAAqB,EACrB,oBAAoB,EACpB,qDAAqD,IAAI,iBAAiB,GAC3E,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,sBAAsB,EACtB,mCAAm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CAAC,EAAE;YACnC,OAAO,EAAE,uFAAuF;YAChG,SAAS,EAAE,2DAA2D;YACtE,QAAQ,EAAE;gBACR,OAAO,EAAE,EAAE,OAAO,EAAE,4CAA4C,EAAE,SAAS,EAAE,0CAA0C,EAAE;gBACzH,KAAK,EAAE,EAAE,OAAO,EAAE,6CAA6C,EAAE,SAAS,EAAE,sCAAsC,EAAE;aACrH;SACF;KACF;CACF,CAAC,CACH,CAAC","sourcesContent":["import {\n orgApiKeysAdminResourceUIBehavior as orgApiKeysAdminSource,\n orgApiKeysMainResourceUIBehavior as orgApiKeysMainSource,\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 ApiKeyOrganizationSchema,\n ApiKeyScope,\n ApiKeyStatus,\n CORE_ORG_ROLES,\n CoreResourceOperation as Op,\n OrgApiKeys_Operations,\n ResourcePrimaryScope,\n orgApiKeysResourceConfiguration_InitializationFactory as orgApiKeysFactory,\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 orgApiKeysFactory>;\ntype Custom = NonNullable<Cfg['customOperation']>;\ntype Core = Cfg['coreOperations'][number];\ntype Main = Cfg['mainSchema'];\n\nconst orgApiKeysMainUIBehavior = orgApiKeysMainSource as ResourceUIBehaviorConfig<Custom, Core, Main>;\nconst orgApiKeysAdminUIBehavior = orgApiKeysAdminSource as ResourceUIBehaviorConfig<Custom, Core, Main>;\n\n/**\n * One schema-complete, non-secret record used by READ and collection examples.\n * Credential-issuing operations extend it with their one-time fields so the\n * OpenAPI examples cannot accidentally teach that `plainKey` is available on a\n * later READ.\n */\nconst ORGANIZATION_API_KEY_RECORD_EXAMPLE = {\n _id: 'orgkey_01JEXAMPLE',\n name: 'Production order sync',\n description: 'Least-privilege credential used by the order synchronization worker.',\n scope: ApiKeyScope.ORGANIZATION,\n roles: [CORE_ORG_ROLES.ORG_MEMBER],\n status: ApiKeyStatus.ACTIVE,\n expiresAt: '2099-01-01T00:00:00.000Z',\n lastUsedAt: '2026-08-18T09:42:12.000Z',\n createdAt: '2026-06-01T08:00:00.000Z',\n updatedAt: '2026-08-18T09:42:12.000Z',\n organizationId: 'org_01JEXAMPLE',\n keyPrefix: 'sk_org_a',\n} as const;\n\nconst ORGANIZATION_API_KEY_PAGE_EXAMPLE = {\n data: [ORGANIZATION_API_KEY_RECORD_EXAMPLE],\n pagination: { page: 1, limit: 20, total: 1, totalPages: 1 },\n} as const;\n\nexport const organizationApiKeysResourceSpecification = resourceSpecificationFromFrontendConfiguration(\n mergeResourceFrontendConfigurations(\n resourceFrontendConfiguration(orgApiKeysMainUIBehavior),\n resourceFrontendConfiguration(orgApiKeysAdminUIBehavior),\n ),\n resourceSpecification(\n orgApiKeysFactory,\n ApiKeyOrganizationSchema,\n ({ schemaShape }) => ({\n purpose: 'Organization-scoped API keys: secrets used by org administrators and integrations to call backend APIs in tenant context.',\n businessRole: 'First-class auth credential for automation and partner integrations, distinct from end-user sessions.',\n lifecycleRole: 'Created with optional expiry, then rotated, deactivated or deleted by organization administrators. Per-key request analytics are not currently recorded.',\n audience: LabelAudience.DEVELOPER,\n subDomain: EngineResourceSubDomain.AUTH,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'ApiKeyOrganizationSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactory: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'orgApiKeysResourceConfiguration_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: 'ORG_API_KEYS',\n },\n operationVocabulary: {\n coreEnum: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceOperation',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n customEnum: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'OrgApiKeys_Operations',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n frontendConfigurationSources: [\n {\n packageName: '@wildo-ai/presets-components',\n exportName: 'orgApiKeysMainResourceUIBehavior',\n symbolKind: CodeSymbolKind.UI_BEHAVIOR,\n },\n {\n packageName: '@wildo-ai/presets-components',\n exportName: 'orgApiKeysAdminResourceUIBehavior',\n symbolKind: CodeSymbolKind.UI_BEHAVIOR,\n },\n ],\n },\n fields: {\n name: schemaShape.name.stringSpec({\n meaning: 'Human label for the key in admin UI and support.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n status: schemaShape.status.enumSpec({\n meaning: 'Whether the key can authenticate traffic.',\n importance: FieldSemanticImportance.PRIMARY,\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'ApiKeyStatus',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n values: {\n [ApiKeyStatus.ACTIVE]: { meaning: 'Key may be used within policy and expiry.' },\n [ApiKeyStatus.INACTIVE]: { meaning: 'Revoked or disabled; authentications should fail.' },\n [ApiKeyStatus.EXPIRED]: { meaning: 'Past its validity window; treat as invalid.' },\n },\n }),\n keyPrefix: schemaShape.keyPrefix.stringSpec({\n meaning: 'Short public prefix of the key material for list rows and support correlation.',\n }),\n roles: schemaShape.roles.arraySpec({\n 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).',\n elementMeaning: 'One role identifier — a core app/org role token or an app-defined custom role string.',\n // Element is a union of `CORE_APP_ROLES` + `CORE_ORG_ROLES` + a free\n // custom-role string; the shape validator requires ONE enum vocabulary\n // to advertise, so we name the org-scope enum (the primary vocabulary\n // for an organization key). App tokens and custom strings remain valid\n // per `elementMeaning`.\n elementType: {\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CORE_ORG_ROLES',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n }),\n organizationId: schemaShape.organizationId.stringSpec({\n meaning: 'Owning organization; immutable after create.',\n }),\n expiresAt: schemaShape.expiresAt.dateSpec({ meaning: 'Optional automatic invalidation time.' }),\n previousKeyInvalidationDate: schemaShape.previousKeyInvalidationDate.dateSpec({\n meaning: 'After a rotation, when the PRIOR secret stops authenticating. During this grace window both the new and previous secrets work so integrations can migrate without downtime; absent/null after a regenerate means the prior secret stays valid until the next rotation.',\n }),\n },\n operations: {\n [Op.COUNT]: {\n purpose: 'Repository-only counts for entitlements and feature metering.',\n outcome: 'Numeric total of keys per scope without a public list.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The count of API keys in scope is returned for entitlement/metering checks.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the operator/metering role; this repository-only count is not a member-facing surface.' },\n ],\n idempotent: true,\n },\n [Op.READ]: {\n purpose: 'Inspect one key (org admin default; app super-admin `admin` variant for cross-tenant).',\n outcome: 'Metadata and status without revealing raw secret material.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The key’s metadata and status are returned (never the raw secret material).' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an org admin for this key’s tenant (or lacks the super-admin `admin` role for cross-tenant reads).' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No API key exists for the supplied id in the caller’s visible scope.' },\n ],\n idempotent: true,\n examples: [{\n title: 'Inspect an active integration key',\n response: ORGANIZATION_API_KEY_RECORD_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n variants: {\n context: { examples: [] },\n summary: { examples: [] },\n },\n },\n [Op.LIST]: {\n purpose: 'Enumerate keys the caller may see; members see a reduced roster vs admins.',\n outcome: 'Rows for security settings and admin consoles.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of API keys the caller is permitted to see.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks any role that grants visibility into the organization’s API-key roster.' },\n ],\n idempotent: true,\n examples: [{\n title: 'Browse organization integration keys',\n request: { page: 1, limit: 20, sort: 'createdAt:desc' },\n response: ORGANIZATION_API_KEY_PAGE_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n variants: {\n context: { examples: [] },\n summary: { examples: [] },\n },\n },\n [Op.SEARCH]: {\n purpose: 'Filter/sort with broader fields on the super-admin `admin` search variant.',\n outcome: 'Matching keys in large-tenant and platform views.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of API keys matching the search/filter query.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the role for the requested search scope (the broader-field filters require the super-admin `admin` variant).' },\n ],\n idempotent: true,\n examples: [{\n title: 'Find active expiring production keys',\n request: { q: 'production', status: ApiKeyStatus.ACTIVE, hasExpiration: true, page: 1, limit: 20, sort: 'lastUsedAt:desc' },\n response: ORGANIZATION_API_KEY_PAGE_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n [Op.CREATE]: {\n purpose: 'Create a new organization API key for an integration or automation client.',\n outcome: 'The key is created and its plaintext value is returned exactly once. Store it before dismissing the response; later reads expose only its prefix.',\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'A new API key is minted; the org-admin path returns the full plaintext secret exactly once in this response.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The create payload fails schema validation (e.g. missing `name`, malformed `expiresAt`).', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an org admin (or app-admin acting on the tenant) authorized to mint API keys.' },\n ],\n idempotent: false,\n rateLimitNote: 'Key minting is a credential-issuance path and may be rate-limited per organization to slow brute-force credential creation.',\n examples: [\n {\n title: 'Mint an organization API key with an expiry',\n request: {\n name: 'Production order sync',\n description: 'Least-privilege credential used by the order synchronization worker.',\n roles: [CORE_ORG_ROLES.ORG_MEMBER],\n status: ApiKeyStatus.ACTIVE,\n expiresAt: '2099-01-01T00:00:00.000Z',\n },\n response: {\n ...ORGANIZATION_API_KEY_RECORD_EXAMPLE,\n hashedKey: '4e47f19d78f4dba34a69075f877494db564faca7327849e6c15a47921a72e931',\n plainKey: 'sk_org_a_example-secret-returned-once',\n },\n forStatus: HttpResponseStatusCode.CREATED_201,\n },\n ],\n },\n [Op.DELETE]: {\n purpose: 'Permanently remove an organization API key that is no longer needed.',\n outcome: 'The key can no longer authenticate API traffic.',\n responseStatuses: [\n { code: HttpResponseStatusCode.NO_CONTENT_204, meaning: 'The key was deleted and can no longer authenticate; no body is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the org-admin (or app-admin) role required to retire keys.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No API key exists for the supplied id (or it was already deleted).' },\n ],\n idempotent: true,\n },\n [OrgApiKeys_Operations.ROTATE]: {\n operationId: OrgApiKeys_Operations.ROTATE,\n purpose: 'Issue a new secret and schedule invalidation of the previous material.',\n outcome: 'The new plaintext key is returned exactly once. The previous key remains valid until the requested invalidation time so callers can migrate without downtime.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A fresh secret is issued and returned once; the previous material is scheduled for invalidation.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the role to rotate this key (org-admin in tenant scope, or app-admin cross-tenant).' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The operation declares `requiresStepUpAuthentication`, and the request carried no valid single-use re-authentication token. Rotation hands back the replacement in plaintext and establishes when the previous key becomes unusable, so holding a live session is deliberately not sufficient — obtain a token from the re-authentication route and retry with it.', errorCode: 'STEP_UP_REQUIRED' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No API key exists for the supplied id in the caller’s scope.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The key is in a state that cannot be rotated (e.g. already revoked/expired), so reissuing the secret is an illegal transition.' },\n ],\n idempotent: false,\n rateLimitNote: 'Rotation issues new secret material and may be rate-limited to prevent rapid churn of live credentials.',\n examples: [{\n title: 'Rotate with a 24-hour migration window',\n request: { oldKeyInvalidationDate: '2099-01-02T00:00:00.000Z' },\n response: {\n ...ORGANIZATION_API_KEY_RECORD_EXAMPLE,\n keyPrefix: 'sk_org_b',\n previousKeyPrefix: ORGANIZATION_API_KEY_RECORD_EXAMPLE.keyPrefix,\n previousKeyInvalidationDate: '2099-01-02T00:00:00.000Z',\n plainKey: 'sk_org_b_example-secret-returned-once',\n oldKeyId: ORGANIZATION_API_KEY_RECORD_EXAMPLE._id,\n oldKeyInvalidationDate: '2099-01-02T00:00:00.000Z',\n },\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n [OrgApiKeys_Operations.REGENERATE]: {\n operationId: OrgApiKeys_Operations.REGENERATE,\n purpose: 'Generate a new secret without a mandatory invalidation window for the old key yet.',\n outcome: 'The new plaintext key is returned exactly once while the previous key remains valid until a later rotation completes the cutover.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A new secret is generated and returned once; the prior material stays valid to allow an overlap window.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the role to regenerate this key’s secret.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No API key exists for the supplied id in the caller’s scope.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The key is not in a regenerable state (e.g. permanently revoked), so issuing fresh material is rejected.' },\n ],\n idempotent: false,\n rateLimitNote: 'Secret regeneration is a credential-issuance path and may be rate-limited per key.',\n examples: [{\n title: 'Regenerate while retaining the previous secret',\n request: {},\n response: {\n ...ORGANIZATION_API_KEY_RECORD_EXAMPLE,\n keyPrefix: 'sk_org_c',\n previousKeyPrefix: ORGANIZATION_API_KEY_RECORD_EXAMPLE.keyPrefix,\n plainKey: 'sk_org_c_example-secret-returned-once',\n },\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n [OrgApiKeys_Operations.DEACTIVATE]: {\n operationId: OrgApiKeys_Operations.DEACTIVATE,\n purpose: 'Turn off authentication for an active key without deleting its metadata.',\n outcome: 'Status becomes inactive; reactivation is a separate op when allowed.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The key’s status is set to inactive and it can no longer authenticate until reactivated. This operation accepts an empty JSON object.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the role to disable this key.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No API key exists for the supplied id in the caller’s scope.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The key is already inactive or expired, so deactivation is not a legal transition.' },\n ],\n // NOT idempotent: the ACTIVE precondition flips on the first call, so a repeat is the\n // 409 above rather than a second 200.\n idempotent: false,\n examples: [{\n title: 'Deactivate a compromised integration key',\n request: {},\n response: { ...ORGANIZATION_API_KEY_RECORD_EXAMPLE, status: ApiKeyStatus.INACTIVE },\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n [OrgApiKeys_Operations.REACTIVATE]: {\n operationId: OrgApiKeys_Operations.REACTIVATE,\n purpose: 'Re-enable a previously inactive key if policy still permits.',\n outcome: 'The key returns to an active state and may authenticate again, provided it has not expired.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The key’s status returns to active and it may authenticate traffic again. This operation accepts an empty JSON object.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the role to re-enable this key.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No API key exists for the supplied id in the caller’s scope.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The key is expired or already active, so reactivation is not a legal transition.' },\n ],\n // NOT idempotent: the INACTIVE precondition flips on the first call, so a repeat is the\n // 409 above rather than a second 200.\n idempotent: false,\n examples: [{\n title: 'Reactivate a remediated integration key',\n request: {},\n response: ORGANIZATION_API_KEY_RECORD_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n [OrgApiKeys_Operations.EXTEND_EXPIRY]: {\n operationId: OrgApiKeys_Operations.EXTEND_EXPIRY,\n purpose: 'Push the expiration time when a dated key is still in use.',\n outcome: 'Updated validity; only meaningful when the key has an expiry set.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The key’s `expiresAt` is pushed to the requested future time and the updated validity window is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The requested expiry is missing or not a future date per the request DTO contract.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the role to extend this key’s validity.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No API key exists for the supplied id in the caller’s scope.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The key has no expiry set, so there is no expiration window to extend.' },\n ],\n idempotent: false,\n examples: [{\n title: 'Extend a key before its scheduled expiry',\n request: { newExpiresAt: '2099-06-30T00:00:00.000Z' },\n response: { ...ORGANIZATION_API_KEY_RECORD_EXAMPLE, expiresAt: '2099-06-30T00:00:00.000Z' },\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n [OrgApiKeys_Operations.USAGE_STATS]: {\n operationId: OrgApiKeys_Operations.USAGE_STATS,\n purpose: 'Return the current API-key usage-statistics response contract.',\n outcome: 'The current runtime has no per-key usage data source and returns an explicit all-zero placeholder; it must not be interpreted as proof that the key was unused.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A schema-valid all-zero placeholder is returned until per-key usage tracking is implemented.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the role to view this key’s usage analytics.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No API key exists for the supplied id in the caller’s scope.' },\n ],\n idempotent: true,\n examples: [{\n title: 'Current all-zero placeholder',\n response: {\n keyId: ORGANIZATION_API_KEY_RECORD_EXAMPLE._id,\n totalRequests: 0,\n requestsLastHour: 0,\n requestsLastDay: 0,\n requestsLastWeek: 0,\n errorRate: 0,\n rateLimitHits: 0,\n },\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n businessConstraints: [\n 'The plaintext key is only returned on create/rotate paths where the factory sets ephemeral response DTOs; companion copy must not imply clients can re-fetch full secrets later.',\n 'Super-admin `admin` HTTP variants mirror org-admin operations across tenants; wire RBAC to factory roles, not guesswork.',\n 'ROTATE/REGENERATE keep the PRIOR secret authenticating during a grace window (rotate: until `previousKeyInvalidationDate`; regenerate: until the next rotation), so API-key authentication accepts the current OR the not-yet-invalidated previous secret — a rotation is an immediate hard cutover only when `oldKeyInvalidationDate` is now (the default).',\n ],\n }),\n { resourcePrimaryScope: ResourcePrimaryScope.ORGANIZATIONS },\n ),\n () => ({\n label: {\n purpose: 'Use the key `name` as the list and detail title so support can match rows to user-provided labels.',\n },\n layout: {\n purpose: 'Split overview, access (roles, description), and lifecycle for keys — aligned with the merged `security` presets.',\n displayPurpose: 'Display and edit templates from `orgApiKeys` presets share the same `overview` / `access` / `lifecycle` section model.',\n sections: {\n overview: {\n purpose: 'Name, key prefix, status, and scope for quick recognition.',\n whenToUse: 'List summaries and read-only key inspection.',\n textSlots: {\n title: { purpose: 'Label the identity and status card.' },\n description: { purpose: 'Clarify that the visible prefix is not the full secret.' },\n },\n },\n access: {\n purpose: 'Roles and description the caller configured for the integration using this key.',\n whenToUse: 'Edits in access settings and read views when explaining scope.',\n textSlots: {\n title: { purpose: 'Label the access policy block.' },\n description: { purpose: 'Explain that roles are embedded on the key record for this integration path.' },\n },\n },\n lifecycle: {\n purpose: 'Expiry, last use, and audit-friendly timestamps for rotation decisions.',\n whenToUse: 'Lifecycle maintenance and reactivation/extend-expiry entry points.',\n textSlots: {\n title: { purpose: 'Label the lifecycle and usage strip.' },\n description: { purpose: 'Tie time-based fields to rotation and deactivation policy.' },\n },\n },\n },\n },\n views: {\n [Op.LIST]: { purpose: 'The addressable list surface in merged presets; primary navigation for key inventory.', whenToUse: 'Org security settings and app-admin org drill-downs.' },\n [Op.READ]: {\n purpose: 'Read shell for a single key record.',\n whenToUse: 'When operators open a key from a list; non-addressable in primary preset wiring.',\n variants: {\n default: { purpose: 'Org context read for org admins and members with factory visibility.', whenToUse: 'Tenant self-service key management.' },\n admin: { purpose: 'App super-admin read across organizations.', whenToUse: 'Platform support and cross-tenant key inspection.' },\n },\n },\n [Op.CREATE]: {\n purpose: 'Create flow surfaced as the Create action on the list toolbar + empty-state in merged presets — a NON-addressable (overlay) surface, drilled in within the Settings Hub panel. Action visibility is governed by `actionVisibility` + the declared view, NOT by URL-addressability. Merged admin uses `admin` API variants.',\n whenToUse: 'When minting a new org key from the product UI (Settings Hub → API keys) or app-admin.',\n variants: {\n default: { purpose: 'Org-admin create with ephemeral full key on success.', whenToUse: 'In-org automation onboarding.' },\n admin: { purpose: 'App-admin key creation on behalf of a tenant when enabled.', whenToUse: 'Back-office and migration support.' },\n },\n },\n [Op.SEARCH]: {\n purpose: 'Search and sort where the factory enables searchable variants.',\n whenToUse: 'Large rosters; admin variant extends filters per factory.',\n variants: {\n default: { purpose: 'Member/operator search in tenant scope.', whenToUse: 'Finding keys by name in standard org UIs.' },\n admin: { purpose: 'Super-admin search with additional filter fields in factory config.', whenToUse: 'Platform-wide directory maintenance.' },\n },\n },\n [Op.DELETE]: {\n purpose: 'Delete one or more keys with optional bulk in factory config.',\n whenToUse: 'Key retirement and offboarding when policy allows API delete.',\n variants: {\n default: { purpose: 'Org admin delete within the tenant boundary.', whenToUse: 'Normal tenant-driven removal.' },\n admin: { purpose: 'App-admin delete in elevated contexts.', whenToUse: 'Abuse, migration, and forced key retirement.' },\n },\n },\n [OrgApiKeys_Operations.ROTATE]: {\n purpose: 'High-risk reissuance; typically non-addressable as a custom route from read/create flows.',\n whenToUse: 'Planned or incident-driven rotation; notifications follow factory `userNotifications`.',\n variants: {\n default: { purpose: 'Org admin rotation in tenant scope.', whenToUse: 'When operators rotate integration secrets.' },\n admin: { purpose: 'App-admin rotation of org keys in cross-tenant mode.', whenToUse: 'Assisted support rotations.' },\n },\n },\n [OrgApiKeys_Operations.REGENERATE]: {\n purpose: 'Generate a new secret without the same invalidation story as full rotation when supported.',\n whenToUse: 'When overlap between old and new is acceptable; non-addressable in default preset wiring.',\n variants: {\n default: { purpose: 'Org-admin path.', whenToUse: 'Refresh keys where invalidation of the prior secret is not immediate.' },\n admin: { purpose: 'App-admin path.', whenToUse: 'Platform-assisted reissue across tenants.' },\n },\n },\n [OrgApiKeys_Operations.DEACTIVATE]: {\n purpose: 'Soft-disable a key in place; enabled only when the current row is active.',\n whenToUse: 'Stop traffic quickly without schema removal.',\n variants: {\n default: { purpose: 'Org-admin deactivation.', whenToUse: 'Temporarily block API key use.' },\n admin: { purpose: 'App-admin deactivation in elevated contexts.', whenToUse: 'Enforcement and incident response from platform roles.' },\n },\n },\n [OrgApiKeys_Operations.REACTIVATE]: {\n purpose: 'Re-enable a key that is inactive; enabled when status matches factory condition.',\n whenToUse: 'After mistaken deactivation or policy-driven reinstatement.',\n variants: {\n default: { purpose: 'Org-admin reactivation.', whenToUse: 'Bringing a key back for an org-owned integration.' },\n admin: { purpose: 'App-admin reactivation.', whenToUse: 'Cross-tenant re-enablement for support cases.' },\n },\n },\n [OrgApiKeys_Operations.EXTEND_EXPIRY]: {\n purpose: 'Update expiration when the key already has an expiry; requires future date in request DTO per factory.',\n whenToUse: 'Renewal before automated expiry cuts traffic.',\n variants: {\n default: { purpose: 'Org-admin extension within tenant context.', whenToUse: 'Standard renewal flows.' },\n admin: { purpose: 'App-admin extension when operating on any org’s keys.', whenToUse: 'Assisted long-lived integrations.' },\n },\n },\n [OrgApiKeys_Operations.USAGE_STATS]: {\n purpose: 'Read-side analytics (requests, error rate) for a key, modeled like READ in risk tier.',\n whenToUse: 'Dashboards; non-addressable in default preset list views.',\n variants: {\n default: { purpose: 'Org members and admins with factory roles.', whenToUse: 'Self-service key health in tenant scope.' },\n admin: { purpose: 'App super-admin stats in cross-tenant mode.', whenToUse: 'Support triage and capacity reviews.' },\n },\n },\n },\n }),\n);\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"organization-oauth-clients.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/auth/resources/organization-oauth-clients.resource.specification.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,WAAW,EACX,cAAc,EACd,qBAAqB,IAAI,EAAE,EAI3B,cAAc,EAEd,6BAA6B,EAC7B,iBAAiB,EACjB,4BAA4B,EAC5B,0BAA0B,EAG3B,MAAM,uBAAuB,CAAC;AAyD/B;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,6CAA6C;;;;;;;;;;;;;;;;;;;;;;;;iCAyZzD,CAAC"}
1
+ {"version":3,"file":"organization-oauth-clients.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/auth/resources/organization-oauth-clients.resource.specification.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,WAAW,EACX,cAAc,EACd,qBAAqB,IAAI,EAAE,EAI3B,cAAc,EAEd,6BAA6B,EAC7B,iBAAiB,EACjB,4BAA4B,EAC5B,0BAA0B,EAG3B,MAAM,uBAAuB,CAAC;AA0D/B;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,6CAA6C;;;;;;;;;;;;;;;;;;;;;;;;iCA0ZzD,CAAC"}
@@ -2,6 +2,7 @@ import { LabelAudience } from '@wildo-ai/presets-components-models';
2
2
  import { CodeDeclarationKind, CodeSymbolKind, FieldSemanticImportance, } from '@wildo-ai/zod-decorators';
3
3
  import { ApiKeyScope, CORE_ORG_ROLES, CoreResourceOperation as Op, ErrorCustomMessageReference, ErrorSeverity, ErrorType, OAuthGrantType, OAuthClientOrganizationSchema, OAuthClientRegistrationOrigin, OAuthClientStatus, OAuthTokenEndpointAuthMethod, OrgOAuthClients_Operations, ResourcePrimaryScope, orgOAuthClientsResourceConfiguration_InitializationFactory as orgOAuthClientsFactory, } from '@wildo-ai/saas-models';
4
4
  import { HttpResponseStatusCode, resourceSpecification } from '../../../_core/index.js';
5
+ import { EngineResourceSubDomain } from '../../engine-resource-sub-domain.js';
5
6
  const ORGANIZATION_OAUTH_CLIENT_RECORD_EXAMPLE = {
6
7
  _id: 'oauth_client_org_01HX2EXAMPLE',
7
8
  name: 'Revenue synchronization service',
@@ -79,6 +80,7 @@ export const organizationOAuthClientsResourceSpecification = resourceSpecificati
79
80
  businessRole: 'First-class machine-to-machine OAuth credential for automation and partner integrations. Under client-credentials it authenticates the SAME organization machine principal (`ORGANIZATION_MACHINE`) that an organization API key does — a distinct credential type, not a distinct principal — and additionally supports authorization-code user delegation, which API keys cannot.',
80
81
  lifecycleRole: 'Created with optional expiry, can be rotated and regenerated, and deleted. The current token paths do not populate `lastUsedAt`, so retirement decisions require audit and workload evidence rather than this field alone.',
81
82
  audience: LabelAudience.DEVELOPER,
83
+ subDomain: EngineResourceSubDomain.AUTH,
82
84
  codeHandling: {
83
85
  mainSchema: {
84
86
  packageName: '@wildo-ai/saas-models',
@@ -218,7 +220,7 @@ export const organizationOAuthClientsResourceSpecification = resourceSpecificati
218
220
  },
219
221
  }),
220
222
  tokenEndpointAuthMethod: schemaShape.tokenEndpointAuthMethod.enumSpec({
221
- meaning: 'Whether this client is PUBLIC (PKCE-only — no client secret at the token endpoint) or CONFIDENTIAL (must present its client_secret to redeem an authorization code or revoke a token). Defaults to public; a server-side client that can safely hold a secret opts into confidential.',
223
+ meaning: 'How the client authenticates at the token endpoint: `none` for a public client (PKCE only, no client secret), or `client_secret_basic` / `client_secret_post` for a confidential client that presents its client_secret to redeem an authorization code or revoke a token. Defaults to `none`; a server-side client that can safely hold a secret opts into one of the secret-bearing methods.',
222
224
  importance: FieldSemanticImportance.CONTEXTUAL,
223
225
  enumDeclaration: {
224
226
  packageName: '@wildo-ai/saas-models',
@@ -1 +1 @@
1
- {"version":3,"file":"organization-oauth-clients.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/auth/resources/organization-oauth-clients.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,WAAW,EACX,cAAc,EACd,qBAAqB,IAAI,EAAE,EAC3B,2BAA2B,EAC3B,aAAa,EACb,SAAS,EACT,cAAc,EACd,6BAA6B,EAC7B,6BAA6B,EAC7B,iBAAiB,EACjB,4BAA4B,EAC5B,0BAA0B,EAC1B,oBAAoB,EACpB,0DAA0D,IAAI,sBAAsB,GACrF,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAE5F,MAAM,wCAAwC,GAAG;IAC/C,GAAG,EAAE,+BAA+B;IACpC,IAAI,EAAE,iCAAiC;IACv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A+D,EAAE;gBACrH,EAAE,IAAI,EAAE,sBAAsB,CAAC,aAAa,EAAE,IAAI,EAAE,mEAAmE,EAAE;gBACzH,EAAE,IAAI,EAAE,sBAAsB,CAAC,YAAY,EAAE,IAAI,EAAE,6GAA6G,EAAE;aACnK;YACD,UAAU,EAAE,KAAK;YACjB,aAAa,EAAE,uFAAuF;YACtG,QAAQ,EAAE;gBACR;oBACE,KAAK,EAAE,gDAAgD;oBACvD,OAAO,EAAE,EAAE;oBACX,QAAQ,EAAE;wBACR,GAAG,wCAAwC;wBAC3C,YAAY,EAAE,UAAU;wBACxB,oBAAoB,EAAE,wCAAwC,CAAC,YAAY;wBAC3E,WAAW,EAAE,yCAAyC;qBACvD;oBACD,SAAS,EAAE,sBAAsB,CAAC,MAAM;iBACzC;aACF;SACF;KACF;IACD,mBAAmB,EAAE;QACnB,gMAAgM;QAChM,0HAA0H;QAC1H,6WAA6W;KAC9W;CACF,CAAC,EACF,EAAE,oBAAoB,EAAE,oBAAoB,CAAC,aAAa,EAAE,CAC7D,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 ApiKeyScope,\n CORE_ORG_ROLES,\n CoreResourceOperation as Op,\n ErrorCustomMessageReference,\n ErrorSeverity,\n ErrorType,\n OAuthGrantType,\n OAuthClientOrganizationSchema,\n OAuthClientRegistrationOrigin,\n OAuthClientStatus,\n OAuthTokenEndpointAuthMethod,\n OrgOAuthClients_Operations,\n ResourcePrimaryScope,\n orgOAuthClientsResourceConfiguration_InitializationFactory as orgOAuthClientsFactory,\n} from '@wildo-ai/saas-models';\nimport { HttpResponseStatusCode, resourceSpecification } from '~wildo-specifications/_core';\n\nconst ORGANIZATION_OAUTH_CLIENT_RECORD_EXAMPLE = {\n _id: 'oauth_client_org_01HX2EXAMPLE',\n name: 'Revenue synchronization service',\n description: 'Confidential machine client used by the revenue synchronization worker.',\n scope: ApiKeyScope.ORGANIZATION,\n roles: [CORE_ORG_ROLES.ORG_MEMBER],\n allowedScopes: [],\n allowedGrants: [OAuthGrantType.CLIENT_CREDENTIALS],\n redirectUris: [],\n postLogoutRedirectUris: [],\n requiresConsent: false,\n tokenEndpointAuthMethod: OAuthTokenEndpointAuthMethod.CLIENT_SECRET_BASIC,\n status: OAuthClientStatus.ACTIVE,\n expiresAt: '2099-01-01T00:00:00.000Z',\n createdAt: '2026-08-01T09:00:00.000Z',\n updatedAt: '2026-08-17T14:20:00.000Z',\n secretPrefix: 'oc_org_1',\n registrationOrigin: OAuthClientRegistrationOrigin.OPERATOR,\n organizationId: 'organization_01HX2EXAMPLE',\n} as const;\n\nconst ORGANIZATION_OAUTH_CLIENT_SUMMARY_EXAMPLE = {\n _id: ORGANIZATION_OAUTH_CLIENT_RECORD_EXAMPLE._id,\n name: ORGANIZATION_OAUTH_CLIENT_RECORD_EXAMPLE.name,\n tokenEndpointAuthMethod: ORGANIZATION_OAUTH_CLIENT_RECORD_EXAMPLE.tokenEndpointAuthMethod,\n status: ORGANIZATION_OAUTH_CLIENT_RECORD_EXAMPLE.status,\n expiresAt: ORGANIZATION_OAUTH_CLIENT_RECORD_EXAMPLE.expiresAt,\n createdAt: ORGANIZATION_OAUTH_CLIENT_RECORD_EXAMPLE.createdAt,\n secretPrefix: ORGANIZATION_OAUTH_CLIENT_RECORD_EXAMPLE.secretPrefix,\n registrationOrigin: ORGANIZATION_OAUTH_CLIENT_RECORD_EXAMPLE.registrationOrigin,\n organizationId: ORGANIZATION_OAUTH_CLIENT_RECORD_EXAMPLE.organizationId,\n} as const;\n\nconst ORGANIZATION_OAUTH_CLIENT_PAGE_EXAMPLE = {\n data: [ORGANIZATION_OAUTH_CLIENT_RECORD_EXAMPLE],\n pagination: { page: 1, limit: 20, total: 1, totalPages: 1 },\n} as const;\n\nconst ORGANIZATION_OAUTH_CLIENT_SUMMARY_PAGE_EXAMPLE = {\n data: [ORGANIZATION_OAUTH_CLIENT_SUMMARY_EXAMPLE],\n pagination: { page: 1, limit: 20, total: 1, totalPages: 1 },\n} as const;\n\nconst ORGANIZATION_OAUTH_CLIENT_NOT_FOUND_EXAMPLE = {\n error: {\n type: ErrorType.NOT_FOUND,\n severity: ErrorSeverity.LOW,\n message: 'Requested resource not found',\n customMessage: 'The OAuth client could not be found.',\n customMessageReference: ErrorCustomMessageReference.NOT_FOUND,\n timestamp: '2026-08-18T10:30:00.000Z',\n },\n} as const;\n\n/**\n * Framework-owned base specification for the organization-scoped\n * `organizationOAuthClients` resource.\n *\n * This resource is a FAITHFUL MIRROR of the api-keys resource\n * (`organization-api-keys.resource.specification.ts`) with a FOCUSED operation\n * set — core READ/LIST/SEARCH/CREATE/DELETE/COUNT plus custom ROTATE/REGENERATE.\n * The DEACTIVATE/REACTIVATE/EXTEND_EXPIRY/USAGE_STATS custom ops the api-keys\n * spec documents are intentionally deferred to the OIDC branch\n * (`.claude/plans/external-access-oidc-mcp-a2a.md`).\n *\n * Unlike api-keys, this resource ships NO UI behavior preset today, so — like\n * `jobExecutions` — it is authored from the shared resource factory only\n * (`resourceSpecification(...)`, no `resourceSpecificationFromFrontendConfiguration`\n * overlay). Its first useful semantic layer is the base operational model; the\n * label/layout/views frontend narration the api-keys spec carries has no preset\n * to document here.\n *\n * `resourcePrimaryScope: ORGANIZATIONS` — an organization OAuth client is\n * per-tenant data owned by the `organizationId` FK; the scope is enforced by the\n * spec ↔ registry alignment guard against the `isPrimaryScope: true` relationship\n * row for `OAUTH_CLIENTS_ORGANIZATION`.\n */\nexport const organizationOAuthClientsResourceSpecification = resourceSpecification(\n orgOAuthClientsFactory,\n OAuthClientOrganizationSchema,\n ({ schemaShape }) => ({\n purpose: 'Organization-scoped registered OAuth clients: client-credentials secrets used by org administrators and machine integrations to obtain tokens and call backend APIs in tenant context.',\n businessRole: 'First-class machine-to-machine OAuth credential for automation and partner integrations. Under client-credentials it authenticates the SAME organization machine principal (`ORGANIZATION_MACHINE`) that an organization API key does — a distinct credential type, not a distinct principal — and additionally supports authorization-code user delegation, which API keys cannot.',\n lifecycleRole: 'Created with optional expiry, can be rotated and regenerated, and deleted. The current token paths do not populate `lastUsedAt`, so retirement decisions require audit and workload evidence rather than this field alone.',\n audience: LabelAudience.DEVELOPER,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'OAuthClientOrganizationSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactory: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'orgOAuthClientsResourceConfiguration_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_CLIENTS_ORGANIZATION',\n },\n operationVocabulary: {\n coreEnum: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceOperation',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n customEnum: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'OrgOAuthClients_Operations',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n notes: [\n 'No UI behavior preset exists for this resource — authored backend-only (no frontend overlay), mirroring the `jobExecutions` shape rather than the api-keys mixed shape.',\n 'Runtime declares userNotifications with channel EMAIL + FRONT_END_SUCCESS on CREATE/DELETE/ROTATE/REGENERATE; DF-1 communications blocks are omitted from this pass to stay a structural mirror of the api-keys spec, which likewise documents no communications blocks.',\n ],\n },\n fields: {\n name: schemaShape.name.stringSpec({\n meaning: 'Human label for the OAuth client in admin UI and support.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n description: schemaShape.description.stringSpec({\n meaning: 'Operator-authored explanation of the integration that owns this credential and why it exists.',\n }),\n status: schemaShape.status.enumSpec({\n meaning: 'Whether the client can obtain tokens and authenticate traffic.',\n importance: FieldSemanticImportance.PRIMARY,\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'OAuthClientStatus',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n values: {\n [OAuthClientStatus.ACTIVE]: { meaning: 'Client may mint tokens within policy and expiry.' },\n [OAuthClientStatus.INACTIVE]: { meaning: 'Revoked or disabled; token exchanges should fail.' },\n [OAuthClientStatus.EXPIRED]: { meaning: 'Past its validity window; treat as invalid.' },\n },\n }),\n secretPrefix: schemaShape.secretPrefix.stringSpec({\n meaning: 'Short public prefix of the client secret material for list rows and support correlation (never the full secret).',\n }),\n roles: schemaShape.roles.arraySpec({\n meaning: 'Roles embedded on the client; every token minted for it inherits exactly these roles, bounding what the integration or automation principal may do (least-privilege).',\n elementMeaning: 'One role identifier — a core app/org role token or an app-defined custom role string.',\n // Element is a union of `CORE_APP_ROLES` + `CORE_ORG_ROLES` + a free\n // custom-role string; the shape validator requires ONE enum vocabulary\n // to advertise, so we name the org-scope enum (the primary vocabulary\n // for an organization client). App tokens and custom strings remain valid\n // per `elementMeaning`.\n elementType: {\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CORE_ORG_ROLES',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n }),\n allowedScopes: schemaShape.allowedScopes.arraySpec({\n meaning:\n 'Identity scopes this client may request in an authorization-code flow. These scopes select identity claims; authorization remains roles-only. Empty for a client-credentials-only machine client.',\n elementMeaning: 'One OAuth/OIDC identity scope allowed for this client, such as `openid`, `profile`, or `email`.',\n }),\n allowedGrants: schemaShape.allowedGrants.arraySpec({\n meaning: 'OAuth grant types this client is allowed to use. A token request using any other grant is refused.',\n elementMeaning: 'One permitted OAuth grant type.',\n elementType: {\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'OAuthGrantType',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n }),\n requiresConsent: schemaShape.requiresConsent.booleanSpec({\n meaning:\n 'Whether an authorization-code request must obtain explicit user consent before a code is issued. Machine-only client-credentials clients leave this false.',\n }),\n organizationId: schemaShape.organizationId.stringSpec({\n meaning: 'Owning organization; immutable after create.',\n }),\n expiresAt: schemaShape.expiresAt.dateSpec({ meaning: 'Optional automatic invalidation time.' }),\n lastUsedAt: schemaShape.lastUsedAt.dateSpec({\n meaning: 'Reserved timestamp for a recorded successful use. The current OAuth token paths do not populate it; an absent or old value is not evidence that the client is unused.',\n }),\n previousSecretPrefix: schemaShape.previousSecretPrefix.stringSpec({\n meaning: 'Public prefix of the previous secret retained during a rotation or regeneration overlap window.',\n }),\n previousSecretInvalidationDate: schemaShape.previousSecretInvalidationDate.dateSpec({\n meaning: 'After a rotation, when the PRIOR secret stops authenticating. During this grace window both the new and previous secrets work so integrations can migrate without downtime; absent/null after a regenerate means the prior secret stays valid until the next rotation.',\n }),\n redirectUris: schemaShape.redirectUris.arraySpec({\n meaning:\n 'Exact-match allowlist of post-authorization redirect targets for the authorization_code flow. A request redirect_uri must equal one entry by exact string (no wildcards/substrings), and each entry is itself constrained to a safe absolute URL — https for any host/port, or http only for a loopback host — with no fragment or embedded credentials, so a registered entry can never become an open-redirect or stored-XSS navigation target. Empty for pure client_credentials clients.',\n elementMeaning: 'One registered redirect URI: an https URL (any host/port) or an http loopback URL (localhost / 127.0.0.1 / ::1).',\n }),\n postLogoutRedirectUris: schemaShape.postLogoutRedirectUris.arraySpec({\n meaning:\n 'Exact-match allowlist of POST-LOGOUT redirect targets for OIDC RP-Initiated Logout. When a relying party ends the user session at /oauth/end-session with a post_logout_redirect_uri, that value must equal one entry by exact string (no wildcards/substrings) or the OP refuses to redirect back and lands the user on its own logged-out page. Each entry is constrained to a safe absolute URL — https for any host/port, or http only for a loopback host — with no fragment or embedded credentials, the same anti-open-redirect gate as redirectUris. Empty for clients that never drive an interactive logout.',\n elementMeaning: 'One registered post-logout redirect URI: an https URL (any host/port) or an http loopback URL (localhost / 127.0.0.1 / ::1).',\n }),\n registrationOrigin: schemaShape.registrationOrigin.enumSpec({\n meaning:\n 'WHO registered this client, which is a different question from which scope owns the row. Every client created through the admin APIs is OPERATOR — a principal with standing in this application vouched for it. DYNAMIC means an anonymous caller self-registered it at the RFC 7591 `/oauth/register` endpoint and proved nothing beyond reaching the server. The authorize path reads this field to decide TRUST: a DYNAMIC client is treated as belonging to no tenant, so it can never inherit the first-party posture its APPLICATION-scoped row would otherwise imply, always faces the interactive consent screen, and is capped at identity scopes. Server-managed and immutable — a caller able to set it could file itself as vouched-for.',\n importance: FieldSemanticImportance.CONTEXTUAL,\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'OAuthClientRegistrationOrigin',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n values: {\n [OAuthClientRegistrationOrigin.OPERATOR]: { meaning: 'Created by a principal with standing in this application (an administrator, a platform operator, or a seed). The default for authenticated administrative registration.' },\n [OAuthClientRegistrationOrigin.DYNAMIC]: { meaning: 'Self-registered anonymously through RFC 7591 dynamic client registration; unaffiliated, consent-always, identity scopes only.' },\n },\n }),\n tokenEndpointAuthMethod: schemaShape.tokenEndpointAuthMethod.enumSpec({\n meaning: 'Whether this client is PUBLIC (PKCE-only — no client secret at the token endpoint) or CONFIDENTIAL (must present its client_secret to redeem an authorization code or revoke a token). Defaults to public; a server-side client that can safely hold a secret opts into confidential.',\n importance: FieldSemanticImportance.CONTEXTUAL,\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'OAuthTokenEndpointAuthMethod',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n values: {\n [OAuthTokenEndpointAuthMethod.NONE]: { meaning: 'Public client: no secret at the token endpoint; authorization_code relies on PKCE S256 + exact redirect_uri.' },\n [OAuthTokenEndpointAuthMethod.CLIENT_SECRET_BASIC]: { meaning: 'Confidential client presenting its secret via HTTP Basic auth.' },\n [OAuthTokenEndpointAuthMethod.CLIENT_SECRET_POST]: { meaning: 'Confidential client presenting its secret in the request body.' },\n },\n }),\n },\n operations: {\n [Op.COUNT]: {\n purpose: 'Repository-only counts for entitlements and feature metering.',\n outcome: 'Numeric total of clients per scope without a public list.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The count of OAuth clients in scope is returned for entitlement/metering checks.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the operator/metering role; this repository-only count is not a member-facing surface.' },\n ],\n idempotent: true,\n },\n [Op.READ]: {\n purpose: 'Inspect one client (org admin default; app super-admin `admin` variant for cross-tenant).',\n outcome: 'Metadata and status without revealing raw secret material.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The client’s metadata and status are returned (never the raw secret material).' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an org admin for this client’s tenant (or lacks the super-admin `admin` role for cross-tenant reads).' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No OAuth client exists for the supplied id in the caller’s visible scope.' },\n ],\n idempotent: true,\n examples: [\n {\n title: 'Inspect a confidential organization integration client',\n response: ORGANIZATION_OAUTH_CLIENT_RECORD_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n variants: {\n context: {\n examples: [\n {\n title: 'Inspect the client through the context representation',\n response: ORGANIZATION_OAUTH_CLIENT_RECORD_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n summary: {\n examples: [\n {\n title: 'Inspect the client summary used in selectors',\n response: ORGANIZATION_OAUTH_CLIENT_SUMMARY_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n },\n },\n [Op.LIST]: {\n purpose: 'Enumerate clients the caller may see; members see a reduced roster vs admins.',\n outcome: 'Rows for security settings and admin consoles.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of OAuth clients the caller is permitted to see.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks any role that grants visibility into the organization’s OAuth-client roster.' },\n ],\n idempotent: true,\n examples: [\n {\n title: 'Browse organization OAuth clients',\n request: { page: 1, limit: 20, sort: 'createdAt:desc' },\n response: ORGANIZATION_OAUTH_CLIENT_PAGE_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n variants: {\n context: {\n examples: [\n {\n title: 'Browse clients through the context representation',\n request: { page: 1, limit: 20, sort: 'createdAt:desc' },\n response: ORGANIZATION_OAUTH_CLIENT_PAGE_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n summary: {\n examples: [\n {\n title: 'Browse compact client summaries',\n request: { page: 1, limit: 20, sort: 'createdAt:desc' },\n response: ORGANIZATION_OAUTH_CLIENT_SUMMARY_PAGE_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n },\n },\n [Op.SEARCH]: {\n purpose: 'Find registered clients by name, status, expiration, and the other documented search parameters.',\n outcome: 'A paginated set of clients matching the supplied filters and sort order.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of OAuth clients matching the search/filter query.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the role for the requested search scope (the broader-field filters require the super-admin `admin` variant).' },\n ],\n idempotent: true,\n examples: [\n {\n title: 'Find active expiring client-credentials integrations',\n request: {\n q: 'revenue',\n name: 'Revenue synchronization service',\n status: OAuthClientStatus.ACTIVE,\n hasExpiration: true,\n page: 1,\n limit: 20,\n sort: 'createdAt:desc',\n },\n response: ORGANIZATION_OAUTH_CLIENT_PAGE_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n [Op.CREATE]: {\n purpose: 'Register a new organization OAuth client and issue its first client secret.',\n outcome: 'The client is registered and its plaintext secret is returned exactly once. Store it before dismissing the response; later reads expose only its prefix.',\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'A new OAuth client is registered; the org-admin path returns the full plaintext secret exactly once in this response.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The create payload fails schema validation (e.g. missing `name`, malformed `expiresAt`).', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an org admin (or app-admin acting on the tenant) authorized to register OAuth clients.' },\n ],\n idempotent: false,\n rateLimitNote: 'Client registration is a credential-issuance path and may be rate-limited per organization to slow brute-force credential creation.',\n examples: [\n {\n title: 'Register a confidential organization machine client',\n request: {\n name: ORGANIZATION_OAUTH_CLIENT_RECORD_EXAMPLE.name,\n description: ORGANIZATION_OAUTH_CLIENT_RECORD_EXAMPLE.description,\n roles: ORGANIZATION_OAUTH_CLIENT_RECORD_EXAMPLE.roles,\n allowedScopes: ORGANIZATION_OAUTH_CLIENT_RECORD_EXAMPLE.allowedScopes,\n allowedGrants: ORGANIZATION_OAUTH_CLIENT_RECORD_EXAMPLE.allowedGrants,\n redirectUris: ORGANIZATION_OAUTH_CLIENT_RECORD_EXAMPLE.redirectUris,\n requiresConsent: ORGANIZATION_OAUTH_CLIENT_RECORD_EXAMPLE.requiresConsent,\n tokenEndpointAuthMethod: ORGANIZATION_OAUTH_CLIENT_RECORD_EXAMPLE.tokenEndpointAuthMethod,\n status: ORGANIZATION_OAUTH_CLIENT_RECORD_EXAMPLE.status,\n expiresAt: ORGANIZATION_OAUTH_CLIENT_RECORD_EXAMPLE.expiresAt,\n },\n response: {\n ...ORGANIZATION_OAUTH_CLIENT_RECORD_EXAMPLE,\n hashedSecret: 'd594ace6026589bb71deba4e2ae8f66018659182951d7539b9db14c630357564',\n plainSecret: 'oc_org_example-secret-returned-once',\n },\n forStatus: HttpResponseStatusCode.CREATED_201,\n },\n ],\n },\n [Op.DELETE]: {\n purpose: 'Permanently remove an organization OAuth client that is no longer needed.',\n outcome: 'The client can no longer obtain access tokens or authenticate API traffic.',\n responseStatuses: [\n { code: HttpResponseStatusCode.NO_CONTENT_204, meaning: 'The client was deleted and can no longer authenticate; no body is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the org-admin (or app-admin) role required to retire clients.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No OAuth client exists for the supplied id (or it was already deleted).' },\n ],\n idempotent: true,\n examples: [\n {\n title: 'A client that was already removed',\n response: ORGANIZATION_OAUTH_CLIENT_NOT_FOUND_EXAMPLE,\n forStatus: HttpResponseStatusCode.NOT_FOUND_404,\n },\n ],\n },\n [OrgOAuthClients_Operations.ROTATE]: {\n operationId: OrgOAuthClients_Operations.ROTATE,\n purpose: 'Issue a new secret and schedule invalidation of the previous material.',\n outcome: 'The new plaintext secret is returned exactly once. The previous secret remains valid until the requested invalidation time so callers can migrate without downtime.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A fresh secret is issued and returned once; the previous material is scheduled for invalidation.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the role to rotate this client (org-admin in tenant scope, or app-admin cross-tenant).' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The operation declares `requiresStepUpAuthentication`, and the request carried no valid single-use re-authentication token. Rotation hands back the replacement in plaintext and establishes when the previous secret becomes unusable, so holding a live session is deliberately not sufficient — obtain a token from the re-authentication route and retry with it.', errorCode: 'STEP_UP_REQUIRED' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No OAuth client exists for the supplied id in the caller’s scope.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The client is in a state that cannot be rotated (e.g. already revoked/expired), so reissuing the secret is an illegal transition.' },\n ],\n idempotent: false,\n rateLimitNote: 'Rotation issues new secret material and may be rate-limited to prevent rapid churn of live credentials.',\n examples: [\n {\n title: 'Rotate with a scheduled migration window',\n request: { oldSecretInvalidationDate: '2099-01-02T00:00:00.000Z' },\n response: {\n ...ORGANIZATION_OAUTH_CLIENT_RECORD_EXAMPLE,\n secretPrefix: 'oc_org_2',\n previousSecretPrefix: ORGANIZATION_OAUTH_CLIENT_RECORD_EXAMPLE.secretPrefix,\n previousSecretInvalidationDate: '2099-01-02T00:00:00.000Z',\n plainSecret: 'oc_org_rotated-secret-returned-once',\n oldClientId: ORGANIZATION_OAUTH_CLIENT_RECORD_EXAMPLE._id,\n oldSecretInvalidationDate: '2099-01-02T00:00:00.000Z',\n },\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n [OrgOAuthClients_Operations.REGENERATE]: {\n operationId: OrgOAuthClients_Operations.REGENERATE,\n purpose: 'Generate a new secret without a mandatory invalidation window for the old secret yet.',\n outcome: 'The new plaintext secret is returned exactly once while the previous secret remains valid until a later rotation completes the cutover.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A new secret is generated and returned once; the prior material stays valid to allow an overlap window.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the role to regenerate this client’s secret.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No OAuth client exists for the supplied id in the caller’s scope.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The client is not in a regenerable state (e.g. permanently revoked), so issuing fresh material is rejected.' },\n ],\n idempotent: false,\n rateLimitNote: 'Secret regeneration is a credential-issuance path and may be rate-limited per client.',\n examples: [\n {\n title: 'Regenerate while retaining the previous secret',\n request: {},\n response: {\n ...ORGANIZATION_OAUTH_CLIENT_RECORD_EXAMPLE,\n secretPrefix: 'oc_org_3',\n previousSecretPrefix: ORGANIZATION_OAUTH_CLIENT_RECORD_EXAMPLE.secretPrefix,\n plainSecret: 'oc_org_regenerated-secret-returned-once',\n },\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n },\n businessConstraints: [\n 'The plaintext secret is only returned on create/rotate/regenerate paths where the factory sets ephemeral response DTOs; companion copy must not imply clients can re-fetch full secrets later.',\n 'Super-admin `admin` HTTP variants mirror org-admin operations across tenants; wire RBAC to factory roles, not guesswork.',\n 'ROTATE/REGENERATE keep the PRIOR secret authenticating during a grace window (rotate: until `previousSecretInvalidationDate`; regenerate: until the next rotation), so the client-credentials exchange accepts the current OR the not-yet-invalidated previous secret — a rotation is an immediate hard cutover only when `oldSecretInvalidationDate` is now (the default).',\n ],\n }),\n { resourcePrimaryScope: ResourcePrimaryScope.ORGANIZATIONS },\n);\n"]}
1
+ {"version":3,"file":"organization-oauth-clients.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/auth/resources/organization-oauth-clients.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,WAAW,EACX,cAAc,EACd,qBAAqB,IAAI,EAAE,EAC3B,2BAA2B,EAC3B,aAAa,EACb,SAAS,EACT,cAAc,EACd,6BAA6B,EAC7B,6BAA6B,EAC7B,iBAAiB,EACjB,4BAA4B,EAC5B,0BAA0B,EAC1B,oBAAoB,EACpB,0DAA0D,IAAI,sBAAsB,GACrF,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAC5F,OAAO,EAAE,uBAAuB,EAAE,MAAM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AsB,CAAC,MAAM,EAAE,OAAO,EAAE,yGAAyG,EAAE;aAC5J;YACD,cAAc,EAAE;gBACd,EAAE,IAAI,EAAE,sBAAsB,CAAC,aAAa,EAAE,IAAI,EAAE,+DAA+D,EAAE;gBACrH,EAAE,IAAI,EAAE,sBAAsB,CAAC,aAAa,EAAE,IAAI,EAAE,mEAAmE,EAAE;gBACzH,EAAE,IAAI,EAAE,sBAAsB,CAAC,YAAY,EAAE,IAAI,EAAE,6GAA6G,EAAE;aACnK;YACD,UAAU,EAAE,KAAK;YACjB,aAAa,EAAE,uFAAuF;YACtG,QAAQ,EAAE;gBACR;oBACE,KAAK,EAAE,gDAAgD;oBACvD,OAAO,EAAE,EAAE;oBACX,QAAQ,EAAE;wBACR,GAAG,wCAAwC;wBAC3C,YAAY,EAAE,UAAU;wBACxB,oBAAoB,EAAE,wCAAwC,CAAC,YAAY;wBAC3E,WAAW,EAAE,yCAAyC;qBACvD;oBACD,SAAS,EAAE,sBAAsB,CAAC,MAAM;iBACzC;aACF;SACF;KACF;IACD,mBAAmB,EAAE;QACnB,gMAAgM;QAChM,0HAA0H;QAC1H,6WAA6W;KAC9W;CACF,CAAC,EACF,EAAE,oBAAoB,EAAE,oBAAoB,CAAC,aAAa,EAAE,CAC7D,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 ApiKeyScope,\n CORE_ORG_ROLES,\n CoreResourceOperation as Op,\n ErrorCustomMessageReference,\n ErrorSeverity,\n ErrorType,\n OAuthGrantType,\n OAuthClientOrganizationSchema,\n OAuthClientRegistrationOrigin,\n OAuthClientStatus,\n OAuthTokenEndpointAuthMethod,\n OrgOAuthClients_Operations,\n ResourcePrimaryScope,\n orgOAuthClientsResourceConfiguration_InitializationFactory as orgOAuthClientsFactory,\n} from '@wildo-ai/saas-models';\nimport { HttpResponseStatusCode, resourceSpecification } from '~wildo-specifications/_core';\nimport { EngineResourceSubDomain } from '../../engine-resource-sub-domain';\n\nconst ORGANIZATION_OAUTH_CLIENT_RECORD_EXAMPLE = {\n _id: 'oauth_client_org_01HX2EXAMPLE',\n name: 'Revenue synchronization service',\n description: 'Confidential machine client used by the revenue synchronization worker.',\n scope: ApiKeyScope.ORGANIZATION,\n roles: [CORE_ORG_ROLES.ORG_MEMBER],\n allowedScopes: [],\n allowedGrants: [OAuthGrantType.CLIENT_CREDENTIALS],\n redirectUris: [],\n postLogoutRedirectUris: [],\n requiresConsent: false,\n tokenEndpointAuthMethod: OAuthTokenEndpointAuthMethod.CLIENT_SECRET_BASIC,\n status: OAuthClientStatus.ACTIVE,\n expiresAt: '2099-01-01T00:00:00.000Z',\n createdAt: '2026-08-01T09:00:00.000Z',\n updatedAt: '2026-08-17T14:20:00.000Z',\n secretPrefix: 'oc_org_1',\n registrationOrigin: OAuthClientRegistrationOrigin.OPERATOR,\n organizationId: 'organization_01HX2EXAMPLE',\n} as const;\n\nconst ORGANIZATION_OAUTH_CLIENT_SUMMARY_EXAMPLE = {\n _id: ORGANIZATION_OAUTH_CLIENT_RECORD_EXAMPLE._id,\n name: ORGANIZATION_OAUTH_CLIENT_RECORD_EXAMPLE.name,\n tokenEndpointAuthMethod: ORGANIZATION_OAUTH_CLIENT_RECORD_EXAMPLE.tokenEndpointAuthMethod,\n status: ORGANIZATION_OAUTH_CLIENT_RECORD_EXAMPLE.status,\n expiresAt: ORGANIZATION_OAUTH_CLIENT_RECORD_EXAMPLE.expiresAt,\n createdAt: ORGANIZATION_OAUTH_CLIENT_RECORD_EXAMPLE.createdAt,\n secretPrefix: ORGANIZATION_OAUTH_CLIENT_RECORD_EXAMPLE.secretPrefix,\n registrationOrigin: ORGANIZATION_OAUTH_CLIENT_RECORD_EXAMPLE.registrationOrigin,\n organizationId: ORGANIZATION_OAUTH_CLIENT_RECORD_EXAMPLE.organizationId,\n} as const;\n\nconst ORGANIZATION_OAUTH_CLIENT_PAGE_EXAMPLE = {\n data: [ORGANIZATION_OAUTH_CLIENT_RECORD_EXAMPLE],\n pagination: { page: 1, limit: 20, total: 1, totalPages: 1 },\n} as const;\n\nconst ORGANIZATION_OAUTH_CLIENT_SUMMARY_PAGE_EXAMPLE = {\n data: [ORGANIZATION_OAUTH_CLIENT_SUMMARY_EXAMPLE],\n pagination: { page: 1, limit: 20, total: 1, totalPages: 1 },\n} as const;\n\nconst ORGANIZATION_OAUTH_CLIENT_NOT_FOUND_EXAMPLE = {\n error: {\n type: ErrorType.NOT_FOUND,\n severity: ErrorSeverity.LOW,\n message: 'Requested resource not found',\n customMessage: 'The OAuth client could not be found.',\n customMessageReference: ErrorCustomMessageReference.NOT_FOUND,\n timestamp: '2026-08-18T10:30:00.000Z',\n },\n} as const;\n\n/**\n * Framework-owned base specification for the organization-scoped\n * `organizationOAuthClients` resource.\n *\n * This resource is a FAITHFUL MIRROR of the api-keys resource\n * (`organization-api-keys.resource.specification.ts`) with a FOCUSED operation\n * set — core READ/LIST/SEARCH/CREATE/DELETE/COUNT plus custom ROTATE/REGENERATE.\n * The DEACTIVATE/REACTIVATE/EXTEND_EXPIRY/USAGE_STATS custom ops the api-keys\n * spec documents are intentionally deferred to the OIDC branch\n * (`.claude/plans/external-access-oidc-mcp-a2a.md`).\n *\n * Unlike api-keys, this resource ships NO UI behavior preset today, so — like\n * `jobExecutions` — it is authored from the shared resource factory only\n * (`resourceSpecification(...)`, no `resourceSpecificationFromFrontendConfiguration`\n * overlay). Its first useful semantic layer is the base operational model; the\n * label/layout/views frontend narration the api-keys spec carries has no preset\n * to document here.\n *\n * `resourcePrimaryScope: ORGANIZATIONS` — an organization OAuth client is\n * per-tenant data owned by the `organizationId` FK; the scope is enforced by the\n * spec ↔ registry alignment guard against the `isPrimaryScope: true` relationship\n * row for `OAUTH_CLIENTS_ORGANIZATION`.\n */\nexport const organizationOAuthClientsResourceSpecification = resourceSpecification(\n orgOAuthClientsFactory,\n OAuthClientOrganizationSchema,\n ({ schemaShape }) => ({\n purpose: 'Organization-scoped registered OAuth clients: client-credentials secrets used by org administrators and machine integrations to obtain tokens and call backend APIs in tenant context.',\n businessRole: 'First-class machine-to-machine OAuth credential for automation and partner integrations. Under client-credentials it authenticates the SAME organization machine principal (`ORGANIZATION_MACHINE`) that an organization API key does — a distinct credential type, not a distinct principal — and additionally supports authorization-code user delegation, which API keys cannot.',\n lifecycleRole: 'Created with optional expiry, can be rotated and regenerated, and deleted. The current token paths do not populate `lastUsedAt`, so retirement decisions require audit and workload evidence rather than this field alone.',\n audience: LabelAudience.DEVELOPER,\n subDomain: EngineResourceSubDomain.AUTH,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'OAuthClientOrganizationSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactory: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'orgOAuthClientsResourceConfiguration_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_CLIENTS_ORGANIZATION',\n },\n operationVocabulary: {\n coreEnum: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceOperation',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n customEnum: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'OrgOAuthClients_Operations',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n notes: [\n 'No UI behavior preset exists for this resource — authored backend-only (no frontend overlay), mirroring the `jobExecutions` shape rather than the api-keys mixed shape.',\n 'Runtime declares userNotifications with channel EMAIL + FRONT_END_SUCCESS on CREATE/DELETE/ROTATE/REGENERATE; DF-1 communications blocks are omitted from this pass to stay a structural mirror of the api-keys spec, which likewise documents no communications blocks.',\n ],\n },\n fields: {\n name: schemaShape.name.stringSpec({\n meaning: 'Human label for the OAuth client in admin UI and support.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n description: schemaShape.description.stringSpec({\n meaning: 'Operator-authored explanation of the integration that owns this credential and why it exists.',\n }),\n status: schemaShape.status.enumSpec({\n meaning: 'Whether the client can obtain tokens and authenticate traffic.',\n importance: FieldSemanticImportance.PRIMARY,\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'OAuthClientStatus',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n values: {\n [OAuthClientStatus.ACTIVE]: { meaning: 'Client may mint tokens within policy and expiry.' },\n [OAuthClientStatus.INACTIVE]: { meaning: 'Revoked or disabled; token exchanges should fail.' },\n [OAuthClientStatus.EXPIRED]: { meaning: 'Past its validity window; treat as invalid.' },\n },\n }),\n secretPrefix: schemaShape.secretPrefix.stringSpec({\n meaning: 'Short public prefix of the client secret material for list rows and support correlation (never the full secret).',\n }),\n roles: schemaShape.roles.arraySpec({\n meaning: 'Roles embedded on the client; every token minted for it inherits exactly these roles, bounding what the integration or automation principal may do (least-privilege).',\n elementMeaning: 'One role identifier — a core app/org role token or an app-defined custom role string.',\n // Element is a union of `CORE_APP_ROLES` + `CORE_ORG_ROLES` + a free\n // custom-role string; the shape validator requires ONE enum vocabulary\n // to advertise, so we name the org-scope enum (the primary vocabulary\n // for an organization client). App tokens and custom strings remain valid\n // per `elementMeaning`.\n elementType: {\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CORE_ORG_ROLES',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n }),\n allowedScopes: schemaShape.allowedScopes.arraySpec({\n meaning:\n 'Identity scopes this client may request in an authorization-code flow. These scopes select identity claims; authorization remains roles-only. Empty for a client-credentials-only machine client.',\n elementMeaning: 'One OAuth/OIDC identity scope allowed for this client, such as `openid`, `profile`, or `email`.',\n }),\n allowedGrants: schemaShape.allowedGrants.arraySpec({\n meaning: 'OAuth grant types this client is allowed to use. A token request using any other grant is refused.',\n elementMeaning: 'One permitted OAuth grant type.',\n elementType: {\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'OAuthGrantType',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n }),\n requiresConsent: schemaShape.requiresConsent.booleanSpec({\n meaning:\n 'Whether an authorization-code request must obtain explicit user consent before a code is issued. Machine-only client-credentials clients leave this false.',\n }),\n organizationId: schemaShape.organizationId.stringSpec({\n meaning: 'Owning organization; immutable after create.',\n }),\n expiresAt: schemaShape.expiresAt.dateSpec({ meaning: 'Optional automatic invalidation time.' }),\n lastUsedAt: schemaShape.lastUsedAt.dateSpec({\n meaning: 'Reserved timestamp for a recorded successful use. The current OAuth token paths do not populate it; an absent or old value is not evidence that the client is unused.',\n }),\n previousSecretPrefix: schemaShape.previousSecretPrefix.stringSpec({\n meaning: 'Public prefix of the previous secret retained during a rotation or regeneration overlap window.',\n }),\n previousSecretInvalidationDate: schemaShape.previousSecretInvalidationDate.dateSpec({\n meaning: 'After a rotation, when the PRIOR secret stops authenticating. During this grace window both the new and previous secrets work so integrations can migrate without downtime; absent/null after a regenerate means the prior secret stays valid until the next rotation.',\n }),\n redirectUris: schemaShape.redirectUris.arraySpec({\n meaning:\n 'Exact-match allowlist of post-authorization redirect targets for the authorization_code flow. A request redirect_uri must equal one entry by exact string (no wildcards/substrings), and each entry is itself constrained to a safe absolute URL — https for any host/port, or http only for a loopback host — with no fragment or embedded credentials, so a registered entry can never become an open-redirect or stored-XSS navigation target. Empty for pure client_credentials clients.',\n elementMeaning: 'One registered redirect URI: an https URL (any host/port) or an http loopback URL (localhost / 127.0.0.1 / ::1).',\n }),\n postLogoutRedirectUris: schemaShape.postLogoutRedirectUris.arraySpec({\n meaning:\n 'Exact-match allowlist of POST-LOGOUT redirect targets for OIDC RP-Initiated Logout. When a relying party ends the user session at /oauth/end-session with a post_logout_redirect_uri, that value must equal one entry by exact string (no wildcards/substrings) or the OP refuses to redirect back and lands the user on its own logged-out page. Each entry is constrained to a safe absolute URL — https for any host/port, or http only for a loopback host — with no fragment or embedded credentials, the same anti-open-redirect gate as redirectUris. Empty for clients that never drive an interactive logout.',\n elementMeaning: 'One registered post-logout redirect URI: an https URL (any host/port) or an http loopback URL (localhost / 127.0.0.1 / ::1).',\n }),\n registrationOrigin: schemaShape.registrationOrigin.enumSpec({\n meaning:\n 'WHO registered this client, which is a different question from which scope owns the row. Every client created through the admin APIs is OPERATOR — a principal with standing in this application vouched for it. DYNAMIC means an anonymous caller self-registered it at the RFC 7591 `/oauth/register` endpoint and proved nothing beyond reaching the server. The authorize path reads this field to decide TRUST: a DYNAMIC client is treated as belonging to no tenant, so it can never inherit the first-party posture its APPLICATION-scoped row would otherwise imply, always faces the interactive consent screen, and is capped at identity scopes. Server-managed and immutable — a caller able to set it could file itself as vouched-for.',\n importance: FieldSemanticImportance.CONTEXTUAL,\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'OAuthClientRegistrationOrigin',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n values: {\n [OAuthClientRegistrationOrigin.OPERATOR]: { meaning: 'Created by a principal with standing in this application (an administrator, a platform operator, or a seed). The default for authenticated administrative registration.' },\n [OAuthClientRegistrationOrigin.DYNAMIC]: { meaning: 'Self-registered anonymously through RFC 7591 dynamic client registration; unaffiliated, consent-always, identity scopes only.' },\n },\n }),\n tokenEndpointAuthMethod: schemaShape.tokenEndpointAuthMethod.enumSpec({\n meaning: 'How the client authenticates at the token endpoint: `none` for a public client (PKCE only, no client secret), or `client_secret_basic` / `client_secret_post` for a confidential client that presents its client_secret to redeem an authorization code or revoke a token. Defaults to `none`; a server-side client that can safely hold a secret opts into one of the secret-bearing methods.',\n importance: FieldSemanticImportance.CONTEXTUAL,\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'OAuthTokenEndpointAuthMethod',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n values: {\n [OAuthTokenEndpointAuthMethod.NONE]: { meaning: 'Public client: no secret at the token endpoint; authorization_code relies on PKCE S256 + exact redirect_uri.' },\n [OAuthTokenEndpointAuthMethod.CLIENT_SECRET_BASIC]: { meaning: 'Confidential client presenting its secret via HTTP Basic auth.' },\n [OAuthTokenEndpointAuthMethod.CLIENT_SECRET_POST]: { meaning: 'Confidential client presenting its secret in the request body.' },\n },\n }),\n },\n operations: {\n [Op.COUNT]: {\n purpose: 'Repository-only counts for entitlements and feature metering.',\n outcome: 'Numeric total of clients per scope without a public list.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The count of OAuth clients in scope is returned for entitlement/metering checks.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the operator/metering role; this repository-only count is not a member-facing surface.' },\n ],\n idempotent: true,\n },\n [Op.READ]: {\n purpose: 'Inspect one client (org admin default; app super-admin `admin` variant for cross-tenant).',\n outcome: 'Metadata and status without revealing raw secret material.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The client’s metadata and status are returned (never the raw secret material).' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an org admin for this client’s tenant (or lacks the super-admin `admin` role for cross-tenant reads).' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No OAuth client exists for the supplied id in the caller’s visible scope.' },\n ],\n idempotent: true,\n examples: [\n {\n title: 'Inspect a confidential organization integration client',\n response: ORGANIZATION_OAUTH_CLIENT_RECORD_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n variants: {\n context: {\n examples: [\n {\n title: 'Inspect the client through the context representation',\n response: ORGANIZATION_OAUTH_CLIENT_RECORD_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n summary: {\n examples: [\n {\n title: 'Inspect the client summary used in selectors',\n response: ORGANIZATION_OAUTH_CLIENT_SUMMARY_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n },\n },\n [Op.LIST]: {\n purpose: 'Enumerate clients the caller may see; members see a reduced roster vs admins.',\n outcome: 'Rows for security settings and admin consoles.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of OAuth clients the caller is permitted to see.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks any role that grants visibility into the organization’s OAuth-client roster.' },\n ],\n idempotent: true,\n examples: [\n {\n title: 'Browse organization OAuth clients',\n request: { page: 1, limit: 20, sort: 'createdAt:desc' },\n response: ORGANIZATION_OAUTH_CLIENT_PAGE_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n variants: {\n context: {\n examples: [\n {\n title: 'Browse clients through the context representation',\n request: { page: 1, limit: 20, sort: 'createdAt:desc' },\n response: ORGANIZATION_OAUTH_CLIENT_PAGE_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n summary: {\n examples: [\n {\n title: 'Browse compact client summaries',\n request: { page: 1, limit: 20, sort: 'createdAt:desc' },\n response: ORGANIZATION_OAUTH_CLIENT_SUMMARY_PAGE_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n },\n },\n [Op.SEARCH]: {\n purpose: 'Find registered clients by name, status, expiration, and the other documented search parameters.',\n outcome: 'A paginated set of clients matching the supplied filters and sort order.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of OAuth clients matching the search/filter query.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the role for the requested search scope (the broader-field filters require the super-admin `admin` variant).' },\n ],\n idempotent: true,\n examples: [\n {\n title: 'Find active expiring client-credentials integrations',\n request: {\n q: 'revenue',\n name: 'Revenue synchronization service',\n status: OAuthClientStatus.ACTIVE,\n hasExpiration: true,\n page: 1,\n limit: 20,\n sort: 'createdAt:desc',\n },\n response: ORGANIZATION_OAUTH_CLIENT_PAGE_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n [Op.CREATE]: {\n purpose: 'Register a new organization OAuth client and issue its first client secret.',\n outcome: 'The client is registered and its plaintext secret is returned exactly once. Store it before dismissing the response; later reads expose only its prefix.',\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'A new OAuth client is registered; the org-admin path returns the full plaintext secret exactly once in this response.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The create payload fails schema validation (e.g. missing `name`, malformed `expiresAt`).', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an org admin (or app-admin acting on the tenant) authorized to register OAuth clients.' },\n ],\n idempotent: false,\n rateLimitNote: 'Client registration is a credential-issuance path and may be rate-limited per organization to slow brute-force credential creation.',\n examples: [\n {\n title: 'Register a confidential organization machine client',\n request: {\n name: ORGANIZATION_OAUTH_CLIENT_RECORD_EXAMPLE.name,\n description: ORGANIZATION_OAUTH_CLIENT_RECORD_EXAMPLE.description,\n roles: ORGANIZATION_OAUTH_CLIENT_RECORD_EXAMPLE.roles,\n allowedScopes: ORGANIZATION_OAUTH_CLIENT_RECORD_EXAMPLE.allowedScopes,\n allowedGrants: ORGANIZATION_OAUTH_CLIENT_RECORD_EXAMPLE.allowedGrants,\n redirectUris: ORGANIZATION_OAUTH_CLIENT_RECORD_EXAMPLE.redirectUris,\n requiresConsent: ORGANIZATION_OAUTH_CLIENT_RECORD_EXAMPLE.requiresConsent,\n tokenEndpointAuthMethod: ORGANIZATION_OAUTH_CLIENT_RECORD_EXAMPLE.tokenEndpointAuthMethod,\n status: ORGANIZATION_OAUTH_CLIENT_RECORD_EXAMPLE.status,\n expiresAt: ORGANIZATION_OAUTH_CLIENT_RECORD_EXAMPLE.expiresAt,\n },\n response: {\n ...ORGANIZATION_OAUTH_CLIENT_RECORD_EXAMPLE,\n hashedSecret: 'd594ace6026589bb71deba4e2ae8f66018659182951d7539b9db14c630357564',\n plainSecret: 'oc_org_example-secret-returned-once',\n },\n forStatus: HttpResponseStatusCode.CREATED_201,\n },\n ],\n },\n [Op.DELETE]: {\n purpose: 'Permanently remove an organization OAuth client that is no longer needed.',\n outcome: 'The client can no longer obtain access tokens or authenticate API traffic.',\n responseStatuses: [\n { code: HttpResponseStatusCode.NO_CONTENT_204, meaning: 'The client was deleted and can no longer authenticate; no body is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the org-admin (or app-admin) role required to retire clients.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No OAuth client exists for the supplied id (or it was already deleted).' },\n ],\n idempotent: true,\n examples: [\n {\n title: 'A client that was already removed',\n response: ORGANIZATION_OAUTH_CLIENT_NOT_FOUND_EXAMPLE,\n forStatus: HttpResponseStatusCode.NOT_FOUND_404,\n },\n ],\n },\n [OrgOAuthClients_Operations.ROTATE]: {\n operationId: OrgOAuthClients_Operations.ROTATE,\n purpose: 'Issue a new secret and schedule invalidation of the previous material.',\n outcome: 'The new plaintext secret is returned exactly once. The previous secret remains valid until the requested invalidation time so callers can migrate without downtime.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A fresh secret is issued and returned once; the previous material is scheduled for invalidation.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the role to rotate this client (org-admin in tenant scope, or app-admin cross-tenant).' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The operation declares `requiresStepUpAuthentication`, and the request carried no valid single-use re-authentication token. Rotation hands back the replacement in plaintext and establishes when the previous secret becomes unusable, so holding a live session is deliberately not sufficient — obtain a token from the re-authentication route and retry with it.', errorCode: 'STEP_UP_REQUIRED' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No OAuth client exists for the supplied id in the caller’s scope.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The client is in a state that cannot be rotated (e.g. already revoked/expired), so reissuing the secret is an illegal transition.' },\n ],\n idempotent: false,\n rateLimitNote: 'Rotation issues new secret material and may be rate-limited to prevent rapid churn of live credentials.',\n examples: [\n {\n title: 'Rotate with a scheduled migration window',\n request: { oldSecretInvalidationDate: '2099-01-02T00:00:00.000Z' },\n response: {\n ...ORGANIZATION_OAUTH_CLIENT_RECORD_EXAMPLE,\n secretPrefix: 'oc_org_2',\n previousSecretPrefix: ORGANIZATION_OAUTH_CLIENT_RECORD_EXAMPLE.secretPrefix,\n previousSecretInvalidationDate: '2099-01-02T00:00:00.000Z',\n plainSecret: 'oc_org_rotated-secret-returned-once',\n oldClientId: ORGANIZATION_OAUTH_CLIENT_RECORD_EXAMPLE._id,\n oldSecretInvalidationDate: '2099-01-02T00:00:00.000Z',\n },\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n [OrgOAuthClients_Operations.REGENERATE]: {\n operationId: OrgOAuthClients_Operations.REGENERATE,\n purpose: 'Generate a new secret without a mandatory invalidation window for the old secret yet.',\n outcome: 'The new plaintext secret is returned exactly once while the previous secret remains valid until a later rotation completes the cutover.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A new secret is generated and returned once; the prior material stays valid to allow an overlap window.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the role to regenerate this client’s secret.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No OAuth client exists for the supplied id in the caller’s scope.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The client is not in a regenerable state (e.g. permanently revoked), so issuing fresh material is rejected.' },\n ],\n idempotent: false,\n rateLimitNote: 'Secret regeneration is a credential-issuance path and may be rate-limited per client.',\n examples: [\n {\n title: 'Regenerate while retaining the previous secret',\n request: {},\n response: {\n ...ORGANIZATION_OAUTH_CLIENT_RECORD_EXAMPLE,\n secretPrefix: 'oc_org_3',\n previousSecretPrefix: ORGANIZATION_OAUTH_CLIENT_RECORD_EXAMPLE.secretPrefix,\n plainSecret: 'oc_org_regenerated-secret-returned-once',\n },\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n },\n businessConstraints: [\n 'The plaintext secret is only returned on create/rotate/regenerate paths where the factory sets ephemeral response DTOs; companion copy must not imply clients can re-fetch full secrets later.',\n 'Super-admin `admin` HTTP variants mirror org-admin operations across tenants; wire RBAC to factory roles, not guesswork.',\n 'ROTATE/REGENERATE keep the PRIOR secret authenticating during a grace window (rotate: until `previousSecretInvalidationDate`; regenerate: until the next rotation), so the client-credentials exchange accepts the current OR the not-yet-invalidated previous secret — a rotation is an immediate hard cutover only when `oldSecretInvalidationDate` is now (the default).',\n ],\n }),\n { resourcePrimaryScope: ResourcePrimaryScope.ORGANIZATIONS },\n);\n"]}
@@ -24,7 +24,7 @@
24
24
  * carrying `isPrimaryScope: true`; the runtime config deliberately does not restate it.
25
25
  */
26
26
  import { CoreResourceOperation as Op, PlatformAccessGrantAutoApprovalReason, PlatformAccessGrantStatus, PlatformAccessGrants_Operations } from '@wildo-ai/saas-models';
27
- export declare const platformAccessGrantsResourceSpecification: import("../../../_core").ResourceSpecificationConfig<typeof PlatformAccessGrants_Operations, Op.READ | Op.DELETE | Op.LIST | Op.COUNT, import("zod").ZodObject<{
27
+ export declare const platformAccessGrantsResourceSpecification: import("../../../_core").ResourceSpecificationConfig<typeof PlatformAccessGrants_Operations, Op.READ | Op.UPDATE_MANY | Op.DELETE | Op.LIST | Op.COUNT, import("zod").ZodObject<{
28
28
  _id: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodString>>;
29
29
  organizationId: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodString>>>>>;
30
30
  operatorUserId: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodString>>>>>>;
@@ -1 +1 @@
1
- {"version":3,"file":"platform-access-grants.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/auth/resources/platform-access-grants.resource.specification.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAQH,OAAO,EACL,qBAAqB,IAAI,EAAE,EAE3B,qCAAqC,EAErC,yBAAyB,EACzB,+BAA+B,EAGhC,MAAM,uBAAuB,CAAC;AAkE/B,eAAO,MAAM,yCAAyC;;;;;;;;;;;;;iCAiarD,CAAC"}
1
+ {"version":3,"file":"platform-access-grants.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/auth/resources/platform-access-grants.resource.specification.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAQH,OAAO,EACL,qBAAqB,IAAI,EAAE,EAE3B,qCAAqC,EAErC,yBAAyB,EACzB,+BAA+B,EAGhC,MAAM,uBAAuB,CAAC;AAmE/B,eAAO,MAAM,yCAAyC;;;;;;;;;;;;;iCAkarD,CAAC"}
@@ -27,6 +27,7 @@ import { LabelAudience } from '@wildo-ai/presets-components-models';
27
27
  import { CodeDeclarationKind, CodeSymbolKind, FieldSemanticImportance, } from '@wildo-ai/zod-decorators';
28
28
  import { CoreResourceOperation as Op, CoreUserNotificationTarget, PlatformAccessGrantAutoApprovalReason, PlatformAccessGrantSchema, PlatformAccessGrantStatus, PlatformAccessGrants_Operations, ResourcePrimaryScope, platformAccessGrantsResourceConfiguration_InitializationFactory, } from '@wildo-ai/saas-models';
29
29
  import { HttpResponseStatusCode, resourceSpecification } from '../../../_core/index.js';
30
+ import { EngineResourceSubDomain } from '../../engine-resource-sub-domain.js';
30
31
  const TENANT_CONSENT_AUDIENCE = 'Administrators of the TARGET tenant — the party whose data is about to be reached into, and the only party who can refuse.';
31
32
  const TENANT_CONSENT_TONE = 'Direct and factual, and never reassuring by omission: name the operator, the reason they gave, and the window they asked for, so the recipient can decide rather than merely be informed.';
32
33
  const PLATFORM_ACCESS_EXAMPLE_ORGANIZATION_ID = 'org_01J4P8F1M2N3Q4R5S6T7V8W9XY';
@@ -87,6 +88,7 @@ export const platformAccessGrantsResourceSpecification = resourceSpecification(p
87
88
  businessRole: 'The organization\'s support-access ledger. It answers who requested access, why they requested it, how long the window lasts, whether an administrator approved it and when access ended.',
88
89
  lifecycleRole: 'An authorized support operator creates a request. It waits for an organization administrator when approval is required, or becomes active immediately with an explicit automatic-approval reason. An administrator can approve or deny a pending request; either side can revoke pending or active access; expiry ends access automatically. Completed requests remain available as access-review history.',
89
90
  audience: LabelAudience.ADMIN,
91
+ subDomain: EngineResourceSubDomain.AUTH,
90
92
  codeHandling: {
91
93
  mainSchema: {
92
94
  packageName: '@wildo-ai/saas-models',