@wildo-ai/saas-specifications 1.1.3 → 1.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (950) hide show
  1. package/dist/assurance/external-framework-mapping.json +1228 -0
  2. package/dist/esm/_core/application-maturity/application-maturity-validation.d.ts +34 -0
  3. package/dist/esm/_core/application-maturity/application-maturity-validation.d.ts.map +1 -0
  4. package/dist/esm/_core/application-maturity/application-maturity-validation.js +66 -0
  5. package/dist/esm/_core/application-maturity/application-maturity-validation.js.map +1 -0
  6. package/dist/esm/_core/application-maturity/application-maturity.family-aspects.d.ts +3 -0
  7. package/dist/esm/_core/application-maturity/application-maturity.family-aspects.d.ts.map +1 -0
  8. package/dist/esm/_core/application-maturity/application-maturity.family-aspects.js +48 -0
  9. package/dist/esm/_core/application-maturity/application-maturity.family-aspects.js.map +1 -0
  10. package/dist/esm/_core/application-maturity/application-maturity.schemas.d.ts +201 -0
  11. package/dist/esm/_core/application-maturity/application-maturity.schemas.d.ts.map +1 -0
  12. package/dist/esm/_core/application-maturity/application-maturity.schemas.js +306 -0
  13. package/dist/esm/_core/application-maturity/application-maturity.schemas.js.map +1 -0
  14. package/dist/esm/_core/application-specification-family-identity.schemas.d.ts +304 -0
  15. package/dist/esm/_core/application-specification-family-identity.schemas.d.ts.map +1 -0
  16. package/dist/esm/_core/application-specification-family-identity.schemas.js +314 -0
  17. package/dist/esm/_core/application-specification-family-identity.schemas.js.map +1 -0
  18. package/dist/esm/_core/assertions/assertion-authored-metadata.schemas.d.ts +2 -1
  19. package/dist/esm/_core/assertions/assertion-authored-metadata.schemas.d.ts.map +1 -1
  20. package/dist/esm/_core/assertions/assertion-authored-metadata.schemas.js +4 -1
  21. package/dist/esm/_core/assertions/assertion-authored-metadata.schemas.js.map +1 -1
  22. package/dist/esm/_core/assertions/assertion-behaviors.schemas.d.ts +4 -4
  23. package/dist/esm/_core/assertions/assertion-specification.schemas.d.ts +5 -4
  24. package/dist/esm/_core/assertions/assertion-specification.schemas.d.ts.map +1 -1
  25. package/dist/esm/_core/assertions/assertion-specification.schemas.js +4 -1
  26. package/dist/esm/_core/assertions/assertion-specification.schemas.js.map +1 -1
  27. package/dist/esm/_core/brand/brand-asset.schemas.d.ts +5 -4
  28. package/dist/esm/_core/brand/brand-asset.schemas.d.ts.map +1 -1
  29. package/dist/esm/_core/brand/brand-asset.schemas.js +7 -4
  30. package/dist/esm/_core/brand/brand-asset.schemas.js.map +1 -1
  31. package/dist/esm/_core/brand/brand-audience.schemas.d.ts +31 -0
  32. package/dist/esm/_core/brand/brand-audience.schemas.d.ts.map +1 -0
  33. package/dist/esm/_core/brand/brand-audience.schemas.js +29 -0
  34. package/dist/esm/_core/brand/brand-audience.schemas.js.map +1 -0
  35. package/dist/esm/_core/brand/brand-authored-metadata.schemas.d.ts +3 -2
  36. package/dist/esm/_core/brand/brand-authored-metadata.schemas.d.ts.map +1 -1
  37. package/dist/esm/_core/brand/brand-authored-metadata.schemas.js +5 -2
  38. package/dist/esm/_core/brand/brand-authored-metadata.schemas.js.map +1 -1
  39. package/dist/esm/_core/brand/brand-generation.schemas.d.ts +4 -4
  40. package/dist/esm/_core/brand/brand-logo-direction.schemas.d.ts +12 -9
  41. package/dist/esm/_core/brand/brand-logo-direction.schemas.d.ts.map +1 -1
  42. package/dist/esm/_core/brand/brand-logo-direction.schemas.js +12 -7
  43. package/dist/esm/_core/brand/brand-logo-direction.schemas.js.map +1 -1
  44. package/dist/esm/_core/brand/brand-name.schemas.d.ts +2 -2
  45. package/dist/esm/_core/brand/brand-snapshot-validation.d.ts.map +1 -1
  46. package/dist/esm/_core/brand/brand-snapshot-validation.js +1 -8
  47. package/dist/esm/_core/brand/brand-snapshot-validation.js.map +1 -1
  48. package/dist/esm/_core/brand/brand-snapshot.schemas.d.ts +23 -12
  49. package/dist/esm/_core/brand/brand-snapshot.schemas.d.ts.map +1 -1
  50. package/dist/esm/_core/brand/brand-snapshot.schemas.js +7 -0
  51. package/dist/esm/_core/brand/brand-snapshot.schemas.js.map +1 -1
  52. package/dist/esm/_core/brand/brand-visual-tone.schemas.d.ts +2 -2
  53. package/dist/esm/_core/brand/brand.family-aspects.d.ts.map +1 -1
  54. package/dist/esm/_core/brand/brand.family-aspects.js +12 -1
  55. package/dist/esm/_core/brand/brand.family-aspects.js.map +1 -1
  56. package/dist/esm/_core/build-plan/build-plan-task-graph-generation.schemas.d.ts +252 -2
  57. package/dist/esm/_core/build-plan/build-plan-task-graph-generation.schemas.d.ts.map +1 -1
  58. package/dist/esm/_core/build-plan/build-plan-task-graph-generation.schemas.js +19 -1
  59. package/dist/esm/_core/build-plan/build-plan-task-graph-generation.schemas.js.map +1 -1
  60. package/dist/esm/_core/build-plan/build-plan-task-graph-validation.d.ts +121 -1
  61. package/dist/esm/_core/build-plan/build-plan-task-graph-validation.d.ts.map +1 -1
  62. package/dist/esm/_core/build-plan/build-plan-task-graph-validation.js +215 -2
  63. package/dist/esm/_core/build-plan/build-plan-task-graph-validation.js.map +1 -1
  64. package/dist/esm/_core/build-plan/build-plan-task-graph.schemas.d.ts +703 -14
  65. package/dist/esm/_core/build-plan/build-plan-task-graph.schemas.d.ts.map +1 -1
  66. package/dist/esm/_core/build-plan/build-plan-task-graph.schemas.js +536 -7
  67. package/dist/esm/_core/build-plan/build-plan-task-graph.schemas.js.map +1 -1
  68. package/dist/esm/_core/build-plan/build-plan.family-aspects.d.ts.map +1 -1
  69. package/dist/esm/_core/build-plan/build-plan.family-aspects.js +82 -2
  70. package/dist/esm/_core/build-plan/build-plan.family-aspects.js.map +1 -1
  71. package/dist/esm/_core/business-model-lite/business-model-authored-metadata.schemas.d.ts +3 -2
  72. package/dist/esm/_core/business-model-lite/business-model-authored-metadata.schemas.d.ts.map +1 -1
  73. package/dist/esm/_core/business-model-lite/business-model-authored-metadata.schemas.js +5 -2
  74. package/dist/esm/_core/business-model-lite/business-model-authored-metadata.schemas.js.map +1 -1
  75. package/dist/esm/_core/business-model-lite/business-model-lite-snapshot.schemas.d.ts +3 -3
  76. package/dist/esm/_core/business-model-lite/business-model.family-aspects.js +1 -1
  77. package/dist/esm/_core/business-model-lite/business-model.family-aspects.js.map +1 -1
  78. package/dist/esm/_core/business-model-lite/pricing-plan.schemas.d.ts +4 -3
  79. package/dist/esm/_core/business-model-lite/pricing-plan.schemas.d.ts.map +1 -1
  80. package/dist/esm/_core/business-model-lite/pricing-plan.schemas.js +4 -1
  81. package/dist/esm/_core/business-model-lite/pricing-plan.schemas.js.map +1 -1
  82. package/dist/esm/_core/business-semantics.specifications.schemas.d.ts +36 -0
  83. package/dist/esm/_core/business-semantics.specifications.schemas.d.ts.map +1 -1
  84. package/dist/esm/_core/business-semantics.specifications.schemas.js +52 -1
  85. package/dist/esm/_core/business-semantics.specifications.schemas.js.map +1 -1
  86. package/dist/esm/_core/capability-composition/capability-composition-validation.d.ts +22 -0
  87. package/dist/esm/_core/capability-composition/capability-composition-validation.d.ts.map +1 -0
  88. package/dist/esm/_core/capability-composition/capability-composition-validation.js +89 -0
  89. package/dist/esm/_core/capability-composition/capability-composition-validation.js.map +1 -0
  90. package/dist/esm/_core/capability-composition/capability-composition.family-aspects.d.ts +3 -0
  91. package/dist/esm/_core/capability-composition/capability-composition.family-aspects.d.ts.map +1 -0
  92. package/dist/esm/_core/capability-composition/capability-composition.family-aspects.js +26 -0
  93. package/dist/esm/_core/capability-composition/capability-composition.family-aspects.js.map +1 -0
  94. package/dist/esm/_core/capability-composition/capability-composition.schemas.d.ts +141 -0
  95. package/dist/esm/_core/capability-composition/capability-composition.schemas.d.ts.map +1 -0
  96. package/dist/esm/_core/capability-composition/capability-composition.schemas.js +147 -0
  97. package/dist/esm/_core/capability-composition/capability-composition.schemas.js.map +1 -0
  98. package/dist/esm/_core/compliance-documents/compliance-document-candidate-generation.schemas.d.ts +160 -0
  99. package/dist/esm/_core/compliance-documents/compliance-document-candidate-generation.schemas.d.ts.map +1 -1
  100. package/dist/esm/_core/compliance-documents/compliance-document-candidate-generation.schemas.js +124 -4
  101. package/dist/esm/_core/compliance-documents/compliance-document-candidate-generation.schemas.js.map +1 -1
  102. package/dist/esm/_core/compliance-documents/compliance-document-candidate-set.schemas.d.ts +95 -0
  103. package/dist/esm/_core/compliance-documents/compliance-document-candidate-set.schemas.d.ts.map +1 -0
  104. package/dist/esm/_core/compliance-documents/compliance-document-candidate-set.schemas.js +85 -0
  105. package/dist/esm/_core/compliance-documents/compliance-document-candidate-set.schemas.js.map +1 -0
  106. package/dist/esm/_core/compliance-documents/compliance-document-candidate.schemas.d.ts +743 -14
  107. package/dist/esm/_core/compliance-documents/compliance-document-candidate.schemas.d.ts.map +1 -1
  108. package/dist/esm/_core/compliance-documents/compliance-document-candidate.schemas.js +699 -22
  109. package/dist/esm/_core/compliance-documents/compliance-document-candidate.schemas.js.map +1 -1
  110. package/dist/esm/_core/compliance-documents/compliance-documents.family-aspects.d.ts +98 -6
  111. package/dist/esm/_core/compliance-documents/compliance-documents.family-aspects.d.ts.map +1 -1
  112. package/dist/esm/_core/compliance-documents/compliance-documents.family-aspects.js +197 -8
  113. package/dist/esm/_core/compliance-documents/compliance-documents.family-aspects.js.map +1 -1
  114. package/dist/esm/_core/compliance-documents/computed-document-facts.schemas.d.ts +64 -0
  115. package/dist/esm/_core/compliance-documents/computed-document-facts.schemas.d.ts.map +1 -0
  116. package/dist/esm/_core/compliance-documents/computed-document-facts.schemas.js +283 -0
  117. package/dist/esm/_core/compliance-documents/computed-document-facts.schemas.js.map +1 -0
  118. package/dist/esm/_core/compliance-documents/document-fact-specification-generation.schemas.d.ts.map +1 -1
  119. package/dist/esm/_core/compliance-documents/document-fact-specification-generation.schemas.js +30 -1
  120. package/dist/esm/_core/compliance-documents/document-fact-specification-generation.schemas.js.map +1 -1
  121. package/dist/esm/_core/compliance-documents/processor-register.family-aspects.js +1 -1
  122. package/dist/esm/_core/compliance-documents/processor-register.family-aspects.js.map +1 -1
  123. package/dist/esm/_core/compliance-documents/processor-register.schemas.d.ts +220 -4
  124. package/dist/esm/_core/compliance-documents/processor-register.schemas.d.ts.map +1 -1
  125. package/dist/esm/_core/compliance-documents/processor-register.schemas.js +149 -2
  126. package/dist/esm/_core/compliance-documents/processor-register.schemas.js.map +1 -1
  127. package/dist/esm/_core/compliance-documents/required-document-set.schemas.d.ts +70 -3
  128. package/dist/esm/_core/compliance-documents/required-document-set.schemas.d.ts.map +1 -1
  129. package/dist/esm/_core/compliance-documents/required-document-set.schemas.js +75 -3
  130. package/dist/esm/_core/compliance-documents/required-document-set.schemas.js.map +1 -1
  131. package/dist/esm/_core/composite-view-specification.schemas.d.ts +14 -0
  132. package/dist/esm/_core/composite-view-specification.schemas.d.ts.map +1 -1
  133. package/dist/esm/_core/composite-view-specification.schemas.js +13 -0
  134. package/dist/esm/_core/composite-view-specification.schemas.js.map +1 -1
  135. package/dist/esm/_core/cross-registry-assertions.d.ts +6 -4
  136. package/dist/esm/_core/cross-registry-assertions.d.ts.map +1 -1
  137. package/dist/esm/_core/cross-registry-assertions.js +7 -5
  138. package/dist/esm/_core/cross-registry-assertions.js.map +1 -1
  139. package/dist/esm/_core/domain-plan/domain-plan-output-set.schemas.d.ts +5 -4
  140. package/dist/esm/_core/domain-plan/domain-plan-output-set.schemas.d.ts.map +1 -1
  141. package/dist/esm/_core/domain-plan/domain-plan-output-set.schemas.js +5 -2
  142. package/dist/esm/_core/domain-plan/domain-plan-output-set.schemas.js.map +1 -1
  143. package/dist/esm/_core/domain-plan/domain-plan.family-aspects.d.ts +30 -0
  144. package/dist/esm/_core/domain-plan/domain-plan.family-aspects.d.ts.map +1 -1
  145. package/dist/esm/_core/domain-plan/domain-plan.family-aspects.js +99 -6
  146. package/dist/esm/_core/domain-plan/domain-plan.family-aspects.js.map +1 -1
  147. package/dist/esm/_core/experience-plan/experience-plan-generation.schemas.d.ts +58 -0
  148. package/dist/esm/_core/experience-plan/experience-plan-generation.schemas.d.ts.map +1 -0
  149. package/dist/esm/_core/experience-plan/experience-plan-generation.schemas.js +71 -0
  150. package/dist/esm/_core/experience-plan/experience-plan-generation.schemas.js.map +1 -0
  151. package/dist/esm/_core/experience-plan/experience-plan-validation.d.ts +37 -0
  152. package/dist/esm/_core/experience-plan/experience-plan-validation.d.ts.map +1 -0
  153. package/dist/esm/_core/experience-plan/experience-plan-validation.js +83 -0
  154. package/dist/esm/_core/experience-plan/experience-plan-validation.js.map +1 -0
  155. package/dist/esm/_core/experience-plan/experience-plan.family-aspects.d.ts +3 -0
  156. package/dist/esm/_core/experience-plan/experience-plan.family-aspects.d.ts.map +1 -0
  157. package/dist/esm/_core/experience-plan/experience-plan.family-aspects.js +78 -0
  158. package/dist/esm/_core/experience-plan/experience-plan.family-aspects.js.map +1 -0
  159. package/dist/esm/_core/experience-plan/experience-plan.schemas.d.ts +285 -0
  160. package/dist/esm/_core/experience-plan/experience-plan.schemas.d.ts.map +1 -0
  161. package/dist/esm/_core/experience-plan/experience-plan.schemas.js +293 -0
  162. package/dist/esm/_core/experience-plan/experience-plan.schemas.js.map +1 -0
  163. package/dist/esm/_core/expert-personas/expert-persona-authored-metadata.schemas.d.ts +3 -2
  164. package/dist/esm/_core/expert-personas/expert-persona-authored-metadata.schemas.d.ts.map +1 -1
  165. package/dist/esm/_core/expert-personas/expert-persona-authored-metadata.schemas.js +5 -2
  166. package/dist/esm/_core/expert-personas/expert-persona-authored-metadata.schemas.js.map +1 -1
  167. package/dist/esm/_core/expert-personas/expert-persona-charter.schemas.d.ts +9 -2
  168. package/dist/esm/_core/expert-personas/expert-persona-charter.schemas.d.ts.map +1 -1
  169. package/dist/esm/_core/expert-personas/expert-persona-charter.schemas.js +7 -0
  170. package/dist/esm/_core/expert-personas/expert-persona-charter.schemas.js.map +1 -1
  171. package/dist/esm/_core/expert-personas/expert-personas.family-aspects.d.ts +18 -0
  172. package/dist/esm/_core/expert-personas/expert-personas.family-aspects.d.ts.map +1 -0
  173. package/dist/esm/_core/expert-personas/expert-personas.family-aspects.js +21 -0
  174. package/dist/esm/_core/expert-personas/expert-personas.family-aspects.js.map +1 -0
  175. package/dist/esm/_core/expert-personas/expert-role-template.schemas.d.ts +19 -0
  176. package/dist/esm/_core/expert-personas/expert-role-template.schemas.d.ts.map +1 -1
  177. package/dist/esm/_core/expert-personas/expert-role-template.schemas.js +23 -0
  178. package/dist/esm/_core/expert-personas/expert-role-template.schemas.js.map +1 -1
  179. package/dist/esm/_core/family-aspects.registry.d.ts.map +1 -1
  180. package/dist/esm/_core/family-aspects.registry.js +22 -1
  181. package/dist/esm/_core/family-aspects.registry.js.map +1 -1
  182. package/dist/esm/_core/family-aspects.schemas.d.ts +64 -1
  183. package/dist/esm/_core/family-aspects.schemas.d.ts.map +1 -1
  184. package/dist/esm/_core/family-aspects.schemas.js.map +1 -1
  185. package/dist/esm/_core/feature-drafts/capability-map-output-set-generation.schemas.d.ts +27 -27
  186. package/dist/esm/_core/feature-drafts/capability-map-output-set.schemas.d.ts +59 -59
  187. package/dist/esm/_core/feature-drafts/feature-drafts.family-aspects.js +1 -1
  188. package/dist/esm/_core/feature-drafts/feature-drafts.family-aspects.js.map +1 -1
  189. package/dist/esm/_core/feature-drafts/feature-specification-drafts.schemas.d.ts.map +1 -1
  190. package/dist/esm/_core/feature-drafts/feature-specification-drafts.schemas.js +6 -1
  191. package/dist/esm/_core/feature-drafts/feature-specification-drafts.schemas.js.map +1 -1
  192. package/dist/esm/_core/guidance-flow-specification.schemas.d.ts +11 -15
  193. package/dist/esm/_core/guidance-flow-specification.schemas.d.ts.map +1 -1
  194. package/dist/esm/_core/guidance-flow-specification.schemas.js +12 -11
  195. package/dist/esm/_core/guidance-flow-specification.schemas.js.map +1 -1
  196. package/dist/esm/_core/index.d.ts +16 -0
  197. package/dist/esm/_core/index.d.ts.map +1 -1
  198. package/dist/esm/_core/index.js +16 -0
  199. package/dist/esm/_core/index.js.map +1 -1
  200. package/dist/esm/_core/integration-plan/integration-plan-generation.schemas.d.ts +52 -0
  201. package/dist/esm/_core/integration-plan/integration-plan-generation.schemas.d.ts.map +1 -0
  202. package/dist/esm/_core/integration-plan/integration-plan-generation.schemas.js +50 -0
  203. package/dist/esm/_core/integration-plan/integration-plan-generation.schemas.js.map +1 -0
  204. package/dist/esm/_core/integration-plan/integration-plan-validation.d.ts +27 -0
  205. package/dist/esm/_core/integration-plan/integration-plan-validation.d.ts.map +1 -0
  206. package/dist/esm/_core/integration-plan/integration-plan-validation.js +63 -0
  207. package/dist/esm/_core/integration-plan/integration-plan-validation.js.map +1 -0
  208. package/dist/esm/_core/integration-plan/integration-plan.family-aspects.d.ts +3 -0
  209. package/dist/esm/_core/integration-plan/integration-plan.family-aspects.d.ts.map +1 -0
  210. package/dist/esm/_core/integration-plan/integration-plan.family-aspects.js +52 -0
  211. package/dist/esm/_core/integration-plan/integration-plan.family-aspects.js.map +1 -0
  212. package/dist/esm/_core/integration-plan/integration-plan.schemas.d.ts +168 -0
  213. package/dist/esm/_core/integration-plan/integration-plan.schemas.d.ts.map +1 -0
  214. package/dist/esm/_core/integration-plan/integration-plan.schemas.js +170 -0
  215. package/dist/esm/_core/integration-plan/integration-plan.schemas.js.map +1 -0
  216. package/dist/esm/_core/market/feature-benefit.schemas.d.ts +6 -5
  217. package/dist/esm/_core/market/feature-benefit.schemas.d.ts.map +1 -1
  218. package/dist/esm/_core/market/feature-benefit.schemas.js +5 -2
  219. package/dist/esm/_core/market/feature-benefit.schemas.js.map +1 -1
  220. package/dist/esm/_core/market/market-alternative.schemas.d.ts +4 -3
  221. package/dist/esm/_core/market/market-alternative.schemas.d.ts.map +1 -1
  222. package/dist/esm/_core/market/market-alternative.schemas.js +4 -1
  223. package/dist/esm/_core/market/market-alternative.schemas.js.map +1 -1
  224. package/dist/esm/_core/market/market-authored-metadata.schemas.d.ts +11 -9
  225. package/dist/esm/_core/market/market-authored-metadata.schemas.d.ts.map +1 -1
  226. package/dist/esm/_core/market/market-authored-metadata.schemas.js +13 -10
  227. package/dist/esm/_core/market/market-authored-metadata.schemas.js.map +1 -1
  228. package/dist/esm/_core/market/market-buying-journey.schemas.d.ts +5 -4
  229. package/dist/esm/_core/market/market-buying-journey.schemas.d.ts.map +1 -1
  230. package/dist/esm/_core/market/market-buying-journey.schemas.js +4 -1
  231. package/dist/esm/_core/market/market-buying-journey.schemas.js.map +1 -1
  232. package/dist/esm/_core/market/market-category.schemas.d.ts +2 -2
  233. package/dist/esm/_core/market/market-channel.schemas.d.ts +6 -5
  234. package/dist/esm/_core/market/market-channel.schemas.d.ts.map +1 -1
  235. package/dist/esm/_core/market/market-channel.schemas.js +6 -3
  236. package/dist/esm/_core/market/market-channel.schemas.js.map +1 -1
  237. package/dist/esm/_core/market/market-gain.schemas.d.ts +4 -3
  238. package/dist/esm/_core/market/market-gain.schemas.d.ts.map +1 -1
  239. package/dist/esm/_core/market/market-gain.schemas.js +4 -1
  240. package/dist/esm/_core/market/market-gain.schemas.js.map +1 -1
  241. package/dist/esm/_core/market/market-icp.schemas.d.ts +12 -11
  242. package/dist/esm/_core/market/market-icp.schemas.d.ts.map +1 -1
  243. package/dist/esm/_core/market/market-icp.schemas.js +12 -9
  244. package/dist/esm/_core/market/market-icp.schemas.js.map +1 -1
  245. package/dist/esm/_core/market/market-job.schemas.d.ts +4 -3
  246. package/dist/esm/_core/market/market-job.schemas.d.ts.map +1 -1
  247. package/dist/esm/_core/market/market-job.schemas.js +4 -1
  248. package/dist/esm/_core/market/market-job.schemas.js.map +1 -1
  249. package/dist/esm/_core/market/market-message-template.schemas.d.ts +5 -4
  250. package/dist/esm/_core/market/market-message-template.schemas.d.ts.map +1 -1
  251. package/dist/esm/_core/market/market-message-template.schemas.js +5 -2
  252. package/dist/esm/_core/market/market-message-template.schemas.js.map +1 -1
  253. package/dist/esm/_core/market/market-objection.schemas.d.ts +4 -3
  254. package/dist/esm/_core/market/market-objection.schemas.d.ts.map +1 -1
  255. package/dist/esm/_core/market/market-objection.schemas.js +4 -1
  256. package/dist/esm/_core/market/market-objection.schemas.js.map +1 -1
  257. package/dist/esm/_core/market/market-pain.schemas.d.ts +4 -3
  258. package/dist/esm/_core/market/market-pain.schemas.d.ts.map +1 -1
  259. package/dist/esm/_core/market/market-pain.schemas.js +4 -1
  260. package/dist/esm/_core/market/market-pain.schemas.js.map +1 -1
  261. package/dist/esm/_core/market/market-persona.schemas.d.ts +5 -4
  262. package/dist/esm/_core/market/market-persona.schemas.d.ts.map +1 -1
  263. package/dist/esm/_core/market/market-persona.schemas.js +5 -2
  264. package/dist/esm/_core/market/market-persona.schemas.js.map +1 -1
  265. package/dist/esm/_core/market/market-positioning.schemas.d.ts +2 -2
  266. package/dist/esm/_core/market/market-proof.schemas.d.ts +4 -3
  267. package/dist/esm/_core/market/market-proof.schemas.d.ts.map +1 -1
  268. package/dist/esm/_core/market/market-proof.schemas.js +4 -1
  269. package/dist/esm/_core/market/market-proof.schemas.js.map +1 -1
  270. package/dist/esm/_core/market/market-snapshot-generation.schemas.d.ts +54 -54
  271. package/dist/esm/_core/market/market-snapshot.schemas.d.ts +59 -59
  272. package/dist/esm/_core/market/market-tone-of-voice.schemas.d.ts +4 -3
  273. package/dist/esm/_core/market/market-tone-of-voice.schemas.d.ts.map +1 -1
  274. package/dist/esm/_core/market/market-tone-of-voice.schemas.js +4 -1
  275. package/dist/esm/_core/market/market-tone-of-voice.schemas.js.map +1 -1
  276. package/dist/esm/_core/market/market-trigger.schemas.d.ts +4 -3
  277. package/dist/esm/_core/market/market-trigger.schemas.d.ts.map +1 -1
  278. package/dist/esm/_core/market/market-trigger.schemas.js +4 -1
  279. package/dist/esm/_core/market/market-trigger.schemas.js.map +1 -1
  280. package/dist/esm/_core/market/market.family-aspects.d.ts.map +1 -1
  281. package/dist/esm/_core/market/market.family-aspects.js +25 -1
  282. package/dist/esm/_core/market/market.family-aspects.js.map +1 -1
  283. package/dist/esm/_core/onboarding-view-specification.schemas.d.ts +27 -22
  284. package/dist/esm/_core/onboarding-view-specification.schemas.d.ts.map +1 -1
  285. package/dist/esm/_core/onboarding-view-specification.schemas.js +7 -12
  286. package/dist/esm/_core/onboarding-view-specification.schemas.js.map +1 -1
  287. package/dist/esm/_core/placement-plan/placement-plan-generation.schemas.d.ts +21 -21
  288. package/dist/esm/_core/placement-plan/placement-plan-validation.d.ts +30 -16
  289. package/dist/esm/_core/placement-plan/placement-plan-validation.d.ts.map +1 -1
  290. package/dist/esm/_core/placement-plan/placement-plan-validation.js +34 -12
  291. package/dist/esm/_core/placement-plan/placement-plan-validation.js.map +1 -1
  292. package/dist/esm/_core/placement-plan/placement-plan.family-aspects.d.ts.map +1 -1
  293. package/dist/esm/_core/placement-plan/placement-plan.family-aspects.js +24 -1
  294. package/dist/esm/_core/placement-plan/placement-plan.family-aspects.js.map +1 -1
  295. package/dist/esm/_core/placement-plan/placement-plan.schemas.d.ts +78 -47
  296. package/dist/esm/_core/placement-plan/placement-plan.schemas.d.ts.map +1 -1
  297. package/dist/esm/_core/placement-plan/placement-plan.schemas.js +62 -24
  298. package/dist/esm/_core/placement-plan/placement-plan.schemas.js.map +1 -1
  299. package/dist/esm/_core/provider-specification.schemas.d.ts +19 -0
  300. package/dist/esm/_core/provider-specification.schemas.d.ts.map +1 -1
  301. package/dist/esm/_core/provider-specification.schemas.js +0 -20
  302. package/dist/esm/_core/provider-specification.schemas.js.map +1 -1
  303. package/dist/esm/_core/requirements/functional-requirement.schemas.d.ts +2 -2
  304. package/dist/esm/_core/requirements/non-functional-requirement.schemas.d.ts +2 -2
  305. package/dist/esm/_core/requirements/requirements-authored-metadata.schemas.d.ts +3 -2
  306. package/dist/esm/_core/requirements/requirements-authored-metadata.schemas.d.ts.map +1 -1
  307. package/dist/esm/_core/requirements/requirements-authored-metadata.schemas.js +5 -2
  308. package/dist/esm/_core/requirements/requirements-authored-metadata.schemas.js.map +1 -1
  309. package/dist/esm/_core/requirements/requirements-snapshot.schemas.d.ts +4 -4
  310. package/dist/esm/_core/requirements/requirements.family-aspects.d.ts.map +1 -1
  311. package/dist/esm/_core/requirements/requirements.family-aspects.js +3 -1
  312. package/dist/esm/_core/requirements/requirements.family-aspects.js.map +1 -1
  313. package/dist/esm/_core/resource-specification.schemas.d.ts +8 -0
  314. package/dist/esm/_core/resource-specification.schemas.d.ts.map +1 -1
  315. package/dist/esm/_core/resource-specification.schemas.js.map +1 -1
  316. package/dist/esm/_core/roadmap/roadmap-authored-metadata.schemas.d.ts +3 -2
  317. package/dist/esm/_core/roadmap/roadmap-authored-metadata.schemas.d.ts.map +1 -1
  318. package/dist/esm/_core/roadmap/roadmap-authored-metadata.schemas.js +5 -2
  319. package/dist/esm/_core/roadmap/roadmap-authored-metadata.schemas.js.map +1 -1
  320. package/dist/esm/_core/roadmap/roadmap-phase.schemas.d.ts +2 -2
  321. package/dist/esm/_core/roadmap/roadmap-snapshot-validation.d.ts +5 -0
  322. package/dist/esm/_core/roadmap/roadmap-snapshot-validation.d.ts.map +1 -1
  323. package/dist/esm/_core/roadmap/roadmap-snapshot-validation.js +1 -8
  324. package/dist/esm/_core/roadmap/roadmap-snapshot-validation.js.map +1 -1
  325. package/dist/esm/_core/roadmap/roadmap-snapshot.schemas.d.ts +2 -2
  326. package/dist/esm/_core/roadmap/roadmap.family-aspects.js +1 -1
  327. package/dist/esm/_core/roadmap/roadmap.family-aspects.js.map +1 -1
  328. package/dist/esm/_core/utils/extract-field-specs.d.ts.map +1 -1
  329. package/dist/esm/_core/utils/extract-field-specs.js +4 -2
  330. package/dist/esm/_core/utils/extract-field-specs.js.map +1 -1
  331. package/dist/esm/_core/vision/vision-authored-metadata.schemas.d.ts +3 -2
  332. package/dist/esm/_core/vision/vision-authored-metadata.schemas.d.ts.map +1 -1
  333. package/dist/esm/_core/vision/vision-authored-metadata.schemas.js +5 -2
  334. package/dist/esm/_core/vision/vision-authored-metadata.schemas.js.map +1 -1
  335. package/dist/esm/_core/vision/vision-constraint.schemas.d.ts +2 -2
  336. package/dist/esm/_core/vision/vision-idea.schemas.d.ts +2 -2
  337. package/dist/esm/_core/vision/vision-mission.schemas.d.ts +2 -2
  338. package/dist/esm/_core/vision/vision-problem.schemas.d.ts +2 -2
  339. package/dist/esm/_core/vision/vision-snapshot.schemas.d.ts +10 -10
  340. package/dist/esm/_core/vision/vision-success-criterion.schemas.d.ts +2 -2
  341. package/dist/esm/_core/vision/vision.family-aspects.js +1 -1
  342. package/dist/esm/_core/vision/vision.family-aspects.js.map +1 -1
  343. package/dist/esm/_core/website-plan/website-plan-generation.schemas.d.ts +45 -0
  344. package/dist/esm/_core/website-plan/website-plan-generation.schemas.d.ts.map +1 -0
  345. package/dist/esm/_core/website-plan/website-plan-generation.schemas.js +55 -0
  346. package/dist/esm/_core/website-plan/website-plan-generation.schemas.js.map +1 -0
  347. package/dist/esm/_core/website-plan/website-plan-validation.d.ts +37 -0
  348. package/dist/esm/_core/website-plan/website-plan-validation.d.ts.map +1 -0
  349. package/dist/esm/_core/website-plan/website-plan-validation.js +77 -0
  350. package/dist/esm/_core/website-plan/website-plan-validation.js.map +1 -0
  351. package/dist/esm/_core/website-plan/website-plan.family-aspects.d.ts +3 -0
  352. package/dist/esm/_core/website-plan/website-plan.family-aspects.d.ts.map +1 -0
  353. package/dist/esm/_core/website-plan/website-plan.family-aspects.js +35 -0
  354. package/dist/esm/_core/website-plan/website-plan.family-aspects.js.map +1 -0
  355. package/dist/esm/_core/website-plan/website-plan.schemas.d.ts +194 -0
  356. package/dist/esm/_core/website-plan/website-plan.schemas.d.ts.map +1 -0
  357. package/dist/esm/_core/website-plan/website-plan.schemas.js +193 -0
  358. package/dist/esm/_core/website-plan/website-plan.schemas.js.map +1 -0
  359. package/dist/esm/_core/zod-core-nameability.d.ts +47 -0
  360. package/dist/esm/_core/zod-core-nameability.d.ts.map +1 -0
  361. package/dist/esm/_core/zod-core-nameability.js +1 -0
  362. package/dist/esm/_core/zod-core-nameability.js.map +1 -0
  363. package/dist/esm/application-creation/application-creator-inputs.application-creation.schemas.d.ts +86 -0
  364. package/dist/esm/application-creation/application-creator-inputs.application-creation.schemas.d.ts.map +1 -0
  365. package/dist/esm/application-creation/application-creator-inputs.application-creation.schemas.js +96 -0
  366. package/dist/esm/application-creation/application-creator-inputs.application-creation.schemas.js.map +1 -0
  367. package/dist/esm/application-creation/application-document-fact-specification.application-creation.schemas.d.ts +139 -34
  368. package/dist/esm/application-creation/application-document-fact-specification.application-creation.schemas.d.ts.map +1 -1
  369. package/dist/esm/application-creation/application-document-fact-specification.application-creation.schemas.js +182 -11
  370. package/dist/esm/application-creation/application-document-fact-specification.application-creation.schemas.js.map +1 -1
  371. package/dist/esm/application-creation/application-document-release-policy-specification.application-creation.schemas.d.ts +71 -2
  372. package/dist/esm/application-creation/application-document-release-policy-specification.application-creation.schemas.d.ts.map +1 -1
  373. package/dist/esm/application-creation/application-document-release-policy-specification.application-creation.schemas.js +88 -1
  374. package/dist/esm/application-creation/application-document-release-policy-specification.application-creation.schemas.js.map +1 -1
  375. package/dist/esm/application-creation/creator-inputs.family-aspects.d.ts +14 -0
  376. package/dist/esm/application-creation/creator-inputs.family-aspects.d.ts.map +1 -0
  377. package/dist/esm/application-creation/creator-inputs.family-aspects.js +17 -0
  378. package/dist/esm/application-creation/creator-inputs.family-aspects.js.map +1 -0
  379. package/dist/esm/application-creation/document-facts.family-aspects.d.ts.map +1 -1
  380. package/dist/esm/application-creation/document-facts.family-aspects.js +25 -1
  381. package/dist/esm/application-creation/document-facts.family-aspects.js.map +1 -1
  382. package/dist/esm/application-creation/document-release-policy.family-aspects.js +1 -1
  383. package/dist/esm/application-creation/document-release-policy.family-aspects.js.map +1 -1
  384. package/dist/esm/application-creation/journey.application-creation.schemas.d.ts +14 -48
  385. package/dist/esm/application-creation/journey.application-creation.schemas.d.ts.map +1 -1
  386. package/dist/esm/application-creation/journey.application-creation.schemas.js +52 -52
  387. package/dist/esm/application-creation/journey.application-creation.schemas.js.map +1 -1
  388. package/dist/esm/application-creation/playbooks.application-creation.schemas.d.ts +209 -495
  389. package/dist/esm/application-creation/playbooks.application-creation.schemas.d.ts.map +1 -1
  390. package/dist/esm/application-creation/playbooks.application-creation.schemas.js +257 -534
  391. package/dist/esm/application-creation/playbooks.application-creation.schemas.js.map +1 -1
  392. package/dist/esm/application-creation/structured-artifact-landing.application-creation.schemas.d.ts +10 -0
  393. package/dist/esm/application-creation/structured-artifact-landing.application-creation.schemas.d.ts.map +1 -1
  394. package/dist/esm/application-creation/structured-artifact-landing.application-creation.schemas.js +10 -0
  395. package/dist/esm/application-creation/structured-artifact-landing.application-creation.schemas.js.map +1 -1
  396. package/dist/esm/application-creation.exports.d.ts +73 -8
  397. package/dist/esm/application-creation.exports.d.ts.map +1 -1
  398. package/dist/esm/application-creation.exports.js +103 -8
  399. package/dist/esm/application-creation.exports.js.map +1 -1
  400. package/dist/esm/assurance/__tests__/authority-evaluation-instant.fixture.d.ts +24 -0
  401. package/dist/esm/assurance/__tests__/authority-evaluation-instant.fixture.d.ts.map +1 -0
  402. package/dist/esm/assurance/__tests__/authority-evaluation-instant.fixture.js +24 -0
  403. package/dist/esm/assurance/__tests__/authority-evaluation-instant.fixture.js.map +1 -0
  404. package/dist/esm/assurance/application-document-publication.schemas.d.ts +49 -0
  405. package/dist/esm/assurance/application-document-publication.schemas.d.ts.map +1 -1
  406. package/dist/esm/assurance/application-document-publication.schemas.js +51 -0
  407. package/dist/esm/assurance/application-document-publication.schemas.js.map +1 -1
  408. package/dist/esm/assurance/application-document-release-set.schemas.d.ts +161 -0
  409. package/dist/esm/assurance/application-document-release-set.schemas.d.ts.map +1 -0
  410. package/dist/esm/assurance/application-document-release-set.schemas.js +138 -0
  411. package/dist/esm/assurance/application-document-release-set.schemas.js.map +1 -0
  412. package/dist/esm/assurance/application-risk-register.family-aspects.d.ts +28 -0
  413. package/dist/esm/assurance/application-risk-register.family-aspects.d.ts.map +1 -0
  414. package/dist/esm/assurance/application-risk-register.family-aspects.js +58 -0
  415. package/dist/esm/assurance/application-risk-register.family-aspects.js.map +1 -0
  416. package/dist/esm/assurance/application-risk-register.schemas.d.ts +172 -0
  417. package/dist/esm/assurance/application-risk-register.schemas.d.ts.map +1 -0
  418. package/dist/esm/assurance/application-risk-register.schemas.js +192 -0
  419. package/dist/esm/assurance/application-risk-register.schemas.js.map +1 -0
  420. package/dist/esm/assurance/application-risk-signals.derivations.d.ts +177 -0
  421. package/dist/esm/assurance/application-risk-signals.derivations.d.ts.map +1 -0
  422. package/dist/esm/assurance/application-risk-signals.derivations.js +229 -0
  423. package/dist/esm/assurance/application-risk-signals.derivations.js.map +1 -0
  424. package/dist/esm/assurance/assurance-authority-basis.definitions.d.ts +257 -13
  425. package/dist/esm/assurance/assurance-authority-basis.definitions.d.ts.map +1 -1
  426. package/dist/esm/assurance/assurance-authority-basis.definitions.js +836 -69
  427. package/dist/esm/assurance/assurance-authority-basis.definitions.js.map +1 -1
  428. package/dist/esm/assurance/assurance-authority-basis.schemas.d.ts +99 -33
  429. package/dist/esm/assurance/assurance-authority-basis.schemas.d.ts.map +1 -1
  430. package/dist/esm/assurance/assurance-authority-basis.schemas.js +38 -1
  431. package/dist/esm/assurance/assurance-authority-basis.schemas.js.map +1 -1
  432. package/dist/esm/assurance/assurance-document-blueprint-selection.d.ts +30 -0
  433. package/dist/esm/assurance/assurance-document-blueprint-selection.d.ts.map +1 -1
  434. package/dist/esm/assurance/assurance-document-blueprint-selection.js +40 -0
  435. package/dist/esm/assurance/assurance-document-blueprint-selection.js.map +1 -1
  436. package/dist/esm/assurance/assurance-document-system.definitions.d.ts.map +1 -1
  437. package/dist/esm/assurance/assurance-document-system.definitions.js +99 -8
  438. package/dist/esm/assurance/assurance-document-system.definitions.js.map +1 -1
  439. package/dist/esm/assurance/assurance-document-system.schemas.d.ts +133 -41
  440. package/dist/esm/assurance/assurance-document-system.schemas.d.ts.map +1 -1
  441. package/dist/esm/assurance/assurance-document-system.schemas.js +60 -11
  442. package/dist/esm/assurance/assurance-document-system.schemas.js.map +1 -1
  443. package/dist/esm/assurance/assurance-evidence-judgement.schemas.d.ts +470 -0
  444. package/dist/esm/assurance/assurance-evidence-judgement.schemas.d.ts.map +1 -0
  445. package/dist/esm/assurance/assurance-evidence-judgement.schemas.js +451 -0
  446. package/dist/esm/assurance/assurance-evidence-judgement.schemas.js.map +1 -0
  447. package/dist/esm/assurance/assurance-evidence-requirement-bodies.definitions.d.ts +0 -33
  448. package/dist/esm/assurance/assurance-evidence-requirement-bodies.definitions.d.ts.map +1 -1
  449. package/dist/esm/assurance/assurance-evidence-requirement-bodies.definitions.js +3339 -159
  450. package/dist/esm/assurance/assurance-evidence-requirement-bodies.definitions.js.map +1 -1
  451. package/dist/esm/assurance/assurance-foundation.schemas.d.ts +21 -0
  452. package/dist/esm/assurance/assurance-foundation.schemas.d.ts.map +1 -1
  453. package/dist/esm/assurance/assurance-foundation.schemas.js +21 -0
  454. package/dist/esm/assurance/assurance-foundation.schemas.js.map +1 -1
  455. package/dist/esm/assurance/assurance-objective-catalog.definitions.d.ts +32 -2
  456. package/dist/esm/assurance/assurance-objective-catalog.definitions.d.ts.map +1 -1
  457. package/dist/esm/assurance/assurance-objective-catalog.definitions.js +148 -5
  458. package/dist/esm/assurance/assurance-objective-catalog.definitions.js.map +1 -1
  459. package/dist/esm/assurance/assurance-program-generation.schemas.d.ts +257 -14
  460. package/dist/esm/assurance/assurance-program-generation.schemas.d.ts.map +1 -1
  461. package/dist/esm/assurance/assurance-program-generation.schemas.js +588 -45
  462. package/dist/esm/assurance/assurance-program-generation.schemas.js.map +1 -1
  463. package/dist/esm/assurance/assurance-program.family-aspects.d.ts +32 -8
  464. package/dist/esm/assurance/assurance-program.family-aspects.d.ts.map +1 -1
  465. package/dist/esm/assurance/assurance-program.family-aspects.js +288 -10
  466. package/dist/esm/assurance/assurance-program.family-aspects.js.map +1 -1
  467. package/dist/esm/assurance/assurance-program.schemas.d.ts +1182 -333
  468. package/dist/esm/assurance/assurance-program.schemas.d.ts.map +1 -1
  469. package/dist/esm/assurance/assurance-program.schemas.js +460 -68
  470. package/dist/esm/assurance/assurance-program.schemas.js.map +1 -1
  471. package/dist/esm/assurance/assurance-source-registry.definitions.d.ts.map +1 -1
  472. package/dist/esm/assurance/assurance-source-registry.definitions.js +70 -2
  473. package/dist/esm/assurance/assurance-source-registry.definitions.js.map +1 -1
  474. package/dist/esm/assurance/assurance-sources.schemas.d.ts +17 -0
  475. package/dist/esm/assurance/assurance-sources.schemas.d.ts.map +1 -1
  476. package/dist/esm/assurance/assurance-sources.schemas.js +17 -0
  477. package/dist/esm/assurance/assurance-sources.schemas.js.map +1 -1
  478. package/dist/esm/assurance/assurance-verification-requirement-bodies.definitions.d.ts.map +1 -1
  479. package/dist/esm/assurance/assurance-verification-requirement-bodies.definitions.js +205 -3
  480. package/dist/esm/assurance/assurance-verification-requirement-bodies.definitions.js.map +1 -1
  481. package/dist/esm/assurance/document-publication.family-aspects.js +1 -1
  482. package/dist/esm/assurance/document-publication.family-aspects.js.map +1 -1
  483. package/dist/esm/assurance/document-release-set.family-aspects.d.ts +11 -0
  484. package/dist/esm/assurance/document-release-set.family-aspects.d.ts.map +1 -0
  485. package/dist/esm/assurance/document-release-set.family-aspects.js +36 -0
  486. package/dist/esm/assurance/document-release-set.family-aspects.js.map +1 -0
  487. package/dist/esm/assurance/governed-document-release.d.ts +211 -0
  488. package/dist/esm/assurance/governed-document-release.d.ts.map +1 -0
  489. package/dist/esm/assurance/governed-document-release.js +314 -0
  490. package/dist/esm/assurance/governed-document-release.js.map +1 -0
  491. package/dist/esm/assurance.exports.d.ts +5 -0
  492. package/dist/esm/assurance.exports.d.ts.map +1 -1
  493. package/dist/esm/assurance.exports.js +5 -0
  494. package/dist/esm/assurance.exports.js.map +1 -1
  495. package/dist/esm/companion-exports.d.ts +135 -11
  496. package/dist/esm/companion-exports.d.ts.map +1 -1
  497. package/dist/esm/companion-exports.js.map +1 -1
  498. package/dist/esm/engine/_bootstrap.d.ts +1 -1
  499. package/dist/esm/engine/_bootstrap.js +1 -1
  500. package/dist/esm/engine/_bootstrap.js.map +1 -1
  501. package/dist/esm/engine/applications/resources/application-metadata.resource.specification.d.ts +1 -1
  502. package/dist/esm/engine/applications/resources/application-metadata.resource.specification.js +1 -1
  503. package/dist/esm/engine/applications/resources/application-metadata.resource.specification.js.map +1 -1
  504. package/dist/esm/engine/applications/resources/application-oauth-clients.resource.specification.d.ts +0 -23
  505. package/dist/esm/engine/applications/resources/application-oauth-clients.resource.specification.d.ts.map +1 -1
  506. package/dist/esm/engine/applications/resources/application-oauth-clients.resource.specification.js +110 -28
  507. package/dist/esm/engine/applications/resources/application-oauth-clients.resource.specification.js.map +1 -1
  508. package/dist/esm/engine/applications/resources/application-versions.resource.specification.d.ts +1 -1
  509. package/dist/esm/engine/applications/resources/application-versions.resource.specification.js +1 -1
  510. package/dist/esm/engine/applications/resources/application-versions.resource.specification.js.map +1 -1
  511. package/dist/esm/engine/applications/resources/applications.resource.specification.d.ts +1 -0
  512. package/dist/esm/engine/applications/resources/applications.resource.specification.d.ts.map +1 -1
  513. package/dist/esm/engine/auth/resources/application-access-grants.resource.specification.d.ts +57 -0
  514. package/dist/esm/engine/auth/resources/application-access-grants.resource.specification.d.ts.map +1 -0
  515. package/dist/esm/engine/auth/resources/application-access-grants.resource.specification.js +412 -0
  516. package/dist/esm/engine/auth/resources/application-access-grants.resource.specification.js.map +1 -0
  517. package/dist/esm/engine/auth/resources/index.d.ts +2 -0
  518. package/dist/esm/engine/auth/resources/index.d.ts.map +1 -1
  519. package/dist/esm/engine/auth/resources/index.js +2 -0
  520. package/dist/esm/engine/auth/resources/index.js.map +1 -1
  521. package/dist/esm/engine/auth/resources/organization-oauth-clients.resource.specification.d.ts +4 -4
  522. package/dist/esm/engine/auth/resources/organization-oauth-clients.resource.specification.d.ts.map +1 -1
  523. package/dist/esm/engine/auth/resources/organization-oauth-clients.resource.specification.js +57 -6
  524. package/dist/esm/engine/auth/resources/organization-oauth-clients.resource.specification.js.map +1 -1
  525. package/dist/esm/engine/auth/resources/organization-onboarding-operations.resource.specification.d.ts +9 -0
  526. package/dist/esm/engine/auth/resources/organization-onboarding-operations.resource.specification.d.ts.map +1 -0
  527. package/dist/esm/engine/auth/resources/organization-onboarding-operations.resource.specification.js +141 -0
  528. package/dist/esm/engine/auth/resources/organization-onboarding-operations.resource.specification.js.map +1 -0
  529. package/dist/esm/engine/auth/resources/organization-provider-credentials.resource.specification.d.ts +4 -1
  530. package/dist/esm/engine/auth/resources/organization-provider-credentials.resource.specification.d.ts.map +1 -1
  531. package/dist/esm/engine/auth/resources/organization-provider-credentials.resource.specification.js +10 -6
  532. package/dist/esm/engine/auth/resources/organization-provider-credentials.resource.specification.js.map +1 -1
  533. package/dist/esm/engine/auth/resources/scim-provisioning-config.resource.specification.d.ts.map +1 -1
  534. package/dist/esm/engine/auth/resources/scim-provisioning-config.resource.specification.js +5 -4
  535. package/dist/esm/engine/auth/resources/scim-provisioning-config.resource.specification.js.map +1 -1
  536. package/dist/esm/engine/auth/resources/siem-delivery-outbox.resource.specification.d.ts +4 -0
  537. package/dist/esm/engine/auth/resources/siem-delivery-outbox.resource.specification.d.ts.map +1 -0
  538. package/dist/esm/engine/auth/resources/siem-delivery-outbox.resource.specification.js +129 -0
  539. package/dist/esm/engine/auth/resources/siem-delivery-outbox.resource.specification.js.map +1 -0
  540. package/dist/esm/engine/auth/resources/siem-export-config.resource.specification.d.ts +19 -7
  541. package/dist/esm/engine/auth/resources/siem-export-config.resource.specification.d.ts.map +1 -1
  542. package/dist/esm/engine/auth/resources/siem-export-config.resource.specification.js +24 -13
  543. package/dist/esm/engine/auth/resources/siem-export-config.resource.specification.js.map +1 -1
  544. package/dist/esm/engine/auth/resources/sso-config.resource.specification.d.ts +0 -40
  545. package/dist/esm/engine/auth/resources/sso-config.resource.specification.d.ts.map +1 -1
  546. package/dist/esm/engine/auth/resources/sso-config.resource.specification.js +14 -27
  547. package/dist/esm/engine/auth/resources/sso-config.resource.specification.js.map +1 -1
  548. package/dist/esm/engine/auth/resources/sso-connections.resource.specification.d.ts +8 -2
  549. package/dist/esm/engine/auth/resources/sso-connections.resource.specification.d.ts.map +1 -1
  550. package/dist/esm/engine/auth/resources/sso-connections.resource.specification.js +16 -3
  551. package/dist/esm/engine/auth/resources/sso-connections.resource.specification.js.map +1 -1
  552. package/dist/esm/engine/auth/resources/user-provider-credentials.resource.specification.d.ts +5 -2
  553. package/dist/esm/engine/auth/resources/user-provider-credentials.resource.specification.d.ts.map +1 -1
  554. package/dist/esm/engine/auth/resources/user-provider-credentials.resource.specification.js +10 -16
  555. package/dist/esm/engine/auth/resources/user-provider-credentials.resource.specification.js.map +1 -1
  556. package/dist/esm/engine/billing/resources/billing-accounts.resource.specification.d.ts.map +1 -1
  557. package/dist/esm/engine/billing/resources/billing-accounts.resource.specification.js +15 -5
  558. package/dist/esm/engine/billing/resources/billing-accounts.resource.specification.js.map +1 -1
  559. package/dist/esm/engine/billing/resources/billing-effect-outbox.resource.specification.d.ts +9 -0
  560. package/dist/esm/engine/billing/resources/billing-effect-outbox.resource.specification.d.ts.map +1 -0
  561. package/dist/esm/engine/billing/resources/billing-effect-outbox.resource.specification.js +164 -0
  562. package/dist/esm/engine/billing/resources/billing-effect-outbox.resource.specification.js.map +1 -0
  563. package/dist/esm/engine/billing/resources/billing-provider-event-settlements.resource.specification.d.ts +14 -0
  564. package/dist/esm/engine/billing/resources/billing-provider-event-settlements.resource.specification.d.ts.map +1 -0
  565. package/dist/esm/engine/billing/resources/billing-provider-event-settlements.resource.specification.js +124 -0
  566. package/dist/esm/engine/billing/resources/billing-provider-event-settlements.resource.specification.js.map +1 -0
  567. package/dist/esm/engine/billing/resources/billing-subscription-mutation-completions.resource.specification.d.ts +9 -0
  568. package/dist/esm/engine/billing/resources/billing-subscription-mutation-completions.resource.specification.d.ts.map +1 -0
  569. package/dist/esm/engine/billing/resources/billing-subscription-mutation-completions.resource.specification.js +123 -0
  570. package/dist/esm/engine/billing/resources/billing-subscription-mutation-completions.resource.specification.js.map +1 -0
  571. package/dist/esm/engine/billing/resources/billing-subscription-mutation-intents.resource.specification.d.ts +11 -0
  572. package/dist/esm/engine/billing/resources/billing-subscription-mutation-intents.resource.specification.d.ts.map +1 -0
  573. package/dist/esm/engine/billing/resources/billing-subscription-mutation-intents.resource.specification.js +172 -0
  574. package/dist/esm/engine/billing/resources/billing-subscription-mutation-intents.resource.specification.js.map +1 -0
  575. package/dist/esm/engine/billing/resources/index.d.ts +4 -0
  576. package/dist/esm/engine/billing/resources/index.d.ts.map +1 -1
  577. package/dist/esm/engine/billing/resources/index.js +4 -0
  578. package/dist/esm/engine/billing/resources/index.js.map +1 -1
  579. package/dist/esm/engine/billing/resources/prices.resource.specification.d.ts +3 -3
  580. package/dist/esm/engine/billing/resources/products.resource.specification.d.ts +3 -3
  581. package/dist/esm/engine/billing/resources/products.resource.specification.js +1 -1
  582. package/dist/esm/engine/billing/resources/products.resource.specification.js.map +1 -1
  583. package/dist/esm/engine/billing/resources/subscriptions.resource.specification.d.ts.map +1 -1
  584. package/dist/esm/engine/billing/resources/subscriptions.resource.specification.js +92 -36
  585. package/dist/esm/engine/billing/resources/subscriptions.resource.specification.js.map +1 -1
  586. package/dist/esm/engine/compliance/resources/application-audit-logs.resource.specification.d.ts +77 -0
  587. package/dist/esm/engine/compliance/resources/application-audit-logs.resource.specification.d.ts.map +1 -0
  588. package/dist/esm/engine/compliance/resources/application-audit-logs.resource.specification.js +375 -0
  589. package/dist/esm/engine/compliance/resources/application-audit-logs.resource.specification.js.map +1 -0
  590. package/dist/esm/engine/compliance/resources/audit-logs.resource.specification.d.ts +1 -1
  591. package/dist/esm/engine/compliance/resources/index.d.ts +2 -0
  592. package/dist/esm/engine/compliance/resources/index.d.ts.map +1 -1
  593. package/dist/esm/engine/compliance/resources/index.js +2 -0
  594. package/dist/esm/engine/compliance/resources/index.js.map +1 -1
  595. package/dist/esm/engine/compliance/resources/user-governed-document-acceptances.resource.specification.d.ts +16 -0
  596. package/dist/esm/engine/compliance/resources/user-governed-document-acceptances.resource.specification.d.ts.map +1 -0
  597. package/dist/esm/engine/compliance/resources/user-governed-document-acceptances.resource.specification.js +183 -0
  598. package/dist/esm/engine/compliance/resources/user-governed-document-acceptances.resource.specification.js.map +1 -0
  599. package/dist/esm/engine/engine-resource-specifications.registry.d.ts.map +1 -1
  600. package/dist/esm/engine/engine-resource-specifications.registry.js +28 -0
  601. package/dist/esm/engine/engine-resource-specifications.registry.js.map +1 -1
  602. package/dist/esm/engine/errors/error-messages.specification.d.ts.map +1 -1
  603. package/dist/esm/engine/errors/error-messages.specification.js +123 -19
  604. package/dist/esm/engine/errors/error-messages.specification.js.map +1 -1
  605. package/dist/esm/engine/features/resources/application-features.resource.specification.d.ts.map +1 -1
  606. package/dist/esm/engine/features/resources/application-features.resource.specification.js +2 -1
  607. package/dist/esm/engine/features/resources/application-features.resource.specification.js.map +1 -1
  608. package/dist/esm/engine/features/resources/organization-features.resource.specification.d.ts.map +1 -1
  609. package/dist/esm/engine/features/resources/organization-features.resource.specification.js +1 -0
  610. package/dist/esm/engine/features/resources/organization-features.resource.specification.js.map +1 -1
  611. package/dist/esm/engine/features/resources/user-features.resource.specification.d.ts +1 -1
  612. package/dist/esm/engine/features/resources/user-features.resource.specification.d.ts.map +1 -1
  613. package/dist/esm/engine/features/resources/user-features.resource.specification.js +4 -1
  614. package/dist/esm/engine/features/resources/user-features.resource.specification.js.map +1 -1
  615. package/dist/esm/engine/files/resources/files.resource.specification.d.ts.map +1 -1
  616. package/dist/esm/engine/files/resources/files.resource.specification.js +15 -3
  617. package/dist/esm/engine/files/resources/files.resource.specification.js.map +1 -1
  618. package/dist/esm/engine/flows-actors/resources/flow-actor-executions.resource.specification.d.ts +3 -0
  619. package/dist/esm/engine/flows-actors/resources/flow-actor-executions.resource.specification.d.ts.map +1 -1
  620. package/dist/esm/engine/flows-actors/resources/flow-actor-executions.resource.specification.js +1 -1
  621. package/dist/esm/engine/flows-actors/resources/flow-actor-executions.resource.specification.js.map +1 -1
  622. package/dist/esm/engine/flows-actors/resources/flow-actor-tasks.resource.specification.d.ts +3 -3
  623. package/dist/esm/engine/flows-actors/resources/provider-call-records.resource.specification.d.ts +14 -0
  624. package/dist/esm/engine/flows-actors/resources/provider-call-records.resource.specification.d.ts.map +1 -0
  625. package/dist/esm/engine/flows-actors/resources/provider-call-records.resource.specification.js +184 -0
  626. package/dist/esm/engine/flows-actors/resources/provider-call-records.resource.specification.js.map +1 -0
  627. package/dist/esm/engine/frontend-components/actions/button-group-separator.frontend-component.specification.js +3 -3
  628. package/dist/esm/engine/frontend-components/actions/button-group-separator.frontend-component.specification.js.map +1 -1
  629. package/dist/esm/engine/frontend-components/actions/button-group.frontend-component.specification.d.ts.map +1 -1
  630. package/dist/esm/engine/frontend-components/actions/button-group.frontend-component.specification.js +3 -2
  631. package/dist/esm/engine/frontend-components/actions/button-group.frontend-component.specification.js.map +1 -1
  632. package/dist/esm/engine/frontend-components/actions/button.frontend-component.specification.d.ts.map +1 -1
  633. package/dist/esm/engine/frontend-components/actions/button.frontend-component.specification.js +18 -0
  634. package/dist/esm/engine/frontend-components/actions/button.frontend-component.specification.js.map +1 -1
  635. package/dist/esm/engine/frontend-components/ai-elements/artifacts/ai-diff-block.frontend-component.specification.d.ts +4 -0
  636. package/dist/esm/engine/frontend-components/ai-elements/artifacts/ai-diff-block.frontend-component.specification.d.ts.map +1 -0
  637. package/dist/esm/engine/frontend-components/ai-elements/artifacts/ai-diff-block.frontend-component.specification.js +21 -0
  638. package/dist/esm/engine/frontend-components/ai-elements/artifacts/ai-diff-block.frontend-component.specification.js.map +1 -0
  639. package/dist/esm/engine/frontend-components/ai-elements/trace/ai-chain-of-thought.frontend-component.specification.js +1 -1
  640. package/dist/esm/engine/frontend-components/ai-elements/trace/ai-chain-of-thought.frontend-component.specification.js.map +1 -1
  641. package/dist/esm/engine/frontend-components/app/app-layout-billing-settings.frontend-component.specification.d.ts +5 -0
  642. package/dist/esm/engine/frontend-components/app/app-layout-billing-settings.frontend-component.specification.d.ts.map +1 -0
  643. package/dist/esm/engine/frontend-components/app/app-layout-billing-settings.frontend-component.specification.js +82 -0
  644. package/dist/esm/engine/frontend-components/app/app-layout-billing-settings.frontend-component.specification.js.map +1 -0
  645. package/dist/esm/engine/frontend-components/app/app-layout-connected-accounts-settings.frontend-component.specification.d.ts.map +1 -1
  646. package/dist/esm/engine/frontend-components/app/app-layout-connected-accounts-settings.frontend-component.specification.js +6 -5
  647. package/dist/esm/engine/frontend-components/app/app-layout-connected-accounts-settings.frontend-component.specification.js.map +1 -1
  648. package/dist/esm/engine/frontend-components/app/app-layout-consent-gate.frontend-component.specification.d.ts +4 -0
  649. package/dist/esm/engine/frontend-components/app/app-layout-consent-gate.frontend-component.specification.d.ts.map +1 -0
  650. package/dist/esm/engine/frontend-components/app/app-layout-consent-gate.frontend-component.specification.js +22 -0
  651. package/dist/esm/engine/frontend-components/app/app-layout-consent-gate.frontend-component.specification.js.map +1 -0
  652. package/dist/esm/engine/frontend-components/app/app-layout-document-acceptance-gate.frontend-component.specification.d.ts +4 -0
  653. package/dist/esm/engine/frontend-components/app/app-layout-document-acceptance-gate.frontend-component.specification.d.ts.map +1 -0
  654. package/dist/esm/engine/frontend-components/app/app-layout-document-acceptance-gate.frontend-component.specification.js +22 -0
  655. package/dist/esm/engine/frontend-components/app/app-layout-document-acceptance-gate.frontend-component.specification.js.map +1 -0
  656. package/dist/esm/engine/frontend-components/app/app-layout-surface-error-boundary.frontend-component.specification.d.ts +5 -0
  657. package/dist/esm/engine/frontend-components/app/app-layout-surface-error-boundary.frontend-component.specification.d.ts.map +1 -0
  658. package/dist/esm/engine/frontend-components/app/app-layout-surface-error-boundary.frontend-component.specification.js +81 -0
  659. package/dist/esm/engine/frontend-components/app/app-layout-surface-error-boundary.frontend-component.specification.js.map +1 -0
  660. package/dist/esm/engine/frontend-components/app/public-layout-main-container.frontend-component.specification.d.ts.map +1 -1
  661. package/dist/esm/engine/frontend-components/app/public-layout-main-container.frontend-component.specification.js +4 -2
  662. package/dist/esm/engine/frontend-components/app/public-layout-main-container.frontend-component.specification.js.map +1 -1
  663. package/dist/esm/engine/frontend-components/app/public-layout-terms.frontend-component.specification.js +4 -4
  664. package/dist/esm/engine/frontend-components/app/public-layout-terms.frontend-component.specification.js.map +1 -1
  665. package/dist/esm/engine/frontend-components/auth/public-layout-auth-callback.frontend-component.specification.d.ts.map +1 -1
  666. package/dist/esm/engine/frontend-components/auth/public-layout-auth-callback.frontend-component.specification.js +3 -2
  667. package/dist/esm/engine/frontend-components/auth/public-layout-auth-callback.frontend-component.specification.js.map +1 -1
  668. package/dist/esm/engine/frontend-components/auth/public-layout-enrollment-required.frontend-component.specification.js +4 -4
  669. package/dist/esm/engine/frontend-components/auth/public-layout-enrollment-required.frontend-component.specification.js.map +1 -1
  670. package/dist/esm/engine/frontend-components/auth/public-layout-magic-link-verify.frontend-component.specification.js +1 -1
  671. package/dist/esm/engine/frontend-components/auth/public-layout-magic-link-verify.frontend-component.specification.js.map +1 -1
  672. package/dist/esm/engine/frontend-components/auth/public-layout-organization-onboarding.frontend-component.specification.d.ts +4 -0
  673. package/dist/esm/engine/frontend-components/auth/public-layout-organization-onboarding.frontend-component.specification.d.ts.map +1 -0
  674. package/dist/esm/engine/frontend-components/auth/public-layout-organization-onboarding.frontend-component.specification.js +22 -0
  675. package/dist/esm/engine/frontend-components/auth/public-layout-organization-onboarding.frontend-component.specification.js.map +1 -0
  676. package/dist/esm/engine/frontend-components/auth/public-layout-user-auth.frontend-component.specification.js +1 -1
  677. package/dist/esm/engine/frontend-components/auth/public-layout-user-auth.frontend-component.specification.js.map +1 -1
  678. package/dist/esm/engine/frontend-components/auth/public-layout-user-register.frontend-component.specification.d.ts.map +1 -1
  679. package/dist/esm/engine/frontend-components/auth/public-layout-user-register.frontend-component.specification.js +4 -4
  680. package/dist/esm/engine/frontend-components/auth/public-layout-user-register.frontend-component.specification.js.map +1 -1
  681. package/dist/esm/engine/frontend-components/billing/billing-invoice-history.frontend-component.specification.js +1 -1
  682. package/dist/esm/engine/frontend-components/billing/billing-invoice-history.frontend-component.specification.js.map +1 -1
  683. package/dist/esm/engine/frontend-components/billing/billing-plan-change-preview.frontend-component.specification.d.ts +4 -0
  684. package/dist/esm/engine/frontend-components/billing/billing-plan-change-preview.frontend-component.specification.d.ts.map +1 -0
  685. package/dist/esm/engine/frontend-components/billing/billing-plan-change-preview.frontend-component.specification.js +21 -0
  686. package/dist/esm/engine/frontend-components/billing/billing-plan-change-preview.frontend-component.specification.js.map +1 -0
  687. package/dist/esm/engine/frontend-components/billing/billing-portal-link.frontend-component.specification.js +1 -1
  688. package/dist/esm/engine/frontend-components/billing/billing-portal-link.frontend-component.specification.js.map +1 -1
  689. package/dist/esm/engine/frontend-components/billing/billing-pricing-table.frontend-component.specification.js +2 -2
  690. package/dist/esm/engine/frontend-components/billing/billing-pricing-table.frontend-component.specification.js.map +1 -1
  691. package/dist/esm/engine/frontend-components/billing/billing-subscription-status.frontend-component.specification.js +1 -1
  692. package/dist/esm/engine/frontend-components/billing/billing-subscription-status.frontend-component.specification.js.map +1 -1
  693. package/dist/esm/engine/frontend-components/billing/billing-usage-dashboard.frontend-component.specification.js +1 -1
  694. package/dist/esm/engine/frontend-components/billing/billing-usage-dashboard.frontend-component.specification.js.map +1 -1
  695. package/dist/esm/engine/frontend-components/data-display/description-list.frontend-component.specification.d.ts.map +1 -1
  696. package/dist/esm/engine/frontend-components/data-display/description-list.frontend-component.specification.js +20 -2
  697. package/dist/esm/engine/frontend-components/data-display/description-list.frontend-component.specification.js.map +1 -1
  698. package/dist/esm/engine/frontend-components/data-display/duration.frontend-component.specification.d.ts +5 -0
  699. package/dist/esm/engine/frontend-components/data-display/duration.frontend-component.specification.d.ts.map +1 -0
  700. package/dist/esm/engine/frontend-components/data-display/duration.frontend-component.specification.js +177 -0
  701. package/dist/esm/engine/frontend-components/data-display/duration.frontend-component.specification.js.map +1 -0
  702. package/dist/esm/engine/frontend-components/data-display/formatters/display-field-address.frontend-component.specification.d.ts +5 -0
  703. package/dist/esm/engine/frontend-components/data-display/formatters/display-field-address.frontend-component.specification.d.ts.map +1 -0
  704. package/dist/esm/engine/frontend-components/data-display/formatters/display-field-address.frontend-component.specification.js +22 -0
  705. package/dist/esm/engine/frontend-components/data-display/formatters/display-field-address.frontend-component.specification.js.map +1 -0
  706. package/dist/esm/engine/frontend-components/data-display/formatters/display-field-file-document.frontend-component.specification.d.ts.map +1 -1
  707. package/dist/esm/engine/frontend-components/data-display/formatters/display-field-file-document.frontend-component.specification.js +10 -2
  708. package/dist/esm/engine/frontend-components/data-display/formatters/display-field-file-document.frontend-component.specification.js.map +1 -1
  709. package/dist/esm/engine/frontend-components/data-display/identifier.frontend-component.specification.d.ts +5 -0
  710. package/dist/esm/engine/frontend-components/data-display/identifier.frontend-component.specification.d.ts.map +1 -0
  711. package/dist/esm/engine/frontend-components/data-display/identifier.frontend-component.specification.js +166 -0
  712. package/dist/esm/engine/frontend-components/data-display/identifier.frontend-component.specification.js.map +1 -0
  713. package/dist/esm/engine/frontend-components/data-display/kbd.frontend-component.specification.d.ts +5 -0
  714. package/dist/esm/engine/frontend-components/data-display/kbd.frontend-component.specification.d.ts.map +1 -0
  715. package/dist/esm/engine/frontend-components/data-display/kbd.frontend-component.specification.js +122 -0
  716. package/dist/esm/engine/frontend-components/data-display/kbd.frontend-component.specification.js.map +1 -0
  717. package/dist/esm/engine/frontend-components/data-display/timeline.frontend-component.specification.d.ts +5 -0
  718. package/dist/esm/engine/frontend-components/data-display/timeline.frontend-component.specification.d.ts.map +1 -0
  719. package/dist/esm/engine/frontend-components/data-display/timeline.frontend-component.specification.js +152 -0
  720. package/dist/esm/engine/frontend-components/data-display/timeline.frontend-component.specification.js.map +1 -0
  721. package/dist/esm/engine/frontend-components/feedback/celebration-overlay.frontend-component.specification.d.ts.map +1 -1
  722. package/dist/esm/engine/frontend-components/feedback/celebration-overlay.frontend-component.specification.js +13 -0
  723. package/dist/esm/engine/frontend-components/feedback/celebration-overlay.frontend-component.specification.js.map +1 -1
  724. package/dist/esm/engine/frontend-components/flows-actors/low-level-ai-approval.frontend-component.specification.js +1 -1
  725. package/dist/esm/engine/frontend-components/flows-actors/low-level-ai-approval.frontend-component.specification.js.map +1 -1
  726. package/dist/esm/engine/frontend-components/form/controls/string/inline-edit-text.frontend-component.specification.d.ts +5 -0
  727. package/dist/esm/engine/frontend-components/form/controls/string/inline-edit-text.frontend-component.specification.d.ts.map +1 -0
  728. package/dist/esm/engine/frontend-components/form/controls/string/inline-edit-text.frontend-component.specification.js +92 -0
  729. package/dist/esm/engine/frontend-components/form/controls/string/inline-edit-text.frontend-component.specification.js.map +1 -0
  730. package/dist/esm/engine/frontend-components/form/fields/form-field-address.frontend-component.specification.d.ts +5 -0
  731. package/dist/esm/engine/frontend-components/form/fields/form-field-address.frontend-component.specification.d.ts.map +1 -0
  732. package/dist/esm/engine/frontend-components/form/fields/form-field-address.frontend-component.specification.js +29 -0
  733. package/dist/esm/engine/frontend-components/form/fields/form-field-address.frontend-component.specification.js.map +1 -0
  734. package/dist/esm/engine/frontend-components/form/fields/form-field-enum.frontend-component.specification.js +1 -1
  735. package/dist/esm/engine/frontend-components/form/fields/form-field-enum.frontend-component.specification.js.map +1 -1
  736. package/dist/esm/engine/frontend-components/form/fields/form-field-file.frontend-component.specification.js +1 -1
  737. package/dist/esm/engine/frontend-components/form/fields/form-field-file.frontend-component.specification.js.map +1 -1
  738. package/dist/esm/engine/frontend-components/index.d.ts +12 -0
  739. package/dist/esm/engine/frontend-components/index.d.ts.map +1 -1
  740. package/dist/esm/engine/frontend-components/index.js +40 -0
  741. package/dist/esm/engine/frontend-components/index.js.map +1 -1
  742. package/dist/esm/engine/frontend-components/internal/_tier2-virtual-slot-spec.factory.d.ts +25 -1
  743. package/dist/esm/engine/frontend-components/internal/_tier2-virtual-slot-spec.factory.d.ts.map +1 -1
  744. package/dist/esm/engine/frontend-components/internal/_tier2-virtual-slot-spec.factory.js +16 -2
  745. package/dist/esm/engine/frontend-components/internal/_tier2-virtual-slot-spec.factory.js.map +1 -1
  746. package/dist/esm/engine/frontend-components/navigation/app-level/navigation-back.frontend-component.specification.js +1 -1
  747. package/dist/esm/engine/frontend-components/navigation/app-level/navigation-back.frontend-component.specification.js.map +1 -1
  748. package/dist/esm/engine/frontend-components/progression/progression-milestone-tracker.frontend-component.specification.d.ts +9 -0
  749. package/dist/esm/engine/frontend-components/progression/progression-milestone-tracker.frontend-component.specification.d.ts.map +1 -1
  750. package/dist/esm/engine/frontend-components/progression/progression-milestone-tracker.frontend-component.specification.js +91 -7
  751. package/dist/esm/engine/frontend-components/progression/progression-milestone-tracker.frontend-component.specification.js.map +1 -1
  752. package/dist/esm/engine/frontend-components/sections/accordion.frontend-component.specification.d.ts.map +1 -1
  753. package/dist/esm/engine/frontend-components/sections/accordion.frontend-component.specification.js +9 -3
  754. package/dist/esm/engine/frontend-components/sections/accordion.frontend-component.specification.js.map +1 -1
  755. package/dist/esm/engine/frontend-components/sections/card.frontend-component.specification.d.ts.map +1 -1
  756. package/dist/esm/engine/frontend-components/sections/card.frontend-component.specification.js +41 -1
  757. package/dist/esm/engine/frontend-components/sections/card.frontend-component.specification.js.map +1 -1
  758. package/dist/esm/engine/frontend-components/sections/collapsible.frontend-component.specification.js +2 -2
  759. package/dist/esm/engine/frontend-components/sections/collapsible.frontend-component.specification.js.map +1 -1
  760. package/dist/esm/engine/frontend-components/sections/tabs.frontend-component.specification.d.ts.map +1 -1
  761. package/dist/esm/engine/frontend-components/sections/tabs.frontend-component.specification.js +19 -1
  762. package/dist/esm/engine/frontend-components/sections/tabs.frontend-component.specification.js.map +1 -1
  763. package/dist/esm/engine/frontend-components/typography/link.frontend-component.specification.js +3 -3
  764. package/dist/esm/engine/frontend-components/typography/link.frontend-component.specification.js.map +1 -1
  765. package/dist/esm/engine/frontend-components/typography/text.frontend-component.specification.d.ts.map +1 -1
  766. package/dist/esm/engine/frontend-components/typography/text.frontend-component.specification.js +21 -1
  767. package/dist/esm/engine/frontend-components/typography/text.frontend-component.specification.js.map +1 -1
  768. package/dist/esm/engine/guidance/resources/progression-state.resource.specification.d.ts +2 -0
  769. package/dist/esm/engine/guidance/resources/progression-state.resource.specification.d.ts.map +1 -1
  770. package/dist/esm/engine/infrastructure/resources/external-data-pipeline-membership.resource.specification.d.ts +4 -0
  771. package/dist/esm/engine/infrastructure/resources/external-data-pipeline-membership.resource.specification.d.ts.map +1 -0
  772. package/dist/esm/engine/infrastructure/resources/external-data-pipeline-membership.resource.specification.js +48 -0
  773. package/dist/esm/engine/infrastructure/resources/external-data-pipeline-membership.resource.specification.js.map +1 -0
  774. package/dist/esm/engine/infrastructure/resources/external-data-pipeline-states.resource.specification.d.ts.map +1 -1
  775. package/dist/esm/engine/infrastructure/resources/external-data-pipeline-states.resource.specification.js +3 -2
  776. package/dist/esm/engine/infrastructure/resources/external-data-pipeline-states.resource.specification.js.map +1 -1
  777. package/dist/esm/engine/infrastructure/resources/job-executions.resource.specification.d.ts +77 -3
  778. package/dist/esm/engine/infrastructure/resources/job-executions.resource.specification.d.ts.map +1 -1
  779. package/dist/esm/engine/infrastructure/resources/job-executions.resource.specification.js +11 -3
  780. package/dist/esm/engine/infrastructure/resources/job-executions.resource.specification.js.map +1 -1
  781. package/dist/esm/engine/infrastructure/resources/job-payload-storage.resource.specification.d.ts +26 -1
  782. package/dist/esm/engine/infrastructure/resources/job-payload-storage.resource.specification.d.ts.map +1 -1
  783. package/dist/esm/engine/infrastructure/resources/job-payload-storage.resource.specification.js +17 -8
  784. package/dist/esm/engine/infrastructure/resources/job-payload-storage.resource.specification.js.map +1 -1
  785. package/dist/esm/engine/infrastructure/resources/system-of-record-partition-assignments.resource.specification.d.ts +49 -0
  786. package/dist/esm/engine/infrastructure/resources/system-of-record-partition-assignments.resource.specification.d.ts.map +1 -0
  787. package/dist/esm/engine/infrastructure/resources/system-of-record-partition-assignments.resource.specification.js +293 -0
  788. package/dist/esm/engine/infrastructure/resources/system-of-record-partition-assignments.resource.specification.js.map +1 -0
  789. package/dist/esm/engine/notifications/resources/m2m-webhook-delivery-log.resource.specification.js +5 -5
  790. package/dist/esm/engine/notifications/resources/m2m-webhook-delivery-log.resource.specification.js.map +1 -1
  791. package/dist/esm/engine/notifications/resources/notification-badges.resource.specification.d.ts +1 -1
  792. package/dist/esm/engine/notifications/resources/webhook-config.resource.specification.js +6 -6
  793. package/dist/esm/engine/notifications/resources/webhook-config.resource.specification.js.map +1 -1
  794. package/dist/esm/engine/notifications/system-emails/security.system-emails.specification.js +3 -3
  795. package/dist/esm/engine/notifications/system-emails/security.system-emails.specification.js.map +1 -1
  796. package/dist/esm/engine/organizations/resources/organization-members.resource.specification.d.ts +1 -1
  797. package/dist/esm/engine/organizations/resources/organization-profiles.resource.specification.js +2 -2
  798. package/dist/esm/engine/organizations/resources/organization-profiles.resource.specification.js.map +1 -1
  799. package/dist/esm/engine/organizations/resources/organization-units.resource.specification.d.ts +3 -1
  800. package/dist/esm/engine/organizations/resources/organization-units.resource.specification.d.ts.map +1 -1
  801. package/dist/esm/engine/organizations/resources/organization-units.resource.specification.js +27 -5
  802. package/dist/esm/engine/organizations/resources/organization-units.resource.specification.js.map +1 -1
  803. package/dist/esm/engine/organizations/resources/organizations.resource.specification.d.ts +1 -1
  804. package/dist/esm/engine/organizations/resources/organizations.resource.specification.d.ts.map +1 -1
  805. package/dist/esm/engine/organizations/resources/organizations.resource.specification.js +31 -12
  806. package/dist/esm/engine/organizations/resources/organizations.resource.specification.js.map +1 -1
  807. package/dist/esm/engine/providers/anthropic.provider.specification.d.ts.map +1 -1
  808. package/dist/esm/engine/providers/anthropic.provider.specification.js +10 -1
  809. package/dist/esm/engine/providers/anthropic.provider.specification.js.map +1 -1
  810. package/dist/esm/engine/providers/apple.provider.specification.d.ts.map +1 -1
  811. package/dist/esm/engine/providers/apple.provider.specification.js +12 -1
  812. package/dist/esm/engine/providers/apple.provider.specification.js.map +1 -1
  813. package/dist/esm/engine/providers/email-preview.provider.specification.d.ts.map +1 -1
  814. package/dist/esm/engine/providers/email-preview.provider.specification.js +9 -1
  815. package/dist/esm/engine/providers/email-preview.provider.specification.js.map +1 -1
  816. package/dist/esm/engine/providers/github.provider.specification.d.ts.map +1 -1
  817. package/dist/esm/engine/providers/github.provider.specification.js +12 -1
  818. package/dist/esm/engine/providers/github.provider.specification.js.map +1 -1
  819. package/dist/esm/engine/providers/google.provider.specification.d.ts.map +1 -1
  820. package/dist/esm/engine/providers/google.provider.specification.js +12 -1
  821. package/dist/esm/engine/providers/google.provider.specification.js.map +1 -1
  822. package/dist/esm/engine/providers/grok.provider.specification.d.ts.map +1 -1
  823. package/dist/esm/engine/providers/grok.provider.specification.js +10 -1
  824. package/dist/esm/engine/providers/grok.provider.specification.js.map +1 -1
  825. package/dist/esm/engine/providers/microsoft.provider.specification.d.ts.map +1 -1
  826. package/dist/esm/engine/providers/microsoft.provider.specification.js +22 -1
  827. package/dist/esm/engine/providers/microsoft.provider.specification.js.map +1 -1
  828. package/dist/esm/engine/providers/mistral.provider.specification.d.ts.map +1 -1
  829. package/dist/esm/engine/providers/mistral.provider.specification.js +10 -1
  830. package/dist/esm/engine/providers/mistral.provider.specification.js.map +1 -1
  831. package/dist/esm/engine/providers/openai.provider.specification.d.ts.map +1 -1
  832. package/dist/esm/engine/providers/openai.provider.specification.js +10 -1
  833. package/dist/esm/engine/providers/openai.provider.specification.js.map +1 -1
  834. package/dist/esm/engine/providers/opencode.provider.specification.d.ts.map +1 -1
  835. package/dist/esm/engine/providers/opencode.provider.specification.js +9 -1
  836. package/dist/esm/engine/providers/opencode.provider.specification.js.map +1 -1
  837. package/dist/esm/engine/providers/perplexity.provider.specification.d.ts.map +1 -1
  838. package/dist/esm/engine/providers/perplexity.provider.specification.js +10 -1
  839. package/dist/esm/engine/providers/perplexity.provider.specification.js.map +1 -1
  840. package/dist/esm/engine/providers/resend.provider.specification.d.ts.map +1 -1
  841. package/dist/esm/engine/providers/resend.provider.specification.js +10 -1
  842. package/dist/esm/engine/providers/resend.provider.specification.js.map +1 -1
  843. package/dist/esm/engine/providers/stripe.provider.specification.d.ts.map +1 -1
  844. package/dist/esm/engine/providers/stripe.provider.specification.js +10 -1
  845. package/dist/esm/engine/providers/stripe.provider.specification.js.map +1 -1
  846. package/dist/esm/engine/providers/twilio.provider.specification.d.ts.map +1 -1
  847. package/dist/esm/engine/providers/twilio.provider.specification.js +10 -1
  848. package/dist/esm/engine/providers/twilio.provider.specification.js.map +1 -1
  849. package/dist/esm/engine/roles/app-audit-evidence-reader.role.specification.d.ts +2 -0
  850. package/dist/esm/engine/roles/app-audit-evidence-reader.role.specification.d.ts.map +1 -0
  851. package/dist/esm/engine/roles/app-audit-evidence-reader.role.specification.js +21 -0
  852. package/dist/esm/engine/roles/app-audit-evidence-reader.role.specification.js.map +1 -0
  853. package/dist/esm/engine/roles/index.d.ts +4 -3
  854. package/dist/esm/engine/roles/index.d.ts.map +1 -1
  855. package/dist/esm/engine/roles/index.js +6 -4
  856. package/dist/esm/engine/roles/index.js.map +1 -1
  857. package/dist/esm/engine/users/resources/anonymous-users.resource.specification.d.ts +5 -3
  858. package/dist/esm/engine/users/resources/anonymous-users.resource.specification.d.ts.map +1 -1
  859. package/dist/esm/engine/users/resources/anonymous-users.resource.specification.js +2 -2
  860. package/dist/esm/engine/users/resources/anonymous-users.resource.specification.js.map +1 -1
  861. package/dist/esm/engine/users/resources/inbound-contacts.resource.specification.d.ts +2 -1
  862. package/dist/esm/engine/users/resources/inbound-contacts.resource.specification.d.ts.map +1 -1
  863. package/dist/esm/engine/users/resources/inbound-contacts.resource.specification.js +2 -2
  864. package/dist/esm/engine/users/resources/inbound-contacts.resource.specification.js.map +1 -1
  865. package/dist/esm/engine/users/resources/user-identity-links.resource.specification.d.ts +1 -0
  866. package/dist/esm/engine/users/resources/user-identity-links.resource.specification.d.ts.map +1 -1
  867. package/dist/esm/engine/users/resources/user-identity-links.resource.specification.js +8 -3
  868. package/dist/esm/engine/users/resources/user-identity-links.resource.specification.js.map +1 -1
  869. package/dist/esm/engine/users/resources/user-preferences-api-reference.examples.d.ts +2 -2
  870. package/dist/esm/engine/users/resources/user-preferences-api-reference.examples.js +2 -2
  871. package/dist/esm/engine/users/resources/user-preferences-api-reference.examples.js.map +1 -1
  872. package/dist/esm/engine/users/resources/user-preferences.resource.specification.d.ts +5 -5
  873. package/dist/esm/engine/users/resources/user-preferences.resource.specification.js +1 -1
  874. package/dist/esm/engine/users/resources/user-preferences.resource.specification.js.map +1 -1
  875. package/dist/esm/engine/users/resources/user-self-preferences.resource.specification.d.ts +4 -4
  876. package/dist/esm/engine/users/resources/user-self-preferences.resource.specification.js +3 -3
  877. package/dist/esm/engine/users/resources/user-self-preferences.resource.specification.js.map +1 -1
  878. package/dist/esm/engine/users/resources/user-self.resource.specification.d.ts +1 -0
  879. package/dist/esm/engine/users/resources/user-self.resource.specification.d.ts.map +1 -1
  880. package/dist/esm/engine/users/resources/user-self.resource.specification.js +1 -1
  881. package/dist/esm/engine/users/resources/user-self.resource.specification.js.map +1 -1
  882. package/dist/esm/engine/users/resources/users.resource.specification.d.ts +1 -0
  883. package/dist/esm/engine/users/resources/users.resource.specification.d.ts.map +1 -1
  884. package/dist/esm/engine/users/resources/users.resource.specification.js +2 -2
  885. package/dist/esm/engine/users/resources/users.resource.specification.js.map +1 -1
  886. package/dist/esm/index.d.ts +39 -0
  887. package/dist/esm/index.d.ts.map +1 -1
  888. package/dist/esm/index.js +39 -0
  889. package/dist/esm/index.js.map +1 -1
  890. package/dist/esm/technical-documentation/application-documentation-chapters.schemas.d.ts +134 -0
  891. package/dist/esm/technical-documentation/application-documentation-chapters.schemas.d.ts.map +1 -0
  892. package/dist/esm/technical-documentation/application-documentation-chapters.schemas.js +142 -0
  893. package/dist/esm/technical-documentation/application-documentation-chapters.schemas.js.map +1 -0
  894. package/dist/esm/technical-documentation/application-documentation-plan-generation.schemas.d.ts +35 -0
  895. package/dist/esm/technical-documentation/application-documentation-plan-generation.schemas.d.ts.map +1 -0
  896. package/dist/esm/technical-documentation/application-documentation-plan-generation.schemas.js +45 -0
  897. package/dist/esm/technical-documentation/application-documentation-plan-generation.schemas.js.map +1 -0
  898. package/dist/esm/technical-documentation/application-documentation-plan-validation.d.ts +33 -0
  899. package/dist/esm/technical-documentation/application-documentation-plan-validation.d.ts.map +1 -0
  900. package/dist/esm/technical-documentation/application-documentation-plan-validation.js +77 -0
  901. package/dist/esm/technical-documentation/application-documentation-plan-validation.js.map +1 -0
  902. package/dist/esm/technical-documentation/application-documentation-plan.family-aspects.d.ts +3 -0
  903. package/dist/esm/technical-documentation/application-documentation-plan.family-aspects.d.ts.map +1 -0
  904. package/dist/esm/technical-documentation/application-documentation-plan.family-aspects.js +40 -0
  905. package/dist/esm/technical-documentation/application-documentation-plan.family-aspects.js.map +1 -0
  906. package/dist/esm/technical-documentation/application-documentation-plan.schemas.d.ts +122 -0
  907. package/dist/esm/technical-documentation/application-documentation-plan.schemas.d.ts.map +1 -0
  908. package/dist/esm/technical-documentation/application-documentation-plan.schemas.js +138 -0
  909. package/dist/esm/technical-documentation/application-documentation-plan.schemas.js.map +1 -0
  910. package/dist/esm/technical-documentation/engine-documentation-specification-catalog.companion.d.ts.map +1 -1
  911. package/dist/esm/technical-documentation/engine-documentation-specification-catalog.companion.js +7 -15
  912. package/dist/esm/technical-documentation/engine-documentation-specification-catalog.companion.js.map +1 -1
  913. package/dist/esm/technical-documentation/technical-documentation-assets.schemas.js +1 -1
  914. package/dist/esm/technical-documentation/technical-documentation-assets.schemas.js.map +1 -1
  915. package/dist/esm/technical-documentation/technical-documentation-capture.schemas.js +1 -1
  916. package/dist/esm/technical-documentation/technical-documentation-capture.schemas.js.map +1 -1
  917. package/dist/esm/technical-documentation/technical-documentation-common.schemas.js +1 -1
  918. package/dist/esm/technical-documentation/technical-documentation-common.schemas.js.map +1 -1
  919. package/dist/esm/technical-documentation/technical-documentation-evidence.schemas.js +1 -1
  920. package/dist/esm/technical-documentation/technical-documentation-evidence.schemas.js.map +1 -1
  921. package/dist/esm/technical-documentation/technical-documentation-lifecycle.schemas.js +1 -1
  922. package/dist/esm/technical-documentation/technical-documentation-lifecycle.schemas.js.map +1 -1
  923. package/dist/esm/technical-documentation/technical-documentation-publication.schemas.js +1 -1
  924. package/dist/esm/technical-documentation/technical-documentation-publication.schemas.js.map +1 -1
  925. package/dist/esm/technical-documentation/technical-documentation-units.schemas.d.ts +14 -0
  926. package/dist/esm/technical-documentation/technical-documentation-units.schemas.d.ts.map +1 -1
  927. package/dist/esm/technical-documentation/technical-documentation-units.schemas.js +16 -3
  928. package/dist/esm/technical-documentation/technical-documentation-units.schemas.js.map +1 -1
  929. package/dist/esm/technical-documentation.exports.d.ts +4 -0
  930. package/dist/esm/technical-documentation.exports.d.ts.map +1 -1
  931. package/dist/esm/technical-documentation.exports.js +24 -0
  932. package/dist/esm/technical-documentation.exports.js.map +1 -1
  933. package/dist/tsconfig.build.tsbuildinfo +1 -1
  934. package/package.json +8 -13
  935. package/dist/esm/application-creation/application-coding-tasks.application-creation.schemas.d.ts +0 -103
  936. package/dist/esm/application-creation/application-coding-tasks.application-creation.schemas.d.ts.map +0 -1
  937. package/dist/esm/application-creation/application-coding-tasks.application-creation.schemas.js +0 -76
  938. package/dist/esm/application-creation/application-coding-tasks.application-creation.schemas.js.map +0 -1
  939. package/dist/esm/application-creation/application-specification-family-identity.application-creation.schemas.d.ts +0 -108
  940. package/dist/esm/application-creation/application-specification-family-identity.application-creation.schemas.d.ts.map +0 -1
  941. package/dist/esm/application-creation/application-specification-family-identity.application-creation.schemas.js +0 -119
  942. package/dist/esm/application-creation/application-specification-family-identity.application-creation.schemas.js.map +0 -1
  943. package/dist/esm/application-creation-playbook-runtime.exports.d.ts +0 -3
  944. package/dist/esm/application-creation-playbook-runtime.exports.d.ts.map +0 -1
  945. package/dist/esm/application-creation-playbook-runtime.exports.js +0 -3
  946. package/dist/esm/application-creation-playbook-runtime.exports.js.map +0 -1
  947. package/dist/esm/engine/frontend-components/billing/billing-promotion-code-input.frontend-component.specification.d.ts +0 -0
  948. package/dist/esm/engine/frontend-components/billing/billing-promotion-code-input.frontend-component.specification.d.ts.map +0 -0
  949. package/dist/esm/engine/frontend-components/billing/billing-promotion-code-input.frontend-component.specification.js +0 -0
  950. package/dist/esm/engine/frontend-components/billing/billing-promotion-code-input.frontend-component.specification.js.map +0 -0
@@ -0,0 +1,293 @@
1
+ /**
2
+ * Resource: `systemOfRecordPartitionAssignments` — Wildo SaaS engine specification (backend-only, application-scoped).
3
+ *
4
+ * Inputs:
5
+ * - Schema: engine/saas-models/src/systems-of-record/system-of-record-partition-assignments.shared.schemas.ts
6
+ * → `SystemOfRecordPartitionAssignmentSchema`
7
+ * - Factory: engine/saas-models/src/systems-of-record/system-of-record-partition-assignments.shared.resources-config.schemas.ts
8
+ * → `systemOfRecordPartitionAssignmentsResourceConfiguration_InitializationFactory`
9
+ * - Custom operations: `SystemOfRecordPartitionAssignments_Operations`
10
+ *
11
+ * ## What this resource is for
12
+ *
13
+ * A system of record — the operator's own Odoo, SAP, NetSuite or Dynamics deployment — holds several
14
+ * PARTITIONS inside one corporate. Every row Wildo reads out of one is stamped with the application's
15
+ * OWNER organization, so without this resource every member of that organization sees every partition:
16
+ * the Spanish subsidiary's accountant reads the German company's invoices.
17
+ *
18
+ * The mechanism that confines members WITHIN one organization already exists — organization unit
19
+ * narrowing. What it lacked was the edge from a remote partition key to a Wildo unit, and each row
20
+ * here IS one such edge.
21
+ *
22
+ * ## Why APPLICATION scope, when every row names a unit of the owner organization
23
+ *
24
+ * Because assigning a partition is an OPERATOR act on the deployment's own configuration, not an act
25
+ * inside a customer's tenant. An operator door on an ORGANIZATIONS-scoped resource would require a
26
+ * cross-tenant declaration on every verb and a platform access grant per crossing — the ceremony for
27
+ * reaching into a CUSTOMER's data, which this is not. The scope is expressed once, in the registry
28
+ * relationship APPLICATION → SYSTEM_OF_RECORD_PARTITION_ASSIGNMENTS carrying `isPrimaryScope: true`;
29
+ * the runtime config deliberately does not restate it.
30
+ *
31
+ * Why backend-only: there is NO entry for `[CoreResourceType.SYSTEM_OF_RECORD_PARTITION_ASSIGNMENTS]`
32
+ * in any preset under engine/presets-components/src/config/resources/. The operator-facing partition
33
+ * map is not built yet; today the resource is consumed by the read confinement and by the platform API.
34
+ */
35
+ import { LabelAudience } from '@wildo-ai/presets-components-models';
36
+ import { CodeDeclarationKind, CodeSymbolKind, FieldSemanticImportance, } from '@wildo-ai/zod-decorators';
37
+ import { CoreResourceOperation as Op, ResourcePrimaryScope, SystemOfRecordPartitionAssignmentSchema, SystemOfRecordPartitionAssignments_Operations, systemOfRecordPartitionAssignmentsResourceConfiguration_InitializationFactory, } from '@wildo-ai/saas-models';
38
+ import { HttpResponseStatusCode, resourceSpecification } from '../../../_core/index.js';
39
+ import { EngineResourceSubDomain } from '../../engine-resource-sub-domain.js';
40
+ const PARTITION_ASSIGNMENT_DE_ID = 'system_of_record_partition_assignment_01J6R3A4B5C6D7E8F9G0H1J2KL';
41
+ const PARTITION_ASSIGNMENT_ES_ID = 'system_of_record_partition_assignment_01J6R3C5D6E7F8G9H0J1K2L3MN';
42
+ const PARTITION_UNIT_DE_ID = 'organization_unit_01J6R3E6F7G8H9J0K1L2M3N4PQ';
43
+ const PARTITION_UNIT_ES_ID = 'organization_unit_01J6R3G7H8J9K0L1M2N3P4Q5RS';
44
+ const PARTITION_OPERATOR_USER_ID = 'user_01J6R3J8K9L0M1N2P3Q4R5S6TU';
45
+ const PARTITION_EXAMPLE_APPLICATION_ID = 'app_01J6R3L9M0N1P2Q3R4S5T6U7VW';
46
+ const germanCompanyAssignmentExample = {
47
+ _id: PARTITION_ASSIGNMENT_DE_ID,
48
+ applicationId: PARTITION_EXAMPLE_APPLICATION_ID,
49
+ system: 'odoo',
50
+ remoteKey: '10',
51
+ organizationUnitId: PARTITION_UNIT_DE_ID,
52
+ justification: 'Odoo company 10 is Acme Deutschland GmbH; its ledger belongs to the Deutschland unit.',
53
+ assignedByUserId: PARTITION_OPERATOR_USER_ID,
54
+ createdAt: '2026-09-18T09:00:00.000Z',
55
+ updatedAt: '2026-09-18T09:00:00.000Z',
56
+ };
57
+ const spanishCompanyAssignmentExample = {
58
+ ...germanCompanyAssignmentExample,
59
+ _id: PARTITION_ASSIGNMENT_ES_ID,
60
+ remoteKey: '14',
61
+ organizationUnitId: PARTITION_UNIT_ES_ID,
62
+ justification: 'Odoo company 14 is Acme Iberia S.L.; its ledger belongs to the Iberia unit.',
63
+ };
64
+ export const systemOfRecordPartitionAssignmentsResourceSpecification = resourceSpecification(systemOfRecordPartitionAssignmentsResourceConfiguration_InitializationFactory, SystemOfRecordPartitionAssignmentSchema, ({ schemaShape }) => ({
65
+ purpose: 'Record which organization unit each remote partition of a system of record belongs to, so that members of a unit read that unit\'s company and no other.',
66
+ businessRole: 'The deployment\'s partition map. It answers which remote company corresponds to which part of the org chart, who decided that, and why.',
67
+ lifecycleRole: 'A platform administrator assigns a remote partition to a unit, stating a reason. A partition may later be MOVED to a different unit through `reassign`, which names the unit it is expected to be leaving and refuses if another administrator has already moved it. Removing the assignment makes the partition unreachable to every caller — it is not a narrowing, it withdraws a company from the product.',
68
+ audience: LabelAudience.ADMIN,
69
+ subDomain: EngineResourceSubDomain.INFRASTRUCTURE,
70
+ codeHandling: {
71
+ mainSchema: {
72
+ packageName: '@wildo-ai/saas-models',
73
+ exportName: 'SystemOfRecordPartitionAssignmentSchema',
74
+ symbolKind: CodeSymbolKind.SCHEMA,
75
+ declarationKind: CodeDeclarationKind.ZOD_SCHEMA,
76
+ },
77
+ resourceFactory: {
78
+ packageName: '@wildo-ai/saas-models',
79
+ exportName: 'systemOfRecordPartitionAssignmentsResourceConfiguration_InitializationFactory',
80
+ symbolKind: CodeSymbolKind.FACTORY,
81
+ declarationKind: CodeDeclarationKind.FUNCTION,
82
+ },
83
+ resourceType: {
84
+ enumDeclaration: {
85
+ packageName: '@wildo-ai/saas-models',
86
+ exportName: 'CoreResourceType',
87
+ symbolKind: CodeSymbolKind.ENUM,
88
+ declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,
89
+ },
90
+ memberName: 'SYSTEM_OF_RECORD_PARTITION_ASSIGNMENTS',
91
+ },
92
+ operationVocabulary: {
93
+ coreEnum: {
94
+ packageName: '@wildo-ai/saas-models',
95
+ exportName: 'CoreResourceOperation',
96
+ symbolKind: CodeSymbolKind.ENUM,
97
+ declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,
98
+ },
99
+ customEnum: {
100
+ packageName: '@wildo-ai/saas-models',
101
+ exportName: 'SystemOfRecordPartitionAssignments_Operations',
102
+ symbolKind: CodeSymbolKind.ENUM,
103
+ declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,
104
+ },
105
+ },
106
+ notes: [
107
+ 'There is no public UPDATE. All three of `system`, `remoteKey` and `organizationUnitId` are `.excludeFromUpdate()`, which leaves an ordinary update with nothing to write — deliberately. An excluded-field write SUCCEEDS and persists nothing, so a plain UPDATE naming the unit would answer the caller as though it had worked; `reassign` exists so there is one writer, one contract, and one audit event.',
108
+ 'The foreign key to `organizationUnits` buys EXISTENCE only. No relationship factory validates scope compatibility, and an application-scoped row written by a super-administrator resolves an empty write tenant, so that the unit belongs to the OWNER organization and is ACTIVE is measured in the custom implementation through the system door.',
109
+ 'The lifecycle event is ONE type with a transition field — `SYSTEM_OF_RECORD_PARTITION_ASSIGNMENT_LIFECYCLE`, carrying `assigned` / `reassigned` / `unassigned`. Three event types would scatter one partition\'s timeline across three buckets, and the question an auditor asks ("who has been able to see the German company, and since when?") is answered by reading one bucket in order.',
110
+ 'All three write verbs are HIGH risk, which is inside the automatic audit floor, so a generic `RESOURCE_OPERATION_PERFORMED` row fires for each as well. What that row cannot carry — and the reason the dedicated event exists — is which unit, and on a move which unit it was before.',
111
+ 'The assignment map is read on EVERY confined read and is deliberately NOT cached. Measured 2026-09-18: the indexed lookup is 0.078-0.177 ms at twenty times the realistic row count, against a 1.02 ms floor for the remote call it precedes. A cache would save a tenth of a millisecond and would hold a SECURITY CONFINEMENT, so a stale entry would mean a member still reading a company they were unassigned from.',
112
+ ],
113
+ },
114
+ fields: {
115
+ _id: schemaShape._id.stringSpec({
116
+ meaning: 'Identifier for one partition-to-unit assignment.',
117
+ whyItMatters: 'The address of a reassignment, and the value every lifecycle event carries so one partition\'s whole history can be reassembled from the audit trail.',
118
+ semanticRole: 'identifier',
119
+ importance: FieldSemanticImportance.PRIMARY,
120
+ }),
121
+ applicationId: schemaShape.applicationId.foreignKeySpec({
122
+ meaning: 'The deployment this assignment configures.',
123
+ whyItMatters: 'The scope anchor. Optional in the schema and MANDATORY in meaning — declared mandatory the resource does not load at all on a Mongo-persisted deployment, so addressing is carried by the relationship\'s `isPrimaryScope` + `REQUIRES_CONTEXT` instead, which is what the URL builder actually reads.',
124
+ importance: FieldSemanticImportance.CONTEXTUAL,
125
+ }),
126
+ system: schemaShape.system.stringSpec({
127
+ meaning: 'Which declared system-of-record INSTANCE this partition lives in — a `systemsOfRecord.<name>` key.',
128
+ whyItMatters: 'Instance, never vendor, and the distinction is load-bearing: two Odoo deployments (`odoo-fr`, `odoo-de`) share one vendor facet and have entirely unrelated company ids. A key scoped to the vendor would let one deployment\'s company 10 resolve through the other\'s map.',
129
+ importance: FieldSemanticImportance.PRIMARY,
130
+ }),
131
+ remoteKey: schemaShape.remoteKey.stringSpec({
132
+ meaning: 'The partition\'s key exactly as the remote system spells it, in canonical text.',
133
+ whyItMatters: 'Stored as text across every vendor — Odoo\'s `company_id` is an integer, Dataverse\'s business unit is a GUID — and decoded through the facet\'s partition codec before it reaches a query compiler. One stored shape plus a codec beats a column per vendor; comparing the stored `\'10\'` against Odoo\'s integer `10` without decoding is exactly the defect the codec prevents.',
134
+ importance: FieldSemanticImportance.PRIMARY,
135
+ }),
136
+ organizationUnitId: schemaShape.organizationUnitId.foreignKeySpec({
137
+ meaning: 'The unit of the owner organization this partition belongs to.',
138
+ whyItMatters: 'The confinement itself. A member reaches this partition only through a role held at this unit or an ancestor of it; the read path maps a caller\'s effective unit set back through these rows into remote keys, which is the only shape a remote predicate can actually be written in.',
139
+ importance: FieldSemanticImportance.PRIMARY,
140
+ }),
141
+ justification: schemaShape.justification.stringSpec({
142
+ meaning: 'Why this remote partition belongs to this unit, in the operator\'s own words.',
143
+ whyItMatters: 'Required, and it carries real weight rather than ceremony: an assignment is an access decision with NO expiry — unlike a time-bound grant, it stands until someone changes it — and the next operator looking at "company 10 goes to Deutschland" has no other way to learn whether that reflects the corporate structure or somebody\'s guess during an incident.',
144
+ importance: FieldSemanticImportance.PRIMARY,
145
+ }),
146
+ assignedByUserId: schemaShape.assignedByUserId.foreignKeySpec({
147
+ meaning: 'The operator who last assigned or moved this partition.',
148
+ whyItMatters: 'Server-authored from the session, never client-supplied. An assignment attributed to somebody else is a false line in the privileged-access record, and the field is what joins a partition\'s reach to the person who decided it.',
149
+ }),
150
+ createdAt: schemaShape.createdAt.dateSpec({
151
+ meaning: 'When this partition was first assigned to a unit.',
152
+ whyItMatters: 'Survives a reassignment, because the row keeps its identity through a move — so it answers "since when has this company been mapped at all", while the lifecycle events answer "and to whom, when".',
153
+ }),
154
+ updatedAt: schemaShape.updatedAt.dateSpec({
155
+ meaning: 'When the assignment last changed.',
156
+ whyItMatters: 'Moves on a reassignment and nowhere else, since no other write can alter the row.',
157
+ }),
158
+ },
159
+ operations: {
160
+ [Op.READ]: {
161
+ purpose: 'Read one partition assignment.',
162
+ outcome: 'The unit a remote partition is mapped to, with the reason given for it.',
163
+ responseStatuses: [
164
+ { code: HttpResponseStatusCode.OK_200, meaning: 'The assignment is returned.' },
165
+ ],
166
+ errorScenarios: [
167
+ { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not a platform super-administrator.' },
168
+ { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No assignment with the supplied id exists.' },
169
+ ],
170
+ idempotent: true,
171
+ examples: [{
172
+ title: 'Read the German company\'s assignment',
173
+ request: { systemOfRecordPartitionAssignmentId: PARTITION_ASSIGNMENT_DE_ID },
174
+ response: germanCompanyAssignmentExample,
175
+ forStatus: HttpResponseStatusCode.OK_200,
176
+ }],
177
+ },
178
+ [Op.LIST]: {
179
+ purpose: 'List partition assignments — the map an operator works from.',
180
+ outcome: 'A page of assignments, filterable by instance, remote key or unit.',
181
+ responseStatuses: [
182
+ { code: HttpResponseStatusCode.OK_200, meaning: 'A page of assignments is returned.' },
183
+ ],
184
+ errorScenarios: [
185
+ { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not a platform super-administrator.' },
186
+ ],
187
+ idempotent: true,
188
+ examples: [{
189
+ title: 'The whole map for one Odoo instance',
190
+ request: { system: 'odoo', page: 1, limit: 20 },
191
+ response: { data: [germanCompanyAssignmentExample, spanishCompanyAssignmentExample], total: 2, page: 1, limit: 20 },
192
+ forStatus: HttpResponseStatusCode.OK_200,
193
+ }],
194
+ },
195
+ [Op.COUNT]: {
196
+ purpose: 'Count partition assignments matching a filter.',
197
+ outcome: 'A number — how many remote partitions of an instance are mapped, or how many point at one unit.',
198
+ responseStatuses: [
199
+ { code: HttpResponseStatusCode.OK_200, meaning: 'The count is returned.' },
200
+ ],
201
+ errorScenarios: [
202
+ { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not a platform super-administrator.' },
203
+ ],
204
+ idempotent: true,
205
+ examples: [{
206
+ title: 'How many companies are mapped to the Deutschland unit',
207
+ request: { organizationUnitId: PARTITION_UNIT_DE_ID },
208
+ response: { count: 1 },
209
+ forStatus: HttpResponseStatusCode.OK_200,
210
+ }],
211
+ },
212
+ [Op.CREATE]: {
213
+ purpose: 'Assign a remote partition to an organization unit.',
214
+ outcome: 'The partition becomes readable by members of that unit — and, through downward inheritance, by members holding a role at an ancestor of it. Until a partition is assigned it is readable by nobody.',
215
+ whenToUse: 'A new company, subsidiary or business unit appears in the system of record and its rows must reach the part of the org chart that owns them.',
216
+ importance: FieldSemanticImportance.PRIMARY,
217
+ responseStatuses: [
218
+ { code: HttpResponseStatusCode.CREATED_201, meaning: 'The partition is now mapped to the unit.' },
219
+ ],
220
+ errorScenarios: [
221
+ { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The justification is missing or empty. It is required because an assignment has no expiry and the reason is all a later operator has to go on.', errorCode: 'VALIDATION_FAILED' },
222
+ { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The named unit does not exist, or belongs to an organization other than the owner. The refusal does not say which — an assignment payload must not become a way to probe another tenant\'s org chart.', errorCode: 'VALIDATION_FAILED' },
223
+ { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The named unit exists and is not ACTIVE. A separate refusal from the one above, because the remedy differs: activate the unit rather than pick another.', errorCode: 'VALIDATION_FAILED' },
224
+ { code: HttpResponseStatusCode.CONFLICT_409, when: 'This instance and remote key are already assigned. One remote partition maps to at most one unit, and the pair is a persisted business key.' },
225
+ { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not a platform super-administrator. A tenant administrator can never assign a partition — one who could would assign their own unit to a company they were never meant to see.' },
226
+ ],
227
+ idempotent: false,
228
+ examples: [{
229
+ title: 'Map Odoo company 10 to the Deutschland unit',
230
+ request: {
231
+ system: 'odoo',
232
+ remoteKey: '10',
233
+ organizationUnitId: PARTITION_UNIT_DE_ID,
234
+ justification: 'Odoo company 10 is Acme Deutschland GmbH; its ledger belongs to the Deutschland unit.',
235
+ },
236
+ response: germanCompanyAssignmentExample,
237
+ forStatus: HttpResponseStatusCode.CREATED_201,
238
+ }],
239
+ },
240
+ [Op.DELETE]: {
241
+ purpose: 'Unassign a remote partition.',
242
+ outcome: 'The partition becomes unreachable to EVERY caller. The read path pushes down the set of assigned keys, so a key with no assignment is in nobody\'s predicate.',
243
+ whenToUse: 'A company leaves the group, or an assignment was made to the wrong instance and must be withdrawn rather than moved.',
244
+ responseStatuses: [
245
+ { code: HttpResponseStatusCode.NO_CONTENT_204, meaning: 'The assignment was removed.' },
246
+ ],
247
+ errorScenarios: [
248
+ { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not a platform super-administrator.' },
249
+ { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No assignment with the supplied id exists.' },
250
+ ],
251
+ idempotent: false,
252
+ examples: [{
253
+ title: 'Withdraw the German company',
254
+ request: { systemOfRecordPartitionAssignmentId: PARTITION_ASSIGNMENT_DE_ID },
255
+ response: {},
256
+ forStatus: HttpResponseStatusCode.NO_CONTENT_204,
257
+ }],
258
+ },
259
+ [SystemOfRecordPartitionAssignments_Operations.REASSIGN]: {
260
+ operationId: SystemOfRecordPartitionAssignments_Operations.REASSIGN,
261
+ purpose: 'Move an assigned partition to a different unit, under a compare-and-swap on the unit it is leaving.',
262
+ outcome: 'The partition\'s rows become readable by the new unit and stop being readable by the old one. The row keeps its identity, so its `createdAt` provenance and its audit timeline survive the move.',
263
+ whenToUse: 'The corporate structure changes — a subsidiary moves between divisions, or an assignment was made to the wrong unit.',
264
+ importance: FieldSemanticImportance.PRIMARY,
265
+ responseStatuses: [
266
+ { code: HttpResponseStatusCode.OK_200, meaning: 'The partition now belongs to the named unit, and the updated assignment is returned.' },
267
+ ],
268
+ errorScenarios: [
269
+ { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The target unit does not exist, belongs to another organization, or is not ACTIVE.', errorCode: 'VALIDATION_FAILED' },
270
+ { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not a platform super-administrator.' },
271
+ { code: HttpResponseStatusCode.CONFLICT_409, when: '`expectedCurrentOrganizationUnitId` does not match the unit the partition currently belongs to — another administrator moved it first. A conflict rather than a not-found: the caller IS authorized and the payload IS valid; what refused is the current state.' },
272
+ ],
273
+ idempotent: false,
274
+ examples: [{
275
+ title: 'Move the German company to the Iberia unit after a reorganization',
276
+ request: {
277
+ systemOfRecordPartitionAssignmentId: PARTITION_ASSIGNMENT_DE_ID,
278
+ organizationUnitId: PARTITION_UNIT_ES_ID,
279
+ expectedCurrentOrganizationUnitId: PARTITION_UNIT_DE_ID,
280
+ justification: 'Acme Deutschland now reports into the Iberia division after the 2026 reorganization.',
281
+ },
282
+ response: { ...germanCompanyAssignmentExample, organizationUnitId: PARTITION_UNIT_ES_ID, updatedAt: '2026-09-18T11:00:00.000Z' },
283
+ forStatus: HttpResponseStatusCode.OK_200,
284
+ }],
285
+ },
286
+ },
287
+ }),
288
+ // The scope is an OPTION, not a config field — `resourceSpecification` cross-checks it against the
289
+ // scope the registry derives from the `isPrimaryScope: true` relationship, and throws at MODULE
290
+ // LOAD when neither signal is supplied. Authoring it inside the returned config instead reaches
291
+ // that throw with `options` undefined, which is how this was caught.
292
+ { resourcePrimaryScope: ResourcePrimaryScope.APPLICATION });
293
+ //# sourceMappingURL=system-of-record-partition-assignments.resource.specification.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"system-of-record-partition-assignments.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/infrastructure/resources/system-of-record-partition-assignments.resource.specification.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;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,oBAAoB,EACpB,uCAAuC,EACvC,6CAA6C,EAC7C,6EAA6E,GAC9E,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAC5F,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAE3E,MAAM,0BAA0B,GAAG,kEAAkE,CAAC;AACtG,MAAM,0BAA0B,GAAG,kEAAkE,CAAC;AACtG,MAAM,oBAAoB,GAAG,8CAA8C,CAAC;AAC5E,MAAM,oBAAoB,GAAG,8CAA8C,CAAC;AAC5E,MAAM,0BAA0B,GAAG,iCAAiC,CAAC;AACrE,MAAM,gCAAgC,GAAG,gCAAgC,CAAC;AAE1E,MAAM,8BAA8B,GAAG;IACrC,GAAG,EAAE,0BAA0B;IAC/B,aAAa,EAAE,gCAAgC;IAC/C,MAAM,EAAE,MAAM;IACd,SAAS,EAA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AS,EAAE,sBAAsB,CAAC,MAAM;iBACzC,CAAC;SACH;KACF;CACF,CAAC;AACF,mGAAmG;AACnG,gGAAgG;AAChG,gGAAgG;AAChG,qEAAqE;AACrE,EAAE,oBAAoB,EAAE,oBAAoB,CAAC,WAAW,EAAE,CAC3D,CAAC","sourcesContent":["/**\n * Resource: `systemOfRecordPartitionAssignments` — Wildo SaaS engine specification (backend-only, application-scoped).\n *\n * Inputs:\n * - Schema: engine/saas-models/src/systems-of-record/system-of-record-partition-assignments.shared.schemas.ts\n * → `SystemOfRecordPartitionAssignmentSchema`\n * - Factory: engine/saas-models/src/systems-of-record/system-of-record-partition-assignments.shared.resources-config.schemas.ts\n * → `systemOfRecordPartitionAssignmentsResourceConfiguration_InitializationFactory`\n * - Custom operations: `SystemOfRecordPartitionAssignments_Operations`\n *\n * ## What this resource is for\n *\n * A system of record — the operator's own Odoo, SAP, NetSuite or Dynamics deployment — holds several\n * PARTITIONS inside one corporate. Every row Wildo reads out of one is stamped with the application's\n * OWNER organization, so without this resource every member of that organization sees every partition:\n * the Spanish subsidiary's accountant reads the German company's invoices.\n *\n * The mechanism that confines members WITHIN one organization already exists — organization unit\n * narrowing. What it lacked was the edge from a remote partition key to a Wildo unit, and each row\n * here IS one such edge.\n *\n * ## Why APPLICATION scope, when every row names a unit of the owner organization\n *\n * Because assigning a partition is an OPERATOR act on the deployment's own configuration, not an act\n * inside a customer's tenant. An operator door on an ORGANIZATIONS-scoped resource would require a\n * cross-tenant declaration on every verb and a platform access grant per crossing — the ceremony for\n * reaching into a CUSTOMER's data, which this is not. The scope is expressed once, in the registry\n * relationship APPLICATION → SYSTEM_OF_RECORD_PARTITION_ASSIGNMENTS carrying `isPrimaryScope: true`;\n * the runtime config deliberately does not restate it.\n *\n * Why backend-only: there is NO entry for `[CoreResourceType.SYSTEM_OF_RECORD_PARTITION_ASSIGNMENTS]`\n * in any preset under engine/presets-components/src/config/resources/. The operator-facing partition\n * map is not built yet; today the resource is consumed by the read confinement and by the platform API.\n */\n\nimport { LabelAudience } from '@wildo-ai/presets-components-models';\nimport {\n CodeDeclarationKind,\n CodeSymbolKind,\n FieldSemanticImportance,\n} from '@wildo-ai/zod-decorators';\nimport {\n CoreResourceOperation as Op,\n ResourcePrimaryScope,\n SystemOfRecordPartitionAssignmentSchema,\n SystemOfRecordPartitionAssignments_Operations,\n systemOfRecordPartitionAssignmentsResourceConfiguration_InitializationFactory,\n} from '@wildo-ai/saas-models';\nimport { HttpResponseStatusCode, resourceSpecification } from '~wildo-specifications/_core';\nimport { EngineResourceSubDomain } from '../../engine-resource-sub-domain';\n\nconst PARTITION_ASSIGNMENT_DE_ID = 'system_of_record_partition_assignment_01J6R3A4B5C6D7E8F9G0H1J2KL';\nconst PARTITION_ASSIGNMENT_ES_ID = 'system_of_record_partition_assignment_01J6R3C5D6E7F8G9H0J1K2L3MN';\nconst PARTITION_UNIT_DE_ID = 'organization_unit_01J6R3E6F7G8H9J0K1L2M3N4PQ';\nconst PARTITION_UNIT_ES_ID = 'organization_unit_01J6R3G7H8J9K0L1M2N3P4Q5RS';\nconst PARTITION_OPERATOR_USER_ID = 'user_01J6R3J8K9L0M1N2P3Q4R5S6TU';\nconst PARTITION_EXAMPLE_APPLICATION_ID = 'app_01J6R3L9M0N1P2Q3R4S5T6U7VW';\n\nconst germanCompanyAssignmentExample = {\n _id: PARTITION_ASSIGNMENT_DE_ID,\n applicationId: PARTITION_EXAMPLE_APPLICATION_ID,\n system: 'odoo',\n remoteKey: '10',\n organizationUnitId: PARTITION_UNIT_DE_ID,\n justification: 'Odoo company 10 is Acme Deutschland GmbH; its ledger belongs to the Deutschland unit.',\n assignedByUserId: PARTITION_OPERATOR_USER_ID,\n createdAt: '2026-09-18T09:00:00.000Z',\n updatedAt: '2026-09-18T09:00:00.000Z',\n};\n\nconst spanishCompanyAssignmentExample = {\n ...germanCompanyAssignmentExample,\n _id: PARTITION_ASSIGNMENT_ES_ID,\n remoteKey: '14',\n organizationUnitId: PARTITION_UNIT_ES_ID,\n justification: 'Odoo company 14 is Acme Iberia S.L.; its ledger belongs to the Iberia unit.',\n};\n\nexport const systemOfRecordPartitionAssignmentsResourceSpecification = resourceSpecification(\n systemOfRecordPartitionAssignmentsResourceConfiguration_InitializationFactory,\n SystemOfRecordPartitionAssignmentSchema,\n ({ schemaShape }) => ({\n purpose: 'Record which organization unit each remote partition of a system of record belongs to, so that members of a unit read that unit\\'s company and no other.',\n businessRole: 'The deployment\\'s partition map. It answers which remote company corresponds to which part of the org chart, who decided that, and why.',\n lifecycleRole: 'A platform administrator assigns a remote partition to a unit, stating a reason. A partition may later be MOVED to a different unit through `reassign`, which names the unit it is expected to be leaving and refuses if another administrator has already moved it. Removing the assignment makes the partition unreachable to every caller — it is not a narrowing, it withdraws a company from the product.',\n audience: LabelAudience.ADMIN,\n subDomain: EngineResourceSubDomain.INFRASTRUCTURE,\n\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'SystemOfRecordPartitionAssignmentSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactory: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'systemOfRecordPartitionAssignmentsResourceConfiguration_InitializationFactory',\n symbolKind: CodeSymbolKind.FACTORY,\n declarationKind: CodeDeclarationKind.FUNCTION,\n },\n resourceType: {\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceType',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n memberName: 'SYSTEM_OF_RECORD_PARTITION_ASSIGNMENTS',\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: 'SystemOfRecordPartitionAssignments_Operations',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n notes: [\n 'There is no public UPDATE. All three of `system`, `remoteKey` and `organizationUnitId` are `.excludeFromUpdate()`, which leaves an ordinary update with nothing to write — deliberately. An excluded-field write SUCCEEDS and persists nothing, so a plain UPDATE naming the unit would answer the caller as though it had worked; `reassign` exists so there is one writer, one contract, and one audit event.',\n 'The foreign key to `organizationUnits` buys EXISTENCE only. No relationship factory validates scope compatibility, and an application-scoped row written by a super-administrator resolves an empty write tenant, so that the unit belongs to the OWNER organization and is ACTIVE is measured in the custom implementation through the system door.',\n 'The lifecycle event is ONE type with a transition field — `SYSTEM_OF_RECORD_PARTITION_ASSIGNMENT_LIFECYCLE`, carrying `assigned` / `reassigned` / `unassigned`. Three event types would scatter one partition\\'s timeline across three buckets, and the question an auditor asks (\"who has been able to see the German company, and since when?\") is answered by reading one bucket in order.',\n 'All three write verbs are HIGH risk, which is inside the automatic audit floor, so a generic `RESOURCE_OPERATION_PERFORMED` row fires for each as well. What that row cannot carry — and the reason the dedicated event exists — is which unit, and on a move which unit it was before.',\n 'The assignment map is read on EVERY confined read and is deliberately NOT cached. Measured 2026-09-18: the indexed lookup is 0.078-0.177 ms at twenty times the realistic row count, against a 1.02 ms floor for the remote call it precedes. A cache would save a tenth of a millisecond and would hold a SECURITY CONFINEMENT, so a stale entry would mean a member still reading a company they were unassigned from.',\n ],\n },\n\n fields: {\n _id: schemaShape._id.stringSpec({\n meaning: 'Identifier for one partition-to-unit assignment.',\n whyItMatters: 'The address of a reassignment, and the value every lifecycle event carries so one partition\\'s whole history can be reassembled from the audit trail.',\n semanticRole: 'identifier',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n applicationId: schemaShape.applicationId.foreignKeySpec({\n meaning: 'The deployment this assignment configures.',\n whyItMatters: 'The scope anchor. Optional in the schema and MANDATORY in meaning — declared mandatory the resource does not load at all on a Mongo-persisted deployment, so addressing is carried by the relationship\\'s `isPrimaryScope` + `REQUIRES_CONTEXT` instead, which is what the URL builder actually reads.',\n importance: FieldSemanticImportance.CONTEXTUAL,\n }),\n system: schemaShape.system.stringSpec({\n meaning: 'Which declared system-of-record INSTANCE this partition lives in — a `systemsOfRecord.<name>` key.',\n whyItMatters: 'Instance, never vendor, and the distinction is load-bearing: two Odoo deployments (`odoo-fr`, `odoo-de`) share one vendor facet and have entirely unrelated company ids. A key scoped to the vendor would let one deployment\\'s company 10 resolve through the other\\'s map.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n remoteKey: schemaShape.remoteKey.stringSpec({\n meaning: 'The partition\\'s key exactly as the remote system spells it, in canonical text.',\n whyItMatters: 'Stored as text across every vendor — Odoo\\'s `company_id` is an integer, Dataverse\\'s business unit is a GUID — and decoded through the facet\\'s partition codec before it reaches a query compiler. One stored shape plus a codec beats a column per vendor; comparing the stored `\\'10\\'` against Odoo\\'s integer `10` without decoding is exactly the defect the codec prevents.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n organizationUnitId: schemaShape.organizationUnitId.foreignKeySpec({\n meaning: 'The unit of the owner organization this partition belongs to.',\n whyItMatters: 'The confinement itself. A member reaches this partition only through a role held at this unit or an ancestor of it; the read path maps a caller\\'s effective unit set back through these rows into remote keys, which is the only shape a remote predicate can actually be written in.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n justification: schemaShape.justification.stringSpec({\n meaning: 'Why this remote partition belongs to this unit, in the operator\\'s own words.',\n whyItMatters: 'Required, and it carries real weight rather than ceremony: an assignment is an access decision with NO expiry — unlike a time-bound grant, it stands until someone changes it — and the next operator looking at \"company 10 goes to Deutschland\" has no other way to learn whether that reflects the corporate structure or somebody\\'s guess during an incident.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n assignedByUserId: schemaShape.assignedByUserId.foreignKeySpec({\n meaning: 'The operator who last assigned or moved this partition.',\n whyItMatters: 'Server-authored from the session, never client-supplied. An assignment attributed to somebody else is a false line in the privileged-access record, and the field is what joins a partition\\'s reach to the person who decided it.',\n }),\n createdAt: schemaShape.createdAt.dateSpec({\n meaning: 'When this partition was first assigned to a unit.',\n whyItMatters: 'Survives a reassignment, because the row keeps its identity through a move — so it answers \"since when has this company been mapped at all\", while the lifecycle events answer \"and to whom, when\".',\n }),\n updatedAt: schemaShape.updatedAt.dateSpec({\n meaning: 'When the assignment last changed.',\n whyItMatters: 'Moves on a reassignment and nowhere else, since no other write can alter the row.',\n }),\n },\n\n operations: {\n [Op.READ]: {\n purpose: 'Read one partition assignment.',\n outcome: 'The unit a remote partition is mapped to, with the reason given for it.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The assignment is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not a platform super-administrator.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No assignment with the supplied id exists.' },\n ],\n idempotent: true,\n examples: [{\n title: 'Read the German company\\'s assignment',\n request: { systemOfRecordPartitionAssignmentId: PARTITION_ASSIGNMENT_DE_ID },\n response: germanCompanyAssignmentExample,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n [Op.LIST]: {\n purpose: 'List partition assignments — the map an operator works from.',\n outcome: 'A page of assignments, filterable by instance, remote key or unit.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A page of assignments is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not a platform super-administrator.' },\n ],\n idempotent: true,\n examples: [{\n title: 'The whole map for one Odoo instance',\n request: { system: 'odoo', page: 1, limit: 20 },\n response: { data: [germanCompanyAssignmentExample, spanishCompanyAssignmentExample], total: 2, page: 1, limit: 20 },\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n [Op.COUNT]: {\n purpose: 'Count partition assignments matching a filter.',\n outcome: 'A number — how many remote partitions of an instance are mapped, or how many point at one unit.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The count is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not a platform super-administrator.' },\n ],\n idempotent: true,\n examples: [{\n title: 'How many companies are mapped to the Deutschland unit',\n request: { organizationUnitId: PARTITION_UNIT_DE_ID },\n response: { count: 1 },\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n [Op.CREATE]: {\n purpose: 'Assign a remote partition to an organization unit.',\n outcome: 'The partition becomes readable by members of that unit — and, through downward inheritance, by members holding a role at an ancestor of it. Until a partition is assigned it is readable by nobody.',\n whenToUse: 'A new company, subsidiary or business unit appears in the system of record and its rows must reach the part of the org chart that owns them.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'The partition is now mapped to the unit.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The justification is missing or empty. It is required because an assignment has no expiry and the reason is all a later operator has to go on.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The named unit does not exist, or belongs to an organization other than the owner. The refusal does not say which — an assignment payload must not become a way to probe another tenant\\'s org chart.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The named unit exists and is not ACTIVE. A separate refusal from the one above, because the remedy differs: activate the unit rather than pick another.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'This instance and remote key are already assigned. One remote partition maps to at most one unit, and the pair is a persisted business key.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not a platform super-administrator. A tenant administrator can never assign a partition — one who could would assign their own unit to a company they were never meant to see.' },\n ],\n idempotent: false,\n examples: [{\n title: 'Map Odoo company 10 to the Deutschland unit',\n request: {\n system: 'odoo',\n remoteKey: '10',\n organizationUnitId: PARTITION_UNIT_DE_ID,\n justification: 'Odoo company 10 is Acme Deutschland GmbH; its ledger belongs to the Deutschland unit.',\n },\n response: germanCompanyAssignmentExample,\n forStatus: HttpResponseStatusCode.CREATED_201,\n }],\n },\n [Op.DELETE]: {\n purpose: 'Unassign a remote partition.',\n outcome: 'The partition becomes unreachable to EVERY caller. The read path pushes down the set of assigned keys, so a key with no assignment is in nobody\\'s predicate.',\n whenToUse: 'A company leaves the group, or an assignment was made to the wrong instance and must be withdrawn rather than moved.',\n responseStatuses: [\n { code: HttpResponseStatusCode.NO_CONTENT_204, meaning: 'The assignment was removed.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not a platform super-administrator.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No assignment with the supplied id exists.' },\n ],\n idempotent: false,\n examples: [{\n title: 'Withdraw the German company',\n request: { systemOfRecordPartitionAssignmentId: PARTITION_ASSIGNMENT_DE_ID },\n response: {},\n forStatus: HttpResponseStatusCode.NO_CONTENT_204,\n }],\n },\n [SystemOfRecordPartitionAssignments_Operations.REASSIGN]: {\n operationId: SystemOfRecordPartitionAssignments_Operations.REASSIGN,\n purpose: 'Move an assigned partition to a different unit, under a compare-and-swap on the unit it is leaving.',\n outcome: 'The partition\\'s rows become readable by the new unit and stop being readable by the old one. The row keeps its identity, so its `createdAt` provenance and its audit timeline survive the move.',\n whenToUse: 'The corporate structure changes — a subsidiary moves between divisions, or an assignment was made to the wrong unit.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The partition now belongs to the named unit, and the updated assignment is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The target unit does not exist, belongs to another organization, or is not ACTIVE.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not a platform super-administrator.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: '`expectedCurrentOrganizationUnitId` does not match the unit the partition currently belongs to — another administrator moved it first. A conflict rather than a not-found: the caller IS authorized and the payload IS valid; what refused is the current state.' },\n ],\n idempotent: false,\n examples: [{\n title: 'Move the German company to the Iberia unit after a reorganization',\n request: {\n systemOfRecordPartitionAssignmentId: PARTITION_ASSIGNMENT_DE_ID,\n organizationUnitId: PARTITION_UNIT_ES_ID,\n expectedCurrentOrganizationUnitId: PARTITION_UNIT_DE_ID,\n justification: 'Acme Deutschland now reports into the Iberia division after the 2026 reorganization.',\n },\n response: { ...germanCompanyAssignmentExample, organizationUnitId: PARTITION_UNIT_ES_ID, updatedAt: '2026-09-18T11:00:00.000Z' },\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n }),\n // The scope is an OPTION, not a config field — `resourceSpecification` cross-checks it against the\n // scope the registry derives from the `isPrimaryScope: true` relationship, and throws at MODULE\n // LOAD when neither signal is supplied. Authoring it inside the returned config instead reaches\n // that throw with `options` undefined, which is how this was caught.\n { resourcePrimaryScope: ResourcePrimaryScope.APPLICATION },\n);\n"]}
@@ -68,7 +68,7 @@ function buildM2mWebhookDeliveryLogSpecification(resourceType, memberName) {
68
68
  pagination: { page: 1, limit: 20, total: 1, totalPages: 1 },
69
69
  };
70
70
  return resourceSpecification(m2mWebhookDeliveryLogPolymorphicFactories[resourceType], M2MWebhookDeliveryLogBaseSchema, ({ schemaShape }) => ({
71
- purpose: 'Persist every outbound M2M webhook POST (queue entry, delivery status, HTTP evidence, and signing metadata) for org- or app-scoped admin review and retry.',
71
+ purpose: 'Persist one record per outbound endpoint delivery (queue entry, attempt count, latest HTTP evidence, and signing metadata) for org- or app-scoped admin review and retry.',
72
72
  businessRole: 'The user-visible event log and the worker’s durable queue for asynchronous webhook delivery — one row per (scope × target endpoint × fire).',
73
73
  lifecycleRole: 'Rows move PENDING → IN_FLIGHT → DELIVERED, or PENDING/IN_FLIGHT → FAILED, with `attemptCount` and `nextAttemptAt` governing back-off; RETRY and PURGE_OLD custom ops re-queue or clean history.',
74
74
  audience: LabelAudience.DEVELOPER,
@@ -152,7 +152,7 @@ function buildM2mWebhookDeliveryLogSpecification(resourceType, memberName) {
152
152
  meaning: 'Optional default vs named operation variant, when the originating op exposed multiple API variants.',
153
153
  }),
154
154
  httpUrl: schemaShape.httpUrl.stringSpec({
155
- meaning: 'Snapshot of the destination URL that was used for this attempt (duplicated from the config so URL edits do not rewrite history).',
155
+ meaning: 'Snapshot of the destination URL captured when this delivery was queued (duplicated from the config so URL edits do not rewrite history).',
156
156
  importance: FieldSemanticImportance.PRIMARY,
157
157
  semanticRole: 'uri',
158
158
  }),
@@ -172,7 +172,7 @@ function buildM2mWebhookDeliveryLogSpecification(resourceType, memberName) {
172
172
  values: {
173
173
  [M2MWebhookDeliveryLogStatus.PENDING]: { meaning: 'Record is either waiting in the queue or has been re-queued for another attempt after a transient failure.' },
174
174
  [M2MWebhookDeliveryLogStatus.IN_FLIGHT]: { meaning: 'A worker currently holds a lease and is trying to send the HTTP request.' },
175
- [M2MWebhookDeliveryLogStatus.DELIVERED]: { meaning: 'HTTP success path with signature validated at the consumer; terminal success.' },
175
+ [M2MWebhookDeliveryLogStatus.DELIVERED]: { meaning: 'The consumer returned a 2xx acknowledgement; terminal delivery success. This does not establish whether the consumer verified the signature or completed downstream processing.' },
176
176
  [M2MWebhookDeliveryLogStatus.FAILED]: { meaning: 'Terminal failure: exhausted attempt budget or a non-retryable 4xx class error.' },
177
177
  },
178
178
  }),
@@ -185,7 +185,7 @@ function buildM2mWebhookDeliveryLogSpecification(resourceType, memberName) {
185
185
  temporalRole: 'occurred',
186
186
  }),
187
187
  nextAttemptAt: schemaShape.nextAttemptAt.dateSpec({
188
- meaning: 'When the next retry is eligible; indexed for the worker’s polling query on `(status, nextAttemptAt)`.',
188
+ meaning: 'When a PENDING delivery becomes eligible for retry; indexed with status for worker polling. Terminal rows can retain an earlier value, which does not schedule another attempt.',
189
189
  temporalRole: 'scheduled',
190
190
  }),
191
191
  responseStatus: schemaShape.responseStatus.numberSpec({
@@ -198,7 +198,7 @@ function buildM2mWebhookDeliveryLogSpecification(resourceType, memberName) {
198
198
  meaning: 'Human-readable last error string when `status=failed` (worker-set).',
199
199
  }),
200
200
  signatureJti: schemaShape.signatureJti.stringSpec({
201
- meaning: 'Matches the JWT `jti` and `X-Webhook-Signature` header so the consumer can look up the exact signing key material.',
201
+ meaning: 'Stable delivery identity carried in the JWT `jti` claim inside `x-wildo-webhook-signature`. The receiver uses it to deduplicate retries; it is not a signing-key identifier.',
202
202
  importance: FieldSemanticImportance.PRIMARY,
203
203
  }),
204
204
  deliveredAt: schemaShape.deliveredAt.dateSpec({
@@ -1 +1 @@
1
- {"version":3,"file":"m2m-webhook-delivery-log.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/notifications/resources/m2m-webhook-delivery-log.resource.specification.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,0BAA0B,EAC1B,qBAAqB,IAAI,EAAE,EAC3B,gBAAgB,EAChB,gCAAgC,EAChC,+BAA+B,EAC/B,2BAA2B,EAC3B,oBAAoB,EACpB,yCAAyC,GAC1C,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAoC,MAAM,6BAA6B,CAAC;AAC9H,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAU3E,MAAM,kCAAkC,GAA6D;IACnG,CAAC,gBAAgB,CAAC,qCAAqC,CAAC,EAAE,oBAAoB,CAAC,aAAa;IAC5F,CAAC,gBAAgB,CAAC,oCAAoC,CAAC,EAAE,oBAAoB,CAAC,WAAW;CAC1F,CAAC;AAgBF,SAAS,uCAAuC,CAC9C,YAAwC,EACxC,UAA4C;IAE5C,MAAM,mBAAmB,GAAG,YAAY,KAAK,g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T,KAAK,EAAE,oDAAoD;wBAC3D,OAAO,EAAE,EAAE,aAAa,EAAE,EAAE,EAAE;wBAC9B,QAAQ,EAAE;4BACR,WAAW,EAAE,EAAE;4BACf,OAAO,EAAE,qEAAqE;yBAC/E;wBACD,SAAS,EAAE,sBAAsB,CAAC,MAAM;qBACzC,CAAC;aACH;SACF;QACD,mBAAmB,EAAE;YACnB,sQAAsQ;YACtQ,iJAAiJ;YACjJ,qKAAqK;SACtK;KACF,CAAC,EACF,EAAE,oBAAoB,EAAE,kCAAkC,CAAC,YAAY,CAAC,EAAE,CAC3E,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,sDAAsD,GAAG,uCAAuC,CAC3G,gBAAgB,CAAC,qCAAqC,EACtD,uCAAuC,CACxC,CAAC;AAEF,MAAM,CAAC,MAAM,qDAAqD,GAAG,uCAAuC,CAC1G,gBAAgB,CAAC,oCAAoC,EACrD,sCAAsC,CACvC,CAAC","sourcesContent":["/**\n * Resources: `organizationM2mWebhookDeliveryLog` + `applicationM2mWebhookDeliveryLog` — Wildo SaaS engine specification (backend-only).\n *\n * Polymorphic ORG + APP pair sharing `M2MWebhookDeliveryLogBaseSchema` and `m2mWebhookDeliveryLogPolymorphicFactories`.\n *\n * Inputs:\n * - Base schema: `M2MWebhookDeliveryLogBaseSchema` (`m2m-webhook-delivery-log.shared.schemas.ts`)\n * - Polymorphic factories: `m2mWebhookDeliveryLogPolymorphicFactories` (`m2m-webhook-delivery-log.shared.resources-config.schemas.ts`)\n * - Custom operations: `M2MWebhookDeliveryLog_Operations` (`retry`, `purgeOld`)\n * - UI presets: `webhooksMainPresets` / `webhooksAdminPresets`\n * (engine/presets-components/src/config/resources/webhooks.resource-presets.tsx) —\n * layout-less auto-render surfaced in the org Settings Hub `webhooks` section\n * (Delivery log sub-tab), dashboard-style via generic collection capabilities:\n * status quick-filter tab strip (`collectionDisplayConfig.quickFilterField`)\n * + day-bucket date headings (`temporalGroupField: 'createdAt'`) on LIST,\n * EMBEDDED READ (row click → companion drawer; opaque `payload` renders as\n * pretty JSON), `retry` / `purgeOld` actions, status badge.\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 CoreM2MNotificationChannel,\n CoreResourceOperation as Op,\n CoreResourceType,\n M2MWebhookDeliveryLog_Operations,\n M2MWebhookDeliveryLogBaseSchema,\n M2MWebhookDeliveryLogStatus,\n ResourcePrimaryScope,\n m2mWebhookDeliveryLogPolymorphicFactories,\n} from '@wildo-ai/saas-models';\nimport { HttpResponseStatusCode, resourceSpecification, type ResourceSpecificationConfig } from '~wildo-specifications/_core';\nimport { EngineResourceSubDomain } from '../../engine-resource-sub-domain';\n\ntype M2mDeliveryLogResourceType =\n | CoreResourceType.ORGANIZATION_M2M_WEBHOOK_DELIVERY_LOG\n | CoreResourceType.APPLICATION_M2M_WEBHOOK_DELIVERY_LOG;\n\ntype M2mDeliveryLogResourceTypeMember =\n | 'ORGANIZATION_M2M_WEBHOOK_DELIVERY_LOG'\n | 'APPLICATION_M2M_WEBHOOK_DELIVERY_LOG';\n\nconst m2mDeliveryLogResourcePrimaryScope: Record<M2mDeliveryLogResourceType, ResourcePrimaryScope> = {\n [CoreResourceType.ORGANIZATION_M2M_WEBHOOK_DELIVERY_LOG]: ResourcePrimaryScope.ORGANIZATIONS,\n [CoreResourceType.APPLICATION_M2M_WEBHOOK_DELIVERY_LOG]: ResourcePrimaryScope.APPLICATION,\n};\n\ntype M2mDeliveryFactoryCfg = ReturnType<\n (typeof m2mWebhookDeliveryLogPolymorphicFactories)[CoreResourceType.ORGANIZATION_M2M_WEBHOOK_DELIVERY_LOG]\n>;\ntype M2mDeliveryCustomOp = NonNullable<M2mDeliveryFactoryCfg['customOperation']>;\ntype M2mDeliveryCoreOp =\n | Op.READ\n | Op.LIST\n | Op.SEARCH\n | Op.CREATE\n | Op.UPDATE\n | Op.DELETE\n | Op.DELETE_MANY;\ntype M2mDeliveryMain = typeof M2MWebhookDeliveryLogBaseSchema;\n\nfunction buildM2mWebhookDeliveryLogSpecification(\n resourceType: M2mDeliveryLogResourceType,\n memberName: M2mDeliveryLogResourceTypeMember,\n): ResourceSpecificationConfig<M2mDeliveryCustomOp, M2mDeliveryCoreOp, M2mDeliveryMain> {\n const isOrganizationScope = resourceType === CoreResourceType.ORGANIZATION_M2M_WEBHOOK_DELIVERY_LOG;\n const scopeIdentity = isOrganizationScope\n ? { organizationId: 'org_01JEXAMPLE' }\n : { applicationId: 'app_01JEXAMPLE' };\n const channel = isOrganizationScope\n ? CoreM2MNotificationChannel.WEBHOOK_ORGANIZATION\n : CoreM2MNotificationChannel.WEBHOOK_APPLICATION;\n const deliveryIdentity = {\n _id: 'delivery_01JEXAMPLE',\n endpointId: 'orders-primary',\n channel,\n resourceIdentifier: 'orders',\n operationIdentifier: 'create',\n httpUrl: 'https://partners.example.com/webhooks/orders',\n payloadHash: '31da863f127a6c22b91b5cc85081c382b02039a9c8c4b30db2cc3172de31d2d8',\n payload: { event: 'order.created', orderId: 'order_01JEXAMPLE' },\n signatureJti: 'webhook-signature-01JEXAMPLE',\n createdAt: '2026-08-18T09:30:00.000Z',\n updatedAt: '2026-08-18T09:32:12.000Z',\n ...scopeIdentity,\n } as const;\n const failedDeliveryExample = {\n ...deliveryIdentity,\n status: M2MWebhookDeliveryLogStatus.FAILED,\n attemptCount: 5,\n lastAttemptAt: '2026-08-18T09:32:12.000Z',\n responseStatus: 503,\n responseBodyTruncated: 'Service temporarily unavailable',\n failureReason: 'The receiver returned HTTP 503 after the final retry.',\n failedAt: '2026-08-18T09:32:12.000Z',\n } as const;\n const retriedDeliveryExample = {\n ...deliveryIdentity,\n status: M2MWebhookDeliveryLogStatus.PENDING,\n attemptCount: 0,\n nextAttemptAt: '2026-08-18T09:35:00.000Z',\n } as const;\n const deliveryPageExample = {\n data: [failedDeliveryExample],\n pagination: { page: 1, limit: 20, total: 1, totalPages: 1 },\n } as const;\n\n return resourceSpecification<M2mDeliveryCustomOp, M2mDeliveryCoreOp, M2mDeliveryMain>(\n m2mWebhookDeliveryLogPolymorphicFactories[resourceType],\n M2MWebhookDeliveryLogBaseSchema,\n ({ schemaShape }) => ({\n purpose: 'Persist every outbound M2M webhook POST (queue entry, delivery status, HTTP evidence, and signing metadata) for org- or app-scoped admin review and retry.',\n businessRole: 'The user-visible event log and the worker’s durable queue for asynchronous webhook delivery — one row per (scope × target endpoint × fire).',\n lifecycleRole: 'Rows move PENDING → IN_FLIGHT → DELIVERED, or PENDING/IN_FLIGHT → FAILED, with `attemptCount` and `nextAttemptAt` governing back-off; RETRY and PURGE_OLD custom ops re-queue or clean history.',\n audience: LabelAudience.DEVELOPER,\n subDomain: EngineResourceSubDomain.NOTIFICATIONS,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'M2MWebhookDeliveryLogBaseSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactoryCollectionEntry: {\n collectionSymbol: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'm2mWebhookDeliveryLogPolymorphicFactories',\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: 'M2MWebhookDeliveryLog_Operations',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n notes: [\n 'The polymorphism engine injects `organizationId` (ORG variant) or `applicationId` (APP variant) on the document — those FKs are not on the base Zod object.',\n ],\n },\n fields: {\n _id: schemaShape._id.stringSpec({\n meaning: 'Unique id for a single delivery log record and lease token anchor for the worker.',\n importance: FieldSemanticImportance.PRIMARY,\n semanticRole: 'identifier',\n }),\n endpointId: schemaShape.endpointId.stringSpec({\n meaning: 'Stable FK to `webhookConfig.endpoints[].id` at enqueue time so historical records survive endpoint renames/URL changes.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n channel: schemaShape.channel.enumSpec({\n meaning: 'Which M2M channel the originating operation fired (must be compatible with the resource’s primary scope in the dispatcher).',\n importance: FieldSemanticImportance.PRIMARY,\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreM2MNotificationChannel',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n values: {\n [CoreM2MNotificationChannel.WEBHOOK_ORGANIZATION]: { meaning: 'Org-scoped outbound webhook (requires an org id in the execution context).' },\n [CoreM2MNotificationChannel.WEBHOOK_APPLICATION]: { meaning: 'App-scoped outbound webhook (resolves the app id from `appConfigService`).' },\n },\n }),\n resourceIdentifier: schemaShape.resourceIdentifier.stringSpec({\n meaning: 'Originating `CoreResourceType` string (or app resource key) that produced the M2M payload.',\n semanticRole: 'code',\n }),\n operationIdentifier: schemaShape.operationIdentifier.stringSpec({\n meaning: 'Operation or custom-op identifier that the serializer used when building the POST body (used for support correlation).',\n semanticRole: 'code',\n }),\n variantKey: schemaShape.variantKey.stringSpec({\n meaning: 'Optional default vs named operation variant, when the originating op exposed multiple API variants.',\n }),\n httpUrl: schemaShape.httpUrl.stringSpec({\n meaning: 'Snapshot of the destination URL that was used for this attempt (duplicated from the config so URL edits do not rewrite history).',\n importance: FieldSemanticImportance.PRIMARY,\n semanticRole: 'uri',\n }),\n payloadHash: schemaShape.payloadHash.stringSpec({\n meaning: 'SHA-256 of the JSON body, mirrored into the signed JWT and used to detect replays or tampering.',\n semanticRole: 'code',\n }),\n status: schemaShape.status.enumSpec({\n meaning: 'Current queue/delivery state for the worker and admin filters.',\n importance: FieldSemanticImportance.PRIMARY,\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'M2MWebhookDeliveryLogStatus',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.CONST_OBJECT,\n },\n values: {\n [M2MWebhookDeliveryLogStatus.PENDING]: { meaning: 'Record is either waiting in the queue or has been re-queued for another attempt after a transient failure.' },\n [M2MWebhookDeliveryLogStatus.IN_FLIGHT]: { meaning: 'A worker currently holds a lease and is trying to send the HTTP request.' },\n [M2MWebhookDeliveryLogStatus.DELIVERED]: { meaning: 'HTTP success path with signature validated at the consumer; terminal success.' },\n [M2MWebhookDeliveryLogStatus.FAILED]: { meaning: 'Terminal failure: exhausted attempt budget or a non-retryable 4xx class error.' },\n },\n }),\n attemptCount: schemaShape.attemptCount.numberSpec({\n meaning: 'Number of send attempts (including successes that still increment the counter, per worker policy).',\n unit: 'count',\n }),\n lastAttemptAt: schemaShape.lastAttemptAt.dateSpec({\n meaning: 'When the most recent send attempt started or finished, depending on writer semantics.',\n temporalRole: 'occurred',\n }),\n nextAttemptAt: schemaShape.nextAttemptAt.dateSpec({\n meaning: 'When the next retry is eligible; indexed for the worker’s polling query on `(status, nextAttemptAt)`.',\n temporalRole: 'scheduled',\n }),\n responseStatus: schemaShape.responseStatus.numberSpec({\n meaning: 'Last observed HTTP status code (present even for successes for observability).',\n }),\n responseBodyTruncated: schemaShape.responseBodyTruncated.stringSpec({\n meaning: 'First 4 KB of the HTTP response (when captured) to help debug remote listener failures.',\n }),\n failureReason: schemaShape.failureReason.stringSpec({\n meaning: 'Human-readable last error string when `status=failed` (worker-set).',\n }),\n signatureJti: schemaShape.signatureJti.stringSpec({\n meaning: 'Matches the JWT `jti` and `X-Webhook-Signature` header so the consumer can look up the exact signing key material.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n deliveredAt: schemaShape.deliveredAt.dateSpec({\n meaning: 'Timestamp when a terminal `DELIVERED` state was recorded.',\n temporalRole: 'occurred',\n }),\n failedAt: schemaShape.failedAt.dateSpec({\n meaning: 'Timestamp when a terminal `FAILED` state was recorded.',\n temporalRole: 'occurred',\n }),\n createdAt: schemaShape.createdAt.dateSpec({\n meaning: 'When the record was enqueued (immutable upper bound for retention policies).',\n temporalRole: 'creation',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n updatedAt: schemaShape.updatedAt.dateSpec({\n meaning: 'When status / attempt counters / timestamps last changed for this id.',\n temporalRole: 'modified',\n }),\n },\n operations: {\n [Op.READ]: {\n /*\n * `payload` is stored opaquely and is deliberately not broken into documented fields.\n * That is a storage decision the reader of this sentence does not need; what they DO\n * need is that it comes back whole and carries whatever the event carried.\n */\n purpose: 'Inspect one delivery attempt using the fields documented above (status, URL snapshot, hashes, HTTP evidence, correlation ids). The stored `payload` is returned whole rather than broken into documented fields — treat it as sensitive; see `businessConstraints`.',\n outcome: 'Operators can see whether a business event was delivered and, if not, the precise failure class.',\n whenToUse: 'Use when triaging a customer ticket referencing a `deliveryLogId` or `signatureJti`.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The delivery log record for the supplied id was found and its status, URL snapshot, HTTP evidence, and signing metadata are returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No delivery log row exists for the supplied id in this scope (never enqueued, or already removed by `PURGE_OLD`).' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the org-admin / app-super-admin role; because `payload` may embed serialized customer data, reads are gated to roles that already see that data (see `businessConstraints`).' },\n ],\n idempotent: true,\n examples: [{\n title: 'Inspect a failed order webhook delivery',\n response: failedDeliveryExample,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n variants: {\n context: { examples: [] },\n summary: { examples: [] },\n },\n },\n [Op.LIST]: {\n purpose: 'Browse recent delivery attempts in chronological order, filtered by the repository’s search defaults.',\n outcome: 'Admins can scan for spikes in `FAILED` rows or revalidation after URL rotation.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) chronological page of delivery log records in this scope.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the org-admin / app-super-admin role required to browse the delivery log (rows may carry serialized customer payloads).' },\n ],\n idempotent: true,\n examples: [{\n title: 'Browse recent delivery attempts',\n request: { page: 1, limit: 20, sort: 'createdAt:desc' },\n response: deliveryPageExample,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n variants: {\n context: { examples: [] },\n summary: { examples: [] },\n },\n },\n [Op.SEARCH]: {\n purpose: 'Filter log rows on status, `endpointId`, channel, date windows, and operation identifiers to isolate incidents.',\n outcome: 'Security and ops can produce CSV-grade subsets without an external data warehouse in small deployments.',\n whenToUse: 'Use in admin dashboards; heavy analytics may still go to a warehouse — this is the operational “small query” path.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of delivery log records matching the status / endpoint / channel / date-window / operation filters.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the org-admin / app-super-admin role required to search the delivery log.' },\n ],\n idempotent: true,\n examples: [{\n title: 'Find failures for one endpoint',\n request: {\n q: 'orders',\n status: M2MWebhookDeliveryLogStatus.FAILED,\n channel,\n endpointId: 'orders-primary',\n page: 1,\n limit: 20,\n sort: 'createdAt:desc',\n },\n response: deliveryPageExample,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n [Op.CREATE]: {\n purpose: 'Enqueue a new delivery row when a resource operation with an M2M channel fires.',\n outcome: 'The worker pool can find ready rows via the `(status, nextAttemptAt)` index.',\n whenToUse: 'Repository-only: invoked by the dispatcher, never by a human HTTP client.',\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'A `PENDING` delivery record was enqueued and is now discoverable by the worker pool. Internal/service write path — the dispatcher fires this, never a human HTTP client.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The enqueue payload fails schema validation (e.g. missing `endpointId`, `httpUrl`, or `channel`).', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'A non-dispatcher caller attempts to enqueue a delivery row directly.' },\n ],\n idempotent: false,\n },\n [Op.UPDATE]: {\n purpose: 'Drive the delivery lifecycle status transitions (PENDING → IN_FLIGHT → DELIVERED/FAILED) with `attemptCount` / `nextAttemptAt` / terminal-timestamp writes.',\n outcome: 'The worker can advance a row through its lifecycle so the `(status, nextAttemptAt)` index stays accurate for polling and back-off.',\n whenToUse: 'Repository-only: invoked by the dispatcher/worker (`markInFlight` / `markDelivered` / `markFailedAttempt` / `markFinallyFailed`), never by a human HTTP client — admins act via the `RETRY` custom operation.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The delivery record’s status / attempt counters / timestamps were updated. Internal/service write path — the worker fires this, never a human HTTP client.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No delivery log row exists for the supplied id to update.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'A non-dispatcher caller attempts to mutate a delivery row directly; UI flows must use the `RETRY` custom operation.' },\n ],\n idempotent: false,\n },\n [Op.DELETE]: {\n purpose: 'Reserved for `PURGE_OLD` and internal cleanup — no public single-row delete to keep the audit trail honest.',\n outcome: 'Old rows are removed in bulk, not opportunistically per UI click, matching the high-risk gating in the config.',\n responseStatuses: [\n { code: HttpResponseStatusCode.NO_CONTENT_204, meaning: 'An internal/maintenance single-record delete completed; no body is returned. Intentionally not a public per-click operation — routine cleanup goes through `PURGE_OLD`.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No delivery log row exists for the supplied id to delete.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an operator authorized for exceptional single-row maintenance deletes; UI flows must use `PURGE_OLD` instead.' },\n ],\n idempotent: true,\n },\n [Op.DELETE_MANY]: {\n purpose: 'Bulk twin of `DELETE` — the actual `PURGE_OLD` write path: one repository round trip drops every terminal `DELIVERED`/`FAILED` row older than the requested retention window.',\n outcome: 'Retention purges scale with one bulk delete instead of N per-row deletes; non-terminal rows are never touched (the drain owns them).',\n whenToUse: 'Repository-only — never a public HTTP surface. Admins purge via the `PURGE_OLD` custom operation, which owns request validation and the purge summary response.',\n responseStatuses: [\n { code: HttpResponseStatusCode.NO_CONTENT_204, meaning: 'The matched terminal records were bulk-deleted; the `PURGE_OLD` wrapper reports the count in its own summary response.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'A non-system caller attempts the repository-only bulk delete directly; UI/API flows must use `PURGE_OLD`.' },\n ],\n idempotent: true,\n },\n [M2MWebhookDeliveryLog_Operations.RETRY]: {\n operationId: M2MWebhookDeliveryLog_Operations.RETRY,\n purpose: 'Re-queue a `FAILED` row (reset to pending / zero attempts per worker contract) for manual replay.',\n outcome: 'Operators can attempt redelivery after fixing the downstream listener without re-sending the originating business event.',\n whenToUse: 'Use after a partner confirms their endpoint or certificate is healthy again.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The `FAILED` record was reset to `PENDING` with attempt counters cleared, and the worker pool will re-attempt delivery; the re-queued record is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No delivery log row exists for the supplied id to retry.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the org-admin / app-super-admin role required to trigger a manual redelivery.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The row is not in a retryable terminal `FAILED` state (e.g. it is still `PENDING`/`IN_FLIGHT`, or already `DELIVERED`), so a manual re-queue is illegal.' },\n ],\n idempotent: false,\n examples: [{\n title: 'Retry after the receiver recovers',\n request: {},\n response: retriedDeliveryExample,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n [M2MWebhookDeliveryLog_Operations.PURGE_OLD]: {\n operationId: M2MWebhookDeliveryLog_Operations.PURGE_OLD,\n purpose: 'Bulk-delete rows older than `N` days (delivered or failed) to bound storage in busy tenants.',\n outcome: 'Tenants can comply with a data-retention policy without asking an operator to remove records by hand.',\n whenToUse: 'Use in scheduled admin jobs (or manual compliance runs) with explicit `olderThanDays` guardrails.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'Records older than the supplied `olderThanDays` window were bulk-deleted and a count of purged records is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The `olderThanDays` guardrail is missing, non-numeric, or below the configured minimum retention floor.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the org-admin / app-super-admin role required to run a bulk retention purge.' },\n ],\n idempotent: false,\n examples: [{\n title: 'Purge terminal delivery history older than 30 days',\n request: { olderThanDays: 30 },\n response: {\n purgedCount: 47,\n message: 'Purged 47 delivered/failed webhook deliveries older than 30 day(s).',\n },\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n businessConstraints: [\n 'The `payload` field stores `z.unknown()` JSON at rest (full operation serialization per plan). It is intentionally not expanded into `fields.*` here because the shape is the arbitrary API response; treat any READ that surfaces `payload` as PII/secret handling.',\n 'Do not use `Op.DELETE` for routine UI — prefer `PURGE_OLD` to maintain structured audit logs; single-row delete is for exceptional maintenance.',\n 'Because payloads may embed serialized API responses, treat READ/LIST as sensitive: scope RBAC to org-admin or app-super-admin roles that already see customer data.',\n ],\n }),\n { resourcePrimaryScope: m2mDeliveryLogResourcePrimaryScope[resourceType] },\n );\n}\n\nexport const organizationM2mWebhookDeliveryLogResourceSpecification = buildM2mWebhookDeliveryLogSpecification(\n CoreResourceType.ORGANIZATION_M2M_WEBHOOK_DELIVERY_LOG,\n 'ORGANIZATION_M2M_WEBHOOK_DELIVERY_LOG',\n);\n\nexport const applicationM2mWebhookDeliveryLogResourceSpecification = buildM2mWebhookDeliveryLogSpecification(\n CoreResourceType.APPLICATION_M2M_WEBHOOK_DELIVERY_LOG,\n 'APPLICATION_M2M_WEBHOOK_DELIVERY_LOG',\n);\n"]}
1
+ {"version":3,"file":"m2m-webhook-delivery-log.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/notifications/resources/m2m-webhook-delivery-log.resource.specification.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,0BAA0B,EAC1B,qBAAqB,IAAI,EAAE,EAC3B,gBAAgB,EAChB,gCAAgC,EAChC,+BAA+B,EAC/B,2BAA2B,EAC3B,oBAAoB,EACpB,yCAAyC,GAC1C,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAoC,MAAM,6BAA6B,CAAC;AAC9H,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAU3E,MAAM,kCAAkC,GAA6D;IACnG,CAAC,gBAAgB,CAAC,qCAAqC,CAAC,EAAE,oBAAoB,CAAC,aAAa;IAC5F,CAAC,gBAAgB,CAAC,oCAAoC,CAAC,EAAE,oBAAoB,CAAC,WAAW;CAC1F,CAAC;AAgBF,SAAS,uCAAuC,CAC9C,YAAwC,EACxC,UAA4C;IAE5C,MAAM,mBAAmB,GAAG,YAAY,KAAK,gBAAgB,CAAC,qCAAqC,CAAC;IACpG,MAAM,aAAa,GAAG,mBAAmB;QACvC,CAAC,CAA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AC9B,QAAQ,EAAE;4BACR,WAAW,EAAE,EAAE;4BACf,OAAO,EAAE,qEAAqE;yBAC/E;wBACD,SAAS,EAAE,sBAAsB,CAAC,MAAM;qBACzC,CAAC;aACH;SACF;QACD,mBAAmB,EAAE;YACnB,sQAAsQ;YACtQ,iJAAiJ;YACjJ,qKAAqK;SACtK;KACF,CAAC,EACF,EAAE,oBAAoB,EAAE,kCAAkC,CAAC,YAAY,CAAC,EAAE,CAC3E,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,sDAAsD,GAAG,uCAAuC,CAC3G,gBAAgB,CAAC,qCAAqC,EACtD,uCAAuC,CACxC,CAAC;AAEF,MAAM,CAAC,MAAM,qDAAqD,GAAG,uCAAuC,CAC1G,gBAAgB,CAAC,oCAAoC,EACrD,sCAAsC,CACvC,CAAC","sourcesContent":["/**\n * Resources: `organizationM2mWebhookDeliveryLog` + `applicationM2mWebhookDeliveryLog` — Wildo SaaS engine specification (backend-only).\n *\n * Polymorphic ORG + APP pair sharing `M2MWebhookDeliveryLogBaseSchema` and `m2mWebhookDeliveryLogPolymorphicFactories`.\n *\n * Inputs:\n * - Base schema: `M2MWebhookDeliveryLogBaseSchema` (`m2m-webhook-delivery-log.shared.schemas.ts`)\n * - Polymorphic factories: `m2mWebhookDeliveryLogPolymorphicFactories` (`m2m-webhook-delivery-log.shared.resources-config.schemas.ts`)\n * - Custom operations: `M2MWebhookDeliveryLog_Operations` (`retry`, `purgeOld`)\n * - UI presets: `webhooksMainPresets` / `webhooksAdminPresets`\n * (engine/presets-components/src/config/resources/webhooks.resource-presets.tsx) —\n * layout-less auto-render surfaced in the org Settings Hub `webhooks` section\n * (Delivery log sub-tab), dashboard-style via generic collection capabilities:\n * status quick-filter tab strip (`collectionDisplayConfig.quickFilterField`)\n * + day-bucket date headings (`temporalGroupField: 'createdAt'`) on LIST,\n * EMBEDDED READ (row click → companion drawer; opaque `payload` renders as\n * pretty JSON), `retry` / `purgeOld` actions, status badge.\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 CoreM2MNotificationChannel,\n CoreResourceOperation as Op,\n CoreResourceType,\n M2MWebhookDeliveryLog_Operations,\n M2MWebhookDeliveryLogBaseSchema,\n M2MWebhookDeliveryLogStatus,\n ResourcePrimaryScope,\n m2mWebhookDeliveryLogPolymorphicFactories,\n} from '@wildo-ai/saas-models';\nimport { HttpResponseStatusCode, resourceSpecification, type ResourceSpecificationConfig } from '~wildo-specifications/_core';\nimport { EngineResourceSubDomain } from '../../engine-resource-sub-domain';\n\ntype M2mDeliveryLogResourceType =\n | CoreResourceType.ORGANIZATION_M2M_WEBHOOK_DELIVERY_LOG\n | CoreResourceType.APPLICATION_M2M_WEBHOOK_DELIVERY_LOG;\n\ntype M2mDeliveryLogResourceTypeMember =\n | 'ORGANIZATION_M2M_WEBHOOK_DELIVERY_LOG'\n | 'APPLICATION_M2M_WEBHOOK_DELIVERY_LOG';\n\nconst m2mDeliveryLogResourcePrimaryScope: Record<M2mDeliveryLogResourceType, ResourcePrimaryScope> = {\n [CoreResourceType.ORGANIZATION_M2M_WEBHOOK_DELIVERY_LOG]: ResourcePrimaryScope.ORGANIZATIONS,\n [CoreResourceType.APPLICATION_M2M_WEBHOOK_DELIVERY_LOG]: ResourcePrimaryScope.APPLICATION,\n};\n\ntype M2mDeliveryFactoryCfg = ReturnType<\n (typeof m2mWebhookDeliveryLogPolymorphicFactories)[CoreResourceType.ORGANIZATION_M2M_WEBHOOK_DELIVERY_LOG]\n>;\ntype M2mDeliveryCustomOp = NonNullable<M2mDeliveryFactoryCfg['customOperation']>;\ntype M2mDeliveryCoreOp =\n | Op.READ\n | Op.LIST\n | Op.SEARCH\n | Op.CREATE\n | Op.UPDATE\n | Op.DELETE\n | Op.DELETE_MANY;\ntype M2mDeliveryMain = typeof M2MWebhookDeliveryLogBaseSchema;\n\nfunction buildM2mWebhookDeliveryLogSpecification(\n resourceType: M2mDeliveryLogResourceType,\n memberName: M2mDeliveryLogResourceTypeMember,\n): ResourceSpecificationConfig<M2mDeliveryCustomOp, M2mDeliveryCoreOp, M2mDeliveryMain> {\n const isOrganizationScope = resourceType === CoreResourceType.ORGANIZATION_M2M_WEBHOOK_DELIVERY_LOG;\n const scopeIdentity = isOrganizationScope\n ? { organizationId: 'org_01JEXAMPLE' }\n : { applicationId: 'app_01JEXAMPLE' };\n const channel = isOrganizationScope\n ? CoreM2MNotificationChannel.WEBHOOK_ORGANIZATION\n : CoreM2MNotificationChannel.WEBHOOK_APPLICATION;\n const deliveryIdentity = {\n _id: 'delivery_01JEXAMPLE',\n endpointId: 'orders-primary',\n channel,\n resourceIdentifier: 'orders',\n operationIdentifier: 'create',\n httpUrl: 'https://partners.example.com/webhooks/orders',\n payloadHash: '31da863f127a6c22b91b5cc85081c382b02039a9c8c4b30db2cc3172de31d2d8',\n payload: { event: 'order.created', orderId: 'order_01JEXAMPLE' },\n signatureJti: 'webhook-signature-01JEXAMPLE',\n createdAt: '2026-08-18T09:30:00.000Z',\n updatedAt: '2026-08-18T09:32:12.000Z',\n ...scopeIdentity,\n } as const;\n const failedDeliveryExample = {\n ...deliveryIdentity,\n status: M2MWebhookDeliveryLogStatus.FAILED,\n attemptCount: 5,\n lastAttemptAt: '2026-08-18T09:32:12.000Z',\n responseStatus: 503,\n responseBodyTruncated: 'Service temporarily unavailable',\n failureReason: 'The receiver returned HTTP 503 after the final retry.',\n failedAt: '2026-08-18T09:32:12.000Z',\n } as const;\n const retriedDeliveryExample = {\n ...deliveryIdentity,\n status: M2MWebhookDeliveryLogStatus.PENDING,\n attemptCount: 0,\n nextAttemptAt: '2026-08-18T09:35:00.000Z',\n } as const;\n const deliveryPageExample = {\n data: [failedDeliveryExample],\n pagination: { page: 1, limit: 20, total: 1, totalPages: 1 },\n } as const;\n\n return resourceSpecification<M2mDeliveryCustomOp, M2mDeliveryCoreOp, M2mDeliveryMain>(\n m2mWebhookDeliveryLogPolymorphicFactories[resourceType],\n M2MWebhookDeliveryLogBaseSchema,\n ({ schemaShape }) => ({\n purpose: 'Persist one record per outbound endpoint delivery (queue entry, attempt count, latest HTTP evidence, and signing metadata) for org- or app-scoped admin review and retry.',\n businessRole: 'The user-visible event log and the worker’s durable queue for asynchronous webhook delivery — one row per (scope × target endpoint × fire).',\n lifecycleRole: 'Rows move PENDING → IN_FLIGHT → DELIVERED, or PENDING/IN_FLIGHT → FAILED, with `attemptCount` and `nextAttemptAt` governing back-off; RETRY and PURGE_OLD custom ops re-queue or clean history.',\n audience: LabelAudience.DEVELOPER,\n subDomain: EngineResourceSubDomain.NOTIFICATIONS,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'M2MWebhookDeliveryLogBaseSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactoryCollectionEntry: {\n collectionSymbol: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'm2mWebhookDeliveryLogPolymorphicFactories',\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: 'M2MWebhookDeliveryLog_Operations',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n notes: [\n 'The polymorphism engine injects `organizationId` (ORG variant) or `applicationId` (APP variant) on the document — those FKs are not on the base Zod object.',\n ],\n },\n fields: {\n _id: schemaShape._id.stringSpec({\n meaning: 'Unique id for a single delivery log record and lease token anchor for the worker.',\n importance: FieldSemanticImportance.PRIMARY,\n semanticRole: 'identifier',\n }),\n endpointId: schemaShape.endpointId.stringSpec({\n meaning: 'Stable FK to `webhookConfig.endpoints[].id` at enqueue time so historical records survive endpoint renames/URL changes.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n channel: schemaShape.channel.enumSpec({\n meaning: 'Which M2M channel the originating operation fired (must be compatible with the resource’s primary scope in the dispatcher).',\n importance: FieldSemanticImportance.PRIMARY,\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreM2MNotificationChannel',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n values: {\n [CoreM2MNotificationChannel.WEBHOOK_ORGANIZATION]: { meaning: 'Org-scoped outbound webhook (requires an org id in the execution context).' },\n [CoreM2MNotificationChannel.WEBHOOK_APPLICATION]: { meaning: 'App-scoped outbound webhook (resolves the app id from `appConfigService`).' },\n },\n }),\n resourceIdentifier: schemaShape.resourceIdentifier.stringSpec({\n meaning: 'Originating `CoreResourceType` string (or app resource key) that produced the M2M payload.',\n semanticRole: 'code',\n }),\n operationIdentifier: schemaShape.operationIdentifier.stringSpec({\n meaning: 'Operation or custom-op identifier that the serializer used when building the POST body (used for support correlation).',\n semanticRole: 'code',\n }),\n variantKey: schemaShape.variantKey.stringSpec({\n meaning: 'Optional default vs named operation variant, when the originating op exposed multiple API variants.',\n }),\n httpUrl: schemaShape.httpUrl.stringSpec({\n meaning: 'Snapshot of the destination URL captured when this delivery was queued (duplicated from the config so URL edits do not rewrite history).',\n importance: FieldSemanticImportance.PRIMARY,\n semanticRole: 'uri',\n }),\n payloadHash: schemaShape.payloadHash.stringSpec({\n meaning: 'SHA-256 of the JSON body, mirrored into the signed JWT and used to detect replays or tampering.',\n semanticRole: 'code',\n }),\n status: schemaShape.status.enumSpec({\n meaning: 'Current queue/delivery state for the worker and admin filters.',\n importance: FieldSemanticImportance.PRIMARY,\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'M2MWebhookDeliveryLogStatus',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.CONST_OBJECT,\n },\n values: {\n [M2MWebhookDeliveryLogStatus.PENDING]: { meaning: 'Record is either waiting in the queue or has been re-queued for another attempt after a transient failure.' },\n [M2MWebhookDeliveryLogStatus.IN_FLIGHT]: { meaning: 'A worker currently holds a lease and is trying to send the HTTP request.' },\n [M2MWebhookDeliveryLogStatus.DELIVERED]: { meaning: 'The consumer returned a 2xx acknowledgement; terminal delivery success. This does not establish whether the consumer verified the signature or completed downstream processing.' },\n [M2MWebhookDeliveryLogStatus.FAILED]: { meaning: 'Terminal failure: exhausted attempt budget or a non-retryable 4xx class error.' },\n },\n }),\n attemptCount: schemaShape.attemptCount.numberSpec({\n meaning: 'Number of send attempts (including successes that still increment the counter, per worker policy).',\n unit: 'count',\n }),\n lastAttemptAt: schemaShape.lastAttemptAt.dateSpec({\n meaning: 'When the most recent send attempt started or finished, depending on writer semantics.',\n temporalRole: 'occurred',\n }),\n nextAttemptAt: schemaShape.nextAttemptAt.dateSpec({\n meaning: 'When a PENDING delivery becomes eligible for retry; indexed with status for worker polling. Terminal rows can retain an earlier value, which does not schedule another attempt.',\n temporalRole: 'scheduled',\n }),\n responseStatus: schemaShape.responseStatus.numberSpec({\n meaning: 'Last observed HTTP status code (present even for successes for observability).',\n }),\n responseBodyTruncated: schemaShape.responseBodyTruncated.stringSpec({\n meaning: 'First 4 KB of the HTTP response (when captured) to help debug remote listener failures.',\n }),\n failureReason: schemaShape.failureReason.stringSpec({\n meaning: 'Human-readable last error string when `status=failed` (worker-set).',\n }),\n signatureJti: schemaShape.signatureJti.stringSpec({\n meaning: 'Stable delivery identity carried in the JWT `jti` claim inside `x-wildo-webhook-signature`. The receiver uses it to deduplicate retries; it is not a signing-key identifier.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n deliveredAt: schemaShape.deliveredAt.dateSpec({\n meaning: 'Timestamp when a terminal `DELIVERED` state was recorded.',\n temporalRole: 'occurred',\n }),\n failedAt: schemaShape.failedAt.dateSpec({\n meaning: 'Timestamp when a terminal `FAILED` state was recorded.',\n temporalRole: 'occurred',\n }),\n createdAt: schemaShape.createdAt.dateSpec({\n meaning: 'When the record was enqueued (immutable upper bound for retention policies).',\n temporalRole: 'creation',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n updatedAt: schemaShape.updatedAt.dateSpec({\n meaning: 'When status / attempt counters / timestamps last changed for this id.',\n temporalRole: 'modified',\n }),\n },\n operations: {\n [Op.READ]: {\n /*\n * `payload` is stored opaquely and is deliberately not broken into documented fields.\n * That is a storage decision the reader of this sentence does not need; what they DO\n * need is that it comes back whole and carries whatever the event carried.\n */\n purpose: 'Inspect one delivery attempt using the fields documented above (status, URL snapshot, hashes, HTTP evidence, correlation ids). The stored `payload` is returned whole rather than broken into documented fields — treat it as sensitive; see `businessConstraints`.',\n outcome: 'Operators can see whether a business event was delivered and, if not, the precise failure class.',\n whenToUse: 'Use when triaging a customer ticket referencing a `deliveryLogId` or `signatureJti`.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The delivery log record for the supplied id was found and its status, URL snapshot, HTTP evidence, and signing metadata are returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No delivery log row exists for the supplied id in this scope (never enqueued, or already removed by `PURGE_OLD`).' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the org-admin / app-super-admin role; because `payload` may embed serialized customer data, reads are gated to roles that already see that data (see `businessConstraints`).' },\n ],\n idempotent: true,\n examples: [{\n title: 'Inspect a failed order webhook delivery',\n response: failedDeliveryExample,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n variants: {\n context: { examples: [] },\n summary: { examples: [] },\n },\n },\n [Op.LIST]: {\n purpose: 'Browse recent delivery attempts in chronological order, filtered by the repository’s search defaults.',\n outcome: 'Admins can scan for spikes in `FAILED` rows or revalidation after URL rotation.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) chronological page of delivery log records in this scope.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the org-admin / app-super-admin role required to browse the delivery log (rows may carry serialized customer payloads).' },\n ],\n idempotent: true,\n examples: [{\n title: 'Browse recent delivery attempts',\n request: { page: 1, limit: 20, sort: 'createdAt:desc' },\n response: deliveryPageExample,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n variants: {\n context: { examples: [] },\n summary: { examples: [] },\n },\n },\n [Op.SEARCH]: {\n purpose: 'Filter log rows on status, `endpointId`, channel, date windows, and operation identifiers to isolate incidents.',\n outcome: 'Security and ops can produce CSV-grade subsets without an external data warehouse in small deployments.',\n whenToUse: 'Use in admin dashboards; heavy analytics may still go to a warehouse — this is the operational “small query” path.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of delivery log records matching the status / endpoint / channel / date-window / operation filters.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the org-admin / app-super-admin role required to search the delivery log.' },\n ],\n idempotent: true,\n examples: [{\n title: 'Find failures for one endpoint',\n request: {\n q: 'orders',\n status: M2MWebhookDeliveryLogStatus.FAILED,\n channel,\n endpointId: 'orders-primary',\n page: 1,\n limit: 20,\n sort: 'createdAt:desc',\n },\n response: deliveryPageExample,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n [Op.CREATE]: {\n purpose: 'Enqueue a new delivery row when a resource operation with an M2M channel fires.',\n outcome: 'The worker pool can find ready rows via the `(status, nextAttemptAt)` index.',\n whenToUse: 'Repository-only: invoked by the dispatcher, never by a human HTTP client.',\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'A `PENDING` delivery record was enqueued and is now discoverable by the worker pool. Internal/service write path — the dispatcher fires this, never a human HTTP client.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The enqueue payload fails schema validation (e.g. missing `endpointId`, `httpUrl`, or `channel`).', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'A non-dispatcher caller attempts to enqueue a delivery row directly.' },\n ],\n idempotent: false,\n },\n [Op.UPDATE]: {\n purpose: 'Drive the delivery lifecycle status transitions (PENDING → IN_FLIGHT → DELIVERED/FAILED) with `attemptCount` / `nextAttemptAt` / terminal-timestamp writes.',\n outcome: 'The worker can advance a row through its lifecycle so the `(status, nextAttemptAt)` index stays accurate for polling and back-off.',\n whenToUse: 'Repository-only: invoked by the dispatcher/worker (`markInFlight` / `markDelivered` / `markFailedAttempt` / `markFinallyFailed`), never by a human HTTP client — admins act via the `RETRY` custom operation.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The delivery record’s status / attempt counters / timestamps were updated. Internal/service write path — the worker fires this, never a human HTTP client.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No delivery log row exists for the supplied id to update.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'A non-dispatcher caller attempts to mutate a delivery row directly; UI flows must use the `RETRY` custom operation.' },\n ],\n idempotent: false,\n },\n [Op.DELETE]: {\n purpose: 'Reserved for `PURGE_OLD` and internal cleanup — no public single-row delete to keep the audit trail honest.',\n outcome: 'Old rows are removed in bulk, not opportunistically per UI click, matching the high-risk gating in the config.',\n responseStatuses: [\n { code: HttpResponseStatusCode.NO_CONTENT_204, meaning: 'An internal/maintenance single-record delete completed; no body is returned. Intentionally not a public per-click operation — routine cleanup goes through `PURGE_OLD`.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No delivery log row exists for the supplied id to delete.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not an operator authorized for exceptional single-row maintenance deletes; UI flows must use `PURGE_OLD` instead.' },\n ],\n idempotent: true,\n },\n [Op.DELETE_MANY]: {\n purpose: 'Bulk twin of `DELETE` — the actual `PURGE_OLD` write path: one repository round trip drops every terminal `DELIVERED`/`FAILED` row older than the requested retention window.',\n outcome: 'Retention purges scale with one bulk delete instead of N per-row deletes; non-terminal rows are never touched (the drain owns them).',\n whenToUse: 'Repository-only — never a public HTTP surface. Admins purge via the `PURGE_OLD` custom operation, which owns request validation and the purge summary response.',\n responseStatuses: [\n { code: HttpResponseStatusCode.NO_CONTENT_204, meaning: 'The matched terminal records were bulk-deleted; the `PURGE_OLD` wrapper reports the count in its own summary response.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'A non-system caller attempts the repository-only bulk delete directly; UI/API flows must use `PURGE_OLD`.' },\n ],\n idempotent: true,\n },\n [M2MWebhookDeliveryLog_Operations.RETRY]: {\n operationId: M2MWebhookDeliveryLog_Operations.RETRY,\n purpose: 'Re-queue a `FAILED` row (reset to pending / zero attempts per worker contract) for manual replay.',\n outcome: 'Operators can attempt redelivery after fixing the downstream listener without re-sending the originating business event.',\n whenToUse: 'Use after a partner confirms their endpoint or certificate is healthy again.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The `FAILED` record was reset to `PENDING` with attempt counters cleared, and the worker pool will re-attempt delivery; the re-queued record is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No delivery log row exists for the supplied id to retry.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the org-admin / app-super-admin role required to trigger a manual redelivery.' },\n { code: HttpResponseStatusCode.CONFLICT_409, when: 'The row is not in a retryable terminal `FAILED` state (e.g. it is still `PENDING`/`IN_FLIGHT`, or already `DELIVERED`), so a manual re-queue is illegal.' },\n ],\n idempotent: false,\n examples: [{\n title: 'Retry after the receiver recovers',\n request: {},\n response: retriedDeliveryExample,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n [M2MWebhookDeliveryLog_Operations.PURGE_OLD]: {\n operationId: M2MWebhookDeliveryLog_Operations.PURGE_OLD,\n purpose: 'Bulk-delete rows older than `N` days (delivered or failed) to bound storage in busy tenants.',\n outcome: 'Tenants can comply with a data-retention policy without asking an operator to remove records by hand.',\n whenToUse: 'Use in scheduled admin jobs (or manual compliance runs) with explicit `olderThanDays` guardrails.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'Records older than the supplied `olderThanDays` window were bulk-deleted and a count of purged records is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The `olderThanDays` guardrail is missing, non-numeric, or below the configured minimum retention floor.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller lacks the org-admin / app-super-admin role required to run a bulk retention purge.' },\n ],\n idempotent: false,\n examples: [{\n title: 'Purge terminal delivery history older than 30 days',\n request: { olderThanDays: 30 },\n response: {\n purgedCount: 47,\n message: 'Purged 47 delivered/failed webhook deliveries older than 30 day(s).',\n },\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n businessConstraints: [\n 'The `payload` field stores `z.unknown()` JSON at rest (full operation serialization per plan). It is intentionally not expanded into `fields.*` here because the shape is the arbitrary API response; treat any READ that surfaces `payload` as PII/secret handling.',\n 'Do not use `Op.DELETE` for routine UI — prefer `PURGE_OLD` to maintain structured audit logs; single-row delete is for exceptional maintenance.',\n 'Because payloads may embed serialized API responses, treat READ/LIST as sensitive: scope RBAC to org-admin or app-super-admin roles that already see customer data.',\n ],\n }),\n { resourcePrimaryScope: m2mDeliveryLogResourcePrimaryScope[resourceType] },\n );\n}\n\nexport const organizationM2mWebhookDeliveryLogResourceSpecification = buildM2mWebhookDeliveryLogSpecification(\n CoreResourceType.ORGANIZATION_M2M_WEBHOOK_DELIVERY_LOG,\n 'ORGANIZATION_M2M_WEBHOOK_DELIVERY_LOG',\n);\n\nexport const applicationM2mWebhookDeliveryLogResourceSpecification = buildM2mWebhookDeliveryLogSpecification(\n CoreResourceType.APPLICATION_M2M_WEBHOOK_DELIVERY_LOG,\n 'APPLICATION_M2M_WEBHOOK_DELIVERY_LOG',\n);\n"]}
@@ -17,7 +17,7 @@
17
17
  * @see `.cursor/plans/notification-badges-polymorphism-refactor.md`
18
18
  */
19
19
  import { CoreResourceOperation as Op, ResourcePrimaryScope } from '@wildo-ai/saas-models';
20
- export declare const userNotificationBadgesResourceSpecification: import("../../../_core").ResourceSpecificationConfig<undefined, Op.READ | Op.UPDATE | Op.UPDATE_MANY | Op.DELETE | Op.CREATE | Op.LIST, import("zod").ZodObject<{
20
+ export declare const userNotificationBadgesResourceSpecification: import("../../../_core").ResourceSpecificationConfig<undefined, Op.READ | Op.UPDATE | Op.DELETE | Op.CREATE | Op.LIST, import("zod").ZodObject<{
21
21
  identifier: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodString>;
22
22
  _id: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodString>;
23
23
  count: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("zod").ZodNumber>;