@wildo-ai/saas-specifications 1.1.2 → 1.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (410) hide show
  1. package/dist/esm/_core/brand/brand-asset.schemas.d.ts +4 -6
  2. package/dist/esm/_core/brand/brand-asset.schemas.d.ts.map +1 -1
  3. package/dist/esm/_core/brand/brand-asset.schemas.js +4 -12
  4. package/dist/esm/_core/brand/brand-asset.schemas.js.map +1 -1
  5. package/dist/esm/_core/brand/brand-generation.schemas.d.ts +5 -3
  6. package/dist/esm/_core/brand/brand-generation.schemas.d.ts.map +1 -1
  7. package/dist/esm/_core/brand/brand-generation.schemas.js +5 -2
  8. package/dist/esm/_core/brand/brand-generation.schemas.js.map +1 -1
  9. package/dist/esm/_core/brand/brand-snapshot.schemas.d.ts +10 -3
  10. package/dist/esm/_core/brand/brand-snapshot.schemas.d.ts.map +1 -1
  11. package/dist/esm/_core/brand/brand-snapshot.schemas.js +10 -2
  12. package/dist/esm/_core/brand/brand-snapshot.schemas.js.map +1 -1
  13. package/dist/esm/_core/build-plan/build-plan-task-graph-generation.schemas.d.ts.map +1 -1
  14. package/dist/esm/_core/build-plan/build-plan-task-graph-generation.schemas.js +15 -5
  15. package/dist/esm/_core/build-plan/build-plan-task-graph-generation.schemas.js.map +1 -1
  16. package/dist/esm/_core/build-plan/build-plan-task-graph-validation.d.ts +40 -3
  17. package/dist/esm/_core/build-plan/build-plan-task-graph-validation.d.ts.map +1 -1
  18. package/dist/esm/_core/build-plan/build-plan-task-graph-validation.js +85 -6
  19. package/dist/esm/_core/build-plan/build-plan-task-graph-validation.js.map +1 -1
  20. package/dist/esm/_core/business-model-lite/business-model-lite-snapshot-generation.schemas.d.ts.map +1 -1
  21. package/dist/esm/_core/business-model-lite/business-model-lite-snapshot-generation.schemas.js +10 -4
  22. package/dist/esm/_core/business-model-lite/business-model-lite-snapshot-generation.schemas.js.map +1 -1
  23. package/dist/esm/_core/business-model-lite/business-model-lite-snapshot-validation.d.ts +15 -0
  24. package/dist/esm/_core/business-model-lite/business-model-lite-snapshot-validation.d.ts.map +1 -1
  25. package/dist/esm/_core/business-model-lite/business-model-lite-snapshot-validation.js.map +1 -1
  26. package/dist/esm/_core/compliance-documents/compliance-document-candidate.schemas.d.ts +10 -0
  27. package/dist/esm/_core/compliance-documents/compliance-document-candidate.schemas.d.ts.map +1 -1
  28. package/dist/esm/_core/compliance-documents/compliance-document-candidate.schemas.js +17 -0
  29. package/dist/esm/_core/compliance-documents/compliance-document-candidate.schemas.js.map +1 -1
  30. package/dist/esm/_core/expert-personas/expert-persona-charter.schemas.d.ts +6 -7
  31. package/dist/esm/_core/expert-personas/expert-persona-charter.schemas.d.ts.map +1 -1
  32. package/dist/esm/_core/expert-personas/expert-persona-charter.schemas.js +6 -13
  33. package/dist/esm/_core/expert-personas/expert-persona-charter.schemas.js.map +1 -1
  34. package/dist/esm/_core/expert-personas/expert-persona-validation.d.ts +0 -11
  35. package/dist/esm/_core/expert-personas/expert-persona-validation.d.ts.map +1 -1
  36. package/dist/esm/_core/expert-personas/expert-persona-validation.js +0 -19
  37. package/dist/esm/_core/expert-personas/expert-persona-validation.js.map +1 -1
  38. package/dist/esm/_core/expert-personas/expert-role-template.schemas.d.ts +1 -2
  39. package/dist/esm/_core/expert-personas/expert-role-template.schemas.d.ts.map +1 -1
  40. package/dist/esm/_core/expert-personas/expert-role-template.schemas.js +1 -2
  41. package/dist/esm/_core/expert-personas/expert-role-template.schemas.js.map +1 -1
  42. package/dist/esm/_core/feature-drafts/feature-specification-drafts-generation.schemas.d.ts.map +1 -1
  43. package/dist/esm/_core/feature-drafts/feature-specification-drafts-generation.schemas.js +17 -4
  44. package/dist/esm/_core/feature-drafts/feature-specification-drafts-generation.schemas.js.map +1 -1
  45. package/dist/esm/_core/index.d.ts +1 -0
  46. package/dist/esm/_core/index.d.ts.map +1 -1
  47. package/dist/esm/_core/index.js +1 -0
  48. package/dist/esm/_core/index.js.map +1 -1
  49. package/dist/esm/_core/market/market-snapshot-generation.schemas.d.ts.map +1 -1
  50. package/dist/esm/_core/market/market-snapshot-generation.schemas.js +5 -40
  51. package/dist/esm/_core/market/market-snapshot-generation.schemas.js.map +1 -1
  52. package/dist/esm/_core/market/market-snapshot-validation.d.ts +15 -0
  53. package/dist/esm/_core/market/market-snapshot-validation.d.ts.map +1 -1
  54. package/dist/esm/_core/market/market-snapshot-validation.js.map +1 -1
  55. package/dist/esm/_core/placement-plan/placement-plan-generation.schemas.d.ts.map +1 -1
  56. package/dist/esm/_core/placement-plan/placement-plan-generation.schemas.js +11 -5
  57. package/dist/esm/_core/placement-plan/placement-plan-generation.schemas.js.map +1 -1
  58. package/dist/esm/_core/placement-plan/placement-plan-validation.d.ts +66 -9
  59. package/dist/esm/_core/placement-plan/placement-plan-validation.d.ts.map +1 -1
  60. package/dist/esm/_core/placement-plan/placement-plan-validation.js +62 -20
  61. package/dist/esm/_core/placement-plan/placement-plan-validation.js.map +1 -1
  62. package/dist/esm/_core/placement-plan/placement-plan.schemas.d.ts +4 -1
  63. package/dist/esm/_core/placement-plan/placement-plan.schemas.d.ts.map +1 -1
  64. package/dist/esm/_core/placement-plan/placement-plan.schemas.js +4 -1
  65. package/dist/esm/_core/placement-plan/placement-plan.schemas.js.map +1 -1
  66. package/dist/esm/_core/provider-specification.schemas.d.ts +82 -0
  67. package/dist/esm/_core/provider-specification.schemas.d.ts.map +1 -0
  68. package/dist/esm/_core/provider-specification.schemas.js +144 -0
  69. package/dist/esm/_core/provider-specification.schemas.js.map +1 -0
  70. package/dist/esm/_core/requirements/requirements-snapshot-generation.schemas.d.ts.map +1 -1
  71. package/dist/esm/_core/requirements/requirements-snapshot-generation.schemas.js +13 -8
  72. package/dist/esm/_core/requirements/requirements-snapshot-generation.schemas.js.map +1 -1
  73. package/dist/esm/_core/requirements/requirements-snapshot-validation.d.ts +15 -0
  74. package/dist/esm/_core/requirements/requirements-snapshot-validation.d.ts.map +1 -1
  75. package/dist/esm/_core/requirements/requirements-snapshot-validation.js.map +1 -1
  76. package/dist/esm/_core/roadmap/roadmap-snapshot-generation.schemas.d.ts.map +1 -1
  77. package/dist/esm/_core/roadmap/roadmap-snapshot-generation.schemas.js +7 -2
  78. package/dist/esm/_core/roadmap/roadmap-snapshot-generation.schemas.js.map +1 -1
  79. package/dist/esm/_core/roadmap/roadmap-snapshot-validation.d.ts +15 -0
  80. package/dist/esm/_core/roadmap/roadmap-snapshot-validation.d.ts.map +1 -1
  81. package/dist/esm/_core/roadmap/roadmap-snapshot-validation.js.map +1 -1
  82. package/dist/esm/_core/utils/family-ref-stamping.d.ts +64 -0
  83. package/dist/esm/_core/utils/family-ref-stamping.d.ts.map +1 -0
  84. package/dist/esm/_core/utils/family-ref-stamping.js +73 -0
  85. package/dist/esm/_core/utils/family-ref-stamping.js.map +1 -0
  86. package/dist/esm/_core/vision/vision-snapshot-generation.schemas.d.ts.map +1 -1
  87. package/dist/esm/_core/vision/vision-snapshot-generation.schemas.js +23 -9
  88. package/dist/esm/_core/vision/vision-snapshot-generation.schemas.js.map +1 -1
  89. package/dist/esm/application-creation/application-coding-tasks.application-creation.schemas.d.ts +0 -4
  90. package/dist/esm/application-creation/application-coding-tasks.application-creation.schemas.d.ts.map +1 -1
  91. package/dist/esm/application-creation/application-document-fact-specification.application-creation.schemas.d.ts +7 -7
  92. package/dist/esm/application-creation/application-document-fact-specification.application-creation.schemas.d.ts.map +1 -1
  93. package/dist/esm/application-creation/application-document-fact-specification.application-creation.schemas.js +6 -7
  94. package/dist/esm/application-creation/application-document-fact-specification.application-creation.schemas.js.map +1 -1
  95. package/dist/esm/application-creation/application-document-release-policy-specification.application-creation.schemas.d.ts +3 -3
  96. package/dist/esm/application-creation/application-document-release-policy-specification.application-creation.schemas.js +3 -3
  97. package/dist/esm/application-creation/application-document-release-policy-specification.application-creation.schemas.js.map +1 -1
  98. package/dist/esm/application-creation/application-specification-family-identity.application-creation.schemas.d.ts +2 -2
  99. package/dist/esm/application-creation/application-specification-family-identity.application-creation.schemas.js +2 -2
  100. package/dist/esm/application-creation/application-specification-family-identity.application-creation.schemas.js.map +1 -1
  101. package/dist/esm/application-creation/journey.application-creation.schemas.d.ts +18 -6
  102. package/dist/esm/application-creation/journey.application-creation.schemas.d.ts.map +1 -1
  103. package/dist/esm/application-creation/journey.application-creation.schemas.js +18 -6
  104. package/dist/esm/application-creation/journey.application-creation.schemas.js.map +1 -1
  105. package/dist/esm/application-creation/playbooks.application-creation.schemas.d.ts +8 -23
  106. package/dist/esm/application-creation/playbooks.application-creation.schemas.d.ts.map +1 -1
  107. package/dist/esm/application-creation/playbooks.application-creation.schemas.js +57 -27
  108. package/dist/esm/application-creation/playbooks.application-creation.schemas.js.map +1 -1
  109. package/dist/esm/assurance/application-document-publication.schemas.d.ts +20 -6
  110. package/dist/esm/assurance/application-document-publication.schemas.d.ts.map +1 -1
  111. package/dist/esm/assurance/application-document-publication.schemas.js +26 -10
  112. package/dist/esm/assurance/application-document-publication.schemas.js.map +1 -1
  113. package/dist/esm/assurance/assurance-authority-basis.definitions.d.ts +72 -49
  114. package/dist/esm/assurance/assurance-authority-basis.definitions.d.ts.map +1 -1
  115. package/dist/esm/assurance/assurance-authority-basis.definitions.js +161 -60
  116. package/dist/esm/assurance/assurance-authority-basis.definitions.js.map +1 -1
  117. package/dist/esm/assurance/assurance-authority-basis.schemas.d.ts +25 -0
  118. package/dist/esm/assurance/assurance-authority-basis.schemas.d.ts.map +1 -1
  119. package/dist/esm/assurance/assurance-evidence-requirement-bodies.definitions.d.ts +36 -0
  120. package/dist/esm/assurance/assurance-evidence-requirement-bodies.definitions.d.ts.map +1 -0
  121. package/dist/esm/assurance/assurance-evidence-requirement-bodies.definitions.js +859 -0
  122. package/dist/esm/assurance/assurance-evidence-requirement-bodies.definitions.js.map +1 -0
  123. package/dist/esm/assurance/assurance-foundation.schemas.d.ts +43 -0
  124. package/dist/esm/assurance/assurance-foundation.schemas.d.ts.map +1 -1
  125. package/dist/esm/assurance/assurance-foundation.schemas.js +56 -0
  126. package/dist/esm/assurance/assurance-foundation.schemas.js.map +1 -1
  127. package/dist/esm/assurance/assurance-objective-catalog.definitions.d.ts +14 -7
  128. package/dist/esm/assurance/assurance-objective-catalog.definitions.d.ts.map +1 -1
  129. package/dist/esm/assurance/assurance-objective-catalog.definitions.js +24 -7
  130. package/dist/esm/assurance/assurance-objective-catalog.definitions.js.map +1 -1
  131. package/dist/esm/assurance/assurance-program-generation.schemas.d.ts +8 -1
  132. package/dist/esm/assurance/assurance-program-generation.schemas.d.ts.map +1 -1
  133. package/dist/esm/assurance/assurance-program-generation.schemas.js +10 -2
  134. package/dist/esm/assurance/assurance-program-generation.schemas.js.map +1 -1
  135. package/dist/esm/assurance/assurance-program.schemas.d.ts +447 -11
  136. package/dist/esm/assurance/assurance-program.schemas.d.ts.map +1 -1
  137. package/dist/esm/assurance/assurance-program.schemas.js +293 -5
  138. package/dist/esm/assurance/assurance-program.schemas.js.map +1 -1
  139. package/dist/esm/assurance/assurance-verification-requirement-bodies.definitions.d.ts +35 -0
  140. package/dist/esm/assurance/assurance-verification-requirement-bodies.definitions.d.ts.map +1 -0
  141. package/dist/esm/assurance/assurance-verification-requirement-bodies.definitions.js +999 -0
  142. package/dist/esm/assurance/assurance-verification-requirement-bodies.definitions.js.map +1 -0
  143. package/dist/esm/companion-exports.d.ts +7 -6
  144. package/dist/esm/companion-exports.d.ts.map +1 -1
  145. package/dist/esm/companion-exports.js.map +1 -1
  146. package/dist/esm/engine/_bootstrap.js +3 -1
  147. package/dist/esm/engine/_bootstrap.js.map +1 -1
  148. package/dist/esm/engine/applications/resources/application-api-keys.resource.specification.d.ts.map +1 -1
  149. package/dist/esm/engine/applications/resources/application-api-keys.resource.specification.js +13 -1
  150. package/dist/esm/engine/applications/resources/application-api-keys.resource.specification.js.map +1 -1
  151. package/dist/esm/engine/applications/resources/application-metadata.resource.specification.js +1 -1
  152. package/dist/esm/engine/applications/resources/application-metadata.resource.specification.js.map +1 -1
  153. package/dist/esm/engine/applications/resources/application-oauth-clients.resource.specification.d.ts +2 -0
  154. package/dist/esm/engine/applications/resources/application-oauth-clients.resource.specification.d.ts.map +1 -1
  155. package/dist/esm/engine/applications/resources/application-oauth-clients.resource.specification.js +14 -2
  156. package/dist/esm/engine/applications/resources/application-oauth-clients.resource.specification.js.map +1 -1
  157. package/dist/esm/engine/applications/resources/application-versions.resource.specification.js +9 -9
  158. package/dist/esm/engine/applications/resources/application-versions.resource.specification.js.map +1 -1
  159. package/dist/esm/engine/applications/resources/applications.resource.specification.js +1 -1
  160. package/dist/esm/engine/applications/resources/applications.resource.specification.js.map +1 -1
  161. package/dist/esm/engine/auth/resources/consumable-tokens.resource.specification.js +3 -3
  162. package/dist/esm/engine/auth/resources/consumable-tokens.resource.specification.js.map +1 -1
  163. package/dist/esm/engine/auth/resources/oauth-consent-grants.resource.specification.js +1 -1
  164. package/dist/esm/engine/auth/resources/oauth-consent-grants.resource.specification.js.map +1 -1
  165. package/dist/esm/engine/auth/resources/organization-api-keys.resource.specification.d.ts.map +1 -1
  166. package/dist/esm/engine/auth/resources/organization-api-keys.resource.specification.js +13 -1
  167. package/dist/esm/engine/auth/resources/organization-api-keys.resource.specification.js.map +1 -1
  168. package/dist/esm/engine/auth/resources/organization-oauth-clients.resource.specification.d.ts +2 -0
  169. package/dist/esm/engine/auth/resources/organization-oauth-clients.resource.specification.d.ts.map +1 -1
  170. package/dist/esm/engine/auth/resources/organization-oauth-clients.resource.specification.js +14 -2
  171. package/dist/esm/engine/auth/resources/organization-oauth-clients.resource.specification.js.map +1 -1
  172. package/dist/esm/engine/auth/resources/organization-provider-credentials.resource.specification.d.ts +32 -0
  173. package/dist/esm/engine/auth/resources/organization-provider-credentials.resource.specification.d.ts.map +1 -0
  174. package/dist/esm/engine/auth/resources/organization-provider-credentials.resource.specification.js +308 -0
  175. package/dist/esm/engine/auth/resources/organization-provider-credentials.resource.specification.js.map +1 -0
  176. package/dist/esm/engine/auth/resources/platform-access-grants.resource.specification.js +4 -4
  177. package/dist/esm/engine/auth/resources/platform-access-grants.resource.specification.js.map +1 -1
  178. package/dist/esm/engine/auth/resources/scim-provisioning-config.resource.specification.js +2 -2
  179. package/dist/esm/engine/auth/resources/scim-provisioning-config.resource.specification.js.map +1 -1
  180. package/dist/esm/engine/auth/resources/scim-tokens.resource.specification.js +6 -6
  181. package/dist/esm/engine/auth/resources/scim-tokens.resource.specification.js.map +1 -1
  182. package/dist/esm/engine/auth/resources/siem-delivery-dlq.resource.specification.js +9 -9
  183. package/dist/esm/engine/auth/resources/siem-delivery-dlq.resource.specification.js.map +1 -1
  184. package/dist/esm/engine/auth/resources/siem-export-config.resource.specification.js +2 -2
  185. package/dist/esm/engine/auth/resources/siem-export-config.resource.specification.js.map +1 -1
  186. package/dist/esm/engine/auth/resources/sso-config.resource.specification.d.ts +9 -25
  187. package/dist/esm/engine/auth/resources/sso-config.resource.specification.d.ts.map +1 -1
  188. package/dist/esm/engine/auth/resources/sso-config.resource.specification.js +104 -10
  189. package/dist/esm/engine/auth/resources/sso-config.resource.specification.js.map +1 -1
  190. package/dist/esm/engine/auth/resources/sso-connections.resource.specification.d.ts +0 -6
  191. package/dist/esm/engine/auth/resources/sso-connections.resource.specification.d.ts.map +1 -1
  192. package/dist/esm/engine/auth/resources/user-provider-credentials.resource.specification.d.ts +32 -0
  193. package/dist/esm/engine/auth/resources/user-provider-credentials.resource.specification.d.ts.map +1 -0
  194. package/dist/esm/engine/auth/resources/user-provider-credentials.resource.specification.js +297 -0
  195. package/dist/esm/engine/auth/resources/user-provider-credentials.resource.specification.js.map +1 -0
  196. package/dist/esm/engine/billing/resources/billing-accounts.resource.specification.d.ts.map +1 -1
  197. package/dist/esm/engine/billing/resources/billing-accounts.resource.specification.js +4 -3
  198. package/dist/esm/engine/billing/resources/billing-accounts.resource.specification.js.map +1 -1
  199. package/dist/esm/engine/billing/resources/credit-pools.resource.specification.js +2 -2
  200. package/dist/esm/engine/billing/resources/credit-pools.resource.specification.js.map +1 -1
  201. package/dist/esm/engine/billing/resources/invoice-refs.resource.specification.js +3 -3
  202. package/dist/esm/engine/billing/resources/invoice-refs.resource.specification.js.map +1 -1
  203. package/dist/esm/engine/billing/resources/prices.resource.specification.js +7 -7
  204. package/dist/esm/engine/billing/resources/prices.resource.specification.js.map +1 -1
  205. package/dist/esm/engine/billing/resources/products.resource.specification.js +7 -7
  206. package/dist/esm/engine/billing/resources/products.resource.specification.js.map +1 -1
  207. package/dist/esm/engine/billing/resources/promotions.resource.specification.d.ts.map +1 -1
  208. package/dist/esm/engine/billing/resources/promotions.resource.specification.js +14 -12
  209. package/dist/esm/engine/billing/resources/promotions.resource.specification.js.map +1 -1
  210. package/dist/esm/engine/billing/resources/referrals.resource.specification.js +7 -7
  211. package/dist/esm/engine/billing/resources/referrals.resource.specification.js.map +1 -1
  212. package/dist/esm/engine/billing/resources/subscriptions.resource.specification.d.ts.map +1 -1
  213. package/dist/esm/engine/billing/resources/subscriptions.resource.specification.js +6 -3
  214. package/dist/esm/engine/billing/resources/subscriptions.resource.specification.js.map +1 -1
  215. package/dist/esm/engine/billing/resources/usage-records.resource.specification.d.ts +7 -3
  216. package/dist/esm/engine/billing/resources/usage-records.resource.specification.d.ts.map +1 -1
  217. package/dist/esm/engine/billing/resources/usage-records.resource.specification.js +28 -11
  218. package/dist/esm/engine/billing/resources/usage-records.resource.specification.js.map +1 -1
  219. package/dist/esm/engine/compliance/resources/audit-logs.resource.specification.js +8 -8
  220. package/dist/esm/engine/compliance/resources/audit-logs.resource.specification.js.map +1 -1
  221. package/dist/esm/engine/engine-resource-specifications.registry.d.ts +2 -2
  222. package/dist/esm/engine/engine-resource-specifications.registry.d.ts.map +1 -1
  223. package/dist/esm/engine/engine-resource-specifications.registry.js +6 -2
  224. package/dist/esm/engine/engine-resource-specifications.registry.js.map +1 -1
  225. package/dist/esm/engine/engine-resource-sub-domain.d.ts +20 -0
  226. package/dist/esm/engine/engine-resource-sub-domain.d.ts.map +1 -1
  227. package/dist/esm/engine/engine-resource-sub-domain.js +66 -0
  228. package/dist/esm/engine/engine-resource-sub-domain.js.map +1 -1
  229. package/dist/esm/engine/errors/error-messages.specification.d.ts.map +1 -1
  230. package/dist/esm/engine/errors/error-messages.specification.js +14 -0
  231. package/dist/esm/engine/errors/error-messages.specification.js.map +1 -1
  232. package/dist/esm/engine/features/audit-logs.feature.specification.js +4 -4
  233. package/dist/esm/engine/features/audit-logs.feature.specification.js.map +1 -1
  234. package/dist/esm/engine/features/core-limits.feature.specifications.js +7 -7
  235. package/dist/esm/engine/features/core-limits.feature.specifications.js.map +1 -1
  236. package/dist/esm/engine/features/resources/application-features.resource.specification.js +3 -3
  237. package/dist/esm/engine/features/resources/application-features.resource.specification.js.map +1 -1
  238. package/dist/esm/engine/features/resources/organization-features.resource.specification.js +3 -3
  239. package/dist/esm/engine/features/resources/organization-features.resource.specification.js.map +1 -1
  240. package/dist/esm/engine/features/resources/user-features.resource.specification.js +3 -3
  241. package/dist/esm/engine/features/resources/user-features.resource.specification.js.map +1 -1
  242. package/dist/esm/engine/files/resources/files.resource.specification.js +10 -10
  243. package/dist/esm/engine/files/resources/files.resource.specification.js.map +1 -1
  244. package/dist/esm/engine/flows-actors/resources/a2a-push-delivery-log.resource.specification.js +11 -11
  245. package/dist/esm/engine/flows-actors/resources/a2a-push-delivery-log.resource.specification.js.map +1 -1
  246. package/dist/esm/engine/flows-actors/resources/a2a-token-budget-state.resource.specification.js +4 -4
  247. package/dist/esm/engine/flows-actors/resources/a2a-token-budget-state.resource.specification.js.map +1 -1
  248. package/dist/esm/engine/flows-actors/resources/flow-actor-executions.resource.specification.js +2 -2
  249. package/dist/esm/engine/flows-actors/resources/flow-actor-executions.resource.specification.js.map +1 -1
  250. package/dist/esm/engine/frontend-components/app/app-layout-connected-accounts-settings.frontend-component.specification.d.ts +5 -0
  251. package/dist/esm/engine/frontend-components/app/app-layout-connected-accounts-settings.frontend-component.specification.d.ts.map +1 -0
  252. package/dist/esm/engine/frontend-components/app/app-layout-connected-accounts-settings.frontend-component.specification.js +81 -0
  253. package/dist/esm/engine/frontend-components/app/app-layout-connected-accounts-settings.frontend-component.specification.js.map +1 -0
  254. package/dist/esm/engine/frontend-components/app/public-layout-file-upload-grant.frontend-component.specification.d.ts +4 -0
  255. package/dist/esm/engine/frontend-components/app/public-layout-file-upload-grant.frontend-component.specification.d.ts.map +1 -0
  256. package/dist/esm/engine/frontend-components/app/public-layout-file-upload-grant.frontend-component.specification.js +22 -0
  257. package/dist/esm/engine/frontend-components/app/public-layout-file-upload-grant.frontend-component.specification.js.map +1 -0
  258. package/dist/esm/engine/frontend-components/billing/billing-plan-change-preview.frontend-component.specification.d.ts +0 -4
  259. package/dist/esm/engine/frontend-components/billing/billing-plan-change-preview.frontend-component.specification.d.ts.map +0 -1
  260. package/dist/esm/engine/frontend-components/billing/billing-plan-change-preview.frontend-component.specification.js +0 -21
  261. package/dist/esm/engine/frontend-components/billing/billing-plan-change-preview.frontend-component.specification.js.map +0 -1
  262. package/dist/esm/engine/frontend-components/billing/billing-promotion-code-input.frontend-component.specification.d.ts +0 -4
  263. package/dist/esm/engine/frontend-components/billing/billing-promotion-code-input.frontend-component.specification.d.ts.map +0 -1
  264. package/dist/esm/engine/frontend-components/billing/billing-promotion-code-input.frontend-component.specification.js +0 -21
  265. package/dist/esm/engine/frontend-components/billing/billing-promotion-code-input.frontend-component.specification.js.map +0 -1
  266. package/dist/esm/engine/frontend-components/index.d.ts +0 -2
  267. package/dist/esm/engine/frontend-components/index.d.ts.map +1 -1
  268. package/dist/esm/engine/frontend-components/index.js +4 -6
  269. package/dist/esm/engine/frontend-components/index.js.map +1 -1
  270. package/dist/esm/engine/guidance/resources/guidance-state.resource.specification.js +12 -12
  271. package/dist/esm/engine/guidance/resources/guidance-state.resource.specification.js.map +1 -1
  272. package/dist/esm/engine/guidance/resources/lifecycle-state.resource.specification.js +9 -9
  273. package/dist/esm/engine/guidance/resources/lifecycle-state.resource.specification.js.map +1 -1
  274. package/dist/esm/engine/guidance/resources/progression-state.resource.specification.d.ts +8 -0
  275. package/dist/esm/engine/guidance/resources/progression-state.resource.specification.d.ts.map +1 -1
  276. package/dist/esm/engine/guidance/resources/progression-state.resource.specification.js +6 -6
  277. package/dist/esm/engine/guidance/resources/progression-state.resource.specification.js.map +1 -1
  278. package/dist/esm/engine/index.d.ts +1 -0
  279. package/dist/esm/engine/index.d.ts.map +1 -1
  280. package/dist/esm/engine/index.js +1 -0
  281. package/dist/esm/engine/index.js.map +1 -1
  282. package/dist/esm/engine/infrastructure/resources/data-seed-runs.resource.specification.js +17 -17
  283. package/dist/esm/engine/infrastructure/resources/data-seed-runs.resource.specification.js.map +1 -1
  284. package/dist/esm/engine/infrastructure/resources/external-data-pipeline-states.resource.specification.js +7 -7
  285. package/dist/esm/engine/infrastructure/resources/external-data-pipeline-states.resource.specification.js.map +1 -1
  286. package/dist/esm/engine/infrastructure/resources/job-executions.resource.specification.js +8 -8
  287. package/dist/esm/engine/infrastructure/resources/job-executions.resource.specification.js.map +1 -1
  288. package/dist/esm/engine/infrastructure/resources/job-payload-storage.resource.specification.d.ts +7 -2
  289. package/dist/esm/engine/infrastructure/resources/job-payload-storage.resource.specification.d.ts.map +1 -1
  290. package/dist/esm/engine/infrastructure/resources/job-payload-storage.resource.specification.js +10 -5
  291. package/dist/esm/engine/infrastructure/resources/job-payload-storage.resource.specification.js.map +1 -1
  292. package/dist/esm/engine/notifications/resources/m2m-webhook-delivery-log.resource.specification.d.ts.map +1 -1
  293. package/dist/esm/engine/notifications/resources/m2m-webhook-delivery-log.resource.specification.js +20 -15
  294. package/dist/esm/engine/notifications/resources/m2m-webhook-delivery-log.resource.specification.js.map +1 -1
  295. package/dist/esm/engine/notifications/resources/notification-badges.resource.specification.d.ts.map +1 -1
  296. package/dist/esm/engine/notifications/resources/notification-badges.resource.specification.js +11 -10
  297. package/dist/esm/engine/notifications/resources/notification-badges.resource.specification.js.map +1 -1
  298. package/dist/esm/engine/notifications/resources/webhook-config.resource.specification.d.ts.map +1 -1
  299. package/dist/esm/engine/notifications/resources/webhook-config.resource.specification.js +29 -6
  300. package/dist/esm/engine/notifications/resources/webhook-config.resource.specification.js.map +1 -1
  301. package/dist/esm/engine/organizations/resources/organization-members.resource.specification.js +9 -9
  302. package/dist/esm/engine/organizations/resources/organization-members.resource.specification.js.map +1 -1
  303. package/dist/esm/engine/organizations/resources/organization-notifications.resource.specification.js +3 -3
  304. package/dist/esm/engine/organizations/resources/organization-notifications.resource.specification.js.map +1 -1
  305. package/dist/esm/engine/organizations/resources/organization-preferences.resource.specification.js +4 -4
  306. package/dist/esm/engine/organizations/resources/organization-preferences.resource.specification.js.map +1 -1
  307. package/dist/esm/engine/organizations/resources/organization-profiles.resource.specification.js +2 -2
  308. package/dist/esm/engine/organizations/resources/organization-profiles.resource.specification.js.map +1 -1
  309. package/dist/esm/engine/organizations/resources/organization-unit-members.resource.specification.js +1 -1
  310. package/dist/esm/engine/organizations/resources/organization-unit-members.resource.specification.js.map +1 -1
  311. package/dist/esm/engine/organizations/resources/organizations.resource.specification.js +7 -7
  312. package/dist/esm/engine/organizations/resources/organizations.resource.specification.js.map +1 -1
  313. package/dist/esm/engine/providers/_engine-provider-shared.d.ts +9 -0
  314. package/dist/esm/engine/providers/_engine-provider-shared.d.ts.map +1 -0
  315. package/dist/esm/engine/providers/_engine-provider-shared.js +19 -0
  316. package/dist/esm/engine/providers/_engine-provider-shared.js.map +1 -0
  317. package/dist/esm/engine/providers/anthropic.provider.specification.d.ts +7 -0
  318. package/dist/esm/engine/providers/anthropic.provider.specification.d.ts.map +1 -0
  319. package/dist/esm/engine/providers/anthropic.provider.specification.js +33 -0
  320. package/dist/esm/engine/providers/anthropic.provider.specification.js.map +1 -0
  321. package/dist/esm/engine/providers/apple.provider.specification.d.ts +7 -0
  322. package/dist/esm/engine/providers/apple.provider.specification.d.ts.map +1 -0
  323. package/dist/esm/engine/providers/apple.provider.specification.js +35 -0
  324. package/dist/esm/engine/providers/apple.provider.specification.js.map +1 -0
  325. package/dist/esm/engine/providers/email-preview.provider.specification.d.ts +7 -0
  326. package/dist/esm/engine/providers/email-preview.provider.specification.d.ts.map +1 -0
  327. package/dist/esm/engine/providers/email-preview.provider.specification.js +31 -0
  328. package/dist/esm/engine/providers/email-preview.provider.specification.js.map +1 -0
  329. package/dist/esm/engine/providers/github.provider.specification.d.ts +7 -0
  330. package/dist/esm/engine/providers/github.provider.specification.d.ts.map +1 -0
  331. package/dist/esm/engine/providers/github.provider.specification.js +30 -0
  332. package/dist/esm/engine/providers/github.provider.specification.js.map +1 -0
  333. package/dist/esm/engine/providers/google.provider.specification.d.ts +7 -0
  334. package/dist/esm/engine/providers/google.provider.specification.d.ts.map +1 -0
  335. package/dist/esm/engine/providers/google.provider.specification.js +34 -0
  336. package/dist/esm/engine/providers/google.provider.specification.js.map +1 -0
  337. package/dist/esm/engine/providers/grok.provider.specification.d.ts +7 -0
  338. package/dist/esm/engine/providers/grok.provider.specification.d.ts.map +1 -0
  339. package/dist/esm/engine/providers/grok.provider.specification.js +30 -0
  340. package/dist/esm/engine/providers/grok.provider.specification.js.map +1 -0
  341. package/dist/esm/engine/providers/index.d.ts +23 -0
  342. package/dist/esm/engine/providers/index.d.ts.map +1 -0
  343. package/dist/esm/engine/providers/index.js +37 -0
  344. package/dist/esm/engine/providers/index.js.map +1 -0
  345. package/dist/esm/engine/providers/microsoft.provider.specification.d.ts +7 -0
  346. package/dist/esm/engine/providers/microsoft.provider.specification.d.ts.map +1 -0
  347. package/dist/esm/engine/providers/microsoft.provider.specification.js +30 -0
  348. package/dist/esm/engine/providers/microsoft.provider.specification.js.map +1 -0
  349. package/dist/esm/engine/providers/mistral.provider.specification.d.ts +7 -0
  350. package/dist/esm/engine/providers/mistral.provider.specification.d.ts.map +1 -0
  351. package/dist/esm/engine/providers/mistral.provider.specification.js +33 -0
  352. package/dist/esm/engine/providers/mistral.provider.specification.js.map +1 -0
  353. package/dist/esm/engine/providers/openai.provider.specification.d.ts +7 -0
  354. package/dist/esm/engine/providers/openai.provider.specification.d.ts.map +1 -0
  355. package/dist/esm/engine/providers/openai.provider.specification.js +43 -0
  356. package/dist/esm/engine/providers/openai.provider.specification.js.map +1 -0
  357. package/dist/esm/engine/providers/opencode.provider.specification.d.ts +7 -0
  358. package/dist/esm/engine/providers/opencode.provider.specification.d.ts.map +1 -0
  359. package/dist/esm/engine/providers/opencode.provider.specification.js +50 -0
  360. package/dist/esm/engine/providers/opencode.provider.specification.js.map +1 -0
  361. package/dist/esm/engine/providers/perplexity.provider.specification.d.ts +7 -0
  362. package/dist/esm/engine/providers/perplexity.provider.specification.d.ts.map +1 -0
  363. package/dist/esm/engine/providers/perplexity.provider.specification.js +30 -0
  364. package/dist/esm/engine/providers/perplexity.provider.specification.js.map +1 -0
  365. package/dist/esm/engine/providers/resend.provider.specification.d.ts +7 -0
  366. package/dist/esm/engine/providers/resend.provider.specification.d.ts.map +1 -0
  367. package/dist/esm/engine/providers/resend.provider.specification.js +33 -0
  368. package/dist/esm/engine/providers/resend.provider.specification.js.map +1 -0
  369. package/dist/esm/engine/providers/stripe.provider.specification.d.ts +7 -0
  370. package/dist/esm/engine/providers/stripe.provider.specification.d.ts.map +1 -0
  371. package/dist/esm/engine/providers/stripe.provider.specification.js +35 -0
  372. package/dist/esm/engine/providers/stripe.provider.specification.js.map +1 -0
  373. package/dist/esm/engine/providers/twilio.provider.specification.d.ts +7 -0
  374. package/dist/esm/engine/providers/twilio.provider.specification.d.ts.map +1 -0
  375. package/dist/esm/engine/providers/twilio.provider.specification.js +33 -0
  376. package/dist/esm/engine/providers/twilio.provider.specification.js.map +1 -0
  377. package/dist/esm/engine/users/resources/anonymous-users.resource.specification.js +7 -7
  378. package/dist/esm/engine/users/resources/anonymous-users.resource.specification.js.map +1 -1
  379. package/dist/esm/engine/users/resources/inbound-contacts.resource.specification.js +9 -9
  380. package/dist/esm/engine/users/resources/inbound-contacts.resource.specification.js.map +1 -1
  381. package/dist/esm/engine/users/resources/user-credentials.resource.specification.js +2 -2
  382. package/dist/esm/engine/users/resources/user-credentials.resource.specification.js.map +1 -1
  383. package/dist/esm/engine/users/resources/user-identity-links.resource.specification.js +8 -8
  384. package/dist/esm/engine/users/resources/user-identity-links.resource.specification.js.map +1 -1
  385. package/dist/esm/engine/users/resources/user-preferences.resource.specification.d.ts +4 -4
  386. package/dist/esm/engine/users/resources/user-preferences.resource.specification.js +4 -4
  387. package/dist/esm/engine/users/resources/user-preferences.resource.specification.js.map +1 -1
  388. package/dist/esm/engine/users/resources/user-profiles.resource.specification.js +2 -2
  389. package/dist/esm/engine/users/resources/user-profiles.resource.specification.js.map +1 -1
  390. package/dist/esm/engine/users/resources/user-self-preferences.resource.specification.d.ts +4 -4
  391. package/dist/esm/engine/users/resources/user-self-preferences.resource.specification.d.ts.map +1 -1
  392. package/dist/esm/engine/users/resources/user-self-preferences.resource.specification.js +13 -11
  393. package/dist/esm/engine/users/resources/user-self-preferences.resource.specification.js.map +1 -1
  394. package/dist/esm/engine/users/resources/user-self-profiles.resource.specification.js +1 -1
  395. package/dist/esm/engine/users/resources/user-self-profiles.resource.specification.js.map +1 -1
  396. package/dist/esm/engine/users/resources/user-self.resource.specification.js +8 -8
  397. package/dist/esm/engine/users/resources/user-self.resource.specification.js.map +1 -1
  398. package/dist/esm/engine/users/resources/users.resource.specification.d.ts.map +1 -1
  399. package/dist/esm/engine/users/resources/users.resource.specification.js +93 -0
  400. package/dist/esm/engine/users/resources/users.resource.specification.js.map +1 -1
  401. package/dist/esm/technical-documentation/engine-documentation-specification-catalog.companion.d.ts.map +1 -1
  402. package/dist/esm/technical-documentation/engine-documentation-specification-catalog.companion.js +95 -45
  403. package/dist/esm/technical-documentation/engine-documentation-specification-catalog.companion.js.map +1 -1
  404. package/dist/esm/technical-documentation/technical-documentation-units.schemas.d.ts +37 -1
  405. package/dist/esm/technical-documentation/technical-documentation-units.schemas.d.ts.map +1 -1
  406. package/dist/esm/technical-documentation/technical-documentation-units.schemas.js +36 -0
  407. package/dist/esm/technical-documentation/technical-documentation-units.schemas.js.map +1 -1
  408. package/dist/tsconfig.build.tsbuildinfo +1 -1
  409. package/package.json +8 -8
  410. package/dist/assurance/external-framework-mapping.json +0 -980
@@ -114,7 +114,7 @@ function buildWebhookConfigBaseSpecification(resourceType, memberName) {
114
114
  },
115
115
  fields: {
116
116
  _id: schemaShape._id.stringSpec({
117
- meaning: 'Singleton document id for the webhook config row in this scope’s MongoDB collection.',
117
+ meaning: 'Singleton document id for the webhook config record in this scope’s MongoDB collection.',
118
118
  importance: FieldSemanticImportance.PRIMARY,
119
119
  semanticRole: 'identifier',
120
120
  }),
@@ -137,11 +137,11 @@ function buildWebhookConfigBaseSpecification(resourceType, memberName) {
137
137
  whyItMatters: 'Downstream verifiers need the public key without out-of-band secret sharing; key rotation re-reads from app config on every READ per postfix hook.',
138
138
  }),
139
139
  createdAt: schemaShape.createdAt.dateSpec({
140
- meaning: 'When the singleton config row was first inserted.',
140
+ meaning: 'When the singleton config record was first inserted.',
141
141
  temporalRole: 'creation',
142
142
  }),
143
143
  updatedAt: schemaShape.updatedAt.dateSpec({
144
- meaning: 'When the row last changed (endpoint list edits, `enabled` toggles, or hook refreshes).',
144
+ meaning: 'When the record last changed (endpoint list edits, `enabled` toggles, or hook refreshes).',
145
145
  temporalRole: 'modified',
146
146
  }),
147
147
  },
@@ -172,7 +172,7 @@ function buildWebhookConfigBaseSpecification(resourceType, memberName) {
172
172
  outcome: 'A baseline disabled config exists so the dispatcher can load structured rows without null-check sprawl.',
173
173
  whenToUse: 'Repository-only path — not an HTTP public create; used by system seeds or platform bootstrap runs.',
174
174
  responseStatuses: [
175
- { code: HttpResponseStatusCode.CREATED_201, meaning: 'The baseline (disabled) singleton config row was seeded for this scope and returned. Internal/service write path — system seeds or platform bootstrap run this, not a public HTTP create.' },
175
+ { code: HttpResponseStatusCode.CREATED_201, meaning: 'The baseline (disabled) singleton config record was seeded for this scope and returned. Internal/service write path — system seeds or platform bootstrap run this, not a public HTTP create.' },
176
176
  ],
177
177
  errorScenarios: [
178
178
  { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The seed payload fails schema validation (e.g. a non-HTTPS endpoint URL or a malformed endpoint entry).', errorCode: 'VALIDATION_FAILED' },
@@ -219,7 +219,7 @@ function buildWebhookConfigBaseSpecification(resourceType, memberName) {
219
219
  purpose: 'Repository-only teardown of the webhook config row when its owning org/app is deleted (composition `onParentDelete` cascade).',
220
220
  outcome: 'The one-per-scope config row is removed together with its parent — the composition part does not outlive its whole.',
221
221
  responseStatuses: [
222
- { code: HttpResponseStatusCode.OK_200, meaning: 'The webhook config row was deleted as part of the deletion cascade of its owning scope.' },
222
+ { code: HttpResponseStatusCode.OK_200, meaning: 'The webhook config record was deleted as part of the deletion cascade of its owning scope.' },
223
223
  ],
224
224
  // REPOSITORY_ONLY variant (org/app admin) — invoked by the onParentDelete cascade, not a public HTTP endpoint, so no client-facing 400/403/404 are documented.
225
225
  idempotent: true,
@@ -227,7 +227,7 @@ function buildWebhookConfigBaseSpecification(resourceType, memberName) {
227
227
  [WebhookConfig_Operations.TEST_ENDPOINT]: {
228
228
  operationId: WebhookConfig_Operations.TEST_ENDPOINT,
229
229
  purpose: 'Send a single synthetic request to a chosen `endpointId` to prove reachability and signature verification (does not create `M2MWebhookDeliveryLog` rows). Borrows UPDATE (a `PUT` on the custom-op sub-path) rather than READ: no row is written, but a live signed request leaves the platform, and a `GET` for that was a contradiction the generated contract had to spell out as `x-idempotent: false`.',
230
- outcome: 'Admins can validate connectivity in isolation before real notification traffic is enabled. The response is a diagnostic — `outcome` (`accepted` / `rejected` / `unreachable` / `not_sent`), plus response status, truncated response body, failure reason, duration, and the probe’s `signatureJti` for correlation against the consumer’s own logs — NOT the configuration row.',
230
+ outcome: 'Admins can validate connectivity in isolation before real notification traffic is enabled. The response is a diagnostic — `outcome` (`accepted` / `rejected` / `unreachable` / `not_sent`), plus response status, truncated response body, failure reason, duration, the probe’s `signatureJti` for correlation against the consumer’s own logs, and `transportIsPlaintext` — NOT the configuration row. `transportIsPlaintext` is independent of `outcome`: an endpoint on `http://` can answer `accepted` and still be sending the delivery signature in the clear, where it is readable and replayable until it expires. Plaintext endpoints are admitted deliberately (see `WebhookEndpointSchema.url`), so this probe is where that admission is surfaced to the admin who can act on it.',
231
231
  whenToUse: 'Run after any URL/secret/rotation event that could break downstream listeners.',
232
232
  importance: FieldSemanticImportance.PRIMARY,
233
233
  responseStatuses: [
@@ -248,6 +248,7 @@ function buildWebhookConfigBaseSpecification(resourceType, memberName) {
248
248
  response: {
249
249
  endpointId: 'whe_primary_partner',
250
250
  url: 'https://hooks.example.com/wildo',
251
+ transportIsPlaintext: false,
251
252
  outcome: WebhookEndpointProbeOutcome.ACCEPTED,
252
253
  responseStatus: 202,
253
254
  responseBodyTruncated: 'queued',
@@ -263,6 +264,7 @@ function buildWebhookConfigBaseSpecification(resourceType, memberName) {
263
264
  response: {
264
265
  endpointId: 'whe_primary_partner',
265
266
  url: 'https://hooks.example.com/wildo',
267
+ transportIsPlaintext: false,
266
268
  outcome: WebhookEndpointProbeOutcome.REJECTED,
267
269
  responseStatus: 401,
268
270
  responseBodyTruncated: 'invalid signature',
@@ -278,6 +280,7 @@ function buildWebhookConfigBaseSpecification(resourceType, memberName) {
278
280
  response: {
279
281
  endpointId: 'whe_primary_partner',
280
282
  url: 'https://hooks.example.com/wildo',
283
+ transportIsPlaintext: false,
281
284
  outcome: WebhookEndpointProbeOutcome.UNREACHABLE,
282
285
  failureReason: 'fetch failed: connect ECONNREFUSED',
283
286
  durationMs: 10003,
@@ -292,6 +295,7 @@ function buildWebhookConfigBaseSpecification(resourceType, memberName) {
292
295
  response: {
293
296
  endpointId: 'whe_primary_partner',
294
297
  url: 'https://hooks.example.com/wildo',
298
+ transportIsPlaintext: false,
295
299
  outcome: WebhookEndpointProbeOutcome.NOT_SENT,
296
300
  failureReason: 'JWT signing failed: application webhook key unavailable',
297
301
  durationMs: 0,
@@ -300,6 +304,25 @@ function buildWebhookConfigBaseSpecification(resourceType, memberName) {
300
304
  },
301
305
  forStatus: HttpResponseStatusCode.OK_200,
302
306
  },
307
+ {
308
+ title: 'Endpoint accepts the probe, but over plaintext HTTP',
309
+ request: { endpointId: 'whe_legacy_plaintext' },
310
+ response: {
311
+ endpointId: 'whe_legacy_plaintext',
312
+ url: 'http://legacy.example.com/wildo',
313
+ // The case this field exists for (#492). A working endpoint AND a credential on the
314
+ // wire — `ACCEPTED` is the truthful outcome, and reporting the exposure as a failure
315
+ // would be false, so the two are stated separately.
316
+ transportIsPlaintext: true,
317
+ outcome: WebhookEndpointProbeOutcome.ACCEPTED,
318
+ responseStatus: 200,
319
+ responseBodyTruncated: 'ok',
320
+ durationMs: 77,
321
+ signatureJti: 'probe_01HX2PLAINTEXT',
322
+ attemptedAt: '2026-06-14T12:09:00.000Z',
323
+ },
324
+ forStatus: HttpResponseStatusCode.OK_200,
325
+ },
303
326
  ],
304
327
  },
305
328
  },
@@ -1 +1 @@
1
- {"version":3,"file":"webhook-config.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/notifications/resources/webhook-config.resource.specification.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,qBAAqB,IAAI,EAAE,EAC3B,gBAAgB,EAChB,oBAAoB,EACpB,wBAAwB,EACxB,uBAAuB,EACvB,2BAA2B,EAC3B,iCAAiC,GAClC,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAEzF,OAAO,EACL,sBAAsB,EACtB,mCAAmC,EACnC,6BAA6B,EAC7B,qBAAqB,EACrB,8CAA8C,GAE/C,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAk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SaaS engine specification (backend-only).\n *\n * Polymorphic ORG + APP pair sharing `WebhookConfigBaseSchema` and `webhookConfigPolymorphicFactories` (one spec export per\n * `CoreResourceType`, single authoring file, SSO-style split exports).\n *\n * Inputs:\n * - Base schema: engine/saas-models/src/notifications/m2m/webhook-config.shared.schemas.ts → `WebhookConfigBaseSchema`\n * - Polymorphic map: `webhookConfigPolymorphicFactories` (same file family as\n * `webhook-config.shared.resources-config.schemas.ts`)\n * - Custom operations: `WebhookConfig_Operations` (`testEndpoint` synthetic delivery)\n * - UI presets: `webhooksMainPresets` / `webhooksAdminPresets`\n * (engine/presets-components/src/config/resources/webhooks.resource-presets.tsx) —\n * sectioned READ layout (`status` / `endpoints` / `verification`), surfaced in the\n * org Settings Hub `webhooks` section. The spec is frontend-configured (mirrors the\n * SIEM config): the `frontend.layout.sections` documented below MUST equal the\n * preset's `layout.refs.sections` — `validateStructuralSlotDescriptions` enforces\n * the match bidirectionally at companion load. Edit both sides together.\n */\n\nimport { LabelAudience } from '@wildo-ai/presets-components-models';\nimport {\n CodeDeclarationKind,\n CodeSymbolKind,\n FieldSemanticImportance,\n} from '@wildo-ai/zod-decorators';\nimport {\n CoreResourceOperation as Op,\n CoreResourceType,\n ResourcePrimaryScope,\n WebhookConfig_Operations,\n WebhookConfigBaseSchema,\n WebhookEndpointProbeOutcome,\n webhookConfigPolymorphicFactories,\n} from '@wildo-ai/saas-models';\nimport { webhooksAdminPresets, webhooksMainPresets } from '@wildo-ai/presets-components';\nimport type { ResourceUIBehaviorConfig } from '@wildo-ai/saas-frontend-lib/companion';\nimport {\n HttpResponseStatusCode,\n mergeResourceFrontendConfigurations,\n resourceFrontendConfiguration,\n resourceSpecification,\n resourceSpecificationFromFrontendConfiguration,\n type ResourceSpecificationConfig,\n} from '~wildo-specifications/_core';\nimport { EngineResourceSubDomain } from '../../engine-resource-sub-domain';\n\ntype WebhookConfigResourceType =\n | CoreResourceType.ORGANIZATION_WEBHOOK_CONFIG\n | CoreResourceType.APPLICATION_WEBHOOK_CONFIG;\n\ntype WebhookConfigResourceTypeMember = 'ORGANIZATION_WEBHOOK_CONFIG' | 'APPLICATION_WEBHOOK_CONFIG';\n\nconst webhookConfigResourcePrimaryScope: Record<WebhookConfigResourceType, ResourcePrimaryScope> = {\n [CoreResourceType.ORGANIZATION_WEBHOOK_CONFIG]: ResourcePrimaryScope.ORGANIZATIONS,\n [CoreResourceType.APPLICATION_WEBHOOK_CONFIG]: ResourcePrimaryScope.APPLICATION,\n};\n\ntype WebhookCfg = ReturnType<\n (typeof webhookConfigPolymorphicFactories)[CoreResourceType.ORGANIZATION_WEBHOOK_CONFIG]\n>;\ntype WebhookConfigCustomOp = NonNullable<WebhookCfg['customOperation']>;\n// Derive from the factory's coreOperations so the spec tracks config changes\n// (e.g. the REPOSITORY_ONLY DELETE for the onParentDelete cascade) automatically,\n// rather than a hand-maintained union that silently drifts out of sync.\ntype WebhookConfigCoreOp = WebhookCfg['coreOperations'][number];\ntype WebhookConfigMain = typeof WebhookConfigBaseSchema;\n\ntype WebhookFrontend = ResourceUIBehaviorConfig<WebhookConfigCustomOp, WebhookConfigCoreOp, WebhookConfigMain>;\n\n/**\n * Extract the merged ui-behavior for one webhook-config variant from a presets\n * bundle. The presets declare both scope variants (ORG addressable, APP demoted),\n * so this resolves either; a missing entry is an authoring error, surfaced loudly.\n */\nfunction resolveWebhookConfigUI(\n source: Partial<Record<string, unknown>>,\n resourceType: WebhookConfigResourceType,\n sourceName: string,\n): WebhookFrontend {\n const ui = source[resourceType] as WebhookFrontend | undefined;\n if (!ui) {\n throw new Error(`Missing \"${resourceType}\" UI behavior in ${sourceName}.`);\n }\n return ui;\n}\n\nfunction buildWebhookConfigBaseSpecification(\n resourceType: WebhookConfigResourceType,\n memberName: WebhookConfigResourceTypeMember,\n): ResourceSpecificationConfig<WebhookConfigCustomOp, WebhookConfigCoreOp, WebhookConfigMain> {\n const isOrganizationScope = resourceType === CoreResourceType.ORGANIZATION_WEBHOOK_CONFIG;\n const scopeLabel = isOrganizationScope ? 'organization' : 'application';\n const scopeId = isOrganizationScope ? 'org_acme' : 'app_wonder_todos';\n const scopeFieldName = isOrganizationScope ? 'organizationId' : 'applicationId';\n const readExample = {\n _id: 'whc_01HX2EXAMPLE',\n enabled: true,\n endpoints: [\n {\n id: 'whe_primary_partner',\n url: 'https://hooks.example.com/wildo',\n description: 'Primary partner listener',\n enabled: true,\n createdAt: '2026-06-14T12:00:00.000Z',\n updatedAt: '2026-06-14T12:00:00.000Z',\n },\n ],\n applicationPublicKeyPem: '-----BEGIN PUBLIC KEY-----\\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AEXAMPLE\\n-----END PUBLIC KEY-----',\n createdAt: '2026-06-14T12:00:00.000Z',\n updatedAt: '2026-06-14T12:00:00.000Z',\n [scopeFieldName]: scopeId,\n };\n\n return resourceSpecification<WebhookConfigCustomOp, WebhookConfigCoreOp, WebhookConfigMain>(\n webhookConfigPolymorphicFactories[resourceType],\n WebhookConfigBaseSchema,\n ({ schemaShape }) => ({\n purpose: 'Store tenant-level M2M webhook configuration (endpoints, master enable flag, and derived verification material) for outbound `WEBHOOK_ORGANIZATION` or `WEBHOOK_APPLICATION` delivery.',\n businessRole: 'Singleton-per-scope config row that the dispatcher and admin UI use to know where to POST JSON payloads and which endpoints are still enabled.',\n lifecycleRole: 'Seeded as a REPOSITORY-only create per org/app, then maintained by admins (UPDATE) and read for diagnostics; test deliveries exercise connectivity without writing delivery log rows.',\n audience: LabelAudience.DEVELOPER,\n subDomain: EngineResourceSubDomain.NOTIFICATIONS,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'WebhookConfigBaseSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactoryCollectionEntry: {\n collectionSymbol: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'webhookConfigPolymorphicFactories',\n symbolKind: CodeSymbolKind.FACTORY,\n },\n identifierField: 'collectionKey',\n identifierValue: resourceType,\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,\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: 'WebhookConfig_Operations',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n notes: [\n 'Factory entry is selected by `webhookConfigPolymorphicFactories[CoreResourceType.*]`; `identifierField: \"collectionKey\"` follows the engine polymorphic map convention (see SSO + billing polymorphic specs).',\n 'The runtime injects the scope FK (`organizationId` or `applicationId`) — never list those columns on the base Zod object.',\n ],\n },\n fields: {\n _id: schemaShape._id.stringSpec({\n meaning: 'Singleton document id for the webhook config row in this scope’s MongoDB collection.',\n importance: FieldSemanticImportance.PRIMARY,\n semanticRole: 'identifier',\n }),\n enabled: schemaShape.enabled.booleanSpec({\n meaning: 'Global kill-switch: when `false`, the dispatcher does not attempt deliveries regardless of per-endpoint flags.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n endpoints: schemaShape.endpoints.arraySpec({\n meaning: 'Admin-configured destination URLs, each with its own `enabled` bit and `endpointId` for delivery-log provenance.',\n whyItMatters: 'M2M events fan out to every enabled row; disabled endpoints are skipped per dispatch.',\n elementMeaning: 'One `WebhookEndpointSchema` (id, url, description, flags, created/updated timestamps).',\n elementType: {\n notes: [\n 'Element schema: `WebhookEndpointSchema` in `engine/saas-models/src/notifications/m2m/webhook-config.shared.schemas.ts`.',\n ],\n },\n }),\n applicationPublicKeyPem: schemaShape.applicationPublicKeyPem.stringSpec({\n meaning: 'PEM public half of `JwtPrivateKeys.APPLICATION_WEBHOOK`, surfaced on READ so customers verify JWT `X-Webhook-Signature` bodies.',\n whyItMatters: 'Downstream verifiers need the public key without out-of-band secret sharing; key rotation re-reads from app config on every READ per postfix hook.',\n }),\n createdAt: schemaShape.createdAt.dateSpec({\n meaning: 'When the singleton config row was first inserted.',\n temporalRole: 'creation',\n }),\n updatedAt: schemaShape.updatedAt.dateSpec({\n meaning: 'When the row last changed (endpoint list edits, `enabled` toggles, or hook refreshes).',\n temporalRole: 'modified',\n }),\n },\n operations: {\n [Op.READ]: {\n purpose: 'Return the org- or app-scoped config including endpoints and the derived public key material.',\n outcome: 'Admins and automated smoke tests can verify the runtime wiring before shipping traffic.',\n whenToUse: 'Use from admin UIs, CLI diagnostics, and health checks; requires org-admin or app-super-admin roles per variant.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The singleton webhook config for this scope is returned, including the endpoint list and the derived `applicationPublicKeyPem` for signature verification.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No webhook config has been seeded for this org/app scope yet (the singleton row does not exist).' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the org-admin (ORG variant) or app-super-admin (APP variant) role required to read webhook configuration.' },\n ],\n idempotent: true,\n examples: [\n {\n title: `Read the active ${scopeLabel} webhook configuration`,\n response: readExample,\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n [Op.CREATE]: {\n purpose: 'Seed the singleton config document when a new org/app is provisioned and the collection is empty.',\n outcome: 'A baseline disabled config exists so the dispatcher can load structured rows without null-check sprawl.',\n whenToUse: 'Repository-only path — not an HTTP public create; used by system seeds or platform bootstrap runs.',\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'The baseline (disabled) singleton config row was seeded for this scope and returned. Internal/service write path — system seeds or platform bootstrap run this, not a public HTTP create.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The seed payload fails schema validation (e.g. a non-HTTPS endpoint URL or a malformed endpoint entry).', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'A non-system/non-admin caller attempts to seed the config row.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'A webhook config already exists for this scope — the resource is a singleton-per-scope, so a second seed collides with the existing row.' },\n ],\n idempotent: false,\n examples: [\n {\n title: 'Seed a disabled webhook config with one endpoint',\n request: {\n enabled: false,\n endpoints: [\n { url: 'https://hooks.example.com/wildo', description: 'Primary partner listener', enabled: true },\n ],\n },\n response: {\n _id: 'whc_01HX2…',\n enabled: false,\n endpoints: [\n { id: 'whe_01HX2…', url: 'https://hooks.example.com/wildo', enabled: true },\n ],\n },\n forStatus: HttpResponseStatusCode.CREATED_201,\n },\n ],\n },\n [Op.UPDATE]: {\n purpose: 'Persist endpoint URL edits, enable toggles, and metadata updates for the current scope’s singleton.',\n outcome: 'The next M2M notification fire sees the new routing truth immediately after commit.',\n whenToUse: 'Use in admin “save endpoints” flows or through trusted automation, still via repository or dedicated controller surfaces rather than a generic public PUT API.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The endpoint list / `enabled` toggles / metadata were persisted and the updated singleton config is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The edited endpoints or flags fail schema validation (e.g. a non-HTTPS URL or a duplicate endpoint id).', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the org-admin / app-super-admin role required to change webhook configuration.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No webhook config has been seeded for this scope to update.' },\n ],\n idempotent: true,\n rateLimitNote: 'Endpoint edits can rotate the signing key material read on every READ; throttle rapid save cycles so downstream verifiers are not churned by repeated key changes.',\n },\n [Op.DELETE]: {\n purpose: 'Repository-only teardown of the webhook config row when its owning org/app is deleted (composition `onParentDelete` cascade).',\n outcome: 'The one-per-scope config row is removed together with its parent — the composition part does not outlive its whole.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The webhook config row was deleted as part of the deletion cascade of its owning scope.' },\n ],\n // REPOSITORY_ONLY variant (org/app admin) — invoked by the onParentDelete cascade, not a public HTTP endpoint, so no client-facing 400/403/404 are documented.\n idempotent: true,\n },\n [WebhookConfig_Operations.TEST_ENDPOINT]: {\n operationId: WebhookConfig_Operations.TEST_ENDPOINT,\n purpose: 'Send a single synthetic request to a chosen `endpointId` to prove reachability and signature verification (does not create `M2MWebhookDeliveryLog` rows). Borrows UPDATE (a `PUT` on the custom-op sub-path) rather than READ: no row is written, but a live signed request leaves the platform, and a `GET` for that was a contradiction the generated contract had to spell out as `x-idempotent: false`.',\n outcome: 'Admins can validate connectivity in isolation before real notification traffic is enabled. The response is a diagnostic — `outcome` (`accepted` / `rejected` / `unreachable` / `not_sent`), plus response status, truncated response body, failure reason, duration, and the probe’s `signatureJti` for correlation against the consumer’s own logs — NOT the configuration row.',\n whenToUse: 'Run after any URL/secret/rotation event that could break downstream listeners.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The synthetic request was attempted and a diagnostic result (reachability, response status, signature-verification outcome) is returned — a transport-level failure at the customer endpoint is still a 200 carrying the diagnostic, not an API error. `not_sent` likewise answers 200: the payload could not be signed, which is a platform-side key fault reported distinctly so it is never misread as a broken customer endpoint.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No webhook config exists for this scope, or the supplied `endpointId` is not present in the config’s endpoint list.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the org-admin / app-super-admin role required to fire a test delivery.' },\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'No `endpointId` was supplied, or the stored endpoint is incomplete (e.g. missing URL), so no meaningful test can be sent.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.TOO_MANY_REQUESTS_429, when: 'The per-endpoint probe budget for the current window is exhausted. Also returned when the rate-limit store is unreachable: this operation fails CLOSED, because running an egress primitive unmetered is worse than refusing it.' },\n ],\n idempotent: false,\n rateLimitNote: 'ENFORCED, not advisory: at most 5 probes per endpoint per 60s, keyed on scope + `endpointId` (the resource being protected is the customer’s listener, which does not care which admin is iterating). Exceeding it returns 429 with `retryAfterSeconds`.',\n examples: [\n {\n title: 'Endpoint accepts the signed probe',\n request: { endpointId: 'whe_primary_partner' },\n response: {\n endpointId: 'whe_primary_partner',\n url: 'https://hooks.example.com/wildo',\n outcome: WebhookEndpointProbeOutcome.ACCEPTED,\n responseStatus: 202,\n responseBodyTruncated: 'queued',\n durationMs: 84,\n signatureJti: 'probe_01HX2ACCEPTED',\n attemptedAt: '2026-06-14T12:05:00.000Z',\n },\n forStatus: HttpResponseStatusCode.OK_200,\n },\n {\n title: 'Endpoint rejects the signed probe',\n request: { endpointId: 'whe_primary_partner' },\n response: {\n endpointId: 'whe_primary_partner',\n url: 'https://hooks.example.com/wildo',\n outcome: WebhookEndpointProbeOutcome.REJECTED,\n responseStatus: 401,\n responseBodyTruncated: 'invalid signature',\n durationMs: 61,\n signatureJti: 'probe_01HX2REJECTED',\n attemptedAt: '2026-06-14T12:06:00.000Z',\n },\n forStatus: HttpResponseStatusCode.OK_200,\n },\n {\n title: 'Endpoint cannot be reached',\n request: { endpointId: 'whe_primary_partner' },\n response: {\n endpointId: 'whe_primary_partner',\n url: 'https://hooks.example.com/wildo',\n outcome: WebhookEndpointProbeOutcome.UNREACHABLE,\n failureReason: 'fetch failed: connect ECONNREFUSED',\n durationMs: 10003,\n signatureJti: 'probe_01HX2UNREACHABLE',\n attemptedAt: '2026-06-14T12:07:00.000Z',\n },\n forStatus: HttpResponseStatusCode.OK_200,\n },\n {\n title: 'Probe is not sent because signing fails',\n request: { endpointId: 'whe_primary_partner' },\n response: {\n endpointId: 'whe_primary_partner',\n url: 'https://hooks.example.com/wildo',\n outcome: WebhookEndpointProbeOutcome.NOT_SENT,\n failureReason: 'JWT signing failed: application webhook key unavailable',\n durationMs: 0,\n signatureJti: 'probe_01HX2NOTSENT',\n attemptedAt: '2026-06-14T12:08:00.000Z',\n },\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n },\n businessConstraints: [\n 'Each scope owns at most one config row: treat this as a singleton resource, not a list resource with arbitrary many configs.',\n 'Because deliveries are multi-endpoint, keep endpoint ids stable: deleting an endpoint that still has log rows will break referential explainability in the delivery log view.',\n '`testEndpoint` probes travel the SAME signed transport as real deliveries (same key, same claim shape, same `X-Webhook-Signature` header). That is the point: a probe reaching the endpoint by a separate code path would attest to that path rather than to the delivery path. Do not give the probe its own HTTP client.',\n 'Probe traffic is marked synthetic on BOTH the body (`synthetic: true` plus explanatory text) and the signed claims, so a consumer can hard-refuse it on the verified envelope rather than on body text. Wildo is POSTing to a customer’s production listener; a probe indistinguishable from a real event invites consumers to act on a fake one.',\n 'A DISABLED endpoint is still probed. \"Validate before enabling\" is the primary workflow this operation exists for, and refusing would force an admin to enable an unverified URL in order to verify it.',\n 'Every attempt — successful or not — is recorded as a `WEBHOOK_ENDPOINT_TEST_DISPATCHED` audit event carrying the actor, scope, endpoint, outcome and destination HOST (never the full URL: customer endpoint paths routinely embed per-tenant tokens, and audit rows replicate to the org SIEM and the immutable store).',\n ],\n }),\n { resourcePrimaryScope: webhookConfigResourcePrimaryScope[resourceType] },\n );\n}\n\n/**\n * Compose the backend-semantics base with the frontend ui-behavior so the spec\n * can DOCUMENT the sectioned READ layout the preset declares. The section refs\n * (`status` / `endpoints` / `verification`) MUST equal the preset's\n * `layout.refs.sections` for this resource — `validateStructuralSlotDescriptions`\n * enforces the match bidirectionally at companion load (mirrors the SIEM config).\n */\nfunction buildWebhookConfigSpecification(\n resourceType: WebhookConfigResourceType,\n memberName: WebhookConfigResourceTypeMember,\n) {\n const base = buildWebhookConfigBaseSpecification(resourceType, memberName);\n const main = resolveWebhookConfigUI(webhooksMainPresets as Partial<Record<string, unknown>>, resourceType, 'webhooksMainPresets');\n const admin = resolveWebhookConfigUI(webhooksAdminPresets as Partial<Record<string, unknown>>, resourceType, 'webhooksAdminPresets');\n return resourceSpecificationFromFrontendConfiguration(\n mergeResourceFrontendConfigurations(resourceFrontendConfiguration(main), resourceFrontendConfiguration(admin)),\n base,\n () => ({\n layout: {\n purpose: 'The webhook config READ groups the singleton into `status`, `endpoints`, and `verification` sections so an admin reasons about the integration top-down: is it on, where does it deliver, how do receivers verify signatures.',\n displayPurpose: 'Read template renders the same three sections in that order; timestamps and the surrogate id are intentionally omitted from the curated admin read.',\n sections: {\n status: {\n purpose: 'The master `enabled` kill-switch for outbound delivery in this scope.',\n whenToUse: 'First decision: pause or resume all deliveries without editing endpoints.',\n textSlots: {\n title: { purpose: 'Name the “deliveries on / paused” card.' },\n description: { purpose: 'Clarify that disabling stops new deliveries but keeps the endpoint configuration intact.' },\n },\n },\n endpoints: {\n purpose: 'The admin-configured destination URLs, each with its own enable bit and stable `endpointId`.',\n whenToUse: 'Adding, disabling, or auditing where M2M events fan out.',\n textSlots: {\n title: { purpose: 'Label the destinations / endpoints block.' },\n description: { purpose: 'Note that each enabled endpoint receives every dispatched event; disabled endpoints are skipped per delivery.' },\n },\n },\n verification: {\n purpose: 'The derived `applicationPublicKeyPem` receivers use to verify the JWT `X-Webhook-Signature`.',\n whenToUse: 'When a receiver sets up or rotates signature verification.',\n textSlots: {\n title: { purpose: 'Label the signature-verification key block.' },\n description: { purpose: 'Read-only; the public half of the app webhook signing key, refreshed on read after rotation.' },\n },\n },\n },\n },\n }),\n );\n}\n\nexport const organizationWebhookConfigResourceSpecification = buildWebhookConfigSpecification(\n CoreResourceType.ORGANIZATION_WEBHOOK_CONFIG,\n 'ORGANIZATION_WEBHOOK_CONFIG',\n);\n\nexport const applicationWebhookConfigResourceSpecification = buildWebhookConfigSpecification(\n CoreResourceType.APPLICATION_WEBHOOK_CONFIG,\n 'APPLICATION_WEBHOOK_CONFIG',\n);\n"]}
1
+ {"version":3,"file":"webhook-config.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/notifications/resources/webhook-config.resource.specification.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,qBAAqB,IAAI,EAAE,EAC3B,gBAAgB,EAChB,oBAAoB,EACpB,wBAAwB,EACxB,uBAAuB,EACvB,2BAA2B,EAC3B,iCAAiC,GAClC,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAEzF,OAAO,EACL,sBAAsB,EACtB,mCAAmC,EACnC,6BAA6B,EAC7B,qBAAqB,EACrB,8CAA8C,GAE/C,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAQ3E,MAAM,iCAAiC,GAA4D;IACjG,CAAC,gBAAgB,CAAC,2BAA2B,CAAC,EAAE,oBAAoB,CAAC,aAAa;IAClF,CAAC,gBAAgB,CAAC,0BAA0B,CAAC,EAAE,oBAAoB,CAAC,WAAW;CAChF,CAAC;AAcF;;;;GAIG;AACH,SAAS,sBAAsB,CAC7B,MAAwC,EACxC,YAAuC,EACvC,UAAkB;IAElB,MAAM,EAAE,GAAG,MAAM,CAAC,YAAY,CAAgC,CAAC;IAC/D,IAAI,CAAC,EAAE,EAAE,CAAC;QACR,MAAM,IAAI,KAAK,CAAC,YAAY,YAAY,oBAAoB,UAAU,GAAG,CAAC,CAAC;IAC7E,CAAC;IACD,OAAO,EAAE,CAAC;AACZ,CAAC;AAED,SAAS,mCAAmC,CAC1C,YAAuC,EACvC,UAA2C;IAE3C,MAAM,mB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\n * Resources: `organizationWebhookConfig` + `applicationWebhookConfig` — Wildo SaaS engine specification (backend-only).\n *\n * Polymorphic ORG + APP pair sharing `WebhookConfigBaseSchema` and `webhookConfigPolymorphicFactories` (one spec export per\n * `CoreResourceType`, single authoring file, SSO-style split exports).\n *\n * Inputs:\n * - Base schema: engine/saas-models/src/notifications/m2m/webhook-config.shared.schemas.ts → `WebhookConfigBaseSchema`\n * - Polymorphic map: `webhookConfigPolymorphicFactories` (same file family as\n * `webhook-config.shared.resources-config.schemas.ts`)\n * - Custom operations: `WebhookConfig_Operations` (`testEndpoint` synthetic delivery)\n * - UI presets: `webhooksMainPresets` / `webhooksAdminPresets`\n * (engine/presets-components/src/config/resources/webhooks.resource-presets.tsx) —\n * sectioned READ layout (`status` / `endpoints` / `verification`), surfaced in the\n * org Settings Hub `webhooks` section. The spec is frontend-configured (mirrors the\n * SIEM config): the `frontend.layout.sections` documented below MUST equal the\n * preset's `layout.refs.sections` — `validateStructuralSlotDescriptions` enforces\n * the match bidirectionally at companion load. Edit both sides together.\n */\n\nimport { LabelAudience } from '@wildo-ai/presets-components-models';\nimport {\n CodeDeclarationKind,\n CodeSymbolKind,\n FieldSemanticImportance,\n} from '@wildo-ai/zod-decorators';\nimport {\n CoreResourceOperation as Op,\n CoreResourceType,\n ResourcePrimaryScope,\n WebhookConfig_Operations,\n WebhookConfigBaseSchema,\n WebhookEndpointProbeOutcome,\n webhookConfigPolymorphicFactories,\n} from '@wildo-ai/saas-models';\nimport { webhooksAdminPresets, webhooksMainPresets } from '@wildo-ai/presets-components';\nimport type { ResourceUIBehaviorConfig } from '@wildo-ai/saas-frontend-lib/companion';\nimport {\n HttpResponseStatusCode,\n mergeResourceFrontendConfigurations,\n resourceFrontendConfiguration,\n resourceSpecification,\n resourceSpecificationFromFrontendConfiguration,\n type ResourceSpecificationConfig,\n} from '~wildo-specifications/_core';\nimport { EngineResourceSubDomain } from '../../engine-resource-sub-domain';\n\ntype WebhookConfigResourceType =\n | CoreResourceType.ORGANIZATION_WEBHOOK_CONFIG\n | CoreResourceType.APPLICATION_WEBHOOK_CONFIG;\n\ntype WebhookConfigResourceTypeMember = 'ORGANIZATION_WEBHOOK_CONFIG' | 'APPLICATION_WEBHOOK_CONFIG';\n\nconst webhookConfigResourcePrimaryScope: Record<WebhookConfigResourceType, ResourcePrimaryScope> = {\n [CoreResourceType.ORGANIZATION_WEBHOOK_CONFIG]: ResourcePrimaryScope.ORGANIZATIONS,\n [CoreResourceType.APPLICATION_WEBHOOK_CONFIG]: ResourcePrimaryScope.APPLICATION,\n};\n\ntype WebhookCfg = ReturnType<\n (typeof webhookConfigPolymorphicFactories)[CoreResourceType.ORGANIZATION_WEBHOOK_CONFIG]\n>;\ntype WebhookConfigCustomOp = NonNullable<WebhookCfg['customOperation']>;\n// Derive from the factory's coreOperations so the spec tracks config changes\n// (e.g. the REPOSITORY_ONLY DELETE for the onParentDelete cascade) automatically,\n// rather than a hand-maintained union that silently drifts out of sync.\ntype WebhookConfigCoreOp = WebhookCfg['coreOperations'][number];\ntype WebhookConfigMain = typeof WebhookConfigBaseSchema;\n\ntype WebhookFrontend = ResourceUIBehaviorConfig<WebhookConfigCustomOp, WebhookConfigCoreOp, WebhookConfigMain>;\n\n/**\n * Extract the merged ui-behavior for one webhook-config variant from a presets\n * bundle. The presets declare both scope variants (ORG addressable, APP demoted),\n * so this resolves either; a missing entry is an authoring error, surfaced loudly.\n */\nfunction resolveWebhookConfigUI(\n source: Partial<Record<string, unknown>>,\n resourceType: WebhookConfigResourceType,\n sourceName: string,\n): WebhookFrontend {\n const ui = source[resourceType] as WebhookFrontend | undefined;\n if (!ui) {\n throw new Error(`Missing \"${resourceType}\" UI behavior in ${sourceName}.`);\n }\n return ui;\n}\n\nfunction buildWebhookConfigBaseSpecification(\n resourceType: WebhookConfigResourceType,\n memberName: WebhookConfigResourceTypeMember,\n): ResourceSpecificationConfig<WebhookConfigCustomOp, WebhookConfigCoreOp, WebhookConfigMain> {\n const isOrganizationScope = resourceType === CoreResourceType.ORGANIZATION_WEBHOOK_CONFIG;\n const scopeLabel = isOrganizationScope ? 'organization' : 'application';\n const scopeId = isOrganizationScope ? 'org_acme' : 'app_wonder_todos';\n const scopeFieldName = isOrganizationScope ? 'organizationId' : 'applicationId';\n const readExample = {\n _id: 'whc_01HX2EXAMPLE',\n enabled: true,\n endpoints: [\n {\n id: 'whe_primary_partner',\n url: 'https://hooks.example.com/wildo',\n description: 'Primary partner listener',\n enabled: true,\n createdAt: '2026-06-14T12:00:00.000Z',\n updatedAt: '2026-06-14T12:00:00.000Z',\n },\n ],\n applicationPublicKeyPem: '-----BEGIN PUBLIC KEY-----\\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AEXAMPLE\\n-----END PUBLIC KEY-----',\n createdAt: '2026-06-14T12:00:00.000Z',\n updatedAt: '2026-06-14T12:00:00.000Z',\n [scopeFieldName]: scopeId,\n };\n\n return resourceSpecification<WebhookConfigCustomOp, WebhookConfigCoreOp, WebhookConfigMain>(\n webhookConfigPolymorphicFactories[resourceType],\n WebhookConfigBaseSchema,\n ({ schemaShape }) => ({\n purpose: 'Store tenant-level M2M webhook configuration (endpoints, master enable flag, and derived verification material) for outbound `WEBHOOK_ORGANIZATION` or `WEBHOOK_APPLICATION` delivery.',\n businessRole: 'Singleton-per-scope config row that the dispatcher and admin UI use to know where to POST JSON payloads and which endpoints are still enabled.',\n lifecycleRole: 'Seeded as a REPOSITORY-only create per org/app, then maintained by admins (UPDATE) and read for diagnostics; test deliveries exercise connectivity without writing delivery log rows.',\n audience: LabelAudience.DEVELOPER,\n subDomain: EngineResourceSubDomain.NOTIFICATIONS,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'WebhookConfigBaseSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactoryCollectionEntry: {\n collectionSymbol: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'webhookConfigPolymorphicFactories',\n symbolKind: CodeSymbolKind.FACTORY,\n },\n identifierField: 'collectionKey',\n identifierValue: resourceType,\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,\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: 'WebhookConfig_Operations',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n notes: [\n 'Factory entry is selected by `webhookConfigPolymorphicFactories[CoreResourceType.*]`; `identifierField: \"collectionKey\"` follows the engine polymorphic map convention (see SSO + billing polymorphic specs).',\n 'The runtime injects the scope FK (`organizationId` or `applicationId`) — never list those columns on the base Zod object.',\n ],\n },\n fields: {\n _id: schemaShape._id.stringSpec({\n meaning: 'Singleton document id for the webhook config record in this scope’s MongoDB collection.',\n importance: FieldSemanticImportance.PRIMARY,\n semanticRole: 'identifier',\n }),\n enabled: schemaShape.enabled.booleanSpec({\n meaning: 'Global kill-switch: when `false`, the dispatcher does not attempt deliveries regardless of per-endpoint flags.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n endpoints: schemaShape.endpoints.arraySpec({\n meaning: 'Admin-configured destination URLs, each with its own `enabled` bit and `endpointId` for delivery-log provenance.',\n whyItMatters: 'M2M events fan out to every enabled row; disabled endpoints are skipped per dispatch.',\n elementMeaning: 'One `WebhookEndpointSchema` (id, url, description, flags, created/updated timestamps).',\n elementType: {\n notes: [\n 'Element schema: `WebhookEndpointSchema` in `engine/saas-models/src/notifications/m2m/webhook-config.shared.schemas.ts`.',\n ],\n },\n }),\n applicationPublicKeyPem: schemaShape.applicationPublicKeyPem.stringSpec({\n meaning: 'PEM public half of `JwtPrivateKeys.APPLICATION_WEBHOOK`, surfaced on READ so customers verify JWT `X-Webhook-Signature` bodies.',\n whyItMatters: 'Downstream verifiers need the public key without out-of-band secret sharing; key rotation re-reads from app config on every READ per postfix hook.',\n }),\n createdAt: schemaShape.createdAt.dateSpec({\n meaning: 'When the singleton config record was first inserted.',\n temporalRole: 'creation',\n }),\n updatedAt: schemaShape.updatedAt.dateSpec({\n meaning: 'When the record last changed (endpoint list edits, `enabled` toggles, or hook refreshes).',\n temporalRole: 'modified',\n }),\n },\n operations: {\n [Op.READ]: {\n purpose: 'Return the org- or app-scoped config including endpoints and the derived public key material.',\n outcome: 'Admins and automated smoke tests can verify the runtime wiring before shipping traffic.',\n whenToUse: 'Use from admin UIs, CLI diagnostics, and health checks; requires org-admin or app-super-admin roles per variant.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The singleton webhook config for this scope is returned, including the endpoint list and the derived `applicationPublicKeyPem` for signature verification.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No webhook config has been seeded for this org/app scope yet (the singleton row does not exist).' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the org-admin (ORG variant) or app-super-admin (APP variant) role required to read webhook configuration.' },\n ],\n idempotent: true,\n examples: [\n {\n title: `Read the active ${scopeLabel} webhook configuration`,\n response: readExample,\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n [Op.CREATE]: {\n purpose: 'Seed the singleton config document when a new org/app is provisioned and the collection is empty.',\n outcome: 'A baseline disabled config exists so the dispatcher can load structured rows without null-check sprawl.',\n whenToUse: 'Repository-only path — not an HTTP public create; used by system seeds or platform bootstrap runs.',\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'The baseline (disabled) singleton config record was seeded for this scope and returned. Internal/service write path — system seeds or platform bootstrap run this, not a public HTTP create.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The seed payload fails schema validation (e.g. a non-HTTPS endpoint URL or a malformed endpoint entry).', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'A non-system/non-admin caller attempts to seed the config row.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'A webhook config already exists for this scope — the resource is a singleton-per-scope, so a second seed collides with the existing row.' },\n ],\n idempotent: false,\n examples: [\n {\n title: 'Seed a disabled webhook config with one endpoint',\n request: {\n enabled: false,\n endpoints: [\n { url: 'https://hooks.example.com/wildo', description: 'Primary partner listener', enabled: true },\n ],\n },\n response: {\n _id: 'whc_01HX2…',\n enabled: false,\n endpoints: [\n { id: 'whe_01HX2…', url: 'https://hooks.example.com/wildo', enabled: true },\n ],\n },\n forStatus: HttpResponseStatusCode.CREATED_201,\n },\n ],\n },\n [Op.UPDATE]: {\n purpose: 'Persist endpoint URL edits, enable toggles, and metadata updates for the current scope’s singleton.',\n outcome: 'The next M2M notification fire sees the new routing truth immediately after commit.',\n whenToUse: 'Use in admin “save endpoints” flows or through trusted automation, still via repository or dedicated controller surfaces rather than a generic public PUT API.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The endpoint list / `enabled` toggles / metadata were persisted and the updated singleton config is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The edited endpoints or flags fail schema validation (e.g. a non-HTTPS URL or a duplicate endpoint id).', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the org-admin / app-super-admin role required to change webhook configuration.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No webhook config has been seeded for this scope to update.' },\n ],\n idempotent: true,\n rateLimitNote: 'Endpoint edits can rotate the signing key material read on every READ; throttle rapid save cycles so downstream verifiers are not churned by repeated key changes.',\n },\n [Op.DELETE]: {\n purpose: 'Repository-only teardown of the webhook config row when its owning org/app is deleted (composition `onParentDelete` cascade).',\n outcome: 'The one-per-scope config row is removed together with its parent — the composition part does not outlive its whole.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The webhook config record was deleted as part of the deletion cascade of its owning scope.' },\n ],\n // REPOSITORY_ONLY variant (org/app admin) — invoked by the onParentDelete cascade, not a public HTTP endpoint, so no client-facing 400/403/404 are documented.\n idempotent: true,\n },\n [WebhookConfig_Operations.TEST_ENDPOINT]: {\n operationId: WebhookConfig_Operations.TEST_ENDPOINT,\n purpose: 'Send a single synthetic request to a chosen `endpointId` to prove reachability and signature verification (does not create `M2MWebhookDeliveryLog` rows). Borrows UPDATE (a `PUT` on the custom-op sub-path) rather than READ: no row is written, but a live signed request leaves the platform, and a `GET` for that was a contradiction the generated contract had to spell out as `x-idempotent: false`.',\n outcome: 'Admins can validate connectivity in isolation before real notification traffic is enabled. The response is a diagnostic — `outcome` (`accepted` / `rejected` / `unreachable` / `not_sent`), plus response status, truncated response body, failure reason, duration, the probe’s `signatureJti` for correlation against the consumer’s own logs, and `transportIsPlaintext` — NOT the configuration row. `transportIsPlaintext` is independent of `outcome`: an endpoint on `http://` can answer `accepted` and still be sending the delivery signature in the clear, where it is readable and replayable until it expires. Plaintext endpoints are admitted deliberately (see `WebhookEndpointSchema.url`), so this probe is where that admission is surfaced to the admin who can act on it.',\n whenToUse: 'Run after any URL/secret/rotation event that could break downstream listeners.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The synthetic request was attempted and a diagnostic result (reachability, response status, signature-verification outcome) is returned — a transport-level failure at the customer endpoint is still a 200 carrying the diagnostic, not an API error. `not_sent` likewise answers 200: the payload could not be signed, which is a platform-side key fault reported distinctly so it is never misread as a broken customer endpoint.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No webhook config exists for this scope, or the supplied `endpointId` is not present in the config’s endpoint list.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the org-admin / app-super-admin role required to fire a test delivery.' },\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'No `endpointId` was supplied, or the stored endpoint is incomplete (e.g. missing URL), so no meaningful test can be sent.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.TOO_MANY_REQUESTS_429, when: 'The per-endpoint probe budget for the current window is exhausted. Also returned when the rate-limit store is unreachable: this operation fails CLOSED, because running an egress primitive unmetered is worse than refusing it.' },\n ],\n idempotent: false,\n rateLimitNote: 'ENFORCED, not advisory: at most 5 probes per endpoint per 60s, keyed on scope + `endpointId` (the resource being protected is the customer’s listener, which does not care which admin is iterating). Exceeding it returns 429 with `retryAfterSeconds`.',\n examples: [\n {\n title: 'Endpoint accepts the signed probe',\n request: { endpointId: 'whe_primary_partner' },\n response: {\n endpointId: 'whe_primary_partner',\n url: 'https://hooks.example.com/wildo',\n transportIsPlaintext: false,\n outcome: WebhookEndpointProbeOutcome.ACCEPTED,\n responseStatus: 202,\n responseBodyTruncated: 'queued',\n durationMs: 84,\n signatureJti: 'probe_01HX2ACCEPTED',\n attemptedAt: '2026-06-14T12:05:00.000Z',\n },\n forStatus: HttpResponseStatusCode.OK_200,\n },\n {\n title: 'Endpoint rejects the signed probe',\n request: { endpointId: 'whe_primary_partner' },\n response: {\n endpointId: 'whe_primary_partner',\n url: 'https://hooks.example.com/wildo',\n transportIsPlaintext: false,\n outcome: WebhookEndpointProbeOutcome.REJECTED,\n responseStatus: 401,\n responseBodyTruncated: 'invalid signature',\n durationMs: 61,\n signatureJti: 'probe_01HX2REJECTED',\n attemptedAt: '2026-06-14T12:06:00.000Z',\n },\n forStatus: HttpResponseStatusCode.OK_200,\n },\n {\n title: 'Endpoint cannot be reached',\n request: { endpointId: 'whe_primary_partner' },\n response: {\n endpointId: 'whe_primary_partner',\n url: 'https://hooks.example.com/wildo',\n transportIsPlaintext: false,\n outcome: WebhookEndpointProbeOutcome.UNREACHABLE,\n failureReason: 'fetch failed: connect ECONNREFUSED',\n durationMs: 10003,\n signatureJti: 'probe_01HX2UNREACHABLE',\n attemptedAt: '2026-06-14T12:07:00.000Z',\n },\n forStatus: HttpResponseStatusCode.OK_200,\n },\n {\n title: 'Probe is not sent because signing fails',\n request: { endpointId: 'whe_primary_partner' },\n response: {\n endpointId: 'whe_primary_partner',\n url: 'https://hooks.example.com/wildo',\n transportIsPlaintext: false,\n outcome: WebhookEndpointProbeOutcome.NOT_SENT,\n failureReason: 'JWT signing failed: application webhook key unavailable',\n durationMs: 0,\n signatureJti: 'probe_01HX2NOTSENT',\n attemptedAt: '2026-06-14T12:08:00.000Z',\n },\n forStatus: HttpResponseStatusCode.OK_200,\n },\n {\n title: 'Endpoint accepts the probe, but over plaintext HTTP',\n request: { endpointId: 'whe_legacy_plaintext' },\n response: {\n endpointId: 'whe_legacy_plaintext',\n url: 'http://legacy.example.com/wildo',\n // The case this field exists for (#492). A working endpoint AND a credential on the\n // wire — `ACCEPTED` is the truthful outcome, and reporting the exposure as a failure\n // would be false, so the two are stated separately.\n transportIsPlaintext: true,\n outcome: WebhookEndpointProbeOutcome.ACCEPTED,\n responseStatus: 200,\n responseBodyTruncated: 'ok',\n durationMs: 77,\n signatureJti: 'probe_01HX2PLAINTEXT',\n attemptedAt: '2026-06-14T12:09:00.000Z',\n },\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n },\n businessConstraints: [\n 'Each scope owns at most one config row: treat this as a singleton resource, not a list resource with arbitrary many configs.',\n 'Because deliveries are multi-endpoint, keep endpoint ids stable: deleting an endpoint that still has log rows will break referential explainability in the delivery log view.',\n '`testEndpoint` probes travel the SAME signed transport as real deliveries (same key, same claim shape, same `X-Webhook-Signature` header). That is the point: a probe reaching the endpoint by a separate code path would attest to that path rather than to the delivery path. Do not give the probe its own HTTP client.',\n 'Probe traffic is marked synthetic on BOTH the body (`synthetic: true` plus explanatory text) and the signed claims, so a consumer can hard-refuse it on the verified envelope rather than on body text. Wildo is POSTing to a customer’s production listener; a probe indistinguishable from a real event invites consumers to act on a fake one.',\n 'A DISABLED endpoint is still probed. \"Validate before enabling\" is the primary workflow this operation exists for, and refusing would force an admin to enable an unverified URL in order to verify it.',\n 'Every attempt — successful or not — is recorded as a `WEBHOOK_ENDPOINT_TEST_DISPATCHED` audit event carrying the actor, scope, endpoint, outcome and destination HOST (never the full URL: customer endpoint paths routinely embed per-tenant tokens, and audit rows replicate to the org SIEM and the immutable store).',\n ],\n }),\n { resourcePrimaryScope: webhookConfigResourcePrimaryScope[resourceType] },\n );\n}\n\n/**\n * Compose the backend-semantics base with the frontend ui-behavior so the spec\n * can DOCUMENT the sectioned READ layout the preset declares. The section refs\n * (`status` / `endpoints` / `verification`) MUST equal the preset's\n * `layout.refs.sections` for this resource — `validateStructuralSlotDescriptions`\n * enforces the match bidirectionally at companion load (mirrors the SIEM config).\n */\nfunction buildWebhookConfigSpecification(\n resourceType: WebhookConfigResourceType,\n memberName: WebhookConfigResourceTypeMember,\n) {\n const base = buildWebhookConfigBaseSpecification(resourceType, memberName);\n const main = resolveWebhookConfigUI(webhooksMainPresets as Partial<Record<string, unknown>>, resourceType, 'webhooksMainPresets');\n const admin = resolveWebhookConfigUI(webhooksAdminPresets as Partial<Record<string, unknown>>, resourceType, 'webhooksAdminPresets');\n return resourceSpecificationFromFrontendConfiguration(\n mergeResourceFrontendConfigurations(resourceFrontendConfiguration(main), resourceFrontendConfiguration(admin)),\n base,\n () => ({\n layout: {\n purpose: 'The webhook config READ groups the singleton into `status`, `endpoints`, and `verification` sections so an admin reasons about the integration top-down: is it on, where does it deliver, how do receivers verify signatures.',\n displayPurpose: 'Read template renders the same three sections in that order; timestamps and the surrogate id are intentionally omitted from the curated admin read.',\n sections: {\n status: {\n purpose: 'The master `enabled` kill-switch for outbound delivery in this scope.',\n whenToUse: 'First decision: pause or resume all deliveries without editing endpoints.',\n textSlots: {\n title: { purpose: 'Name the “deliveries on / paused” card.' },\n description: { purpose: 'Clarify that disabling stops new deliveries but keeps the endpoint configuration intact.' },\n },\n },\n endpoints: {\n purpose: 'The admin-configured destination URLs, each with its own enable bit and stable `endpointId`.',\n whenToUse: 'Adding, disabling, or auditing where M2M events fan out.',\n textSlots: {\n title: { purpose: 'Label the destinations / endpoints block.' },\n description: { purpose: 'Note that each enabled endpoint receives every dispatched event; disabled endpoints are skipped per delivery.' },\n },\n },\n verification: {\n purpose: 'The derived `applicationPublicKeyPem` receivers use to verify the JWT `X-Webhook-Signature`.',\n whenToUse: 'When a receiver sets up or rotates signature verification.',\n textSlots: {\n title: { purpose: 'Label the signature-verification key block.' },\n description: { purpose: 'Read-only; the public half of the app webhook signing key, refreshed on read after rotation.' },\n },\n },\n },\n },\n }),\n );\n}\n\nexport const organizationWebhookConfigResourceSpecification = buildWebhookConfigSpecification(\n CoreResourceType.ORGANIZATION_WEBHOOK_CONFIG,\n 'ORGANIZATION_WEBHOOK_CONFIG',\n);\n\nexport const applicationWebhookConfigResourceSpecification = buildWebhookConfigSpecification(\n CoreResourceType.APPLICATION_WEBHOOK_CONFIG,\n 'APPLICATION_WEBHOOK_CONFIG',\n);\n"]}
@@ -109,8 +109,8 @@ export const organizationMembersResourceSpecification = resourceSpecificationFro
109
109
  },
110
110
  },
111
111
  }),
112
- userTitle: schemaShape.userTitle.stringSpec({ meaning: 'Authored job title / role label for the member (e.g. “Engineering Lead”). Distinct from the directory row label — that is the linked user’s name (see `instanceLabel`).' }),
113
- instanceLabel: schemaShape.instanceLabel.stringSpec({ meaning: 'Computed directory label for the membership — the linked user’s name, forwarded live from `USER_PROFILES` (joining on `userId`, rendering first/last name) and resolved SERVER-SIDE at read time via the virtual-field pipeline. A junction row has no inherent name; this gives it one without denormalizing the mutable name (never stale, tenant-safe, not persisted). The frontend uses it directly as `getFrontendResourceLabel`; it falls back to the immutable `userEmail` when the profile is unavailable.' }),
112
+ userTitle: schemaShape.userTitle.stringSpec({ meaning: 'Authored job title / role label for the member (e.g. “Engineering Lead”). Distinct from the directory record label — that is the linked user’s name (see `instanceLabel`).' }),
113
+ instanceLabel: schemaShape.instanceLabel.stringSpec({ meaning: 'Computed directory label for the membership — the linked user’s name, forwarded live from `USER_PROFILES` (joining on `userId`, rendering first/last name) and resolved SERVER-SIDE at read time via the virtual-field pipeline. A junction record has no inherent name; this gives it one without denormalizing the mutable name (never stale, tenant-safe, not persisted). The frontend uses it directly as `getFrontendResourceLabel`; it falls back to the immutable `userEmail` when the profile is unavailable.' }),
114
114
  userEmail: schemaShape.userEmail.stringSpec({ meaning: 'Denormalized, immutable copy of the linked user’s email captured at membership creation. Two roles: the OWN-FIELD half of member search (first/last name are searched relationally through `USER_PROFILES`, never denormalized), and the secondary label fallback behind the server-resolved `instanceLabel`. The live email lives on `USERS`; this copy is display-hidden and never client-writable.' }),
115
115
  status: schemaShape.status.enumSpec({
116
116
  meaning: 'Membership lifecycle and access posture in this org.',
@@ -122,10 +122,10 @@ export const organizationMembersResourceSpecification = resourceSpecificationFro
122
122
  declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,
123
123
  },
124
124
  values: {
125
- [OrganizationMemberStatus.INVITED]: { meaning: 'A pending invitation — the membership was extended (via CREATE) but the invitee has not accepted yet. Carries a single-use accept link. Flips to ACTIVE on acceptance; the row is DELETED on decline/revoke (no terminal "rejected" status — the invite IS the membership in this pending state).' },
125
+ [OrganizationMemberStatus.INVITED]: { meaning: 'A pending invitation — the membership was extended (via CREATE) but the invitee has not accepted yet. Carries a single-use accept link. Flips to ACTIVE on acceptance; the record is DELETED on decline/revoke (no terminal "rejected" status — the invite IS the membership in this pending state).' },
126
126
  [OrganizationMemberStatus.ACTIVE]: { meaning: 'Can participate as roles allow.' },
127
127
  [OrganizationMemberStatus.INACTIVE]: { meaning: 'Record retained but not participating.' },
128
- [OrganizationMemberStatus.SUSPENDED]: { meaning: 'Access blocked in-org while row remains.' },
128
+ [OrganizationMemberStatus.SUSPENDED]: { meaning: 'Access blocked in-org while record remains.' },
129
129
  },
130
130
  }),
131
131
  scheduledReactivationAt: schemaShape.scheduledReactivationAt.dateSpec({
@@ -154,7 +154,7 @@ export const organizationMembersResourceSpecification = resourceSpecificationFro
154
154
  purpose: 'Invite a person by email, or provision an existing user through a user-linked relationship route. Email invitations create an INVITED membership; direct provisioning creates an ACTIVE membership.',
155
155
  outcome: 'The membership is created with its initial organization roles. An invitation sends one single-use acceptance link; direct provisioning sends no acceptance link. The resolved role grant is recorded in the audit trail.',
156
156
  responseStatuses: [
157
- { code: HttpResponseStatusCode.CREATED_201, meaning: 'A membership row was created linking the user to the organization with its initial roles, and the new row is returned.' },
157
+ { code: HttpResponseStatusCode.CREATED_201, meaning: 'A membership record was created linking the user to the organization with its initial roles, and the new record is returned.' },
158
158
  ],
159
159
  errorScenarios: [
160
160
  { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The user reference, roles, or title fail schema validation.', errorCode: 'VALIDATION_FAILED' },
@@ -219,7 +219,7 @@ export const organizationMembersResourceSpecification = resourceSpecificationFro
219
219
  purpose: 'Browse the organization membership directory as a paginated collection.',
220
220
  outcome: 'A page of memberships and pagination metadata is returned.',
221
221
  responseStatuses: [
222
- { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of membership rows for the organization directory.' },
222
+ { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of membership records for the organization directory.' },
223
223
  ],
224
224
  errorScenarios: [
225
225
  { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an organization member permitted to browse the membership directory.' },
@@ -300,7 +300,7 @@ export const organizationMembersResourceSpecification = resourceSpecificationFro
300
300
  purpose: 'Remove an accepted member from the organization. Use REVOKE instead for a still-pending invitation.',
301
301
  outcome: 'The membership and its organization-unit assignments are removed, organization-scoped access ends, and the withdrawn roles and unit grants are recorded in the audit trail.',
302
302
  responseStatuses: [
303
- { code: HttpResponseStatusCode.NO_CONTENT_204, meaning: 'The membership row was removed; no body is returned.' },
303
+ { code: HttpResponseStatusCode.NO_CONTENT_204, meaning: 'The membership record was removed; no body is returned.' },
304
304
  ],
305
305
  errorScenarios: [
306
306
  { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No membership row exists for the supplied id (or it was already removed).' },
@@ -329,7 +329,7 @@ export const organizationMembersResourceSpecification = resourceSpecificationFro
329
329
  outcome: 'The membership becomes SUSPENDED and no longer grants organization access. If `suspensionEndDate` is supplied, it is exposed as `scheduledReactivationAt` and the membership is reactivated after that instant; otherwise an administrator must reactivate it explicitly.',
330
330
  whenToUse: 'Use for temporary security or policy holds where the membership history must remain available. The last usable organization owner cannot be suspended.',
331
331
  responseStatuses: [
332
- { code: HttpResponseStatusCode.OK_200, meaning: 'The membership transitioned to suspended and the updated row is returned.' },
332
+ { code: HttpResponseStatusCode.OK_200, meaning: 'The membership transitioned to suspended and the updated record is returned.' },
333
333
  ],
334
334
  errorScenarios: [
335
335
  { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No membership row exists for the supplied id in the caller’s organization.' },
@@ -360,7 +360,7 @@ export const organizationMembersResourceSpecification = resourceSpecificationFro
360
360
  purpose: 'Restore access for a currently suspended organization member.',
361
361
  outcome: 'The membership becomes ACTIVE with its existing roles and any scheduled reactivation deadline is cleared.',
362
362
  responseStatuses: [
363
- { code: HttpResponseStatusCode.OK_200, meaning: 'The suspended membership transitioned back to active and the updated row is returned.' },
363
+ { code: HttpResponseStatusCode.OK_200, meaning: 'The suspended membership transitioned back to active and the updated record is returned.' },
364
364
  ],
365
365
  errorScenarios: [
366
366
  { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No membership row exists for the supplied id in the caller’s organization.' },