@wildo-ai/saas-specifications 1.1.2 → 1.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (410) hide show
  1. package/dist/esm/_core/brand/brand-asset.schemas.d.ts +4 -6
  2. package/dist/esm/_core/brand/brand-asset.schemas.d.ts.map +1 -1
  3. package/dist/esm/_core/brand/brand-asset.schemas.js +4 -12
  4. package/dist/esm/_core/brand/brand-asset.schemas.js.map +1 -1
  5. package/dist/esm/_core/brand/brand-generation.schemas.d.ts +5 -3
  6. package/dist/esm/_core/brand/brand-generation.schemas.d.ts.map +1 -1
  7. package/dist/esm/_core/brand/brand-generation.schemas.js +5 -2
  8. package/dist/esm/_core/brand/brand-generation.schemas.js.map +1 -1
  9. package/dist/esm/_core/brand/brand-snapshot.schemas.d.ts +10 -3
  10. package/dist/esm/_core/brand/brand-snapshot.schemas.d.ts.map +1 -1
  11. package/dist/esm/_core/brand/brand-snapshot.schemas.js +10 -2
  12. package/dist/esm/_core/brand/brand-snapshot.schemas.js.map +1 -1
  13. package/dist/esm/_core/build-plan/build-plan-task-graph-generation.schemas.d.ts.map +1 -1
  14. package/dist/esm/_core/build-plan/build-plan-task-graph-generation.schemas.js +15 -5
  15. package/dist/esm/_core/build-plan/build-plan-task-graph-generation.schemas.js.map +1 -1
  16. package/dist/esm/_core/build-plan/build-plan-task-graph-validation.d.ts +40 -3
  17. package/dist/esm/_core/build-plan/build-plan-task-graph-validation.d.ts.map +1 -1
  18. package/dist/esm/_core/build-plan/build-plan-task-graph-validation.js +85 -6
  19. package/dist/esm/_core/build-plan/build-plan-task-graph-validation.js.map +1 -1
  20. package/dist/esm/_core/business-model-lite/business-model-lite-snapshot-generation.schemas.d.ts.map +1 -1
  21. package/dist/esm/_core/business-model-lite/business-model-lite-snapshot-generation.schemas.js +10 -4
  22. package/dist/esm/_core/business-model-lite/business-model-lite-snapshot-generation.schemas.js.map +1 -1
  23. package/dist/esm/_core/business-model-lite/business-model-lite-snapshot-validation.d.ts +15 -0
  24. package/dist/esm/_core/business-model-lite/business-model-lite-snapshot-validation.d.ts.map +1 -1
  25. package/dist/esm/_core/business-model-lite/business-model-lite-snapshot-validation.js.map +1 -1
  26. package/dist/esm/_core/compliance-documents/compliance-document-candidate.schemas.d.ts +10 -0
  27. package/dist/esm/_core/compliance-documents/compliance-document-candidate.schemas.d.ts.map +1 -1
  28. package/dist/esm/_core/compliance-documents/compliance-document-candidate.schemas.js +17 -0
  29. package/dist/esm/_core/compliance-documents/compliance-document-candidate.schemas.js.map +1 -1
  30. package/dist/esm/_core/expert-personas/expert-persona-charter.schemas.d.ts +6 -7
  31. package/dist/esm/_core/expert-personas/expert-persona-charter.schemas.d.ts.map +1 -1
  32. package/dist/esm/_core/expert-personas/expert-persona-charter.schemas.js +6 -13
  33. package/dist/esm/_core/expert-personas/expert-persona-charter.schemas.js.map +1 -1
  34. package/dist/esm/_core/expert-personas/expert-persona-validation.d.ts +0 -11
  35. package/dist/esm/_core/expert-personas/expert-persona-validation.d.ts.map +1 -1
  36. package/dist/esm/_core/expert-personas/expert-persona-validation.js +0 -19
  37. package/dist/esm/_core/expert-personas/expert-persona-validation.js.map +1 -1
  38. package/dist/esm/_core/expert-personas/expert-role-template.schemas.d.ts +1 -2
  39. package/dist/esm/_core/expert-personas/expert-role-template.schemas.d.ts.map +1 -1
  40. package/dist/esm/_core/expert-personas/expert-role-template.schemas.js +1 -2
  41. package/dist/esm/_core/expert-personas/expert-role-template.schemas.js.map +1 -1
  42. package/dist/esm/_core/feature-drafts/feature-specification-drafts-generation.schemas.d.ts.map +1 -1
  43. package/dist/esm/_core/feature-drafts/feature-specification-drafts-generation.schemas.js +17 -4
  44. package/dist/esm/_core/feature-drafts/feature-specification-drafts-generation.schemas.js.map +1 -1
  45. package/dist/esm/_core/index.d.ts +1 -0
  46. package/dist/esm/_core/index.d.ts.map +1 -1
  47. package/dist/esm/_core/index.js +1 -0
  48. package/dist/esm/_core/index.js.map +1 -1
  49. package/dist/esm/_core/market/market-snapshot-generation.schemas.d.ts.map +1 -1
  50. package/dist/esm/_core/market/market-snapshot-generation.schemas.js +5 -40
  51. package/dist/esm/_core/market/market-snapshot-generation.schemas.js.map +1 -1
  52. package/dist/esm/_core/market/market-snapshot-validation.d.ts +15 -0
  53. package/dist/esm/_core/market/market-snapshot-validation.d.ts.map +1 -1
  54. package/dist/esm/_core/market/market-snapshot-validation.js.map +1 -1
  55. package/dist/esm/_core/placement-plan/placement-plan-generation.schemas.d.ts.map +1 -1
  56. package/dist/esm/_core/placement-plan/placement-plan-generation.schemas.js +11 -5
  57. package/dist/esm/_core/placement-plan/placement-plan-generation.schemas.js.map +1 -1
  58. package/dist/esm/_core/placement-plan/placement-plan-validation.d.ts +66 -9
  59. package/dist/esm/_core/placement-plan/placement-plan-validation.d.ts.map +1 -1
  60. package/dist/esm/_core/placement-plan/placement-plan-validation.js +62 -20
  61. package/dist/esm/_core/placement-plan/placement-plan-validation.js.map +1 -1
  62. package/dist/esm/_core/placement-plan/placement-plan.schemas.d.ts +4 -1
  63. package/dist/esm/_core/placement-plan/placement-plan.schemas.d.ts.map +1 -1
  64. package/dist/esm/_core/placement-plan/placement-plan.schemas.js +4 -1
  65. package/dist/esm/_core/placement-plan/placement-plan.schemas.js.map +1 -1
  66. package/dist/esm/_core/provider-specification.schemas.d.ts +82 -0
  67. package/dist/esm/_core/provider-specification.schemas.d.ts.map +1 -0
  68. package/dist/esm/_core/provider-specification.schemas.js +144 -0
  69. package/dist/esm/_core/provider-specification.schemas.js.map +1 -0
  70. package/dist/esm/_core/requirements/requirements-snapshot-generation.schemas.d.ts.map +1 -1
  71. package/dist/esm/_core/requirements/requirements-snapshot-generation.schemas.js +13 -8
  72. package/dist/esm/_core/requirements/requirements-snapshot-generation.schemas.js.map +1 -1
  73. package/dist/esm/_core/requirements/requirements-snapshot-validation.d.ts +15 -0
  74. package/dist/esm/_core/requirements/requirements-snapshot-validation.d.ts.map +1 -1
  75. package/dist/esm/_core/requirements/requirements-snapshot-validation.js.map +1 -1
  76. package/dist/esm/_core/roadmap/roadmap-snapshot-generation.schemas.d.ts.map +1 -1
  77. package/dist/esm/_core/roadmap/roadmap-snapshot-generation.schemas.js +7 -2
  78. package/dist/esm/_core/roadmap/roadmap-snapshot-generation.schemas.js.map +1 -1
  79. package/dist/esm/_core/roadmap/roadmap-snapshot-validation.d.ts +15 -0
  80. package/dist/esm/_core/roadmap/roadmap-snapshot-validation.d.ts.map +1 -1
  81. package/dist/esm/_core/roadmap/roadmap-snapshot-validation.js.map +1 -1
  82. package/dist/esm/_core/utils/family-ref-stamping.d.ts +64 -0
  83. package/dist/esm/_core/utils/family-ref-stamping.d.ts.map +1 -0
  84. package/dist/esm/_core/utils/family-ref-stamping.js +73 -0
  85. package/dist/esm/_core/utils/family-ref-stamping.js.map +1 -0
  86. package/dist/esm/_core/vision/vision-snapshot-generation.schemas.d.ts.map +1 -1
  87. package/dist/esm/_core/vision/vision-snapshot-generation.schemas.js +23 -9
  88. package/dist/esm/_core/vision/vision-snapshot-generation.schemas.js.map +1 -1
  89. package/dist/esm/application-creation/application-coding-tasks.application-creation.schemas.d.ts +0 -4
  90. package/dist/esm/application-creation/application-coding-tasks.application-creation.schemas.d.ts.map +1 -1
  91. package/dist/esm/application-creation/application-document-fact-specification.application-creation.schemas.d.ts +7 -7
  92. package/dist/esm/application-creation/application-document-fact-specification.application-creation.schemas.d.ts.map +1 -1
  93. package/dist/esm/application-creation/application-document-fact-specification.application-creation.schemas.js +6 -7
  94. package/dist/esm/application-creation/application-document-fact-specification.application-creation.schemas.js.map +1 -1
  95. package/dist/esm/application-creation/application-document-release-policy-specification.application-creation.schemas.d.ts +3 -3
  96. package/dist/esm/application-creation/application-document-release-policy-specification.application-creation.schemas.js +3 -3
  97. package/dist/esm/application-creation/application-document-release-policy-specification.application-creation.schemas.js.map +1 -1
  98. package/dist/esm/application-creation/application-specification-family-identity.application-creation.schemas.d.ts +2 -2
  99. package/dist/esm/application-creation/application-specification-family-identity.application-creation.schemas.js +2 -2
  100. package/dist/esm/application-creation/application-specification-family-identity.application-creation.schemas.js.map +1 -1
  101. package/dist/esm/application-creation/journey.application-creation.schemas.d.ts +18 -6
  102. package/dist/esm/application-creation/journey.application-creation.schemas.d.ts.map +1 -1
  103. package/dist/esm/application-creation/journey.application-creation.schemas.js +18 -6
  104. package/dist/esm/application-creation/journey.application-creation.schemas.js.map +1 -1
  105. package/dist/esm/application-creation/playbooks.application-creation.schemas.d.ts +8 -23
  106. package/dist/esm/application-creation/playbooks.application-creation.schemas.d.ts.map +1 -1
  107. package/dist/esm/application-creation/playbooks.application-creation.schemas.js +57 -27
  108. package/dist/esm/application-creation/playbooks.application-creation.schemas.js.map +1 -1
  109. package/dist/esm/assurance/application-document-publication.schemas.d.ts +20 -6
  110. package/dist/esm/assurance/application-document-publication.schemas.d.ts.map +1 -1
  111. package/dist/esm/assurance/application-document-publication.schemas.js +26 -10
  112. package/dist/esm/assurance/application-document-publication.schemas.js.map +1 -1
  113. package/dist/esm/assurance/assurance-authority-basis.definitions.d.ts +72 -49
  114. package/dist/esm/assurance/assurance-authority-basis.definitions.d.ts.map +1 -1
  115. package/dist/esm/assurance/assurance-authority-basis.definitions.js +161 -60
  116. package/dist/esm/assurance/assurance-authority-basis.definitions.js.map +1 -1
  117. package/dist/esm/assurance/assurance-authority-basis.schemas.d.ts +25 -0
  118. package/dist/esm/assurance/assurance-authority-basis.schemas.d.ts.map +1 -1
  119. package/dist/esm/assurance/assurance-evidence-requirement-bodies.definitions.d.ts +36 -0
  120. package/dist/esm/assurance/assurance-evidence-requirement-bodies.definitions.d.ts.map +1 -0
  121. package/dist/esm/assurance/assurance-evidence-requirement-bodies.definitions.js +859 -0
  122. package/dist/esm/assurance/assurance-evidence-requirement-bodies.definitions.js.map +1 -0
  123. package/dist/esm/assurance/assurance-foundation.schemas.d.ts +43 -0
  124. package/dist/esm/assurance/assurance-foundation.schemas.d.ts.map +1 -1
  125. package/dist/esm/assurance/assurance-foundation.schemas.js +56 -0
  126. package/dist/esm/assurance/assurance-foundation.schemas.js.map +1 -1
  127. package/dist/esm/assurance/assurance-objective-catalog.definitions.d.ts +14 -7
  128. package/dist/esm/assurance/assurance-objective-catalog.definitions.d.ts.map +1 -1
  129. package/dist/esm/assurance/assurance-objective-catalog.definitions.js +24 -7
  130. package/dist/esm/assurance/assurance-objective-catalog.definitions.js.map +1 -1
  131. package/dist/esm/assurance/assurance-program-generation.schemas.d.ts +8 -1
  132. package/dist/esm/assurance/assurance-program-generation.schemas.d.ts.map +1 -1
  133. package/dist/esm/assurance/assurance-program-generation.schemas.js +10 -2
  134. package/dist/esm/assurance/assurance-program-generation.schemas.js.map +1 -1
  135. package/dist/esm/assurance/assurance-program.schemas.d.ts +447 -11
  136. package/dist/esm/assurance/assurance-program.schemas.d.ts.map +1 -1
  137. package/dist/esm/assurance/assurance-program.schemas.js +293 -5
  138. package/dist/esm/assurance/assurance-program.schemas.js.map +1 -1
  139. package/dist/esm/assurance/assurance-verification-requirement-bodies.definitions.d.ts +35 -0
  140. package/dist/esm/assurance/assurance-verification-requirement-bodies.definitions.d.ts.map +1 -0
  141. package/dist/esm/assurance/assurance-verification-requirement-bodies.definitions.js +999 -0
  142. package/dist/esm/assurance/assurance-verification-requirement-bodies.definitions.js.map +1 -0
  143. package/dist/esm/companion-exports.d.ts +7 -6
  144. package/dist/esm/companion-exports.d.ts.map +1 -1
  145. package/dist/esm/companion-exports.js.map +1 -1
  146. package/dist/esm/engine/_bootstrap.js +3 -1
  147. package/dist/esm/engine/_bootstrap.js.map +1 -1
  148. package/dist/esm/engine/applications/resources/application-api-keys.resource.specification.d.ts.map +1 -1
  149. package/dist/esm/engine/applications/resources/application-api-keys.resource.specification.js +13 -1
  150. package/dist/esm/engine/applications/resources/application-api-keys.resource.specification.js.map +1 -1
  151. package/dist/esm/engine/applications/resources/application-metadata.resource.specification.js +1 -1
  152. package/dist/esm/engine/applications/resources/application-metadata.resource.specification.js.map +1 -1
  153. package/dist/esm/engine/applications/resources/application-oauth-clients.resource.specification.d.ts +2 -0
  154. package/dist/esm/engine/applications/resources/application-oauth-clients.resource.specification.d.ts.map +1 -1
  155. package/dist/esm/engine/applications/resources/application-oauth-clients.resource.specification.js +14 -2
  156. package/dist/esm/engine/applications/resources/application-oauth-clients.resource.specification.js.map +1 -1
  157. package/dist/esm/engine/applications/resources/application-versions.resource.specification.js +9 -9
  158. package/dist/esm/engine/applications/resources/application-versions.resource.specification.js.map +1 -1
  159. package/dist/esm/engine/applications/resources/applications.resource.specification.js +1 -1
  160. package/dist/esm/engine/applications/resources/applications.resource.specification.js.map +1 -1
  161. package/dist/esm/engine/auth/resources/consumable-tokens.resource.specification.js +3 -3
  162. package/dist/esm/engine/auth/resources/consumable-tokens.resource.specification.js.map +1 -1
  163. package/dist/esm/engine/auth/resources/oauth-consent-grants.resource.specification.js +1 -1
  164. package/dist/esm/engine/auth/resources/oauth-consent-grants.resource.specification.js.map +1 -1
  165. package/dist/esm/engine/auth/resources/organization-api-keys.resource.specification.d.ts.map +1 -1
  166. package/dist/esm/engine/auth/resources/organization-api-keys.resource.specification.js +13 -1
  167. package/dist/esm/engine/auth/resources/organization-api-keys.resource.specification.js.map +1 -1
  168. package/dist/esm/engine/auth/resources/organization-oauth-clients.resource.specification.d.ts +2 -0
  169. package/dist/esm/engine/auth/resources/organization-oauth-clients.resource.specification.d.ts.map +1 -1
  170. package/dist/esm/engine/auth/resources/organization-oauth-clients.resource.specification.js +14 -2
  171. package/dist/esm/engine/auth/resources/organization-oauth-clients.resource.specification.js.map +1 -1
  172. package/dist/esm/engine/auth/resources/organization-provider-credentials.resource.specification.d.ts +32 -0
  173. package/dist/esm/engine/auth/resources/organization-provider-credentials.resource.specification.d.ts.map +1 -0
  174. package/dist/esm/engine/auth/resources/organization-provider-credentials.resource.specification.js +308 -0
  175. package/dist/esm/engine/auth/resources/organization-provider-credentials.resource.specification.js.map +1 -0
  176. package/dist/esm/engine/auth/resources/platform-access-grants.resource.specification.js +4 -4
  177. package/dist/esm/engine/auth/resources/platform-access-grants.resource.specification.js.map +1 -1
  178. package/dist/esm/engine/auth/resources/scim-provisioning-config.resource.specification.js +2 -2
  179. package/dist/esm/engine/auth/resources/scim-provisioning-config.resource.specification.js.map +1 -1
  180. package/dist/esm/engine/auth/resources/scim-tokens.resource.specification.js +6 -6
  181. package/dist/esm/engine/auth/resources/scim-tokens.resource.specification.js.map +1 -1
  182. package/dist/esm/engine/auth/resources/siem-delivery-dlq.resource.specification.js +9 -9
  183. package/dist/esm/engine/auth/resources/siem-delivery-dlq.resource.specification.js.map +1 -1
  184. package/dist/esm/engine/auth/resources/siem-export-config.resource.specification.js +2 -2
  185. package/dist/esm/engine/auth/resources/siem-export-config.resource.specification.js.map +1 -1
  186. package/dist/esm/engine/auth/resources/sso-config.resource.specification.d.ts +9 -25
  187. package/dist/esm/engine/auth/resources/sso-config.resource.specification.d.ts.map +1 -1
  188. package/dist/esm/engine/auth/resources/sso-config.resource.specification.js +104 -10
  189. package/dist/esm/engine/auth/resources/sso-config.resource.specification.js.map +1 -1
  190. package/dist/esm/engine/auth/resources/sso-connections.resource.specification.d.ts +0 -6
  191. package/dist/esm/engine/auth/resources/sso-connections.resource.specification.d.ts.map +1 -1
  192. package/dist/esm/engine/auth/resources/user-provider-credentials.resource.specification.d.ts +32 -0
  193. package/dist/esm/engine/auth/resources/user-provider-credentials.resource.specification.d.ts.map +1 -0
  194. package/dist/esm/engine/auth/resources/user-provider-credentials.resource.specification.js +297 -0
  195. package/dist/esm/engine/auth/resources/user-provider-credentials.resource.specification.js.map +1 -0
  196. package/dist/esm/engine/billing/resources/billing-accounts.resource.specification.d.ts.map +1 -1
  197. package/dist/esm/engine/billing/resources/billing-accounts.resource.specification.js +4 -3
  198. package/dist/esm/engine/billing/resources/billing-accounts.resource.specification.js.map +1 -1
  199. package/dist/esm/engine/billing/resources/credit-pools.resource.specification.js +2 -2
  200. package/dist/esm/engine/billing/resources/credit-pools.resource.specification.js.map +1 -1
  201. package/dist/esm/engine/billing/resources/invoice-refs.resource.specification.js +3 -3
  202. package/dist/esm/engine/billing/resources/invoice-refs.resource.specification.js.map +1 -1
  203. package/dist/esm/engine/billing/resources/prices.resource.specification.js +7 -7
  204. package/dist/esm/engine/billing/resources/prices.resource.specification.js.map +1 -1
  205. package/dist/esm/engine/billing/resources/products.resource.specification.js +7 -7
  206. package/dist/esm/engine/billing/resources/products.resource.specification.js.map +1 -1
  207. package/dist/esm/engine/billing/resources/promotions.resource.specification.d.ts.map +1 -1
  208. package/dist/esm/engine/billing/resources/promotions.resource.specification.js +14 -12
  209. package/dist/esm/engine/billing/resources/promotions.resource.specification.js.map +1 -1
  210. package/dist/esm/engine/billing/resources/referrals.resource.specification.js +7 -7
  211. package/dist/esm/engine/billing/resources/referrals.resource.specification.js.map +1 -1
  212. package/dist/esm/engine/billing/resources/subscriptions.resource.specification.d.ts.map +1 -1
  213. package/dist/esm/engine/billing/resources/subscriptions.resource.specification.js +6 -3
  214. package/dist/esm/engine/billing/resources/subscriptions.resource.specification.js.map +1 -1
  215. package/dist/esm/engine/billing/resources/usage-records.resource.specification.d.ts +7 -3
  216. package/dist/esm/engine/billing/resources/usage-records.resource.specification.d.ts.map +1 -1
  217. package/dist/esm/engine/billing/resources/usage-records.resource.specification.js +28 -11
  218. package/dist/esm/engine/billing/resources/usage-records.resource.specification.js.map +1 -1
  219. package/dist/esm/engine/compliance/resources/audit-logs.resource.specification.js +8 -8
  220. package/dist/esm/engine/compliance/resources/audit-logs.resource.specification.js.map +1 -1
  221. package/dist/esm/engine/engine-resource-specifications.registry.d.ts +2 -2
  222. package/dist/esm/engine/engine-resource-specifications.registry.d.ts.map +1 -1
  223. package/dist/esm/engine/engine-resource-specifications.registry.js +6 -2
  224. package/dist/esm/engine/engine-resource-specifications.registry.js.map +1 -1
  225. package/dist/esm/engine/engine-resource-sub-domain.d.ts +20 -0
  226. package/dist/esm/engine/engine-resource-sub-domain.d.ts.map +1 -1
  227. package/dist/esm/engine/engine-resource-sub-domain.js +66 -0
  228. package/dist/esm/engine/engine-resource-sub-domain.js.map +1 -1
  229. package/dist/esm/engine/errors/error-messages.specification.d.ts.map +1 -1
  230. package/dist/esm/engine/errors/error-messages.specification.js +14 -0
  231. package/dist/esm/engine/errors/error-messages.specification.js.map +1 -1
  232. package/dist/esm/engine/features/audit-logs.feature.specification.js +4 -4
  233. package/dist/esm/engine/features/audit-logs.feature.specification.js.map +1 -1
  234. package/dist/esm/engine/features/core-limits.feature.specifications.js +7 -7
  235. package/dist/esm/engine/features/core-limits.feature.specifications.js.map +1 -1
  236. package/dist/esm/engine/features/resources/application-features.resource.specification.js +3 -3
  237. package/dist/esm/engine/features/resources/application-features.resource.specification.js.map +1 -1
  238. package/dist/esm/engine/features/resources/organization-features.resource.specification.js +3 -3
  239. package/dist/esm/engine/features/resources/organization-features.resource.specification.js.map +1 -1
  240. package/dist/esm/engine/features/resources/user-features.resource.specification.js +3 -3
  241. package/dist/esm/engine/features/resources/user-features.resource.specification.js.map +1 -1
  242. package/dist/esm/engine/files/resources/files.resource.specification.js +10 -10
  243. package/dist/esm/engine/files/resources/files.resource.specification.js.map +1 -1
  244. package/dist/esm/engine/flows-actors/resources/a2a-push-delivery-log.resource.specification.js +11 -11
  245. package/dist/esm/engine/flows-actors/resources/a2a-push-delivery-log.resource.specification.js.map +1 -1
  246. package/dist/esm/engine/flows-actors/resources/a2a-token-budget-state.resource.specification.js +4 -4
  247. package/dist/esm/engine/flows-actors/resources/a2a-token-budget-state.resource.specification.js.map +1 -1
  248. package/dist/esm/engine/flows-actors/resources/flow-actor-executions.resource.specification.js +2 -2
  249. package/dist/esm/engine/flows-actors/resources/flow-actor-executions.resource.specification.js.map +1 -1
  250. package/dist/esm/engine/frontend-components/app/app-layout-connected-accounts-settings.frontend-component.specification.d.ts +5 -0
  251. package/dist/esm/engine/frontend-components/app/app-layout-connected-accounts-settings.frontend-component.specification.d.ts.map +1 -0
  252. package/dist/esm/engine/frontend-components/app/app-layout-connected-accounts-settings.frontend-component.specification.js +81 -0
  253. package/dist/esm/engine/frontend-components/app/app-layout-connected-accounts-settings.frontend-component.specification.js.map +1 -0
  254. package/dist/esm/engine/frontend-components/app/public-layout-file-upload-grant.frontend-component.specification.d.ts +4 -0
  255. package/dist/esm/engine/frontend-components/app/public-layout-file-upload-grant.frontend-component.specification.d.ts.map +1 -0
  256. package/dist/esm/engine/frontend-components/app/public-layout-file-upload-grant.frontend-component.specification.js +22 -0
  257. package/dist/esm/engine/frontend-components/app/public-layout-file-upload-grant.frontend-component.specification.js.map +1 -0
  258. package/dist/esm/engine/frontend-components/billing/billing-plan-change-preview.frontend-component.specification.d.ts +0 -4
  259. package/dist/esm/engine/frontend-components/billing/billing-plan-change-preview.frontend-component.specification.d.ts.map +0 -1
  260. package/dist/esm/engine/frontend-components/billing/billing-plan-change-preview.frontend-component.specification.js +0 -21
  261. package/dist/esm/engine/frontend-components/billing/billing-plan-change-preview.frontend-component.specification.js.map +0 -1
  262. package/dist/esm/engine/frontend-components/billing/billing-promotion-code-input.frontend-component.specification.d.ts +0 -4
  263. package/dist/esm/engine/frontend-components/billing/billing-promotion-code-input.frontend-component.specification.d.ts.map +0 -1
  264. package/dist/esm/engine/frontend-components/billing/billing-promotion-code-input.frontend-component.specification.js +0 -21
  265. package/dist/esm/engine/frontend-components/billing/billing-promotion-code-input.frontend-component.specification.js.map +0 -1
  266. package/dist/esm/engine/frontend-components/index.d.ts +0 -2
  267. package/dist/esm/engine/frontend-components/index.d.ts.map +1 -1
  268. package/dist/esm/engine/frontend-components/index.js +4 -6
  269. package/dist/esm/engine/frontend-components/index.js.map +1 -1
  270. package/dist/esm/engine/guidance/resources/guidance-state.resource.specification.js +12 -12
  271. package/dist/esm/engine/guidance/resources/guidance-state.resource.specification.js.map +1 -1
  272. package/dist/esm/engine/guidance/resources/lifecycle-state.resource.specification.js +9 -9
  273. package/dist/esm/engine/guidance/resources/lifecycle-state.resource.specification.js.map +1 -1
  274. package/dist/esm/engine/guidance/resources/progression-state.resource.specification.d.ts +8 -0
  275. package/dist/esm/engine/guidance/resources/progression-state.resource.specification.d.ts.map +1 -1
  276. package/dist/esm/engine/guidance/resources/progression-state.resource.specification.js +6 -6
  277. package/dist/esm/engine/guidance/resources/progression-state.resource.specification.js.map +1 -1
  278. package/dist/esm/engine/index.d.ts +1 -0
  279. package/dist/esm/engine/index.d.ts.map +1 -1
  280. package/dist/esm/engine/index.js +1 -0
  281. package/dist/esm/engine/index.js.map +1 -1
  282. package/dist/esm/engine/infrastructure/resources/data-seed-runs.resource.specification.js +17 -17
  283. package/dist/esm/engine/infrastructure/resources/data-seed-runs.resource.specification.js.map +1 -1
  284. package/dist/esm/engine/infrastructure/resources/external-data-pipeline-states.resource.specification.js +7 -7
  285. package/dist/esm/engine/infrastructure/resources/external-data-pipeline-states.resource.specification.js.map +1 -1
  286. package/dist/esm/engine/infrastructure/resources/job-executions.resource.specification.js +8 -8
  287. package/dist/esm/engine/infrastructure/resources/job-executions.resource.specification.js.map +1 -1
  288. package/dist/esm/engine/infrastructure/resources/job-payload-storage.resource.specification.d.ts +7 -2
  289. package/dist/esm/engine/infrastructure/resources/job-payload-storage.resource.specification.d.ts.map +1 -1
  290. package/dist/esm/engine/infrastructure/resources/job-payload-storage.resource.specification.js +10 -5
  291. package/dist/esm/engine/infrastructure/resources/job-payload-storage.resource.specification.js.map +1 -1
  292. package/dist/esm/engine/notifications/resources/m2m-webhook-delivery-log.resource.specification.d.ts.map +1 -1
  293. package/dist/esm/engine/notifications/resources/m2m-webhook-delivery-log.resource.specification.js +20 -15
  294. package/dist/esm/engine/notifications/resources/m2m-webhook-delivery-log.resource.specification.js.map +1 -1
  295. package/dist/esm/engine/notifications/resources/notification-badges.resource.specification.d.ts.map +1 -1
  296. package/dist/esm/engine/notifications/resources/notification-badges.resource.specification.js +11 -10
  297. package/dist/esm/engine/notifications/resources/notification-badges.resource.specification.js.map +1 -1
  298. package/dist/esm/engine/notifications/resources/webhook-config.resource.specification.d.ts.map +1 -1
  299. package/dist/esm/engine/notifications/resources/webhook-config.resource.specification.js +29 -6
  300. package/dist/esm/engine/notifications/resources/webhook-config.resource.specification.js.map +1 -1
  301. package/dist/esm/engine/organizations/resources/organization-members.resource.specification.js +9 -9
  302. package/dist/esm/engine/organizations/resources/organization-members.resource.specification.js.map +1 -1
  303. package/dist/esm/engine/organizations/resources/organization-notifications.resource.specification.js +3 -3
  304. package/dist/esm/engine/organizations/resources/organization-notifications.resource.specification.js.map +1 -1
  305. package/dist/esm/engine/organizations/resources/organization-preferences.resource.specification.js +4 -4
  306. package/dist/esm/engine/organizations/resources/organization-preferences.resource.specification.js.map +1 -1
  307. package/dist/esm/engine/organizations/resources/organization-profiles.resource.specification.js +2 -2
  308. package/dist/esm/engine/organizations/resources/organization-profiles.resource.specification.js.map +1 -1
  309. package/dist/esm/engine/organizations/resources/organization-unit-members.resource.specification.js +1 -1
  310. package/dist/esm/engine/organizations/resources/organization-unit-members.resource.specification.js.map +1 -1
  311. package/dist/esm/engine/organizations/resources/organizations.resource.specification.js +7 -7
  312. package/dist/esm/engine/organizations/resources/organizations.resource.specification.js.map +1 -1
  313. package/dist/esm/engine/providers/_engine-provider-shared.d.ts +9 -0
  314. package/dist/esm/engine/providers/_engine-provider-shared.d.ts.map +1 -0
  315. package/dist/esm/engine/providers/_engine-provider-shared.js +19 -0
  316. package/dist/esm/engine/providers/_engine-provider-shared.js.map +1 -0
  317. package/dist/esm/engine/providers/anthropic.provider.specification.d.ts +7 -0
  318. package/dist/esm/engine/providers/anthropic.provider.specification.d.ts.map +1 -0
  319. package/dist/esm/engine/providers/anthropic.provider.specification.js +33 -0
  320. package/dist/esm/engine/providers/anthropic.provider.specification.js.map +1 -0
  321. package/dist/esm/engine/providers/apple.provider.specification.d.ts +7 -0
  322. package/dist/esm/engine/providers/apple.provider.specification.d.ts.map +1 -0
  323. package/dist/esm/engine/providers/apple.provider.specification.js +35 -0
  324. package/dist/esm/engine/providers/apple.provider.specification.js.map +1 -0
  325. package/dist/esm/engine/providers/email-preview.provider.specification.d.ts +7 -0
  326. package/dist/esm/engine/providers/email-preview.provider.specification.d.ts.map +1 -0
  327. package/dist/esm/engine/providers/email-preview.provider.specification.js +31 -0
  328. package/dist/esm/engine/providers/email-preview.provider.specification.js.map +1 -0
  329. package/dist/esm/engine/providers/github.provider.specification.d.ts +7 -0
  330. package/dist/esm/engine/providers/github.provider.specification.d.ts.map +1 -0
  331. package/dist/esm/engine/providers/github.provider.specification.js +30 -0
  332. package/dist/esm/engine/providers/github.provider.specification.js.map +1 -0
  333. package/dist/esm/engine/providers/google.provider.specification.d.ts +7 -0
  334. package/dist/esm/engine/providers/google.provider.specification.d.ts.map +1 -0
  335. package/dist/esm/engine/providers/google.provider.specification.js +34 -0
  336. package/dist/esm/engine/providers/google.provider.specification.js.map +1 -0
  337. package/dist/esm/engine/providers/grok.provider.specification.d.ts +7 -0
  338. package/dist/esm/engine/providers/grok.provider.specification.d.ts.map +1 -0
  339. package/dist/esm/engine/providers/grok.provider.specification.js +30 -0
  340. package/dist/esm/engine/providers/grok.provider.specification.js.map +1 -0
  341. package/dist/esm/engine/providers/index.d.ts +23 -0
  342. package/dist/esm/engine/providers/index.d.ts.map +1 -0
  343. package/dist/esm/engine/providers/index.js +37 -0
  344. package/dist/esm/engine/providers/index.js.map +1 -0
  345. package/dist/esm/engine/providers/microsoft.provider.specification.d.ts +7 -0
  346. package/dist/esm/engine/providers/microsoft.provider.specification.d.ts.map +1 -0
  347. package/dist/esm/engine/providers/microsoft.provider.specification.js +30 -0
  348. package/dist/esm/engine/providers/microsoft.provider.specification.js.map +1 -0
  349. package/dist/esm/engine/providers/mistral.provider.specification.d.ts +7 -0
  350. package/dist/esm/engine/providers/mistral.provider.specification.d.ts.map +1 -0
  351. package/dist/esm/engine/providers/mistral.provider.specification.js +33 -0
  352. package/dist/esm/engine/providers/mistral.provider.specification.js.map +1 -0
  353. package/dist/esm/engine/providers/openai.provider.specification.d.ts +7 -0
  354. package/dist/esm/engine/providers/openai.provider.specification.d.ts.map +1 -0
  355. package/dist/esm/engine/providers/openai.provider.specification.js +43 -0
  356. package/dist/esm/engine/providers/openai.provider.specification.js.map +1 -0
  357. package/dist/esm/engine/providers/opencode.provider.specification.d.ts +7 -0
  358. package/dist/esm/engine/providers/opencode.provider.specification.d.ts.map +1 -0
  359. package/dist/esm/engine/providers/opencode.provider.specification.js +50 -0
  360. package/dist/esm/engine/providers/opencode.provider.specification.js.map +1 -0
  361. package/dist/esm/engine/providers/perplexity.provider.specification.d.ts +7 -0
  362. package/dist/esm/engine/providers/perplexity.provider.specification.d.ts.map +1 -0
  363. package/dist/esm/engine/providers/perplexity.provider.specification.js +30 -0
  364. package/dist/esm/engine/providers/perplexity.provider.specification.js.map +1 -0
  365. package/dist/esm/engine/providers/resend.provider.specification.d.ts +7 -0
  366. package/dist/esm/engine/providers/resend.provider.specification.d.ts.map +1 -0
  367. package/dist/esm/engine/providers/resend.provider.specification.js +33 -0
  368. package/dist/esm/engine/providers/resend.provider.specification.js.map +1 -0
  369. package/dist/esm/engine/providers/stripe.provider.specification.d.ts +7 -0
  370. package/dist/esm/engine/providers/stripe.provider.specification.d.ts.map +1 -0
  371. package/dist/esm/engine/providers/stripe.provider.specification.js +35 -0
  372. package/dist/esm/engine/providers/stripe.provider.specification.js.map +1 -0
  373. package/dist/esm/engine/providers/twilio.provider.specification.d.ts +7 -0
  374. package/dist/esm/engine/providers/twilio.provider.specification.d.ts.map +1 -0
  375. package/dist/esm/engine/providers/twilio.provider.specification.js +33 -0
  376. package/dist/esm/engine/providers/twilio.provider.specification.js.map +1 -0
  377. package/dist/esm/engine/users/resources/anonymous-users.resource.specification.js +7 -7
  378. package/dist/esm/engine/users/resources/anonymous-users.resource.specification.js.map +1 -1
  379. package/dist/esm/engine/users/resources/inbound-contacts.resource.specification.js +9 -9
  380. package/dist/esm/engine/users/resources/inbound-contacts.resource.specification.js.map +1 -1
  381. package/dist/esm/engine/users/resources/user-credentials.resource.specification.js +2 -2
  382. package/dist/esm/engine/users/resources/user-credentials.resource.specification.js.map +1 -1
  383. package/dist/esm/engine/users/resources/user-identity-links.resource.specification.js +8 -8
  384. package/dist/esm/engine/users/resources/user-identity-links.resource.specification.js.map +1 -1
  385. package/dist/esm/engine/users/resources/user-preferences.resource.specification.d.ts +4 -4
  386. package/dist/esm/engine/users/resources/user-preferences.resource.specification.js +4 -4
  387. package/dist/esm/engine/users/resources/user-preferences.resource.specification.js.map +1 -1
  388. package/dist/esm/engine/users/resources/user-profiles.resource.specification.js +2 -2
  389. package/dist/esm/engine/users/resources/user-profiles.resource.specification.js.map +1 -1
  390. package/dist/esm/engine/users/resources/user-self-preferences.resource.specification.d.ts +4 -4
  391. package/dist/esm/engine/users/resources/user-self-preferences.resource.specification.d.ts.map +1 -1
  392. package/dist/esm/engine/users/resources/user-self-preferences.resource.specification.js +13 -11
  393. package/dist/esm/engine/users/resources/user-self-preferences.resource.specification.js.map +1 -1
  394. package/dist/esm/engine/users/resources/user-self-profiles.resource.specification.js +1 -1
  395. package/dist/esm/engine/users/resources/user-self-profiles.resource.specification.js.map +1 -1
  396. package/dist/esm/engine/users/resources/user-self.resource.specification.js +8 -8
  397. package/dist/esm/engine/users/resources/user-self.resource.specification.js.map +1 -1
  398. package/dist/esm/engine/users/resources/users.resource.specification.d.ts.map +1 -1
  399. package/dist/esm/engine/users/resources/users.resource.specification.js +93 -0
  400. package/dist/esm/engine/users/resources/users.resource.specification.js.map +1 -1
  401. package/dist/esm/technical-documentation/engine-documentation-specification-catalog.companion.d.ts.map +1 -1
  402. package/dist/esm/technical-documentation/engine-documentation-specification-catalog.companion.js +95 -45
  403. package/dist/esm/technical-documentation/engine-documentation-specification-catalog.companion.js.map +1 -1
  404. package/dist/esm/technical-documentation/technical-documentation-units.schemas.d.ts +37 -1
  405. package/dist/esm/technical-documentation/technical-documentation-units.schemas.d.ts.map +1 -1
  406. package/dist/esm/technical-documentation/technical-documentation-units.schemas.js +36 -0
  407. package/dist/esm/technical-documentation/technical-documentation-units.schemas.js.map +1 -1
  408. package/dist/tsconfig.build.tsbuildinfo +1 -1
  409. package/package.json +8 -8
  410. package/dist/assurance/external-framework-mapping.json +0 -980
@@ -127,7 +127,7 @@ const userProgressionBase = resourceSpecification(userProgressionStateFactory, U
127
127
  purpose: 'Internal system creation of the first progression row (INTERNAL_CALL, isDefault): eager-seeded via the USERS → USER_PROGRESSION_STATE `onParentCreate` composition lifecycle (createAsSystem), and created on demand by the milestone engine via the repository tier. Not a member-facing route.',
128
128
  outcome: 'New progression baseline when the user first touches guided milestones.',
129
129
  responseStatuses: [
130
- { code: HttpResponseStatusCode.CREATED_201, meaning: 'A progression state baseline row was materialized for the user.' },
130
+ { code: HttpResponseStatusCode.CREATED_201, meaning: 'A progression state baseline record was materialized for the user.' },
131
131
  ],
132
132
  // INTERNAL_CALL variant (isDefault) — the service tier createAsSystem resolves for the onParentCreate seed; also created by the milestone engine via the variant-agnostic repository tier. Not a public HTTP endpoint, so no client-facing 400/403/404 are documented.
133
133
  idempotent: false,
@@ -146,7 +146,7 @@ const userProgressionBase = resourceSpecification(userProgressionStateFactory, U
146
146
  outcome: 'The caller receives a paginated collection containing the user’s progression row when it has been materialized.',
147
147
  whenToUse: 'Use only when a collection envelope is more convenient than the singleton READ representation. This operation has no free-text searchable fields.',
148
148
  responseStatuses: [
149
- { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of user progression rows for future admin discovery.' },
149
+ { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of user progression records for future admin discovery.' },
150
150
  ],
151
151
  errorScenarios: [
152
152
  { code: HttpResponseStatusCode.UNAUTHORIZED_401, when: 'The request carries no authenticated user session for the progression search context.' },
@@ -163,7 +163,7 @@ const userProgressionBase = resourceSpecification(userProgressionStateFactory, U
163
163
  purpose: 'Repository-only teardown of the user progression state row when its owning user is deleted (composition `onParentDelete` cascade).',
164
164
  outcome: 'The singleton state row is removed together with the user — the composition part does not outlive its whole.',
165
165
  responseStatuses: [
166
- { code: HttpResponseStatusCode.OK_200, meaning: 'The user progression state row was deleted as part of the owning user’s deletion cascade.' },
166
+ { code: HttpResponseStatusCode.OK_200, meaning: 'The user progression state record was deleted as part of the owning user’s deletion cascade.' },
167
167
  ],
168
168
  // REPOSITORY_ONLY variant (super-admin) — invoked by the onParentDelete cascade, not a public HTTP endpoint, so no client-facing 400/403/404 are documented.
169
169
  idempotent: true,
@@ -247,7 +247,7 @@ const organizationProgressionBase = resourceSpecification(organizationProgressio
247
247
  purpose: 'Internal system creation of the first org progression row (INTERNAL_CALL, isDefault): eager-seeded via the ORGANIZATIONS → ORGANIZATION_PROGRESSION_STATE `onParentCreate` composition lifecycle (createAsSystem), and created on demand by the milestone engine via the repository tier. Not a member-facing route.',
248
248
  outcome: 'Initial empty maps for the org.',
249
249
  responseStatuses: [
250
- { code: HttpResponseStatusCode.CREATED_201, meaning: 'A progression state baseline row with empty maps was materialized for the org.' },
250
+ { code: HttpResponseStatusCode.CREATED_201, meaning: 'A progression state baseline record with empty maps was materialized for the org.' },
251
251
  ],
252
252
  // INTERNAL_CALL variant (isDefault) — the service tier createAsSystem resolves for the onParentCreate seed; also created by the milestone engine via the variant-agnostic repository tier. Not a public HTTP endpoint, so no client-facing 400/403/404 are documented.
253
253
  idempotent: false,
@@ -266,7 +266,7 @@ const organizationProgressionBase = resourceSpecification(organizationProgressio
266
266
  outcome: 'The caller receives a paginated collection containing the organization’s progression row when it has been materialized.',
267
267
  whenToUse: 'Use only when a collection envelope is more convenient than the singleton READ representation. This operation has no free-text searchable fields.',
268
268
  responseStatuses: [
269
- { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of org progression rows; merged admin presets do not surface this as a navigable list.' },
269
+ { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of org progression records; merged admin presets do not surface this as a navigable list.' },
270
270
  ],
271
271
  errorScenarios: [
272
272
  { code: HttpResponseStatusCode.UNAUTHORIZED_401, when: 'The request carries no authenticated org-member session for the progression search context.' },
@@ -283,7 +283,7 @@ const organizationProgressionBase = resourceSpecification(organizationProgressio
283
283
  purpose: 'Repository-only teardown of the organization progression state row when its owning organization is deleted (composition `onParentDelete` cascade).',
284
284
  outcome: 'The singleton state row is removed together with the organization — the composition part does not outlive its whole.',
285
285
  responseStatuses: [
286
- { code: HttpResponseStatusCode.OK_200, meaning: 'The organization progression state row was deleted as part of the owning organization’s deletion cascade.' },
286
+ { code: HttpResponseStatusCode.OK_200, meaning: 'The organization progression state record was deleted as part of the owning organization’s deletion cascade.' },
287
287
  ],
288
288
  // REPOSITORY_ONLY variant (ORG_ADMIN) — invoked by the onParentDelete cascade, not a public HTTP endpoint, so no client-facing 400/403/404 are documented.
289
289
  idempotent: true,
@@ -1 +1 @@
1
- {"version":3,"file":"progression-state.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/guidance/resources/progression-state.resource.specification.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mDAAmD,IAAI,kBAAkB,EACzE,kDAAkD,IAAI,iBAAiB,EACvE,0CAA0C,IAAI,kBAAkB,GACjE,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAEpE,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AACxG,OAAO,EACL,qBAAqB,IAAI,EAAE,EAC3B,kCAAkC,EAClC,oBAAoB,EACpB,0BAA0B,EAC1B,uEAAuE,IAAI,mCAAmC,EAC9G,+DAA+D,IAAI,2BAA2B,GAC/F,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,sBAAsB,EACtB,mCAAmC,EACnC,6BAA6B,EAC7B,qBAAqB,EACrB,8CAA8C,GAC/C,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAK3E,MAAM,UAAU,GAAG,kBAAmF,CAAC;AAKvG,MAAM,aAAa,GAAG,iB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;IAC7F,MAAM,EAAE;QACN,OAAO,EAAE,6KAA6K;QACtL,cAAc,EAAE,4DAA4D;QAC5E,QAAQ,EAAE;YACR,QAAQ,EAAE,EAAE,OAAO,EAAE,+BAA+B,EAAE,SAAS,EAAE,qCAAqC,EAAE,SAAS,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,2BAA2B,EAAE,EAAE,WAAW,EAAE,EAAE,OAAO,EAAE,yFAAyF,EAAE,EAAE,EAAE;YAC7R,QAAQ,EAAE,EAAE,OAAO,EAAE,uEAAuE,EAAE,SAAS,EAAE,4DAA4D,EAAE,SAAS,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,iBAAiB,EAAE,EAAE,WAAW,EAAE,EAAE,OAAO,EAAE,qFAAqF,EAAE,EAAE,EAAE;YAC9U,UAAU,EAAE,EAAE,OAAO,EAAE,4DAA4D,EAAE,SAAS,EAAE,kEAAkE,EAAE,SAAS,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,mBAAmB,EAAE,EAAE,WAAW,EAAE,EAAE,OAAO,EAAE,+DAA+D,EAAE,EAAE,EAAE;SACxT;KACF;IACD,KAAK,EAAE;QACL,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,OAAO,EAAE,mHAAmH,EAAE,SAAS,EAAE,2DAA2D,EAAE;KACpN;CACF,CAAC,CACH,CAAC","sourcesContent":["import {\n organizationProgressionStateAdminResourceUIBehavior as orgProgAdminSource,\n organizationProgressionStateMainResourceUIBehavior as orgProgMainSource,\n userProgressionStateMainResourceUIBehavior as userProgMainSource,\n} from '@wildo-ai/presets-components';\nimport { LabelAudience } from '@wildo-ai/presets-components-models';\nimport type { ResourceUIBehaviorConfig } from '@wildo-ai/saas-frontend-lib/companion';\nimport { CodeDeclarationKind, CodeSymbolKind, FieldSemanticImportance } from '@wildo-ai/zod-decorators';\nimport {\n CoreResourceOperation as Op,\n OrganizationProgressionStateSchema,\n ResourcePrimaryScope,\n UserProgressionStateSchema,\n organizationProgressionStateResourceConfiguration_InitializationFactory as organizationProgressionStateFactory,\n userProgressionStateResourceConfiguration_InitializationFactory as userProgressionStateFactory,\n} from '@wildo-ai/saas-models';\nimport {\n HttpResponseStatusCode,\n mergeResourceFrontendConfigurations,\n resourceFrontendConfiguration,\n resourceSpecification,\n resourceSpecificationFromFrontendConfiguration,\n} from '~wildo-specifications/_core';\nimport { EngineResourceSubDomain } from '../../engine-resource-sub-domain';\n\ntype UCfg = ReturnType<typeof userProgressionStateFactory>;\ntype UCore = UCfg['coreOperations'][number];\ntype UMain = UCfg['mainSchema'];\nconst userProgUI = userProgMainSource as ResourceUIBehaviorConfig<Record<string, never>, UCore, UMain>;\n\ntype OCfg = ReturnType<typeof organizationProgressionStateFactory>;\ntype OCore = OCfg['coreOperations'][number];\ntype OMain = OCfg['mainSchema'];\nconst orgProgMainUI = orgProgMainSource as ResourceUIBehaviorConfig<Record<string, never>, OCore, OMain>;\nconst orgProgAdminUI = orgProgAdminSource as ResourceUIBehaviorConfig<Record<string, never>, OCore, OMain>;\n\nconst USER_PROGRESSION_STATE_EXAMPLE = {\n milestonesAchieved: {\n 'milestone:completed-first-action': {\n achievedAt: '2026-08-04T08:30:00.000Z',\n count: 1,\n },\n 'milestone:completed-ten-actions': {\n achievedAt: '2026-08-12T09:15:00.000Z',\n count: 10,\n },\n },\n operationCounts: {\n 'todos:create': 12,\n 'todos:update': 31,\n },\n totalPoints: 175,\n categoriesProgress: {\n onboarding: { completedCount: 2, totalPoints: 175 },\n },\n userId: 'user_01JEXAMPLE',\n} as const;\n\nconst ORGANIZATION_PROGRESSION_STATE_EXAMPLE = {\n milestonesAchieved: {\n 'milestone:invited-first-member': {\n achievedAt: '2026-08-02T11:20:00.000Z',\n count: 1,\n },\n 'milestone:completed-hundred-actions': {\n achievedAt: '2026-08-18T15:45:00.000Z',\n count: 100,\n },\n },\n operationCounts: {\n 'organizationMembers:create': 8,\n 'todos:update': 146,\n },\n totalPoints: 850,\n categoriesProgress: {\n collaboration: { completedCount: 2, totalPoints: 850 },\n },\n organizationId: 'org_01JEXAMPLE',\n} as const;\n\nconst progressionSearchExample = (row: typeof USER_PROGRESSION_STATE_EXAMPLE | typeof ORGANIZATION_PROGRESSION_STATE_EXAMPLE) => ({\n data: [row],\n pagination: { page: 1, limit: 20, total: 1, totalPages: 1 },\n});\n\nconst userProgressionBase = resourceSpecification<Record<string, never>, UCore, UMain>(\n userProgressionStateFactory,\n UserProgressionStateSchema,\n ({ schemaShape }) => ({\n purpose: 'Per-user gamified progression: points, milestone achievements, per-category progress, and raw operation counts for guidance milestones.',\n businessRole: 'Drives “quests”, achievements, and feature unlock UX — separate from billing entitlements and from `USER_LIFECYCLE_STATE` stage.',\n lifecycleRole: 'The state starts at zero, accumulates qualifying operation counts, milestones and points, and remains readable through complete, contextual, compact and collection representations.',\n audience: LabelAudience.END_USER,\n subDomain: EngineResourceSubDomain.GUIDANCE,\n codeHandling: {\n mainSchema: { packageName: '@wildo-ai/saas-models', exportName: 'UserProgressionStateSchema', symbolKind: CodeSymbolKind.SCHEMA, declarationKind: CodeDeclarationKind.ZOD_SCHEMA },\n resourceFactory: { packageName: '@wildo-ai/saas-models', exportName: 'userProgressionStateResourceConfiguration_InitializationFactory', symbolKind: CodeSymbolKind.FACTORY, declarationKind: CodeDeclarationKind.FUNCTION },\n resourceType: { enumDeclaration: { packageName: '@wildo-ai/saas-models', exportName: 'CoreResourceType', symbolKind: CodeSymbolKind.ENUM, declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM }, memberName: 'USER_PROGRESSION_STATE' },\n operationVocabulary: { coreEnum: { packageName: '@wildo-ai/saas-models', exportName: 'CoreResourceOperation', symbolKind: CodeSymbolKind.ENUM, declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM } },\n frontendConfigurationSources: [{ packageName: '@wildo-ai/presets-components', exportName: 'userProgressionStateMainResourceUIBehavior', symbolKind: CodeSymbolKind.UI_BEHAVIOR }],\n notes: ['Runtime has no userNotifications / m2mNotifications — do not add communications.* (DF-1).'],\n },\n fields: {\n userId: schemaShape.userId.foreignKeySpec({\n meaning: 'Owning user for the progression document; immutable after create.',\n whyItMatters: 'Scopes READ/SEARCH through the user-self access strategy so a user can never read another user’s points and milestones.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n // USER and ORGANIZATION extend one shared Zod field instance. Clone it\n // before attaching scope-specific prose so descriptions cannot bleed\n // between the two generated OpenAPI schemas.\n totalPoints: schemaShape.totalPoints.clone().numberSpec({ meaning: 'Sum of points earned by this user from achieved milestones.', importance: FieldSemanticImportance.PRIMARY }),\n },\n operations: {\n [Op.READ]: {\n purpose: 'Read the signed-in user’s milestone progression state.',\n outcome: 'The caller receives the user’s total points, achieved milestones, contributing operation counts and per-category totals.',\n whenToUse: 'Use this endpoint to render achievement progress or reconcile a client’s locally displayed points with the server-owned state.',\n responseStatuses: [\n // Self-state read lazily materializes: no row yet yields a default zero-points state rather than 404, so 404 is intentionally NOT documented.\n { code: HttpResponseStatusCode.OK_200, meaning: 'The caller’s progression state (points, categories, milestone map) is returned; an un-materialized user yields a default zero-points state rather than a 404.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.UNAUTHORIZED_401, when: 'The request carries no authenticated user session, so the per-user progression state cannot be resolved.' },\n ],\n examples: [{\n title: 'Read the signed-in user progression state',\n request: { userId: USER_PROGRESSION_STATE_EXAMPLE.userId },\n response: USER_PROGRESSION_STATE_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n variants: {\n context: {\n purpose: 'Read the user progression row using the context representation.',\n outcome: 'The caller receives the progression row plus any relationship context configured for this application; when no context relationship is configured, the response shape is the progression row itself.',\n examples: [{\n title: 'Read the signed-in user progression context',\n request: { userId: USER_PROGRESSION_STATE_EXAMPLE.userId },\n response: USER_PROGRESSION_STATE_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n summary: {\n purpose: 'Read the compact user progression representation.',\n outcome: 'The caller receives only the owning user id and total points.',\n examples: [{\n title: 'Read the signed-in user progression summary',\n request: { userId: USER_PROGRESSION_STATE_EXAMPLE.userId },\n response: {\n totalPoints: USER_PROGRESSION_STATE_EXAMPLE.totalPoints,\n userId: USER_PROGRESSION_STATE_EXAMPLE.userId,\n },\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n idempotent: true,\n },\n [Op.CREATE]: {\n purpose: 'Internal system creation of the first progression row (INTERNAL_CALL, isDefault): eager-seeded via the USERS → USER_PROGRESSION_STATE `onParentCreate` composition lifecycle (createAsSystem), and created on demand by the milestone engine via the repository tier. Not a member-facing route.',\n outcome: 'New progression baseline when the user first touches guided milestones.',\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'A progression state baseline row was materialized for the user.' },\n ],\n // INTERNAL_CALL variant (isDefault) — the service tier createAsSystem resolves for the onParentCreate seed; also created by the milestone engine via the variant-agnostic repository tier. Not a public HTTP endpoint, so no client-facing 400/403/404 are documented.\n idempotent: false,\n },\n [Op.UPDATE]: {\n purpose: 'Engine increments on milestone events (REPOSITORY_ONLY).',\n outcome: 'Accurate counts and points after each qualifying operation in product.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The progression counters/points were updated after a qualifying milestone event.' },\n ],\n // REPOSITORY_ONLY variant — engine-driven, not a public HTTP endpoint. Increments are event-accumulating (not convergent), so a replayed update is NOT side-effect-free.\n idempotent: false,\n },\n [Op.SEARCH]: {\n purpose: 'Return the progression-state collection inside the addressed user scope.',\n outcome: 'The caller receives a paginated collection containing the user’s progression row when it has been materialized.',\n whenToUse: 'Use only when a collection envelope is more convenient than the singleton READ representation. This operation has no free-text searchable fields.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of user progression rows for future admin discovery.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.UNAUTHORIZED_401, when: 'The request carries no authenticated user session for the progression search context.' },\n ],\n examples: [{\n title: 'Return the user progression state as a collection',\n request: { userId: USER_PROGRESSION_STATE_EXAMPLE.userId, page: 1, limit: 20 },\n response: progressionSearchExample(USER_PROGRESSION_STATE_EXAMPLE),\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n idempotent: true,\n },\n [Op.DELETE]: {\n purpose: 'Repository-only teardown of the user progression state row when its owning user is deleted (composition `onParentDelete` cascade).',\n outcome: 'The singleton state row is removed together with the user — the composition part does not outlive its whole.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The user progression state row was deleted as part of the owning user’s deletion cascade.' },\n ],\n // REPOSITORY_ONLY variant (super-admin) — invoked by the onParentDelete cascade, not a public HTTP endpoint, so no client-facing 400/403/404 are documented.\n idempotent: true,\n },\n },\n businessConstraints: [\n 'Milestone ref keys in `milestonesAchieved` and `operationCounts` must align to configured milestone/operation keys from the product catalog — the spec does not enumerate them (data-driven at runtime).',\n ],\n }),\n { resourcePrimaryScope: ResourcePrimaryScope.USER_SELF },\n);\n\nconst organizationProgressionBase = resourceSpecification<Record<string, never>, OCore, OMain>(\n organizationProgressionStateFactory,\n OrganizationProgressionStateSchema,\n ({ schemaShape }) => ({\n purpose: 'Per-organization progression state: the same point/milestone/operation-count model as the user document, at tenant scale for org achievements.',\n businessRole: 'Powers org-wide “team quests” and tiered success metrics; distinct from per-member rows on `USER_PROGRESSION_STATE`.',\n lifecycleRole: 'The state starts at zero for a new organization, accumulates qualifying team activity, milestones and points, and remains readable by organization members.',\n audience: LabelAudience.END_USER,\n subDomain: EngineResourceSubDomain.GUIDANCE,\n codeHandling: {\n mainSchema: { packageName: '@wildo-ai/saas-models', exportName: 'OrganizationProgressionStateSchema', symbolKind: CodeSymbolKind.SCHEMA, declarationKind: CodeDeclarationKind.ZOD_SCHEMA },\n resourceFactory: { packageName: '@wildo-ai/saas-models', exportName: 'organizationProgressionStateResourceConfiguration_InitializationFactory', symbolKind: CodeSymbolKind.FACTORY, declarationKind: CodeDeclarationKind.FUNCTION },\n resourceType: { enumDeclaration: { packageName: '@wildo-ai/saas-models', exportName: 'CoreResourceType', symbolKind: CodeSymbolKind.ENUM, declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM }, memberName: 'ORGANIZATION_PROGRESSION_STATE' },\n operationVocabulary: { coreEnum: { packageName: '@wildo-ai/saas-models', exportName: 'CoreResourceOperation', symbolKind: CodeSymbolKind.ENUM, declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM } },\n frontendConfigurationSources: [\n { packageName: '@wildo-ai/presets-components', exportName: 'organizationProgressionStateMainResourceUIBehavior', symbolKind: CodeSymbolKind.UI_BEHAVIOR },\n { packageName: '@wildo-ai/presets-components', exportName: 'organizationProgressionStateAdminResourceUIBehavior', symbolKind: CodeSymbolKind.UI_BEHAVIOR },\n ],\n notes: ['Runtime has no userNotifications / m2mNotifications — do not add communications.* (DF-1).'],\n },\n fields: {\n organizationId: schemaShape.organizationId.foreignKeySpec({\n meaning: 'Owning organization for the shared progression document; immutable after create.',\n whyItMatters: 'Scopes READ/SEARCH through the org access strategy so a tenant can never read another tenant’s points and milestones.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n totalPoints: schemaShape.totalPoints.clone().numberSpec({ meaning: 'Total points earned by this organization from achieved milestones.', importance: FieldSemanticImportance.PRIMARY }),\n },\n operations: {\n [Op.READ]: {\n purpose: 'Read the addressed organization’s milestone progression state.',\n outcome: 'An organization member receives the organization’s total points, achieved milestones, contributing operation counts and per-category totals.',\n whenToUse: 'Use this endpoint to render organization-level achievements or reconcile a client’s displayed team progress with the server-owned state.',\n responseStatuses: [\n // Scoped-state read lazily materializes: an org with no row yet gets default zero-points state rather than 404, so 404 is intentionally NOT documented.\n { code: HttpResponseStatusCode.OK_200, meaning: 'The organization’s progression state (aggregated points and milestone map) is returned; an un-materialized org yields a default zero-points state rather than a 404.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.UNAUTHORIZED_401, when: 'The request carries no authenticated org-member session for the tenant progression state.' },\n ],\n examples: [{\n title: 'Read the organization progression state',\n request: { organizationId: ORGANIZATION_PROGRESSION_STATE_EXAMPLE.organizationId },\n response: ORGANIZATION_PROGRESSION_STATE_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n variants: {\n context: {\n purpose: 'Read the organization progression row using the context representation.',\n outcome: 'The caller receives the progression row plus any relationship context configured for this application; when no context relationship is configured, the response shape is the progression row itself.',\n examples: [{\n title: 'Read the organization progression context',\n request: { organizationId: ORGANIZATION_PROGRESSION_STATE_EXAMPLE.organizationId },\n response: ORGANIZATION_PROGRESSION_STATE_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n summary: {\n purpose: 'Read the compact organization progression representation.',\n outcome: 'The caller receives only the owning organization id and total points.',\n examples: [{\n title: 'Read the organization progression summary',\n request: { organizationId: ORGANIZATION_PROGRESSION_STATE_EXAMPLE.organizationId },\n response: {\n totalPoints: ORGANIZATION_PROGRESSION_STATE_EXAMPLE.totalPoints,\n organizationId: ORGANIZATION_PROGRESSION_STATE_EXAMPLE.organizationId,\n },\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n idempotent: true,\n },\n [Op.CREATE]: {\n purpose: 'Internal system creation of the first org progression row (INTERNAL_CALL, isDefault): eager-seeded via the ORGANIZATIONS → ORGANIZATION_PROGRESSION_STATE `onParentCreate` composition lifecycle (createAsSystem), and created on demand by the milestone engine via the repository tier. Not a member-facing route.',\n outcome: 'Initial empty maps for the org.',\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'A progression state baseline row with empty maps was materialized for the org.' },\n ],\n // INTERNAL_CALL variant (isDefault) — the service tier createAsSystem resolves for the onParentCreate seed; also created by the milestone engine via the variant-agnostic repository tier. Not a public HTTP endpoint, so no client-facing 400/403/404 are documented.\n idempotent: false,\n },\n [Op.UPDATE]: {\n purpose: 'Repository-only increments when org milestone rules fire.',\n outcome: 'Updated points and milestone map without direct member CRUD in typical flows.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The org progression counters/points were updated after a qualifying milestone event.' },\n ],\n // REPOSITORY_ONLY variant — engine-driven, not a public HTTP endpoint. Increments are event-accumulating (not convergent), so a replayed update is NOT side-effect-free.\n idempotent: false,\n },\n [Op.SEARCH]: {\n purpose: 'Return the progression-state collection inside the addressed organization scope.',\n outcome: 'The caller receives a paginated collection containing the organization’s progression row when it has been materialized.',\n whenToUse: 'Use only when a collection envelope is more convenient than the singleton READ representation. This operation has no free-text searchable fields.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of org progression rows; merged admin presets do not surface this as a navigable list.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.UNAUTHORIZED_401, when: 'The request carries no authenticated org-member session for the progression search context.' },\n ],\n examples: [{\n title: 'Return the organization progression state as a collection',\n request: { organizationId: ORGANIZATION_PROGRESSION_STATE_EXAMPLE.organizationId, page: 1, limit: 20 },\n response: progressionSearchExample(ORGANIZATION_PROGRESSION_STATE_EXAMPLE),\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n idempotent: true,\n },\n [Op.DELETE]: {\n purpose: 'Repository-only teardown of the organization progression state row when its owning organization is deleted (composition `onParentDelete` cascade).',\n outcome: 'The singleton state row is removed together with the organization — the composition part does not outlive its whole.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The organization progression state row was deleted as part of the owning organization’s deletion cascade.' },\n ],\n // REPOSITORY_ONLY variant (ORG_ADMIN) — invoked by the onParentDelete cascade, not a public HTTP endpoint, so no client-facing 400/403/404 are documented.\n idempotent: true,\n },\n },\n businessConstraints: [\n 'Merged `guidance` admin preset for org progression strips SEARCH; align `frontend.views` to merged UI only.',\n ],\n }),\n { resourcePrimaryScope: ResourcePrimaryScope.ORGANIZATIONS },\n);\n\nexport const userProgressionStateResourceSpecification = resourceSpecificationFromFrontendConfiguration(\n resourceFrontendConfiguration(userProgUI),\n userProgressionBase,\n () => ({\n label: { purpose: 'Preset `getFrontendResourceLabel` shows total points, e.g. “42 pts” for profile surfaces.' },\n layout: {\n purpose: 'Three section refs: `overview` (total points), `activity` (category + operation stats), `milestones` (achievement list).',\n displayPurpose: 'Read/search preset wiring keeps routes non-addressable; layout still describes the intended information hierarchy.',\n sections: {\n overview: {\n purpose: 'Primary `totalPoints` and headline progression summary.',\n whenToUse: 'User profile “Achievements” tab.',\n textSlots: { title: { purpose: 'Label the points overview card.' }, description: { purpose: 'Explain that points are derived from the milestone catalog, not ad-hoc user entry.' } },\n },\n activity: {\n purpose: '`categoriesProgress` and `operationCounts` for drill-down and debugging.',\n whenToUse: 'Support and power-user inspection of which operations contributed counts.',\n textSlots: { title: { purpose: 'Label the activity/telemetry block.' }, description: { purpose: 'Map keys are `resourceType:operation` strings per schema comment, not free text.' } },\n },\n milestones: {\n purpose: '`milestonesAchieved` record map with timestamps and counts.',\n whenToUse: 'When showing which named milestones the user has cleared.',\n textSlots: { title: { purpose: 'Label the milestone history block.' }, description: { purpose: 'Milestone ref strings come from the guidance/milestone spec catalog for the app.' } },\n },\n },\n },\n views: {\n [Op.READ]: { purpose: 'Read shell; non-addressable in default `views` configuration.', whenToUse: 'Embedded in profile and guidance surfaces when routed.' },\n [Op.SEARCH]: { purpose: 'Factory SEARCH + preset entry; still non-addressable in default `views` list.', whenToUse: 'Planned org-wide or admin user discovery, not a primary nav in current presets.' },\n },\n }),\n);\n\nexport const organizationProgressionStateResourceSpecification = resourceSpecificationFromFrontendConfiguration(\n mergeResourceFrontendConfigurations(resourceFrontendConfiguration(orgProgMainUI), resourceFrontendConfiguration(orgProgAdminUI)),\n organizationProgressionBase,\n () => ({\n label: { purpose: 'Same “N pts” label as user progression, scoped to the org’s shared row.' },\n layout: {\n purpose: 'Same `overview` / `activity` / `milestones` trisect as the user main bundle; merged admin only removes the SEARCH op from the `views` map if not surfaced in merged config.',\n displayPurpose: 'Org-facing achievements that roll up to tenant dashboards.',\n sections: {\n overview: { purpose: 'Org point total and headline.', whenToUse: 'Org home gamification when enabled.', textSlots: { title: { purpose: 'Org progression overview.' }, description: { purpose: 'Distinguish org totals from the sum of user rows — this is a single org-level document.' } } },\n activity: { purpose: 'Aggregated per-category and per-operation counts for the org channel.', whenToUse: 'When operators need to see which org events scored points.', textSlots: { title: { purpose: 'Activity stats.' }, description: { purpose: 'Keys follow the same `resourceType:operation` convention as user-level progression.' } } },\n milestones: { purpose: 'Milestone ref → achievement for org-wide quest completion.', whenToUse: 'When marketing or CS explains which org milestones are complete.', textSlots: { title: { purpose: 'Milestones block.' }, description: { purpose: 'May include zero or many entries depending on catalog wiring.' } } },\n },\n },\n views: {\n [Op.READ]: { purpose: 'Read-only progression host in merged `guidance` bundles; not addressable in the default `views` array in presets.', whenToUse: 'Org achievement surfaces in admin/tenant UIs when routed.' },\n },\n }),\n);\n"]}
1
+ {"version":3,"file":"progression-state.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/guidance/resources/progression-state.resource.specification.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mDAAmD,IAAI,kBAAkB,EACzE,kDAAkD,IAAI,iBAAiB,EACvE,0CAA0C,IAAI,kBAAkB,GACjE,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAEpE,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AACxG,OAAO,EACL,qBAAqB,IAAI,EAAE,EAC3B,kCAAkC,EAClC,oBAAoB,EACpB,0BAA0B,EAC1B,uEAAuE,IAAI,mCAAmC,EAC9G,+DAA+D,IAAI,2BAA2B,GAC/F,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,sBAAsB,EACtB,mCAAmC,EACnC,6BAA6B,EAC7B,qBAAqB,EACrB,8CAA8C,GAC/C,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAK3E,MAAM,UAAU,GAAG,kBAAmF,CAAC;AAKv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AAO,EAAE,yEAAyE,EAAE;IAC7F,MAAM,EAAE;QACN,OAAO,EAAE,6KAA6K;QACtL,cAAc,EAAE,4DAA4D;QAC5E,QAAQ,EAAE;YACR,QAAQ,EAAE,EAAE,OAAO,EAAE,+BAA+B,EAAE,SAAS,EAAE,qCAAqC,EAAE,SAAS,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,2BAA2B,EAAE,EAAE,WAAW,EAAE,EAAE,OAAO,EAAE,yFAAyF,EAAE,EAAE,EAAE;YAC7R,QAAQ,EAAE,EAAE,OAAO,EAAE,uEAAuE,EAAE,SAAS,EAAE,4DAA4D,EAAE,SAAS,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,iBAAiB,EAAE,EAAE,WAAW,EAAE,EAAE,OAAO,EAAE,qFAAqF,EAAE,EAAE,EAAE;YAC9U,UAAU,EAAE,EAAE,OAAO,EAAE,4DAA4D,EAAE,SAAS,EAAE,kEAAkE,EAAE,SAAS,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,mBAAmB,EAAE,EAAE,WAAW,EAAE,EAAE,OAAO,EAAE,+DAA+D,EAAE,EAAE,EAAE;SACxT;KACF;IACD,KAAK,EAAE;QACL,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,OAAO,EAAE,mHAAmH,EAAE,SAAS,EAAE,2DAA2D,EAAE;KACpN;CACF,CAAC,CACH,CAAC","sourcesContent":["import {\n organizationProgressionStateAdminResourceUIBehavior as orgProgAdminSource,\n organizationProgressionStateMainResourceUIBehavior as orgProgMainSource,\n userProgressionStateMainResourceUIBehavior as userProgMainSource,\n} from '@wildo-ai/presets-components';\nimport { LabelAudience } from '@wildo-ai/presets-components-models';\nimport type { ResourceUIBehaviorConfig } from '@wildo-ai/saas-frontend-lib/companion';\nimport { CodeDeclarationKind, CodeSymbolKind, FieldSemanticImportance } from '@wildo-ai/zod-decorators';\nimport {\n CoreResourceOperation as Op,\n OrganizationProgressionStateSchema,\n ResourcePrimaryScope,\n UserProgressionStateSchema,\n organizationProgressionStateResourceConfiguration_InitializationFactory as organizationProgressionStateFactory,\n userProgressionStateResourceConfiguration_InitializationFactory as userProgressionStateFactory,\n} from '@wildo-ai/saas-models';\nimport {\n HttpResponseStatusCode,\n mergeResourceFrontendConfigurations,\n resourceFrontendConfiguration,\n resourceSpecification,\n resourceSpecificationFromFrontendConfiguration,\n} from '~wildo-specifications/_core';\nimport { EngineResourceSubDomain } from '../../engine-resource-sub-domain';\n\ntype UCfg = ReturnType<typeof userProgressionStateFactory>;\ntype UCore = UCfg['coreOperations'][number];\ntype UMain = UCfg['mainSchema'];\nconst userProgUI = userProgMainSource as ResourceUIBehaviorConfig<Record<string, never>, UCore, UMain>;\n\ntype OCfg = ReturnType<typeof organizationProgressionStateFactory>;\ntype OCore = OCfg['coreOperations'][number];\ntype OMain = OCfg['mainSchema'];\nconst orgProgMainUI = orgProgMainSource as ResourceUIBehaviorConfig<Record<string, never>, OCore, OMain>;\nconst orgProgAdminUI = orgProgAdminSource as ResourceUIBehaviorConfig<Record<string, never>, OCore, OMain>;\n\nconst USER_PROGRESSION_STATE_EXAMPLE = {\n milestonesAchieved: {\n 'milestone:completed-first-action': {\n achievedAt: '2026-08-04T08:30:00.000Z',\n count: 1,\n },\n 'milestone:completed-ten-actions': {\n achievedAt: '2026-08-12T09:15:00.000Z',\n count: 10,\n },\n },\n operationCounts: {\n 'todos:create': 12,\n 'todos:update': 31,\n },\n totalPoints: 175,\n categoriesProgress: {\n onboarding: { completedCount: 2, totalPoints: 175 },\n },\n userId: 'user_01JEXAMPLE',\n} as const;\n\nconst ORGANIZATION_PROGRESSION_STATE_EXAMPLE = {\n milestonesAchieved: {\n 'milestone:invited-first-member': {\n achievedAt: '2026-08-02T11:20:00.000Z',\n count: 1,\n },\n 'milestone:completed-hundred-actions': {\n achievedAt: '2026-08-18T15:45:00.000Z',\n count: 100,\n },\n },\n operationCounts: {\n 'organizationMembers:create': 8,\n 'todos:update': 146,\n },\n totalPoints: 850,\n categoriesProgress: {\n collaboration: { completedCount: 2, totalPoints: 850 },\n },\n organizationId: 'org_01JEXAMPLE',\n} as const;\n\nconst progressionSearchExample = (row: typeof USER_PROGRESSION_STATE_EXAMPLE | typeof ORGANIZATION_PROGRESSION_STATE_EXAMPLE) => ({\n data: [row],\n pagination: { page: 1, limit: 20, total: 1, totalPages: 1 },\n});\n\nconst userProgressionBase = resourceSpecification<Record<string, never>, UCore, UMain>(\n userProgressionStateFactory,\n UserProgressionStateSchema,\n ({ schemaShape }) => ({\n purpose: 'Per-user gamified progression: points, milestone achievements, per-category progress, and raw operation counts for guidance milestones.',\n businessRole: 'Drives “quests”, achievements, and feature unlock UX — separate from billing entitlements and from `USER_LIFECYCLE_STATE` stage.',\n lifecycleRole: 'The state starts at zero, accumulates qualifying operation counts, milestones and points, and remains readable through complete, contextual, compact and collection representations.',\n audience: LabelAudience.END_USER,\n subDomain: EngineResourceSubDomain.GUIDANCE,\n codeHandling: {\n mainSchema: { packageName: '@wildo-ai/saas-models', exportName: 'UserProgressionStateSchema', symbolKind: CodeSymbolKind.SCHEMA, declarationKind: CodeDeclarationKind.ZOD_SCHEMA },\n resourceFactory: { packageName: '@wildo-ai/saas-models', exportName: 'userProgressionStateResourceConfiguration_InitializationFactory', symbolKind: CodeSymbolKind.FACTORY, declarationKind: CodeDeclarationKind.FUNCTION },\n resourceType: { enumDeclaration: { packageName: '@wildo-ai/saas-models', exportName: 'CoreResourceType', symbolKind: CodeSymbolKind.ENUM, declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM }, memberName: 'USER_PROGRESSION_STATE' },\n operationVocabulary: { coreEnum: { packageName: '@wildo-ai/saas-models', exportName: 'CoreResourceOperation', symbolKind: CodeSymbolKind.ENUM, declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM } },\n frontendConfigurationSources: [{ packageName: '@wildo-ai/presets-components', exportName: 'userProgressionStateMainResourceUIBehavior', symbolKind: CodeSymbolKind.UI_BEHAVIOR }],\n notes: ['Runtime has no userNotifications / m2mNotifications — do not add communications.* (DF-1).'],\n },\n fields: {\n userId: schemaShape.userId.foreignKeySpec({\n meaning: 'Owning user for the progression document; immutable after create.',\n whyItMatters: 'Scopes READ/SEARCH through the user-self access strategy so a user can never read another user’s points and milestones.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n // USER and ORGANIZATION extend one shared Zod field instance. Clone it\n // before attaching scope-specific prose so descriptions cannot bleed\n // between the two generated OpenAPI schemas.\n totalPoints: schemaShape.totalPoints.clone().numberSpec({ meaning: 'Sum of points earned by this user from achieved milestones.', importance: FieldSemanticImportance.PRIMARY }),\n },\n operations: {\n [Op.READ]: {\n purpose: 'Read the signed-in user’s milestone progression state.',\n outcome: 'The caller receives the user’s total points, achieved milestones, contributing operation counts and per-category totals.',\n whenToUse: 'Use this endpoint to render achievement progress or reconcile a client’s locally displayed points with the server-owned state.',\n responseStatuses: [\n // Self-state read lazily materializes: no row yet yields a default zero-points state rather than 404, so 404 is intentionally NOT documented.\n { code: HttpResponseStatusCode.OK_200, meaning: 'The caller’s progression state (points, categories, milestone map) is returned; an un-materialized user yields a default zero-points state rather than a 404.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.UNAUTHORIZED_401, when: 'The request carries no authenticated user session, so the per-user progression state cannot be resolved.' },\n ],\n examples: [{\n title: 'Read the signed-in user progression state',\n request: { userId: USER_PROGRESSION_STATE_EXAMPLE.userId },\n response: USER_PROGRESSION_STATE_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n variants: {\n context: {\n purpose: 'Read the user progression row using the context representation.',\n outcome: 'The caller receives the progression row plus any relationship context configured for this application; when no context relationship is configured, the response shape is the progression row itself.',\n examples: [{\n title: 'Read the signed-in user progression context',\n request: { userId: USER_PROGRESSION_STATE_EXAMPLE.userId },\n response: USER_PROGRESSION_STATE_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n summary: {\n purpose: 'Read the compact user progression representation.',\n outcome: 'The caller receives only the owning user id and total points.',\n examples: [{\n title: 'Read the signed-in user progression summary',\n request: { userId: USER_PROGRESSION_STATE_EXAMPLE.userId },\n response: {\n totalPoints: USER_PROGRESSION_STATE_EXAMPLE.totalPoints,\n userId: USER_PROGRESSION_STATE_EXAMPLE.userId,\n },\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n idempotent: true,\n },\n [Op.CREATE]: {\n purpose: 'Internal system creation of the first progression row (INTERNAL_CALL, isDefault): eager-seeded via the USERS → USER_PROGRESSION_STATE `onParentCreate` composition lifecycle (createAsSystem), and created on demand by the milestone engine via the repository tier. Not a member-facing route.',\n outcome: 'New progression baseline when the user first touches guided milestones.',\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'A progression state baseline record was materialized for the user.' },\n ],\n // INTERNAL_CALL variant (isDefault) — the service tier createAsSystem resolves for the onParentCreate seed; also created by the milestone engine via the variant-agnostic repository tier. Not a public HTTP endpoint, so no client-facing 400/403/404 are documented.\n idempotent: false,\n },\n [Op.UPDATE]: {\n purpose: 'Engine increments on milestone events (REPOSITORY_ONLY).',\n outcome: 'Accurate counts and points after each qualifying operation in product.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The progression counters/points were updated after a qualifying milestone event.' },\n ],\n // REPOSITORY_ONLY variant — engine-driven, not a public HTTP endpoint. Increments are event-accumulating (not convergent), so a replayed update is NOT side-effect-free.\n idempotent: false,\n },\n [Op.SEARCH]: {\n purpose: 'Return the progression-state collection inside the addressed user scope.',\n outcome: 'The caller receives a paginated collection containing the user’s progression row when it has been materialized.',\n whenToUse: 'Use only when a collection envelope is more convenient than the singleton READ representation. This operation has no free-text searchable fields.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of user progression records for future admin discovery.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.UNAUTHORIZED_401, when: 'The request carries no authenticated user session for the progression search context.' },\n ],\n examples: [{\n title: 'Return the user progression state as a collection',\n request: { userId: USER_PROGRESSION_STATE_EXAMPLE.userId, page: 1, limit: 20 },\n response: progressionSearchExample(USER_PROGRESSION_STATE_EXAMPLE),\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n idempotent: true,\n },\n [Op.DELETE]: {\n purpose: 'Repository-only teardown of the user progression state row when its owning user is deleted (composition `onParentDelete` cascade).',\n outcome: 'The singleton state row is removed together with the user — the composition part does not outlive its whole.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The user progression state record was deleted as part of the owning user’s deletion cascade.' },\n ],\n // REPOSITORY_ONLY variant (super-admin) — invoked by the onParentDelete cascade, not a public HTTP endpoint, so no client-facing 400/403/404 are documented.\n idempotent: true,\n },\n },\n businessConstraints: [\n 'Milestone ref keys in `milestonesAchieved` and `operationCounts` must align to configured milestone/operation keys from the product catalog — the spec does not enumerate them (data-driven at runtime).',\n ],\n }),\n { resourcePrimaryScope: ResourcePrimaryScope.USER_SELF },\n);\n\nconst organizationProgressionBase = resourceSpecification<Record<string, never>, OCore, OMain>(\n organizationProgressionStateFactory,\n OrganizationProgressionStateSchema,\n ({ schemaShape }) => ({\n purpose: 'Per-organization progression state: the same point/milestone/operation-count model as the user document, at tenant scale for org achievements.',\n businessRole: 'Powers org-wide “team quests” and tiered success metrics; distinct from per-member rows on `USER_PROGRESSION_STATE`.',\n lifecycleRole: 'The state starts at zero for a new organization, accumulates qualifying team activity, milestones and points, and remains readable by organization members.',\n audience: LabelAudience.END_USER,\n subDomain: EngineResourceSubDomain.GUIDANCE,\n codeHandling: {\n mainSchema: { packageName: '@wildo-ai/saas-models', exportName: 'OrganizationProgressionStateSchema', symbolKind: CodeSymbolKind.SCHEMA, declarationKind: CodeDeclarationKind.ZOD_SCHEMA },\n resourceFactory: { packageName: '@wildo-ai/saas-models', exportName: 'organizationProgressionStateResourceConfiguration_InitializationFactory', symbolKind: CodeSymbolKind.FACTORY, declarationKind: CodeDeclarationKind.FUNCTION },\n resourceType: { enumDeclaration: { packageName: '@wildo-ai/saas-models', exportName: 'CoreResourceType', symbolKind: CodeSymbolKind.ENUM, declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM }, memberName: 'ORGANIZATION_PROGRESSION_STATE' },\n operationVocabulary: { coreEnum: { packageName: '@wildo-ai/saas-models', exportName: 'CoreResourceOperation', symbolKind: CodeSymbolKind.ENUM, declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM } },\n frontendConfigurationSources: [\n { packageName: '@wildo-ai/presets-components', exportName: 'organizationProgressionStateMainResourceUIBehavior', symbolKind: CodeSymbolKind.UI_BEHAVIOR },\n { packageName: '@wildo-ai/presets-components', exportName: 'organizationProgressionStateAdminResourceUIBehavior', symbolKind: CodeSymbolKind.UI_BEHAVIOR },\n ],\n notes: ['Runtime has no userNotifications / m2mNotifications — do not add communications.* (DF-1).'],\n },\n fields: {\n organizationId: schemaShape.organizationId.foreignKeySpec({\n meaning: 'Owning organization for the shared progression document; immutable after create.',\n whyItMatters: 'Scopes READ/SEARCH through the org access strategy so a tenant can never read another tenant’s points and milestones.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n totalPoints: schemaShape.totalPoints.clone().numberSpec({ meaning: 'Total points earned by this organization from achieved milestones.', importance: FieldSemanticImportance.PRIMARY }),\n },\n operations: {\n [Op.READ]: {\n purpose: 'Read the addressed organization’s milestone progression state.',\n outcome: 'An organization member receives the organization’s total points, achieved milestones, contributing operation counts and per-category totals.',\n whenToUse: 'Use this endpoint to render organization-level achievements or reconcile a client’s displayed team progress with the server-owned state.',\n responseStatuses: [\n // Scoped-state read lazily materializes: an org with no row yet gets default zero-points state rather than 404, so 404 is intentionally NOT documented.\n { code: HttpResponseStatusCode.OK_200, meaning: 'The organization’s progression state (aggregated points and milestone map) is returned; an un-materialized org yields a default zero-points state rather than a 404.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.UNAUTHORIZED_401, when: 'The request carries no authenticated org-member session for the tenant progression state.' },\n ],\n examples: [{\n title: 'Read the organization progression state',\n request: { organizationId: ORGANIZATION_PROGRESSION_STATE_EXAMPLE.organizationId },\n response: ORGANIZATION_PROGRESSION_STATE_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n variants: {\n context: {\n purpose: 'Read the organization progression row using the context representation.',\n outcome: 'The caller receives the progression row plus any relationship context configured for this application; when no context relationship is configured, the response shape is the progression row itself.',\n examples: [{\n title: 'Read the organization progression context',\n request: { organizationId: ORGANIZATION_PROGRESSION_STATE_EXAMPLE.organizationId },\n response: ORGANIZATION_PROGRESSION_STATE_EXAMPLE,\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n summary: {\n purpose: 'Read the compact organization progression representation.',\n outcome: 'The caller receives only the owning organization id and total points.',\n examples: [{\n title: 'Read the organization progression summary',\n request: { organizationId: ORGANIZATION_PROGRESSION_STATE_EXAMPLE.organizationId },\n response: {\n totalPoints: ORGANIZATION_PROGRESSION_STATE_EXAMPLE.totalPoints,\n organizationId: ORGANIZATION_PROGRESSION_STATE_EXAMPLE.organizationId,\n },\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n },\n },\n idempotent: true,\n },\n [Op.CREATE]: {\n purpose: 'Internal system creation of the first org progression row (INTERNAL_CALL, isDefault): eager-seeded via the ORGANIZATIONS → ORGANIZATION_PROGRESSION_STATE `onParentCreate` composition lifecycle (createAsSystem), and created on demand by the milestone engine via the repository tier. Not a member-facing route.',\n outcome: 'Initial empty maps for the org.',\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'A progression state baseline record with empty maps was materialized for the org.' },\n ],\n // INTERNAL_CALL variant (isDefault) — the service tier createAsSystem resolves for the onParentCreate seed; also created by the milestone engine via the variant-agnostic repository tier. Not a public HTTP endpoint, so no client-facing 400/403/404 are documented.\n idempotent: false,\n },\n [Op.UPDATE]: {\n purpose: 'Repository-only increments when org milestone rules fire.',\n outcome: 'Updated points and milestone map without direct member CRUD in typical flows.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The org progression counters/points were updated after a qualifying milestone event.' },\n ],\n // REPOSITORY_ONLY variant — engine-driven, not a public HTTP endpoint. Increments are event-accumulating (not convergent), so a replayed update is NOT side-effect-free.\n idempotent: false,\n },\n [Op.SEARCH]: {\n purpose: 'Return the progression-state collection inside the addressed organization scope.',\n outcome: 'The caller receives a paginated collection containing the organization’s progression row when it has been materialized.',\n whenToUse: 'Use only when a collection envelope is more convenient than the singleton READ representation. This operation has no free-text searchable fields.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A (possibly empty) page of org progression records; merged admin presets do not surface this as a navigable list.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.UNAUTHORIZED_401, when: 'The request carries no authenticated org-member session for the progression search context.' },\n ],\n examples: [{\n title: 'Return the organization progression state as a collection',\n request: { organizationId: ORGANIZATION_PROGRESSION_STATE_EXAMPLE.organizationId, page: 1, limit: 20 },\n response: progressionSearchExample(ORGANIZATION_PROGRESSION_STATE_EXAMPLE),\n forStatus: HttpResponseStatusCode.OK_200,\n }],\n idempotent: true,\n },\n [Op.DELETE]: {\n purpose: 'Repository-only teardown of the organization progression state row when its owning organization is deleted (composition `onParentDelete` cascade).',\n outcome: 'The singleton state row is removed together with the organization — the composition part does not outlive its whole.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The organization progression state record was deleted as part of the owning organization’s deletion cascade.' },\n ],\n // REPOSITORY_ONLY variant (ORG_ADMIN) — invoked by the onParentDelete cascade, not a public HTTP endpoint, so no client-facing 400/403/404 are documented.\n idempotent: true,\n },\n },\n businessConstraints: [\n 'Merged `guidance` admin preset for org progression strips SEARCH; align `frontend.views` to merged UI only.',\n ],\n }),\n { resourcePrimaryScope: ResourcePrimaryScope.ORGANIZATIONS },\n);\n\nexport const userProgressionStateResourceSpecification = resourceSpecificationFromFrontendConfiguration(\n resourceFrontendConfiguration(userProgUI),\n userProgressionBase,\n () => ({\n label: { purpose: 'Preset `getFrontendResourceLabel` shows total points, e.g. “42 pts” for profile surfaces.' },\n layout: {\n purpose: 'Three section refs: `overview` (total points), `activity` (category + operation stats), `milestones` (achievement list).',\n displayPurpose: 'Read/search preset wiring keeps routes non-addressable; layout still describes the intended information hierarchy.',\n sections: {\n overview: {\n purpose: 'Primary `totalPoints` and headline progression summary.',\n whenToUse: 'User profile “Achievements” tab.',\n textSlots: { title: { purpose: 'Label the points overview card.' }, description: { purpose: 'Explain that points are derived from the milestone catalog, not ad-hoc user entry.' } },\n },\n activity: {\n purpose: '`categoriesProgress` and `operationCounts` for drill-down and debugging.',\n whenToUse: 'Support and power-user inspection of which operations contributed counts.',\n textSlots: { title: { purpose: 'Label the activity/telemetry block.' }, description: { purpose: 'Map keys are `resourceType:operation` strings per schema comment, not free text.' } },\n },\n milestones: {\n purpose: '`milestonesAchieved` record map with timestamps and counts.',\n whenToUse: 'When showing which named milestones the user has cleared.',\n textSlots: { title: { purpose: 'Label the milestone history block.' }, description: { purpose: 'Milestone ref strings come from the guidance/milestone spec catalog for the app.' } },\n },\n },\n },\n views: {\n [Op.READ]: { purpose: 'Read shell; non-addressable in default `views` configuration.', whenToUse: 'Embedded in profile and guidance surfaces when routed.' },\n [Op.SEARCH]: { purpose: 'Factory SEARCH + preset entry; still non-addressable in default `views` list.', whenToUse: 'Planned org-wide or admin user discovery, not a primary nav in current presets.' },\n },\n }),\n);\n\nexport const organizationProgressionStateResourceSpecification = resourceSpecificationFromFrontendConfiguration(\n mergeResourceFrontendConfigurations(resourceFrontendConfiguration(orgProgMainUI), resourceFrontendConfiguration(orgProgAdminUI)),\n organizationProgressionBase,\n () => ({\n label: { purpose: 'Same “N pts” label as user progression, scoped to the org’s shared row.' },\n layout: {\n purpose: 'Same `overview` / `activity` / `milestones` trisect as the user main bundle; merged admin only removes the SEARCH op from the `views` map if not surfaced in merged config.',\n displayPurpose: 'Org-facing achievements that roll up to tenant dashboards.',\n sections: {\n overview: { purpose: 'Org point total and headline.', whenToUse: 'Org home gamification when enabled.', textSlots: { title: { purpose: 'Org progression overview.' }, description: { purpose: 'Distinguish org totals from the sum of user rows — this is a single org-level document.' } } },\n activity: { purpose: 'Aggregated per-category and per-operation counts for the org channel.', whenToUse: 'When operators need to see which org events scored points.', textSlots: { title: { purpose: 'Activity stats.' }, description: { purpose: 'Keys follow the same `resourceType:operation` convention as user-level progression.' } } },\n milestones: { purpose: 'Milestone ref → achievement for org-wide quest completion.', whenToUse: 'When marketing or CS explains which org milestones are complete.', textSlots: { title: { purpose: 'Milestones block.' }, description: { purpose: 'May include zero or many entries depending on catalog wiring.' } } },\n },\n },\n views: {\n [Op.READ]: { purpose: 'Read-only progression host in merged `guidance` bundles; not addressable in the default `views` array in presets.', whenToUse: 'Org achievement surfaces in admin/tenant UIs when routed.' },\n },\n }),\n);\n"]}
@@ -10,6 +10,7 @@ export * from './billing';
10
10
  export * from './errors';
11
11
  export * from './guidance';
12
12
  export * from './features';
13
+ export * from './providers';
13
14
  export * from './frontend-components';
14
15
  export * from './full-custom-views';
15
16
  export * from './notifications';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/engine/index.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,cAAc,SAAS,CAAC;AACxB,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,kBAAkB,CAAC;AACjC,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,SAAS,CAAC;AACxB,cAAc,8BAA8B,CAAC;AAC7C,cAAc,2CAA2C,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/engine/index.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,cAAc,SAAS,CAAC;AACxB,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,kBAAkB,CAAC;AACjC,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,SAAS,CAAC;AACxB,cAAc,8BAA8B,CAAC;AAC7C,cAAc,2CAA2C,CAAC"}
@@ -10,6 +10,7 @@ export * from './billing/index.js';
10
10
  export * from './errors/index.js';
11
11
  export * from './guidance/index.js';
12
12
  export * from './features/index.js';
13
+ export * from './providers/index.js';
13
14
  export * from './frontend-components/index.js';
14
15
  export * from './full-custom-views/index.js';
15
16
  export * from './notifications/index.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/engine/index.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,cAAc,SAAS,CAAC;AACxB,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,kBAAkB,CAAC;AACjC,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,SAAS,CAAC;AACxB,cAAc,8BAA8B,CAAC;AAC7C,cAAc,2CAA2C,CAAC","sourcesContent":["import './_bootstrap';\n\nexport * from './users';\nexport * from './organizations';\nexport * from './applications';\nexport * from './files';\nexport * from './infrastructure';\nexport * from './auth';\nexport * from './compliance';\nexport * from './billing';\nexport * from './errors';\nexport * from './guidance';\nexport * from './features';\nexport * from './frontend-components';\nexport * from './full-custom-views';\nexport * from './notifications';\nexport * from './roles';\nexport * from './engine-resource-sub-domain';\nexport * from './engine-resource-specifications.registry';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/engine/index.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,cAAc,SAAS,CAAC;AACxB,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,kBAAkB,CAAC;AACjC,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,SAAS,CAAC;AACxB,cAAc,8BAA8B,CAAC;AAC7C,cAAc,2CAA2C,CAAC","sourcesContent":["import './_bootstrap';\n\nexport * from './users';\nexport * from './organizations';\nexport * from './applications';\nexport * from './files';\nexport * from './infrastructure';\nexport * from './auth';\nexport * from './compliance';\nexport * from './billing';\nexport * from './errors';\nexport * from './guidance';\nexport * from './features';\nexport * from './providers';\nexport * from './frontend-components';\nexport * from './full-custom-views';\nexport * from './notifications';\nexport * from './roles';\nexport * from './engine-resource-sub-domain';\nexport * from './engine-resource-specifications.registry';\n"]}
@@ -122,14 +122,14 @@ export const dataSeedRunsResourceSpecification = resourceSpecification(dataSeedR
122
122
  },
123
123
  values: {
124
124
  [DataSeedMode.LAZY]: { meaning: 'Create the entry the first time the scope is accessed if it is missing. Always safe to repeat.' },
125
- [DataSeedMode.ADDITIVE]: { meaning: 'Insert entries that are absent and re-apply the declared payload to entries that are present. Never removes anything and never walks rows outside the declared set.' },
125
+ [DataSeedMode.ADDITIVE]: { meaning: 'Insert entries that are absent and re-apply the declared payload to entries that are present. Never removes anything and never walks records outside the declared set.' },
126
126
  [DataSeedMode.UPGRADE]: { meaning: 'Insert entries that are absent and migrate entries whose recorded version is behind the declared one.' },
127
- [DataSeedMode.SYNC]: { meaning: 'Treat the declared entries as the full truth: insert what is missing, update what changed, and handle rows that are no longer declared according to the seed orphan policy.' },
127
+ [DataSeedMode.SYNC]: { meaning: 'Treat the declared entries as the full truth: insert what is missing, update what changed, and handle records that are no longer declared according to the seed orphan policy.' },
128
128
  },
129
129
  importance: FieldSemanticImportance.PRIMARY,
130
130
  }),
131
131
  scopeKind: schemaShape.scopeKind.enumSpec({
132
- meaning: 'The unit this pass seeded — the whole database, one application, one organization, one user, or one row of some other resource type.',
132
+ meaning: 'The unit this pass seeded — the whole database, one application, one organization, one user, or one record of some other resource type.',
133
133
  whyItMatters: 'Seeding is idempotent per scope, so the scope is half of the answer to "has this already run?".',
134
134
  enumDeclaration: {
135
135
  packageName: '@wildo-ai/saas-backend-lib',
@@ -138,20 +138,20 @@ export const dataSeedRunsResourceSpecification = resourceSpecification(dataSeedR
138
138
  declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,
139
139
  },
140
140
  values: {
141
- [DataSeedScopeKind.GLOBAL]: { meaning: 'Applied once for the whole database. There is no anchor row.' },
141
+ [DataSeedScopeKind.GLOBAL]: { meaning: 'Applied once for the whole database. There is no anchor record.' },
142
142
  [DataSeedScopeKind.APPLICATION]: { meaning: 'Applied once per application.' },
143
143
  [DataSeedScopeKind.ORGANIZATION]: { meaning: 'Applied once per organization.' },
144
144
  [DataSeedScopeKind.USER]: { meaning: 'Applied once per user.' },
145
- [DataSeedScopeKind.CUSTOM]: { meaning: 'Applied once per row of some other resource type, which is named separately on the pass.' },
145
+ [DataSeedScopeKind.CUSTOM]: { meaning: 'Applied once per record of some other resource type, which is named separately on the pass.' },
146
146
  },
147
147
  importance: FieldSemanticImportance.PRIMARY,
148
148
  }),
149
149
  relatedResourceType: schemaShape.relatedResourceType.stringSpec({
150
- meaning: 'The resource type whose row anchors a custom-scope pass. Empty for the built-in scopes, whose resource is implied by the scope itself.',
150
+ meaning: 'The resource type whose record anchors a custom-scope pass. Empty for the built-in scopes, whose resource is implied by the scope itself.',
151
151
  whyItMatters: 'Two custom-scope seeds can legitimately anchor on the same row identifier under different resource types, so this is what keeps their histories apart.',
152
152
  }),
153
153
  relatedId: schemaShape.relatedId.stringSpec({
154
- meaning: 'Identifier of the row that anchors this scope. Empty only for a database-wide pass, which has no anchor.',
154
+ meaning: 'Identifier of the record that anchors this scope. Empty only for a database-wide pass, which has no anchor.',
155
155
  whyItMatters: 'It is what narrows the ledger from "every run of this seed" to "the run for this particular organization, user, or row".',
156
156
  semanticRole: 'identifier',
157
157
  }),
@@ -209,30 +209,30 @@ export const dataSeedRunsResourceSpecification = resourceSpecification(dataSeedR
209
209
  importance: FieldSemanticImportance.PRIMARY,
210
210
  }),
211
211
  entriesInserted: schemaShape.entriesInserted.numberSpec({
212
- meaning: 'How many declared entries were written because no matching row existed.',
212
+ meaning: 'How many declared entries were written because no matching record existed.',
213
213
  }),
214
214
  entriesUpdated: schemaShape.entriesUpdated.numberSpec({
215
- meaning: 'How many already-present rows had the declared payload re-applied to them.',
215
+ meaning: 'How many already-present records had the declared payload re-applied to them.',
216
216
  whyItMatters: 'This is the additive-mode counter. A version migration is counted separately, so a non-zero value here means the payload was re-stamped, not migrated.',
217
217
  }),
218
218
  entriesUpgraded: schemaShape.entriesUpgraded.numberSpec({
219
- meaning: 'How many present rows were behind the declared version and were migrated forward.',
219
+ meaning: 'How many present records were behind the declared version and were migrated forward.',
220
220
  }),
221
221
  entriesRenamed: schemaShape.entriesRenamed.numberSpec({
222
- meaning: 'How many rows were relocated from a previous identity because the declaration renamed them.',
222
+ meaning: 'How many records were relocated from a previous identity because the declaration renamed them.',
223
223
  }),
224
224
  entriesSkipped: schemaShape.entriesSkipped.numberSpec({
225
225
  meaning: 'How many declared entries the pass deliberately left untouched — already current, or protected from being moved backwards.',
226
226
  whyItMatters: 'Skipping is a normal outcome, not a failure; the reason for each skip is reported separately.',
227
227
  }),
228
228
  entriesDeleted: schemaShape.entriesDeleted.numberSpec({
229
- meaning: 'How many rows outside the declared set were removed. Only a full-reconciliation pass configured to delete can produce this.',
229
+ meaning: 'How many records outside the declared set were removed. Only a full-reconciliation pass configured to delete can produce this.',
230
230
  }),
231
231
  entriesDeprecated: schemaShape.entriesDeprecated.numberSpec({
232
- meaning: 'How many rows outside the declared set were marked deprecated instead of removed.',
232
+ meaning: 'How many records outside the declared set were marked deprecated instead of removed.',
233
233
  }),
234
234
  entriesReportedOrphans: schemaShape.entriesReportedOrphans.numberSpec({
235
- meaning: 'How many rows outside the declared set were only reported, leaving the rows themselves untouched.',
235
+ meaning: 'How many records outside the declared set were only reported, leaving the records themselves untouched.',
236
236
  }),
237
237
  entriesFailed: schemaShape.entriesFailed.numberSpec({
238
238
  meaning: 'How many entries could not be written. The pass continues and settles as partial.',
@@ -240,7 +240,7 @@ export const dataSeedRunsResourceSpecification = resourceSpecification(dataSeedR
240
240
  importance: FieldSemanticImportance.PRIMARY,
241
241
  }),
242
242
  failureReport: schemaShape.failureReport.objectSpec({
243
- meaning: 'Detailed breakdown of everything non-trivial the pass encountered: which entries failed and why, which rows fell outside the declared set, and any error that stopped the pass as a whole. Empty when everything succeeded.',
243
+ meaning: 'Detailed breakdown of everything non-trivial the pass encountered: which entries failed and why, which records fell outside the declared set, and any error that stopped the pass as a whole. Empty when everything succeeded.',
244
244
  whyItMatters: 'It is what lets an operator diagnose a partial or failed pass without going to application logs.',
245
245
  importance: FieldSemanticImportance.PRIMARY,
246
246
  }),
@@ -269,7 +269,7 @@ export const dataSeedRunsResourceSpecification = resourceSpecification(dataSeedR
269
269
  purpose: 'Open the ledger row for a seeding pass that is about to start.',
270
270
  outcome: 'The pass becomes visible as running before it touches any data, so a crash mid-pass leaves a trace rather than nothing.',
271
271
  responseStatuses: [
272
- { code: HttpResponseStatusCode.CREATED_201, meaning: 'The pass was recorded as running and the row is returned.' },
272
+ { code: HttpResponseStatusCode.CREATED_201, meaning: 'The pass was recorded as running and the record is returned.' },
273
273
  ],
274
274
  errorScenarios: [
275
275
  { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The pass description fails schema validation.', errorCode: 'VALIDATION_FAILED' },
@@ -306,7 +306,7 @@ export const dataSeedRunsResourceSpecification = resourceSpecification(dataSeedR
306
306
  outcome: 'The ledger stops saying the pass is in flight and starts being the answer to whether the seed already applied.',
307
307
  importance: FieldSemanticImportance.PRIMARY,
308
308
  responseStatuses: [
309
- { code: HttpResponseStatusCode.OK_200, meaning: 'The pass recorded its outcome, timing, counters and failure report, and the settled row is returned.' },
309
+ { code: HttpResponseStatusCode.OK_200, meaning: 'The pass recorded its outcome, timing, counters and failure report, and the settled record is returned.' },
310
310
  ],
311
311
  errorScenarios: [
312
312
  { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No pass exists for the supplied identifier to settle.' },
@@ -1 +1 @@
1
- {"version":3,"file":"data-seed-runs.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/infrastructure/resources/data-seed-runs.resource.specification.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,YAAY,EACZ,iBAAiB,EACjB,iBAAiB,EACjB,qBAAqB,EACrB,iBAAiB,EACjB,qBAAqB,EACrB,sDAAsD,IAAI,kBAAkB,GAC7E,MAAM,gDAAgD,CAAC;AACxD,OAAO,EAAE,qBAAqB,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IAAI,EAAE,6CAA6C,EAAE;aACpG;YACD,UAAU,EAAE,IAAI;YAChB,QAAQ,EAAE;gBACR,CAAC,qBAAqB,CAAC,QAAQ,CAAC,EAAE;oBAChC,OAAO,EAAE,0GAA0G;iBACpH;aACF;SACF;QAED,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE;YACX,OAAO,EAAE,oDAAoD;YAC7D,OAAO,EAAE,6FAA6F;YACtG,gBAAgB,EAAE;gBAChB,EAAE,IAAI,EAAE,sBAAsB,CAAC,MAAM,EAAE,OAAO,EAAE,sFAAsF,EAAE;aACzI;YACD,cAAc,EAAE;gBACd,EAAE,IAAI,EAAE,sBAAsB,CAAC,aAAa,EAAE,IAAI,EAAE,iFAAiF,EAAE;aACxI;YACD,UAAU,EAAE,IAAI;YAChB,QAAQ,EAAE;gBACR,CAAC,qBAAqB,CAAC,KAAK,CAAC,EAAE;oBAC7B,OAAO,EAAE,6FAA6F;oBACtG,SAAS,EAAE,8GAA8G;iBAC1H;aACF;SACF;KACF;IAED,mBAAmB,EAAE;QACnB,yJAAyJ;QACzJ,qLAAqL;QACrL,4JAA4J;QAC5J,2LAA2L;KAC5L;CACF,CAAC;AACF,2EAA2E;AAC3E,8EAA8E;AAC9E,+EAA+E;AAC/E,2EAA2E;AAC3E,gEAAgE;AAChE,EAAE,oBAAoB,EAAE,oBAAoB,CAAC,WAAW,EAAE,CAC3D,CAAC","sourcesContent":["import { LabelAudience } from '@wildo-ai/presets-components-models';\nimport {\n CodeDeclarationKind,\n CodeSymbolKind,\n FieldSemanticImportance,\n} from '@wildo-ai/zod-decorators';\nimport {\n DataSeedMode,\n DataSeedRunSchema,\n DataSeedRunStatus,\n DataSeedRunVariantKey,\n DataSeedScopeKind,\n DataSeedTriggerOrigin,\n dataSeedRunResourceConfiguration_InitializationFactory as dataSeedRunFactory,\n} from '@wildo-ai/saas-backend-lib/data-seeding-models';\nimport { CoreResourceOperation as Op, ResourcePrimaryScope } from '@wildo-ai/saas-models';\nimport { type AnyResourceSpecificationConfig, HttpResponseStatusCode, resourceSpecification } from '~wildo-specifications/_core';\nimport { EngineResourceSubDomain } from '../../engine-resource-sub-domain';\n\n/**\n * Framework-owned specification for the internal `dataSeedRuns` resource — the\n * persistence ledger the data-seeding dispatcher writes one row to per pass.\n *\n * Like `jobExecutions`, this is a platform/infrastructure truth source rather\n * than an end-user surface: its useful semantic layer is the operational model\n * (did this seed already run for this scope at this version, and what did the\n * pass do?), not UI narration. Its only human-facing surface is the back-office\n * ADMIN read/search path and the `DELETE` re-run gesture.\n *\n * Authored 2026-08-21 because the label generator was producing this resource's\n * ~1000 keys with NO spec context at all — the companion logged\n * `No resource specification found for \"dataSeedRuns\"` on every run and invented\n * terminology from bare field names. The counters in particular (`entriesUpdated`\n * vs `entriesUpgraded` vs `entriesSkipped`) are indistinguishable without the\n * per-mode contract stated below.\n *\n * NOTE ON THE REGISTRY KEY: `dataSeedRuns` is a `BackendResourceType`, not a\n * `CoreResourceType`, so its schema and factory live in `@wildo-ai/saas-backend-lib`\n * rather than `@wildo-ai/saas-models`, and its entry in\n * `engineResourceSpecificationsByType` is keyed by the literal resource-type\n * string. The registry is typed `Record<string, …>`, and the runtime-scope\n * alignment guard intersects specs with the CORE registry, so this resource is\n * correctly outside that guard's population rather than silently breaking it.\n *\n * WHY THIS ONE SPEC CARRIES AN EXPLICIT TYPE ANNOTATION (the other 58 do not).\n *\n * `resourceSpecification` returns `ResourceSpecificationConfig<TCustomOp, TCoreOp, TSchema>`,\n * so an unannotated spec exports a type whose arguments are named from wherever its schema\n * and factory live. For every other engine spec that is `@wildo-ai/saas-models`, which this\n * package depends on directly and can always name. This resource is the sole exception — its\n * schema and factory come from `@wildo-ai/saas-backend-lib/data-seeding-models`, because\n * `dataSeedRuns` is a `BackendResourceType` (see the registry note above). That made the\n * inferred type unnameable except through a non-portable nested path\n * (`node_modules/@wildo-ai/saas-frontend-lib/node_modules/@wildo-ai/saas-models/src`), which\n * `isolatedDeclarations`-style declaration emit rejects with TS2742.\n *\n * The annotation is NOT merely a workaround for that. The same declaration also tripped TS7056\n * (`inferred type ... exceeds the maximum length the compiler will serialize`) — this resource\n * authors on the order of a thousand field-spec keys — and TS7056 has no remedy other than an\n * explicit annotation. No amount of dependency or entrypoint surgery removes it, so an\n * annotation is required here regardless of how the package boundary is drawn.\n *\n * `AnyResourceSpecificationConfig` loses nothing at the only consumption point. The sole\n * consumer is `engineResourceSpecificationsByType`, declared `ResourceSpecification`\n * (= `Record<string, AnyResourceSpecificationConfig>`), so the precise generic instantiation\n * was already erased there. Authoring-time checking of the callback body is unaffected: the\n * `resourceSpecification(...)` call still infers `TSchema` from `DataSeedRunSchema` and\n * type-checks the config against it before the annotation widens the exported binding.\n *\n * If a future spec also sources its schema from a package other than `saas-models`, it will hit\n * the same wall and should follow this pattern rather than re-deriving it.\n */\nexport const dataSeedRunsResourceSpecification: AnyResourceSpecificationConfig = resourceSpecification(\n dataSeedRunFactory,\n DataSeedRunSchema,\n ({ schemaShape }) => ({\n purpose: 'Record one pass of the data-seeding dispatcher so the platform knows whether a seed has already been applied to a given scope at a given version.',\n businessRole: 'Operational control-plane ledger used to make seeding idempotent across restarts, and to troubleshoot what a seeding pass inserted, upgraded, skipped, or failed on.',\n lifecycleRole: 'Opens as a running pass when the dispatcher starts, then settles once into completed, partial, or failed. Deleting a settled row is the supported gesture for making the next pass treat that scope as un-run.',\n audience: LabelAudience.DEVELOPER,\n subDomain: EngineResourceSubDomain.INFRASTRUCTURE,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-backend-lib',\n exportName: 'DataSeedRunSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactory: {\n packageName: '@wildo-ai/saas-backend-lib',\n exportName: 'dataSeedRunResourceConfiguration_InitializationFactory',\n symbolKind: CodeSymbolKind.FACTORY,\n declarationKind: CodeDeclarationKind.FUNCTION,\n },\n resourceType: {\n enumDeclaration: {\n packageName: '@wildo-ai/saas-backend-lib',\n exportName: 'BackendResourceType',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n memberName: 'DATA_SEED_RUN',\n },\n operationVocabulary: {\n coreEnum: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceOperation',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n },\n\n fields: {\n _id: schemaShape._id.stringSpec({\n meaning: 'Stable identifier of one recorded seeding pass.',\n whyItMatters: 'It is what an operator addresses when deleting a settled pass to force the next dispatcher run to re-apply that seed.',\n semanticRole: 'identifier',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n seedKey: schemaShape.seedKey.stringSpec({\n meaning: 'Stable name of the seed declaration this pass executed.',\n whyItMatters: 'It is the primary way an operator groups the history of one seed across every scope and version it has been applied to.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n seedVersion: schemaShape.seedVersion.numberSpec({\n meaning: 'The version the seed declaration carried when this pass ran.',\n whyItMatters: 'Raising the declared version is how a developer asks for a re-run; the dispatcher decides by comparing the declared version against the highest version already recorded as completed for the same scope.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n mode: schemaShape.mode.enumSpec({\n meaning: 'The reconciliation strategy the pass applied to the declared entries.',\n whyItMatters: 'It determines which counters below can be non-zero and whether rows outside the declared set were touched at all, so it is the first thing to read when a pass did something unexpected.',\n enumDeclaration: {\n packageName: '@wildo-ai/saas-backend-lib',\n exportName: 'DataSeedMode',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n values: {\n [DataSeedMode.LAZY]: { meaning: 'Create the entry the first time the scope is accessed if it is missing. Always safe to repeat.' },\n [DataSeedMode.ADDITIVE]: { meaning: 'Insert entries that are absent and re-apply the declared payload to entries that are present. Never removes anything and never walks rows outside the declared set.' },\n [DataSeedMode.UPGRADE]: { meaning: 'Insert entries that are absent and migrate entries whose recorded version is behind the declared one.' },\n [DataSeedMode.SYNC]: { meaning: 'Treat the declared entries as the full truth: insert what is missing, update what changed, and handle rows that are no longer declared according to the seed orphan policy.' },\n },\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n scopeKind: schemaShape.scopeKind.enumSpec({\n meaning: 'The unit this pass seeded — the whole database, one application, one organization, one user, or one row of some other resource type.',\n whyItMatters: 'Seeding is idempotent per scope, so the scope is half of the answer to \"has this already run?\".',\n enumDeclaration: {\n packageName: '@wildo-ai/saas-backend-lib',\n exportName: 'DataSeedScopeKind',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n values: {\n [DataSeedScopeKind.GLOBAL]: { meaning: 'Applied once for the whole database. There is no anchor row.' },\n [DataSeedScopeKind.APPLICATION]: { meaning: 'Applied once per application.' },\n [DataSeedScopeKind.ORGANIZATION]: { meaning: 'Applied once per organization.' },\n [DataSeedScopeKind.USER]: { meaning: 'Applied once per user.' },\n [DataSeedScopeKind.CUSTOM]: { meaning: 'Applied once per row of some other resource type, which is named separately on the pass.' },\n },\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n relatedResourceType: schemaShape.relatedResourceType.stringSpec({\n meaning: 'The resource type whose row anchors a custom-scope pass. Empty for the built-in scopes, whose resource is implied by the scope itself.',\n whyItMatters: 'Two custom-scope seeds can legitimately anchor on the same row identifier under different resource types, so this is what keeps their histories apart.',\n }),\n\n relatedId: schemaShape.relatedId.stringSpec({\n meaning: 'Identifier of the row that anchors this scope. Empty only for a database-wide pass, which has no anchor.',\n whyItMatters: 'It is what narrows the ledger from \"every run of this seed\" to \"the run for this particular organization, user, or row\".',\n semanticRole: 'identifier',\n }),\n\n triggerOrigin: schemaShape.triggerOrigin.enumSpec({\n meaning: 'Coarse classification of what caused the dispatcher to fire.',\n whyItMatters: 'It is the filterable form of the trigger, so history can be narrowed to one pathway without reading the trigger declaration on every row.',\n enumDeclaration: {\n packageName: '@wildo-ai/saas-backend-lib',\n exportName: 'DataSeedTriggerOrigin',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n values: {\n [DataSeedTriggerOrigin.APP_INIT]: { meaning: 'Fired while the application was starting up.' },\n [DataSeedTriggerOrigin.APP_VERSION_UPGRADE]: { meaning: 'Fired because the application moved to a new version.' },\n [DataSeedTriggerOrigin.RESOURCE_LIFECYCLE]: { meaning: 'Fired by a write to the resource that anchors the scope, such as a new organization being created.' },\n [DataSeedTriggerOrigin.LAZY_ACCESS]: { meaning: 'Fired the first time something read the scope and the seeded data was not there yet.' },\n [DataSeedTriggerOrigin.CRON]: { meaning: 'Reserved for a cron primitive that fires outside a declared seed schedule. No current caller.' },\n [DataSeedTriggerOrigin.ADMIN_MANUAL]: { meaning: 'Fired by an administrator asking for the seed to be run.' },\n [DataSeedTriggerOrigin.SCHEDULED_RERUN]: { meaning: 'Fired by the platform because the seed declaration\\'s own schedule matched the current tick.' },\n },\n }),\n\n triggeredByUserId: schemaShape.triggeredByUserId.stringSpec({\n meaning: 'The user whose action caused the dispatcher to fire. Empty for passes the platform started on its own.',\n whyItMatters: 'It is attribution only, never authority: the seed itself always runs with internal system permissions regardless of who triggered it.',\n semanticRole: 'identifier',\n }),\n\n status: schemaShape.status.enumSpec({\n meaning: 'Outcome of the pass.',\n whyItMatters: 'It is the signal the dispatcher itself reads to decide whether a scope still needs seeding, and the first thing an operator filters on.',\n enumDeclaration: {\n packageName: '@wildo-ai/saas-backend-lib',\n exportName: 'DataSeedRunStatus',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n values: {\n [DataSeedRunStatus.RUNNING]: { meaning: 'The pass started and has not settled. A pass left in this state by a crash is superseded by the next pass rather than timing out.' },\n [DataSeedRunStatus.COMPLETED]: { meaning: 'Every declared entry succeeded.' },\n [DataSeedRunStatus.PARTIAL]: { meaning: 'At least one entry failed but the pass carried on and reported the rest.' },\n [DataSeedRunStatus.FAILED]: { meaning: 'The pass itself stopped before finishing.' },\n },\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n startedAt: schemaShape.startedAt.dateSpec({\n meaning: 'When the pass began.',\n }),\n\n finishedAt: schemaShape.finishedAt.dateSpec({\n meaning: 'When the pass settled. Empty while it is still running.',\n whyItMatters: 'The gap between this and the start time is the only duration signal for a seeding pass.',\n }),\n\n entriesAttempted: schemaShape.entriesAttempted.numberSpec({\n meaning: 'How many declared entries the pass walked. Counted before each entry is tried, so it matches the declared set whatever the outcome.',\n whyItMatters: 'When it does not match the number of entries in the declaration, the declaration and the deployed code have drifted apart.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n entriesInserted: schemaShape.entriesInserted.numberSpec({\n meaning: 'How many declared entries were written because no matching row existed.',\n }),\n\n entriesUpdated: schemaShape.entriesUpdated.numberSpec({\n meaning: 'How many already-present rows had the declared payload re-applied to them.',\n whyItMatters: 'This is the additive-mode counter. A version migration is counted separately, so a non-zero value here means the payload was re-stamped, not migrated.',\n }),\n\n entriesUpgraded: schemaShape.entriesUpgraded.numberSpec({\n meaning: 'How many present rows were behind the declared version and were migrated forward.',\n }),\n\n entriesRenamed: schemaShape.entriesRenamed.numberSpec({\n meaning: 'How many rows were relocated from a previous identity because the declaration renamed them.',\n }),\n\n entriesSkipped: schemaShape.entriesSkipped.numberSpec({\n meaning: 'How many declared entries the pass deliberately left untouched — already current, or protected from being moved backwards.',\n whyItMatters: 'Skipping is a normal outcome, not a failure; the reason for each skip is reported separately.',\n }),\n\n entriesDeleted: schemaShape.entriesDeleted.numberSpec({\n meaning: 'How many rows outside the declared set were removed. Only a full-reconciliation pass configured to delete can produce this.',\n }),\n\n entriesDeprecated: schemaShape.entriesDeprecated.numberSpec({\n meaning: 'How many rows outside the declared set were marked deprecated instead of removed.',\n }),\n\n entriesReportedOrphans: schemaShape.entriesReportedOrphans.numberSpec({\n meaning: 'How many rows outside the declared set were only reported, leaving the rows themselves untouched.',\n }),\n\n entriesFailed: schemaShape.entriesFailed.numberSpec({\n meaning: 'How many entries could not be written. The pass continues and settles as partial.',\n whyItMatters: 'It is the count behind a partial outcome; the per-entry detail lives in the report below.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n failureReport: schemaShape.failureReport.objectSpec({\n meaning: 'Detailed breakdown of everything non-trivial the pass encountered: which entries failed and why, which rows fell outside the declared set, and any error that stopped the pass as a whole. Empty when everything succeeded.',\n whyItMatters: 'It is what lets an operator diagnose a partial or failed pass without going to application logs.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n },\n\n /**\n * `trigger` is documented here rather than in `fields` because it is a\n * DISCRIMINATED UNION, and the spec decorators are declared on `ZodObject`\n * / `ZodUnion` but not on `ZodDiscriminatedUnion` — `schemaShape.trigger.objectSpec(...)`\n * does not type-check. Without an entry of some kind the field would reach the\n * label generator as a bare name and the generator would invent terminology for\n * it (the same failure mode `RETENTION_MARKER_FIELD_SPECS` documents), so the\n * meaning is declared through the escape hatch instead of dropped.\n */\n additionalFieldSpecs: [\n {\n fieldName: 'trigger',\n specDecorator: 'objectSpec',\n params: {\n meaning: 'The full trigger declaration that caused this pass, copied verbatim from the seed definition.',\n whyItMatters: 'Its shape varies by what fired the pass, so it carries the detail — the lifecycle event, the schedule, the access path — that the coarse trigger origin deliberately flattens away.',\n },\n },\n ],\n\n operations: {\n [Op.CREATE]: {\n purpose: 'Open the ledger row for a seeding pass that is about to start.',\n outcome: 'The pass becomes visible as running before it touches any data, so a crash mid-pass leaves a trace rather than nothing.',\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'The pass was recorded as running and the row is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The pass description fails schema validation.', errorCode: 'VALIDATION_FAILED' },\n ],\n idempotent: false,\n variants: {\n [DataSeedRunVariantKey.INTERNAL]: {\n purpose: 'Let the dispatcher open its own ledger row. There is no externally reachable way to create one.',\n },\n },\n },\n\n [Op.READ]: {\n purpose: 'Read one recorded seeding pass.',\n outcome: 'The caller can inspect exactly what one pass did to one scope.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The recorded pass was found and is returned with its counters and report.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No pass exists for the supplied identifier — never recorded, or already removed by an administrator or by history cleanup.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not a platform administrator. This ledger is never exposed to ordinary tenant callers.' },\n ],\n idempotent: true,\n variants: {\n [DataSeedRunVariantKey.INTERNAL]: {\n purpose: 'Let the dispatcher recover a previous attempt before writing the outcome of the current one.',\n },\n [DataSeedRunVariantKey.ADMIN]: {\n purpose: 'Let a platform administrator inspect one pass from the back office.',\n },\n },\n },\n\n [Op.UPDATE]: {\n purpose: 'Settle a running pass with its outcome and counters.',\n outcome: 'The ledger stops saying the pass is in flight and starts being the answer to whether the seed already applied.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The pass recorded its outcome, timing, counters and failure report, and the settled row is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No pass exists for the supplied identifier to settle.' },\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The outcome fails schema validation, for example an unrecognized status.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'A caller outside the dispatcher attempts to rewrite a pass outcome.' },\n ],\n idempotent: true,\n variants: {\n [DataSeedRunVariantKey.INTERNAL]: {\n purpose: 'Let the dispatcher write the terminal outcome of the pass it opened.',\n whenToUse: 'Use when a pass has finished walking its entries, whether it succeeded, partially succeeded, or stopped.',\n },\n },\n },\n\n [Op.DELETE]: {\n purpose: 'Remove a recorded pass so the next dispatcher run treats that scope as never seeded.',\n outcome: 'The seed is re-applied to that scope on the next run, without editing or re-deploying the seed declaration.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The recorded pass was removed and the scope is eligible for seeding again.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No pass exists for the supplied identifier.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not a platform administrator.' },\n ],\n idempotent: true,\n variants: {\n [DataSeedRunVariantKey.ADMIN]: {\n purpose: 'Give a platform administrator the supported re-run gesture.',\n whenToUse: 'Use when a seed must be applied again to one scope and raising the declared version would wrongly re-run it everywhere. The dispatcher never deletes its own history.',\n },\n },\n },\n\n [Op.LIST]: {\n purpose: 'Enumerate recorded seeding passes.',\n outcome: 'The caller sees seeding history as a set rather than one pass at a time.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A page of recorded passes, possibly empty, narrowed by the requested seed, scope, status, or trigger filters.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not a platform administrator authorized to enumerate seeding history.' },\n ],\n idempotent: true,\n variants: {\n [DataSeedRunVariantKey.INTERNAL]: {\n purpose: 'Let the dispatcher enumerate prior passes while deciding whether a scope still needs seeding.',\n },\n [DataSeedRunVariantKey.ADMIN]: {\n purpose: 'Let a platform administrator browse seeding history from the back office.',\n },\n },\n },\n\n [Op.COUNT]: {\n purpose: 'Count recorded passes matching a set of conditions.',\n outcome: 'The dispatcher can answer \"has any completed pass already covered this scope?\" without loading the rows.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The number of recorded passes matching the conditions.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not a platform administrator.' },\n ],\n idempotent: true,\n variants: {\n [DataSeedRunVariantKey.INTERNAL]: {\n purpose: 'Back the dispatcher\\'s already-seeded check, which needs only a yes or no and never the rows themselves.',\n },\n },\n },\n\n [Op.SEARCH]: {\n purpose: 'Search seeding history by seed name or anchor row.',\n outcome: 'An administrator can narrow history to the passes relevant to one seed or one affected row.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A page of recorded passes, possibly empty, matching the search term and any filters.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not a platform administrator authorized to query seeding history.' },\n ],\n idempotent: true,\n variants: {\n [DataSeedRunVariantKey.ADMIN]: {\n purpose: 'Let a platform administrator find passes by seed name or by the row a pass was anchored to.',\n whenToUse: 'Use when troubleshooting starts from \"which seed touched this row\" rather than from a known pass identifier.',\n },\n },\n },\n },\n\n businessConstraints: [\n 'This ledger records what a seeding pass did. It is never the source of truth for the data the seed produced — that lives on the seeded rows themselves.',\n 'A pass is identified by its seed, its scope, and its declared version together. That identity is what makes seeding safe to repeat, so it must not be widened or narrowed casually.',\n 'Who triggered a pass is recorded for attribution only. Seeding always runs with internal system permissions, so the recorded user never confers authority.',\n 'Removing a recorded pass is a deliberate administrative re-run gesture. The dispatcher itself never deletes its own history, because the history is what makes the next decision correct.',\n ],\n }),\n // DATA_SEED_RUN is a STANDALONE infrastructure ledger reached only through\n // internal repository services and a platform-administrator back-office path.\n // The `APPLICATION → DATA_SEED_RUN` relationship is routing-side only (the row\n // carries no application identifier of its own), which is why the scope is\n // declared here rather than derived from a scope-owning parent.\n { resourcePrimaryScope: ResourcePrimaryScope.APPLICATION },\n);\n"]}
1
+ {"version":3,"file":"data-seed-runs.resource.specification.js","sourceRoot":"","sources":["../../../../../../src/engine/infrastructure/resources/data-seed-runs.resource.specification.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,YAAY,EACZ,iBAAiB,EACjB,iBAAiB,EACjB,qBAAqB,EACrB,iBAAiB,EACjB,qBAAqB,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D,EAAE;aAC3G;YACD,cAAc,EAAE;gBACd,EAAE,IAAI,EAAE,sBAAsB,CAAC,aAAa,EAAE,IAAI,EAAE,6CAA6C,EAAE;aACpG;YACD,UAAU,EAAE,IAAI;YAChB,QAAQ,EAAE;gBACR,CAAC,qBAAqB,CAAC,QAAQ,CAAC,EAAE;oBAChC,OAAO,EAAE,0GAA0G;iBACpH;aACF;SACF;QAED,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE;YACX,OAAO,EAAE,oDAAoD;YAC7D,OAAO,EAAE,6FAA6F;YACtG,gBAAgB,EAAE;gBAChB,EAAE,IAAI,EAAE,sBAAsB,CAAC,MAAM,EAAE,OAAO,EAAE,sFAAsF,EAAE;aACzI;YACD,cAAc,EAAE;gBACd,EAAE,IAAI,EAAE,sBAAsB,CAAC,aAAa,EAAE,IAAI,EAAE,iFAAiF,EAAE;aACxI;YACD,UAAU,EAAE,IAAI;YAChB,QAAQ,EAAE;gBACR,CAAC,qBAAqB,CAAC,KAAK,CAAC,EAAE;oBAC7B,OAAO,EAAE,6FAA6F;oBACtG,SAAS,EAAE,8GAA8G;iBAC1H;aACF;SACF;KACF;IAED,mBAAmB,EAAE;QACnB,yJAAyJ;QACzJ,qLAAqL;QACrL,4JAA4J;QAC5J,2LAA2L;KAC5L;CACF,CAAC;AACF,2EAA2E;AAC3E,8EAA8E;AAC9E,+EAA+E;AAC/E,2EAA2E;AAC3E,gEAAgE;AAChE,EAAE,oBAAoB,EAAE,oBAAoB,CAAC,WAAW,EAAE,CAC3D,CAAC","sourcesContent":["import { LabelAudience } from '@wildo-ai/presets-components-models';\nimport {\n CodeDeclarationKind,\n CodeSymbolKind,\n FieldSemanticImportance,\n} from '@wildo-ai/zod-decorators';\nimport {\n DataSeedMode,\n DataSeedRunSchema,\n DataSeedRunStatus,\n DataSeedRunVariantKey,\n DataSeedScopeKind,\n DataSeedTriggerOrigin,\n dataSeedRunResourceConfiguration_InitializationFactory as dataSeedRunFactory,\n} from '@wildo-ai/saas-backend-lib/data-seeding-models';\nimport { CoreResourceOperation as Op, ResourcePrimaryScope } from '@wildo-ai/saas-models';\nimport { type AnyResourceSpecificationConfig, HttpResponseStatusCode, resourceSpecification } from '~wildo-specifications/_core';\nimport { EngineResourceSubDomain } from '../../engine-resource-sub-domain';\n\n/**\n * Framework-owned specification for the internal `dataSeedRuns` resource — the\n * persistence ledger the data-seeding dispatcher writes one row to per pass.\n *\n * Like `jobExecutions`, this is a platform/infrastructure truth source rather\n * than an end-user surface: its useful semantic layer is the operational model\n * (did this seed already run for this scope at this version, and what did the\n * pass do?), not UI narration. Its only human-facing surface is the back-office\n * ADMIN read/search path and the `DELETE` re-run gesture.\n *\n * Authored 2026-08-21 because the label generator was producing this resource's\n * ~1000 keys with NO spec context at all — the companion logged\n * `No resource specification found for \"dataSeedRuns\"` on every run and invented\n * terminology from bare field names. The counters in particular (`entriesUpdated`\n * vs `entriesUpgraded` vs `entriesSkipped`) are indistinguishable without the\n * per-mode contract stated below.\n *\n * NOTE ON THE REGISTRY KEY: `dataSeedRuns` is a `BackendResourceType`, not a\n * `CoreResourceType`, so its schema and factory live in `@wildo-ai/saas-backend-lib`\n * rather than `@wildo-ai/saas-models`, and its entry in\n * `engineResourceSpecificationsByType` is keyed by the literal resource-type\n * string. The registry is typed `Record<string, …>`, and the runtime-scope\n * alignment guard intersects specs with the CORE registry, so this resource is\n * correctly outside that guard's population rather than silently breaking it.\n *\n * WHY THIS ONE SPEC CARRIES AN EXPLICIT TYPE ANNOTATION (the other 58 do not).\n *\n * `resourceSpecification` returns `ResourceSpecificationConfig<TCustomOp, TCoreOp, TSchema>`,\n * so an unannotated spec exports a type whose arguments are named from wherever its schema\n * and factory live. For every other engine spec that is `@wildo-ai/saas-models`, which this\n * package depends on directly and can always name. This resource is the sole exception — its\n * schema and factory come from `@wildo-ai/saas-backend-lib/data-seeding-models`, because\n * `dataSeedRuns` is a `BackendResourceType` (see the registry note above). That made the\n * inferred type unnameable except through a non-portable nested path\n * (`node_modules/@wildo-ai/saas-frontend-lib/node_modules/@wildo-ai/saas-models/src`), which\n * `isolatedDeclarations`-style declaration emit rejects with TS2742.\n *\n * The annotation is NOT merely a workaround for that. The same declaration also tripped TS7056\n * (`inferred type ... exceeds the maximum length the compiler will serialize`) — this resource\n * authors on the order of a thousand field-spec keys — and TS7056 has no remedy other than an\n * explicit annotation. No amount of dependency or entrypoint surgery removes it, so an\n * annotation is required here regardless of how the package boundary is drawn.\n *\n * `AnyResourceSpecificationConfig` loses nothing at the only consumption point. The sole\n * consumer is `engineResourceSpecificationsByType`, declared `ResourceSpecification`\n * (= `Record<string, AnyResourceSpecificationConfig>`), so the precise generic instantiation\n * was already erased there. Authoring-time checking of the callback body is unaffected: the\n * `resourceSpecification(...)` call still infers `TSchema` from `DataSeedRunSchema` and\n * type-checks the config against it before the annotation widens the exported binding.\n *\n * If a future spec also sources its schema from a package other than `saas-models`, it will hit\n * the same wall and should follow this pattern rather than re-deriving it.\n */\nexport const dataSeedRunsResourceSpecification: AnyResourceSpecificationConfig = resourceSpecification(\n dataSeedRunFactory,\n DataSeedRunSchema,\n ({ schemaShape }) => ({\n purpose: 'Record one pass of the data-seeding dispatcher so the platform knows whether a seed has already been applied to a given scope at a given version.',\n businessRole: 'Operational control-plane ledger used to make seeding idempotent across restarts, and to troubleshoot what a seeding pass inserted, upgraded, skipped, or failed on.',\n lifecycleRole: 'Opens as a running pass when the dispatcher starts, then settles once into completed, partial, or failed. Deleting a settled row is the supported gesture for making the next pass treat that scope as un-run.',\n audience: LabelAudience.DEVELOPER,\n subDomain: EngineResourceSubDomain.INFRASTRUCTURE,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-backend-lib',\n exportName: 'DataSeedRunSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactory: {\n packageName: '@wildo-ai/saas-backend-lib',\n exportName: 'dataSeedRunResourceConfiguration_InitializationFactory',\n symbolKind: CodeSymbolKind.FACTORY,\n declarationKind: CodeDeclarationKind.FUNCTION,\n },\n resourceType: {\n enumDeclaration: {\n packageName: '@wildo-ai/saas-backend-lib',\n exportName: 'BackendResourceType',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n memberName: 'DATA_SEED_RUN',\n },\n operationVocabulary: {\n coreEnum: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceOperation',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n },\n\n fields: {\n _id: schemaShape._id.stringSpec({\n meaning: 'Stable identifier of one recorded seeding pass.',\n whyItMatters: 'It is what an operator addresses when deleting a settled pass to force the next dispatcher run to re-apply that seed.',\n semanticRole: 'identifier',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n seedKey: schemaShape.seedKey.stringSpec({\n meaning: 'Stable name of the seed declaration this pass executed.',\n whyItMatters: 'It is the primary way an operator groups the history of one seed across every scope and version it has been applied to.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n seedVersion: schemaShape.seedVersion.numberSpec({\n meaning: 'The version the seed declaration carried when this pass ran.',\n whyItMatters: 'Raising the declared version is how a developer asks for a re-run; the dispatcher decides by comparing the declared version against the highest version already recorded as completed for the same scope.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n mode: schemaShape.mode.enumSpec({\n meaning: 'The reconciliation strategy the pass applied to the declared entries.',\n whyItMatters: 'It determines which counters below can be non-zero and whether rows outside the declared set were touched at all, so it is the first thing to read when a pass did something unexpected.',\n enumDeclaration: {\n packageName: '@wildo-ai/saas-backend-lib',\n exportName: 'DataSeedMode',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n values: {\n [DataSeedMode.LAZY]: { meaning: 'Create the entry the first time the scope is accessed if it is missing. Always safe to repeat.' },\n [DataSeedMode.ADDITIVE]: { meaning: 'Insert entries that are absent and re-apply the declared payload to entries that are present. Never removes anything and never walks records outside the declared set.' },\n [DataSeedMode.UPGRADE]: { meaning: 'Insert entries that are absent and migrate entries whose recorded version is behind the declared one.' },\n [DataSeedMode.SYNC]: { meaning: 'Treat the declared entries as the full truth: insert what is missing, update what changed, and handle records that are no longer declared according to the seed orphan policy.' },\n },\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n scopeKind: schemaShape.scopeKind.enumSpec({\n meaning: 'The unit this pass seeded — the whole database, one application, one organization, one user, or one record of some other resource type.',\n whyItMatters: 'Seeding is idempotent per scope, so the scope is half of the answer to \"has this already run?\".',\n enumDeclaration: {\n packageName: '@wildo-ai/saas-backend-lib',\n exportName: 'DataSeedScopeKind',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n values: {\n [DataSeedScopeKind.GLOBAL]: { meaning: 'Applied once for the whole database. There is no anchor record.' },\n [DataSeedScopeKind.APPLICATION]: { meaning: 'Applied once per application.' },\n [DataSeedScopeKind.ORGANIZATION]: { meaning: 'Applied once per organization.' },\n [DataSeedScopeKind.USER]: { meaning: 'Applied once per user.' },\n [DataSeedScopeKind.CUSTOM]: { meaning: 'Applied once per record of some other resource type, which is named separately on the pass.' },\n },\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n relatedResourceType: schemaShape.relatedResourceType.stringSpec({\n meaning: 'The resource type whose record anchors a custom-scope pass. Empty for the built-in scopes, whose resource is implied by the scope itself.',\n whyItMatters: 'Two custom-scope seeds can legitimately anchor on the same row identifier under different resource types, so this is what keeps their histories apart.',\n }),\n\n relatedId: schemaShape.relatedId.stringSpec({\n meaning: 'Identifier of the record that anchors this scope. Empty only for a database-wide pass, which has no anchor.',\n whyItMatters: 'It is what narrows the ledger from \"every run of this seed\" to \"the run for this particular organization, user, or row\".',\n semanticRole: 'identifier',\n }),\n\n triggerOrigin: schemaShape.triggerOrigin.enumSpec({\n meaning: 'Coarse classification of what caused the dispatcher to fire.',\n whyItMatters: 'It is the filterable form of the trigger, so history can be narrowed to one pathway without reading the trigger declaration on every row.',\n enumDeclaration: {\n packageName: '@wildo-ai/saas-backend-lib',\n exportName: 'DataSeedTriggerOrigin',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n values: {\n [DataSeedTriggerOrigin.APP_INIT]: { meaning: 'Fired while the application was starting up.' },\n [DataSeedTriggerOrigin.APP_VERSION_UPGRADE]: { meaning: 'Fired because the application moved to a new version.' },\n [DataSeedTriggerOrigin.RESOURCE_LIFECYCLE]: { meaning: 'Fired by a write to the resource that anchors the scope, such as a new organization being created.' },\n [DataSeedTriggerOrigin.LAZY_ACCESS]: { meaning: 'Fired the first time something read the scope and the seeded data was not there yet.' },\n [DataSeedTriggerOrigin.CRON]: { meaning: 'Reserved for a cron primitive that fires outside a declared seed schedule. No current caller.' },\n [DataSeedTriggerOrigin.ADMIN_MANUAL]: { meaning: 'Fired by an administrator asking for the seed to be run.' },\n [DataSeedTriggerOrigin.SCHEDULED_RERUN]: { meaning: 'Fired by the platform because the seed declaration\\'s own schedule matched the current tick.' },\n },\n }),\n\n triggeredByUserId: schemaShape.triggeredByUserId.stringSpec({\n meaning: 'The user whose action caused the dispatcher to fire. Empty for passes the platform started on its own.',\n whyItMatters: 'It is attribution only, never authority: the seed itself always runs with internal system permissions regardless of who triggered it.',\n semanticRole: 'identifier',\n }),\n\n status: schemaShape.status.enumSpec({\n meaning: 'Outcome of the pass.',\n whyItMatters: 'It is the signal the dispatcher itself reads to decide whether a scope still needs seeding, and the first thing an operator filters on.',\n enumDeclaration: {\n packageName: '@wildo-ai/saas-backend-lib',\n exportName: 'DataSeedRunStatus',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n values: {\n [DataSeedRunStatus.RUNNING]: { meaning: 'The pass started and has not settled. A pass left in this state by a crash is superseded by the next pass rather than timing out.' },\n [DataSeedRunStatus.COMPLETED]: { meaning: 'Every declared entry succeeded.' },\n [DataSeedRunStatus.PARTIAL]: { meaning: 'At least one entry failed but the pass carried on and reported the rest.' },\n [DataSeedRunStatus.FAILED]: { meaning: 'The pass itself stopped before finishing.' },\n },\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n startedAt: schemaShape.startedAt.dateSpec({\n meaning: 'When the pass began.',\n }),\n\n finishedAt: schemaShape.finishedAt.dateSpec({\n meaning: 'When the pass settled. Empty while it is still running.',\n whyItMatters: 'The gap between this and the start time is the only duration signal for a seeding pass.',\n }),\n\n entriesAttempted: schemaShape.entriesAttempted.numberSpec({\n meaning: 'How many declared entries the pass walked. Counted before each entry is tried, so it matches the declared set whatever the outcome.',\n whyItMatters: 'When it does not match the number of entries in the declaration, the declaration and the deployed code have drifted apart.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n entriesInserted: schemaShape.entriesInserted.numberSpec({\n meaning: 'How many declared entries were written because no matching record existed.',\n }),\n\n entriesUpdated: schemaShape.entriesUpdated.numberSpec({\n meaning: 'How many already-present records had the declared payload re-applied to them.',\n whyItMatters: 'This is the additive-mode counter. A version migration is counted separately, so a non-zero value here means the payload was re-stamped, not migrated.',\n }),\n\n entriesUpgraded: schemaShape.entriesUpgraded.numberSpec({\n meaning: 'How many present records were behind the declared version and were migrated forward.',\n }),\n\n entriesRenamed: schemaShape.entriesRenamed.numberSpec({\n meaning: 'How many records were relocated from a previous identity because the declaration renamed them.',\n }),\n\n entriesSkipped: schemaShape.entriesSkipped.numberSpec({\n meaning: 'How many declared entries the pass deliberately left untouched — already current, or protected from being moved backwards.',\n whyItMatters: 'Skipping is a normal outcome, not a failure; the reason for each skip is reported separately.',\n }),\n\n entriesDeleted: schemaShape.entriesDeleted.numberSpec({\n meaning: 'How many records outside the declared set were removed. Only a full-reconciliation pass configured to delete can produce this.',\n }),\n\n entriesDeprecated: schemaShape.entriesDeprecated.numberSpec({\n meaning: 'How many records outside the declared set were marked deprecated instead of removed.',\n }),\n\n entriesReportedOrphans: schemaShape.entriesReportedOrphans.numberSpec({\n meaning: 'How many records outside the declared set were only reported, leaving the records themselves untouched.',\n }),\n\n entriesFailed: schemaShape.entriesFailed.numberSpec({\n meaning: 'How many entries could not be written. The pass continues and settles as partial.',\n whyItMatters: 'It is the count behind a partial outcome; the per-entry detail lives in the report below.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n\n failureReport: schemaShape.failureReport.objectSpec({\n meaning: 'Detailed breakdown of everything non-trivial the pass encountered: which entries failed and why, which records fell outside the declared set, and any error that stopped the pass as a whole. Empty when everything succeeded.',\n whyItMatters: 'It is what lets an operator diagnose a partial or failed pass without going to application logs.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n },\n\n /**\n * `trigger` is documented here rather than in `fields` because it is a\n * DISCRIMINATED UNION, and the spec decorators are declared on `ZodObject`\n * / `ZodUnion` but not on `ZodDiscriminatedUnion` — `schemaShape.trigger.objectSpec(...)`\n * does not type-check. Without an entry of some kind the field would reach the\n * label generator as a bare name and the generator would invent terminology for\n * it (the same failure mode `RETENTION_MARKER_FIELD_SPECS` documents), so the\n * meaning is declared through the escape hatch instead of dropped.\n */\n additionalFieldSpecs: [\n {\n fieldName: 'trigger',\n specDecorator: 'objectSpec',\n params: {\n meaning: 'The full trigger declaration that caused this pass, copied verbatim from the seed definition.',\n whyItMatters: 'Its shape varies by what fired the pass, so it carries the detail — the lifecycle event, the schedule, the access path — that the coarse trigger origin deliberately flattens away.',\n },\n },\n ],\n\n operations: {\n [Op.CREATE]: {\n purpose: 'Open the ledger row for a seeding pass that is about to start.',\n outcome: 'The pass becomes visible as running before it touches any data, so a crash mid-pass leaves a trace rather than nothing.',\n responseStatuses: [\n { code: HttpResponseStatusCode.CREATED_201, meaning: 'The pass was recorded as running and the record is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The pass description fails schema validation.', errorCode: 'VALIDATION_FAILED' },\n ],\n idempotent: false,\n variants: {\n [DataSeedRunVariantKey.INTERNAL]: {\n purpose: 'Let the dispatcher open its own ledger row. There is no externally reachable way to create one.',\n },\n },\n },\n\n [Op.READ]: {\n purpose: 'Read one recorded seeding pass.',\n outcome: 'The caller can inspect exactly what one pass did to one scope.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The recorded pass was found and is returned with its counters and report.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No pass exists for the supplied identifier — never recorded, or already removed by an administrator or by history cleanup.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not a platform administrator. This ledger is never exposed to ordinary tenant callers.' },\n ],\n idempotent: true,\n variants: {\n [DataSeedRunVariantKey.INTERNAL]: {\n purpose: 'Let the dispatcher recover a previous attempt before writing the outcome of the current one.',\n },\n [DataSeedRunVariantKey.ADMIN]: {\n purpose: 'Let a platform administrator inspect one pass from the back office.',\n },\n },\n },\n\n [Op.UPDATE]: {\n purpose: 'Settle a running pass with its outcome and counters.',\n outcome: 'The ledger stops saying the pass is in flight and starts being the answer to whether the seed already applied.',\n importance: FieldSemanticImportance.PRIMARY,\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The pass recorded its outcome, timing, counters and failure report, and the settled record is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No pass exists for the supplied identifier to settle.' },\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'The outcome fails schema validation, for example an unrecognized status.', errorCode: 'VALIDATION_FAILED' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'A caller outside the dispatcher attempts to rewrite a pass outcome.' },\n ],\n idempotent: true,\n variants: {\n [DataSeedRunVariantKey.INTERNAL]: {\n purpose: 'Let the dispatcher write the terminal outcome of the pass it opened.',\n whenToUse: 'Use when a pass has finished walking its entries, whether it succeeded, partially succeeded, or stopped.',\n },\n },\n },\n\n [Op.DELETE]: {\n purpose: 'Remove a recorded pass so the next dispatcher run treats that scope as never seeded.',\n outcome: 'The seed is re-applied to that scope on the next run, without editing or re-deploying the seed declaration.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The recorded pass was removed and the scope is eligible for seeding again.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No pass exists for the supplied identifier.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not a platform administrator.' },\n ],\n idempotent: true,\n variants: {\n [DataSeedRunVariantKey.ADMIN]: {\n purpose: 'Give a platform administrator the supported re-run gesture.',\n whenToUse: 'Use when a seed must be applied again to one scope and raising the declared version would wrongly re-run it everywhere. The dispatcher never deletes its own history.',\n },\n },\n },\n\n [Op.LIST]: {\n purpose: 'Enumerate recorded seeding passes.',\n outcome: 'The caller sees seeding history as a set rather than one pass at a time.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A page of recorded passes, possibly empty, narrowed by the requested seed, scope, status, or trigger filters.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not a platform administrator authorized to enumerate seeding history.' },\n ],\n idempotent: true,\n variants: {\n [DataSeedRunVariantKey.INTERNAL]: {\n purpose: 'Let the dispatcher enumerate prior passes while deciding whether a scope still needs seeding.',\n },\n [DataSeedRunVariantKey.ADMIN]: {\n purpose: 'Let a platform administrator browse seeding history from the back office.',\n },\n },\n },\n\n [Op.COUNT]: {\n purpose: 'Count recorded passes matching a set of conditions.',\n outcome: 'The dispatcher can answer \"has any completed pass already covered this scope?\" without loading the rows.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The number of recorded passes matching the conditions.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not a platform administrator.' },\n ],\n idempotent: true,\n variants: {\n [DataSeedRunVariantKey.INTERNAL]: {\n purpose: 'Back the dispatcher\\'s already-seeded check, which needs only a yes or no and never the rows themselves.',\n },\n },\n },\n\n [Op.SEARCH]: {\n purpose: 'Search seeding history by seed name or anchor row.',\n outcome: 'An administrator can narrow history to the passes relevant to one seed or one affected row.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'A page of recorded passes, possibly empty, matching the search term and any filters.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The caller is not a platform administrator authorized to query seeding history.' },\n ],\n idempotent: true,\n variants: {\n [DataSeedRunVariantKey.ADMIN]: {\n purpose: 'Let a platform administrator find passes by seed name or by the row a pass was anchored to.',\n whenToUse: 'Use when troubleshooting starts from \"which seed touched this row\" rather than from a known pass identifier.',\n },\n },\n },\n },\n\n businessConstraints: [\n 'This ledger records what a seeding pass did. It is never the source of truth for the data the seed produced — that lives on the seeded rows themselves.',\n 'A pass is identified by its seed, its scope, and its declared version together. That identity is what makes seeding safe to repeat, so it must not be widened or narrowed casually.',\n 'Who triggered a pass is recorded for attribution only. Seeding always runs with internal system permissions, so the recorded user never confers authority.',\n 'Removing a recorded pass is a deliberate administrative re-run gesture. The dispatcher itself never deletes its own history, because the history is what makes the next decision correct.',\n ],\n }),\n // DATA_SEED_RUN is a STANDALONE infrastructure ledger reached only through\n // internal repository services and a platform-administrator back-office path.\n // The `APPLICATION → DATA_SEED_RUN` relationship is routing-side only (the row\n // carries no application identifier of its own), which is why the scope is\n // declared here rather than derived from a scope-owning parent.\n { resourcePrimaryScope: ResourcePrimaryScope.APPLICATION },\n);\n"]}