@wildo-ai/saas-models 1.1.4 → 1.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1032) hide show
  1. package/dist/esm/__tests__/setup.d.ts.map +1 -1
  2. package/dist/esm/_inspect.d.ts.map +1 -1
  3. package/dist/esm/applications/application-metadata.shared.resources-config.schemas.d.ts +1 -1
  4. package/dist/esm/applications/application-metadata.shared.resources-config.schemas.d.ts.map +1 -1
  5. package/dist/esm/applications/application-subject.shared.schemas.d.ts.map +1 -1
  6. package/dist/esm/applications/application-versions.shared.resources-config.schemas.d.ts +1 -1
  7. package/dist/esm/applications/application-versions.shared.resources-config.schemas.d.ts.map +1 -1
  8. package/dist/esm/applications/application-versions.shared.resources-config.schemas.js +2 -2
  9. package/dist/esm/applications/application-versions.shared.resources-config.schemas.js.map +1 -1
  10. package/dist/esm/applications/applications-context.schemas.d.ts +236 -18
  11. package/dist/esm/applications/applications-context.schemas.d.ts.map +1 -1
  12. package/dist/esm/applications/applications.shared.resources-config.schemas.d.ts +1 -0
  13. package/dist/esm/applications/applications.shared.resources-config.schemas.d.ts.map +1 -1
  14. package/dist/esm/applications/applications.shared.resources-config.schemas.js +1 -1
  15. package/dist/esm/applications/applications.shared.resources-config.schemas.js.map +1 -1
  16. package/dist/esm/applications/applications.shared.schemas.d.ts +3 -2
  17. package/dist/esm/applications/applications.shared.schemas.d.ts.map +1 -1
  18. package/dist/esm/applications/applications.shared.schemas.js +40 -5
  19. package/dist/esm/applications/applications.shared.schemas.js.map +1 -1
  20. package/dist/esm/billing/billing-account.shared.resources-config.schemas.d.ts +1 -2
  21. package/dist/esm/billing/billing-account.shared.resources-config.schemas.d.ts.map +1 -1
  22. package/dist/esm/billing/billing-account.shared.resources-config.schemas.js +1 -2
  23. package/dist/esm/billing/billing-account.shared.resources-config.schemas.js.map +1 -1
  24. package/dist/esm/billing/billing-account.shared.schemas.d.ts.map +1 -1
  25. package/dist/esm/billing/billing-configuration.shared.schemas.d.ts.map +1 -1
  26. package/dist/esm/billing/billing-configuration.shared.schemas.js.map +1 -1
  27. package/dist/esm/billing/billing-enums.shared.schemas.d.ts +87 -5
  28. package/dist/esm/billing/billing-enums.shared.schemas.d.ts.map +1 -1
  29. package/dist/esm/billing/billing-enums.shared.schemas.js +91 -5
  30. package/dist/esm/billing/billing-enums.shared.schemas.js.map +1 -1
  31. package/dist/esm/billing/billing-types.shared.schemas.d.ts +24 -4
  32. package/dist/esm/billing/billing-types.shared.schemas.d.ts.map +1 -1
  33. package/dist/esm/billing/billing-types.shared.schemas.js +24 -8
  34. package/dist/esm/billing/billing-types.shared.schemas.js.map +1 -1
  35. package/dist/esm/billing/credit-pool.shared.resources-config.schemas.d.ts.map +1 -1
  36. package/dist/esm/billing/credit-pool.shared.schemas.d.ts.map +1 -1
  37. package/dist/esm/billing/invoice-ref.shared.resources-config.schemas.d.ts.map +1 -1
  38. package/dist/esm/billing/invoice-ref.shared.schemas.d.ts.map +1 -1
  39. package/dist/esm/billing/price.shared.resources-config.schemas.d.ts.map +1 -1
  40. package/dist/esm/billing/price.shared.resources-config.schemas.js +32 -2
  41. package/dist/esm/billing/price.shared.resources-config.schemas.js.map +1 -1
  42. package/dist/esm/billing/price.shared.schemas.d.ts.map +1 -1
  43. package/dist/esm/billing/price.shared.schemas.js.map +1 -1
  44. package/dist/esm/billing/product-behavior-policy.shared.schemas.d.ts.map +1 -1
  45. package/dist/esm/billing/product-behavior-policy.shared.schemas.js +1 -1
  46. package/dist/esm/billing/product-behavior-policy.shared.schemas.js.map +1 -1
  47. package/dist/esm/billing/product-definition.shared.schemas.d.ts.map +1 -1
  48. package/dist/esm/billing/product.shared.resources-config.schemas.d.ts.map +1 -1
  49. package/dist/esm/billing/product.shared.resources-config.schemas.js +32 -2
  50. package/dist/esm/billing/product.shared.resources-config.schemas.js.map +1 -1
  51. package/dist/esm/billing/product.shared.schemas.d.ts +1 -0
  52. package/dist/esm/billing/product.shared.schemas.d.ts.map +1 -1
  53. package/dist/esm/billing/product.shared.schemas.js +3 -0
  54. package/dist/esm/billing/product.shared.schemas.js.map +1 -1
  55. package/dist/esm/billing/promotions.shared.resources-config.schemas.d.ts.map +1 -1
  56. package/dist/esm/billing/promotions.shared.resources-config.schemas.js +33 -3
  57. package/dist/esm/billing/promotions.shared.resources-config.schemas.js.map +1 -1
  58. package/dist/esm/billing/promotions.shared.schemas.d.ts.map +1 -1
  59. package/dist/esm/billing/referral.shared.resources-config.schemas.d.ts.map +1 -1
  60. package/dist/esm/billing/referral.shared.resources-config.schemas.js +22 -2
  61. package/dist/esm/billing/referral.shared.resources-config.schemas.js.map +1 -1
  62. package/dist/esm/billing/referral.shared.schemas.d.ts +1 -0
  63. package/dist/esm/billing/referral.shared.schemas.d.ts.map +1 -1
  64. package/dist/esm/billing/referral.shared.schemas.js +3 -0
  65. package/dist/esm/billing/referral.shared.schemas.js.map +1 -1
  66. package/dist/esm/billing/subscription.shared.resources-config.schemas.d.ts +23 -1
  67. package/dist/esm/billing/subscription.shared.resources-config.schemas.d.ts.map +1 -1
  68. package/dist/esm/billing/subscription.shared.resources-config.schemas.js +48 -2
  69. package/dist/esm/billing/subscription.shared.resources-config.schemas.js.map +1 -1
  70. package/dist/esm/billing/subscription.shared.schemas.d.ts +1 -0
  71. package/dist/esm/billing/subscription.shared.schemas.d.ts.map +1 -1
  72. package/dist/esm/billing/subscription.shared.schemas.js +3 -0
  73. package/dist/esm/billing/subscription.shared.schemas.js.map +1 -1
  74. package/dist/esm/billing/usage-flush-evidence.shared.schemas.d.ts +49 -0
  75. package/dist/esm/billing/usage-flush-evidence.shared.schemas.d.ts.map +1 -0
  76. package/dist/esm/billing/usage-flush-evidence.shared.schemas.js +48 -0
  77. package/dist/esm/billing/usage-flush-evidence.shared.schemas.js.map +1 -0
  78. package/dist/esm/billing/usage-record.shared.resources-config.schemas.d.ts.map +1 -1
  79. package/dist/esm/billing/usage-record.shared.schemas.d.ts +1 -0
  80. package/dist/esm/billing/usage-record.shared.schemas.d.ts.map +1 -1
  81. package/dist/esm/billing/usage-record.shared.schemas.js +3 -0
  82. package/dist/esm/billing/usage-record.shared.schemas.js.map +1 -1
  83. package/dist/esm/charts/aggregation-query.shared.schemas.d.ts.map +1 -1
  84. package/dist/esm/charts/chart-definition-builder.shared.d.ts.map +1 -1
  85. package/dist/esm/companion/provider-discovery.shared.schemas.d.ts +7 -1
  86. package/dist/esm/companion/provider-discovery.shared.schemas.d.ts.map +1 -1
  87. package/dist/esm/companion/provider-discovery.shared.schemas.js.map +1 -1
  88. package/dist/esm/companion/shared-library-companion.shared.definitions.d.ts.map +1 -1
  89. package/dist/esm/companion-exports.d.ts.map +1 -1
  90. package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.d.ts +14 -3
  91. package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.d.ts.map +1 -1
  92. package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.js +21 -7
  93. package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.js.map +1 -1
  94. package/dist/esm/compliance/audit-trails/audit-export-projection.shared.schemas.d.ts +450 -0
  95. package/dist/esm/compliance/audit-trails/audit-export-projection.shared.schemas.d.ts.map +1 -0
  96. package/dist/esm/compliance/audit-trails/audit-export-projection.shared.schemas.js +723 -0
  97. package/dist/esm/compliance/audit-trails/audit-export-projection.shared.schemas.js.map +1 -0
  98. package/dist/esm/compliance/audit-trails/audit-log-sink.shared.schemas.d.ts.map +1 -1
  99. package/dist/esm/compliance/audit-trails/audit-logs.shared.resources-config.schemas.d.ts +2 -2
  100. package/dist/esm/compliance/audit-trails/audit-logs.shared.resources-config.schemas.d.ts.map +1 -1
  101. package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.d.ts +8 -0
  102. package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.d.ts.map +1 -1
  103. package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.js +15 -0
  104. package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.js.map +1 -1
  105. package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.d.ts +610 -16
  106. package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.d.ts.map +1 -1
  107. package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.js +769 -38
  108. package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.js.map +1 -1
  109. package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.d.ts.map +1 -1
  110. package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.js +29 -0
  111. package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.js.map +1 -1
  112. package/dist/esm/compliance/documents/governed-document-interactions.shared.schemas.d.ts +463 -0
  113. package/dist/esm/compliance/documents/governed-document-interactions.shared.schemas.d.ts.map +1 -0
  114. package/dist/esm/compliance/documents/governed-document-interactions.shared.schemas.js +526 -0
  115. package/dist/esm/compliance/documents/governed-document-interactions.shared.schemas.js.map +1 -0
  116. package/dist/esm/compliance/documents/governed-documents.shared.schemas.d.ts +539 -15
  117. package/dist/esm/compliance/documents/governed-documents.shared.schemas.d.ts.map +1 -1
  118. package/dist/esm/compliance/documents/governed-documents.shared.schemas.js +402 -14
  119. package/dist/esm/compliance/documents/governed-documents.shared.schemas.js.map +1 -1
  120. package/dist/esm/compliance/documents/user-governed-document-acceptances.shared.resources-config.schemas.d.ts +18 -0
  121. package/dist/esm/compliance/documents/user-governed-document-acceptances.shared.resources-config.schemas.d.ts.map +1 -0
  122. package/dist/esm/compliance/documents/user-governed-document-acceptances.shared.resources-config.schemas.js +89 -0
  123. package/dist/esm/compliance/documents/user-governed-document-acceptances.shared.resources-config.schemas.js.map +1 -0
  124. package/dist/esm/compliance/documents/user-governed-document-acceptances.shared.schemas.d.ts +47 -0
  125. package/dist/esm/compliance/documents/user-governed-document-acceptances.shared.schemas.d.ts.map +1 -0
  126. package/dist/esm/compliance/documents/user-governed-document-acceptances.shared.schemas.js +73 -0
  127. package/dist/esm/compliance/documents/user-governed-document-acceptances.shared.schemas.js.map +1 -0
  128. package/dist/esm/compliance/privacy/ai-use-posture.shared.schemas.d.ts +21 -0
  129. package/dist/esm/compliance/privacy/ai-use-posture.shared.schemas.d.ts.map +1 -1
  130. package/dist/esm/compliance/privacy/ai-use-posture.shared.schemas.js +39 -1
  131. package/dist/esm/compliance/privacy/ai-use-posture.shared.schemas.js.map +1 -1
  132. package/dist/esm/compliance/privacy/capability-consent-purposes.shared.utils.d.ts +33 -0
  133. package/dist/esm/compliance/privacy/capability-consent-purposes.shared.utils.d.ts.map +1 -0
  134. package/dist/esm/compliance/privacy/capability-consent-purposes.shared.utils.js +30 -0
  135. package/dist/esm/compliance/privacy/capability-consent-purposes.shared.utils.js.map +1 -0
  136. package/dist/esm/compliance/privacy/client-storage.shared.schemas.d.ts +6 -5
  137. package/dist/esm/compliance/privacy/client-storage.shared.schemas.d.ts.map +1 -1
  138. package/dist/esm/compliance/privacy/client-storage.shared.schemas.js +15 -5
  139. package/dist/esm/compliance/privacy/client-storage.shared.schemas.js.map +1 -1
  140. package/dist/esm/compliance/privacy/consent-gate-vocabulary.shared.schemas.d.ts +127 -0
  141. package/dist/esm/compliance/privacy/consent-gate-vocabulary.shared.schemas.d.ts.map +1 -0
  142. package/dist/esm/compliance/privacy/consent-gate-vocabulary.shared.schemas.js +94 -0
  143. package/dist/esm/compliance/privacy/consent-gate-vocabulary.shared.schemas.js.map +1 -0
  144. package/dist/esm/compliance/privacy/consent-purposes.shared.d.ts +125 -0
  145. package/dist/esm/compliance/privacy/consent-purposes.shared.d.ts.map +1 -0
  146. package/dist/esm/compliance/privacy/consent-purposes.shared.js +136 -0
  147. package/dist/esm/compliance/privacy/consent-purposes.shared.js.map +1 -0
  148. package/dist/esm/compliance/privacy/data-retention.shared.schemas.d.ts.map +1 -1
  149. package/dist/esm/compliance/privacy/data-subject-rights.shared.schemas.d.ts +91 -0
  150. package/dist/esm/compliance/privacy/data-subject-rights.shared.schemas.d.ts.map +1 -0
  151. package/dist/esm/compliance/privacy/data-subject-rights.shared.schemas.js +123 -0
  152. package/dist/esm/compliance/privacy/data-subject-rights.shared.schemas.js.map +1 -0
  153. package/dist/esm/compliance/privacy/impersonalization-scrub.shared.utils.d.ts.map +1 -1
  154. package/dist/esm/compliance/privacy/impersonalization.shared.schemas.d.ts.map +1 -1
  155. package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.d.ts.map +1 -1
  156. package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.js.map +1 -1
  157. package/dist/esm/compliance/privacy/operator-compliance-identity.shared.schemas.d.ts +68 -25
  158. package/dist/esm/compliance/privacy/operator-compliance-identity.shared.schemas.d.ts.map +1 -1
  159. package/dist/esm/compliance/privacy/operator-compliance-identity.shared.schemas.js +74 -22
  160. package/dist/esm/compliance/privacy/operator-compliance-identity.shared.schemas.js.map +1 -1
  161. package/dist/esm/compliance/privacy/personal-data-category.shared.schemas.d.ts.map +1 -1
  162. package/dist/esm/compliance/privacy/personal-data-declaration.shared.utils.d.ts.map +1 -1
  163. package/dist/esm/compliance/privacy/privacy.shared.schemas.d.ts +9 -17
  164. package/dist/esm/compliance/privacy/privacy.shared.schemas.d.ts.map +1 -1
  165. package/dist/esm/compliance/privacy/privacy.shared.schemas.js +74 -31
  166. package/dist/esm/compliance/privacy/privacy.shared.schemas.js.map +1 -1
  167. package/dist/esm/compliance/privacy/redaction.shared.schemas.d.ts.map +1 -1
  168. package/dist/esm/compliance/privacy/redaction.shared.schemas.js.map +1 -1
  169. package/dist/esm/compliance/privacy/retention-schedule.shared.schemas.d.ts.map +1 -1
  170. package/dist/esm/compliance/privacy/subject-erasure-lane-evidence.shared.schemas.d.ts +47 -0
  171. package/dist/esm/compliance/privacy/subject-erasure-lane-evidence.shared.schemas.d.ts.map +1 -0
  172. package/dist/esm/compliance/privacy/subject-erasure-lane-evidence.shared.schemas.js +98 -0
  173. package/dist/esm/compliance/privacy/subject-erasure-lane-evidence.shared.schemas.js.map +1 -0
  174. package/dist/esm/compliance/privacy/subject-erasure.shared.schemas.d.ts +368 -35
  175. package/dist/esm/compliance/privacy/subject-erasure.shared.schemas.d.ts.map +1 -1
  176. package/dist/esm/compliance/privacy/subject-erasure.shared.schemas.js +403 -17
  177. package/dist/esm/compliance/privacy/subject-erasure.shared.schemas.js.map +1 -1
  178. package/dist/esm/compliance/privacy/subject-export-render.shared.utils.d.ts.map +1 -1
  179. package/dist/esm/compliance/privacy/subject-export.shared.schemas.d.ts.map +1 -1
  180. package/dist/esm/compliance/privacy/subject-export.shared.schemas.js.map +1 -1
  181. package/dist/esm/compliance/review-cadence.shared.schemas.d.ts +56 -0
  182. package/dist/esm/compliance/review-cadence.shared.schemas.d.ts.map +1 -0
  183. package/dist/esm/compliance/review-cadence.shared.schemas.js +71 -0
  184. package/dist/esm/compliance/review-cadence.shared.schemas.js.map +1 -0
  185. package/dist/esm/compliance/risk-posture.shared.schemas.d.ts +161 -0
  186. package/dist/esm/compliance/risk-posture.shared.schemas.d.ts.map +1 -0
  187. package/dist/esm/compliance/risk-posture.shared.schemas.js +166 -0
  188. package/dist/esm/compliance/risk-posture.shared.schemas.js.map +1 -0
  189. package/dist/esm/config/analytics-value-moments.shared.schemas.d.ts +4 -3
  190. package/dist/esm/config/analytics-value-moments.shared.schemas.d.ts.map +1 -1
  191. package/dist/esm/config/analytics-value-moments.shared.schemas.js +4 -3
  192. package/dist/esm/config/analytics-value-moments.shared.schemas.js.map +1 -1
  193. package/dist/esm/config/app-configuration-shared.shared.schemas.d.ts +222 -9
  194. package/dist/esm/config/app-configuration-shared.shared.schemas.d.ts.map +1 -1
  195. package/dist/esm/config/app-configuration-shared.shared.schemas.js +232 -9
  196. package/dist/esm/config/app-configuration-shared.shared.schemas.js.map +1 -1
  197. package/dist/esm/config/auth-config-resolution.shared.utils.d.ts +75 -3
  198. package/dist/esm/config/auth-config-resolution.shared.utils.d.ts.map +1 -1
  199. package/dist/esm/config/auth-config-resolution.shared.utils.js +93 -4
  200. package/dist/esm/config/auth-config-resolution.shared.utils.js.map +1 -1
  201. package/dist/esm/config/brand-assets.shared.schemas.d.ts +5 -4
  202. package/dist/esm/config/brand-assets.shared.schemas.d.ts.map +1 -1
  203. package/dist/esm/config/brand-assets.shared.schemas.js +14 -4
  204. package/dist/esm/config/brand-assets.shared.schemas.js.map +1 -1
  205. package/dist/esm/config/entity-identity-config.shared.schemas.d.ts +463 -19
  206. package/dist/esm/config/entity-identity-config.shared.schemas.d.ts.map +1 -1
  207. package/dist/esm/config/entity-identity-config.shared.schemas.js +535 -28
  208. package/dist/esm/config/entity-identity-config.shared.schemas.js.map +1 -1
  209. package/dist/esm/config/frontend/chart-definition.shared.schemas.d.ts +24 -24
  210. package/dist/esm/config/frontend/chart-definition.shared.schemas.d.ts.map +1 -1
  211. package/dist/esm/config/frontend/chart-registration-alignment.shared.d.ts.map +1 -1
  212. package/dist/esm/config/frontend/chart-registration-alignment.shared.js.map +1 -1
  213. package/dist/esm/config/frontend/navigation.shared.schemas.d.ts +21 -17
  214. package/dist/esm/config/frontend/navigation.shared.schemas.d.ts.map +1 -1
  215. package/dist/esm/config/frontend/navigation.shared.schemas.js +58 -40
  216. package/dist/esm/config/frontend/navigation.shared.schemas.js.map +1 -1
  217. package/dist/esm/config/frontend/onboarding.shared.schemas.d.ts +90 -133
  218. package/dist/esm/config/frontend/onboarding.shared.schemas.d.ts.map +1 -1
  219. package/dist/esm/config/frontend/onboarding.shared.schemas.js +148 -100
  220. package/dist/esm/config/frontend/onboarding.shared.schemas.js.map +1 -1
  221. package/dist/esm/config/registration-acquisition-policy.shared.utils.d.ts.map +1 -1
  222. package/dist/esm/config-authoring.entry.d.ts.map +1 -1
  223. package/dist/esm/crdt/crdt-merge.shared.utils.d.ts.map +1 -1
  224. package/dist/esm/data-seeding/data-seeding-config.shared.schemas.d.ts.map +1 -1
  225. package/dist/esm/errors/errors.custom-message-ref.shared.definitions.d.ts +140 -43
  226. package/dist/esm/errors/errors.custom-message-ref.shared.definitions.d.ts.map +1 -1
  227. package/dist/esm/errors/errors.custom-message-ref.shared.definitions.js +141 -42
  228. package/dist/esm/errors/errors.custom-message-ref.shared.definitions.js.map +1 -1
  229. package/dist/esm/errors/errors.shared.definitions.d.ts.map +1 -1
  230. package/dist/esm/errors/errors.shared.definitions.js +1 -1
  231. package/dist/esm/errors/errors.shared.definitions.js.map +1 -1
  232. package/dist/esm/errors/errors.shared.schemas.d.ts +29 -40
  233. package/dist/esm/errors/errors.shared.schemas.d.ts.map +1 -1
  234. package/dist/esm/errors/errors.shared.schemas.js +37 -54
  235. package/dist/esm/errors/errors.shared.schemas.js.map +1 -1
  236. package/dist/esm/errors/errors.shared.utils.d.ts +24 -0
  237. package/dist/esm/errors/errors.shared.utils.d.ts.map +1 -1
  238. package/dist/esm/errors/errors.shared.utils.js +39 -0
  239. package/dist/esm/errors/errors.shared.utils.js.map +1 -1
  240. package/dist/esm/errors/thrown-value-description.shared.utils.d.ts +27 -0
  241. package/dist/esm/errors/thrown-value-description.shared.utils.d.ts.map +1 -0
  242. package/dist/esm/errors/thrown-value-description.shared.utils.js +67 -0
  243. package/dist/esm/errors/thrown-value-description.shared.utils.js.map +1 -0
  244. package/dist/esm/external-data/external-data-pipeline.shared.schemas.d.ts +48 -73
  245. package/dist/esm/external-data/external-data-pipeline.shared.schemas.d.ts.map +1 -1
  246. package/dist/esm/external-data/external-data-pipeline.shared.schemas.js +103 -9
  247. package/dist/esm/external-data/external-data-pipeline.shared.schemas.js.map +1 -1
  248. package/dist/esm/external-data.exports.d.ts +1 -0
  249. package/dist/esm/external-data.exports.d.ts.map +1 -1
  250. package/dist/esm/external-data.exports.js +1 -0
  251. package/dist/esm/external-data.exports.js.map +1 -1
  252. package/dist/esm/external-providers/compose-provider-registry.shared.d.ts.map +1 -1
  253. package/dist/esm/external-providers/engine-capabilities.shared.schemas.d.ts +11 -12
  254. package/dist/esm/external-providers/engine-capabilities.shared.schemas.d.ts.map +1 -1
  255. package/dist/esm/external-providers/engine-capabilities.shared.schemas.js +11 -12
  256. package/dist/esm/external-providers/engine-capabilities.shared.schemas.js.map +1 -1
  257. package/dist/esm/external-providers/engine-capability-resolution-mode.shared.d.ts +5 -3
  258. package/dist/esm/external-providers/engine-capability-resolution-mode.shared.d.ts.map +1 -1
  259. package/dist/esm/external-providers/engine-capability-resolution-mode.shared.js +5 -3
  260. package/dist/esm/external-providers/engine-capability-resolution-mode.shared.js.map +1 -1
  261. package/dist/esm/external-providers/engine-capability-surface.shared.d.ts +77 -0
  262. package/dist/esm/external-providers/engine-capability-surface.shared.d.ts.map +1 -0
  263. package/dist/esm/external-providers/engine-capability-surface.shared.js +173 -0
  264. package/dist/esm/external-providers/engine-capability-surface.shared.js.map +1 -0
  265. package/dist/esm/external-providers/external-providers.shared.schemas.d.ts +2 -0
  266. package/dist/esm/external-providers/external-providers.shared.schemas.d.ts.map +1 -1
  267. package/dist/esm/external-providers/external-providers.shared.schemas.js +21 -0
  268. package/dist/esm/external-providers/external-providers.shared.schemas.js.map +1 -1
  269. package/dist/esm/external-providers/frontend-bootstrap.shared.schemas.d.ts +129 -9
  270. package/dist/esm/external-providers/frontend-bootstrap.shared.schemas.d.ts.map +1 -1
  271. package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.d.ts +114 -0
  272. package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.d.ts.map +1 -1
  273. package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.js +148 -0
  274. package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.js.map +1 -1
  275. package/dist/esm/external-providers/frontend-capability-runtime.shared.types.d.ts.map +1 -1
  276. package/dist/esm/external-providers/frontend-capability-runtime.shared.types.js.map +1 -1
  277. package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.d.ts +54 -3
  278. package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.d.ts.map +1 -1
  279. package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.js +58 -1
  280. package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.js.map +1 -1
  281. package/dist/esm/external-providers/frontend-provider-public-config.shared.d.ts +12 -3
  282. package/dist/esm/external-providers/frontend-provider-public-config.shared.d.ts.map +1 -1
  283. package/dist/esm/external-providers/frontend-provider-public-config.shared.js +14 -5
  284. package/dist/esm/external-providers/frontend-provider-public-config.shared.js.map +1 -1
  285. package/dist/esm/external-providers/provider-authentication-assurance.shared.schemas.d.ts +30 -0
  286. package/dist/esm/external-providers/provider-authentication-assurance.shared.schemas.d.ts.map +1 -0
  287. package/dist/esm/external-providers/provider-authentication-assurance.shared.schemas.js +32 -0
  288. package/dist/esm/external-providers/provider-authentication-assurance.shared.schemas.js.map +1 -0
  289. package/dist/esm/external-providers/provider-browser-operations.shared.schemas.d.ts +86 -0
  290. package/dist/esm/external-providers/provider-browser-operations.shared.schemas.d.ts.map +1 -0
  291. package/dist/esm/external-providers/provider-browser-operations.shared.schemas.js +85 -0
  292. package/dist/esm/external-providers/provider-browser-operations.shared.schemas.js.map +1 -0
  293. package/dist/esm/external-providers/provider-capability.shared.schemas.d.ts +14 -13
  294. package/dist/esm/external-providers/provider-capability.shared.schemas.d.ts.map +1 -1
  295. package/dist/esm/external-providers/provider-capability.shared.schemas.js +10 -10
  296. package/dist/esm/external-providers/provider-capability.shared.schemas.js.map +1 -1
  297. package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.d.ts.map +1 -1
  298. package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.js.map +1 -1
  299. package/dist/esm/external-providers/provider-frontend-component-contract.shared.types.d.ts.map +1 -1
  300. package/dist/esm/external-providers/provider-frontend-component-contract.shared.types.js.map +1 -1
  301. package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.d.ts +7 -5
  302. package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.d.ts.map +1 -1
  303. package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.js +7 -5
  304. package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.js.map +1 -1
  305. package/dist/esm/external-providers/provider-metadata.shared.schemas.d.ts +8 -5
  306. package/dist/esm/external-providers/provider-metadata.shared.schemas.d.ts.map +1 -1
  307. package/dist/esm/external-providers/provider-metadata.shared.schemas.js +5 -2
  308. package/dist/esm/external-providers/provider-metadata.shared.schemas.js.map +1 -1
  309. package/dist/esm/external-providers/provider-protocol.shared.schemas.d.ts.map +1 -1
  310. package/dist/esm/external-providers/provider-protocol.shared.schemas.js.map +1 -1
  311. package/dist/esm/external-providers/provider-tier-rule.shared.utils.d.ts.map +1 -1
  312. package/dist/esm/external-providers/provider-tier-rule.shared.utils.js.map +1 -1
  313. package/dist/esm/external-providers/provider-usage-pricing.shared.schemas.d.ts.map +1 -1
  314. package/dist/esm/features/application-features.shared.resources-config.schemas.d.ts +2 -0
  315. package/dist/esm/features/application-features.shared.resources-config.schemas.d.ts.map +1 -1
  316. package/dist/esm/features/application-features.shared.resources-config.schemas.js +30 -3
  317. package/dist/esm/features/application-features.shared.resources-config.schemas.js.map +1 -1
  318. package/dist/esm/features/connected-feature.example.d.ts +64 -0
  319. package/dist/esm/features/connected-feature.example.d.ts.map +1 -0
  320. package/dist/esm/features/connected-feature.example.js +86 -0
  321. package/dist/esm/features/connected-feature.example.js.map +1 -0
  322. package/dist/esm/features/core-feature-definitions.shared.d.ts.map +1 -1
  323. package/dist/esm/features/core-feature-definitions.shared.js.map +1 -1
  324. package/dist/esm/features/feature-builders.shared.d.ts.map +1 -1
  325. package/dist/esm/features/feature-builders.shared.js.map +1 -1
  326. package/dist/esm/features/feature-definition.shared.schemas.d.ts.map +1 -1
  327. package/dist/esm/features/feature-registry.shared.d.ts.map +1 -1
  328. package/dist/esm/features/feature-resolution.shared.schemas.d.ts.map +1 -1
  329. package/dist/esm/features/scope-features.shared.schemas.d.ts +53 -0
  330. package/dist/esm/features/scope-features.shared.schemas.d.ts.map +1 -1
  331. package/dist/esm/features/scope-features.shared.schemas.js +37 -0
  332. package/dist/esm/features/scope-features.shared.schemas.js.map +1 -1
  333. package/dist/esm/features/user-features.shared.resources-config.schemas.d.ts +1 -1
  334. package/dist/esm/features/user-features.shared.resources-config.schemas.d.ts.map +1 -1
  335. package/dist/esm/features/user-features.shared.resources-config.schemas.js +34 -52
  336. package/dist/esm/features/user-features.shared.resources-config.schemas.js.map +1 -1
  337. package/dist/esm/files/file-remote-reference-link.shared.schemas.d.ts.map +1 -1
  338. package/dist/esm/files/file-remote-reference-link.shared.schemas.js.map +1 -1
  339. package/dist/esm/files/file-upload-grant.shared.schemas.d.ts.map +1 -1
  340. package/dist/esm/files/file-upload-grant.shared.schemas.js.map +1 -1
  341. package/dist/esm/files/files.shared.resources-config.schemas.d.ts +3 -3
  342. package/dist/esm/files/files.shared.resources-config.schemas.d.ts.map +1 -1
  343. package/dist/esm/files/files.shared.resources-config.schemas.js +3 -3
  344. package/dist/esm/files/files.shared.resources-config.schemas.js.map +1 -1
  345. package/dist/esm/files/files.shared.schemas.d.ts.map +1 -1
  346. package/dist/esm/files/files.shared.schemas.js.map +1 -1
  347. package/dist/esm/files/files.shared.utils.d.ts.map +1 -1
  348. package/dist/esm/flows-actors/a2a-push-delivery-log.shared.resources-config.schemas.d.ts.map +1 -1
  349. package/dist/esm/flows-actors/a2a-push-delivery-log.shared.schemas.d.ts.map +1 -1
  350. package/dist/esm/flows-actors/a2a-token-budget-state.shared.resources-config.schemas.d.ts.map +1 -1
  351. package/dist/esm/flows-actors/a2a-token-budget-state.shared.schemas.d.ts.map +1 -1
  352. package/dist/esm/flows-actors/actors.shared.schemas.d.ts +152 -129
  353. package/dist/esm/flows-actors/actors.shared.schemas.d.ts.map +1 -1
  354. package/dist/esm/flows-actors/actors.shared.schemas.js +99 -2
  355. package/dist/esm/flows-actors/actors.shared.schemas.js.map +1 -1
  356. package/dist/esm/flows-actors/agent-traceability.shared.schemas.d.ts +6 -0
  357. package/dist/esm/flows-actors/agent-traceability.shared.schemas.d.ts.map +1 -1
  358. package/dist/esm/flows-actors/agents.shared.schemas.d.ts +3 -3
  359. package/dist/esm/flows-actors/agents.shared.schemas.d.ts.map +1 -1
  360. package/dist/esm/flows-actors/agents.shared.schemas.js +11 -5
  361. package/dist/esm/flows-actors/agents.shared.schemas.js.map +1 -1
  362. package/dist/esm/flows-actors/deliberation.shared.schemas.d.ts +13 -0
  363. package/dist/esm/flows-actors/deliberation.shared.schemas.d.ts.map +1 -1
  364. package/dist/esm/flows-actors/deliberation.shared.schemas.js.map +1 -1
  365. package/dist/esm/flows-actors/execution-plan-readiness.shared.utils.d.ts +45 -0
  366. package/dist/esm/flows-actors/execution-plan-readiness.shared.utils.d.ts.map +1 -0
  367. package/dist/esm/flows-actors/execution-plan-readiness.shared.utils.js +51 -0
  368. package/dist/esm/flows-actors/execution-plan-readiness.shared.utils.js.map +1 -0
  369. package/dist/esm/flows-actors/flows-actors-execution.shared.resources-config.schemas.d.ts.map +1 -1
  370. package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.d.ts +31 -0
  371. package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.d.ts.map +1 -1
  372. package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.js +61 -3
  373. package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.js.map +1 -1
  374. package/dist/esm/flows-actors/flows-actors-task.shared.resources-config.schemas.d.ts.map +1 -1
  375. package/dist/esm/flows-actors/flows-actors-task.shared.schemas.d.ts +2 -2
  376. package/dist/esm/flows-actors/flows-actors-task.shared.schemas.d.ts.map +1 -1
  377. package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.d.ts +16 -8
  378. package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.d.ts.map +1 -1
  379. package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.js +23 -11
  380. package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.js.map +1 -1
  381. package/dist/esm/flows-actors/flows-actors.configuration.shared.schemas.d.ts +0 -189
  382. package/dist/esm/flows-actors/flows-actors.configuration.shared.schemas.d.ts.map +1 -1
  383. package/dist/esm/flows-actors/flows-actors.configuration.shared.schemas.js +14 -50
  384. package/dist/esm/flows-actors/flows-actors.configuration.shared.schemas.js.map +1 -1
  385. package/dist/esm/flows-actors/flows-actors.frontend.shared.schemas.d.ts +0 -3
  386. package/dist/esm/flows-actors/flows-actors.frontend.shared.schemas.d.ts.map +1 -1
  387. package/dist/esm/flows-actors/flows-actors.frontend.shared.schemas.js +0 -1
  388. package/dist/esm/flows-actors/flows-actors.frontend.shared.schemas.js.map +1 -1
  389. package/dist/esm/flows-actors/flows-actors.io.shared.schemas.d.ts.map +1 -1
  390. package/dist/esm/flows-actors/flows-actors.io.shared.schemas.js.map +1 -1
  391. package/dist/esm/flows-actors/flows-actors.system.shared.definitions.d.ts.map +1 -1
  392. package/dist/esm/flows-actors/flows-actors.system.shared.schemas.d.ts +1 -67
  393. package/dist/esm/flows-actors/flows-actors.system.shared.schemas.d.ts.map +1 -1
  394. package/dist/esm/flows-actors/flows-actors.system.shared.schemas.js +1 -2
  395. package/dist/esm/flows-actors/flows-actors.system.shared.schemas.js.map +1 -1
  396. package/dist/esm/flows-actors/flows.shared.schemas.d.ts +0 -1
  397. package/dist/esm/flows-actors/flows.shared.schemas.d.ts.map +1 -1
  398. package/dist/esm/flows-actors/flows.shared.schemas.js.map +1 -1
  399. package/dist/esm/flows-actors/human-decision.shared.schemas.d.ts +121 -0
  400. package/dist/esm/flows-actors/human-decision.shared.schemas.d.ts.map +1 -0
  401. package/dist/esm/flows-actors/human-decision.shared.schemas.js +252 -0
  402. package/dist/esm/flows-actors/human-decision.shared.schemas.js.map +1 -0
  403. package/dist/esm/flows-actors/mcp-servers.shared.schemas.d.ts.map +1 -1
  404. package/dist/esm/flows-actors/mcp-servers.shared.schemas.js +4 -2
  405. package/dist/esm/flows-actors/mcp-servers.shared.schemas.js.map +1 -1
  406. package/dist/esm/flows-actors/prompt-ir.shared.schemas.d.ts.map +1 -1
  407. package/dist/esm/flows-actors/provider-call-records.shared.resources-config.schemas.d.ts +24 -0
  408. package/dist/esm/flows-actors/provider-call-records.shared.resources-config.schemas.d.ts.map +1 -0
  409. package/dist/esm/flows-actors/provider-call-records.shared.resources-config.schemas.js +80 -0
  410. package/dist/esm/flows-actors/provider-call-records.shared.resources-config.schemas.js.map +1 -0
  411. package/dist/esm/flows-actors/provider-call-records.shared.schemas.d.ts +123 -0
  412. package/dist/esm/flows-actors/provider-call-records.shared.schemas.d.ts.map +1 -0
  413. package/dist/esm/flows-actors/provider-call-records.shared.schemas.js +181 -0
  414. package/dist/esm/flows-actors/provider-call-records.shared.schemas.js.map +1 -0
  415. package/dist/esm/flows-actors/tasks.actors.shared.schemas.d.ts +58 -81
  416. package/dist/esm/flows-actors/tasks.actors.shared.schemas.d.ts.map +1 -1
  417. package/dist/esm/flows-actors/tasks.actors.shared.schemas.js +75 -38
  418. package/dist/esm/flows-actors/tasks.actors.shared.schemas.js.map +1 -1
  419. package/dist/esm/frontend-definitions/settings-destination-ref.definitions.d.ts +106 -1
  420. package/dist/esm/frontend-definitions/settings-destination-ref.definitions.d.ts.map +1 -1
  421. package/dist/esm/frontend-definitions/settings-destination-ref.definitions.js +117 -0
  422. package/dist/esm/frontend-definitions/settings-destination-ref.definitions.js.map +1 -1
  423. package/dist/esm/guidance/guidance-flow.shared.schemas.d.ts +106 -24
  424. package/dist/esm/guidance/guidance-flow.shared.schemas.d.ts.map +1 -1
  425. package/dist/esm/guidance/guidance-flow.shared.schemas.js +152 -14
  426. package/dist/esm/guidance/guidance-flow.shared.schemas.js.map +1 -1
  427. package/dist/esm/guidance/guidance-state.shared.resources-config.schemas.d.ts.map +1 -1
  428. package/dist/esm/guidance/guidance-state.shared.schemas.d.ts.map +1 -1
  429. package/dist/esm/guidance/guidance-state.shared.utils.d.ts.map +1 -1
  430. package/dist/esm/guidance/guidance-state.shared.utils.js.map +1 -1
  431. package/dist/esm/guidance/lifecycle-config.shared.schemas.d.ts.map +1 -1
  432. package/dist/esm/guidance/lifecycle-state.shared.resources-config.schemas.d.ts.map +1 -1
  433. package/dist/esm/guidance/lifecycle-state.shared.schemas.d.ts +0 -6
  434. package/dist/esm/guidance/lifecycle-state.shared.schemas.d.ts.map +1 -1
  435. package/dist/esm/guidance/lifecycle-state.shared.schemas.js +0 -19
  436. package/dist/esm/guidance/lifecycle-state.shared.schemas.js.map +1 -1
  437. package/dist/esm/guidance/milestone-builders.shared.d.ts +4 -2
  438. package/dist/esm/guidance/milestone-builders.shared.d.ts.map +1 -1
  439. package/dist/esm/guidance/milestone-builders.shared.js +4 -2
  440. package/dist/esm/guidance/milestone-builders.shared.js.map +1 -1
  441. package/dist/esm/guidance/milestone-definition.shared.schemas.d.ts +66 -4
  442. package/dist/esm/guidance/milestone-definition.shared.schemas.d.ts.map +1 -1
  443. package/dist/esm/guidance/milestone-definition.shared.schemas.js +50 -0
  444. package/dist/esm/guidance/milestone-definition.shared.schemas.js.map +1 -1
  445. package/dist/esm/guidance/progression-presentation.shared.schemas.d.ts +71 -0
  446. package/dist/esm/guidance/progression-presentation.shared.schemas.d.ts.map +1 -0
  447. package/dist/esm/guidance/progression-presentation.shared.schemas.js +72 -0
  448. package/dist/esm/guidance/progression-presentation.shared.schemas.js.map +1 -0
  449. package/dist/esm/guidance/progression-state.shared.resources-config.schemas.d.ts +2 -0
  450. package/dist/esm/guidance/progression-state.shared.resources-config.schemas.d.ts.map +1 -1
  451. package/dist/esm/guidance/progression-state.shared.schemas.d.ts +4 -0
  452. package/dist/esm/guidance/progression-state.shared.schemas.d.ts.map +1 -1
  453. package/dist/esm/guidance/progression-state.shared.schemas.js +5 -0
  454. package/dist/esm/guidance/progression-state.shared.schemas.js.map +1 -1
  455. package/dist/esm/http-api-binding/http-api-binding-id.shared.utils.d.ts.map +1 -1
  456. package/dist/esm/http-api-binding/http-api-binding-id.shared.utils.js +2 -1
  457. package/dist/esm/http-api-binding/http-api-binding-id.shared.utils.js.map +1 -1
  458. package/dist/esm/http-api-binding/http-api-binding.shared.schemas.d.ts +181 -412
  459. package/dist/esm/http-api-binding/http-api-binding.shared.schemas.d.ts.map +1 -1
  460. package/dist/esm/http-api-binding/http-api-binding.shared.schemas.js +249 -199
  461. package/dist/esm/http-api-binding/http-api-binding.shared.schemas.js.map +1 -1
  462. package/dist/esm/http-api-binding/http-api-transport-dialect.shared.d.ts +107 -0
  463. package/dist/esm/http-api-binding/http-api-transport-dialect.shared.d.ts.map +1 -0
  464. package/dist/esm/http-api-binding/http-api-transport-dialect.shared.js +108 -0
  465. package/dist/esm/http-api-binding/http-api-transport-dialect.shared.js.map +1 -0
  466. package/dist/esm/http-api-binding/read-through-engine-anchors.shared.d.ts +38 -0
  467. package/dist/esm/http-api-binding/read-through-engine-anchors.shared.d.ts.map +1 -0
  468. package/dist/esm/http-api-binding/read-through-engine-anchors.shared.js +42 -0
  469. package/dist/esm/http-api-binding/read-through-engine-anchors.shared.js.map +1 -0
  470. package/dist/esm/i18n/labelling.dto.shared.schemas.d.ts.map +1 -1
  471. package/dist/esm/index.d.ts +41 -4
  472. package/dist/esm/index.d.ts.map +1 -1
  473. package/dist/esm/index.js +71 -16
  474. package/dist/esm/index.js.map +1 -1
  475. package/dist/esm/meta-workflows/actions.meta-workflows.shared.schemas.d.ts.map +1 -0
  476. package/dist/esm/meta-workflows/actions.meta-workflows.shared.schemas.js.map +1 -0
  477. package/dist/esm/meta-workflows/catalog.meta-workflows.shared.schemas.d.ts.map +1 -0
  478. package/dist/esm/meta-workflows/catalog.meta-workflows.shared.schemas.js.map +1 -0
  479. package/dist/esm/meta-workflows/coding-tasks.meta-workflows.shared.schemas.d.ts +130 -0
  480. package/dist/esm/meta-workflows/coding-tasks.meta-workflows.shared.schemas.d.ts.map +1 -0
  481. package/dist/esm/meta-workflows/coding-tasks.meta-workflows.shared.schemas.js +104 -0
  482. package/dist/esm/meta-workflows/coding-tasks.meta-workflows.shared.schemas.js.map +1 -0
  483. package/dist/esm/meta-workflows/context-selection.meta-workflows.shared.schemas.d.ts.map +1 -0
  484. package/dist/esm/meta-workflows/context-selection.meta-workflows.shared.schemas.js.map +1 -0
  485. package/dist/esm/{flows-actors/meta-workflows → meta-workflows}/decisions.meta-workflows.shared.schemas.d.ts +64 -0
  486. package/dist/esm/meta-workflows/decisions.meta-workflows.shared.schemas.d.ts.map +1 -0
  487. package/dist/esm/{flows-actors/meta-workflows → meta-workflows}/decisions.meta-workflows.shared.schemas.js +47 -0
  488. package/dist/esm/meta-workflows/decisions.meta-workflows.shared.schemas.js.map +1 -0
  489. package/dist/esm/meta-workflows/orchestration.meta-workflows.shared.schemas.d.ts +544 -0
  490. package/dist/esm/meta-workflows/orchestration.meta-workflows.shared.schemas.d.ts.map +1 -0
  491. package/dist/esm/meta-workflows/orchestration.meta-workflows.shared.schemas.js +638 -0
  492. package/dist/esm/meta-workflows/orchestration.meta-workflows.shared.schemas.js.map +1 -0
  493. package/dist/esm/{flows-actors/meta-workflows → meta-workflows}/portable-primitives.meta-workflows.shared.schemas.d.ts +15 -8
  494. package/dist/esm/meta-workflows/portable-primitives.meta-workflows.shared.schemas.d.ts.map +1 -0
  495. package/dist/esm/{flows-actors/meta-workflows → meta-workflows}/portable-primitives.meta-workflows.shared.schemas.js +15 -8
  496. package/dist/esm/meta-workflows/portable-primitives.meta-workflows.shared.schemas.js.map +1 -0
  497. package/dist/esm/meta-workflows.exports.d.ts +21 -25
  498. package/dist/esm/meta-workflows.exports.d.ts.map +1 -1
  499. package/dist/esm/meta-workflows.exports.js +21 -25
  500. package/dist/esm/meta-workflows.exports.js.map +1 -1
  501. package/dist/esm/monitoring/monitoring.shared.schemas.d.ts.map +1 -1
  502. package/dist/esm/notifications/email/email-context.shared.schemas.d.ts.map +1 -1
  503. package/dist/esm/notifications/email/email-submission.shared.enums.d.ts +16 -0
  504. package/dist/esm/notifications/email/email-submission.shared.enums.d.ts.map +1 -0
  505. package/dist/esm/notifications/email/email-submission.shared.enums.js +17 -0
  506. package/dist/esm/notifications/email/email-submission.shared.enums.js.map +1 -0
  507. package/dist/esm/notifications/email/email-template-registry.shared.schemas.d.ts +36 -0
  508. package/dist/esm/notifications/email/email-template-registry.shared.schemas.d.ts.map +1 -1
  509. package/dist/esm/notifications/email/email-template-registry.shared.schemas.js +50 -3
  510. package/dist/esm/notifications/email/email-template-registry.shared.schemas.js.map +1 -1
  511. package/dist/esm/notifications/email/email-template.shared.enums.d.ts.map +1 -1
  512. package/dist/esm/notifications/email/email-template.shared.enums.js.map +1 -1
  513. package/dist/esm/notifications/m2m/m2m-webhook-delivery-contract.shared.d.ts.map +1 -1
  514. package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.resources-config.schemas.d.ts.map +1 -1
  515. package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.resources-config.schemas.js +4 -1
  516. package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.resources-config.schemas.js.map +1 -1
  517. package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.schemas.d.ts +2 -1
  518. package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.schemas.d.ts.map +1 -1
  519. package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.schemas.js +3 -2
  520. package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.schemas.js.map +1 -1
  521. package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.d.ts.map +1 -1
  522. package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.js +44 -3
  523. package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.js.map +1 -1
  524. package/dist/esm/notifications/m2m/webhook-config.shared.schemas.d.ts.map +1 -1
  525. package/dist/esm/notifications/m2m/webhook-config.shared.schemas.js.map +1 -1
  526. package/dist/esm/notifications/notification-badges.core.definitions.d.ts.map +1 -1
  527. package/dist/esm/notifications/notification-badges.core.definitions.js.map +1 -1
  528. package/dist/esm/notifications/notification-badges.schemas.d.ts.map +1 -1
  529. package/dist/esm/notifications/notification-badges.schemas.js.map +1 -1
  530. package/dist/esm/notifications/notification-badges.shared.resources-config.schemas.d.ts +1 -1
  531. package/dist/esm/notifications/notification-badges.shared.resources-config.schemas.d.ts.map +1 -1
  532. package/dist/esm/notifications/notification-badges.shared.resources-config.schemas.js +12 -33
  533. package/dist/esm/notifications/notification-badges.shared.resources-config.schemas.js.map +1 -1
  534. package/dist/esm/notifications/notifications.shared.schemas.d.ts +19 -8
  535. package/dist/esm/notifications/notifications.shared.schemas.d.ts.map +1 -1
  536. package/dist/esm/notifications/notifications.shared.schemas.js +19 -8
  537. package/dist/esm/notifications/notifications.shared.schemas.js.map +1 -1
  538. package/dist/esm/organizations/application-owner-organization.shared.schemas.d.ts +145 -0
  539. package/dist/esm/organizations/application-owner-organization.shared.schemas.d.ts.map +1 -0
  540. package/dist/esm/organizations/application-owner-organization.shared.schemas.js +146 -0
  541. package/dist/esm/organizations/application-owner-organization.shared.schemas.js.map +1 -0
  542. package/dist/esm/organizations/organization-features.shared.resources-config.schemas.d.ts +2 -0
  543. package/dist/esm/organizations/organization-features.shared.resources-config.schemas.d.ts.map +1 -1
  544. package/dist/esm/organizations/organization-features.shared.resources-config.schemas.js +26 -3
  545. package/dist/esm/organizations/organization-features.shared.resources-config.schemas.js.map +1 -1
  546. package/dist/esm/organizations/organization-members.shared.resources-config.schemas.d.ts +1 -1
  547. package/dist/esm/organizations/organization-members.shared.resources-config.schemas.d.ts.map +1 -1
  548. package/dist/esm/organizations/organization-members.shared.resources-config.schemas.js +18 -14
  549. package/dist/esm/organizations/organization-members.shared.resources-config.schemas.js.map +1 -1
  550. package/dist/esm/organizations/organization-members.shared.schemas.d.ts +1 -1
  551. package/dist/esm/organizations/organization-members.shared.schemas.d.ts.map +1 -1
  552. package/dist/esm/organizations/organization-members.shared.schemas.js +9 -1
  553. package/dist/esm/organizations/organization-members.shared.schemas.js.map +1 -1
  554. package/dist/esm/organizations/organization-notifications.shared.resources-config.schemas.d.ts.map +1 -1
  555. package/dist/esm/organizations/organization-notifications.shared.schemas.d.ts.map +1 -1
  556. package/dist/esm/organizations/organization-notifications.shared.schemas.js.map +1 -1
  557. package/dist/esm/organizations/organization-preferences.shared.resources-config.schemas.d.ts.map +1 -1
  558. package/dist/esm/organizations/organization-preferences.shared.schemas.d.ts +2 -1
  559. package/dist/esm/organizations/organization-preferences.shared.schemas.d.ts.map +1 -1
  560. package/dist/esm/organizations/organization-preferences.shared.schemas.js +3 -0
  561. package/dist/esm/organizations/organization-preferences.shared.schemas.js.map +1 -1
  562. package/dist/esm/organizations/organization-profile.shared.resources-config.schemas.d.ts.map +1 -1
  563. package/dist/esm/organizations/organization-profile.shared.schemas.d.ts +3 -1
  564. package/dist/esm/organizations/organization-profile.shared.schemas.d.ts.map +1 -1
  565. package/dist/esm/organizations/organization-profile.shared.schemas.js +4 -2
  566. package/dist/esm/organizations/organization-profile.shared.schemas.js.map +1 -1
  567. package/dist/esm/organizations/organization-unit-inheritance.shared.d.ts.map +1 -1
  568. package/dist/esm/organizations/organization-unit-members.shared.resources-config.schemas.d.ts.map +1 -1
  569. package/dist/esm/organizations/organization-unit-members.shared.schemas.d.ts.map +1 -1
  570. package/dist/esm/organizations/organization-unit-narrowing-decision.shared.d.ts.map +1 -1
  571. package/dist/esm/organizations/organization-unit-narrowing.example.d.ts.map +1 -1
  572. package/dist/esm/organizations/organization-unit-narrowing.shared.d.ts +29 -2
  573. package/dist/esm/organizations/organization-unit-narrowing.shared.d.ts.map +1 -1
  574. package/dist/esm/organizations/organization-unit-narrowing.shared.js +27 -0
  575. package/dist/esm/organizations/organization-unit-narrowing.shared.js.map +1 -1
  576. package/dist/esm/organizations/organization-units.shared.resources-config.schemas.d.ts +2 -0
  577. package/dist/esm/organizations/organization-units.shared.resources-config.schemas.d.ts.map +1 -1
  578. package/dist/esm/organizations/organization-units.shared.resources-config.schemas.js +3 -0
  579. package/dist/esm/organizations/organization-units.shared.resources-config.schemas.js.map +1 -1
  580. package/dist/esm/organizations/organization-units.shared.schemas.d.ts +17 -5
  581. package/dist/esm/organizations/organization-units.shared.schemas.d.ts.map +1 -1
  582. package/dist/esm/organizations/organization-units.shared.schemas.js +65 -5
  583. package/dist/esm/organizations/organization-units.shared.schemas.js.map +1 -1
  584. package/dist/esm/organizations/organizations.shared.resources-config.schemas.d.ts +51 -7
  585. package/dist/esm/organizations/organizations.shared.resources-config.schemas.d.ts.map +1 -1
  586. package/dist/esm/organizations/organizations.shared.resources-config.schemas.js +151 -7
  587. package/dist/esm/organizations/organizations.shared.resources-config.schemas.js.map +1 -1
  588. package/dist/esm/organizations/organizations.shared.schemas.d.ts +18 -83
  589. package/dist/esm/organizations/organizations.shared.schemas.d.ts.map +1 -1
  590. package/dist/esm/organizations/organizations.shared.schemas.js +37 -19
  591. package/dist/esm/organizations/organizations.shared.schemas.js.map +1 -1
  592. package/dist/esm/organizations/tenant-teardown-config.shared.schemas.d.ts.map +1 -1
  593. package/dist/esm/organizations/tenant-teardown-config.shared.schemas.js.map +1 -1
  594. package/dist/esm/provider-registration-runtime.exports.d.ts +1 -0
  595. package/dist/esm/provider-registration-runtime.exports.d.ts.map +1 -1
  596. package/dist/esm/provider-registration-runtime.exports.js +1 -0
  597. package/dist/esm/provider-registration-runtime.exports.js.map +1 -1
  598. package/dist/esm/public-runtime/index.d.ts +39 -10
  599. package/dist/esm/public-runtime/index.d.ts.map +1 -1
  600. package/dist/esm/public-runtime/index.js +39 -10
  601. package/dist/esm/public-runtime/index.js.map +1 -1
  602. package/dist/esm/queue/jobs.shared.resources-config.schemas.d.ts +7 -8
  603. package/dist/esm/queue/jobs.shared.resources-config.schemas.d.ts.map +1 -1
  604. package/dist/esm/queue/jobs.shared.resources-config.schemas.js +30 -6
  605. package/dist/esm/queue/jobs.shared.resources-config.schemas.js.map +1 -1
  606. package/dist/esm/queue/jobs.shared.schemas.d.ts +388 -2
  607. package/dist/esm/queue/jobs.shared.schemas.d.ts.map +1 -1
  608. package/dist/esm/queue/jobs.shared.schemas.js +315 -11
  609. package/dist/esm/queue/jobs.shared.schemas.js.map +1 -1
  610. package/dist/esm/queue/jobs.shared.utils.d.ts +6 -4
  611. package/dist/esm/queue/jobs.shared.utils.d.ts.map +1 -1
  612. package/dist/esm/queue/jobs.shared.utils.js +5 -4
  613. package/dist/esm/queue/jobs.shared.utils.js.map +1 -1
  614. package/dist/esm/queue/queues.shared.schemas.d.ts +20 -8
  615. package/dist/esm/queue/queues.shared.schemas.d.ts.map +1 -1
  616. package/dist/esm/queue/queues.shared.schemas.js +23 -18
  617. package/dist/esm/queue/queues.shared.schemas.js.map +1 -1
  618. package/dist/esm/queue/queues.shared.utils.d.ts +4 -2
  619. package/dist/esm/queue/queues.shared.utils.d.ts.map +1 -1
  620. package/dist/esm/queue/queues.shared.utils.js +4 -2
  621. package/dist/esm/queue/queues.shared.utils.js.map +1 -1
  622. package/dist/esm/rag/rag-retrieval-health.shared.d.ts +27 -0
  623. package/dist/esm/rag/rag-retrieval-health.shared.d.ts.map +1 -0
  624. package/dist/esm/rag/rag-retrieval-health.shared.js +29 -0
  625. package/dist/esm/rag/rag-retrieval-health.shared.js.map +1 -0
  626. package/dist/esm/requests/header-keys.shared.d.ts +6 -0
  627. package/dist/esm/requests/header-keys.shared.d.ts.map +1 -1
  628. package/dist/esm/requests/header-keys.shared.js +7 -0
  629. package/dist/esm/requests/header-keys.shared.js.map +1 -1
  630. package/dist/esm/requests/idempotency-key.shared.d.ts +76 -0
  631. package/dist/esm/requests/idempotency-key.shared.d.ts.map +1 -0
  632. package/dist/esm/requests/idempotency-key.shared.js +112 -0
  633. package/dist/esm/requests/idempotency-key.shared.js.map +1 -0
  634. package/dist/esm/requests/manual-controllers-routes-documentation.d.ts.map +1 -1
  635. package/dist/esm/requests/manual-controllers-routes-documentation.js +218 -17
  636. package/dist/esm/requests/manual-controllers-routes-documentation.js.map +1 -1
  637. package/dist/esm/requests/manual-controllers-routes-urls.d.ts +87 -0
  638. package/dist/esm/requests/manual-controllers-routes-urls.d.ts.map +1 -1
  639. package/dist/esm/requests/manual-controllers-routes-urls.js +102 -0
  640. package/dist/esm/requests/manual-controllers-routes-urls.js.map +1 -1
  641. package/dist/esm/requests/rate-limits.shared.schemas.d.ts.map +1 -1
  642. package/dist/esm/requests/rate-limits.shared.schemas.js.map +1 -1
  643. package/dist/esm/requests/websocket.shared.schemas.d.ts +200 -24
  644. package/dist/esm/requests/websocket.shared.schemas.d.ts.map +1 -1
  645. package/dist/esm/requests/websocket.shared.schemas.js +219 -5
  646. package/dist/esm/requests/websocket.shared.schemas.js.map +1 -1
  647. package/dist/esm/resources/child-operations.shared.schemas.d.ts +56 -5
  648. package/dist/esm/resources/child-operations.shared.schemas.d.ts.map +1 -1
  649. package/dist/esm/resources/child-operations.shared.schemas.js +97 -5
  650. package/dist/esm/resources/child-operations.shared.schemas.js.map +1 -1
  651. package/dist/esm/resources/context-policy.shared.schemas.d.ts +20 -0
  652. package/dist/esm/resources/context-policy.shared.schemas.d.ts.map +1 -1
  653. package/dist/esm/resources/context-policy.shared.schemas.js +3 -0
  654. package/dist/esm/resources/context-policy.shared.schemas.js.map +1 -1
  655. package/dist/esm/resources/relationship-display.shared.schemas.d.ts.map +1 -1
  656. package/dist/esm/resources/resources-config.shared.factory.d.ts.map +1 -1
  657. package/dist/esm/resources/resources-config.shared.factory.js +498 -29
  658. package/dist/esm/resources/resources-config.shared.factory.js.map +1 -1
  659. package/dist/esm/resources/resources-config.shared.schemas.d.ts +623 -45
  660. package/dist/esm/resources/resources-config.shared.schemas.d.ts.map +1 -1
  661. package/dist/esm/resources/resources-config.shared.schemas.js +315 -22
  662. package/dist/esm/resources/resources-config.shared.schemas.js.map +1 -1
  663. package/dist/esm/resources/resources-registry.shared.core.definitions.d.ts.map +1 -1
  664. package/dist/esm/resources/resources-registry.shared.core.definitions.js +377 -69
  665. package/dist/esm/resources/resources-registry.shared.core.definitions.js.map +1 -1
  666. package/dist/esm/resources/resources-relationships.shared.factory.d.ts.map +1 -1
  667. package/dist/esm/resources/resources-relationships.shared.factory.js.map +1 -1
  668. package/dist/esm/resources/resources-serialization.shared.schemas.d.ts.map +1 -1
  669. package/dist/esm/resources/resources.shared.core.definitions.d.ts +19 -0
  670. package/dist/esm/resources/resources.shared.core.definitions.d.ts.map +1 -1
  671. package/dist/esm/resources/resources.shared.core.definitions.js +28 -0
  672. package/dist/esm/resources/resources.shared.core.definitions.js.map +1 -1
  673. package/dist/esm/resources/resources.shared.schemas.d.ts +256 -10
  674. package/dist/esm/resources/resources.shared.schemas.d.ts.map +1 -1
  675. package/dist/esm/resources/resources.shared.schemas.js +209 -9
  676. package/dist/esm/resources/resources.shared.schemas.js.map +1 -1
  677. package/dist/esm/resources/resources.shared.utils.d.ts +3 -2
  678. package/dist/esm/resources/resources.shared.utils.d.ts.map +1 -1
  679. package/dist/esm/resources/resources.shared.utils.js +38 -6
  680. package/dist/esm/resources/resources.shared.utils.js.map +1 -1
  681. package/dist/esm/resources/utils/collection-export.shared.utils.d.ts.map +1 -1
  682. package/dist/esm/resources/utils/composition-cascade-deletability.validation.d.ts +44 -12
  683. package/dist/esm/resources/utils/composition-cascade-deletability.validation.d.ts.map +1 -1
  684. package/dist/esm/resources/utils/composition-cascade-deletability.validation.js +46 -23
  685. package/dist/esm/resources/utils/composition-cascade-deletability.validation.js.map +1 -1
  686. package/dist/esm/resources/utils/composition-seedability.validation.d.ts.map +1 -1
  687. package/dist/esm/resources/utils/context-addressed-composition-singleton.shared.utils.d.ts.map +1 -1
  688. package/dist/esm/resources/utils/dependent-lifecycle-classification.validation.d.ts +61 -0
  689. package/dist/esm/resources/utils/dependent-lifecycle-classification.validation.d.ts.map +1 -0
  690. package/dist/esm/resources/utils/dependent-lifecycle-classification.validation.js +79 -0
  691. package/dist/esm/resources/utils/dependent-lifecycle-classification.validation.js.map +1 -0
  692. package/dist/esm/resources/utils/duplicate-relationship-registration.validation.d.ts.map +1 -1
  693. package/dist/esm/resources/utils/field-value-disclosure.utils.d.ts.map +1 -1
  694. package/dist/esm/resources/utils/field-value-disclosure.utils.js.map +1 -1
  695. package/dist/esm/resources/utils/initiator-stamped-field-satisfiability.validation.d.ts +60 -0
  696. package/dist/esm/resources/utils/initiator-stamped-field-satisfiability.validation.d.ts.map +1 -0
  697. package/dist/esm/resources/utils/initiator-stamped-field-satisfiability.validation.js +80 -0
  698. package/dist/esm/resources/utils/initiator-stamped-field-satisfiability.validation.js.map +1 -0
  699. package/dist/esm/resources/utils/persistence-adapter-discrimination.shared.utils.d.ts.map +1 -1
  700. package/dist/esm/resources/utils/populated-file-fields.shared.utils.d.ts +21 -0
  701. package/dist/esm/resources/utils/populated-file-fields.shared.utils.d.ts.map +1 -0
  702. package/dist/esm/resources/utils/populated-file-fields.shared.utils.js +159 -0
  703. package/dist/esm/resources/utils/populated-file-fields.shared.utils.js.map +1 -0
  704. package/dist/esm/resources/utils/repository-dto-builder.utils.d.ts.map +1 -1
  705. package/dist/esm/resources/utils/required-fk-fillability.validation.d.ts.map +1 -1
  706. package/dist/esm/resources/utils/resource-operation-type-guards.utils.d.ts.map +1 -1
  707. package/dist/esm/resources/utils/resource-polymorphism.factory.d.ts.map +1 -1
  708. package/dist/esm/resources/utils/resource-polymorphism.relationships.d.ts.map +1 -1
  709. package/dist/esm/resources/utils/resource-polymorphism.schemas.d.ts.map +1 -1
  710. package/dist/esm/resources/utils/resource-polymorphism.utils.d.ts.map +1 -1
  711. package/dist/esm/resources/utils/resource-subtree.utils.d.ts.map +1 -1
  712. package/dist/esm/resources/utils/resources-config-context-needs.utils.d.ts.map +1 -1
  713. package/dist/esm/resources/utils/resources-config-naming.utils.d.ts +15 -0
  714. package/dist/esm/resources/utils/resources-config-naming.utils.d.ts.map +1 -1
  715. package/dist/esm/resources/utils/resources-config-naming.utils.js +56 -11
  716. package/dist/esm/resources/utils/resources-config-naming.utils.js.map +1 -1
  717. package/dist/esm/resources/utils/resources-config-operations.dtos-builder.utils.d.ts +51 -1
  718. package/dist/esm/resources/utils/resources-config-operations.dtos-builder.utils.d.ts.map +1 -1
  719. package/dist/esm/resources/utils/resources-config-operations.dtos-builder.utils.js +210 -51
  720. package/dist/esm/resources/utils/resources-config-operations.dtos-builder.utils.js.map +1 -1
  721. package/dist/esm/resources/utils/resources-config-operations.path.utils.d.ts.map +1 -1
  722. package/dist/esm/resources/utils/resources-config-operations.urls-builder.utils.d.ts +34 -0
  723. package/dist/esm/resources/utils/resources-config-operations.urls-builder.utils.d.ts.map +1 -1
  724. package/dist/esm/resources/utils/resources-config-operations.urls-builder.utils.js +45 -1
  725. package/dist/esm/resources/utils/resources-config-operations.urls-builder.utils.js.map +1 -1
  726. package/dist/esm/resources/utils/resources-config-operations.utils.d.ts.map +1 -1
  727. package/dist/esm/resources/utils/resources-serialization.utils.d.ts.map +1 -1
  728. package/dist/esm/resources/utils/resources-summary.utils.d.ts.map +1 -1
  729. package/dist/esm/resources/utils/resources-summary.utils.js.map +1 -1
  730. package/dist/esm/resources/utils/schema-family-builder.utils.d.ts.map +1 -1
  731. package/dist/esm/resources/utils/schema-type-inference.utils.d.ts.map +1 -1
  732. package/dist/esm/resources/utils/schema-type-utils.d.ts.map +1 -1
  733. package/dist/esm/resources/utils/schema-variant-resolver.utils.d.ts.map +1 -1
  734. package/dist/esm/resources/utils/shared-persistence-collection.utils.d.ts +29 -0
  735. package/dist/esm/resources/utils/shared-persistence-collection.utils.d.ts.map +1 -1
  736. package/dist/esm/resources/utils/shared-persistence-collection.utils.js +30 -0
  737. package/dist/esm/resources/utils/shared-persistence-collection.utils.js.map +1 -1
  738. package/dist/esm/resources/utils/templatable-file-fields.shared.utils.d.ts.map +1 -1
  739. package/dist/esm/resources/utils/templatable-file-fields.shared.utils.js +49 -11
  740. package/dist/esm/resources/utils/templatable-file-fields.shared.utils.js.map +1 -1
  741. package/dist/esm/runtime/domain-module.shared.definitions.d.ts.map +1 -1
  742. package/dist/esm/runtime/domain-module.shared.definitions.js.map +1 -1
  743. package/dist/esm/runtime/execution-context.shared.schemas.d.ts.map +1 -1
  744. package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.d.ts.map +1 -1
  745. package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.js +4 -1
  746. package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.js.map +1 -1
  747. package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.d.ts.map +1 -1
  748. package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.js +4 -1
  749. package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.js.map +1 -1
  750. package/dist/esm/security/api-keys/api-keys.shared.schemas.d.ts.map +1 -1
  751. package/dist/esm/security/authentications/anonymous-session/anonymous-session.shared.contract.d.ts.map +1 -1
  752. package/dist/esm/security/authentications/authentication.shared.dto.schemas.d.ts +128 -16
  753. package/dist/esm/security/authentications/authentication.shared.dto.schemas.d.ts.map +1 -1
  754. package/dist/esm/security/authentications/authentication.shared.dto.schemas.js +160 -6
  755. package/dist/esm/security/authentications/authentication.shared.dto.schemas.js.map +1 -1
  756. package/dist/esm/security/authentications/authentication.shared.schemas.d.ts +324 -9
  757. package/dist/esm/security/authentications/authentication.shared.schemas.d.ts.map +1 -1
  758. package/dist/esm/security/authentications/authentication.shared.schemas.js +411 -8
  759. package/dist/esm/security/authentications/authentication.shared.schemas.js.map +1 -1
  760. package/dist/esm/security/authentications/authentication.shared.utils.d.ts +87 -4
  761. package/dist/esm/security/authentications/authentication.shared.utils.d.ts.map +1 -1
  762. package/dist/esm/security/authentications/authentication.shared.utils.js +95 -6
  763. package/dist/esm/security/authentications/authentication.shared.utils.js.map +1 -1
  764. package/dist/esm/security/authentications/consumable-token.shared.schemas.d.ts +23 -1
  765. package/dist/esm/security/authentications/consumable-token.shared.schemas.d.ts.map +1 -1
  766. package/dist/esm/security/authentications/consumable-token.shared.schemas.js +23 -1
  767. package/dist/esm/security/authentications/consumable-token.shared.schemas.js.map +1 -1
  768. package/dist/esm/security/authentications/cross-frontend-handoff.shared.dto.schemas.d.ts +7 -1
  769. package/dist/esm/security/authentications/cross-frontend-handoff.shared.dto.schemas.d.ts.map +1 -1
  770. package/dist/esm/security/authentications/cross-frontend-handoff.shared.dto.schemas.js +7 -1
  771. package/dist/esm/security/authentications/cross-frontend-handoff.shared.dto.schemas.js.map +1 -1
  772. package/dist/esm/security/authentications/password-blocklist.shared.utils.d.ts +74 -0
  773. package/dist/esm/security/authentications/password-blocklist.shared.utils.d.ts.map +1 -0
  774. package/dist/esm/security/authentications/password-blocklist.shared.utils.js +122 -0
  775. package/dist/esm/security/authentications/password-blocklist.shared.utils.js.map +1 -0
  776. package/dist/esm/security/authentications/password-reset.shared.dto.schemas.d.ts.map +1 -1
  777. package/dist/esm/security/authentications/registration.shared.dto.schemas.d.ts +88 -2
  778. package/dist/esm/security/authentications/registration.shared.dto.schemas.d.ts.map +1 -1
  779. package/dist/esm/security/authentications/registration.shared.dto.schemas.js +149 -2
  780. package/dist/esm/security/authentications/registration.shared.dto.schemas.js.map +1 -1
  781. package/dist/esm/security/authentications/scim/scim-organization-unit-mapping.shared.d.ts +57 -11
  782. package/dist/esm/security/authentications/scim/scim-organization-unit-mapping.shared.d.ts.map +1 -1
  783. package/dist/esm/security/authentications/scim/scim-organization-unit-mapping.shared.js +44 -11
  784. package/dist/esm/security/authentications/scim/scim-organization-unit-mapping.shared.js.map +1 -1
  785. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.resources-config.schemas.d.ts.map +1 -1
  786. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.resources-config.schemas.js +20 -7
  787. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.resources-config.schemas.js.map +1 -1
  788. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.d.ts +16 -2
  789. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.d.ts.map +1 -1
  790. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.js +32 -2
  791. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.js.map +1 -1
  792. package/dist/esm/security/authentications/scim/scim-tokens.shared.resources-config.schemas.d.ts.map +1 -1
  793. package/dist/esm/security/authentications/scim/scim-tokens.shared.resources-config.schemas.js +7 -1
  794. package/dist/esm/security/authentications/scim/scim-tokens.shared.resources-config.schemas.js.map +1 -1
  795. package/dist/esm/security/authentications/scim/scim-tokens.shared.schemas.d.ts.map +1 -1
  796. package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.resources-config.schemas.d.ts.map +1 -1
  797. package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.resources-config.schemas.js +4 -1
  798. package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.resources-config.schemas.js.map +1 -1
  799. package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.schemas.d.ts.map +1 -1
  800. package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.resources-config.schemas.d.ts +27 -0
  801. package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.resources-config.schemas.d.ts.map +1 -0
  802. package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.resources-config.schemas.js +109 -0
  803. package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.resources-config.schemas.js.map +1 -0
  804. package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.schemas.d.ts +66 -0
  805. package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.schemas.d.ts.map +1 -0
  806. package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.schemas.js +107 -0
  807. package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.schemas.js.map +1 -0
  808. package/dist/esm/security/authentications/siem/siem-delivery-reliability-contract.shared.d.ts.map +1 -1
  809. package/dist/esm/security/authentications/siem/siem-delivery-reliability-contract.shared.js.map +1 -1
  810. package/dist/esm/security/authentications/siem/siem-export-config.shared.resources-config.schemas.d.ts +19 -0
  811. package/dist/esm/security/authentications/siem/siem-export-config.shared.resources-config.schemas.d.ts.map +1 -1
  812. package/dist/esm/security/authentications/siem/siem-export-config.shared.resources-config.schemas.js +50 -13
  813. package/dist/esm/security/authentications/siem/siem-export-config.shared.resources-config.schemas.js.map +1 -1
  814. package/dist/esm/security/authentications/siem/siem-export-config.shared.schemas.d.ts +18 -6
  815. package/dist/esm/security/authentications/siem/siem-export-config.shared.schemas.d.ts.map +1 -1
  816. package/dist/esm/security/authentications/siem/siem-export-config.shared.schemas.js +133 -4
  817. package/dist/esm/security/authentications/siem/siem-export-config.shared.schemas.js.map +1 -1
  818. package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.d.ts +26 -0
  819. package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.d.ts.map +1 -1
  820. package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.js +46 -17
  821. package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.js.map +1 -1
  822. package/dist/esm/security/authentications/sso/sso-config.shared.schemas.d.ts +0 -40
  823. package/dist/esm/security/authentications/sso/sso-config.shared.schemas.d.ts.map +1 -1
  824. package/dist/esm/security/authentications/sso/sso-config.shared.schemas.js +100 -26
  825. package/dist/esm/security/authentications/sso/sso-config.shared.schemas.js.map +1 -1
  826. package/dist/esm/security/authentications/sso/sso-connection.shared.resources-config.schemas.d.ts +9 -1
  827. package/dist/esm/security/authentications/sso/sso-connection.shared.resources-config.schemas.d.ts.map +1 -1
  828. package/dist/esm/security/authentications/sso/sso-connection.shared.resources-config.schemas.js +9 -1
  829. package/dist/esm/security/authentications/sso/sso-connection.shared.resources-config.schemas.js.map +1 -1
  830. package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.d.ts +6 -2
  831. package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.d.ts.map +1 -1
  832. package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.js +76 -4
  833. package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.js.map +1 -1
  834. package/dist/esm/security/authorizations/administrative-continuity.shared.schemas.d.ts +5 -4
  835. package/dist/esm/security/authorizations/administrative-continuity.shared.schemas.d.ts.map +1 -1
  836. package/dist/esm/security/authorizations/administrative-continuity.shared.schemas.js +5 -4
  837. package/dist/esm/security/authorizations/administrative-continuity.shared.schemas.js.map +1 -1
  838. package/dist/esm/security/authorizations/application-access-grants.shared.resources-config.schemas.d.ts +4 -0
  839. package/dist/esm/security/authorizations/application-access-grants.shared.resources-config.schemas.d.ts.map +1 -1
  840. package/dist/esm/security/authorizations/application-access-grants.shared.resources-config.schemas.js +8 -0
  841. package/dist/esm/security/authorizations/application-access-grants.shared.resources-config.schemas.js.map +1 -1
  842. package/dist/esm/security/authorizations/application-access-grants.shared.schemas.d.ts +44 -0
  843. package/dist/esm/security/authorizations/application-access-grants.shared.schemas.d.ts.map +1 -1
  844. package/dist/esm/security/authorizations/application-access-grants.shared.schemas.js +52 -0
  845. package/dist/esm/security/authorizations/application-access-grants.shared.schemas.js.map +1 -1
  846. package/dist/esm/security/authorizations/platform-access-grants.shared.resources-config.schemas.d.ts.map +1 -1
  847. package/dist/esm/security/authorizations/platform-access-grants.shared.resources-config.schemas.js.map +1 -1
  848. package/dist/esm/security/authorizations/platform-access-grants.shared.schemas.d.ts.map +1 -1
  849. package/dist/esm/security/authorizations/platform-access-grants.shared.schemas.js.map +1 -1
  850. package/dist/esm/security/authorizations/roles.shared.defaults.d.ts.map +1 -1
  851. package/dist/esm/security/authorizations/roles.shared.defaults.js +6 -0
  852. package/dist/esm/security/authorizations/roles.shared.defaults.js.map +1 -1
  853. package/dist/esm/security/authorizations/roles.shared.schemas.d.ts +14 -0
  854. package/dist/esm/security/authorizations/roles.shared.schemas.d.ts.map +1 -1
  855. package/dist/esm/security/authorizations/roles.shared.schemas.js +19 -0
  856. package/dist/esm/security/authorizations/roles.shared.schemas.js.map +1 -1
  857. package/dist/esm/security/authorizations/roles.shared.utils.d.ts.map +1 -1
  858. package/dist/esm/security/authorizations/roles.shared.utils.js +2 -0
  859. package/dist/esm/security/authorizations/roles.shared.utils.js.map +1 -1
  860. package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.d.ts +4 -1
  861. package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.d.ts.map +1 -1
  862. package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.js.map +1 -1
  863. package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.d.ts +5 -2
  864. package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.d.ts.map +1 -1
  865. package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.js +13 -42
  866. package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.js.map +1 -1
  867. package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.d.ts +201 -14
  868. package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.d.ts.map +1 -1
  869. package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.js +237 -49
  870. package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.js.map +1 -1
  871. package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.d.ts +6 -3
  872. package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.d.ts.map +1 -1
  873. package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.js +74 -4
  874. package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.js.map +1 -1
  875. package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.d.ts +5 -2
  876. package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.d.ts.map +1 -1
  877. package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.js +105 -3
  878. package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.js.map +1 -1
  879. package/dist/esm/security/oauth-clients/oauth-clients.shared.schemas.d.ts.map +1 -1
  880. package/dist/esm/security/oauth-clients/oauth-clients.shared.schemas.js.map +1 -1
  881. package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.resources-config.schemas.d.ts.map +1 -1
  882. package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.schemas.d.ts.map +1 -1
  883. package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.schemas.js.map +1 -1
  884. package/dist/esm/security/oauth-clients/oauth-resource-server.shared.schemas.d.ts.map +1 -1
  885. package/dist/esm/security/outbound-target-control.shared.schemas.d.ts +67 -0
  886. package/dist/esm/security/outbound-target-control.shared.schemas.d.ts.map +1 -0
  887. package/dist/esm/security/outbound-target-control.shared.schemas.js +69 -0
  888. package/dist/esm/security/outbound-target-control.shared.schemas.js.map +1 -0
  889. package/dist/esm/systems-of-record/system-of-record-credential-kind.shared.d.ts +159 -0
  890. package/dist/esm/systems-of-record/system-of-record-credential-kind.shared.d.ts.map +1 -0
  891. package/dist/esm/systems-of-record/system-of-record-credential-kind.shared.js +164 -0
  892. package/dist/esm/systems-of-record/system-of-record-credential-kind.shared.js.map +1 -0
  893. package/dist/esm/systems-of-record/system-of-record-declaration.shared.schemas.d.ts +209 -0
  894. package/dist/esm/systems-of-record/system-of-record-declaration.shared.schemas.d.ts.map +1 -0
  895. package/dist/esm/systems-of-record/system-of-record-declaration.shared.schemas.js +150 -0
  896. package/dist/esm/systems-of-record/system-of-record-declaration.shared.schemas.js.map +1 -0
  897. package/dist/esm/systems-of-record/system-of-record-env.shared.d.ts +79 -0
  898. package/dist/esm/systems-of-record/system-of-record-env.shared.d.ts.map +1 -0
  899. package/dist/esm/systems-of-record/system-of-record-env.shared.js +116 -0
  900. package/dist/esm/systems-of-record/system-of-record-env.shared.js.map +1 -0
  901. package/dist/esm/systems-of-record/system-of-record-error-codes.shared.d.ts +145 -0
  902. package/dist/esm/systems-of-record/system-of-record-error-codes.shared.d.ts.map +1 -0
  903. package/dist/esm/systems-of-record/system-of-record-error-codes.shared.js +146 -0
  904. package/dist/esm/systems-of-record/system-of-record-error-codes.shared.js.map +1 -0
  905. package/dist/esm/systems-of-record/system-of-record-facet.shared.schemas.d.ts +478 -0
  906. package/dist/esm/systems-of-record/system-of-record-facet.shared.schemas.d.ts.map +1 -0
  907. package/dist/esm/systems-of-record/system-of-record-facet.shared.schemas.js +619 -0
  908. package/dist/esm/systems-of-record/system-of-record-facet.shared.schemas.js.map +1 -0
  909. package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.resources-config.schemas.d.ts +31 -0
  910. package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.resources-config.schemas.d.ts.map +1 -0
  911. package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.resources-config.schemas.js +232 -0
  912. package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.resources-config.schemas.js.map +1 -0
  913. package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.schemas.d.ts +127 -0
  914. package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.schemas.d.ts.map +1 -0
  915. package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.schemas.js +204 -0
  916. package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.schemas.js.map +1 -0
  917. package/dist/esm/testing/resource-config-builders.d.ts.map +1 -1
  918. package/dist/esm/testing/resource-config-builders.js +10 -4
  919. package/dist/esm/testing/resource-config-builders.js.map +1 -1
  920. package/dist/esm/testing.d.ts.map +1 -1
  921. package/dist/esm/users/anonymous-user-marketing-metadata.shared.schemas.d.ts +2 -1
  922. package/dist/esm/users/anonymous-user-marketing-metadata.shared.schemas.d.ts.map +1 -1
  923. package/dist/esm/users/anonymous-user-marketing-metadata.shared.schemas.js +2 -1
  924. package/dist/esm/users/anonymous-user-marketing-metadata.shared.schemas.js.map +1 -1
  925. package/dist/esm/users/anonymous-users.shared.resources-config.schemas.d.ts +139 -24
  926. package/dist/esm/users/anonymous-users.shared.resources-config.schemas.d.ts.map +1 -1
  927. package/dist/esm/users/anonymous-users.shared.resources-config.schemas.js +255 -0
  928. package/dist/esm/users/anonymous-users.shared.resources-config.schemas.js.map +1 -1
  929. package/dist/esm/users/anonymous-users.shared.schema.d.ts +5 -3
  930. package/dist/esm/users/anonymous-users.shared.schema.d.ts.map +1 -1
  931. package/dist/esm/users/anonymous-users.shared.schema.js +18 -1
  932. package/dist/esm/users/anonymous-users.shared.schema.js.map +1 -1
  933. package/dist/esm/users/inbound-contacts.shared.resources-config.schemas.d.ts +2 -1
  934. package/dist/esm/users/inbound-contacts.shared.resources-config.schemas.d.ts.map +1 -1
  935. package/dist/esm/users/inbound-contacts.shared.resources-config.schemas.js +23 -0
  936. package/dist/esm/users/inbound-contacts.shared.resources-config.schemas.js.map +1 -1
  937. package/dist/esm/users/inbound-contacts.shared.schemas.d.ts +2 -1
  938. package/dist/esm/users/inbound-contacts.shared.schemas.d.ts.map +1 -1
  939. package/dist/esm/users/user-consent-decision.shared.utils.d.ts +127 -0
  940. package/dist/esm/users/user-consent-decision.shared.utils.d.ts.map +1 -0
  941. package/dist/esm/users/user-consent-decision.shared.utils.js +189 -0
  942. package/dist/esm/users/user-consent-decision.shared.utils.js.map +1 -0
  943. package/dist/esm/users/user-credentials.shared.resources-config.schemas.d.ts.map +1 -1
  944. package/dist/esm/users/user-credentials.shared.schemas.d.ts.map +1 -1
  945. package/dist/esm/users/user-identity-links.shared.resources-config.schemas.d.ts +1 -0
  946. package/dist/esm/users/user-identity-links.shared.resources-config.schemas.d.ts.map +1 -1
  947. package/dist/esm/users/user-identity-links.shared.schemas.d.ts +1 -0
  948. package/dist/esm/users/user-identity-links.shared.schemas.d.ts.map +1 -1
  949. package/dist/esm/users/user-identity-links.shared.schemas.js +30 -0
  950. package/dist/esm/users/user-identity-links.shared.schemas.js.map +1 -1
  951. package/dist/esm/users/user-preferences-reset.shared.utils.d.ts +6 -6
  952. package/dist/esm/users/user-preferences-reset.shared.utils.d.ts.map +1 -1
  953. package/dist/esm/users/user-preferences-reset.shared.utils.js +6 -6
  954. package/dist/esm/users/user-preferences-reset.shared.utils.js.map +1 -1
  955. package/dist/esm/users/user-preferences.shared.resources-config.schemas.d.ts +74 -29
  956. package/dist/esm/users/user-preferences.shared.resources-config.schemas.d.ts.map +1 -1
  957. package/dist/esm/users/user-preferences.shared.resources-config.schemas.js +99 -0
  958. package/dist/esm/users/user-preferences.shared.resources-config.schemas.js.map +1 -1
  959. package/dist/esm/users/user-profiles.shared.resources-config.schemas.d.ts.map +1 -1
  960. package/dist/esm/users/user-profiles.shared.resources-config.schemas.js +25 -9
  961. package/dist/esm/users/user-profiles.shared.resources-config.schemas.js.map +1 -1
  962. package/dist/esm/users/user-self-preferences.shared.resources-config.schemas.d.ts +4 -4
  963. package/dist/esm/users/user-self-preferences.shared.resources-config.schemas.d.ts.map +1 -1
  964. package/dist/esm/users/user-self-preferences.shared.resources-config.schemas.js +12 -1
  965. package/dist/esm/users/user-self-preferences.shared.resources-config.schemas.js.map +1 -1
  966. package/dist/esm/users/user-self-profiles.shared.resources-config.schemas.d.ts.map +1 -1
  967. package/dist/esm/users/user-self.shared.resources-config.schemas.d.ts +1 -0
  968. package/dist/esm/users/user-self.shared.resources-config.schemas.d.ts.map +1 -1
  969. package/dist/esm/users/user-self.shared.resources-config.schemas.js +2 -2
  970. package/dist/esm/users/user-self.shared.resources-config.schemas.js.map +1 -1
  971. package/dist/esm/users/users.shared.resources-config.schemas.d.ts +1 -0
  972. package/dist/esm/users/users.shared.resources-config.schemas.d.ts.map +1 -1
  973. package/dist/esm/users/users.shared.resources-config.schemas.js +2 -2
  974. package/dist/esm/users/users.shared.resources-config.schemas.js.map +1 -1
  975. package/dist/esm/users/users.shared.schemas.d.ts +11 -9
  976. package/dist/esm/users/users.shared.schemas.d.ts.map +1 -1
  977. package/dist/esm/users/users.shared.schemas.js +68 -9
  978. package/dist/esm/users/users.shared.schemas.js.map +1 -1
  979. package/dist/tsconfig.build.tsbuildinfo +1 -1
  980. package/package.json +14 -35
  981. package/dist/esm/flows-actors/apps-blueprint/apps-blueprint-agent-personas.shared.enums.d.ts +0 -19
  982. package/dist/esm/flows-actors/apps-blueprint/apps-blueprint-agent-personas.shared.enums.d.ts.map +0 -1
  983. package/dist/esm/flows-actors/apps-blueprint/apps-blueprint-agent-personas.shared.enums.js +0 -35
  984. package/dist/esm/flows-actors/apps-blueprint/apps-blueprint-agent-personas.shared.enums.js.map +0 -1
  985. package/dist/esm/flows-actors/apps-blueprint/apps-blueprint.shared.schemas.d.ts +0 -213
  986. package/dist/esm/flows-actors/apps-blueprint/apps-blueprint.shared.schemas.d.ts.map +0 -1
  987. package/dist/esm/flows-actors/apps-blueprint/apps-blueprint.shared.schemas.js +0 -287
  988. package/dist/esm/flows-actors/apps-blueprint/apps-blueprint.shared.schemas.js.map +0 -1
  989. package/dist/esm/flows-actors/apps-blueprint/artifacts.apps-blueprint.shared.schemas.d.ts +0 -236
  990. package/dist/esm/flows-actors/apps-blueprint/artifacts.apps-blueprint.shared.schemas.d.ts.map +0 -1
  991. package/dist/esm/flows-actors/apps-blueprint/artifacts.apps-blueprint.shared.schemas.js +0 -212
  992. package/dist/esm/flows-actors/apps-blueprint/artifacts.apps-blueprint.shared.schemas.js.map +0 -1
  993. package/dist/esm/flows-actors/meta-workflows/actions.meta-workflows.shared.schemas.d.ts.map +0 -1
  994. package/dist/esm/flows-actors/meta-workflows/actions.meta-workflows.shared.schemas.js.map +0 -1
  995. package/dist/esm/flows-actors/meta-workflows/budget-authority.meta-workflows.shared.schemas.d.ts +0 -17
  996. package/dist/esm/flows-actors/meta-workflows/budget-authority.meta-workflows.shared.schemas.d.ts.map +0 -1
  997. package/dist/esm/flows-actors/meta-workflows/budget-authority.meta-workflows.shared.schemas.js +0 -31
  998. package/dist/esm/flows-actors/meta-workflows/budget-authority.meta-workflows.shared.schemas.js.map +0 -1
  999. package/dist/esm/flows-actors/meta-workflows/catalog.meta-workflows.shared.schemas.d.ts.map +0 -1
  1000. package/dist/esm/flows-actors/meta-workflows/catalog.meta-workflows.shared.schemas.js.map +0 -1
  1001. package/dist/esm/flows-actors/meta-workflows/context-selection.meta-workflows.shared.schemas.d.ts.map +0 -1
  1002. package/dist/esm/flows-actors/meta-workflows/context-selection.meta-workflows.shared.schemas.js.map +0 -1
  1003. package/dist/esm/flows-actors/meta-workflows/continuity-identifiers.meta-workflows.shared.schemas.d.ts +0 -28
  1004. package/dist/esm/flows-actors/meta-workflows/continuity-identifiers.meta-workflows.shared.schemas.d.ts.map +0 -1
  1005. package/dist/esm/flows-actors/meta-workflows/continuity-identifiers.meta-workflows.shared.schemas.js +0 -28
  1006. package/dist/esm/flows-actors/meta-workflows/continuity-identifiers.meta-workflows.shared.schemas.js.map +0 -1
  1007. package/dist/esm/flows-actors/meta-workflows/decisions.meta-workflows.shared.schemas.d.ts.map +0 -1
  1008. package/dist/esm/flows-actors/meta-workflows/decisions.meta-workflows.shared.schemas.js.map +0 -1
  1009. package/dist/esm/flows-actors/meta-workflows/execution-binding-common.meta-workflows.shared.schemas.d.ts +0 -100
  1010. package/dist/esm/flows-actors/meta-workflows/execution-binding-common.meta-workflows.shared.schemas.d.ts.map +0 -1
  1011. package/dist/esm/flows-actors/meta-workflows/execution-binding-common.meta-workflows.shared.schemas.js +0 -232
  1012. package/dist/esm/flows-actors/meta-workflows/execution-binding-common.meta-workflows.shared.schemas.js.map +0 -1
  1013. package/dist/esm/flows-actors/meta-workflows/execution-binding-vocabularies.meta-workflows.shared.schemas.d.ts +0 -29
  1014. package/dist/esm/flows-actors/meta-workflows/execution-binding-vocabularies.meta-workflows.shared.schemas.d.ts.map +0 -1
  1015. package/dist/esm/flows-actors/meta-workflows/execution-binding-vocabularies.meta-workflows.shared.schemas.js +0 -58
  1016. package/dist/esm/flows-actors/meta-workflows/execution-binding-vocabularies.meta-workflows.shared.schemas.js.map +0 -1
  1017. package/dist/esm/flows-actors/meta-workflows/portable-primitives.meta-workflows.shared.schemas.d.ts.map +0 -1
  1018. package/dist/esm/flows-actors/meta-workflows/portable-primitives.meta-workflows.shared.schemas.js.map +0 -1
  1019. package/dist/esm/flows-actors/task-continuity-binding.actors.shared.schemas.d.ts +0 -81
  1020. package/dist/esm/flows-actors/task-continuity-binding.actors.shared.schemas.d.ts.map +0 -1
  1021. package/dist/esm/flows-actors/task-continuity-binding.actors.shared.schemas.js +0 -82
  1022. package/dist/esm/flows-actors/task-continuity-binding.actors.shared.schemas.js.map +0 -1
  1023. package/dist/esm/flows-actors/utils/flow-actors.context-builder.apps-context.shared.utils.d.ts +0 -2
  1024. package/dist/esm/flows-actors/utils/flow-actors.context-builder.apps-context.shared.utils.d.ts.map +0 -1
  1025. package/dist/esm/flows-actors/utils/flow-actors.context-builder.apps-context.shared.utils.js +0 -1
  1026. package/dist/esm/flows-actors/utils/flow-actors.context-builder.apps-context.shared.utils.js.map +0 -1
  1027. /package/dist/esm/{flows-actors/meta-workflows → meta-workflows}/actions.meta-workflows.shared.schemas.d.ts +0 -0
  1028. /package/dist/esm/{flows-actors/meta-workflows → meta-workflows}/actions.meta-workflows.shared.schemas.js +0 -0
  1029. /package/dist/esm/{flows-actors/meta-workflows → meta-workflows}/catalog.meta-workflows.shared.schemas.d.ts +0 -0
  1030. /package/dist/esm/{flows-actors/meta-workflows → meta-workflows}/catalog.meta-workflows.shared.schemas.js +0 -0
  1031. /package/dist/esm/{flows-actors/meta-workflows → meta-workflows}/context-selection.meta-workflows.shared.schemas.d.ts +0 -0
  1032. /package/dist/esm/{flows-actors/meta-workflows → meta-workflows}/context-selection.meta-workflows.shared.schemas.js +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"guidance-flow.shared.schemas.js","sourceRoot":"","sources":["../../../../src/guidance/guidance-flow.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,qBAAqB,EAAE,MAAM,8CAA8C,CAAC;AACvI,OAAO,EAAE,2BAA2B,EAAE,MAAM,8CAA8C,CAAC;AAC3F,OAAO,EAAE,4BAA4B,EAAE,MAAM,+CAA+C,CAAC;AAC7F,OAAO,EAAE,gBAAgB,EAAE,MAAM,gDAAgD,CAAC;AAElF;;oEAEoE;AAEpE,MAAM,CAAN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;IAChE,CAAC,qBAAqB,CAAC,cAAc,CAAC,EAAE,CAAC,OAAO,EAAE,aAAa,EAAE,aAAa,CAAC;IAC/E,CAAC,qBAAqB,CAAC,IAAI,CAAC,EAAY,CAAC,OAAO,EAAE,aAAa,CAAC;IAChE,CAAC,qBAAqB,CAAC,OAAO,CAAC,EAAS,CAAC,OAAO,EAAE,aAAa,EAAE,SAAS,CAAC;IAC3E,CAAC,qBAAqB,CAAC,KAAK,CAAC,EAAW,CAAC,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,aAAa,CAAC;IAC1F,CAAC,qBAAqB,CAAC,MAAM,CAAC,EAAU,CAAC,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,aAAa,CAAC;IAC1F,CAAC,qBAAqB,CAAC,YAAY,CAAC,EAAI,CAAC,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,aAAa,CAAC;IAC1F,CAAC,qBAAqB,CAAC,KAAK,CAAC,EAAW,CAAC,OAAO,EAAE,SAAS,CAAC;IAC5D,CAAC,qBAAqB,CAAC,IAAI,CAAC,EAAY,CAAC,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,aAAa,CAAC;IAC1F,CAAC,qBAAqB,CAAC,MAAM,CAAC,EAAU,CAAC,OAAO,EAAE,aAAa,CAAC;CACjE,CAAC","sourcesContent":["import { z } from 'zod';\nimport { OnboardingTriggerSchema, OnboardingElementSchema, OnboardingElementType } from '../config/frontend/onboarding.shared.schemas';\nimport { OnboardingViewOptionsSchema } from '../config/frontend/onboarding.shared.schemas';\nimport { RequiredFeaturesConfigSchema } from '../features/feature-definition.shared.schemas';\nimport { CoreResourceType } from '../resources/resources.shared.core.definitions';\n\n/** ──────────────────────────────────────────────────────────────\n * Guidance Flow — Render Modes\n * ────────────────────────────────────────────────────────────── */\n\nexport enum GuidanceRenderMode {\n /** Modal, banner, announcement — rendered on top of the current view */\n OVERLAY = 'overlay',\n /** Tooltip, spotlight — attached to DOM elements in the current view */\n INLINE = 'inline',\n /** Floating checklist panel — persistent sidebar/widget */\n CHECKLIST = 'checklist',\n}\n\n/** ──────────────────────────────────────────────────────────────\n * Guidance Flow — Scope\n * ────────────────────────────────────────────────────────────── */\n\n/** Which scope resource stores this flow's state */\nexport enum GuidanceFlowScope {\n /** State stored in USER_GUIDANCE_STATE — personal flows (default) */\n USER = 'user',\n /** State stored in ORGANIZATION_GUIDANCE_STATE — org-wide flows (completion shared across members) */\n ORGANIZATION = 'organization',\n}\n\n/** ──────────────────────────────────────────────────────────────\n * Guidance Flow — Audience\n * ────────────────────────────────────────────────────────────── */\n\n/** Audience targeting — who sees this flow */\nexport const GuidanceAudienceSchema = z.object({\n /** Required user roles (any match = eligible). Empty/omitted = all roles. */\n roles: z.array(z.string()).optional(),\n /** Required features using the shared `RequiredFeaturesConfig` semantics. */\n requiredFeatures: RequiredFeaturesConfigSchema.optional(),\n /** Exclude users who have completed these flows */\n excludeIfCompleted: z.array(z.string()).optional(),\n /** Only show to users created after this date (for new-user flows) */\n createdAfter: z.coerce.date().optional(),\n});\nexport type GuidanceAudience = z.infer<typeof GuidanceAudienceSchema>;\n\n/** ──────────────────────────────────────────────────────────────\n * Guidance Flow — Definition\n * ────────────────────────────────────────────────────────────── */\n\n/** GuidanceFlowDefinition — declarative flow configuration */\nexport const GuidanceFlowDefinitionSchema = z.object({\n /** Unique flow reference (e.g., 'welcome-tour', 'org-setup-wizard') */\n ref: z.string().min(1),\n /** State scope — determines which resource stores this flow's state.\n * USER (default): personal guidance, each user has their own state.\n * ORGANIZATION: org-wide guidance, shared across all members. */\n scope: z.enum(GuidanceFlowScope).default(GuidanceFlowScope.USER),\n /** Rendering mode */\n renderMode: z.enum(GuidanceRenderMode),\n /** When/how to activate this flow */\n trigger: OnboardingTriggerSchema,\n /** Audience targeting */\n audience: GuidanceAudienceSchema.optional(),\n /** Priority for ordering when multiple flows are eligible (lower = higher priority) */\n priority: z.number().int().default(100),\n /** Elements in this flow — reuses existing OnboardingElement discriminated union */\n elements: z.array(OnboardingElementSchema),\n /** Flow-level options */\n options: OnboardingViewOptionsSchema.optional(),\n /** i18n: label configuration */\n labels: z.object({\n description: z.boolean().default(false),\n }).optional(),\n});\nexport type GuidanceFlowDefinition = z.infer<typeof GuidanceFlowDefinitionSchema>;\n\n/** ──────────────────────────────────────────────────────────────\n * Guidance Flow — Reference\n * ────────────────────────────────────────────────────────────── */\n\n/** Lightweight reference for toggling/prioritizing flows without repeating the full definition */\nexport const GuidanceFlowReferenceSchema = z.object({\n ref: z.string().min(1),\n priority: z.number().int().optional(),\n enabled: z.boolean().default(true),\n});\nexport type GuidanceFlowReference = z.infer<typeof GuidanceFlowReferenceSchema>;\n\n/** ──────────────────────────────────────────────────────────────\n * Guidance — Scope to Resource Mapping\n * ────────────────────────────────────────────────────────────── */\n\n/** Maps GuidanceFlowScope to the CoreResourceType that stores its state */\nexport const GUIDANCE_SCOPE_TO_RESOURCE: Record<GuidanceFlowScope, CoreResourceType> = {\n [GuidanceFlowScope.USER]: CoreResourceType.USER_GUIDANCE_STATE,\n [GuidanceFlowScope.ORGANIZATION]: CoreResourceType.ORGANIZATION_GUIDANCE_STATE,\n};\n\n/** ──────────────────────────────────────────────────────────────\n * Guidance — Per-Element-Type i18n Field Map\n * ────────────────────────────────────────────────────────────── */\n\n/** Controls which i18n keys are generated per element type.\n * Follows the ERROR_GUIDANCE_REFS pattern — avoids wasteful cartesian product generation. */\nexport const GUIDANCE_ELEMENT_FIELDS: Record<OnboardingElementType, string[]> = {\n [OnboardingElementType.CHECKLIST]: ['title', 'description'],\n [OnboardingElementType.CHECKLIST_ITEM]: ['title', 'description', 'actionLabel'],\n [OnboardingElementType.TOUR]: ['title', 'description'],\n [OnboardingElementType.TOOLTIP]: ['title', 'description', 'content'],\n [OnboardingElementType.MODAL]: ['title', 'description', 'content', 'actionLabel'],\n [OnboardingElementType.BANNER]: ['title', 'description', 'content', 'actionLabel'],\n [OnboardingElementType.ANNOUNCEMENT]: ['title', 'description', 'content', 'actionLabel'],\n [OnboardingElementType.BADGE]: ['title', 'content'],\n [OnboardingElementType.CARD]: ['title', 'description', 'content', 'actionLabel'],\n [OnboardingElementType.SURVEY]: ['title', 'description'],\n};\n"]}
1
+ {"version":3,"file":"guidance-flow.shared.schemas.js","sourceRoot":"","sources":["../../../../src/guidance/guidance-flow.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,qBAAqB,EAAE,MAAM,8CAA8C,CAAC;AAEvI,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAClF,OAAO,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AACzE,OAAO,EAAE,4BAA4B,EAAE,MAAM,+CAA+C,CAAC;AAC7F,OAAO,EAAE,gBAAgB,EAAE,MAAM,gDAAgD,CAAC;AAElF;;oEAEoE;AAEpE;;;;;;;;;;;;GAYG;AAEH,MAAM,CAAN,IAAY,kBAOX;AAPD,WAAY,kBAAkB;IAC5B,wEAAwE;IACxE,yCAAmB,CAAA;IACnB,wEAAwE;IACxE,uCAAiB,CAAA;IACjB,2DAA2D;IAC3D,6CAAuB,CAAA;AACzB,CAAC,EAPW,kBAAkB,KAAlB,kBAAkB,QAO7B;AAED;;oEAEoE;AAEpE,oDAAoD;AACpD,MAAM,CAAN,IAAY,iBAKX;AALD,WAAY,iBAAiB;IAC3B,qEAAqE;IACrE,kCAAa,CAAA;IACb,sGAAsG;IACtG,kDAA6B,CAAA;AAC/B,CAAC,EALW,iBAAiB,KAAjB,iBAAiB,QAK5B;AAED;;oEAEoE;AAEpE;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C,6EAA6E;IAC7E,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAA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jE,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,UAAU,yCAAyC,CAAC,OAA0B;IAClF,MAAM,cAAc,GAAG,uBAAuB,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;IACnE,MAAM,QAAQ,GAAa,cAAc,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAC7E,MAAM,cAAc,GAClB,CAAC,WAAW,IAAI,OAAO,IAAI,OAAO,OAAO,CAAC,SAAS,KAAK,QAAQ,IAAI,OAAO,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC;WAC9F,CAAC,WAAW,IAAI,OAAO,IAAI,OAAO,OAAO,CAAC,SAAS,KAAK,QAAQ,IAAI,OAAO,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IACvG,IAAI,cAAc,IAAI,cAAc,CAAC,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC;QAC7D,QAAQ,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IAC/B,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC","sourcesContent":["import { z } from 'zod';\nimport { OnboardingTriggerSchema, OnboardingElementSchema, OnboardingElementType } from '../config/frontend/onboarding.shared.schemas';\nimport type { OnboardingElement } from '../config/frontend/onboarding.shared.schemas';\nimport { LifecycleScope, LifecycleStage } from './lifecycle-state.shared.schemas';\nimport { ProgressionScope } from './milestone-definition.shared.schemas';\nimport { RequiredFeaturesConfigSchema } from '../features/feature-definition.shared.schemas';\nimport { CoreResourceType } from '../resources/resources.shared.core.definitions';\n\n/** ──────────────────────────────────────────────────────────────\n * Guidance Flow — Render Modes\n * ────────────────────────────────────────────────────────────── */\n\n/**\n * @wildo_source:part:start saas.models.guidance-flow facet:layer:shared facet:family:guidance facet:audience:app-developer\n *\n * A guidance flow is triggered chrome — a banner, a modal, a tour, a survey — that appears over\n * whatever the person is looking at when an event fires, remembers whether they finished with it,\n * and does not come back. Declare flows as `GuidanceFlowDefinition[]` on a frontend module's\n * `guidanceFlows`. Import from `@wildo-ai/saas-models`.\n *\n * Only ONE `OVERLAY` flow is shown at a time: of the active ones, the lowest `priority` number is\n * shown. The others WAIT — each appears once the one in front of it is completed, skipped or\n * dismissed in the same session. A flow that never got shown is not saved as started, so a page\n * reload drops it until its trigger fires again.\n */\n\nexport enum GuidanceRenderMode {\n /** Modal, banner, announcement — rendered on top of the current view */\n OVERLAY = 'overlay',\n /** Tooltip, spotlight — attached to DOM elements in the current view */\n INLINE = 'inline',\n /** Floating checklist panel — persistent sidebar/widget */\n CHECKLIST = 'checklist',\n}\n\n/** ──────────────────────────────────────────────────────────────\n * Guidance Flow — Scope\n * ────────────────────────────────────────────────────────────── */\n\n/** Which scope resource stores this flow's state */\nexport enum GuidanceFlowScope {\n /** State stored in USER_GUIDANCE_STATE — personal flows (default) */\n USER = 'user',\n /** State stored in ORGANIZATION_GUIDANCE_STATE — org-wide flows (completion shared across members) */\n ORGANIZATION = 'organization',\n}\n\n/** ──────────────────────────────────────────────────────────────\n * Guidance Flow — Audience\n * ────────────────────────────────────────────────────────────── */\n\n/**\n * Audience targeting — who sees this flow.\n *\n * ## What it may read, and why that boundary is where it is\n *\n * Everything here is answered from state the GUIDANCE CONTEXT ALREADY HOLDS: the subject's roles,\n * their resolved features, the flow states it loaded, and the progression and\n * lifecycle documents it loads beside them. No criterion reads an arbitrary resource row, and that\n * is the deliberate line: eligibility is computed on the frontend, synchronously, every time the\n * eligible set is recomputed. A criterion needing a row nobody has loaded would turn that into a\n * fetch, and an eligibility question that can be SLOW or FAIL is a different mechanism.\n *\n * ## Scope\n *\n * The progression and lifecycle criteria read the scope the FLOW declares — a USER flow asks about\n * the user's own milestones and stage, an ORGANIZATION flow about the organization's. Anything else\n * would make an org-wide flow gate on whichever member happened to load it.\n *\n * ## ANY vs ALL, stated per field because the two readings are both defensible\n *\n * A field answering \"who are you\" is ANY-of (`roles`, the two lifecycle fields): one match is\n * enough. A field answering \"what must already be true\" is ALL-of (`requireIfCompleted`,\n * `requiredMilestones`, `requiredSurveyAnswers`): a prerequisite list with one unmet entry is unmet.\n * `excludeIfCompleted` is ANY-of because it is a veto — one reason to suppress is enough.\n */\nexport const GuidanceAudienceSchema = z.object({\n /** Required user roles (any match = eligible). Empty/omitted = all roles. */\n roles: z.array(z.string()).optional(),\n /** Required features using the shared `RequiredFeaturesConfig` semantics. */\n requiredFeatures: RequiredFeaturesConfigSchema.optional(),\n /** Exclude users who have completed these flows (ANY match suppresses). */\n excludeIfCompleted: z.array(z.string()).optional(),\n /**\n * Show only once ALL of these flows have been COMPLETED — the positive counterpart of\n * `excludeIfCompleted`, and how a second flow follows a first.\n *\n * COMPLETED only. A flow that was dismissed or skipped has not met a prerequisite — the person\n * declined it — and treating those as satisfaction would show a follow-up to exactly the people\n * who opted out of its lead-in.\n */\n requireIfCompleted: z.array(z.string()).optional(),\n /** Show only once ALL of these milestones are achieved, in the flow's own progression scope. */\n requiredMilestones: z.array(z.string()).optional(),\n /**\n * Show only while the subject's CURRENT lifecycle stage is one of these.\n *\n * Distinct from `lifecycleStagesReached` on purpose, because the two answer opposite questions and\n * confusing them is the likeliest authoring mistake here. This one is \"who are you NOW\" — it stops\n * matching the moment the subject moves on, which is what a dormancy nudge wants and what an\n * \"already activated\" tip does not.\n */\n currentLifecycleStages: z.array(z.enum(LifecycleStage)).optional(),\n /**\n * Show once the subject has EVER been in one of these stages.\n *\n * Reads `stagesVisited`, which exists precisely so this question survives the stage-history cap.\n * This is what an onboarding tip usually wants: \"once they have activated\" stays true after they\n * go on to ENGAGED, where `currentLifecycleStages: [ACTIVATED]` would silently stop matching.\n */\n lifecycleStagesReached: z.array(z.enum(LifecycleStage)).optional(),\n /**\n * Show only when ALL of these recorded survey answers match.\n *\n * The answer is read from the guidance state the context already holds, so it addresses a\n * question by the flow, element and question that asked it. Equality only, against the scalar\n * kinds an answer can be — the point is branching on what somebody said, not a query language.\n */\n requiredSurveyAnswers: z.array(z.object({\n flowRef: z.string().min(1),\n elementRef: z.string().min(1),\n questionId: z.string().min(1),\n equals: z.union([z.string(), z.number(), z.boolean()]),\n })).optional(),\n /** Only show to users created after this date (for new-user flows) */\n createdAfter: z.coerce.date().optional(),\n});\nexport type GuidanceAudience = z.infer<typeof GuidanceAudienceSchema>;\n\n/** ──────────────────────────────────────────────────────────────\n * Guidance Flow — Definition\n * ────────────────────────────────────────────────────────────── */\n\n/** GuidanceFlowDefinition — declarative flow configuration */\nexport const GuidanceFlowDefinitionSchema = z.object({\n /** Unique flow reference (e.g., 'welcome-tour', 'org-setup-wizard') */\n ref: z.string().min(1),\n /** State scope — determines which resource stores this flow's state.\n * USER (default): personal guidance, each user has their own state.\n * ORGANIZATION: org-wide guidance, shared across all members. */\n scope: z.enum(GuidanceFlowScope).default(GuidanceFlowScope.USER),\n /** Rendering mode */\n renderMode: z.enum(GuidanceRenderMode),\n /** When/how to activate this flow */\n trigger: OnboardingTriggerSchema,\n /** Audience targeting */\n audience: GuidanceAudienceSchema.optional(),\n /** Priority for ordering when multiple flows are eligible (lower = higher priority) */\n priority: z.number().int().default(100),\n /** Elements in this flow — reuses existing OnboardingElement discriminated union */\n elements: z.array(OnboardingElementSchema),\n /*\n * There is no flow-level options block: dismissing, skipping and progress display are set on each\n * ELEMENT (`dismissible` on banner / modal / announcement / card, `allowSkip` on tour and survey,\n * `showProgress` on checklist), where the element's renderer reads them.\n */\n /** i18n: label configuration */\n labels: z.object({\n description: z.boolean().default(false),\n }).optional(),\n});\nexport type GuidanceFlowDefinition = z.infer<typeof GuidanceFlowDefinitionSchema>;\n/** @wildo_source:part:end saas.models.guidance-flow */\n\n/*\n * Maintainer note — kept OUTSIDE the anchor above because it is history, not guidance an application\n * needs. A flow-level `options` block (`OnboardingViewOptionsSchema`) was REMOVED rather than wired\n * (#1368): the guidance renderer read none of it. Three of its six members were a second spelling of\n * a per-element control already enforced where it is read (`dismissible`, `allowSkip`,\n * `showProgress`), so wiring them would have created two places to say one thing plus a precedence\n * rule; `persistState: false` named a mode that does not exist; `className` is the theme's; and\n * `autoStart` is read at neither level. Do not reintroduce it without a renderer that reads it.\n */\n\n/** ──────────────────────────────────────────────────────────────\n * Guidance — Scope to Resource Mapping\n * ────────────────────────────────────────────────────────────── */\n\n/**\n * The progression scope a flow of this scope asks about (#1373).\n *\n * Written as an explicit total map rather than a cast, even though the three scope enums currently\n * share their wire values. They are DISTINCT vocabularies — a guidance flow's storage scope, a\n * milestone's accrual scope and a subject's lifecycle scope — and collapsing them because the\n * strings line up today is what this repository's \"never merge semantically distinct concepts\n * merely because their wire values overlap\" rule exists to stop. Being total, a member added to\n * `GuidanceFlowScope` is a compile error here rather than a silent `undefined` lookup.\n */\nexport const GUIDANCE_SCOPE_TO_PROGRESSION_SCOPE: Record<GuidanceFlowScope, ProgressionScope> = {\n [GuidanceFlowScope.USER]: ProgressionScope.USER,\n [GuidanceFlowScope.ORGANIZATION]: ProgressionScope.ORGANIZATION,\n};\n\n/** The lifecycle scope a flow of this scope asks about. Total, for the reason above. */\nexport const GUIDANCE_SCOPE_TO_LIFECYCLE_SCOPE: Record<GuidanceFlowScope, LifecycleScope> = {\n [GuidanceFlowScope.USER]: LifecycleScope.USER,\n [GuidanceFlowScope.ORGANIZATION]: LifecycleScope.ORGANIZATION,\n};\n\n/** Maps GuidanceFlowScope to the CoreResourceType that stores its state */\nexport const GUIDANCE_SCOPE_TO_RESOURCE: Record<GuidanceFlowScope, CoreResourceType> = {\n [GuidanceFlowScope.USER]: CoreResourceType.USER_GUIDANCE_STATE,\n [GuidanceFlowScope.ORGANIZATION]: CoreResourceType.ORGANIZATION_GUIDANCE_STATE,\n};\n\n/** ──────────────────────────────────────────────────────────────\n * Guidance — Per-Element-Type i18n Field Map\n * ────────────────────────────────────────────────────────────── */\n\n/** Controls which i18n keys are generated per element type.\n * Follows the ERROR_GUIDANCE_REFS pattern — avoids wasteful cartesian product generation. */\nexport const GUIDANCE_ELEMENT_FIELDS: Record<OnboardingElementType, string[]> = {\n [OnboardingElementType.CHECKLIST]: ['title', 'description'],\n [OnboardingElementType.CHECKLIST_ITEM]: ['title', 'description', 'actionLabel'],\n [OnboardingElementType.TOUR]: ['title', 'description'],\n [OnboardingElementType.TOOLTIP]: ['title', 'description', 'content'],\n [OnboardingElementType.MODAL]: ['title', 'description', 'content', 'actionLabel'],\n [OnboardingElementType.BANNER]: ['title', 'description', 'content', 'actionLabel'],\n [OnboardingElementType.ANNOUNCEMENT]: ['title', 'description', 'content', 'actionLabel'],\n [OnboardingElementType.BADGE]: ['title', 'content'],\n [OnboardingElementType.CARD]: ['title', 'description', 'content', 'actionLabel'],\n [OnboardingElementType.SURVEY]: ['title', 'description'],\n};\n\n/**\n * The label fields an element CANNOT be presented without — the subset of\n * {@link GUIDANCE_ELEMENT_FIELDS} whose absence means the element's copy does not\n * exist yet, rather than that its author chose to omit an optional slot.\n *\n * - **`title`, for every element type.** The labelling pipeline generates EVERY\n * field `GUIDANCE_ELEMENT_FIELDS` lists, so a missing title is never an\n * authoring choice: it means copy has not been generated for this element at all.\n * - **`actionLabel`, only when the element declares an ACTION** (`actionRef`, or a\n * modal's `ctaAction`) and its type lists the field. A banner offering\n * navigation with no label renders no button, so the action the flow exists to\n * offer silently disappears (#539).\n *\n * `description` and `content` stay optional: an element with no body is legitimate.\n *\n * Two consumers act on the answer, and neither may re-derive it:\n * - the element translator renders the raw KEY for a required field, so a missing\n * label LOOKS missing (`.claude/rules/display-text-comes-from-i18n.md`) instead of\n * collapsing to an invisible card;\n * - the guidance renderer records a flow as PRESENTED — which is what spends its\n * once-per-user occasion — only when every required label of every element\n * resolves.\n *\n * Derived from the element's own type and declared action rather than listed per\n * type, so a new element type is covered the day it joins `GUIDANCE_ELEMENT_FIELDS`.\n */\nexport function resolveGuidanceElementRequiredLabelFields(element: OnboardingElement): string[] {\n const declaredFields = GUIDANCE_ELEMENT_FIELDS[element.type] ?? [];\n const required: string[] = declaredFields.includes('title') ? ['title'] : [];\n const declaresAction =\n ('actionRef' in element && typeof element.actionRef === 'string' && element.actionRef.length > 0)\n || ('ctaAction' in element && typeof element.ctaAction === 'string' && element.ctaAction.length > 0);\n if (declaresAction && declaredFields.includes('actionLabel')) {\n required.push('actionLabel');\n }\n return required;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"guidance-state.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["../../../src/guidance/guidance-state.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAOH,OAAO,EAAE,qBAAqB,EAAE,MAAM,gDAAgD,CAAC;AACvF,OAAO,EAA8B,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAWzG,KAAK,+BAA+B,GAChC,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,GAE5B,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,WAAW,CAAC;AAEtC,eAAO,MAAM,4DAA4D,GAAI,wBAAwB,oBAAoB,EAAE;;;;;;;;;;;;;;;iCAyKzH,CAAC;AAIH,KAAK,uCAAuC,GACxC,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,CAAC;AAEjC,eAAO,MAAM,oEAAoE,GAAI,wBAAwB,oBAAoB,EAAE;;;;;;;;;;;;;;;iCAiGjI,CAAC"}
1
+ {"version":3,"file":"guidance-state.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["../../../../src/guidance/guidance-state.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAOH,OAAO,EAAE,qBAAqB,EAAE,MAAM,gDAAgD,CAAC;AACvF,OAAO,EAA8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H,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;iBAElC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;iBAE1C,CAAC;AACH,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC;AAExF,MAAM,MAAM,sBAAsB,GAAG,iBAAiB,GAAG,yBAAyB,CAAC"}
1
+ {"version":3,"file":"guidance-state.shared.schemas.d.ts","sourceRoot":"","sources":["../../../../src/guidance/guidance-state.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,gBAAgB,EAAE,MAAM,8CAA8C,CAAC;AAIhF;;oEAEoE;AAEpE,mCAAmC;AACnC,eAAO,MAAM,0BAA0B;;;;;iBASrC,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E;;oEAEoE;AAEpE,qBAAqB;AACrB,eAAO,MAAM,uBAAuB;;;;;;;;;;;;iBASlC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE;;oEAEoE;AAEpE;;wDAEwD;AACxD,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;iBAa9B,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;iBAElC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;iBAE1C,CAAC;AACH,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC;AAExF,MAAM,MAAM,sBAAsB,GAAG,iBAAiB,GAAG,yBAAyB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"guidance-state.shared.utils.d.ts","sourceRoot":"","sources":["../../../src/guidance/guidance-state.shared.utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,sBAAsB,EACvB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,uBAAuB,EAC7B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,EACV,yBAAyB,EACzB,gBAAgB,EACjB,MAAM,oCAAoC,CAAC;AAE5C,qBAAa,kBAAkB;IAC7B,OAAO;WAEO,0BAA0B,IAAI,aAAa;WAM3C,yBAAyB,CACrC,UAAU,EAAE;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,GAAG;QAAE,cAAc,EAAE,MAAM,CAAA;KAAE,GAC1D,sBAAsB;WAgBX,6BAA6B,IAAI,gBAAgB;WAUjD,4BAA4B,CACxC,UAAU,EAAE;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,GAAG;QAAE,cAAc,EAAE,MAAM,CAAA;KAAE,GAC1D,yBAAyB;WAgBd,2BAA2B,CAAC,GAAG,GAAE,IAAiB,GAAG,cAAc;WAgBnE,iCAAiC,CAC7C,UAAU,EAAE;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,GAAG;QAAE,cAAc,EAAE,MAAM,CAAA;KAAE,EAC3D,GAAG,GAAE,IAAiB,GACrB,uBAAuB;CAe3B"}
1
+ {"version":3,"file":"guidance-state.shared.utils.d.ts","sourceRoot":"","sources":["../../../../src/guidance/guidance-state.shared.utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,sBAAsB,EACvB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,uBAAuB,EAC7B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,EACV,yBAAyB,EACzB,gBAAgB,EACjB,MAAM,oCAAoC,CAAC;AAE5C,qBAAa,kBAAkB;IAC7B,OAAO;WAEO,0BAA0B,IAAI,aAAa;WAM3C,yBAAyB,CACrC,UAAU,EAAE;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,GAAG;QAAE,cAAc,EAAE,MAAM,CAAA;KAAE,GAC1D,sBAAsB;WAgBX,6BAA6B,IAAI,gBAAgB;WAUjD,4BAA4B,CACxC,UAAU,EAAE;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,GAAG;QAAE,cAAc,EAAE,MAAM,CAAA;KAAE,GAC1D,yBAAyB;WAgBd,2BAA2B,CAAC,GAAG,GAAE,IAAiB,GAAG,cAAc;WAgBnE,iCAAiC,CAC7C,UAAU,EAAE;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,GAAG;QAAE,cAAc,EAAE,MAAM,CAAA;KAAE,EAC3D,GAAG,GAAE,IAAiB,GACrB,uBAAuB;CAe3B"}
@@ -1 +1 @@
1
- {"version":3,"file":"guidance-state.shared.utils.js","sourceRoot":"","sources":["../../../src/guidance/guidance-state.shared.utils.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,cAAc,GAGf,MAAM,kCAAkC,CAAC;AAM1C,MAAM,OAAO,kBAAkB;IAC7B,gBAAuB,CAAC;IAEjB,MAAM,CAAC,0BAA0B;QACtC,OAAO;YACL,KAAK,EAAE,EAAE;SACV,CAAC;IACJ,CAAC;IAEM,MAAM,CAAC,yBAAyB,CACrC,UAA2D;QAE3D,MAAM,YAAY,GAAG,kBAAkB,CAAC,0BAA0B,EAAE,CAAC;QAErE,IAAI,QAAQ,IAAI,UAAU,EAAE,CAAC;YAC3B,OAAO;gBACL,GAAG,Y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2B,CAAC,GAAG,CAAC,CAAC;QAEzE,IAAI,QAAQ,IAAI,UAAU,EAAE,CAAC;YAC3B,OAAO;gBACL,GAAG,YAAY;gBACf,MAAM,EAAE,UAAU,CAAC,MAAM;aAC1B,CAAC;QACJ,CAAC;QAED,OAAO;YACL,GAAG,YAAY;YACf,cAAc,EAAE,UAAU,CAAC,cAAc;SAC1C,CAAC;IACJ,CAAC;CACF","sourcesContent":["import type {\n GuidanceState,\n PersistedGuidanceState,\n} from './guidance-state.shared.schemas';\nimport {\n LifecycleStage,\n type LifecycleState,\n type PersistedLifecycleState,\n} from './lifecycle-state.shared.schemas';\nimport type {\n PersistedProgressionState,\n ProgressionState,\n} from './progression-state.shared.schemas';\n\nexport class GuidanceStateUtils {\n private constructor() {}\n\n public static createInitialGuidanceState(): GuidanceState {\n return {\n flows: {},\n };\n }\n\n public static createScopedGuidanceState(\n scopeOwner: { userId: string } | { organizationId: string },\n ): PersistedGuidanceState {\n const initialState = GuidanceStateUtils.createInitialGuidanceState();\n\n if ('userId' in scopeOwner) {\n return {\n ...initialState,\n userId: scopeOwner.userId,\n };\n }\n\n return {\n ...initialState,\n organizationId: scopeOwner.organizationId,\n };\n }\n\n public static createInitialProgressionState(): ProgressionState {\n return {\n milestonesAchieved: {},\n operationCounts: {},\n totalPoints: 0,\n valueMomentsAchieved: {},\n categoriesProgress: {},\n };\n }\n\n public static createScopedProgressionState(\n scopeOwner: { userId: string } | { organizationId: string },\n ): PersistedProgressionState {\n const initialState = GuidanceStateUtils.createInitialProgressionState();\n\n if ('userId' in scopeOwner) {\n return {\n ...initialState,\n userId: scopeOwner.userId,\n };\n }\n\n return {\n ...initialState,\n organizationId: scopeOwner.organizationId,\n };\n }\n\n public static createInitialLifecycleState(now: Date = new Date()): LifecycleState {\n return {\n currentStage: LifecycleStage.SIGNED_UP,\n stageEnteredAt: now,\n stageHistory: [{\n stage: LifecycleStage.SIGNED_UP,\n enteredAt: now,\n trigger: 'auto_create',\n }],\n stagesVisited: [LifecycleStage.SIGNED_UP],\n lastActiveAt: now,\n activationCriteriaMet: {},\n engagement: { operationsSinceActivation: 0, activeDates: [] },\n };\n }\n\n public static createInitialScopedLifecycleState(\n scopeOwner: { userId: string } | { organizationId: string },\n now: Date = new Date(),\n ): PersistedLifecycleState {\n const initialState = GuidanceStateUtils.createInitialLifecycleState(now);\n\n if ('userId' in scopeOwner) {\n return {\n ...initialState,\n userId: scopeOwner.userId,\n };\n }\n\n return {\n ...initialState,\n organizationId: scopeOwner.organizationId,\n };\n }\n}\n"]}
1
+ {"version":3,"file":"guidance-state.shared.utils.js","sourceRoot":"","sources":["../../../../src/guidance/guidance-state.shared.utils.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,cAAc,GAGf,MAAM,kCAAkC,CAAC;AAM1C,MAAM,OAAO,kBAAkB;IAC7B,gBAAuB,CAAC;IAEjB,MAAM,CAAC,0BAA0B;QACtC,OAAO;YACL,KAAK,EAAE,EAAE;SACV,CAAC;IACJ,CAAC;IAEM,MAAM,CAAC,yBAAyB,CACrC,UAA2D;QAE3D,MAAM,YAAY,GAAG,kBAAkB,CAAC,0BAA0B,EAAE,CAAC;QAErE,IAAI,QAAQ,IAAI,UAAU,EAAE,CAAC;YAC3B,OAAO;gBACL,GAAG,YAAY;gBACf,MAAM,EAAE,UAAU,CAAC,MAAM;aAC1B,CAAC;QACJ,CAAC;QAED,OAAO;YACL,GAAG,YAAY;YACf,cAAc,EAAE,UAAU,CAAC,cAAc;SAC1C,CAAC;IACJ,CAAC;IAEM,MAAM,CAAC,6BAA6B;QACzC,OAAO;YACL,kBAAkB,EAAE,EAAE;YACtB,eAAe,EAAE,EAAE;YACnB,WAAW,EAAE,CAAC;YACd,oBAAoB,EAAE,EAAE;YACxB,kBAAkB,EAAE,EAAE;SACvB,CAAC;IACJ,CAAC;IAEM,MAAM,CAAC,4BAA4B,CACxC,UAA2D;QAE3D,MAAM,YAAY,GAAG,kBAAkB,CAAC,6BAA6B,EAAE,CAAC;QAExE,IAAI,QAAQ,IAAI,UAAU,EAAE,CAAC;YAC3B,OAAO;gBACL,GAAG,YAAY;gBACf,MAAM,EAAE,UAAU,CAAC,MAAM;aAC1B,CAAC;QACJ,CAAC;QAED,OAAO;YACL,GAAG,YAAY;YACf,cAAc,EAAE,UAAU,CAAC,cAAc;SAC1C,CAAC;IACJ,CAAC;IAEM,MAAM,CAAC,2BAA2B,CAAC,MAAY,IAAI,IAAI,EAAE;QAC9D,OAAO;YACL,YAAY,EAAE,cAAc,CAAC,SAAS;YACtC,cAAc,EAAE,GAAG;YACnB,YAAY,EAAE,CAAC;oBACb,KAAK,EAAE,cAAc,CAAC,SAAS;oBAC/B,SAAS,EAAE,GAAG;oBACd,OAAO,EAAE,aAAa;iBACvB,CAAC;YACF,aAAa,EAAE,CAAC,cAAc,CAAC,SAAS,CAAC;YACzC,YAAY,EAAE,GAAG;YACjB,qBAAqB,EAAE,EAAE;YACzB,UAAU,EAAE,EAAE,yBAAyB,EAAE,CAAC,EAAE,WAAW,EAAE,EAAE,EAAE;SAC9D,CAAC;IACJ,CAAC;IAEM,MAAM,CAAC,iCAAiC,CAC7C,UAA2D,EAC3D,MAAY,IAAI,IAAI,EAAE;QAEtB,MAAM,YAAY,GAAG,kBAAkB,CAAC,2BAA2B,CAAC,GAAG,CAAC,CAAC;QAEzE,IAAI,QAAQ,IAAI,UAAU,EAAE,CAAC;YAC3B,OAAO;gBACL,GAAG,YAAY;gBACf,MAAM,EAAE,UAAU,CAAC,MAAM;aAC1B,CAAC;QACJ,CAAC;QAED,OAAO;YACL,GAAG,YAAY;YACf,cAAc,EAAE,UAAU,CAAC,cAAc;SAC1C,CAAC;IACJ,CAAC;CACF","sourcesContent":["import type {\n GuidanceState,\n PersistedGuidanceState,\n} from './guidance-state.shared.schemas';\nimport {\n LifecycleStage,\n type LifecycleState,\n type PersistedLifecycleState,\n} from './lifecycle-state.shared.schemas';\nimport type {\n PersistedProgressionState,\n ProgressionState,\n} from './progression-state.shared.schemas';\n\nexport class GuidanceStateUtils {\n private constructor() {}\n\n public static createInitialGuidanceState(): GuidanceState {\n return {\n flows: {},\n };\n }\n\n public static createScopedGuidanceState(\n scopeOwner: { userId: string } | { organizationId: string },\n ): PersistedGuidanceState {\n const initialState = GuidanceStateUtils.createInitialGuidanceState();\n\n if ('userId' in scopeOwner) {\n return {\n ...initialState,\n userId: scopeOwner.userId,\n };\n }\n\n return {\n ...initialState,\n organizationId: scopeOwner.organizationId,\n };\n }\n\n public static createInitialProgressionState(): ProgressionState {\n return {\n milestonesAchieved: {},\n operationCounts: {},\n totalPoints: 0,\n valueMomentsAchieved: {},\n categoriesProgress: {},\n };\n }\n\n public static createScopedProgressionState(\n scopeOwner: { userId: string } | { organizationId: string },\n ): PersistedProgressionState {\n const initialState = GuidanceStateUtils.createInitialProgressionState();\n\n if ('userId' in scopeOwner) {\n return {\n ...initialState,\n userId: scopeOwner.userId,\n };\n }\n\n return {\n ...initialState,\n organizationId: scopeOwner.organizationId,\n };\n }\n\n public static createInitialLifecycleState(now: Date = new Date()): LifecycleState {\n return {\n currentStage: LifecycleStage.SIGNED_UP,\n stageEnteredAt: now,\n stageHistory: [{\n stage: LifecycleStage.SIGNED_UP,\n enteredAt: now,\n trigger: 'auto_create',\n }],\n stagesVisited: [LifecycleStage.SIGNED_UP],\n lastActiveAt: now,\n activationCriteriaMet: {},\n engagement: { operationsSinceActivation: 0, activeDates: [] },\n };\n }\n\n public static createInitialScopedLifecycleState(\n scopeOwner: { userId: string } | { organizationId: string },\n now: Date = new Date(),\n ): PersistedLifecycleState {\n const initialState = GuidanceStateUtils.createInitialLifecycleState(now);\n\n if ('userId' in scopeOwner) {\n return {\n ...initialState,\n userId: scopeOwner.userId,\n };\n }\n\n return {\n ...initialState,\n organizationId: scopeOwner.organizationId,\n };\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"lifecycle-config.shared.schemas.d.ts","sourceRoot":"","sources":["../../../src/guidance/lifecycle-config.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;oEAEoE;AAEpE,iCAAiC;AACjC,oBAAY,uBAAuB;IACjC,4CAA4C;IAC5C,SAAS,cAAc;IACvB,wCAAwC;IACxC,kBAAkB,uBAAuB;CAC1C;AAED;;oEAEoE;AAEpE,eAAO,MAAM,yBAAyB;;;;;;oCASpC,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE5E;;oEAEoE;AAEpE,eAAO,MAAM,wBAAwB;;;;;;;;;;;;iBAKnC,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E;;oEAEoE;AAEpE,eAAO,MAAM,yBAAyB;;;iBAKpC,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE5E;;oEAEoE;AAEpE,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;iBAkBhC,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE;;oEAEoE;AAEpE;;;;GAIG;AACH,eAAO,MAAM,sBAAsB;;;;;CAKzB,CAAC"}
1
+ {"version":3,"file":"lifecycle-config.shared.schemas.d.ts","sourceRoot":"","sources":["../../../../src/guidance/lifecycle-config.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;oEAEoE;AAEpE,iCAAiC;AACjC,oBAAY,uBAAuB;IACjC,4CAA4C;IAC5C,SAAS,cAAc;IACvB,wCAAwC;IACxC,kBAAkB,uBAAuB;CAC1C;AAED;;oEAEoE;AAEpE,eAAO,MAAM,yBAAyB;;;;;;oCASpC,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE5E;;oEAEoE;AAEpE,eAAO,MAAM,wBAAwB;;;;;;;;;;;;iBAKnC,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E;;oEAEoE;AAEpE,eAAO,MAAM,yBAAyB;;;iBAKpC,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE5E;;oEAEoE;AAEpE,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;iBAkBhC,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE;;oEAEoE;AAEpE;;;;GAIG;AACH,eAAO,MAAM,sBAAsB;;;;;CAKzB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"lifecycle-state.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["../../../src/guidance/lifecycle-state.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAOH,OAAO,EAAE,qBAAqB,EAAE,MAAM,gDAAgD,CAAC;AACvF,OAAO,EAA8B,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAWzG,KAAK,gCAAgC,GACjC,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,GAE5B,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,WAAW,CAAC;AAEtC,eAAO,MAAM,6DAA6D,GAAI,wBAAwB,oBAAoB,EAAE;;;;;;;;;;;;;;;;;iCA4K1H,CAAC;AAIH,KAAK,wCAAwC,GACzC,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,CAAC;AAEjC,eAAO,MAAM,qEAAqE,GAAI,wBAAwB,oBAAoB,EAAE;;;;;;;;;;;;;;;;;iCAoGlI,CAAC"}
1
+ {"version":3,"file":"lifecycle-state.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["../../../../src/guidance/lifecycle-state.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAOH,OAAO,EAAE,qBAAqB,EAAE,MAAM,gDAAgD,CAAC;AACvF,OAAO,EAA8B,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAWzG,KAAK,gCAAgC,GACjC,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,GAE5B,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,WAAW,CAAC;AAEtC,eAAO,MAAM,6DAA6D,GAAI,wBAAwB,oBAAoB,EAAE;;;;;;;;;;;;;;;;;iCA4K1H,CAAC;AAIH,KAAK,wCAAwC,GACzC,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,CAAC;AAEjC,eAAO,MAAM,qEAAqE,GAAI,wBAAwB,oBAAoB,EAAE;;;;;;;;;;;;;;;;;iCAoGlI,CAAC"}
@@ -31,15 +31,9 @@ export declare enum LifecycleScope {
31
31
  /** ──────────────────────────────────────────────────────────────
32
32
  * Const Maps — State Machine, Stage Sets, Scope Mappings
33
33
  * ────────────────────────────────────────────────────────────── */
34
- /** "Happy path" progression weight — used ONLY for the linear happy path.
35
- * The lifecycle is NOT a linear progression (it branches at dormancy/reactivation).
36
- * `hasReachedStage()` uses stagesVisited instead — see below. */
37
- export declare const LIFECYCLE_HAPPY_PATH_WEIGHT: Readonly<Record<LifecycleStage, number>>;
38
34
  /** Valid state transitions — the lifecycle state machine.
39
35
  * Key = source stage, Value = valid target stages. */
40
36
  export declare const LIFECYCLE_VALID_TRANSITIONS: Readonly<Record<LifecycleStage, readonly LifecycleStage[]>>;
41
- /** Stages that represent an "active" user (not dormant/churned/offboarded) */
42
- export declare const LIFECYCLE_ACTIVE_STAGES: readonly [LifecycleStage.SIGNED_UP, LifecycleStage.ACTIVATED, LifecycleStage.ENGAGED, LifecycleStage.REACTIVATED];
43
37
  /** Stages from which a user can become dormant (all active stages except SIGNED_UP) */
44
38
  export declare const LIFECYCLE_DORMANCY_SOURCE_STAGES: readonly [LifecycleStage.ACTIVATED, LifecycleStage.ENGAGED, LifecycleStage.REACTIVATED];
45
39
  /** Stages eligible for engagement threshold evaluation (can transition to ENGAGED) */
@@ -1 +1 @@
1
- {"version":3,"file":"lifecycle-state.shared.schemas.d.ts","sourceRoot":"","sources":["../../../src/guidance/lifecycle-state.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,gBAAgB,EAAE,MAAM,gDAAgD,CAAC;AAIlF;;oEAEoE;AAEpE,iFAAiF;AACjF,oBAAY,cAAc;IACxB,4DAA4D;IAC5D,SAAS,cAAc;IACvB,+DAA+D;IAC/D,SAAS,cAAc;IACvB,uFAAuF;IACvF,OAAO,YAAY;IACnB,yDAAyD;IACzD,OAAO,YAAY;IACnB,2CAA2C;IAC3C,WAAW,gBAAgB;IAC3B,sDAAsD;IACtD,OAAO,YAAY;IACnB,gDAAgD;IAChD,UAAU,eAAe;CAC1B;AAED;;oEAEoE;AAEpE,sEAAsE;AACtE,oBAAY,cAAc;IACxB,IAAI,SAAS;IACb,YAAY,iBAAiB;CAC9B;AAED;;oEAEoE;AAEpE;;kEAEkE;AAClE,eAAO,MAAM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CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE5E;;wDAEwD;AACxD,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;iBAqD/B,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;iBAInC,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;iBAG3C,CAAC;AACH,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC;AAE1F,MAAM,MAAM,uBAAuB,GAAG,kBAAkB,GAAG,0BAA0B,CAAC;AAEtF;;oEAEoE;AAEpE;;2FAE2F;AAC3F,wBAAgB,eAAe,CAAC,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,cAAc,GAAG,OAAO,CAM3F"}
1
+ {"version":3,"file":"lifecycle-state.shared.schemas.d.ts","sourceRoot":"","sources":["../../../../src/guidance/lifecycle-state.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,gBAAgB,EAAE,MAAM,gDAAgD,CAAC;AAIlF;;oEAEoE;AAEpE,iFAAiF;AACjF,oBAAY,cAAc;IACxB,4DAA4D;IAC5D,SAAS,cAAc;IACvB,+DAA+D;IAC/D,SAAS,cAAc;IACvB,uFAAuF;IACvF,OAAO,YAAY;IACnB,yDAAyD;IACzD,OAAO,YAAY;IACnB,2CAA2C;IAC3C,WAAW,gBAAgB;IAC3B,sDAAsD;IACtD,OAAO,YAAY;IACnB,gDAAgD;IAChD,UAAU,eAAe;CAC1B;AAED;;oEAEoE;AAEpE,sEAAsE;AACtE,oBAAY,cAAc;IACxB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MAAM,oBAAoB;;;;;;;;;;;;;;;;iBAqD/B,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;iBAInC,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;iBAG3C,CAAC;AACH,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC;AAE1F,MAAM,MAAM,uBAAuB,GAAG,kBAAkB,GAAG,0BAA0B,CAAC;AAEtF;;oEAEoE;AAEpE;;2FAE2F;AAC3F,wBAAgB,eAAe,CAAC,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,cAAc,GAAG,OAAO,CAM3F"}
@@ -36,18 +36,6 @@ export var LifecycleScope;
36
36
  /** ──────────────────────────────────────────────────────────────
37
37
  * Const Maps — State Machine, Stage Sets, Scope Mappings
38
38
  * ────────────────────────────────────────────────────────────── */
39
- /** "Happy path" progression weight — used ONLY for the linear happy path.
40
- * The lifecycle is NOT a linear progression (it branches at dormancy/reactivation).
41
- * `hasReachedStage()` uses stagesVisited instead — see below. */
42
- export const LIFECYCLE_HAPPY_PATH_WEIGHT = {
43
- [LifecycleStage.SIGNED_UP]: 0,
44
- [LifecycleStage.ACTIVATED]: 1,
45
- [LifecycleStage.ENGAGED]: 2,
46
- [LifecycleStage.REACTIVATED]: 2, // Same weight as ENGAGED — reactivated users regain engaged-level access
47
- [LifecycleStage.DORMANT]: -1, // Not on happy path
48
- [LifecycleStage.CHURNED]: -2, // Terminal negative
49
- [LifecycleStage.OFFBOARDED]: -3, // Terminal negative
50
- };
51
39
  /** Valid state transitions — the lifecycle state machine.
52
40
  * Key = source stage, Value = valid target stages. */
53
41
  export const LIFECYCLE_VALID_TRANSITIONS = {
@@ -59,13 +47,6 @@ export const LIFECYCLE_VALID_TRANSITIONS = {
59
47
  [LifecycleStage.CHURNED]: [LifecycleStage.OFFBOARDED],
60
48
  [LifecycleStage.OFFBOARDED]: [],
61
49
  };
62
- /** Stages that represent an "active" user (not dormant/churned/offboarded) */
63
- export const LIFECYCLE_ACTIVE_STAGES = [
64
- LifecycleStage.SIGNED_UP,
65
- LifecycleStage.ACTIVATED,
66
- LifecycleStage.ENGAGED,
67
- LifecycleStage.REACTIVATED,
68
- ];
69
50
  /** Stages from which a user can become dormant (all active stages except SIGNED_UP) */
70
51
  export const LIFECYCLE_DORMANCY_SOURCE_STAGES = [
71
52
  LifecycleStage.ACTIVATED,
@@ -1 +1 @@
1
- {"version":3,"file":"lifecycle-state.shared.schemas.js","sourceRoot":"","sources":["../../../../src/guidance/lifecycle-state.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,oBAAoB,EAAE,MAAM,6DAA6D,CAAC;AACnG,OAAO,EAAE,gBAAgB,EAAE,MAAM,gDAAgD,CAAC;AAClF,OAAO,EAAE,aAAa,EAAE,MAAM,gDAAgD,CAAC;AAC/E,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEhE;;oEAEoE;AAEpE,iFAAiF;AACjF,MAAM,CAAN,IAAY,cAeX;AAfD,WAAY,cAAc;IACxB,4DAA4D;IAC5D,yCAAuB,CAAA;IACvB,+DAA+D;IAC/D,yCAAuB,CAAA;IACvB,uFAAuF;IACvF,qCAAmB,CAAA;IACnB,yDAAyD;IACzD,qCAAmB,CAAA;IACnB,2CAA2C;IAC3C,6CAA2B,CAAA;IAC3B,sDAAsD;IACtD,qCAAmB,CAAA;IACnB,gDAAgD;IAChD,2CAAyB,CAAA;AAC3B,CAAC,EAfW,cAAc,KAAd,cAAc,QAezB;AAED;;oEAEoE;AAEpE,sEAAsE;AACtE,MA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E,yBAAyB,CAAC,OAAO,CAAC;QAC5C,yBAAyB,EAAE,CAAC;QAC5B,WAAW,EAAE,EAAE;KAChB,CAAC;CACH,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,wBAAwB,GAAG,oBAAoB,CAAC,MAAM,CAAC;IAClE,qFAAqF;IACrF,2EAA2E;IAC3E,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,QAAQ,EAAE,CAAC,YAAY,EAAE,CAAC,cAAc,EAAE,CAAC,iBAAiB,EAAE;CACvG,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,gCAAgC,GAAG,oBAAoB,CAAC,MAAM,CAAC;IAC1E,qFAAqF;IACrF,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,QAAQ,EAAE,CAAC,YAAY,EAAE,CAAC,cAAc,EAAE,CAAC,iBAAiB,EAAE;CAC/G,CAAC,CAAC;AAKH;;oEAEoE;AAEpE;;2FAE2F;AAC3F,MAAM,UAAU,eAAe,CAAC,KAAqB,EAAE,WAA2B;IAChF,IAAI,KAAK,CAAC,YAAY,KAAK,WAAW;QAAE,OAAO,IAAI,CAAC;IACpD,IAAI,KAAK,CAAC,aAAa,EAAE,MAAM,EAAE,CAAC;QAChC,OAAO,KAAK,CAAC,aAAa,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;IACnD,CAAC;IACD,OAAO,KAAK,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,KAAK,WAAW,CAAC,CAAC;AACvE,CAAC","sourcesContent":["import { z } from 'zod';\nimport { PersonalDataCategory } from '../compliance/privacy/personal-data-category.shared.schemas';\nimport { CoreResourceType } from '../resources/resources.shared.core.definitions';\nimport { RedactionType } from '../compliance/privacy/redaction.shared.schemas';\nimport { addImpersonalizeWith } from '@wildo-ai/zod-decorators';\n\n/** ──────────────────────────────────────────────────────────────\n * Lifecycle Stage — Ordered Progression with Dormancy/Reactivation Branches\n * ────────────────────────────────────────────────────────────── */\n\n/** Lifecycle stages — ordered progression with dormancy/reactivation branches */\nexport enum LifecycleStage {\n /** User has signed up but hasn't met activation criteria */\n SIGNED_UP = 'signed_up',\n /** User has met activation criteria (reached product value) */\n ACTIVATED = 'activated',\n /** User shows sustained engagement (optional — requires engagementThreshold config) */\n ENGAGED = 'engaged',\n /** User has been inactive past the dormancy threshold */\n DORMANT = 'dormant',\n /** Previously dormant user has returned */\n REACTIVATED = 'reactivated',\n /** User has churned (billing-triggered — deferred) */\n CHURNED = 'churned',\n /** User has been fully offboarded (deferred) */\n OFFBOARDED = 'offboarded',\n}\n\n/** ──────────────────────────────────────────────────────────────\n * Lifecycle Scope — Bi-Scope (same as guidance/progression)\n * ────────────────────────────────────────────────────────────── */\n\n/** Lifecycle state scope — bi-scope (same as guidance/progression) */\nexport enum LifecycleScope {\n USER = 'user',\n ORGANIZATION = 'organization',\n}\n\n/** ──────────────────────────────────────────────────────────────\n * Const Maps — State Machine, Stage Sets, Scope Mappings\n * ────────────────────────────────────────────────────────────── */\n\n/** \"Happy path\" progression weight — used ONLY for the linear happy path.\n * The lifecycle is NOT a linear progression (it branches at dormancy/reactivation).\n * `hasReachedStage()` uses stagesVisited instead — see below. */\nexport const LIFECYCLE_HAPPY_PATH_WEIGHT: Readonly<Record<LifecycleStage, number>> = {\n [LifecycleStage.SIGNED_UP]: 0,\n [LifecycleStage.ACTIVATED]: 1,\n [LifecycleStage.ENGAGED]: 2,\n [LifecycleStage.REACTIVATED]: 2, // Same weight as ENGAGED — reactivated users regain engaged-level access\n [LifecycleStage.DORMANT]: -1, // Not on happy path\n [LifecycleStage.CHURNED]: -2, // Terminal negative\n [LifecycleStage.OFFBOARDED]: -3, // Terminal negative\n} as const;\n\n/** Valid state transitions — the lifecycle state machine.\n * Key = source stage, Value = valid target stages. */\nexport const LIFECYCLE_VALID_TRANSITIONS: Readonly<Record<LifecycleStage, readonly LifecycleStage[]>> = {\n [LifecycleStage.SIGNED_UP]: [LifecycleStage.ACTIVATED],\n [LifecycleStage.ACTIVATED]: [LifecycleStage.ENGAGED, LifecycleStage.DORMANT],\n [LifecycleStage.ENGAGED]: [LifecycleStage.DORMANT],\n [LifecycleStage.DORMANT]: [LifecycleStage.REACTIVATED, LifecycleStage.CHURNED],\n [LifecycleStage.REACTIVATED]: [LifecycleStage.ENGAGED, LifecycleStage.DORMANT],\n [LifecycleStage.CHURNED]: [LifecycleStage.OFFBOARDED],\n [LifecycleStage.OFFBOARDED]: [],\n} as const;\n\n/** Stages that represent an \"active\" user (not dormant/churned/offboarded) */\nexport const LIFECYCLE_ACTIVE_STAGES = [\n LifecycleStage.SIGNED_UP,\n LifecycleStage.ACTIVATED,\n LifecycleStage.ENGAGED,\n LifecycleStage.REACTIVATED,\n] as const;\n\n/** Stages from which a user can become dormant (all active stages except SIGNED_UP) */\nexport const LIFECYCLE_DORMANCY_SOURCE_STAGES = [\n LifecycleStage.ACTIVATED,\n LifecycleStage.ENGAGED,\n LifecycleStage.REACTIVATED,\n] as const;\n\n/** Stages eligible for engagement threshold evaluation (can transition to ENGAGED) */\nexport const LIFECYCLE_ENGAGEMENT_ELIGIBLE_STAGES = [\n LifecycleStage.ACTIVATED,\n LifecycleStage.REACTIVATED,\n] as const;\n\n/** Maps LifecycleScope → corresponding CoreResourceType for lifecycle state storage */\nexport const LIFECYCLE_SCOPE_TO_RESOURCE: Readonly<Record<LifecycleScope, CoreResourceType>> = {\n [LifecycleScope.USER]: CoreResourceType.USER_LIFECYCLE_STATE,\n [LifecycleScope.ORGANIZATION]: CoreResourceType.ORGANIZATION_LIFECYCLE_STATE,\n} as const;\n\n/** Maps LifecycleScope → corresponding Progression resource type (for activation criteria eval).\n * Named to avoid collision with existing PROGRESSION_SCOPE_TO_RESOURCE in milestone-definition.shared.schemas.ts\n * (which is keyed by ProgressionScope, not LifecycleScope). */\nexport const LIFECYCLE_TO_PROGRESSION_RESOURCE: Readonly<Record<LifecycleScope, CoreResourceType>> = {\n [LifecycleScope.USER]: CoreResourceType.USER_PROGRESSION_STATE,\n [LifecycleScope.ORGANIZATION]: CoreResourceType.ORGANIZATION_PROGRESSION_STATE,\n} as const;\n\n/** Maps LifecycleScope → corresponding Guidance state resource type (for GUIDANCE_COMPLETED activation criteria). */\nexport const LIFECYCLE_TO_GUIDANCE_RESOURCE: Readonly<Record<LifecycleScope, CoreResourceType>> = {\n [LifecycleScope.USER]: CoreResourceType.USER_GUIDANCE_STATE,\n [LifecycleScope.ORGANIZATION]: CoreResourceType.ORGANIZATION_GUIDANCE_STATE,\n} as const;\n\n/** All lifecycle resource types — for conditional exclusion when lifecycle disabled\n * (same pattern as BILLING_RESOURCE_TYPES in resources.shared.core.definitions.ts) */\nexport const LIFECYCLE_RESOURCE_TYPES: ReadonlySet<CoreResourceType> = new Set([\n CoreResourceType.USER_LIFECYCLE_STATE,\n CoreResourceType.ORGANIZATION_LIFECYCLE_STATE,\n]);\n\n/** Guidance state resource types — used to detect guidance state updates for activation criteria */\nexport const GUIDANCE_STATE_RESOURCE_TYPES: ReadonlySet<CoreResourceType> = new Set([\n CoreResourceType.USER_GUIDANCE_STATE,\n CoreResourceType.ORGANIZATION_GUIDANCE_STATE,\n]);\n\n/** ──────────────────────────────────────────────────────────────\n * Utility Functions\n * ────────────────────────────────────────────────────────────── */\n\n/** Validate if a lifecycle transition is valid per the state machine. */\nexport function isValidLifecycleTransition(from: LifecycleStage, to: LifecycleStage): boolean {\n return LIFECYCLE_VALID_TRANSITIONS[from]?.includes(to) ?? false;\n}\n\n/** ──────────────────────────────────────────────────────────────\n * Zod Schemas — Lifecycle State Document\n * ────────────────────────────────────────────────────────────── */\n\n/** Record of a single stage transition */\nexport const LifecycleStageTransitionSchema = z.object({\n /** Stage that was entered */\n stage: z.enum(LifecycleStage),\n /** When this stage was entered */\n enteredAt: z.coerce.date(),\n /** When this stage was exited (undefined if current) */\n exitedAt: z.coerce.date().optional(),\n /** What triggered this transition (milestone ref, cron, operation, etc.) */\n trigger: z.string().optional(),\n});\nexport type LifecycleStageTransition = z.infer<typeof LifecycleStageTransitionSchema>;\n\n/** Engagement metrics tracked while user is ACTIVATED */\nexport const LifecycleEngagementSchema = z.object({\n /** Total operations since activation */\n operationsSinceActivation: z.number().int().default(0),\n /** Distinct active dates since activation (YYYY-MM-DD strings) */\n activeDates: z.array(z.string()).default([]),\n});\nexport type LifecycleEngagement = z.infer<typeof LifecycleEngagementSchema>;\n\n/** Shared lifecycle state payload body.\n * Scope-specific state resources extend this schema with their owning FK\n * (`userId` / `organizationId`) before persistence. */\nexport const LifecycleStateSchema = z.object({\n /** Current lifecycle stage */\n // USAGE across the block below — a lifecycle stage, its history, and an engagement score are all\n // observations the product made ABOUT this person's behaviour.\n // RESET on erasure — returns this field to its schema default. It holds the lifecycle stage this person reached,\n // which the category above correctly declares as personal data. RESET rather than REMOVE or MASK\n // because the field is non-nullable WITH a `.default()`: REMOVE needs a clearable field and MASK\n // needs a string. The value comes from the schema, so there is no second copy to drift.\n currentStage: addImpersonalizeWith(\n z.enum(LifecycleStage).default(LifecycleStage.SIGNED_UP).isSummaryField()\n .dataCategories(PersonalDataCategory.USAGE),\n RedactionType.RESET,\n ),\n /** When the current stage was entered. `.default(now)` so the row is\n * eager-seedable via onParentCreate (the evaluator still supplies it explicitly). */\n stageEnteredAt: z.coerce.date().default(() => new Date()),\n /** History of stage transitions (most recent first, capped at last 20) */\n // RESET on erasure — returns this field to its schema default. It holds the transition history — when they moved between stages,\n // which the category above correctly declares as personal data. RESET rather than REMOVE or MASK\n // because the field is non-nullable WITH a `.default()`: REMOVE needs a clearable field and MASK\n // needs a string. The value comes from the schema, so there is no second copy to drift.\n stageHistory: addImpersonalizeWith(\n z.array(LifecycleStageTransitionSchema).default([]).dataCategories(PersonalDataCategory.USAGE),\n RedactionType.RESET,\n ),\n /** Deduplicated set of all stages ever visited (survives stageHistory cap).\n * Used by `hasReachedStage()` for reliable stage visitation checks. */\n stagesVisited: z.array(z.enum(LifecycleStage)).default([]),\n /** Last activity timestamp (updated on operations, debounced ~30 min).\n * `.default(now)` so the row is eager-seedable via onParentCreate. */\n // NO treatment, deliberately — and this is a CHOICE the RESET guard forced rather than an omission.\n //\n // This field's default reads the clock (`.default(() => new Date())`, so a row is eager-seedable via\n // onParentCreate). RESET would therefore write a value generated BY the erasure, recording the erased\n // person as active at the moment they were erased — fabricating information rather than removing it.\n // The guard refuses that outright.\n //\n // Of its two suggested remedies, neither is right here. A static `new Date(0)` default would change\n // what every LIVE row means, not just erased ones — the lifecycle evaluator reads this to decide\n // engagement, so a new member would read as inactive since 1970. Making it nullable + REMOVE pushes\n // an `undefined` onto every consumer of a field that has always held a value.\n //\n // So the timestamp is RETAINED, and the notice can say so plainly. The mode is satisfied by\n // `currentStage` and `stageHistory`, which carry the behavioural detail; a bare timestamp attached to\n // a subject whose identity row has been scrubbed discloses very little on its own.\n lastActiveAt: z.coerce.date().default(() => new Date()).dataCategories(PersonalDataCategory.USAGE),\n /** Which activation criteria have been met (keyed by criterion ref) */\n activationCriteriaMet: z.record(z.string(), z.boolean()).default({}),\n /** Engagement metrics (tracked while ACTIVATED, used for ENGAGED transition) */\n engagement: LifecycleEngagementSchema.default({\n operationsSinceActivation: 0,\n activeDates: [],\n }),\n});\nexport type LifecycleState = z.infer<typeof LifecycleStateSchema>;\n\nexport const UserLifecycleStateSchema = LifecycleStateSchema.extend({\n // `.isUnique()` = idempotency backstop for onParentCreate seeding (one row per user;\n // the evaluator's read-then-create already tolerates the unique conflict).\n userId: z.string().min(1).isDBIndexed().isUnique().isForeignKey().isSummaryField().excludeFromUpdate(),\n});\nexport type UserLifecycleState = z.infer<typeof UserLifecycleStateSchema>;\n\nexport const OrganizationLifecycleStateSchema = LifecycleStateSchema.extend({\n // `.isUnique()` = idempotency backstop for onParentCreate seeding (one row per org).\n organizationId: z.string().min(1).isDBIndexed().isUnique().isForeignKey().isSummaryField().excludeFromUpdate(),\n});\nexport type OrganizationLifecycleState = z.infer<typeof OrganizationLifecycleStateSchema>;\n\nexport type PersistedLifecycleState = UserLifecycleState | OrganizationLifecycleState;\n\n/** ──────────────────────────────────────────────────────────────\n * Stage History Utility\n * ────────────────────────────────────────────────────────────── */\n\n/** Check if the user has ACTUALLY visited a given stage (not a linear comparison).\n * Uses `stagesVisited` for reliable lookups that survive the stageHistory cap.\n * Falls back to `stageHistory` for documents created before `stagesVisited` was added. */\nexport function hasReachedStage(state: LifecycleState, targetStage: LifecycleStage): boolean {\n if (state.currentStage === targetStage) return true;\n if (state.stagesVisited?.length) {\n return state.stagesVisited.includes(targetStage);\n }\n return state.stageHistory.some(entry => entry.stage === targetStage);\n}\n"]}
1
+ {"version":3,"file":"lifecycle-state.shared.schemas.js","sourceRoot":"","sources":["../../../../src/guidance/lifecycle-state.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,oBAAoB,EAAE,MAAM,6DAA6D,CAAC;AACnG,OAAO,EAAE,gBAAgB,EAAE,MAAM,gDAAgD,CAAC;AAClF,OAAO,EAAE,aAAa,EAAE,MAAM,gDAAgD,CAAC;AAC/E,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEhE;;oEAEoE;AAEpE,iFAAiF;AACjF,MAAM,CAAN,IAAY,cAeX;AAfD,WAAY,cAAc;IACxB,4DAA4D;IAC5D,yCAAuB,CAAA;IACvB,+DAA+D;IAC/D,yCAAuB,CAAA;IACvB,uFAAuF;IACvF,qCAAmB,CAAA;IACnB,yDAAyD;IACzD,qCAAmB,CAAA;IACnB,2CAA2C;IAC3C,6CAA2B,CAAA;IAC3B,sDAAsD;IACtD,qCAAmB,CAAA;IACnB,gDAAgD;IAChD,2CAAyB,CAAA;AAC3B,CAAC,EAfW,cAAc,KAAd,cAAc,QAezB;AAED;;oEAEoE;AAEpE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EAAE;CAC/G,CAAC,CAAC;AAKH;;oEAEoE;AAEpE;;2FAE2F;AAC3F,MAAM,UAAU,eAAe,CAAC,KAAqB,EAAE,WAA2B;IAChF,IAAI,KAAK,CAAC,YAAY,KAAK,WAAW;QAAE,OAAO,IAAI,CAAC;IACpD,IAAI,KAAK,CAAC,aAAa,EAAE,MAAM,EAAE,CAAC;QAChC,OAAO,KAAK,CAAC,aAAa,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;IACnD,CAAC;IACD,OAAO,KAAK,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,KAAK,WAAW,CAAC,CAAC;AACvE,CAAC","sourcesContent":["import { z } from 'zod';\nimport { PersonalDataCategory } from '../compliance/privacy/personal-data-category.shared.schemas';\nimport { CoreResourceType } from '../resources/resources.shared.core.definitions';\nimport { RedactionType } from '../compliance/privacy/redaction.shared.schemas';\nimport { addImpersonalizeWith } from '@wildo-ai/zod-decorators';\n\n/** ──────────────────────────────────────────────────────────────\n * Lifecycle Stage — Ordered Progression with Dormancy/Reactivation Branches\n * ────────────────────────────────────────────────────────────── */\n\n/** Lifecycle stages — ordered progression with dormancy/reactivation branches */\nexport enum LifecycleStage {\n /** User has signed up but hasn't met activation criteria */\n SIGNED_UP = 'signed_up',\n /** User has met activation criteria (reached product value) */\n ACTIVATED = 'activated',\n /** User shows sustained engagement (optional — requires engagementThreshold config) */\n ENGAGED = 'engaged',\n /** User has been inactive past the dormancy threshold */\n DORMANT = 'dormant',\n /** Previously dormant user has returned */\n REACTIVATED = 'reactivated',\n /** User has churned (billing-triggered — deferred) */\n CHURNED = 'churned',\n /** User has been fully offboarded (deferred) */\n OFFBOARDED = 'offboarded',\n}\n\n/** ──────────────────────────────────────────────────────────────\n * Lifecycle Scope — Bi-Scope (same as guidance/progression)\n * ────────────────────────────────────────────────────────────── */\n\n/** Lifecycle state scope — bi-scope (same as guidance/progression) */\nexport enum LifecycleScope {\n USER = 'user',\n ORGANIZATION = 'organization',\n}\n\n/** ──────────────────────────────────────────────────────────────\n * Const Maps — State Machine, Stage Sets, Scope Mappings\n * ────────────────────────────────────────────────────────────── */\n\n/** Valid state transitions — the lifecycle state machine.\n * Key = source stage, Value = valid target stages. */\nexport const LIFECYCLE_VALID_TRANSITIONS: Readonly<Record<LifecycleStage, readonly LifecycleStage[]>> = {\n [LifecycleStage.SIGNED_UP]: [LifecycleStage.ACTIVATED],\n [LifecycleStage.ACTIVATED]: [LifecycleStage.ENGAGED, LifecycleStage.DORMANT],\n [LifecycleStage.ENGAGED]: [LifecycleStage.DORMANT],\n [LifecycleStage.DORMANT]: [LifecycleStage.REACTIVATED, LifecycleStage.CHURNED],\n [LifecycleStage.REACTIVATED]: [LifecycleStage.ENGAGED, LifecycleStage.DORMANT],\n [LifecycleStage.CHURNED]: [LifecycleStage.OFFBOARDED],\n [LifecycleStage.OFFBOARDED]: [],\n} as const;\n\n/** Stages from which a user can become dormant (all active stages except SIGNED_UP) */\nexport const LIFECYCLE_DORMANCY_SOURCE_STAGES = [\n LifecycleStage.ACTIVATED,\n LifecycleStage.ENGAGED,\n LifecycleStage.REACTIVATED,\n] as const;\n\n/** Stages eligible for engagement threshold evaluation (can transition to ENGAGED) */\nexport const LIFECYCLE_ENGAGEMENT_ELIGIBLE_STAGES = [\n LifecycleStage.ACTIVATED,\n LifecycleStage.REACTIVATED,\n] as const;\n\n/** Maps LifecycleScope → corresponding CoreResourceType for lifecycle state storage */\nexport const LIFECYCLE_SCOPE_TO_RESOURCE: Readonly<Record<LifecycleScope, CoreResourceType>> = {\n [LifecycleScope.USER]: CoreResourceType.USER_LIFECYCLE_STATE,\n [LifecycleScope.ORGANIZATION]: CoreResourceType.ORGANIZATION_LIFECYCLE_STATE,\n} as const;\n\n/** Maps LifecycleScope → corresponding Progression resource type (for activation criteria eval).\n * Named to avoid collision with existing PROGRESSION_SCOPE_TO_RESOURCE in milestone-definition.shared.schemas.ts\n * (which is keyed by ProgressionScope, not LifecycleScope). */\nexport const LIFECYCLE_TO_PROGRESSION_RESOURCE: Readonly<Record<LifecycleScope, CoreResourceType>> = {\n [LifecycleScope.USER]: CoreResourceType.USER_PROGRESSION_STATE,\n [LifecycleScope.ORGANIZATION]: CoreResourceType.ORGANIZATION_PROGRESSION_STATE,\n} as const;\n\n/** Maps LifecycleScope → corresponding Guidance state resource type (for GUIDANCE_COMPLETED activation criteria). */\nexport const LIFECYCLE_TO_GUIDANCE_RESOURCE: Readonly<Record<LifecycleScope, CoreResourceType>> = {\n [LifecycleScope.USER]: CoreResourceType.USER_GUIDANCE_STATE,\n [LifecycleScope.ORGANIZATION]: CoreResourceType.ORGANIZATION_GUIDANCE_STATE,\n} as const;\n\n/** All lifecycle resource types — for conditional exclusion when lifecycle disabled\n * (same pattern as BILLING_RESOURCE_TYPES in resources.shared.core.definitions.ts) */\nexport const LIFECYCLE_RESOURCE_TYPES: ReadonlySet<CoreResourceType> = new Set([\n CoreResourceType.USER_LIFECYCLE_STATE,\n CoreResourceType.ORGANIZATION_LIFECYCLE_STATE,\n]);\n\n/** Guidance state resource types — used to detect guidance state updates for activation criteria */\nexport const GUIDANCE_STATE_RESOURCE_TYPES: ReadonlySet<CoreResourceType> = new Set([\n CoreResourceType.USER_GUIDANCE_STATE,\n CoreResourceType.ORGANIZATION_GUIDANCE_STATE,\n]);\n\n/** ──────────────────────────────────────────────────────────────\n * Utility Functions\n * ────────────────────────────────────────────────────────────── */\n\n/** Validate if a lifecycle transition is valid per the state machine. */\nexport function isValidLifecycleTransition(from: LifecycleStage, to: LifecycleStage): boolean {\n return LIFECYCLE_VALID_TRANSITIONS[from]?.includes(to) ?? false;\n}\n\n/** ──────────────────────────────────────────────────────────────\n * Zod Schemas — Lifecycle State Document\n * ────────────────────────────────────────────────────────────── */\n\n/** Record of a single stage transition */\nexport const LifecycleStageTransitionSchema = z.object({\n /** Stage that was entered */\n stage: z.enum(LifecycleStage),\n /** When this stage was entered */\n enteredAt: z.coerce.date(),\n /** When this stage was exited (undefined if current) */\n exitedAt: z.coerce.date().optional(),\n /** What triggered this transition (milestone ref, cron, operation, etc.) */\n trigger: z.string().optional(),\n});\nexport type LifecycleStageTransition = z.infer<typeof LifecycleStageTransitionSchema>;\n\n/** Engagement metrics tracked while user is ACTIVATED */\nexport const LifecycleEngagementSchema = z.object({\n /** Total operations since activation */\n operationsSinceActivation: z.number().int().default(0),\n /** Distinct active dates since activation (YYYY-MM-DD strings) */\n activeDates: z.array(z.string()).default([]),\n});\nexport type LifecycleEngagement = z.infer<typeof LifecycleEngagementSchema>;\n\n/** Shared lifecycle state payload body.\n * Scope-specific state resources extend this schema with their owning FK\n * (`userId` / `organizationId`) before persistence. */\nexport const LifecycleStateSchema = z.object({\n /** Current lifecycle stage */\n // USAGE across the block below — a lifecycle stage, its history, and an engagement score are all\n // observations the product made ABOUT this person's behaviour.\n // RESET on erasure — returns this field to its schema default. It holds the lifecycle stage this person reached,\n // which the category above correctly declares as personal data. RESET rather than REMOVE or MASK\n // because the field is non-nullable WITH a `.default()`: REMOVE needs a clearable field and MASK\n // needs a string. The value comes from the schema, so there is no second copy to drift.\n currentStage: addImpersonalizeWith(\n z.enum(LifecycleStage).default(LifecycleStage.SIGNED_UP).isSummaryField()\n .dataCategories(PersonalDataCategory.USAGE),\n RedactionType.RESET,\n ),\n /** When the current stage was entered. `.default(now)` so the row is\n * eager-seedable via onParentCreate (the evaluator still supplies it explicitly). */\n stageEnteredAt: z.coerce.date().default(() => new Date()),\n /** History of stage transitions (most recent first, capped at last 20) */\n // RESET on erasure — returns this field to its schema default. It holds the transition history — when they moved between stages,\n // which the category above correctly declares as personal data. RESET rather than REMOVE or MASK\n // because the field is non-nullable WITH a `.default()`: REMOVE needs a clearable field and MASK\n // needs a string. The value comes from the schema, so there is no second copy to drift.\n stageHistory: addImpersonalizeWith(\n z.array(LifecycleStageTransitionSchema).default([]).dataCategories(PersonalDataCategory.USAGE),\n RedactionType.RESET,\n ),\n /** Deduplicated set of all stages ever visited (survives stageHistory cap).\n * Used by `hasReachedStage()` for reliable stage visitation checks. */\n stagesVisited: z.array(z.enum(LifecycleStage)).default([]),\n /** Last activity timestamp (updated on operations, debounced ~30 min).\n * `.default(now)` so the row is eager-seedable via onParentCreate. */\n // NO treatment, deliberately — and this is a CHOICE the RESET guard forced rather than an omission.\n //\n // This field's default reads the clock (`.default(() => new Date())`, so a row is eager-seedable via\n // onParentCreate). RESET would therefore write a value generated BY the erasure, recording the erased\n // person as active at the moment they were erased — fabricating information rather than removing it.\n // The guard refuses that outright.\n //\n // Of its two suggested remedies, neither is right here. A static `new Date(0)` default would change\n // what every LIVE row means, not just erased ones — the lifecycle evaluator reads this to decide\n // engagement, so a new member would read as inactive since 1970. Making it nullable + REMOVE pushes\n // an `undefined` onto every consumer of a field that has always held a value.\n //\n // So the timestamp is RETAINED, and the notice can say so plainly. The mode is satisfied by\n // `currentStage` and `stageHistory`, which carry the behavioural detail; a bare timestamp attached to\n // a subject whose identity row has been scrubbed discloses very little on its own.\n lastActiveAt: z.coerce.date().default(() => new Date()).dataCategories(PersonalDataCategory.USAGE),\n /** Which activation criteria have been met (keyed by criterion ref) */\n activationCriteriaMet: z.record(z.string(), z.boolean()).default({}),\n /** Engagement metrics (tracked while ACTIVATED, used for ENGAGED transition) */\n engagement: LifecycleEngagementSchema.default({\n operationsSinceActivation: 0,\n activeDates: [],\n }),\n});\nexport type LifecycleState = z.infer<typeof LifecycleStateSchema>;\n\nexport const UserLifecycleStateSchema = LifecycleStateSchema.extend({\n // `.isUnique()` = idempotency backstop for onParentCreate seeding (one row per user;\n // the evaluator's read-then-create already tolerates the unique conflict).\n userId: z.string().min(1).isDBIndexed().isUnique().isForeignKey().isSummaryField().excludeFromUpdate(),\n});\nexport type UserLifecycleState = z.infer<typeof UserLifecycleStateSchema>;\n\nexport const OrganizationLifecycleStateSchema = LifecycleStateSchema.extend({\n // `.isUnique()` = idempotency backstop for onParentCreate seeding (one row per org).\n organizationId: z.string().min(1).isDBIndexed().isUnique().isForeignKey().isSummaryField().excludeFromUpdate(),\n});\nexport type OrganizationLifecycleState = z.infer<typeof OrganizationLifecycleStateSchema>;\n\nexport type PersistedLifecycleState = UserLifecycleState | OrganizationLifecycleState;\n\n/** ──────────────────────────────────────────────────────────────\n * Stage History Utility\n * ────────────────────────────────────────────────────────────── */\n\n/** Check if the user has ACTUALLY visited a given stage (not a linear comparison).\n * Uses `stagesVisited` for reliable lookups that survive the stageHistory cap.\n * Falls back to `stageHistory` for documents created before `stagesVisited` was added. */\nexport function hasReachedStage(state: LifecycleState, targetStage: LifecycleStage): boolean {\n if (state.currentStage === targetStage) return true;\n if (state.stagesVisited?.length) {\n return state.stagesVisited.includes(targetStage);\n }\n return state.stageHistory.some(entry => entry.stage === targetStage);\n}\n"]}
@@ -1,5 +1,6 @@
1
1
  import { MilestoneType, MilestoneRewardType, ProgressionScope } from './milestone-definition.shared.schemas';
2
2
  import type { MilestoneDefinition, MilestoneReward, MilestoneTrigger, MilestoneLifecycleTransition } from './milestone-definition.shared.schemas';
3
+ /** @wildo_source:part:start saas.models.milestone-definition */
3
4
  /**
4
5
  * defineMilestone() — Milestone Builder
5
6
  *
@@ -10,7 +11,7 @@ import type { MilestoneDefinition, MilestoneReward, MilestoneTrigger, MilestoneL
10
11
  * defineMilestone('FIRST_PROJECT_CREATED', {
11
12
  * type: MilestoneType.FIRST_TIME,
12
13
  * trigger: { resourceType: 'PROJECTS', operation: CoreResourceOperation.CREATE },
13
- * reward: { type: MilestoneRewardType.CELEBRATION, celebrationLevel: 'high' },
14
+ * reward: { type: MilestoneRewardType.CELEBRATION, celebrationLevel: MilestoneCelebrationLevel.HIGH },
14
15
  * category: 'getting-started',
15
16
  * points: 10,
16
17
  * labels: { description: true },
@@ -22,7 +23,7 @@ import type { MilestoneDefinition, MilestoneReward, MilestoneTrigger, MilestoneL
22
23
  * scope: ProgressionScope.ORGANIZATION,
23
24
  * trigger: { resourceType: 'PROJECTS', operation: CoreResourceOperation.CREATE },
24
25
  * threshold: 100,
25
- * reward: { type: MilestoneRewardType.CELEBRATION, celebrationLevel: 'high' },
26
+ * reward: { type: MilestoneRewardType.CELEBRATION, celebrationLevel: MilestoneCelebrationLevel.HIGH },
26
27
  * category: 'team-achievements',
27
28
  * points: 50,
28
29
  * })
@@ -44,6 +45,7 @@ export declare function defineMilestone(identifier: string, options: {
44
45
  lifecycleTransition?: MilestoneLifecycleTransition;
45
46
  dependencies?: string[];
46
47
  }): MilestoneDefinition;
48
+ /** @wildo_source:part:end saas.models.milestone-definition */
47
49
  export { MilestoneType, MilestoneRewardType, ProgressionScope };
48
50
  export type { MilestoneDefinition, MilestoneReward, MilestoneTrigger, MilestoneLifecycleTransition };
49
51
  //# sourceMappingURL=milestone-builders.shared.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"milestone-builders.shared.d.ts","sourceRoot":"","sources":["../../../src/guidance/milestone-builders.shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AAC7G,OAAO,KAAK,EAAE,mBAAmB,EAAE,eAAe,EAAE,gBAAgB,EAAE,4BAA4B,EAAE,MAAM,uCAAuC,CAAC;AAElJ;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,eAAe,CAC7B,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE;IACP,IAAI,EAAE,aAAa,CAAC;IACpB;0FACsF;IACtF,KAAK,CAAC,EAAE,gBAAgB,CAAC;IACzB,OAAO,EAAE,gBAAgB,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,eAAe,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE;QAAE,WAAW,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;IACnC,mBAAmB,CAAC,EAAE,4BAA4B,CAAC;IACnD,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;CACzB,GACA,mBAAmB,CAerB;AAGD,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,CAAC;AAChE,YAAY,EAAE,mBAAmB,EAAE,eAAe,EAAE,gBAAgB,EAAE,4BAA4B,EAAE,CAAC"}
1
+ {"version":3,"file":"milestone-builders.shared.d.ts","sourceRoot":"","sources":["../../../../src/guidance/milestone-builders.shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AAC7G,OAAO,KAAK,EAAE,mBAAmB,EAAE,eAAe,EAAE,gBAAgB,EAAE,4BAA4B,EAAE,MAAM,uCAAuC,CAAC;AAElJ,gEAAgE;AAChE;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,eAAe,CAC7B,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE;IACP,IAAI,EAAE,aAAa,CAAC;IACpB;0FACsF;IACtF,KAAK,CAAC,EAAE,gBAAgB,CAAC;IACzB,OAAO,EAAE,gBAAgB,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,eAAe,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE;QAAE,WAAW,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;IACnC,mBAAmB,CAAC,EAAE,4BAA4B,CAAC;IACnD,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;CACzB,GACA,mBAAmB,CAerB;AACD,8DAA8D;AAG9D,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,CAAC;AAChE,YAAY,EAAE,mBAAmB,EAAE,eAAe,EAAE,gBAAgB,EAAE,4BAA4B,EAAE,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import { MilestoneType, MilestoneRewardType, ProgressionScope } from './milestone-definition.shared.schemas.js';
2
+ /** @wildo_source:part:start saas.models.milestone-definition */
2
3
  /**
3
4
  * defineMilestone() — Milestone Builder
4
5
  *
@@ -9,7 +10,7 @@ import { MilestoneType, MilestoneRewardType, ProgressionScope } from './mileston
9
10
  * defineMilestone('FIRST_PROJECT_CREATED', {
10
11
  * type: MilestoneType.FIRST_TIME,
11
12
  * trigger: { resourceType: 'PROJECTS', operation: CoreResourceOperation.CREATE },
12
- * reward: { type: MilestoneRewardType.CELEBRATION, celebrationLevel: 'high' },
13
+ * reward: { type: MilestoneRewardType.CELEBRATION, celebrationLevel: MilestoneCelebrationLevel.HIGH },
13
14
  * category: 'getting-started',
14
15
  * points: 10,
15
16
  * labels: { description: true },
@@ -21,7 +22,7 @@ import { MilestoneType, MilestoneRewardType, ProgressionScope } from './mileston
21
22
  * scope: ProgressionScope.ORGANIZATION,
22
23
  * trigger: { resourceType: 'PROJECTS', operation: CoreResourceOperation.CREATE },
23
24
  * threshold: 100,
24
- * reward: { type: MilestoneRewardType.CELEBRATION, celebrationLevel: 'high' },
25
+ * reward: { type: MilestoneRewardType.CELEBRATION, celebrationLevel: MilestoneCelebrationLevel.HIGH },
25
26
  * category: 'team-achievements',
26
27
  * points: 50,
27
28
  * })
@@ -42,6 +43,7 @@ export function defineMilestone(identifier, options) {
42
43
  dependencies: options.dependencies ?? [],
43
44
  };
44
45
  }
46
+ /** @wildo_source:part:end saas.models.milestone-definition */
45
47
  // Re-export types and enums for convenience from a single import point
46
48
  export { MilestoneType, MilestoneRewardType, ProgressionScope };
47
49
  //# sourceMappingURL=milestone-builders.shared.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"milestone-builders.shared.js","sourceRoot":"","sources":["../../../../src/guidance/milestone-builders.shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AAG7G;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,UAAU,eAAe,CAC7B,UAAkB,EAClB,OAcC;IAED,OAAO;QACL,UAAU;QACV,IAAI,EAAE,OAAO,CAAC,IAAI;QAClB,KAAK,EAAE,OAAO,CAAC,KAAK,IAAI,gBAAgB,CAAC,IAAI;QAC7C,OAAO,EAAE,OAAO,CAAC,OAAO;QACxB,SAAS,EAAE,OAAO,CAAC,SAAS;QAC5B,YAAY,EAAE,OAAO,CAAC,YAAY;QAClC,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,QAAQ,EAAE,OAAO,CAAC,QAAQ;QAC1B,MAAM,EAAE,OAAO,CAAC,MAAM,IAAI,CAAC;QAC3B,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,mBAAmB,EAAE,OAAO,CAAC,mBAAmB;QAChD,YAAY,EAAE,OAAO,CAAC,YAAY,IAAI,EAAE;KACzC,CAAC;AACJ,CAAC;AAED,uEAAuE;AACvE,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,CAAC","sourcesContent":["import { MilestoneType, MilestoneRewardType, ProgressionScope } from './milestone-definition.shared.schemas';\nimport type { MilestoneDefinition, MilestoneReward, MilestoneTrigger, MilestoneLifecycleTransition } from './milestone-definition.shared.schemas';\n\n/**\n * defineMilestone() — Milestone Builder\n * \n * Creates a MilestoneDefinition with sensible defaults.\n * Follows the same pattern as defineFeature() / defineLimitFeature().\n * \n * @example // Personal milestone (scope defaults to USER)\n * defineMilestone('FIRST_PROJECT_CREATED', {\n * type: MilestoneType.FIRST_TIME,\n * trigger: { resourceType: 'PROJECTS', operation: CoreResourceOperation.CREATE },\n * reward: { type: MilestoneRewardType.CELEBRATION, celebrationLevel: 'high' },\n * category: 'getting-started',\n * points: 10,\n * labels: { description: true },\n * })\n * \n * @example // Org-wide milestone — any member creating the 100th project triggers it\n * defineMilestone('ORG_100_PROJECTS', {\n * type: MilestoneType.COUNT_THRESHOLD,\n * scope: ProgressionScope.ORGANIZATION,\n * trigger: { resourceType: 'PROJECTS', operation: CoreResourceOperation.CREATE },\n * threshold: 100,\n * reward: { type: MilestoneRewardType.CELEBRATION, celebrationLevel: 'high' },\n * category: 'team-achievements',\n * points: 50,\n * })\n */\nexport function defineMilestone(\n identifier: string,\n options: {\n type: MilestoneType;\n /** Scope of this milestone — defaults to USER if omitted.\n * ORGANIZATION milestones track collective achievements (any member can trigger). */\n scope?: ProgressionScope;\n trigger: MilestoneTrigger;\n threshold?: number;\n conditionRef?: string;\n reward: MilestoneReward;\n category: string;\n points?: number;\n labels?: { description?: boolean };\n lifecycleTransition?: MilestoneLifecycleTransition;\n dependencies?: string[];\n }\n): MilestoneDefinition {\n return {\n identifier,\n type: options.type,\n scope: options.scope ?? ProgressionScope.USER,\n trigger: options.trigger,\n threshold: options.threshold,\n conditionRef: options.conditionRef,\n reward: options.reward,\n category: options.category,\n points: options.points ?? 0,\n labels: options.labels,\n lifecycleTransition: options.lifecycleTransition,\n dependencies: options.dependencies ?? [],\n };\n}\n\n// Re-export types and enums for convenience from a single import point\nexport { MilestoneType, MilestoneRewardType, ProgressionScope };\nexport type { MilestoneDefinition, MilestoneReward, MilestoneTrigger, MilestoneLifecycleTransition };\n"]}
1
+ {"version":3,"file":"milestone-builders.shared.js","sourceRoot":"","sources":["../../../../src/guidance/milestone-builders.shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AAG7G,gEAAgE;AAChE;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,UAAU,eAAe,CAC7B,UAAkB,EAClB,OAcC;IAED,OAAO;QACL,UAAU;QACV,IAAI,EAAE,OAAO,CAAC,IAAI;QAClB,KAAK,EAAE,OAAO,CAAC,KAAK,IAAI,gBAAgB,CAAC,IAAI;QAC7C,OAAO,EAAE,OAAO,CAAC,OAAO;QACxB,SAAS,EAAE,OAAO,CAAC,SAAS;QAC5B,YAAY,EAAE,OAAO,CAAC,YAAY;QAClC,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,QAAQ,EAAE,OAAO,CAAC,QAAQ;QAC1B,MAAM,EAAE,OAAO,CAAC,MAAM,IAAI,CAAC;QAC3B,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,mBAAmB,EAAE,OAAO,CAAC,mBAAmB;QAChD,YAAY,EAAE,OAAO,CAAC,YAAY,IAAI,EAAE;KACzC,CAAC;AACJ,CAAC;AACD,8DAA8D;AAE9D,uEAAuE;AACvE,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,CAAC","sourcesContent":["import { MilestoneType, MilestoneRewardType, ProgressionScope } from './milestone-definition.shared.schemas';\nimport type { MilestoneDefinition, MilestoneReward, MilestoneTrigger, MilestoneLifecycleTransition } from './milestone-definition.shared.schemas';\n\n/** @wildo_source:part:start saas.models.milestone-definition */\n/**\n * defineMilestone() — Milestone Builder\n * \n * Creates a MilestoneDefinition with sensible defaults.\n * Follows the same pattern as defineFeature() / defineLimitFeature().\n * \n * @example // Personal milestone (scope defaults to USER)\n * defineMilestone('FIRST_PROJECT_CREATED', {\n * type: MilestoneType.FIRST_TIME,\n * trigger: { resourceType: 'PROJECTS', operation: CoreResourceOperation.CREATE },\n * reward: { type: MilestoneRewardType.CELEBRATION, celebrationLevel: MilestoneCelebrationLevel.HIGH },\n * category: 'getting-started',\n * points: 10,\n * labels: { description: true },\n * })\n * \n * @example // Org-wide milestone — any member creating the 100th project triggers it\n * defineMilestone('ORG_100_PROJECTS', {\n * type: MilestoneType.COUNT_THRESHOLD,\n * scope: ProgressionScope.ORGANIZATION,\n * trigger: { resourceType: 'PROJECTS', operation: CoreResourceOperation.CREATE },\n * threshold: 100,\n * reward: { type: MilestoneRewardType.CELEBRATION, celebrationLevel: MilestoneCelebrationLevel.HIGH },\n * category: 'team-achievements',\n * points: 50,\n * })\n */\nexport function defineMilestone(\n identifier: string,\n options: {\n type: MilestoneType;\n /** Scope of this milestone — defaults to USER if omitted.\n * ORGANIZATION milestones track collective achievements (any member can trigger). */\n scope?: ProgressionScope;\n trigger: MilestoneTrigger;\n threshold?: number;\n conditionRef?: string;\n reward: MilestoneReward;\n category: string;\n points?: number;\n labels?: { description?: boolean };\n lifecycleTransition?: MilestoneLifecycleTransition;\n dependencies?: string[];\n }\n): MilestoneDefinition {\n return {\n identifier,\n type: options.type,\n scope: options.scope ?? ProgressionScope.USER,\n trigger: options.trigger,\n threshold: options.threshold,\n conditionRef: options.conditionRef,\n reward: options.reward,\n category: options.category,\n points: options.points ?? 0,\n labels: options.labels,\n lifecycleTransition: options.lifecycleTransition,\n dependencies: options.dependencies ?? [],\n };\n}\n/** @wildo_source:part:end saas.models.milestone-definition */\n\n// Re-export types and enums for convenience from a single import point\nexport { MilestoneType, MilestoneRewardType, ProgressionScope };\nexport type { MilestoneDefinition, MilestoneReward, MilestoneTrigger, MilestoneLifecycleTransition };\n"]}
@@ -1,8 +1,18 @@
1
+ import { CelebrationDisplayMode } from '../notifications/notifications.shared.schemas';
1
2
  import { CoreResourceOperation } from '../resources/resources.shared.core.definitions';
2
3
  import { CoreResourceType } from '../resources/resources.shared.core.definitions';
4
+ import { LifecycleStage } from './lifecycle-state.shared.schemas';
3
5
  /** ──────────────────────────────────────────────────────────────
4
6
  * Milestone Type — Condition Evaluation Strategy
5
7
  * ────────────────────────────────────────────────────────────── */
8
+ /**
9
+ * @wildo_source:part:start saas.models.milestone-definition facet:layer:shared facet:family:progression facet:audience:app-developer
10
+ *
11
+ * A milestone is a moment in a person's (or an organization's) use of the application that the
12
+ * application wants to recognise: the first project created, the tenth todo completed. Declare them
13
+ * in `shared-lib/src/engine/milestones.ts`; the framework counts the triggering operations, marks a
14
+ * milestone achieved, awards its points and delivers its reward. Import from `@wildo-ai/saas-models`.
15
+ */
6
16
  export declare enum MilestoneType {
7
17
  /** Achieved on first occurrence of the trigger operation */
8
18
  FIRST_TIME = "first_time",
@@ -32,26 +42,77 @@ export declare enum ProgressionScope {
32
42
  * (e.g., "Team reached 50 members", "First integration configured") */
33
43
  ORGANIZATION = "organization"
34
44
  }
45
+ /** @wildo_source:part:end saas.models.milestone-definition */
35
46
  /** Maps ProgressionScope to the CoreResourceType that stores its state */
36
47
  export declare const PROGRESSION_SCOPE_TO_RESOURCE: Record<ProgressionScope, CoreResourceType>;
37
48
  /** ──────────────────────────────────────────────────────────────
38
49
  * Milestone Lifecycle Transition — Phase 5 Integration Point
39
50
  * ────────────────────────────────────────────────────────────── */
51
+ /** @wildo_source:part:start saas.models.milestone-definition */
52
+ /**
53
+ * The lifecycle stage change a milestone triggers when it is achieved — for example moving a person
54
+ * from `LifecycleStage.SIGNED_UP` to `LifecycleStage.ACTIVATED` when they create their first project.
55
+ *
56
+ * Use the `LifecycleStage` enum values, not their names. When the application's lifecycle config
57
+ * declares no `activationCriteria`, a milestone transition is how activation happens at all.
58
+ */
40
59
  export interface MilestoneLifecycleTransition {
41
- from: string;
42
- to: string;
60
+ from: LifecycleStage;
61
+ to: LifecycleStage;
43
62
  }
63
+ /** @wildo_source:part:end saas.models.milestone-definition */
44
64
  /** ──────────────────────────────────────────────────────────────
45
65
  * Milestone Reward Definition
46
66
  * ────────────────────────────────────────────────────────────── */
67
+ /**
68
+ * @wildo_source:part:start saas.models.milestone-celebration facet:layer:shared facet:family:progression facet:audience:app-developer
69
+ *
70
+ * How much of a moment a milestone is — NOT how it is drawn.
71
+ *
72
+ * Presentation is a separate choice, `celebrationMode` (a `CelebrationDisplayMode`), so that a
73
+ * milestone can be significant without having to accept a particular animation. Leave the mode out
74
+ * and the level picks one through `DEFAULT_CELEBRATION_MODE_BY_LEVEL`.
75
+ */
76
+ export declare enum MilestoneCelebrationLevel {
77
+ LOW = "low",
78
+ MEDIUM = "medium",
79
+ HIGH = "high"
80
+ }
81
+ /**
82
+ * The display mode each level gets when a milestone does not name one — the framework's default,
83
+ * readable so an application knows what it is opting out of when it sets `celebrationMode`.
84
+ */
85
+ export declare const DEFAULT_CELEBRATION_MODE_BY_LEVEL: Record<MilestoneCelebrationLevel, CelebrationDisplayMode>;
86
+ /**
87
+ * How a celebration is drawn, in order: the milestone's own `celebrationMode`; else the default for
88
+ * its `celebrationLevel`; else `CONFETTI`, the quietest presentation, for a reward that says neither.
89
+ */
90
+ export declare function resolveCelebrationDisplayMode(reward: {
91
+ readonly celebrationLevel?: MilestoneCelebrationLevel;
92
+ readonly celebrationMode?: CelebrationDisplayMode;
93
+ }): CelebrationDisplayMode;
94
+ /** @wildo_source:part:end saas.models.milestone-celebration */
95
+ /** @wildo_source:part:start saas.models.milestone-definition */
96
+ /**
97
+ * What a person gets when the milestone is achieved. `type` picks which of the other fields apply:
98
+ * `CELEBRATION` reads `celebrationLevel` / `celebrationMode`, `FEATURE_UNLOCK` reads `featureRef`,
99
+ * `GUIDANCE_FLOW` reads `guidanceFlowRef`.
100
+ */
47
101
  export interface MilestoneReward {
48
102
  type: MilestoneRewardType;
49
103
  /** For FEATURE_UNLOCK: the feature identifier to enable */
50
104
  featureRef?: string;
51
105
  /** For GUIDANCE_FLOW: the guidance flow ref to activate */
52
106
  guidanceFlowRef?: string;
53
- /** For CELEBRATION: notification severity level (controls animation intensity) */
54
- celebrationLevel?: 'low' | 'medium' | 'high';
107
+ /** For CELEBRATION: how big a moment this is. Presentation follows from it unless overridden. */
108
+ celebrationLevel?: MilestoneCelebrationLevel;
109
+ /**
110
+ * For CELEBRATION: draw it THIS way, whatever the level would have chosen.
111
+ *
112
+ * Makes the level a default rather than a verdict: a milestone that is significant but should
113
+ * still get confetti says so here. Omit it to get {@link DEFAULT_CELEBRATION_MODE_BY_LEVEL}.
114
+ */
115
+ celebrationMode?: CelebrationDisplayMode;
55
116
  }
56
117
  /** ──────────────────────────────────────────────────────────────
57
118
  * Milestone Trigger — What Operation Triggers Evaluation
@@ -100,6 +161,7 @@ export interface MilestoneDefinition {
100
161
  * Dependencies are validated and evaluated within the same progression scope. */
101
162
  dependencies?: string[];
102
163
  }
164
+ /** @wildo_source:part:end saas.models.milestone-definition */
103
165
  /** ──────────────────────────────────────────────────────────────
104
166
  * Milestone Label Fields — i18n Key Generation Configuration
105
167
  * ────────────────────────────────────────────────────────────── */
@@ -1 +1 @@
1
- {"version":3,"file":"milestone-definition.shared.schemas.d.ts","sourceRoot":"","sources":["../../../src/guidance/milestone-definition.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,gDAAgD,CAAC;AACvF,OAAO,EAAE,gBAAgB,EAAE,MAAM,gDAAgD,CAAC;AAElF;;oEAEoE;AAEpE,oBAAY,aAAa;IACvB,4DAA4D;IAC5D,UAAU,eAAe;IACzB,0DAA0D;IAC1D,eAAe,oBAAoB;IACnC,6DAA6D;IAC7D,gBAAgB,qBAAqB;CACtC;AAED;;oEAEoE;AAEpE,oBAAY,mBAAmB;IAC7B,uEAAuE;IACvE,WAAW,gBAAgB;IAC3B,8EAA8E;IAC9E,cAAc,mBAAmB;IACjC,2CAA2C;IAC3C,aAAa,kBAAkB;CAChC;AAED;;oEAEoE;AAEpE,oBAAY,gBAAgB;IAC1B,6EAA6E;IAC7E,IAAI,SAAS;IACb;4EACwE;IACxE,YAAY,iBAAiB;CAC9B;AAED,0EAA0E;AAC1E,eAAO,MAAM,6BAA6B,EAAE,MAAM,CAAC,gBAAgB,EAAE,gBAAgB,CAGpF,CAAC;AAEF;;oEAEoE;AAEpE,MAAM,WAAW,4BAA4B;IAC3C,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;CACZ;AAED;;oEAEoE;AAEpE,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,mBAAmB,CAAC;IAC1B,2DAA2D;IAC3D,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2DAA2D;IAC3D,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,kFAAkF;IAClF,gBAAgB,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,CAAC;CAC9C;AAED;;oEAEoE;AAEpE,MAAM,WAAW,gBAAgB;IAC/B,6CAA6C;IAC7C,YAAY,EAAE,MAAM,CAAC;IACrB,yCAAyC;IACzC,SAAS,EAAE,qBAAqB,CAAC;CAClC;AAED;;oEAEoE;AAEpE,MAAM,WAAW,mBAAmB;IAClC,kEAAkE;IAClE,UAAU,EAAE,MAAM,CAAC;IACnB,6DAA6D;IAC7D,IAAI,EAAE,aAAa,CAAC;IACpB;;;;OAIG;IACH,KAAK,CAAC,EAAE,gBAAgB,CAAC;IACzB,mEAAmE;IACnE,OAAO,EAAE,gBAAgB,CAAC;IAC1B,0DAA0D;IAC1D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;gGAE4F;IAC5F,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oDAAoD;IACpD,MAAM,EAAE,eAAe,CAAC;IACxB,oEAAoE;IACpE,QAAQ,EAAE,MAAM,CAAC;IACjB,2DAA2D;IAC3D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,qCAAqC;IACrC,MAAM,CAAC,EAAE;QACP,WAAW,CAAC,EAAE,OAAO,CAAC;KACvB,CAAC;IACF,kFAAkF;IAClF,mBAAmB,CAAC,EAAE,4BAA4B,CAAC;IACnD;sFACkF;IAClF,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;CACzB;AAED;;oEAEoE"}
1
+ {"version":3,"file":"milestone-definition.shared.schemas.d.ts","sourceRoot":"","sources":["../../../../src/guidance/milestone-definition.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,+CAA+C,CAAC;AACvF,OAAO,EAAE,qBAAqB,EAAE,MAAM,gDAAgD,CAAC;AACvF,OAAO,EAAE,gBAAgB,EAAE,MAAM,gDAAgD,CAAC;AAClF,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAElE;;oEAEoE;AA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;IACpB,2DAA2D;IAC3D,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,iGAAiG;IACjG,gBAAgB,CAAC,EAAE,yBAAyB,CAAC;IAC7C;;;;;OAKG;IACH,eAAe,CAAC,EAAE,sBAAsB,CAAC;CAC1C;AAED;;oEAEoE;AAEpE,MAAM,WAAW,gBAAgB;IAC/B,6CAA6C;IAC7C,YAAY,EAAE,MAAM,CAAC;IACrB,yCAAyC;IACzC,SAAS,EAAE,qBAAqB,CAAC;CAClC;AAED;;oEAEoE;AAEpE,MAAM,WAAW,mBAAmB;IAClC,kEAAkE;IAClE,UAAU,EAAE,MAAM,CAAC;IACnB,6DAA6D;IAC7D,IAAI,EAAE,aAAa,CAAC;IACpB;;;;OAIG;IACH,KAAK,CAAC,EAAE,gBAAgB,CAAC;IACzB,mEAAmE;IACnE,OAAO,EAAE,gBAAgB,CAAC;IAC1B,0DAA0D;IAC1D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;gGAE4F;IAC5F,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oDAAoD;IACpD,MAAM,EAAE,eAAe,CAAC;IACxB,oEAAoE;IACpE,QAAQ,EAAE,MAAM,CAAC;IACjB,2DAA2D;IAC3D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,qCAAqC;IACrC,MAAM,CAAC,EAAE;QACP,WAAW,CAAC,EAAE,OAAO,CAAC;KACvB,CAAC;IACF,kFAAkF;IAClF,mBAAmB,CAAC,EAAE,4BAA4B,CAAC;IACnD;sFACkF;IAClF,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;CACzB;AACD,8DAA8D;AAE9D;;oEAEoE"}
@@ -1,7 +1,16 @@
1
+ import { CelebrationDisplayMode } from '../notifications/notifications.shared.schemas.js';
1
2
  import { CoreResourceType } from '../resources/resources.shared.core.definitions.js';
2
3
  /** ──────────────────────────────────────────────────────────────
3
4
  * Milestone Type — Condition Evaluation Strategy
4
5
  * ────────────────────────────────────────────────────────────── */
6
+ /**
7
+ * @wildo_source:part:start saas.models.milestone-definition facet:layer:shared facet:family:progression facet:audience:app-developer
8
+ *
9
+ * A milestone is a moment in a person's (or an organization's) use of the application that the
10
+ * application wants to recognise: the first project created, the tenth todo completed. Declare them
11
+ * in `shared-lib/src/engine/milestones.ts`; the framework counts the triggering operations, marks a
12
+ * milestone achieved, awards its points and delivers its reward. Import from `@wildo-ai/saas-models`.
13
+ */
5
14
  export var MilestoneType;
6
15
  (function (MilestoneType) {
7
16
  /** Achieved on first occurrence of the trigger operation */
@@ -34,11 +43,52 @@ export var ProgressionScope;
34
43
  * (e.g., "Team reached 50 members", "First integration configured") */
35
44
  ProgressionScope["ORGANIZATION"] = "organization";
36
45
  })(ProgressionScope || (ProgressionScope = {}));
46
+ /** @wildo_source:part:end saas.models.milestone-definition */
37
47
  /** Maps ProgressionScope to the CoreResourceType that stores its state */
38
48
  export const PROGRESSION_SCOPE_TO_RESOURCE = {
39
49
  [ProgressionScope.USER]: CoreResourceType.USER_PROGRESSION_STATE,
40
50
  [ProgressionScope.ORGANIZATION]: CoreResourceType.ORGANIZATION_PROGRESSION_STATE,
41
51
  };
52
+ /** @wildo_source:part:end saas.models.milestone-definition */
53
+ /** ──────────────────────────────────────────────────────────────
54
+ * Milestone Reward Definition
55
+ * ────────────────────────────────────────────────────────────── */
56
+ /**
57
+ * @wildo_source:part:start saas.models.milestone-celebration facet:layer:shared facet:family:progression facet:audience:app-developer
58
+ *
59
+ * How much of a moment a milestone is — NOT how it is drawn.
60
+ *
61
+ * Presentation is a separate choice, `celebrationMode` (a `CelebrationDisplayMode`), so that a
62
+ * milestone can be significant without having to accept a particular animation. Leave the mode out
63
+ * and the level picks one through `DEFAULT_CELEBRATION_MODE_BY_LEVEL`.
64
+ */
65
+ export var MilestoneCelebrationLevel;
66
+ (function (MilestoneCelebrationLevel) {
67
+ MilestoneCelebrationLevel["LOW"] = "low";
68
+ MilestoneCelebrationLevel["MEDIUM"] = "medium";
69
+ MilestoneCelebrationLevel["HIGH"] = "high";
70
+ })(MilestoneCelebrationLevel || (MilestoneCelebrationLevel = {}));
71
+ /**
72
+ * The display mode each level gets when a milestone does not name one — the framework's default,
73
+ * readable so an application knows what it is opting out of when it sets `celebrationMode`.
74
+ */
75
+ export const DEFAULT_CELEBRATION_MODE_BY_LEVEL = {
76
+ [MilestoneCelebrationLevel.LOW]: CelebrationDisplayMode.CONFETTI,
77
+ [MilestoneCelebrationLevel.MEDIUM]: CelebrationDisplayMode.OVERLAY,
78
+ [MilestoneCelebrationLevel.HIGH]: CelebrationDisplayMode.LOTTIE,
79
+ };
80
+ /**
81
+ * How a celebration is drawn, in order: the milestone's own `celebrationMode`; else the default for
82
+ * its `celebrationLevel`; else `CONFETTI`, the quietest presentation, for a reward that says neither.
83
+ */
84
+ export function resolveCelebrationDisplayMode(reward) {
85
+ if (reward.celebrationMode)
86
+ return reward.celebrationMode;
87
+ if (reward.celebrationLevel)
88
+ return DEFAULT_CELEBRATION_MODE_BY_LEVEL[reward.celebrationLevel];
89
+ return CelebrationDisplayMode.CONFETTI;
90
+ }
91
+ /** @wildo_source:part:end saas.models.milestone-definition */
42
92
  /** ──────────────────────────────────────────────────────────────
43
93
  * Milestone Label Fields — i18n Key Generation Configuration
44
94
  * ────────────────────────────────────────────────────────────── */