@wildo-ai/saas-models 1.1.7 → 1.1.8

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 (861) hide show
  1. package/dist/esm/__tests__/setup.d.ts.map +1 -1
  2. package/dist/esm/__tests__/setup.js.map +1 -1
  3. package/dist/esm/_inspect.d.ts.map +1 -1
  4. package/dist/esm/_inspect.js.map +1 -1
  5. package/dist/esm/applications/application-metadata.shared.resources-config.schemas.d.ts.map +1 -1
  6. package/dist/esm/applications/application-metadata.shared.resources-config.schemas.js.map +1 -1
  7. package/dist/esm/applications/application-subject.shared.schemas.d.ts.map +1 -1
  8. package/dist/esm/applications/application-subject.shared.schemas.js.map +1 -1
  9. package/dist/esm/applications/application-versions.shared.resources-config.schemas.d.ts.map +1 -1
  10. package/dist/esm/applications/application-versions.shared.resources-config.schemas.js.map +1 -1
  11. package/dist/esm/applications/applications-context.schemas.d.ts.map +1 -1
  12. package/dist/esm/applications/applications-context.schemas.js.map +1 -1
  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.map +1 -1
  15. package/dist/esm/applications/applications.shared.schemas.d.ts.map +1 -1
  16. package/dist/esm/applications/applications.shared.schemas.js.map +1 -1
  17. package/dist/esm/billing/billing-account.shared.resources-config.schemas.d.ts.map +1 -1
  18. package/dist/esm/billing/billing-account.shared.resources-config.schemas.js.map +1 -1
  19. package/dist/esm/billing/billing-account.shared.schemas.d.ts.map +1 -1
  20. package/dist/esm/billing/billing-account.shared.schemas.js.map +1 -1
  21. package/dist/esm/billing/billing-configuration.shared.schemas.d.ts.map +1 -1
  22. package/dist/esm/billing/billing-configuration.shared.schemas.js.map +1 -1
  23. package/dist/esm/billing/billing-enums.shared.schemas.d.ts.map +1 -1
  24. package/dist/esm/billing/billing-enums.shared.schemas.js.map +1 -1
  25. package/dist/esm/billing/billing-types.shared.schemas.d.ts.map +1 -1
  26. package/dist/esm/billing/billing-types.shared.schemas.js.map +1 -1
  27. package/dist/esm/billing/credit-pool.shared.resources-config.schemas.d.ts.map +1 -1
  28. package/dist/esm/billing/credit-pool.shared.resources-config.schemas.js.map +1 -1
  29. package/dist/esm/billing/credit-pool.shared.schemas.d.ts.map +1 -1
  30. package/dist/esm/billing/credit-pool.shared.schemas.js.map +1 -1
  31. package/dist/esm/billing/invoice-ref.shared.resources-config.schemas.d.ts.map +1 -1
  32. package/dist/esm/billing/invoice-ref.shared.resources-config.schemas.js.map +1 -1
  33. package/dist/esm/billing/invoice-ref.shared.schemas.d.ts.map +1 -1
  34. package/dist/esm/billing/invoice-ref.shared.schemas.js.map +1 -1
  35. package/dist/esm/billing/price.shared.resources-config.schemas.d.ts.map +1 -1
  36. package/dist/esm/billing/price.shared.resources-config.schemas.js.map +1 -1
  37. package/dist/esm/billing/price.shared.schemas.d.ts.map +1 -1
  38. package/dist/esm/billing/price.shared.schemas.js.map +1 -1
  39. package/dist/esm/billing/product-behavior-policy.shared.schemas.d.ts.map +1 -1
  40. package/dist/esm/billing/product-behavior-policy.shared.schemas.js.map +1 -1
  41. package/dist/esm/billing/product-definition.shared.schemas.d.ts.map +1 -1
  42. package/dist/esm/billing/product-definition.shared.schemas.js.map +1 -1
  43. package/dist/esm/billing/product.shared.resources-config.schemas.d.ts.map +1 -1
  44. package/dist/esm/billing/product.shared.resources-config.schemas.js.map +1 -1
  45. package/dist/esm/billing/product.shared.schemas.d.ts.map +1 -1
  46. package/dist/esm/billing/product.shared.schemas.js.map +1 -1
  47. package/dist/esm/billing/promotions.shared.resources-config.schemas.d.ts.map +1 -1
  48. package/dist/esm/billing/promotions.shared.resources-config.schemas.js.map +1 -1
  49. package/dist/esm/billing/promotions.shared.schemas.d.ts.map +1 -1
  50. package/dist/esm/billing/promotions.shared.schemas.js.map +1 -1
  51. package/dist/esm/billing/public-pricing-catalog.shared.atoms.d.ts.map +1 -1
  52. package/dist/esm/billing/public-pricing-catalog.shared.atoms.js.map +1 -1
  53. package/dist/esm/billing/public-pricing-catalog.shared.d.ts.map +1 -1
  54. package/dist/esm/billing/public-pricing-catalog.shared.js.map +1 -1
  55. package/dist/esm/billing/referral-reward.shared.schemas.d.ts.map +1 -1
  56. package/dist/esm/billing/referral-reward.shared.schemas.js.map +1 -1
  57. package/dist/esm/billing/referral.shared.resources-config.schemas.d.ts.map +1 -1
  58. package/dist/esm/billing/referral.shared.resources-config.schemas.js.map +1 -1
  59. package/dist/esm/billing/referral.shared.schemas.d.ts.map +1 -1
  60. package/dist/esm/billing/referral.shared.schemas.js.map +1 -1
  61. package/dist/esm/billing/subscription.shared.resources-config.schemas.d.ts.map +1 -1
  62. package/dist/esm/billing/subscription.shared.resources-config.schemas.js.map +1 -1
  63. package/dist/esm/billing/subscription.shared.schemas.d.ts.map +1 -1
  64. package/dist/esm/billing/subscription.shared.schemas.js.map +1 -1
  65. package/dist/esm/billing/usage-flush-evidence.shared.schemas.d.ts.map +1 -1
  66. package/dist/esm/billing/usage-flush-evidence.shared.schemas.js.map +1 -1
  67. package/dist/esm/billing/usage-record.shared.resources-config.schemas.d.ts.map +1 -1
  68. package/dist/esm/billing/usage-record.shared.resources-config.schemas.js.map +1 -1
  69. package/dist/esm/billing/usage-record.shared.schemas.d.ts.map +1 -1
  70. package/dist/esm/billing/usage-record.shared.schemas.js.map +1 -1
  71. package/dist/esm/charts/aggregation-query.shared.schemas.d.ts.map +1 -1
  72. package/dist/esm/charts/aggregation-query.shared.schemas.js.map +1 -1
  73. package/dist/esm/charts/aggregation.shared.definitions.d.ts.map +1 -1
  74. package/dist/esm/charts/aggregation.shared.definitions.js.map +1 -1
  75. package/dist/esm/charts/chart-definition-builder.shared.d.ts.map +1 -1
  76. package/dist/esm/charts/chart-definition-builder.shared.js.map +1 -1
  77. package/dist/esm/companion/artifact-placement.shared.definitions.d.ts.map +1 -1
  78. package/dist/esm/companion/artifact-placement.shared.definitions.js.map +1 -1
  79. package/dist/esm/companion/provider-discovery.shared.schemas.d.ts.map +1 -1
  80. package/dist/esm/companion/provider-discovery.shared.schemas.js.map +1 -1
  81. package/dist/esm/companion/shared-library-companion.shared.definitions.d.ts.map +1 -1
  82. package/dist/esm/companion/shared-library-companion.shared.definitions.js.map +1 -1
  83. package/dist/esm/companion-exports.d.ts.map +1 -1
  84. package/dist/esm/companion-exports.js.map +1 -1
  85. package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.d.ts.map +1 -1
  86. package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.js.map +1 -1
  87. package/dist/esm/compliance/audit-trails/audit-actor.shared.schemas.d.ts.map +1 -1
  88. package/dist/esm/compliance/audit-trails/audit-actor.shared.schemas.js.map +1 -1
  89. package/dist/esm/compliance/audit-trails/audit-export-projection.shared.schemas.d.ts.map +1 -1
  90. package/dist/esm/compliance/audit-trails/audit-export-projection.shared.schemas.js.map +1 -1
  91. package/dist/esm/compliance/audit-trails/audit-log-sink.shared.schemas.d.ts.map +1 -1
  92. package/dist/esm/compliance/audit-trails/audit-log-sink.shared.schemas.js.map +1 -1
  93. package/dist/esm/compliance/audit-trails/audit-logs.shared.resources-config.schemas.d.ts.map +1 -1
  94. package/dist/esm/compliance/audit-trails/audit-logs.shared.resources-config.schemas.js.map +1 -1
  95. package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.d.ts.map +1 -1
  96. package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.js.map +1 -1
  97. package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.d.ts.map +1 -1
  98. package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.js.map +1 -1
  99. package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.d.ts.map +1 -1
  100. package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.js.map +1 -1
  101. package/dist/esm/compliance/data-classification/data-classification.shared.schemas.d.ts.map +1 -1
  102. package/dist/esm/compliance/data-classification/data-classification.shared.schemas.js.map +1 -1
  103. package/dist/esm/compliance/documents/governed-document-interactions.shared.schemas.d.ts.map +1 -1
  104. package/dist/esm/compliance/documents/governed-document-interactions.shared.schemas.js.map +1 -1
  105. package/dist/esm/compliance/documents/governed-documents.shared.schemas.d.ts.map +1 -1
  106. package/dist/esm/compliance/documents/governed-documents.shared.schemas.js.map +1 -1
  107. package/dist/esm/compliance/documents/user-governed-document-acceptances.shared.resources-config.schemas.d.ts.map +1 -1
  108. package/dist/esm/compliance/documents/user-governed-document-acceptances.shared.resources-config.schemas.js.map +1 -1
  109. package/dist/esm/compliance/documents/user-governed-document-acceptances.shared.schemas.d.ts.map +1 -1
  110. package/dist/esm/compliance/documents/user-governed-document-acceptances.shared.schemas.js.map +1 -1
  111. package/dist/esm/compliance/privacy/ai-use-posture.shared.schemas.d.ts.map +1 -1
  112. package/dist/esm/compliance/privacy/ai-use-posture.shared.schemas.js.map +1 -1
  113. package/dist/esm/compliance/privacy/capability-consent-purposes.shared.utils.d.ts.map +1 -1
  114. package/dist/esm/compliance/privacy/capability-consent-purposes.shared.utils.js.map +1 -1
  115. package/dist/esm/compliance/privacy/client-storage.shared.schemas.d.ts.map +1 -1
  116. package/dist/esm/compliance/privacy/client-storage.shared.schemas.js.map +1 -1
  117. package/dist/esm/compliance/privacy/consent-gate-vocabulary.shared.schemas.d.ts.map +1 -1
  118. package/dist/esm/compliance/privacy/consent-gate-vocabulary.shared.schemas.js.map +1 -1
  119. package/dist/esm/compliance/privacy/consent-purposes.shared.d.ts.map +1 -1
  120. package/dist/esm/compliance/privacy/consent-purposes.shared.js.map +1 -1
  121. package/dist/esm/compliance/privacy/data-subject-rights.shared.schemas.d.ts.map +1 -1
  122. package/dist/esm/compliance/privacy/data-subject-rights.shared.schemas.js.map +1 -1
  123. package/dist/esm/compliance/privacy/impersonalization-scrub.shared.utils.d.ts.map +1 -1
  124. package/dist/esm/compliance/privacy/impersonalization-scrub.shared.utils.js.map +1 -1
  125. package/dist/esm/compliance/privacy/impersonalization.shared.schemas.d.ts.map +1 -1
  126. package/dist/esm/compliance/privacy/impersonalization.shared.schemas.js.map +1 -1
  127. package/dist/esm/compliance/privacy/legal-hold-subject-attribution.shared.utils.d.ts.map +1 -1
  128. package/dist/esm/compliance/privacy/legal-hold-subject-attribution.shared.utils.js.map +1 -1
  129. package/dist/esm/compliance/privacy/legal-holds.shared.resources-config.schemas.d.ts.map +1 -1
  130. package/dist/esm/compliance/privacy/legal-holds.shared.resources-config.schemas.js.map +1 -1
  131. package/dist/esm/compliance/privacy/legal-holds.shared.schemas.d.ts.map +1 -1
  132. package/dist/esm/compliance/privacy/legal-holds.shared.schemas.js.map +1 -1
  133. package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.d.ts.map +1 -1
  134. package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.js.map +1 -1
  135. package/dist/esm/compliance/privacy/operator-compliance-identity.shared.schemas.d.ts.map +1 -1
  136. package/dist/esm/compliance/privacy/operator-compliance-identity.shared.schemas.js.map +1 -1
  137. package/dist/esm/compliance/privacy/personal-data-category.shared.schemas.d.ts.map +1 -1
  138. package/dist/esm/compliance/privacy/personal-data-category.shared.schemas.js.map +1 -1
  139. package/dist/esm/compliance/privacy/personal-data-declaration.shared.utils.d.ts.map +1 -1
  140. package/dist/esm/compliance/privacy/personal-data-declaration.shared.utils.js.map +1 -1
  141. package/dist/esm/compliance/privacy/privacy.shared.schemas.d.ts.map +1 -1
  142. package/dist/esm/compliance/privacy/privacy.shared.schemas.js.map +1 -1
  143. package/dist/esm/compliance/privacy/provider-capability-disclosure.shared.schemas.d.ts.map +1 -1
  144. package/dist/esm/compliance/privacy/provider-capability-disclosure.shared.schemas.js.map +1 -1
  145. package/dist/esm/compliance/privacy/purpose-ref.shared.schemas.d.ts.map +1 -1
  146. package/dist/esm/compliance/privacy/purpose-ref.shared.schemas.js.map +1 -1
  147. package/dist/esm/compliance/privacy/redaction.shared.schemas.d.ts.map +1 -1
  148. package/dist/esm/compliance/privacy/redaction.shared.schemas.js.map +1 -1
  149. package/dist/esm/compliance/privacy/retention-binding.shared.utils.d.ts.map +1 -1
  150. package/dist/esm/compliance/privacy/retention-binding.shared.utils.js.map +1 -1
  151. package/dist/esm/compliance/privacy/retention-enforcement-records.shared.resources-config.schemas.d.ts.map +1 -1
  152. package/dist/esm/compliance/privacy/retention-enforcement-records.shared.resources-config.schemas.js.map +1 -1
  153. package/dist/esm/compliance/privacy/retention-enforcement-records.shared.schemas.d.ts.map +1 -1
  154. package/dist/esm/compliance/privacy/retention-enforcement-records.shared.schemas.js.map +1 -1
  155. package/dist/esm/compliance/privacy/retention-schedule.shared.schemas.d.ts.map +1 -1
  156. package/dist/esm/compliance/privacy/retention-schedule.shared.schemas.js.map +1 -1
  157. package/dist/esm/compliance/privacy/retention-scope-deleted.shared.utils.d.ts.map +1 -1
  158. package/dist/esm/compliance/privacy/retention-scope-deleted.shared.utils.js.map +1 -1
  159. package/dist/esm/compliance/privacy/sharing.shared.schemas.d.ts.map +1 -1
  160. package/dist/esm/compliance/privacy/sharing.shared.schemas.js.map +1 -1
  161. package/dist/esm/compliance/privacy/subject-data-recipients.shared.schemas.d.ts.map +1 -1
  162. package/dist/esm/compliance/privacy/subject-data-recipients.shared.schemas.js.map +1 -1
  163. package/dist/esm/compliance/privacy/subject-erasure-lane-evidence.shared.schemas.d.ts.map +1 -1
  164. package/dist/esm/compliance/privacy/subject-erasure-lane-evidence.shared.schemas.js.map +1 -1
  165. package/dist/esm/compliance/privacy/subject-erasure.shared.schemas.d.ts.map +1 -1
  166. package/dist/esm/compliance/privacy/subject-erasure.shared.schemas.js.map +1 -1
  167. package/dist/esm/compliance/privacy/subject-export-render.shared.utils.d.ts.map +1 -1
  168. package/dist/esm/compliance/privacy/subject-export-render.shared.utils.js.map +1 -1
  169. package/dist/esm/compliance/privacy/subject-export.shared.schemas.d.ts.map +1 -1
  170. package/dist/esm/compliance/privacy/subject-export.shared.schemas.js.map +1 -1
  171. package/dist/esm/compliance/review-cadence.shared.schemas.d.ts.map +1 -1
  172. package/dist/esm/compliance/review-cadence.shared.schemas.js.map +1 -1
  173. package/dist/esm/compliance/risk-posture.shared.schemas.d.ts.map +1 -1
  174. package/dist/esm/compliance/risk-posture.shared.schemas.js.map +1 -1
  175. package/dist/esm/config/analytics-value-moments.shared.schemas.d.ts.map +1 -1
  176. package/dist/esm/config/analytics-value-moments.shared.schemas.js.map +1 -1
  177. package/dist/esm/config/app-configuration-shared.shared.schemas.d.ts.map +1 -1
  178. package/dist/esm/config/app-configuration-shared.shared.schemas.js.map +1 -1
  179. package/dist/esm/config/app-frontend-type.shared.schemas.d.ts.map +1 -1
  180. package/dist/esm/config/app-frontend-type.shared.schemas.js.map +1 -1
  181. package/dist/esm/config/auth-config-resolution.shared.utils.d.ts.map +1 -1
  182. package/dist/esm/config/auth-config-resolution.shared.utils.js.map +1 -1
  183. package/dist/esm/config/brand-assets.shared.schemas.d.ts.map +1 -1
  184. package/dist/esm/config/brand-assets.shared.schemas.js.map +1 -1
  185. package/dist/esm/config/configuration-validation.shared.schemas.d.ts.map +1 -1
  186. package/dist/esm/config/configuration-validation.shared.schemas.js.map +1 -1
  187. package/dist/esm/config/entity-identity-config.shared.schemas.d.ts.map +1 -1
  188. package/dist/esm/config/entity-identity-config.shared.schemas.js.map +1 -1
  189. package/dist/esm/config/frontend/chart-definition.shared.schemas.d.ts.map +1 -1
  190. package/dist/esm/config/frontend/chart-definition.shared.schemas.js.map +1 -1
  191. package/dist/esm/config/frontend/chart-registration-alignment.shared.d.ts.map +1 -1
  192. package/dist/esm/config/frontend/chart-registration-alignment.shared.js.map +1 -1
  193. package/dist/esm/config/frontend/navigation.shared.schemas.d.ts.map +1 -1
  194. package/dist/esm/config/frontend/navigation.shared.schemas.js.map +1 -1
  195. package/dist/esm/config/frontend/onboarding.shared.schemas.d.ts.map +1 -1
  196. package/dist/esm/config/frontend/onboarding.shared.schemas.js.map +1 -1
  197. package/dist/esm/config/postgresql.shared.schemas.d.ts.map +1 -1
  198. package/dist/esm/config/postgresql.shared.schemas.js.map +1 -1
  199. package/dist/esm/config/registration-acquisition-policy.shared.utils.d.ts.map +1 -1
  200. package/dist/esm/config/registration-acquisition-policy.shared.utils.js.map +1 -1
  201. package/dist/esm/config-authoring.entry.d.ts.map +1 -1
  202. package/dist/esm/config-authoring.entry.js.map +1 -1
  203. package/dist/esm/crdt/crdt-merge.shared.utils.d.ts.map +1 -1
  204. package/dist/esm/crdt/crdt-merge.shared.utils.js.map +1 -1
  205. package/dist/esm/data-seeding/data-seeding-config.shared.schemas.d.ts.map +1 -1
  206. package/dist/esm/data-seeding/data-seeding-config.shared.schemas.js.map +1 -1
  207. package/dist/esm/errors/caught-error-description.shared.utils.d.ts.map +1 -1
  208. package/dist/esm/errors/caught-error-description.shared.utils.js.map +1 -1
  209. package/dist/esm/errors/errors.custom-message-ref.shared.definitions.d.ts.map +1 -1
  210. package/dist/esm/errors/errors.custom-message-ref.shared.definitions.js.map +1 -1
  211. package/dist/esm/errors/errors.shared.definitions.d.ts.map +1 -1
  212. package/dist/esm/errors/errors.shared.definitions.js.map +1 -1
  213. package/dist/esm/errors/errors.shared.schemas.d.ts.map +1 -1
  214. package/dist/esm/errors/errors.shared.schemas.js.map +1 -1
  215. package/dist/esm/errors/errors.shared.utils.d.ts.map +1 -1
  216. package/dist/esm/errors/errors.shared.utils.js.map +1 -1
  217. package/dist/esm/errors/resource-access-forbidden.shared.error.d.ts.map +1 -1
  218. package/dist/esm/errors/resource-access-forbidden.shared.error.js.map +1 -1
  219. package/dist/esm/errors/thrown-value-description.shared.utils.d.ts.map +1 -1
  220. package/dist/esm/errors/thrown-value-description.shared.utils.js.map +1 -1
  221. package/dist/esm/errors/zod-issue-formatting.shared.utils.d.ts.map +1 -1
  222. package/dist/esm/errors/zod-issue-formatting.shared.utils.js.map +1 -1
  223. package/dist/esm/exports/tabular-csv.shared.utils.d.ts.map +1 -1
  224. package/dist/esm/exports/tabular-csv.shared.utils.js.map +1 -1
  225. package/dist/esm/external-data/external-data-pipeline-description.shared.d.ts.map +1 -1
  226. package/dist/esm/external-data/external-data-pipeline-description.shared.js.map +1 -1
  227. package/dist/esm/external-data/external-data-pipeline-pass-mode.shared.d.ts.map +1 -1
  228. package/dist/esm/external-data/external-data-pipeline-pass-mode.shared.js.map +1 -1
  229. package/dist/esm/external-data/external-data-pipeline.shared.schemas.d.ts.map +1 -1
  230. package/dist/esm/external-data/external-data-pipeline.shared.schemas.js.map +1 -1
  231. package/dist/esm/external-data/external-data-provenance.shared.d.ts.map +1 -1
  232. package/dist/esm/external-data/external-data-provenance.shared.js.map +1 -1
  233. package/dist/esm/external-data.exports.d.ts.map +1 -1
  234. package/dist/esm/external-data.exports.js.map +1 -1
  235. package/dist/esm/external-providers/compose-provider-registry.shared.d.ts.map +1 -1
  236. package/dist/esm/external-providers/compose-provider-registry.shared.js.map +1 -1
  237. package/dist/esm/external-providers/engine-capabilities.shared.schemas.d.ts.map +1 -1
  238. package/dist/esm/external-providers/engine-capabilities.shared.schemas.js.map +1 -1
  239. package/dist/esm/external-providers/engine-capability-resolution-mode.shared.d.ts.map +1 -1
  240. package/dist/esm/external-providers/engine-capability-resolution-mode.shared.js.map +1 -1
  241. package/dist/esm/external-providers/engine-capability-surface.shared.d.ts.map +1 -1
  242. package/dist/esm/external-providers/engine-capability-surface.shared.js.map +1 -1
  243. package/dist/esm/external-providers/external-providers.shared.schemas.d.ts.map +1 -1
  244. package/dist/esm/external-providers/external-providers.shared.schemas.js.map +1 -1
  245. package/dist/esm/external-providers/frontend-bootstrap.shared.schemas.d.ts.map +1 -1
  246. package/dist/esm/external-providers/frontend-bootstrap.shared.schemas.js.map +1 -1
  247. package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.d.ts.map +1 -1
  248. package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.js.map +1 -1
  249. package/dist/esm/external-providers/frontend-capability-runtime.shared.types.d.ts.map +1 -1
  250. package/dist/esm/external-providers/frontend-capability-runtime.shared.types.js.map +1 -1
  251. package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.d.ts.map +1 -1
  252. package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.js.map +1 -1
  253. package/dist/esm/external-providers/frontend-provider-public-config.shared.d.ts.map +1 -1
  254. package/dist/esm/external-providers/frontend-provider-public-config.shared.js.map +1 -1
  255. package/dist/esm/external-providers/model-cost-accounting-config.shared.schemas.d.ts.map +1 -1
  256. package/dist/esm/external-providers/model-cost-accounting-config.shared.schemas.js.map +1 -1
  257. package/dist/esm/external-providers/provider-address-lookup-contract.shared.types.d.ts.map +1 -1
  258. package/dist/esm/external-providers/provider-address-lookup-contract.shared.types.js.map +1 -1
  259. package/dist/esm/external-providers/provider-augmentation-opt-ins.shared.schemas.d.ts.map +1 -1
  260. package/dist/esm/external-providers/provider-augmentation-opt-ins.shared.schemas.js.map +1 -1
  261. package/dist/esm/external-providers/provider-authentication-assurance.shared.schemas.d.ts.map +1 -1
  262. package/dist/esm/external-providers/provider-authentication-assurance.shared.schemas.js.map +1 -1
  263. package/dist/esm/external-providers/provider-browser-operations.shared.schemas.d.ts.map +1 -1
  264. package/dist/esm/external-providers/provider-browser-operations.shared.schemas.js.map +1 -1
  265. package/dist/esm/external-providers/provider-capability.shared.schemas.d.ts.map +1 -1
  266. package/dist/esm/external-providers/provider-capability.shared.schemas.js.map +1 -1
  267. package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.d.ts.map +1 -1
  268. package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.js.map +1 -1
  269. package/dist/esm/external-providers/provider-frontend-component-contract.shared.types.d.ts.map +1 -1
  270. package/dist/esm/external-providers/provider-frontend-component-contract.shared.types.js.map +1 -1
  271. package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.d.ts.map +1 -1
  272. package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.js.map +1 -1
  273. package/dist/esm/external-providers/provider-metadata.shared.schemas.d.ts.map +1 -1
  274. package/dist/esm/external-providers/provider-metadata.shared.schemas.js.map +1 -1
  275. package/dist/esm/external-providers/provider-package-allow-list.shared.schemas.d.ts.map +1 -1
  276. package/dist/esm/external-providers/provider-package-allow-list.shared.schemas.js.map +1 -1
  277. package/dist/esm/external-providers/provider-protocol.shared.schemas.d.ts.map +1 -1
  278. package/dist/esm/external-providers/provider-protocol.shared.schemas.js.map +1 -1
  279. package/dist/esm/external-providers/provider-scope-reauthorization.shared.schemas.d.ts.map +1 -1
  280. package/dist/esm/external-providers/provider-scope-reauthorization.shared.schemas.js.map +1 -1
  281. package/dist/esm/external-providers/provider-shared-connections.shared.schemas.d.ts.map +1 -1
  282. package/dist/esm/external-providers/provider-shared-connections.shared.schemas.js.map +1 -1
  283. package/dist/esm/external-providers/provider-tier-rule.shared.utils.d.ts.map +1 -1
  284. package/dist/esm/external-providers/provider-tier-rule.shared.utils.js.map +1 -1
  285. package/dist/esm/external-providers/provider-usage-cost.shared.d.ts.map +1 -1
  286. package/dist/esm/external-providers/provider-usage-cost.shared.js.map +1 -1
  287. package/dist/esm/external-providers/provider-usage-pricing.example.d.ts.map +1 -1
  288. package/dist/esm/external-providers/provider-usage-pricing.example.js.map +1 -1
  289. package/dist/esm/external-providers/provider-usage-pricing.shared.schemas.d.ts.map +1 -1
  290. package/dist/esm/external-providers/provider-usage-pricing.shared.schemas.js.map +1 -1
  291. package/dist/esm/features/application-features.shared.resources-config.schemas.d.ts.map +1 -1
  292. package/dist/esm/features/application-features.shared.resources-config.schemas.js.map +1 -1
  293. package/dist/esm/features/connected-feature.example.d.ts.map +1 -1
  294. package/dist/esm/features/connected-feature.example.js.map +1 -1
  295. package/dist/esm/features/core-feature-definitions.shared.d.ts.map +1 -1
  296. package/dist/esm/features/core-feature-definitions.shared.js.map +1 -1
  297. package/dist/esm/features/feature-builders.shared.d.ts.map +1 -1
  298. package/dist/esm/features/feature-builders.shared.js.map +1 -1
  299. package/dist/esm/features/feature-definition.shared.schemas.d.ts.map +1 -1
  300. package/dist/esm/features/feature-definition.shared.schemas.js.map +1 -1
  301. package/dist/esm/features/feature-registry.shared.d.ts.map +1 -1
  302. package/dist/esm/features/feature-registry.shared.js.map +1 -1
  303. package/dist/esm/features/feature-resolution.shared.schemas.d.ts.map +1 -1
  304. package/dist/esm/features/feature-resolution.shared.schemas.js.map +1 -1
  305. package/dist/esm/features/scope-features.shared.schemas.d.ts.map +1 -1
  306. package/dist/esm/features/scope-features.shared.schemas.js.map +1 -1
  307. package/dist/esm/features/user-features.shared.resources-config.schemas.d.ts.map +1 -1
  308. package/dist/esm/features/user-features.shared.resources-config.schemas.js.map +1 -1
  309. package/dist/esm/files/file-remote-reference-link.shared.schemas.d.ts.map +1 -1
  310. package/dist/esm/files/file-remote-reference-link.shared.schemas.js.map +1 -1
  311. package/dist/esm/files/file-upload-grant.shared.schemas.d.ts.map +1 -1
  312. package/dist/esm/files/file-upload-grant.shared.schemas.js.map +1 -1
  313. package/dist/esm/files/files.shared.resources-config.schemas.d.ts.map +1 -1
  314. package/dist/esm/files/files.shared.resources-config.schemas.js.map +1 -1
  315. package/dist/esm/files/files.shared.schemas.d.ts.map +1 -1
  316. package/dist/esm/files/files.shared.schemas.js.map +1 -1
  317. package/dist/esm/files/files.shared.utils.d.ts.map +1 -1
  318. package/dist/esm/files/files.shared.utils.js.map +1 -1
  319. package/dist/esm/flows-actors/a2a-push-delivery-log.shared.resources-config.schemas.d.ts.map +1 -1
  320. package/dist/esm/flows-actors/a2a-push-delivery-log.shared.resources-config.schemas.js.map +1 -1
  321. package/dist/esm/flows-actors/a2a-push-delivery-log.shared.schemas.d.ts.map +1 -1
  322. package/dist/esm/flows-actors/a2a-push-delivery-log.shared.schemas.js.map +1 -1
  323. package/dist/esm/flows-actors/a2a-token-budget-state.shared.resources-config.schemas.d.ts.map +1 -1
  324. package/dist/esm/flows-actors/a2a-token-budget-state.shared.resources-config.schemas.js.map +1 -1
  325. package/dist/esm/flows-actors/a2a-token-budget-state.shared.schemas.d.ts.map +1 -1
  326. package/dist/esm/flows-actors/a2a-token-budget-state.shared.schemas.js.map +1 -1
  327. package/dist/esm/flows-actors/actors.shared.schemas.d.ts.map +1 -1
  328. package/dist/esm/flows-actors/actors.shared.schemas.js.map +1 -1
  329. package/dist/esm/flows-actors/agent-traceability.shared.schemas.d.ts.map +1 -1
  330. package/dist/esm/flows-actors/agent-traceability.shared.schemas.js.map +1 -1
  331. package/dist/esm/flows-actors/agent-work-decisions.shared.resources-config.schemas.d.ts.map +1 -1
  332. package/dist/esm/flows-actors/agent-work-decisions.shared.resources-config.schemas.js.map +1 -1
  333. package/dist/esm/flows-actors/agent-work-decisions.shared.schemas.d.ts.map +1 -1
  334. package/dist/esm/flows-actors/agent-work-decisions.shared.schemas.js.map +1 -1
  335. package/dist/esm/flows-actors/agents.shared.schemas.d.ts.map +1 -1
  336. package/dist/esm/flows-actors/agents.shared.schemas.js.map +1 -1
  337. package/dist/esm/flows-actors/autonomous-agents.shared.schemas.d.ts.map +1 -1
  338. package/dist/esm/flows-actors/autonomous-agents.shared.schemas.js.map +1 -1
  339. package/dist/esm/flows-actors/deliberation.shared.schemas.d.ts.map +1 -1
  340. package/dist/esm/flows-actors/deliberation.shared.schemas.js.map +1 -1
  341. package/dist/esm/flows-actors/execution-plan-readiness.shared.utils.d.ts.map +1 -1
  342. package/dist/esm/flows-actors/execution-plan-readiness.shared.utils.js.map +1 -1
  343. package/dist/esm/flows-actors/flows-actors-execution.shared.resources-config.schemas.d.ts.map +1 -1
  344. package/dist/esm/flows-actors/flows-actors-execution.shared.resources-config.schemas.js.map +1 -1
  345. package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.d.ts.map +1 -1
  346. package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.js.map +1 -1
  347. package/dist/esm/flows-actors/flows-actors-task.shared.resources-config.schemas.d.ts.map +1 -1
  348. package/dist/esm/flows-actors/flows-actors-task.shared.resources-config.schemas.js.map +1 -1
  349. package/dist/esm/flows-actors/flows-actors-task.shared.schemas.d.ts.map +1 -1
  350. package/dist/esm/flows-actors/flows-actors-task.shared.schemas.js.map +1 -1
  351. package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.d.ts.map +1 -1
  352. package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.js.map +1 -1
  353. package/dist/esm/flows-actors/flows-actors.configuration.shared.schemas.d.ts.map +1 -1
  354. package/dist/esm/flows-actors/flows-actors.configuration.shared.schemas.js.map +1 -1
  355. package/dist/esm/flows-actors/flows-actors.frontend.shared.schemas.d.ts.map +1 -1
  356. package/dist/esm/flows-actors/flows-actors.frontend.shared.schemas.js.map +1 -1
  357. package/dist/esm/flows-actors/flows-actors.io.shared.schemas.d.ts.map +1 -1
  358. package/dist/esm/flows-actors/flows-actors.io.shared.schemas.js.map +1 -1
  359. package/dist/esm/flows-actors/flows-actors.system.shared.definitions.d.ts.map +1 -1
  360. package/dist/esm/flows-actors/flows-actors.system.shared.definitions.js.map +1 -1
  361. package/dist/esm/flows-actors/flows-actors.system.shared.schemas.d.ts.map +1 -1
  362. package/dist/esm/flows-actors/flows-actors.system.shared.schemas.js.map +1 -1
  363. package/dist/esm/flows-actors/flows.shared.schemas.d.ts.map +1 -1
  364. package/dist/esm/flows-actors/flows.shared.schemas.js.map +1 -1
  365. package/dist/esm/flows-actors/human-decision.shared.schemas.d.ts.map +1 -1
  366. package/dist/esm/flows-actors/human-decision.shared.schemas.js.map +1 -1
  367. package/dist/esm/flows-actors/mcp-servers.shared.schemas.d.ts.map +1 -1
  368. package/dist/esm/flows-actors/mcp-servers.shared.schemas.js.map +1 -1
  369. package/dist/esm/flows-actors/model-call-attributions.shared.resources-config.schemas.d.ts.map +1 -1
  370. package/dist/esm/flows-actors/model-call-attributions.shared.resources-config.schemas.js.map +1 -1
  371. package/dist/esm/flows-actors/model-call-attributions.shared.schemas.d.ts.map +1 -1
  372. package/dist/esm/flows-actors/model-call-attributions.shared.schemas.js.map +1 -1
  373. package/dist/esm/flows-actors/model-cost-period-aggregates.shared.resources-config.schemas.d.ts.map +1 -1
  374. package/dist/esm/flows-actors/model-cost-period-aggregates.shared.resources-config.schemas.js.map +1 -1
  375. package/dist/esm/flows-actors/model-cost-period-aggregates.shared.schemas.d.ts.map +1 -1
  376. package/dist/esm/flows-actors/model-cost-period-aggregates.shared.schemas.js.map +1 -1
  377. package/dist/esm/flows-actors/model-cost-summary.shared.schemas.d.ts.map +1 -1
  378. package/dist/esm/flows-actors/model-cost-summary.shared.schemas.js.map +1 -1
  379. package/dist/esm/flows-actors/prompt-ir.shared.schemas.d.ts.map +1 -1
  380. package/dist/esm/flows-actors/prompt-ir.shared.schemas.js.map +1 -1
  381. package/dist/esm/flows-actors/provider-call-records.shared.resources-config.schemas.d.ts.map +1 -1
  382. package/dist/esm/flows-actors/provider-call-records.shared.resources-config.schemas.js.map +1 -1
  383. package/dist/esm/flows-actors/provider-call-records.shared.schemas.d.ts.map +1 -1
  384. package/dist/esm/flows-actors/provider-call-records.shared.schemas.js.map +1 -1
  385. package/dist/esm/flows-actors/review-deadlines.shared.schemas.d.ts.map +1 -1
  386. package/dist/esm/flows-actors/review-deadlines.shared.schemas.js.map +1 -1
  387. package/dist/esm/flows-actors/tasks.actors.shared.schemas.d.ts.map +1 -1
  388. package/dist/esm/flows-actors/tasks.actors.shared.schemas.js.map +1 -1
  389. package/dist/esm/flows-actors/work-attribution.shared.schemas.d.ts.map +1 -1
  390. package/dist/esm/flows-actors/work-attribution.shared.schemas.js.map +1 -1
  391. package/dist/esm/frontend-definitions/frontend-notification-custom-message-ref.definitions.d.ts.map +1 -1
  392. package/dist/esm/frontend-definitions/frontend-notification-custom-message-ref.definitions.js.map +1 -1
  393. package/dist/esm/frontend-definitions/settings-destination-ref.definitions.d.ts.map +1 -1
  394. package/dist/esm/frontend-definitions/settings-destination-ref.definitions.js.map +1 -1
  395. package/dist/esm/guidance/guidance-flow.shared.schemas.d.ts.map +1 -1
  396. package/dist/esm/guidance/guidance-flow.shared.schemas.js.map +1 -1
  397. package/dist/esm/guidance/guidance-state.shared.resources-config.schemas.d.ts.map +1 -1
  398. package/dist/esm/guidance/guidance-state.shared.resources-config.schemas.js.map +1 -1
  399. package/dist/esm/guidance/guidance-state.shared.schemas.d.ts.map +1 -1
  400. package/dist/esm/guidance/guidance-state.shared.schemas.js.map +1 -1
  401. package/dist/esm/guidance/guidance-state.shared.utils.d.ts.map +1 -1
  402. package/dist/esm/guidance/guidance-state.shared.utils.js.map +1 -1
  403. package/dist/esm/guidance/lifecycle-config.shared.schemas.d.ts.map +1 -1
  404. package/dist/esm/guidance/lifecycle-config.shared.schemas.js.map +1 -1
  405. package/dist/esm/guidance/lifecycle-state.shared.resources-config.schemas.d.ts.map +1 -1
  406. package/dist/esm/guidance/lifecycle-state.shared.resources-config.schemas.js.map +1 -1
  407. package/dist/esm/guidance/lifecycle-state.shared.schemas.d.ts.map +1 -1
  408. package/dist/esm/guidance/lifecycle-state.shared.schemas.js.map +1 -1
  409. package/dist/esm/guidance/milestone-builders.shared.d.ts.map +1 -1
  410. package/dist/esm/guidance/milestone-builders.shared.js.map +1 -1
  411. package/dist/esm/guidance/milestone-definition.shared.schemas.d.ts.map +1 -1
  412. package/dist/esm/guidance/milestone-definition.shared.schemas.js.map +1 -1
  413. package/dist/esm/guidance/progression-presentation.shared.schemas.d.ts.map +1 -1
  414. package/dist/esm/guidance/progression-presentation.shared.schemas.js.map +1 -1
  415. package/dist/esm/guidance/progression-state.shared.resources-config.schemas.d.ts.map +1 -1
  416. package/dist/esm/guidance/progression-state.shared.resources-config.schemas.js.map +1 -1
  417. package/dist/esm/guidance/progression-state.shared.schemas.d.ts.map +1 -1
  418. package/dist/esm/guidance/progression-state.shared.schemas.js.map +1 -1
  419. package/dist/esm/http-api-binding/http-api-binding-id.shared.utils.d.ts.map +1 -1
  420. package/dist/esm/http-api-binding/http-api-binding-id.shared.utils.js.map +1 -1
  421. package/dist/esm/http-api-binding/http-api-binding.shared.schemas.d.ts.map +1 -1
  422. package/dist/esm/http-api-binding/http-api-binding.shared.schemas.js.map +1 -1
  423. package/dist/esm/http-api-binding/http-api-erasure-stance.shared.d.ts.map +1 -1
  424. package/dist/esm/http-api-binding/http-api-erasure-stance.shared.js.map +1 -1
  425. package/dist/esm/http-api-binding/http-api-rest-write-operations.shared.schemas.d.ts.map +1 -1
  426. package/dist/esm/http-api-binding/http-api-rest-write-operations.shared.schemas.js.map +1 -1
  427. package/dist/esm/http-api-binding/http-api-transport-dialect.shared.d.ts.map +1 -1
  428. package/dist/esm/http-api-binding/http-api-transport-dialect.shared.js.map +1 -1
  429. package/dist/esm/http-api-binding/read-through-engine-anchors.shared.d.ts.map +1 -1
  430. package/dist/esm/http-api-binding/read-through-engine-anchors.shared.js.map +1 -1
  431. package/dist/esm/i18n/application-config-vocabulary.shared.d.ts.map +1 -1
  432. package/dist/esm/i18n/application-config-vocabulary.shared.js.map +1 -1
  433. package/dist/esm/i18n/engine-open-vocabulary-values.shared.d.ts.map +1 -1
  434. package/dist/esm/i18n/engine-open-vocabulary-values.shared.js.map +1 -1
  435. package/dist/esm/i18n/engine-open-vocabulary.shared.d.ts.map +1 -1
  436. package/dist/esm/i18n/engine-open-vocabulary.shared.js.map +1 -1
  437. package/dist/esm/i18n/interpolate-label-params.shared.utils.d.ts.map +1 -1
  438. package/dist/esm/i18n/interpolate-label-params.shared.utils.js.map +1 -1
  439. package/dist/esm/i18n/labelling.dto.shared.schemas.d.ts.map +1 -1
  440. package/dist/esm/i18n/labelling.dto.shared.schemas.js.map +1 -1
  441. package/dist/esm/inbound/conversation-threads.shared.resources-config.schemas.d.ts.map +1 -1
  442. package/dist/esm/inbound/conversation-threads.shared.resources-config.schemas.js.map +1 -1
  443. package/dist/esm/inbound/conversation-threads.shared.schemas.d.ts.map +1 -1
  444. package/dist/esm/inbound/conversation-threads.shared.schemas.js.map +1 -1
  445. package/dist/esm/inbound/inbound-channels.shared.schemas.d.ts.map +1 -1
  446. package/dist/esm/inbound/inbound-channels.shared.schemas.js.map +1 -1
  447. package/dist/esm/inbound/inbound-delivery.shared.resources-config.schemas.d.ts.map +1 -1
  448. package/dist/esm/inbound/inbound-delivery.shared.resources-config.schemas.js.map +1 -1
  449. package/dist/esm/inbound/inbound-delivery.shared.schemas.d.ts.map +1 -1
  450. package/dist/esm/inbound/inbound-delivery.shared.schemas.js.map +1 -1
  451. package/dist/esm/inbound/inbound-endpoint-env.shared.d.ts.map +1 -1
  452. package/dist/esm/inbound/inbound-endpoint-env.shared.js.map +1 -1
  453. package/dist/esm/index.d.ts.map +1 -1
  454. package/dist/esm/index.js.map +1 -1
  455. package/dist/esm/meta-workflows/actions.meta-workflows.shared.schemas.d.ts.map +1 -1
  456. package/dist/esm/meta-workflows/actions.meta-workflows.shared.schemas.js.map +1 -1
  457. package/dist/esm/meta-workflows/catalog.meta-workflows.shared.schemas.d.ts.map +1 -1
  458. package/dist/esm/meta-workflows/catalog.meta-workflows.shared.schemas.js.map +1 -1
  459. package/dist/esm/meta-workflows/coding-tasks.meta-workflows.shared.schemas.d.ts.map +1 -1
  460. package/dist/esm/meta-workflows/coding-tasks.meta-workflows.shared.schemas.js.map +1 -1
  461. package/dist/esm/meta-workflows/context-selection.meta-workflows.shared.schemas.d.ts.map +1 -1
  462. package/dist/esm/meta-workflows/context-selection.meta-workflows.shared.schemas.js.map +1 -1
  463. package/dist/esm/meta-workflows/decisions.meta-workflows.shared.schemas.d.ts.map +1 -1
  464. package/dist/esm/meta-workflows/decisions.meta-workflows.shared.schemas.js.map +1 -1
  465. package/dist/esm/meta-workflows/orchestration.meta-workflows.shared.schemas.d.ts.map +1 -1
  466. package/dist/esm/meta-workflows/orchestration.meta-workflows.shared.schemas.js.map +1 -1
  467. package/dist/esm/meta-workflows/portable-primitives.meta-workflows.shared.schemas.d.ts.map +1 -1
  468. package/dist/esm/meta-workflows/portable-primitives.meta-workflows.shared.schemas.js.map +1 -1
  469. package/dist/esm/meta-workflows.exports.d.ts.map +1 -1
  470. package/dist/esm/meta-workflows.exports.js.map +1 -1
  471. package/dist/esm/monitoring/monitoring.shared.schemas.d.ts.map +1 -1
  472. package/dist/esm/monitoring/monitoring.shared.schemas.js.map +1 -1
  473. package/dist/esm/notifications/email/email-context.shared.schemas.d.ts.map +1 -1
  474. package/dist/esm/notifications/email/email-context.shared.schemas.js.map +1 -1
  475. package/dist/esm/notifications/email/email-submission.shared.enums.d.ts.map +1 -1
  476. package/dist/esm/notifications/email/email-submission.shared.enums.js.map +1 -1
  477. package/dist/esm/notifications/email/email-template-registry.shared.schemas.d.ts.map +1 -1
  478. package/dist/esm/notifications/email/email-template-registry.shared.schemas.js.map +1 -1
  479. package/dist/esm/notifications/email/email-template.shared.enums.d.ts.map +1 -1
  480. package/dist/esm/notifications/email/email-template.shared.enums.js.map +1 -1
  481. package/dist/esm/notifications/inbound-email/inbound-email.shared.resources-config.schemas.d.ts.map +1 -1
  482. package/dist/esm/notifications/inbound-email/inbound-email.shared.resources-config.schemas.js.map +1 -1
  483. package/dist/esm/notifications/inbound-email/inbound-email.shared.schemas.d.ts.map +1 -1
  484. package/dist/esm/notifications/inbound-email/inbound-email.shared.schemas.js.map +1 -1
  485. package/dist/esm/notifications/m2m/m2m-webhook-delivery-contract.shared.d.ts.map +1 -1
  486. package/dist/esm/notifications/m2m/m2m-webhook-delivery-contract.shared.js.map +1 -1
  487. package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.resources-config.schemas.d.ts.map +1 -1
  488. package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.resources-config.schemas.js.map +1 -1
  489. package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.schemas.d.ts.map +1 -1
  490. package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.schemas.js.map +1 -1
  491. package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.d.ts.map +1 -1
  492. package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.js.map +1 -1
  493. package/dist/esm/notifications/m2m/webhook-config.shared.schemas.d.ts.map +1 -1
  494. package/dist/esm/notifications/m2m/webhook-config.shared.schemas.js.map +1 -1
  495. package/dist/esm/notifications/notification-badges.core.definitions.d.ts.map +1 -1
  496. package/dist/esm/notifications/notification-badges.core.definitions.js.map +1 -1
  497. package/dist/esm/notifications/notification-badges.schemas.d.ts.map +1 -1
  498. package/dist/esm/notifications/notification-badges.schemas.js.map +1 -1
  499. package/dist/esm/notifications/notification-badges.shared.resources-config.schemas.d.ts.map +1 -1
  500. package/dist/esm/notifications/notification-badges.shared.resources-config.schemas.js.map +1 -1
  501. package/dist/esm/notifications/notifications.shared.schemas.d.ts.map +1 -1
  502. package/dist/esm/notifications/notifications.shared.schemas.js.map +1 -1
  503. package/dist/esm/organizations/application-owner-organization.shared.schemas.d.ts.map +1 -1
  504. package/dist/esm/organizations/application-owner-organization.shared.schemas.js.map +1 -1
  505. package/dist/esm/organizations/organization-features.shared.resources-config.schemas.d.ts.map +1 -1
  506. package/dist/esm/organizations/organization-features.shared.resources-config.schemas.js.map +1 -1
  507. package/dist/esm/organizations/organization-features.shared.schemas.d.ts.map +1 -1
  508. package/dist/esm/organizations/organization-features.shared.schemas.js.map +1 -1
  509. package/dist/esm/organizations/organization-members.shared.resources-config.schemas.d.ts.map +1 -1
  510. package/dist/esm/organizations/organization-members.shared.resources-config.schemas.js.map +1 -1
  511. package/dist/esm/organizations/organization-members.shared.schemas.d.ts.map +1 -1
  512. package/dist/esm/organizations/organization-members.shared.schemas.js.map +1 -1
  513. package/dist/esm/organizations/organization-notifications.shared.resources-config.schemas.d.ts.map +1 -1
  514. package/dist/esm/organizations/organization-notifications.shared.resources-config.schemas.js.map +1 -1
  515. package/dist/esm/organizations/organization-notifications.shared.schemas.d.ts.map +1 -1
  516. package/dist/esm/organizations/organization-notifications.shared.schemas.js.map +1 -1
  517. package/dist/esm/organizations/organization-preferences.shared.resources-config.schemas.d.ts.map +1 -1
  518. package/dist/esm/organizations/organization-preferences.shared.resources-config.schemas.js.map +1 -1
  519. package/dist/esm/organizations/organization-preferences.shared.schemas.d.ts.map +1 -1
  520. package/dist/esm/organizations/organization-preferences.shared.schemas.js.map +1 -1
  521. package/dist/esm/organizations/organization-profile.shared.resources-config.schemas.d.ts.map +1 -1
  522. package/dist/esm/organizations/organization-profile.shared.resources-config.schemas.js.map +1 -1
  523. package/dist/esm/organizations/organization-profile.shared.schemas.d.ts.map +1 -1
  524. package/dist/esm/organizations/organization-profile.shared.schemas.js.map +1 -1
  525. package/dist/esm/organizations/organization-unit-inheritance.shared.d.ts.map +1 -1
  526. package/dist/esm/organizations/organization-unit-inheritance.shared.js.map +1 -1
  527. package/dist/esm/organizations/organization-unit-members.shared.resources-config.schemas.d.ts.map +1 -1
  528. package/dist/esm/organizations/organization-unit-members.shared.resources-config.schemas.js.map +1 -1
  529. package/dist/esm/organizations/organization-unit-members.shared.schemas.d.ts.map +1 -1
  530. package/dist/esm/organizations/organization-unit-members.shared.schemas.js.map +1 -1
  531. package/dist/esm/organizations/organization-unit-narrowing-decision.shared.d.ts.map +1 -1
  532. package/dist/esm/organizations/organization-unit-narrowing-decision.shared.js.map +1 -1
  533. package/dist/esm/organizations/organization-unit-narrowing.example.d.ts.map +1 -1
  534. package/dist/esm/organizations/organization-unit-narrowing.example.js.map +1 -1
  535. package/dist/esm/organizations/organization-unit-narrowing.shared.d.ts.map +1 -1
  536. package/dist/esm/organizations/organization-unit-narrowing.shared.js.map +1 -1
  537. package/dist/esm/organizations/organization-units.shared.path.d.ts.map +1 -1
  538. package/dist/esm/organizations/organization-units.shared.path.js.map +1 -1
  539. package/dist/esm/organizations/organization-units.shared.resources-config.schemas.d.ts.map +1 -1
  540. package/dist/esm/organizations/organization-units.shared.resources-config.schemas.js.map +1 -1
  541. package/dist/esm/organizations/organization-units.shared.schemas.d.ts.map +1 -1
  542. package/dist/esm/organizations/organization-units.shared.schemas.js.map +1 -1
  543. package/dist/esm/organizations/organizations.shared.resources-config.schemas.d.ts.map +1 -1
  544. package/dist/esm/organizations/organizations.shared.resources-config.schemas.js.map +1 -1
  545. package/dist/esm/organizations/organizations.shared.schemas.d.ts.map +1 -1
  546. package/dist/esm/organizations/organizations.shared.schemas.js.map +1 -1
  547. package/dist/esm/organizations/service-provider-activity-feed.shared.resources-config.schemas.d.ts.map +1 -1
  548. package/dist/esm/organizations/service-provider-activity-feed.shared.resources-config.schemas.js.map +1 -1
  549. package/dist/esm/organizations/service-provider-activity-feed.shared.schemas.d.ts.map +1 -1
  550. package/dist/esm/organizations/service-provider-activity-feed.shared.schemas.js.map +1 -1
  551. package/dist/esm/organizations/service-provider-capability-grants.shared.resources-config.schemas.d.ts.map +1 -1
  552. package/dist/esm/organizations/service-provider-capability-grants.shared.resources-config.schemas.js.map +1 -1
  553. package/dist/esm/organizations/service-provider-capability-grants.shared.schemas.d.ts.map +1 -1
  554. package/dist/esm/organizations/service-provider-capability-grants.shared.schemas.js.map +1 -1
  555. package/dist/esm/organizations/service-provider-client-controls.shared.schemas.d.ts.map +1 -1
  556. package/dist/esm/organizations/service-provider-client-controls.shared.schemas.js.map +1 -1
  557. package/dist/esm/organizations/service-provider-relationships.shared.resources-config.schemas.d.ts.map +1 -1
  558. package/dist/esm/organizations/service-provider-relationships.shared.resources-config.schemas.js.map +1 -1
  559. package/dist/esm/organizations/service-provider-relationships.shared.schemas.d.ts.map +1 -1
  560. package/dist/esm/organizations/service-provider-relationships.shared.schemas.js.map +1 -1
  561. package/dist/esm/organizations/tenant-teardown-config.shared.schemas.d.ts.map +1 -1
  562. package/dist/esm/organizations/tenant-teardown-config.shared.schemas.js.map +1 -1
  563. package/dist/esm/provider-registration-runtime.exports.d.ts.map +1 -1
  564. package/dist/esm/provider-registration-runtime.exports.js.map +1 -1
  565. package/dist/esm/public-runtime/index.d.ts.map +1 -1
  566. package/dist/esm/public-runtime/index.js.map +1 -1
  567. package/dist/esm/queue/jobs.shared.resources-config.schemas.d.ts.map +1 -1
  568. package/dist/esm/queue/jobs.shared.resources-config.schemas.js.map +1 -1
  569. package/dist/esm/queue/jobs.shared.schemas.d.ts.map +1 -1
  570. package/dist/esm/queue/jobs.shared.schemas.js.map +1 -1
  571. package/dist/esm/queue/jobs.shared.utils.d.ts.map +1 -1
  572. package/dist/esm/queue/jobs.shared.utils.js.map +1 -1
  573. package/dist/esm/queue/queues.shared.schemas.d.ts.map +1 -1
  574. package/dist/esm/queue/queues.shared.schemas.js.map +1 -1
  575. package/dist/esm/queue/queues.shared.utils.d.ts.map +1 -1
  576. package/dist/esm/queue/queues.shared.utils.js.map +1 -1
  577. package/dist/esm/queue/rabbitmq-queue-args.shared.d.ts.map +1 -1
  578. package/dist/esm/queue/rabbitmq-queue-args.shared.js.map +1 -1
  579. package/dist/esm/rag/rag-retrieval-health.shared.d.ts.map +1 -1
  580. package/dist/esm/rag/rag-retrieval-health.shared.js.map +1 -1
  581. package/dist/esm/requests/header-keys.shared.d.ts.map +1 -1
  582. package/dist/esm/requests/header-keys.shared.js.map +1 -1
  583. package/dist/esm/requests/http-requests.shared.d.ts.map +1 -1
  584. package/dist/esm/requests/http-requests.shared.js.map +1 -1
  585. package/dist/esm/requests/idempotency-key.shared.d.ts.map +1 -1
  586. package/dist/esm/requests/idempotency-key.shared.js.map +1 -1
  587. package/dist/esm/requests/manual-controllers-routes-documentation.d.ts.map +1 -1
  588. package/dist/esm/requests/manual-controllers-routes-documentation.js.map +1 -1
  589. package/dist/esm/requests/manual-controllers-routes-urls.d.ts.map +1 -1
  590. package/dist/esm/requests/manual-controllers-routes-urls.js.map +1 -1
  591. package/dist/esm/requests/rate-limits.shared.schemas.d.ts.map +1 -1
  592. package/dist/esm/requests/rate-limits.shared.schemas.js.map +1 -1
  593. package/dist/esm/requests/websocket.shared.schemas.d.ts.map +1 -1
  594. package/dist/esm/requests/websocket.shared.schemas.js.map +1 -1
  595. package/dist/esm/resources/child-operations.shared.schemas.d.ts.map +1 -1
  596. package/dist/esm/resources/child-operations.shared.schemas.js.map +1 -1
  597. package/dist/esm/resources/collection-query-parameters.shared.d.ts.map +1 -1
  598. package/dist/esm/resources/collection-query-parameters.shared.js.map +1 -1
  599. package/dist/esm/resources/context-policy.shared.schemas.d.ts.map +1 -1
  600. package/dist/esm/resources/context-policy.shared.schemas.js.map +1 -1
  601. package/dist/esm/resources/embedded-resource-mark.shared.utils.d.ts.map +1 -1
  602. package/dist/esm/resources/embedded-resource-mark.shared.utils.js.map +1 -1
  603. package/dist/esm/resources/relationship-display.shared.schemas.d.ts.map +1 -1
  604. package/dist/esm/resources/relationship-display.shared.schemas.js.map +1 -1
  605. package/dist/esm/resources/resources-config.shared.factory.d.ts.map +1 -1
  606. package/dist/esm/resources/resources-config.shared.factory.js.map +1 -1
  607. package/dist/esm/resources/resources-config.shared.schemas.d.ts.map +1 -1
  608. package/dist/esm/resources/resources-config.shared.schemas.js.map +1 -1
  609. package/dist/esm/resources/resources-registry.shared.core.definitions.d.ts.map +1 -1
  610. package/dist/esm/resources/resources-registry.shared.core.definitions.js.map +1 -1
  611. package/dist/esm/resources/resources-relationships.shared.factory.d.ts.map +1 -1
  612. package/dist/esm/resources/resources-relationships.shared.factory.js.map +1 -1
  613. package/dist/esm/resources/resources-serialization.shared.schemas.d.ts.map +1 -1
  614. package/dist/esm/resources/resources-serialization.shared.schemas.js.map +1 -1
  615. package/dist/esm/resources/resources.shared.core.definitions.d.ts.map +1 -1
  616. package/dist/esm/resources/resources.shared.core.definitions.js.map +1 -1
  617. package/dist/esm/resources/resources.shared.schemas.d.ts.map +1 -1
  618. package/dist/esm/resources/resources.shared.schemas.js.map +1 -1
  619. package/dist/esm/resources/resources.shared.utils.d.ts.map +1 -1
  620. package/dist/esm/resources/resources.shared.utils.js.map +1 -1
  621. package/dist/esm/resources/utils/collection-export.shared.utils.d.ts.map +1 -1
  622. package/dist/esm/resources/utils/collection-export.shared.utils.js.map +1 -1
  623. package/dist/esm/resources/utils/composition-cascade-deletability.validation.d.ts.map +1 -1
  624. package/dist/esm/resources/utils/composition-cascade-deletability.validation.js.map +1 -1
  625. package/dist/esm/resources/utils/composition-seedability.validation.d.ts.map +1 -1
  626. package/dist/esm/resources/utils/composition-seedability.validation.js.map +1 -1
  627. package/dist/esm/resources/utils/context-addressed-composition-singleton.shared.utils.d.ts.map +1 -1
  628. package/dist/esm/resources/utils/context-addressed-composition-singleton.shared.utils.js.map +1 -1
  629. package/dist/esm/resources/utils/dependent-lifecycle-classification.validation.d.ts.map +1 -1
  630. package/dist/esm/resources/utils/dependent-lifecycle-classification.validation.js.map +1 -1
  631. package/dist/esm/resources/utils/duplicate-relationship-registration.validation.d.ts.map +1 -1
  632. package/dist/esm/resources/utils/duplicate-relationship-registration.validation.js.map +1 -1
  633. package/dist/esm/resources/utils/field-value-disclosure.utils.d.ts.map +1 -1
  634. package/dist/esm/resources/utils/field-value-disclosure.utils.js.map +1 -1
  635. package/dist/esm/resources/utils/http-api-write-declaration.shared.utils.d.ts.map +1 -1
  636. package/dist/esm/resources/utils/http-api-write-declaration.shared.utils.js.map +1 -1
  637. package/dist/esm/resources/utils/initiator-stamped-field-satisfiability.validation.d.ts.map +1 -1
  638. package/dist/esm/resources/utils/initiator-stamped-field-satisfiability.validation.js.map +1 -1
  639. package/dist/esm/resources/utils/no-subject-data-stance-coherence.shared.utils.d.ts.map +1 -1
  640. package/dist/esm/resources/utils/no-subject-data-stance-coherence.shared.utils.js.map +1 -1
  641. package/dist/esm/resources/utils/persistence-adapter-discrimination.shared.utils.d.ts.map +1 -1
  642. package/dist/esm/resources/utils/persistence-adapter-discrimination.shared.utils.js.map +1 -1
  643. package/dist/esm/resources/utils/populated-file-fields.shared.utils.d.ts.map +1 -1
  644. package/dist/esm/resources/utils/populated-file-fields.shared.utils.js.map +1 -1
  645. package/dist/esm/resources/utils/repository-dto-builder.utils.d.ts.map +1 -1
  646. package/dist/esm/resources/utils/repository-dto-builder.utils.js.map +1 -1
  647. package/dist/esm/resources/utils/request-schema-field-carriage.shared.utils.d.ts.map +1 -1
  648. package/dist/esm/resources/utils/request-schema-field-carriage.shared.utils.js.map +1 -1
  649. package/dist/esm/resources/utils/required-fk-fillability.validation.d.ts.map +1 -1
  650. package/dist/esm/resources/utils/required-fk-fillability.validation.js.map +1 -1
  651. package/dist/esm/resources/utils/resource-operation-type-guards.utils.d.ts.map +1 -1
  652. package/dist/esm/resources/utils/resource-operation-type-guards.utils.js.map +1 -1
  653. package/dist/esm/resources/utils/resource-polymorphism.factory.d.ts.map +1 -1
  654. package/dist/esm/resources/utils/resource-polymorphism.factory.js.map +1 -1
  655. package/dist/esm/resources/utils/resource-polymorphism.relationships.d.ts.map +1 -1
  656. package/dist/esm/resources/utils/resource-polymorphism.relationships.js.map +1 -1
  657. package/dist/esm/resources/utils/resource-polymorphism.schemas.d.ts.map +1 -1
  658. package/dist/esm/resources/utils/resource-polymorphism.schemas.js.map +1 -1
  659. package/dist/esm/resources/utils/resource-polymorphism.utils.d.ts.map +1 -1
  660. package/dist/esm/resources/utils/resource-polymorphism.utils.js.map +1 -1
  661. package/dist/esm/resources/utils/resource-subtree.utils.d.ts.map +1 -1
  662. package/dist/esm/resources/utils/resource-subtree.utils.js.map +1 -1
  663. package/dist/esm/resources/utils/resources-config-context-needs.utils.d.ts.map +1 -1
  664. package/dist/esm/resources/utils/resources-config-context-needs.utils.js.map +1 -1
  665. package/dist/esm/resources/utils/resources-config-naming.utils.d.ts.map +1 -1
  666. package/dist/esm/resources/utils/resources-config-naming.utils.js.map +1 -1
  667. package/dist/esm/resources/utils/resources-config-operations.dtos-builder.utils.d.ts.map +1 -1
  668. package/dist/esm/resources/utils/resources-config-operations.dtos-builder.utils.js.map +1 -1
  669. package/dist/esm/resources/utils/resources-config-operations.path.utils.d.ts.map +1 -1
  670. package/dist/esm/resources/utils/resources-config-operations.path.utils.js.map +1 -1
  671. package/dist/esm/resources/utils/resources-config-operations.urls-builder.utils.d.ts.map +1 -1
  672. package/dist/esm/resources/utils/resources-config-operations.urls-builder.utils.js.map +1 -1
  673. package/dist/esm/resources/utils/resources-config-operations.utils.d.ts.map +1 -1
  674. package/dist/esm/resources/utils/resources-config-operations.utils.js.map +1 -1
  675. package/dist/esm/resources/utils/resources-serialization.utils.d.ts.map +1 -1
  676. package/dist/esm/resources/utils/resources-serialization.utils.js.map +1 -1
  677. package/dist/esm/resources/utils/resources-summary.utils.d.ts.map +1 -1
  678. package/dist/esm/resources/utils/resources-summary.utils.js.map +1 -1
  679. package/dist/esm/resources/utils/schema-family-builder.utils.d.ts.map +1 -1
  680. package/dist/esm/resources/utils/schema-family-builder.utils.js.map +1 -1
  681. package/dist/esm/resources/utils/schema-type-inference.utils.d.ts.map +1 -1
  682. package/dist/esm/resources/utils/schema-type-inference.utils.js.map +1 -1
  683. package/dist/esm/resources/utils/schema-type-utils.d.ts.map +1 -1
  684. package/dist/esm/resources/utils/schema-type-utils.js.map +1 -1
  685. package/dist/esm/resources/utils/schema-variant-resolver.utils.d.ts.map +1 -1
  686. package/dist/esm/resources/utils/schema-variant-resolver.utils.js.map +1 -1
  687. package/dist/esm/resources/utils/shared-persistence-collection.utils.d.ts.map +1 -1
  688. package/dist/esm/resources/utils/shared-persistence-collection.utils.js.map +1 -1
  689. package/dist/esm/resources/utils/templatable-file-fields.shared.utils.d.ts.map +1 -1
  690. package/dist/esm/resources/utils/templatable-file-fields.shared.utils.js.map +1 -1
  691. package/dist/esm/resources/work-unit.shared.schemas.d.ts.map +1 -1
  692. package/dist/esm/resources/work-unit.shared.schemas.js.map +1 -1
  693. package/dist/esm/runtime/domain-module.shared.definitions.d.ts.map +1 -1
  694. package/dist/esm/runtime/domain-module.shared.definitions.js.map +1 -1
  695. package/dist/esm/runtime/execution-context.shared.schemas.d.ts.map +1 -1
  696. package/dist/esm/runtime/execution-context.shared.schemas.js.map +1 -1
  697. package/dist/esm/runtime/runtime.shared.schemas.d.ts.map +1 -1
  698. package/dist/esm/runtime/runtime.shared.schemas.js.map +1 -1
  699. package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.d.ts.map +1 -1
  700. package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.js.map +1 -1
  701. package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.d.ts.map +1 -1
  702. package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.js.map +1 -1
  703. package/dist/esm/security/api-keys/api-keys.shared.schemas.d.ts.map +1 -1
  704. package/dist/esm/security/api-keys/api-keys.shared.schemas.js.map +1 -1
  705. package/dist/esm/security/authentications/anonymous-session/anonymous-session.shared.contract.d.ts.map +1 -1
  706. package/dist/esm/security/authentications/anonymous-session/anonymous-session.shared.contract.js.map +1 -1
  707. package/dist/esm/security/authentications/authentication.shared.dto.schemas.d.ts.map +1 -1
  708. package/dist/esm/security/authentications/authentication.shared.dto.schemas.js.map +1 -1
  709. package/dist/esm/security/authentications/authentication.shared.schemas.d.ts.map +1 -1
  710. package/dist/esm/security/authentications/authentication.shared.schemas.js.map +1 -1
  711. package/dist/esm/security/authentications/authentication.shared.utils.d.ts.map +1 -1
  712. package/dist/esm/security/authentications/authentication.shared.utils.js.map +1 -1
  713. package/dist/esm/security/authentications/consumable-token.shared.schemas.d.ts.map +1 -1
  714. package/dist/esm/security/authentications/consumable-token.shared.schemas.js.map +1 -1
  715. package/dist/esm/security/authentications/cross-frontend-handoff.shared.dto.schemas.d.ts.map +1 -1
  716. package/dist/esm/security/authentications/cross-frontend-handoff.shared.dto.schemas.js.map +1 -1
  717. package/dist/esm/security/authentications/mfa-backup-code-contract.shared.d.ts.map +1 -1
  718. package/dist/esm/security/authentications/mfa-backup-code-contract.shared.js.map +1 -1
  719. package/dist/esm/security/authentications/password-blocklist.shared.utils.d.ts.map +1 -1
  720. package/dist/esm/security/authentications/password-blocklist.shared.utils.js.map +1 -1
  721. package/dist/esm/security/authentications/password-reset.shared.dto.schemas.d.ts.map +1 -1
  722. package/dist/esm/security/authentications/password-reset.shared.dto.schemas.js.map +1 -1
  723. package/dist/esm/security/authentications/registration.shared.dto.schemas.d.ts.map +1 -1
  724. package/dist/esm/security/authentications/registration.shared.dto.schemas.js.map +1 -1
  725. package/dist/esm/security/authentications/same-origin-redirect-path.shared.d.ts.map +1 -1
  726. package/dist/esm/security/authentications/same-origin-redirect-path.shared.js.map +1 -1
  727. package/dist/esm/security/authentications/scim/scim-organization-unit-mapping.shared.d.ts.map +1 -1
  728. package/dist/esm/security/authentications/scim/scim-organization-unit-mapping.shared.js.map +1 -1
  729. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.resources-config.schemas.d.ts.map +1 -1
  730. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.resources-config.schemas.js.map +1 -1
  731. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.d.ts.map +1 -1
  732. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.js.map +1 -1
  733. package/dist/esm/security/authentications/scim/scim-tokens.shared.resources-config.schemas.d.ts.map +1 -1
  734. package/dist/esm/security/authentications/scim/scim-tokens.shared.resources-config.schemas.js.map +1 -1
  735. package/dist/esm/security/authentications/scim/scim-tokens.shared.schemas.d.ts.map +1 -1
  736. package/dist/esm/security/authentications/scim/scim-tokens.shared.schemas.js.map +1 -1
  737. package/dist/esm/security/authentications/service-provider-client-authentication.shared.schemas.d.ts.map +1 -1
  738. package/dist/esm/security/authentications/service-provider-client-authentication.shared.schemas.js.map +1 -1
  739. package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.resources-config.schemas.d.ts.map +1 -1
  740. package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.resources-config.schemas.js.map +1 -1
  741. package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.schemas.d.ts.map +1 -1
  742. package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.schemas.js.map +1 -1
  743. package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.resources-config.schemas.d.ts.map +1 -1
  744. package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.resources-config.schemas.js.map +1 -1
  745. package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.schemas.d.ts.map +1 -1
  746. package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.schemas.js.map +1 -1
  747. package/dist/esm/security/authentications/siem/siem-delivery-reliability-contract.shared.d.ts.map +1 -1
  748. package/dist/esm/security/authentications/siem/siem-delivery-reliability-contract.shared.js.map +1 -1
  749. package/dist/esm/security/authentications/siem/siem-export-config.shared.resources-config.schemas.d.ts.map +1 -1
  750. package/dist/esm/security/authentications/siem/siem-export-config.shared.resources-config.schemas.js.map +1 -1
  751. package/dist/esm/security/authentications/siem/siem-export-config.shared.schemas.d.ts.map +1 -1
  752. package/dist/esm/security/authentications/siem/siem-export-config.shared.schemas.js.map +1 -1
  753. package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.d.ts.map +1 -1
  754. package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.js.map +1 -1
  755. package/dist/esm/security/authentications/sso/sso-config.shared.schemas.d.ts.map +1 -1
  756. package/dist/esm/security/authentications/sso/sso-config.shared.schemas.js.map +1 -1
  757. package/dist/esm/security/authentications/sso/sso-connection.shared.resources-config.schemas.d.ts.map +1 -1
  758. package/dist/esm/security/authentications/sso/sso-connection.shared.resources-config.schemas.js.map +1 -1
  759. package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.d.ts.map +1 -1
  760. package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.js.map +1 -1
  761. package/dist/esm/security/authorizations/administrative-continuity.shared.schemas.d.ts.map +1 -1
  762. package/dist/esm/security/authorizations/administrative-continuity.shared.schemas.js.map +1 -1
  763. package/dist/esm/security/authorizations/application-access-grants.shared.resources-config.schemas.d.ts.map +1 -1
  764. package/dist/esm/security/authorizations/application-access-grants.shared.resources-config.schemas.js.map +1 -1
  765. package/dist/esm/security/authorizations/application-access-grants.shared.schemas.d.ts.map +1 -1
  766. package/dist/esm/security/authorizations/application-access-grants.shared.schemas.js.map +1 -1
  767. package/dist/esm/security/authorizations/platform-access-grants.shared.resources-config.schemas.d.ts.map +1 -1
  768. package/dist/esm/security/authorizations/platform-access-grants.shared.resources-config.schemas.js.map +1 -1
  769. package/dist/esm/security/authorizations/platform-access-grants.shared.schemas.d.ts.map +1 -1
  770. package/dist/esm/security/authorizations/platform-access-grants.shared.schemas.js.map +1 -1
  771. package/dist/esm/security/authorizations/roles.shared.defaults.d.ts.map +1 -1
  772. package/dist/esm/security/authorizations/roles.shared.defaults.js.map +1 -1
  773. package/dist/esm/security/authorizations/roles.shared.schemas.d.ts.map +1 -1
  774. package/dist/esm/security/authorizations/roles.shared.schemas.js.map +1 -1
  775. package/dist/esm/security/authorizations/roles.shared.utils.d.ts.map +1 -1
  776. package/dist/esm/security/authorizations/roles.shared.utils.js.map +1 -1
  777. package/dist/esm/security/connected-accounts/provider-connection-listing.shared.schemas.d.ts.map +1 -1
  778. package/dist/esm/security/connected-accounts/provider-connection-listing.shared.schemas.js.map +1 -1
  779. package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.d.ts.map +1 -1
  780. package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.js.map +1 -1
  781. package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.d.ts.map +1 -1
  782. package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.js.map +1 -1
  783. package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.d.ts.map +1 -1
  784. package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.js.map +1 -1
  785. package/dist/esm/security/credential-rotation-grace.shared.utils.d.ts.map +1 -1
  786. package/dist/esm/security/credential-rotation-grace.shared.utils.js.map +1 -1
  787. package/dist/esm/security/crypto-keys/crypto-keys.shared.schemas.d.ts.map +1 -1
  788. package/dist/esm/security/crypto-keys/crypto-keys.shared.schemas.js.map +1 -1
  789. package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.d.ts.map +1 -1
  790. package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.js.map +1 -1
  791. package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.d.ts.map +1 -1
  792. package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.js.map +1 -1
  793. package/dist/esm/security/oauth-clients/oauth-clients.shared.schemas.d.ts.map +1 -1
  794. package/dist/esm/security/oauth-clients/oauth-clients.shared.schemas.js.map +1 -1
  795. package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.resources-config.schemas.d.ts.map +1 -1
  796. package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.resources-config.schemas.js.map +1 -1
  797. package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.schemas.d.ts.map +1 -1
  798. package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.schemas.js.map +1 -1
  799. package/dist/esm/security/oauth-clients/oauth-resource-server.shared.schemas.d.ts.map +1 -1
  800. package/dist/esm/security/oauth-clients/oauth-resource-server.shared.schemas.js.map +1 -1
  801. package/dist/esm/security/outbound-target-control.shared.schemas.d.ts.map +1 -1
  802. package/dist/esm/security/outbound-target-control.shared.schemas.js.map +1 -1
  803. package/dist/esm/security/submission-challenge/submission-challenge.shared.d.ts.map +1 -1
  804. package/dist/esm/security/submission-challenge/submission-challenge.shared.js.map +1 -1
  805. package/dist/esm/systems-of-record/system-of-record-actions.shared.schemas.d.ts.map +1 -1
  806. package/dist/esm/systems-of-record/system-of-record-actions.shared.schemas.js.map +1 -1
  807. package/dist/esm/systems-of-record/system-of-record-credential-kind.shared.d.ts.map +1 -1
  808. package/dist/esm/systems-of-record/system-of-record-credential-kind.shared.js.map +1 -1
  809. package/dist/esm/systems-of-record/system-of-record-declaration.shared.schemas.d.ts.map +1 -1
  810. package/dist/esm/systems-of-record/system-of-record-declaration.shared.schemas.js.map +1 -1
  811. package/dist/esm/systems-of-record/system-of-record-env.shared.d.ts.map +1 -1
  812. package/dist/esm/systems-of-record/system-of-record-env.shared.js.map +1 -1
  813. package/dist/esm/systems-of-record/system-of-record-error-codes.shared.d.ts.map +1 -1
  814. package/dist/esm/systems-of-record/system-of-record-error-codes.shared.js.map +1 -1
  815. package/dist/esm/systems-of-record/system-of-record-facet.shared.schemas.d.ts.map +1 -1
  816. package/dist/esm/systems-of-record/system-of-record-facet.shared.schemas.js.map +1 -1
  817. package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.resources-config.schemas.d.ts.map +1 -1
  818. package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.resources-config.schemas.js.map +1 -1
  819. package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.schemas.d.ts.map +1 -1
  820. package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.schemas.js.map +1 -1
  821. package/dist/esm/testing/resource-config-builders.d.ts.map +1 -1
  822. package/dist/esm/testing/resource-config-builders.js.map +1 -1
  823. package/dist/esm/testing.d.ts.map +1 -1
  824. package/dist/esm/testing.js.map +1 -1
  825. package/dist/esm/users/anonymous-user-marketing-metadata.shared.schemas.d.ts.map +1 -1
  826. package/dist/esm/users/anonymous-user-marketing-metadata.shared.schemas.js.map +1 -1
  827. package/dist/esm/users/anonymous-users.shared.resources-config.schemas.d.ts.map +1 -1
  828. package/dist/esm/users/anonymous-users.shared.resources-config.schemas.js.map +1 -1
  829. package/dist/esm/users/anonymous-users.shared.schema.d.ts.map +1 -1
  830. package/dist/esm/users/anonymous-users.shared.schema.js.map +1 -1
  831. package/dist/esm/users/inbound-contacts.shared.resources-config.schemas.d.ts.map +1 -1
  832. package/dist/esm/users/inbound-contacts.shared.resources-config.schemas.js.map +1 -1
  833. package/dist/esm/users/inbound-contacts.shared.schemas.d.ts.map +1 -1
  834. package/dist/esm/users/inbound-contacts.shared.schemas.js.map +1 -1
  835. package/dist/esm/users/user-consent-decision.shared.utils.d.ts.map +1 -1
  836. package/dist/esm/users/user-consent-decision.shared.utils.js.map +1 -1
  837. package/dist/esm/users/user-credentials.shared.resources-config.schemas.d.ts.map +1 -1
  838. package/dist/esm/users/user-credentials.shared.resources-config.schemas.js.map +1 -1
  839. package/dist/esm/users/user-credentials.shared.schemas.d.ts.map +1 -1
  840. package/dist/esm/users/user-credentials.shared.schemas.js.map +1 -1
  841. package/dist/esm/users/user-identity-links.shared.resources-config.schemas.d.ts.map +1 -1
  842. package/dist/esm/users/user-identity-links.shared.resources-config.schemas.js.map +1 -1
  843. package/dist/esm/users/user-identity-links.shared.schemas.d.ts.map +1 -1
  844. package/dist/esm/users/user-identity-links.shared.schemas.js.map +1 -1
  845. package/dist/esm/users/user-preferences-reset.shared.utils.d.ts.map +1 -1
  846. package/dist/esm/users/user-preferences-reset.shared.utils.js.map +1 -1
  847. package/dist/esm/users/user-preferences.shared.resources-config.schemas.d.ts.map +1 -1
  848. package/dist/esm/users/user-preferences.shared.resources-config.schemas.js.map +1 -1
  849. package/dist/esm/users/user-profiles.shared.resources-config.schemas.d.ts.map +1 -1
  850. package/dist/esm/users/user-profiles.shared.resources-config.schemas.js.map +1 -1
  851. package/dist/esm/users/user-self-preferences.shared.resources-config.schemas.d.ts.map +1 -1
  852. package/dist/esm/users/user-self-preferences.shared.resources-config.schemas.js.map +1 -1
  853. package/dist/esm/users/user-self-profiles.shared.resources-config.schemas.d.ts.map +1 -1
  854. package/dist/esm/users/user-self-profiles.shared.resources-config.schemas.js.map +1 -1
  855. package/dist/esm/users/user-self.shared.resources-config.schemas.d.ts.map +1 -1
  856. package/dist/esm/users/user-self.shared.resources-config.schemas.js.map +1 -1
  857. package/dist/esm/users/users.shared.resources-config.schemas.d.ts.map +1 -1
  858. package/dist/esm/users/users.shared.resources-config.schemas.js.map +1 -1
  859. package/dist/esm/users/users.shared.schemas.d.ts.map +1 -1
  860. package/dist/esm/users/users.shared.schemas.js.map +1 -1
  861. package/package.json +4 -4
@@ -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,E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.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).describe('The stage entered.'),\n /** When this stage was entered */\n enteredAt: z.coerce.date().describe('When the stage was entered.'),\n /** When this stage was exited (undefined if current) */\n exitedAt: z.coerce.date().optional().describe('When the stage was left. Absent for the current stage, and occasionally for an earlier one when two transitions happened at once.'),\n /** What triggered this transition (milestone ref, cron, operation, etc.) */\n trigger: z.string().optional().describe('What caused the transition: `auto_create` for the initial stage, `operation:<operation>`, `milestone:<milestone>`, `guidance_completed`, `engagement_threshold`, `dormancy_cron` or `on_read_reactivation`.'),\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).describe('Operations performed while in the `activated` or `reactivated` stage. Reset to 0 on reactivation, and compared with the configured engagement threshold to move to `engaged`.'),\n /** Distinct active dates since activation (YYYY-MM-DD strings) */\n activeDates: z.array(z.string()).default([]).describe('Distinct UTC calendar days (`YYYY-MM-DD`) with at least one operation while in the `activated` or `reactivated` stage. Cleared on reactivation.'),\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,sEAAsE;AACtE,MAAM,CAAN,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,+BAAa,CAAA;IACb,+CAA6B,CAAA;AAC/B,CAAC,EAHW,cAAc,KAAd,cAAc,QAGzB;AAED;;oEAEoE;AA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AY,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/** 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).describe('The stage entered.'),\n /** When this stage was entered */\n enteredAt: z.coerce.date().describe('When the stage was entered.'),\n /** When this stage was exited (undefined if current) */\n exitedAt: z.coerce.date().optional().describe('When the stage was left. Absent for the current stage, and occasionally for an earlier one when two transitions happened at once.'),\n /** What triggered this transition (milestone ref, cron, operation, etc.) */\n trigger: z.string().optional().describe('What caused the transition: `auto_create` for the initial stage, `operation:<operation>`, `milestone:<milestone>`, `guidance_completed`, `engagement_threshold`, `dormancy_cron` or `on_read_reactivation`.'),\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).describe('Operations performed while in the `activated` or `reactivated` stage. Reset to 0 on reactivation, and compared with the configured engagement threshold to move to `engaged`.'),\n /** Distinct active dates since activation (YYYY-MM-DD strings) */\n activeDates: z.array(z.string()).default([]).describe('Distinct UTC calendar days (`YYYY-MM-DD`) with at least one operation while in the `activated` or `reactivated` stage. Cleared on reactivation.'),\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 +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,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
+ {"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 +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,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
+ {"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 +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,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;AAEpE;;;;;;;GAOG;AACH,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,8DAA8D;AAE9D,0EAA0E;AAC1E,eAAO,MAAM,6BAA6B,EAAE,MAAM,CAAC,gBAAgB,EAAE,gBAAgB,CAGpF,CAAC;AAEF;;oEAEoE;AAEpE,gEAAgE;AAChE;;;;;;GAMG;AACH,MAAM,WAAW,4BAA4B;IAC3C,IAAI,EAAE,cAAc,CAAC;IACrB,EAAE,EAAE,cAAc,CAAC;CACpB;AACD,8DAA8D;AAE9D;;oEAEoE;AAEpE;;;;;;;;GAQG;AACH,oBAAY,yBAAyB;IACnC,GAA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AA2D;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
+ {"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;AAEpE;;;;;;;GAOG;AACH,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,8DAA8D;AAE9D,0EAA0E;AAC1E,eAAO,MAAM,6BAA6B,EAAE,MAAM,CAAC,gBAAgB,EAAE,gBAAgB,CAGpF,CAAC;AAEF;;oEAEoE;AAEpE,gEAAgE;AAChE;;;;;;GAMG;AACH,MAAM,WAAW,4BAA4B;IAC3C,IAAI,EAAE,cAAc,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,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 +1 @@
1
- {"version":3,"file":"milestone-definition.shared.schemas.js","sourceRoot":"","sources":["../../../src/guidance/milestone-definition.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,+CAA+C,CAAC;AAEvF,OAAO,EAAE,gBAAgB,EAAE,MAAM,gDAAgD,CAAC;AAGlF;;oEAEoE;AAEpE;;;;;;;GAOG;AACH,MAAM,CAAN,IAAY,aAOX;AAPD,WAAY,aAAa;IACvB,4DAA4D;IAC5D,0CAAyB,CAAA;IACzB,0DAA0D;IAC1D,oDAAmC,CAAA;IACnC,6DAA6D;IAC7D,sDAAqC,CAAA;AACvC,CAAC,EAPW,aAAa,KAAb,aAAa,QAOxB;AAED;;oEAEoE;AAEpE,MAAM,CAAN,IAAY,mBAOX;AAPD,WAAY,mBAAmB;IAC7B,uEAAuE;IACvE,kDAA2B,CAAA;IAC3B,8EAA8E;IAC9E,wDAAiC,CAAA;IACjC,2CAA2C;IAC3C,sDAA+B,CAAA;AACjC,CAAC,EAPW,mBAAmB,KAAnB,mBAAmB,QAO9B;AAED;;oEAEoE;AAEpE,MAAM,CAAN,IAAY,gBAMX;AAND,WAAY,gBAAgB;IAC1B,6EAA6E;IAC7E,iCAAa,CAAA;IACb;4EACwE;IACxE,iDAA6B,CAAA;AAC/B,CAAC,EANW,gBAAgB,KAAhB,gBAAgB,QAM3B;AAED,8DAA8D;AAE9D,0EAA0E;AAC1E,MAAM,CAAC,MAAM,6BAA6B,GAA+C;IACvF,CAAC,gBAAgB,CAAC,IAAI,CAAC,EAAE,gBAAgB,CAAC,sBAAsB;IAChE,CAAC,gBAAgB,CAAC,YAAY,CAAC,EAAE,gBAAgB,CAAC,8BAA8B;CACjF,CAAC;AAkBF,8DAA8D;AAE9D;;oEAEoE;AAEpE;;;;;;;;GAQG;AACH,MAAM,CAAN,IAAY,yBAIX;AAJD,WAAY,yBAAyB;IACnC,wCAAW,CAAA;IACX,8CAAiB,CAAA;IACjB,0CAAa,CAAA;AACf,CAAC,EAJW,yBAAyB,KAAzB,yBAAyB,QAIpC;AAED;;;GAGG;AACH,MAAM,CAAC,MAAM,iCAAiC,GAA8D;IAC1G,CAAC,yBAAyB,CAAC,GAAG,CAAC,EAAE,sBAAsB,CAAC,QAAQ;IAChE,CAAC,yBAAyB,CAAC,MAAM,CAAC,EAAE,sBAAsB,CAAC,OAAO;IAClE,CAAC,yBAAyB,CAAC,IAAI,CAAC,EAAE,sBAAsB,CAAC,MAAM;CAChE,CAAC;AAEF;;;GAGG;AACH,MAAM,UAAU,6BAA6B,CAAC,MAG7C;IACC,IAAI,MAAM,CAAC,eAAe;QAAE,OAAO,MAAM,CAAC,eAAe,CAAC;IAC1D,IAAI,MAAM,CAAC,gBAAgB;QAAE,OAAO,iCAAiC,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC;IAC/F,OAAO,sBAAsB,CAAC,QAAQ,CAAC;AACzC,CAAC;AA4ED,8DAA8D;AAE9D;;oEAEoE","sourcesContent":["import { CelebrationDisplayMode } from '../notifications/notifications.shared.schemas';\nimport { CoreResourceOperation } from '../resources/resources.shared.core.definitions';\nimport { CoreResourceType } from '../resources/resources.shared.core.definitions';\nimport { LifecycleStage } from './lifecycle-state.shared.schemas';\n\n/** ──────────────────────────────────────────────────────────────\n * Milestone Type — Condition Evaluation Strategy\n * ────────────────────────────────────────────────────────────── */\n\n/**\n * @wildo_source:part:start saas.models.milestone-definition facet:layer:shared facet:family:progression facet:audience:app-developer\n *\n * A milestone is a moment in a person's (or an organization's) use of the application that the\n * application wants to recognise: the first project created, the tenth todo completed. Declare them\n * in `shared-lib/src/engine/milestones.ts`; the framework counts the triggering operations, marks a\n * milestone achieved, awards its points and delivers its reward. Import from `@wildo-ai/saas-models`.\n */\nexport enum MilestoneType {\n /** Achieved on first occurrence of the trigger operation */\n FIRST_TIME = 'first_time',\n /** Achieved when operation count reaches the threshold */\n COUNT_THRESHOLD = 'count_threshold',\n /** Achieved when a custom condition function returns true */\n CUSTOM_CONDITION = 'custom_condition',\n}\n\n/** ──────────────────────────────────────────────────────────────\n * Milestone Reward Type\n * ────────────────────────────────────────────────────────────── */\n\nexport enum MilestoneRewardType {\n /** Visual celebration (confetti, animation) via notification system */\n CELEBRATION = 'celebration',\n /** Unlock a feature by writing override to scope-matched features resource */\n FEATURE_UNLOCK = 'feature_unlock',\n /** Activate a guidance flow via WS push */\n GUIDANCE_FLOW = 'guidance_flow',\n}\n\n/** ──────────────────────────────────────────────────────────────\n * Progression Scope — Bi-Scope State Routing\n * ────────────────────────────────────────────────────────────── */\n\nexport enum ProgressionScope {\n /** State stored in USER_PROGRESSION_STATE — personal milestones (default) */\n USER = 'user',\n /** State stored in ORGANIZATION_PROGRESSION_STATE — org-wide milestones\n * (e.g., \"Team reached 50 members\", \"First integration configured\") */\n ORGANIZATION = 'organization',\n}\n\n/** @wildo_source:part:end saas.models.milestone-definition */\n\n/** Maps ProgressionScope to the CoreResourceType that stores its state */\nexport const PROGRESSION_SCOPE_TO_RESOURCE: Record<ProgressionScope, CoreResourceType> = {\n [ProgressionScope.USER]: CoreResourceType.USER_PROGRESSION_STATE,\n [ProgressionScope.ORGANIZATION]: CoreResourceType.ORGANIZATION_PROGRESSION_STATE,\n};\n\n/** ──────────────────────────────────────────────────────────────\n * Milestone Lifecycle Transition — Phase 5 Integration Point\n * ────────────────────────────────────────────────────────────── */\n\n/** @wildo_source:part:start saas.models.milestone-definition */\n/**\n * The lifecycle stage change a milestone triggers when it is achieved — for example moving a person\n * from `LifecycleStage.SIGNED_UP` to `LifecycleStage.ACTIVATED` when they create their first project.\n *\n * Use the `LifecycleStage` enum values, not their names. When the application's lifecycle config\n * declares no `activationCriteria`, a milestone transition is how activation happens at all.\n */\nexport interface MilestoneLifecycleTransition {\n from: LifecycleStage;\n to: LifecycleStage;\n}\n/** @wildo_source:part:end saas.models.milestone-definition */\n\n/** ──────────────────────────────────────────────────────────────\n * Milestone Reward Definition\n * ────────────────────────────────────────────────────────────── */\n\n/**\n * @wildo_source:part:start saas.models.milestone-celebration facet:layer:shared facet:family:progression facet:audience:app-developer\n *\n * How much of a moment a milestone is — NOT how it is drawn.\n *\n * Presentation is a separate choice, `celebrationMode` (a `CelebrationDisplayMode`), so that a\n * milestone can be significant without having to accept a particular animation. Leave the mode out\n * and the level picks one through `DEFAULT_CELEBRATION_MODE_BY_LEVEL`.\n */\nexport enum MilestoneCelebrationLevel {\n LOW = 'low',\n MEDIUM = 'medium',\n HIGH = 'high',\n}\n\n/**\n * The display mode each level gets when a milestone does not name one — the framework's default,\n * readable so an application knows what it is opting out of when it sets `celebrationMode`.\n */\nexport const DEFAULT_CELEBRATION_MODE_BY_LEVEL: Record<MilestoneCelebrationLevel, CelebrationDisplayMode> = {\n [MilestoneCelebrationLevel.LOW]: CelebrationDisplayMode.CONFETTI,\n [MilestoneCelebrationLevel.MEDIUM]: CelebrationDisplayMode.OVERLAY,\n [MilestoneCelebrationLevel.HIGH]: CelebrationDisplayMode.LOTTIE,\n};\n\n/**\n * How a celebration is drawn, in order: the milestone's own `celebrationMode`; else the default for\n * its `celebrationLevel`; else `CONFETTI`, the quietest presentation, for a reward that says neither.\n */\nexport function resolveCelebrationDisplayMode(reward: {\n readonly celebrationLevel?: MilestoneCelebrationLevel;\n readonly celebrationMode?: CelebrationDisplayMode;\n}): CelebrationDisplayMode {\n if (reward.celebrationMode) return reward.celebrationMode;\n if (reward.celebrationLevel) return DEFAULT_CELEBRATION_MODE_BY_LEVEL[reward.celebrationLevel];\n return CelebrationDisplayMode.CONFETTI;\n}\n/** @wildo_source:part:end saas.models.milestone-celebration */\n\n/** @wildo_source:part:start saas.models.milestone-definition */\n/**\n * What a person gets when the milestone is achieved. `type` picks which of the other fields apply:\n * `CELEBRATION` reads `celebrationLevel` / `celebrationMode`, `FEATURE_UNLOCK` reads `featureRef`,\n * `GUIDANCE_FLOW` reads `guidanceFlowRef`.\n */\nexport interface MilestoneReward {\n type: MilestoneRewardType;\n /** For FEATURE_UNLOCK: the feature identifier to enable */\n featureRef?: string;\n /** For GUIDANCE_FLOW: the guidance flow ref to activate */\n guidanceFlowRef?: string;\n /** For CELEBRATION: how big a moment this is. Presentation follows from it unless overridden. */\n celebrationLevel?: MilestoneCelebrationLevel;\n /**\n * For CELEBRATION: draw it THIS way, whatever the level would have chosen.\n *\n * Makes the level a default rather than a verdict: a milestone that is significant but should\n * still get confetti says so here. Omit it to get {@link DEFAULT_CELEBRATION_MODE_BY_LEVEL}.\n */\n celebrationMode?: CelebrationDisplayMode;\n}\n\n/** ──────────────────────────────────────────────────────────────\n * Milestone Trigger — What Operation Triggers Evaluation\n * ────────────────────────────────────────────────────────────── */\n\nexport interface MilestoneTrigger {\n /** Resource type that triggers evaluation */\n resourceType: string;\n /** Operation that triggers evaluation */\n operation: CoreResourceOperation;\n}\n\n/** ──────────────────────────────────────────────────────────────\n * Milestone Definition — Full Declaration\n * ────────────────────────────────────────────────────────────── */\n\nexport interface MilestoneDefinition {\n /** Unique milestone identifier (e.g., 'FIRST_PROJECT_CREATED') */\n identifier: string;\n /** Milestone type — determines condition evaluation logic */\n type: MilestoneType;\n /** State scope — determines which resource stores this milestone's progress.\n * USER (default): personal milestones, each user has their own state.\n * ORGANIZATION: org-wide milestones, shared across all members. When any member\n * triggers \"org reached 50 members\", it's achieved for the whole org.\n */\n scope?: ProgressionScope;\n /** What resource operation triggers this milestone's evaluation */\n trigger: MilestoneTrigger;\n /** For COUNT_THRESHOLD: the count that must be reached */\n threshold?: number;\n /** For CUSTOM_CONDITION: condition function reference key.\n * Receives (operationCounts, milestonesAchieved) and returns boolean.\n * Note: Serialized as a reference string for frontend — backend evaluates the function. */\n conditionRef?: string;\n /** What the user gets when milestone is achieved */\n reward: MilestoneReward;\n /** Category for grouping (e.g., 'getting-started', 'power-user') */\n category: string;\n /** Points awarded for this milestone (for gamification) */\n points?: number;\n /** i18n: which labels to generate */\n labels?: {\n description?: boolean;\n };\n /** Phase 5 integration: lifecycle stage transition triggered by this milestone */\n lifecycleTransition?: MilestoneLifecycleTransition;\n /** Dependencies: milestone refs that must be achieved first (for unlocking chains).\n * Dependencies are validated and evaluated within the same progression scope. */\n dependencies?: string[];\n}\n/** @wildo_source:part:end saas.models.milestone-definition */\n\n/** ──────────────────────────────────────────────────────────────\n * Milestone Label Fields — i18n Key Generation Configuration\n * ────────────────────────────────────────────────────────────── */\n\n"]}
1
+ {"version":3,"file":"milestone-definition.shared.schemas.js","sourceRoot":"","sources":["../../../../src/guidance/milestone-definition.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,+CAA+C,CAAC;AAEvF,OAAO,EAAE,gBAAgB,EAAE,MAAM,gDAAgD,CAAC;AAGlF;;oEAEoE;AAEpE;;;;;;;GAOG;AACH,MAAM,CAAN,IAAY,aAOX;AAPD,WAAY,aAAa;IACvB,4DAA4D;IAC5D,0CAAyB,CAAA;IACzB,0DAA0D;IAC1D,oDAAmC,CAAA;IACnC,6DAA6D;IAC7D,sDAAqC,CAAA;AACvC,CAAC,EAPW,aAAa,KAAb,aAAa,QAOxB;AAED;;oEAEoE;AAEpE,MAAM,CAAN,IAAY,mBAOX;AAPD,WAAY,mBAAmB;IAC7B,uEAAuE;IACvE,kDAA2B,CAAA;IAC3B,8EAA8E;IAC9E,wDAAiC,CAAA;IACjC,2CAA2C;IA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EoE","sourcesContent":["import { CelebrationDisplayMode } from '../notifications/notifications.shared.schemas';\nimport { CoreResourceOperation } from '../resources/resources.shared.core.definitions';\nimport { CoreResourceType } from '../resources/resources.shared.core.definitions';\nimport { LifecycleStage } from './lifecycle-state.shared.schemas';\n\n/** ──────────────────────────────────────────────────────────────\n * Milestone Type — Condition Evaluation Strategy\n * ────────────────────────────────────────────────────────────── */\n\n/**\n * @wildo_source:part:start saas.models.milestone-definition facet:layer:shared facet:family:progression facet:audience:app-developer\n *\n * A milestone is a moment in a person's (or an organization's) use of the application that the\n * application wants to recognise: the first project created, the tenth todo completed. Declare them\n * in `shared-lib/src/engine/milestones.ts`; the framework counts the triggering operations, marks a\n * milestone achieved, awards its points and delivers its reward. Import from `@wildo-ai/saas-models`.\n */\nexport enum MilestoneType {\n /** Achieved on first occurrence of the trigger operation */\n FIRST_TIME = 'first_time',\n /** Achieved when operation count reaches the threshold */\n COUNT_THRESHOLD = 'count_threshold',\n /** Achieved when a custom condition function returns true */\n CUSTOM_CONDITION = 'custom_condition',\n}\n\n/** ──────────────────────────────────────────────────────────────\n * Milestone Reward Type\n * ────────────────────────────────────────────────────────────── */\n\nexport enum MilestoneRewardType {\n /** Visual celebration (confetti, animation) via notification system */\n CELEBRATION = 'celebration',\n /** Unlock a feature by writing override to scope-matched features resource */\n FEATURE_UNLOCK = 'feature_unlock',\n /** Activate a guidance flow via WS push */\n GUIDANCE_FLOW = 'guidance_flow',\n}\n\n/** ──────────────────────────────────────────────────────────────\n * Progression Scope — Bi-Scope State Routing\n * ────────────────────────────────────────────────────────────── */\n\nexport enum ProgressionScope {\n /** State stored in USER_PROGRESSION_STATE — personal milestones (default) */\n USER = 'user',\n /** State stored in ORGANIZATION_PROGRESSION_STATE — org-wide milestones\n * (e.g., \"Team reached 50 members\", \"First integration configured\") */\n ORGANIZATION = 'organization',\n}\n\n/** @wildo_source:part:end saas.models.milestone-definition */\n\n/** Maps ProgressionScope to the CoreResourceType that stores its state */\nexport const PROGRESSION_SCOPE_TO_RESOURCE: Record<ProgressionScope, CoreResourceType> = {\n [ProgressionScope.USER]: CoreResourceType.USER_PROGRESSION_STATE,\n [ProgressionScope.ORGANIZATION]: CoreResourceType.ORGANIZATION_PROGRESSION_STATE,\n};\n\n/** ──────────────────────────────────────────────────────────────\n * Milestone Lifecycle Transition — Phase 5 Integration Point\n * ────────────────────────────────────────────────────────────── */\n\n/** @wildo_source:part:start saas.models.milestone-definition */\n/**\n * The lifecycle stage change a milestone triggers when it is achieved — for example moving a person\n * from `LifecycleStage.SIGNED_UP` to `LifecycleStage.ACTIVATED` when they create their first project.\n *\n * Use the `LifecycleStage` enum values, not their names. When the application's lifecycle config\n * declares no `activationCriteria`, a milestone transition is how activation happens at all.\n */\nexport interface MilestoneLifecycleTransition {\n from: LifecycleStage;\n to: LifecycleStage;\n}\n/** @wildo_source:part:end saas.models.milestone-definition */\n\n/** ──────────────────────────────────────────────────────────────\n * Milestone Reward Definition\n * ────────────────────────────────────────────────────────────── */\n\n/**\n * @wildo_source:part:start saas.models.milestone-celebration facet:layer:shared facet:family:progression facet:audience:app-developer\n *\n * How much of a moment a milestone is — NOT how it is drawn.\n *\n * Presentation is a separate choice, `celebrationMode` (a `CelebrationDisplayMode`), so that a\n * milestone can be significant without having to accept a particular animation. Leave the mode out\n * and the level picks one through `DEFAULT_CELEBRATION_MODE_BY_LEVEL`.\n */\nexport enum MilestoneCelebrationLevel {\n LOW = 'low',\n MEDIUM = 'medium',\n HIGH = 'high',\n}\n\n/**\n * The display mode each level gets when a milestone does not name one — the framework's default,\n * readable so an application knows what it is opting out of when it sets `celebrationMode`.\n */\nexport const DEFAULT_CELEBRATION_MODE_BY_LEVEL: Record<MilestoneCelebrationLevel, CelebrationDisplayMode> = {\n [MilestoneCelebrationLevel.LOW]: CelebrationDisplayMode.CONFETTI,\n [MilestoneCelebrationLevel.MEDIUM]: CelebrationDisplayMode.OVERLAY,\n [MilestoneCelebrationLevel.HIGH]: CelebrationDisplayMode.LOTTIE,\n};\n\n/**\n * How a celebration is drawn, in order: the milestone's own `celebrationMode`; else the default for\n * its `celebrationLevel`; else `CONFETTI`, the quietest presentation, for a reward that says neither.\n */\nexport function resolveCelebrationDisplayMode(reward: {\n readonly celebrationLevel?: MilestoneCelebrationLevel;\n readonly celebrationMode?: CelebrationDisplayMode;\n}): CelebrationDisplayMode {\n if (reward.celebrationMode) return reward.celebrationMode;\n if (reward.celebrationLevel) return DEFAULT_CELEBRATION_MODE_BY_LEVEL[reward.celebrationLevel];\n return CelebrationDisplayMode.CONFETTI;\n}\n/** @wildo_source:part:end saas.models.milestone-celebration */\n\n/** @wildo_source:part:start saas.models.milestone-definition */\n/**\n * What a person gets when the milestone is achieved. `type` picks which of the other fields apply:\n * `CELEBRATION` reads `celebrationLevel` / `celebrationMode`, `FEATURE_UNLOCK` reads `featureRef`,\n * `GUIDANCE_FLOW` reads `guidanceFlowRef`.\n */\nexport interface MilestoneReward {\n type: MilestoneRewardType;\n /** For FEATURE_UNLOCK: the feature identifier to enable */\n featureRef?: string;\n /** For GUIDANCE_FLOW: the guidance flow ref to activate */\n guidanceFlowRef?: string;\n /** For CELEBRATION: how big a moment this is. Presentation follows from it unless overridden. */\n celebrationLevel?: MilestoneCelebrationLevel;\n /**\n * For CELEBRATION: draw it THIS way, whatever the level would have chosen.\n *\n * Makes the level a default rather than a verdict: a milestone that is significant but should\n * still get confetti says so here. Omit it to get {@link DEFAULT_CELEBRATION_MODE_BY_LEVEL}.\n */\n celebrationMode?: CelebrationDisplayMode;\n}\n\n/** ──────────────────────────────────────────────────────────────\n * Milestone Trigger — What Operation Triggers Evaluation\n * ────────────────────────────────────────────────────────────── */\n\nexport interface MilestoneTrigger {\n /** Resource type that triggers evaluation */\n resourceType: string;\n /** Operation that triggers evaluation */\n operation: CoreResourceOperation;\n}\n\n/** ──────────────────────────────────────────────────────────────\n * Milestone Definition — Full Declaration\n * ────────────────────────────────────────────────────────────── */\n\nexport interface MilestoneDefinition {\n /** Unique milestone identifier (e.g., 'FIRST_PROJECT_CREATED') */\n identifier: string;\n /** Milestone type — determines condition evaluation logic */\n type: MilestoneType;\n /** State scope — determines which resource stores this milestone's progress.\n * USER (default): personal milestones, each user has their own state.\n * ORGANIZATION: org-wide milestones, shared across all members. When any member\n * triggers \"org reached 50 members\", it's achieved for the whole org.\n */\n scope?: ProgressionScope;\n /** What resource operation triggers this milestone's evaluation */\n trigger: MilestoneTrigger;\n /** For COUNT_THRESHOLD: the count that must be reached */\n threshold?: number;\n /** For CUSTOM_CONDITION: condition function reference key.\n * Receives (operationCounts, milestonesAchieved) and returns boolean.\n * Note: Serialized as a reference string for frontend — backend evaluates the function. */\n conditionRef?: string;\n /** What the user gets when milestone is achieved */\n reward: MilestoneReward;\n /** Category for grouping (e.g., 'getting-started', 'power-user') */\n category: string;\n /** Points awarded for this milestone (for gamification) */\n points?: number;\n /** i18n: which labels to generate */\n labels?: {\n description?: boolean;\n };\n /** Phase 5 integration: lifecycle stage transition triggered by this milestone */\n lifecycleTransition?: MilestoneLifecycleTransition;\n /** Dependencies: milestone refs that must be achieved first (for unlocking chains).\n * Dependencies are validated and evaluated within the same progression scope. */\n dependencies?: string[];\n}\n/** @wildo_source:part:end saas.models.milestone-definition */\n\n/** ──────────────────────────────────────────────────────────────\n * Milestone Label Fields — i18n Key Generation Configuration\n * ────────────────────────────────────────────────────────────── */\n\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"progression-presentation.shared.schemas.d.ts","sourceRoot":"","sources":["../../../src/guidance/progression-presentation.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;oEAMoE;AAEpE;;;;;;;;;;;;;;;;GAgBG;AACH,oBAAY,yBAAyB;IACnC;;;;;;;OAOG;IACH,YAAY,iBAAiB;IAE7B;;;;;;OAMG;IACH,OAAO,YAAY;IAEnB;;;;;;;OAOG;IACH,IAAI,SAAS;IAEb;;;;;;;OAOG;IACH,QAAQ,aAAa;CACtB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,mCAAmC,EAAE,yBAA6D,CAAC;AAChH,qEAAqE"}
1
+ {"version":3,"file":"progression-presentation.shared.schemas.d.ts","sourceRoot":"","sources":["../../../../src/guidance/progression-presentation.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;oEAMoE;AAEpE;;;;;;;;;;;;;;;;GAgBG;AACH,oBAAY,yBAAyB;IACnC;;;;;;;OAOG;IACH,YAAY,iBAAiB;IAE7B;;;;;;OAMG;IACH,OAAO,YAAY;IAEnB;;;;;;;OAOG;IACH,IAAI,SAAS;IAEb;;;;;;;OAOG;IACH,QAAQ,aAAa;CACtB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,mCAAmC,EAAE,yBAA6D,CAAC;AAChH,qEAAqE"}
@@ -1 +1 @@
1
- {"version":3,"file":"progression-presentation.shared.schemas.js","sourceRoot":"","sources":["../../../src/guidance/progression-presentation.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;oEAMoE;AAEpE;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAN,IAAY,yBAuCX;AAvCD,WAAY,yBAAyB;IACnC;;;;;;;OAOG;IACH,0DAA6B,CAAA;IAE7B;;;;;;OAMG;IACH,gDAAmB,CAAA;IAEnB;;;;;;;OAOG;IACH,0CAAa,CAAA;IAEb;;;;;;;OAOG;IACH,kDAAqB,CAAA;AACvB,CAAC,EAvCW,yBAAyB,KAAzB,yBAAyB,QAuCpC;AAED;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,mCAAmC,GAA8B,yBAAyB,CAAC,OAAO,CAAC;AAChH,qEAAqE","sourcesContent":["/** ──────────────────────────────────────────────────────────────\n * Progression — Presentation Vocabulary\n *\n * How much of a person's progression a surface SHOWS. Distinct from\n * `progression-state.shared.schemas.ts`, which is what the product RECORDS, and from\n * `milestone-definition.shared.schemas.ts`, which is what an application DECLARES.\n * ────────────────────────────────────────────────────────────── */\n\n/**\n * @wildo_source:part:start saas.models.progression-tracker-variant facet:layer:shared facet:family:progression facet:audience:app-developer\n *\n * How much progression one `ProgressionMilestoneTracker` mount shows — passed as its `variant` prop.\n * Import from `@wildo-ai/saas-models`.\n *\n * Chosen PER MOUNT, because surfaces of one application want different amounts: a home dashboard\n * wants a glance, an achievements screen wants the detail, a product still teaching its first task\n * wants only the next thing to do. Every variant reads the same progression state and the same\n * milestone definitions; they differ only in how much of it reaches the screen.\n *\n * These four are the common shapes, not a ceiling — but the tracker is composed by name, not\n * resolved through the component registry, so there is no preset to swap. An application needing a\n * shape none of them covers builds its own card from `useProgression()` (exported by\n * `@wildo-ai/saas-frontend-lib`), which gives the same milestone definitions, per-scope state and\n * points total the tracker renders from.\n */\nexport enum ProgressionTrackerVariant {\n /**\n * Overall progress and the milestones actually in reach — nothing else.\n *\n * No categories, no points, no per-milestone bars, and ACHIEVED milestones are not listed at all:\n * the \"5 of 8\" line is the record of them. For a surface whose job is to get someone to the next\n * action rather than to celebrate the last one. The smallest shape, and the right default for a\n * product that is still teaching itself.\n */\n NEXT_ACTIONS = 'next_actions',\n\n /**\n * A glance: overall progress, the points total, and the single next milestone.\n *\n * For a dashboard card sitting beside other cards, where progression is one of several things\n * competing for the same screen. Pairs with a `DETAILED` mount on a dedicated view — this is the\n * summary that links to it.\n */\n SUMMARY = 'summary',\n\n /**\n * One list and ONE progress signal.\n *\n * Categories become plain section headings rather than separately measured units, so there is a\n * single bar for the whole surface; a per-milestone count appears only where one is genuinely in\n * flight. Every milestone is listed, achieved ones included, with achievement carried by ONE\n * encoding rather than four.\n */\n FLAT = 'flat',\n\n /**\n * Categories measured in their own right, with the full per-milestone breakdown.\n *\n * The densest shape, for a screen whose whole subject is progression. It keeps the per-category\n * bar and the per-milestone count that `FLAT` collapses, and gives them different visual weight so\n * they stop competing — the defect in the original was never that both existed, it was that they\n * were rendered identically and so read as one confused signal.\n */\n DETAILED = 'detailed',\n}\n\n/**\n * The shape used when a mount does not name one.\n *\n * `SUMMARY` rather than `DETAILED`, deliberately: the overwhelmingly common mount is a card on a\n * home surface, and the density that made the original hard to read is exactly what a card cannot\n * afford. An application that wants everything asks for it.\n */\nexport const DEFAULT_PROGRESSION_TRACKER_VARIANT: ProgressionTrackerVariant = ProgressionTrackerVariant.SUMMARY;\n/** @wildo_source:part:end saas.models.progression-tracker-variant */\n"]}
1
+ {"version":3,"file":"progression-presentation.shared.schemas.js","sourceRoot":"","sources":["../../../../src/guidance/progression-presentation.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;oEAMoE;AAEpE;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAN,IAAY,yBAuCX;AAvCD,WAAY,yBAAyB;IACnC;;;;;;;OAOG;IACH,0DAA6B,CAAA;IAE7B;;;;;;OAMG;IACH,gDAAmB,CAAA;IAEnB;;;;;;;OAOG;IACH,0CAAa,CAAA;IAEb;;;;;;;OAOG;IACH,kDAAqB,CAAA;AACvB,CAAC,EAvCW,yBAAyB,KAAzB,yBAAyB,QAuCpC;AAED;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,mCAAmC,GAA8B,yBAAyB,CAAC,OAAO,CAAC;AAChH,qEAAqE","sourcesContent":["/** ──────────────────────────────────────────────────────────────\n * Progression — Presentation Vocabulary\n *\n * How much of a person's progression a surface SHOWS. Distinct from\n * `progression-state.shared.schemas.ts`, which is what the product RECORDS, and from\n * `milestone-definition.shared.schemas.ts`, which is what an application DECLARES.\n * ────────────────────────────────────────────────────────────── */\n\n/**\n * @wildo_source:part:start saas.models.progression-tracker-variant facet:layer:shared facet:family:progression facet:audience:app-developer\n *\n * How much progression one `ProgressionMilestoneTracker` mount shows — passed as its `variant` prop.\n * Import from `@wildo-ai/saas-models`.\n *\n * Chosen PER MOUNT, because surfaces of one application want different amounts: a home dashboard\n * wants a glance, an achievements screen wants the detail, a product still teaching its first task\n * wants only the next thing to do. Every variant reads the same progression state and the same\n * milestone definitions; they differ only in how much of it reaches the screen.\n *\n * These four are the common shapes, not a ceiling — but the tracker is composed by name, not\n * resolved through the component registry, so there is no preset to swap. An application needing a\n * shape none of them covers builds its own card from `useProgression()` (exported by\n * `@wildo-ai/saas-frontend-lib`), which gives the same milestone definitions, per-scope state and\n * points total the tracker renders from.\n */\nexport enum ProgressionTrackerVariant {\n /**\n * Overall progress and the milestones actually in reach — nothing else.\n *\n * No categories, no points, no per-milestone bars, and ACHIEVED milestones are not listed at all:\n * the \"5 of 8\" line is the record of them. For a surface whose job is to get someone to the next\n * action rather than to celebrate the last one. The smallest shape, and the right default for a\n * product that is still teaching itself.\n */\n NEXT_ACTIONS = 'next_actions',\n\n /**\n * A glance: overall progress, the points total, and the single next milestone.\n *\n * For a dashboard card sitting beside other cards, where progression is one of several things\n * competing for the same screen. Pairs with a `DETAILED` mount on a dedicated view — this is the\n * summary that links to it.\n */\n SUMMARY = 'summary',\n\n /**\n * One list and ONE progress signal.\n *\n * Categories become plain section headings rather than separately measured units, so there is a\n * single bar for the whole surface; a per-milestone count appears only where one is genuinely in\n * flight. Every milestone is listed, achieved ones included, with achievement carried by ONE\n * encoding rather than four.\n */\n FLAT = 'flat',\n\n /**\n * Categories measured in their own right, with the full per-milestone breakdown.\n *\n * The densest shape, for a screen whose whole subject is progression. It keeps the per-category\n * bar and the per-milestone count that `FLAT` collapses, and gives them different visual weight so\n * they stop competing — the defect in the original was never that both existed, it was that they\n * were rendered identically and so read as one confused signal.\n */\n DETAILED = 'detailed',\n}\n\n/**\n * The shape used when a mount does not name one.\n *\n * `SUMMARY` rather than `DETAILED`, deliberately: the overwhelmingly common mount is a card on a\n * home surface, and the density that made the original hard to read is exactly what a card cannot\n * afford. An application that wants everything asks for it.\n */\nexport const DEFAULT_PROGRESSION_TRACKER_VARIANT: ProgressionTrackerVariant = ProgressionTrackerVariant.SUMMARY;\n/** @wildo_source:part:end saas.models.progression-tracker-variant */\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"progression-state.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["../../../src/guidance/progression-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,kCAAkC,GACnC,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,+DAA+D,GAAI,wBAAwB,oBAAoB,EAAE;;;;;;;;;;;;;;;;;iCA2K5H,CAAC;AAIH,KAAK,0CAA0C,GAC3C,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,CAAC;AAEjC,eAAO,MAAM,uEAAuE,GAAI,wBAAwB,oBAAoB,EAAE;;;;;;;;;;;;;;;;;iCAoGpI,CAAC"}
1
+ {"version":3,"file":"progression-state.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["../../../../src/guidance/progression-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,kCAAkC,GACnC,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,+DAA+D,GAAI,wBAAwB,oBAAoB,EAAE;;;;;;;;;;;;;;;;;iCA2K5H,CAAC;AAIH,KAAK,0CAA0C,GAC3C,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,CAAC;AAEjC,eAAO,MAAM,uEAAuE,GAAI,wBAAwB,oBAAoB,EAAE;;;;;;;;;;;;;;;;;iCAoGpI,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"progression-state.shared.resources-config.schemas.js","sourceRoot":"","sources":["../../../src/guidance/progression-state.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAEL,0BAA0B,EAC1B,kCAAkC,GACnC,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,qBAAqB,EAAE,MAAM,gDAAgD,CAAC;AACvF,OAAO,EAAE,0BAA0B,EAAwB,MAAM,uCAAuC,CAAC;AACzG,OAAO,EAAE,gBAAgB,EAAE,kCAAkC,EAAE,MAAM,gDAAgD,CAAC;AACtH,OAAO,EAAE,4BAA4B,EAAE,MAAM,uCAAuC,CAAC;AACrF,OAAO,EAAE,0CAA0C,EAAE,MAAM,8CAA8C,CAAC;AAC1G,OAAO,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAC;AACxF,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,iDAAiD,CAAC;AACjG,OAAO,EAAE,yBAAyB,EAAE,MAAM,qDAAqD,CAAC;AAChG,OAAO,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,MAAM,wDAAwD,CAAC;AAcvH,MAAM,CAAC,MAAM,+DAA+D,GAAG,CAAC,sBAA8C,EAAE,EAAE,CAAC,0CAA0C,CAI3K;IACA,UAAU,EAAE,0BAA0B;IACtC,kBAAkB,EAAE,gBAAgB,CAAC,sBAAsB;IAC3D,uBAAuB,EAAE,kCAAkC,CAAC,gBAAgB,CAAC,sBAAsB,CAAC;IACpG,qBAAqB,EAAE,sBAAsB;I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AAW,EAAE,4BAA4B,CAAC,eAAe;oBACzD,SAAS,EAAE,IAAI;oBACf,KAAK,EAAE,CAAC,cAAc,CAAC,SAAS,CAAC;oBACjC,SAAS,EAAE,0BAA0B,CAAC,IAAI;iBAC3C;aACF;SACF;KACF;CACF,CAAC,CAAC","sourcesContent":["/**\n * Progression State Shared Resource Configurations\n *\n * Resource configurations for dual-scope progression state management (USER / ORGANIZATION).\n * Each scope stores milestone achievement progress, operation counts, and category progress.\n * The shared payload schema stays scope-agnostic, while the schema file also owns\n * the scope-aware persisted variants used by these resource configurations.\n */\n\nimport {\n ProgressionStateSchema,\n UserProgressionStateSchema,\n OrganizationProgressionStateSchema,\n} from './progression-state.shared.schemas';\nimport { CoreResourceOperation } from '../resources/resources.shared.core.definitions';\nimport { ResourceOperationRiskLevel, ResourceRelationship } from '../resources/resources.shared.schemas';\nimport { CoreResourceType, coreResourceShared_FieldIdentifier } from '../resources/resources.shared.core.definitions';\nimport { ResourceOperationVariantType } from '../resources/resources.shared.schemas';\nimport { createResourceConfiguration_Initialization } from '../resources/resources-config.shared.factory';\nimport { ResourceSystemAccessMode } from '../resources/resources-config.shared.schemas';\nimport { CORE_APP_ROLES, CORE_ORG_ROLES } from '../security/authorizations/roles.shared.schemas';\nimport { DataPortabilityProvenance } from '../compliance/privacy/subject-export.shared.schemas';\nimport { ErasureRetentionMode, ResourceDataSubjectKind } from '../compliance/privacy/impersonalization.shared.schemas';\n\n// ─── USER PROGRESSION STATE ─────────────────────────────────────────────────────\n\ntype UserProgressionStateCoreOperations =\n | CoreResourceOperation.READ\n | CoreResourceOperation.SEARCH\n | CoreResourceOperation.UPDATE\n | CoreResourceOperation.CREATE\n | CoreResourceOperation.DELETE\n // Route-less; `retentionPolicy` requires READ + LIST + UPDATE_MANY.\n | CoreResourceOperation.LIST\n | CoreResourceOperation.UPDATE_MANY;\n\nexport const userProgressionStateResourceConfiguration_InitializationFactory = (resourcesRelationships: ResourceRelationship[]) => createResourceConfiguration_Initialization<\n Record<string, never>,\n UserProgressionStateCoreOperations,\n typeof UserProgressionStateSchema\n>({\n mainSchema: UserProgressionStateSchema,\n resourceIdentifier: CoreResourceType.USER_PROGRESSION_STATE,\n resourceFieldIdentifier: coreResourceShared_FieldIdentifier[CoreResourceType.USER_PROGRESSION_STATE],\n resourceRelationships: resourcesRelationships,\n isSystemResource: true,\n // onParentCreate eager-seeding writes through createAsSystem → opt into the\n // fail-closed system-write policy (composition-oncreate-lifecycle plan).\n systemAccessPolicy: {\n exportSubject: ResourceSystemAccessMode.ALLOWED, create: ResourceSystemAccessMode.ALLOWED },\n portabilityPolicy: { defaultProvenance: DataPortabilityProvenance.DERIVED },\n\n /**\n * Subject erasure RETAINS this row and RESETS the achievement records, operation counters and points total to the schema's own defaults.\n *\n * The USAGE categories on this resource are accurate — these are observations the product made about a\n * named person — so `RETAIN_ONLY` would be a false assertion and the factory refuses it. Until\n * `RedactionType.RESET` existed no treatment could reach these fields at all: they are non-nullable WITH\n * a `.default()`, so REMOVE (needs clearable) and MASK (needs a string) both refuse. RESET returns each\n * to what it is when nobody has set it, which for a behavioural record is exactly what erasure should\n * leave behind.\n *\n * The primary scope FK is preserved — severing it is refused outright, because it would leave the\n * retained row with no tenant anchor, unreachable even to the audited see-through read.\n */\n retentionPolicy: {\n mode: ErasureRetentionMode.RETAIN_AND_IMPERSONALIZE,\n },\n\n /**\n * Erasing one of these rows revokes NO session. The row is state ABOUT a person rather than the person,\n * and its primary scope FK anchors it — the enum prescribes `NO_PRINCIPAL` for that shape. The subject's\n * own session ends through the `USERS` row.\n */\n dataSubjectPolicy: { kind: ResourceDataSubjectKind.NO_PRINCIPAL },\n\n coreOperations: [\n CoreResourceOperation.READ,\n CoreResourceOperation.SEARCH,\n CoreResourceOperation.UPDATE,\n CoreResourceOperation.CREATE,\n // DELETE is REPOSITORY_ONLY (no HTTP route): powers the composition\n // onParentDelete cascade so the self-healing state row is physically removed\n // when its owning scope is deleted. Without it the cascade throws\n // ErrorType.CONFIGURATION on any scope that has a materialized row.\n CoreResourceOperation.DELETE,\n // Route-less; `retentionPolicy` requires READ + LIST + UPDATE_MANY (READ is above).\n CoreResourceOperation.LIST,\n CoreResourceOperation.UPDATE_MANY,\n ],\n\n customOperation: {} as Record<string, never>,\n\n operationsConfiguration: {\n\n /*\n\n * Route-less retention plumbing — INTERNAL_CALL registers no route and must not be REPOSITORY_ONLY:\n\n * the retention primitives resolve through `getServiceOperationPathDefault`, which matches only\n\n * INTERNAL_CALL / API_CALL. UPDATE_MANY is the verb the impersonalize writer uses.\n\n */\n\n [CoreResourceOperation.LIST]: {\n\n variants: [{\n\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n\n isDefault: true,\n\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n\n riskLevel: ResourceOperationRiskLevel.LOW,\n\n }],\n\n },\n\n [CoreResourceOperation.UPDATE_MANY]: {\n\n variants: [{\n\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n\n isDefault: true,\n\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n\n riskLevel: ResourceOperationRiskLevel.CRITICAL,\n\n }],\n\n },\n\n [CoreResourceOperation.READ]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_USER],\n riskLevel: ResourceOperationRiskLevel.LOW,\n }\n ]\n },\n\n [CoreResourceOperation.SEARCH]: {\n variants: [{\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_USER],\n riskLevel: ResourceOperationRiskLevel.LOW,\n isSearchable: false,\n searchableFields: [],\n searchableOptions: { caseSensitive: false, fullMatchOnly: false },\n filterFields: {},\n sortFields: [],\n maxPaginatedResultPerPageLimit: 50,\n }],\n },\n\n [CoreResourceOperation.UPDATE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.REPOSITORY_ONLY,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_USER],\n riskLevel: ResourceOperationRiskLevel.LOW,\n }\n ],\n },\n\n [CoreResourceOperation.CREATE]: {\n variants: [\n {\n // INTERNAL_CALL (not REPOSITORY_ONLY): the onParentCreate seed's\n // `createAsSystem` resolves the CREATE op via the service tier, which\n // rejects REPOSITORY_ONLY → OPERATION_PATH_NOT_FOUND, silent no-seed. See\n // the org-preferences config + composition-oncreate plan for the rationale.\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_USER],\n riskLevel: ResourceOperationRiskLevel.LOW,\n }\n ],\n },\n\n // Internal-only (REPOSITORY_ONLY, no HTTP route): powers the composition\n // onParentDelete cascade so this self-healing state row is physically removed\n // when its owning user is deleted. Without a DELETE op the cascade\n // (deleteChildrenImmediate) throws ErrorType.CONFIGURATION on any user that\n // has a materialized row — these rows self-heal on first READ, so most active\n // users have one. Super-admin/HIGH: a privileged teardown, not the APP_USER\n // self-write. See composition-oncreate-lifecycle plan (systemic DELETE gap).\n [CoreResourceOperation.DELETE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.REPOSITORY_ONLY,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.HIGH,\n }\n ],\n },\n },\n});\n\n// ─── ORGANIZATION PROGRESSION STATE ─────────────────────────────────────────────\n\ntype OrganizationProgressionStateCoreOperations =\n | CoreResourceOperation.READ\n | CoreResourceOperation.SEARCH\n | CoreResourceOperation.UPDATE\n | CoreResourceOperation.CREATE\n | CoreResourceOperation.DELETE;\n\nexport const organizationProgressionStateResourceConfiguration_InitializationFactory = (resourcesRelationships: ResourceRelationship[]) => createResourceConfiguration_Initialization<\n Record<string, never>,\n OrganizationProgressionStateCoreOperations,\n typeof OrganizationProgressionStateSchema\n>({\n mainSchema: OrganizationProgressionStateSchema,\n resourceIdentifier: CoreResourceType.ORGANIZATION_PROGRESSION_STATE,\n resourceFieldIdentifier: coreResourceShared_FieldIdentifier[CoreResourceType.ORGANIZATION_PROGRESSION_STATE],\n resourceRelationships: resourcesRelationships,\n isSystemResource: true,\n // onParentCreate eager-seeding writes through createAsSystem → opt into the\n // fail-closed system-write policy (composition-oncreate-lifecycle plan).\n systemAccessPolicy: { create: ResourceSystemAccessMode.ALLOWED },\n\n coreOperations: [\n CoreResourceOperation.READ,\n CoreResourceOperation.SEARCH,\n CoreResourceOperation.UPDATE,\n CoreResourceOperation.CREATE,\n // DELETE is REPOSITORY_ONLY (no HTTP route): powers the composition\n // onParentDelete cascade so the self-healing state row is physically removed\n // when its owning scope is deleted. Without it the cascade throws\n // ErrorType.CONFIGURATION on any scope that has a materialized row.\n CoreResourceOperation.DELETE,\n ],\n\n customOperation: {} as Record<string, never>,\n\n operationsConfiguration: {\n [CoreResourceOperation.READ]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_MEMBER],\n riskLevel: ResourceOperationRiskLevel.LOW,\n }\n ]\n },\n\n [CoreResourceOperation.SEARCH]: {\n variants: [{\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_MEMBER],\n riskLevel: ResourceOperationRiskLevel.LOW,\n isSearchable: false,\n searchableFields: [],\n searchableOptions: { caseSensitive: false, fullMatchOnly: false },\n filterFields: {},\n sortFields: [],\n maxPaginatedResultPerPageLimit: 50,\n }],\n },\n\n [CoreResourceOperation.UPDATE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.REPOSITORY_ONLY,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_MEMBER],\n riskLevel: ResourceOperationRiskLevel.LOW,\n }\n ],\n },\n\n [CoreResourceOperation.CREATE]: {\n variants: [\n {\n // INTERNAL_CALL (not REPOSITORY_ONLY): the onParentCreate seed's\n // `createAsSystem` resolves the CREATE op via the service tier, which\n // rejects REPOSITORY_ONLY → OPERATION_PATH_NOT_FOUND, silent no-seed. See\n // the org-preferences config + composition-oncreate plan for the rationale.\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_MEMBER],\n riskLevel: ResourceOperationRiskLevel.LOW,\n }\n ],\n },\n\n // Internal-only (REPOSITORY_ONLY, no HTTP route): powers the composition\n // onParentDelete cascade so this self-healing state row is physically removed\n // when its owning organization is deleted. Without a DELETE op the cascade\n // (deleteChildrenImmediate) throws ErrorType.CONFIGURATION on any org that has\n // a materialized row — these rows self-heal on first READ, so most active orgs\n // have one. ORG_ADMIN/HIGH: the org-scope admin tier for a privileged teardown\n // (org progression writes are ORG_MEMBER, but teardown is admin-gated).\n // See composition-oncreate-lifecycle plan (systemic DELETE gap).\n [CoreResourceOperation.DELETE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.REPOSITORY_ONLY,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN],\n riskLevel: ResourceOperationRiskLevel.HIGH,\n }\n ],\n },\n },\n});\n"]}
1
+ {"version":3,"file":"progression-state.shared.resources-config.schemas.js","sourceRoot":"","sources":["../../../../src/guidance/progression-state.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAEL,0BAA0B,EAC1B,kCAAkC,GACnC,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,qBAAqB,EAAE,MAAM,gDAAgD,CAAC;AACvF,OAAO,EAAE,0BAA0B,EAAwB,MAAM,uCAAuC,CAAC;AACzG,OAAO,EAAE,gBAAgB,EAAE,kCAAkC,EAAE,MAAM,gDAAgD,CAAC;AACtH,OAAO,EAAE,4BAA4B,EAAE,MAAM,uCAAuC,CAAC;AACrF,OAAO,EAAE,0CAA0C,EAAE,MAAM,8CAA8C,CAAC;AAC1G,OAAO,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAC;AACxF,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,iDAAiD,CAAC;AACjG,O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E,WAAW,EAAE,4BAA4B,CAAC,aAAa;oBACvD,SAAS,EAAE,IAAI;oBACf,KAAK,EAAE,CAAC,cAAc,CAAC,UAAU,CAAC;oBAClC,SAAS,EAAE,0BAA0B,CAAC,GAAG;iBAC1C;aACF;SACF;QAED,yEAAyE;QACzE,8EAA8E;QAC9E,2EAA2E;QAC3E,+EAA+E;QAC/E,+EAA+E;QAC/E,+EAA+E;QAC/E,wEAAwE;QACxE,iEAAiE;QACjE,CAAC,qBAAqB,CAAC,MAAM,CAAC,EAAE;YAC9B,QAAQ,EAAE;gBACR;oBACE,WAAW,EAAE,4BAA4B,CAAC,eAAe;oBACzD,SAAS,EAAE,IAAI;oBACf,KAAK,EAAE,CAAC,cAAc,CAAC,SAAS,CAAC;oBACjC,SAAS,EAAE,0BAA0B,CAAC,IAAI;iBAC3C;aACF;SACF;KACF;CACF,CAAC,CAAC","sourcesContent":["/**\n * Progression State Shared Resource Configurations\n *\n * Resource configurations for dual-scope progression state management (USER / ORGANIZATION).\n * Each scope stores milestone achievement progress, operation counts, and category progress.\n * The shared payload schema stays scope-agnostic, while the schema file also owns\n * the scope-aware persisted variants used by these resource configurations.\n */\n\nimport {\n ProgressionStateSchema,\n UserProgressionStateSchema,\n OrganizationProgressionStateSchema,\n} from './progression-state.shared.schemas';\nimport { CoreResourceOperation } from '../resources/resources.shared.core.definitions';\nimport { ResourceOperationRiskLevel, ResourceRelationship } from '../resources/resources.shared.schemas';\nimport { CoreResourceType, coreResourceShared_FieldIdentifier } from '../resources/resources.shared.core.definitions';\nimport { ResourceOperationVariantType } from '../resources/resources.shared.schemas';\nimport { createResourceConfiguration_Initialization } from '../resources/resources-config.shared.factory';\nimport { ResourceSystemAccessMode } from '../resources/resources-config.shared.schemas';\nimport { CORE_APP_ROLES, CORE_ORG_ROLES } from '../security/authorizations/roles.shared.schemas';\nimport { DataPortabilityProvenance } from '../compliance/privacy/subject-export.shared.schemas';\nimport { ErasureRetentionMode, ResourceDataSubjectKind } from '../compliance/privacy/impersonalization.shared.schemas';\n\n// ─── USER PROGRESSION STATE ─────────────────────────────────────────────────────\n\ntype UserProgressionStateCoreOperations =\n | CoreResourceOperation.READ\n | CoreResourceOperation.SEARCH\n | CoreResourceOperation.UPDATE\n | CoreResourceOperation.CREATE\n | CoreResourceOperation.DELETE\n // Route-less; `retentionPolicy` requires READ + LIST + UPDATE_MANY.\n | CoreResourceOperation.LIST\n | CoreResourceOperation.UPDATE_MANY;\n\nexport const userProgressionStateResourceConfiguration_InitializationFactory = (resourcesRelationships: ResourceRelationship[]) => createResourceConfiguration_Initialization<\n Record<string, never>,\n UserProgressionStateCoreOperations,\n typeof UserProgressionStateSchema\n>({\n mainSchema: UserProgressionStateSchema,\n resourceIdentifier: CoreResourceType.USER_PROGRESSION_STATE,\n resourceFieldIdentifier: coreResourceShared_FieldIdentifier[CoreResourceType.USER_PROGRESSION_STATE],\n resourceRelationships: resourcesRelationships,\n isSystemResource: true,\n // onParentCreate eager-seeding writes through createAsSystem → opt into the\n // fail-closed system-write policy (composition-oncreate-lifecycle plan).\n systemAccessPolicy: {\n exportSubject: ResourceSystemAccessMode.ALLOWED, create: ResourceSystemAccessMode.ALLOWED },\n portabilityPolicy: { defaultProvenance: DataPortabilityProvenance.DERIVED },\n\n /**\n * Subject erasure RETAINS this row and RESETS the achievement records, operation counters and points total to the schema's own defaults.\n *\n * The USAGE categories on this resource are accurate — these are observations the product made about a\n * named person — so `RETAIN_ONLY` would be a false assertion and the factory refuses it. Until\n * `RedactionType.RESET` existed no treatment could reach these fields at all: they are non-nullable WITH\n * a `.default()`, so REMOVE (needs clearable) and MASK (needs a string) both refuse. RESET returns each\n * to what it is when nobody has set it, which for a behavioural record is exactly what erasure should\n * leave behind.\n *\n * The primary scope FK is preserved — severing it is refused outright, because it would leave the\n * retained row with no tenant anchor, unreachable even to the audited see-through read.\n */\n retentionPolicy: {\n mode: ErasureRetentionMode.RETAIN_AND_IMPERSONALIZE,\n },\n\n /**\n * Erasing one of these rows revokes NO session. The row is state ABOUT a person rather than the person,\n * and its primary scope FK anchors it — the enum prescribes `NO_PRINCIPAL` for that shape. The subject's\n * own session ends through the `USERS` row.\n */\n dataSubjectPolicy: { kind: ResourceDataSubjectKind.NO_PRINCIPAL },\n\n coreOperations: [\n CoreResourceOperation.READ,\n CoreResourceOperation.SEARCH,\n CoreResourceOperation.UPDATE,\n CoreResourceOperation.CREATE,\n // DELETE is REPOSITORY_ONLY (no HTTP route): powers the composition\n // onParentDelete cascade so the self-healing state row is physically removed\n // when its owning scope is deleted. Without it the cascade throws\n // ErrorType.CONFIGURATION on any scope that has a materialized row.\n CoreResourceOperation.DELETE,\n // Route-less; `retentionPolicy` requires READ + LIST + UPDATE_MANY (READ is above).\n CoreResourceOperation.LIST,\n CoreResourceOperation.UPDATE_MANY,\n ],\n\n customOperation: {} as Record<string, never>,\n\n operationsConfiguration: {\n\n /*\n\n * Route-less retention plumbing — INTERNAL_CALL registers no route and must not be REPOSITORY_ONLY:\n\n * the retention primitives resolve through `getServiceOperationPathDefault`, which matches only\n\n * INTERNAL_CALL / API_CALL. UPDATE_MANY is the verb the impersonalize writer uses.\n\n */\n\n [CoreResourceOperation.LIST]: {\n\n variants: [{\n\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n\n isDefault: true,\n\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n\n riskLevel: ResourceOperationRiskLevel.LOW,\n\n }],\n\n },\n\n [CoreResourceOperation.UPDATE_MANY]: {\n\n variants: [{\n\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n\n isDefault: true,\n\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n\n riskLevel: ResourceOperationRiskLevel.CRITICAL,\n\n }],\n\n },\n\n [CoreResourceOperation.READ]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_USER],\n riskLevel: ResourceOperationRiskLevel.LOW,\n }\n ]\n },\n\n [CoreResourceOperation.SEARCH]: {\n variants: [{\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_USER],\n riskLevel: ResourceOperationRiskLevel.LOW,\n isSearchable: false,\n searchableFields: [],\n searchableOptions: { caseSensitive: false, fullMatchOnly: false },\n filterFields: {},\n sortFields: [],\n maxPaginatedResultPerPageLimit: 50,\n }],\n },\n\n [CoreResourceOperation.UPDATE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.REPOSITORY_ONLY,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_USER],\n riskLevel: ResourceOperationRiskLevel.LOW,\n }\n ],\n },\n\n [CoreResourceOperation.CREATE]: {\n variants: [\n {\n // INTERNAL_CALL (not REPOSITORY_ONLY): the onParentCreate seed's\n // `createAsSystem` resolves the CREATE op via the service tier, which\n // rejects REPOSITORY_ONLY → OPERATION_PATH_NOT_FOUND, silent no-seed. See\n // the org-preferences config + composition-oncreate plan for the rationale.\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_USER],\n riskLevel: ResourceOperationRiskLevel.LOW,\n }\n ],\n },\n\n // Internal-only (REPOSITORY_ONLY, no HTTP route): powers the composition\n // onParentDelete cascade so this self-healing state row is physically removed\n // when its owning user is deleted. Without a DELETE op the cascade\n // (deleteChildrenImmediate) throws ErrorType.CONFIGURATION on any user that\n // has a materialized row — these rows self-heal on first READ, so most active\n // users have one. Super-admin/HIGH: a privileged teardown, not the APP_USER\n // self-write. See composition-oncreate-lifecycle plan (systemic DELETE gap).\n [CoreResourceOperation.DELETE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.REPOSITORY_ONLY,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.HIGH,\n }\n ],\n },\n },\n});\n\n// ─── ORGANIZATION PROGRESSION STATE ─────────────────────────────────────────────\n\ntype OrganizationProgressionStateCoreOperations =\n | CoreResourceOperation.READ\n | CoreResourceOperation.SEARCH\n | CoreResourceOperation.UPDATE\n | CoreResourceOperation.CREATE\n | CoreResourceOperation.DELETE;\n\nexport const organizationProgressionStateResourceConfiguration_InitializationFactory = (resourcesRelationships: ResourceRelationship[]) => createResourceConfiguration_Initialization<\n Record<string, never>,\n OrganizationProgressionStateCoreOperations,\n typeof OrganizationProgressionStateSchema\n>({\n mainSchema: OrganizationProgressionStateSchema,\n resourceIdentifier: CoreResourceType.ORGANIZATION_PROGRESSION_STATE,\n resourceFieldIdentifier: coreResourceShared_FieldIdentifier[CoreResourceType.ORGANIZATION_PROGRESSION_STATE],\n resourceRelationships: resourcesRelationships,\n isSystemResource: true,\n // onParentCreate eager-seeding writes through createAsSystem → opt into the\n // fail-closed system-write policy (composition-oncreate-lifecycle plan).\n systemAccessPolicy: { create: ResourceSystemAccessMode.ALLOWED },\n\n coreOperations: [\n CoreResourceOperation.READ,\n CoreResourceOperation.SEARCH,\n CoreResourceOperation.UPDATE,\n CoreResourceOperation.CREATE,\n // DELETE is REPOSITORY_ONLY (no HTTP route): powers the composition\n // onParentDelete cascade so the self-healing state row is physically removed\n // when its owning scope is deleted. Without it the cascade throws\n // ErrorType.CONFIGURATION on any scope that has a materialized row.\n CoreResourceOperation.DELETE,\n ],\n\n customOperation: {} as Record<string, never>,\n\n operationsConfiguration: {\n [CoreResourceOperation.READ]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_MEMBER],\n riskLevel: ResourceOperationRiskLevel.LOW,\n }\n ]\n },\n\n [CoreResourceOperation.SEARCH]: {\n variants: [{\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_MEMBER],\n riskLevel: ResourceOperationRiskLevel.LOW,\n isSearchable: false,\n searchableFields: [],\n searchableOptions: { caseSensitive: false, fullMatchOnly: false },\n filterFields: {},\n sortFields: [],\n maxPaginatedResultPerPageLimit: 50,\n }],\n },\n\n [CoreResourceOperation.UPDATE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.REPOSITORY_ONLY,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_MEMBER],\n riskLevel: ResourceOperationRiskLevel.LOW,\n }\n ],\n },\n\n [CoreResourceOperation.CREATE]: {\n variants: [\n {\n // INTERNAL_CALL (not REPOSITORY_ONLY): the onParentCreate seed's\n // `createAsSystem` resolves the CREATE op via the service tier, which\n // rejects REPOSITORY_ONLY → OPERATION_PATH_NOT_FOUND, silent no-seed. See\n // the org-preferences config + composition-oncreate plan for the rationale.\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_MEMBER],\n riskLevel: ResourceOperationRiskLevel.LOW,\n }\n ],\n },\n\n // Internal-only (REPOSITORY_ONLY, no HTTP route): powers the composition\n // onParentDelete cascade so this self-healing state row is physically removed\n // when its owning organization is deleted. Without a DELETE op the cascade\n // (deleteChildrenImmediate) throws ErrorType.CONFIGURATION on any org that has\n // a materialized row — these rows self-heal on first READ, so most active orgs\n // have one. ORG_ADMIN/HIGH: the org-scope admin tier for a privileged teardown\n // (org progression writes are ORG_MEMBER, but teardown is admin-gated).\n // See composition-oncreate-lifecycle plan (systemic DELETE gap).\n [CoreResourceOperation.DELETE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.REPOSITORY_ONLY,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN],\n riskLevel: ResourceOperationRiskLevel.HIGH,\n }\n ],\n },\n },\n});\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"progression-state.shared.schemas.d.ts","sourceRoot":"","sources":["../../../src/guidance/progression-state.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB;;oEAEoE;AAEpE,+CAA+C;AAC/C,eAAO,MAAM,kCAAkC;;;iBAK7C,CAAC;AACH,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAC;AAE9F;;oEAEoE;AAEpE;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,sBAAsB;;;;iBAejC,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE;;oEAEoE;AAEpE,uCAAuC;AACvC,eAAO,MAAM,iCAAiC;;;iBAK5C,CAAC;AACH,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAC;AAE5F;;oEAEoE;AAEpE;;wDAEwD;AACxD,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;iBA8CjC,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;iBAErC,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;iBAE7C,CAAC;AACH,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAC;AAE9F,MAAM,MAAM,yBAAyB,GAAG,oBAAoB,GAAG,4BAA4B,CAAC"}
1
+ {"version":3,"file":"progression-state.shared.schemas.d.ts","sourceRoot":"","sources":["../../../../src/guidance/progression-state.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB;;oEAEoE;AAEpE,+CAA+C;AAC/C,eAAO,MAAM,kCAAkC;;;iBAK7C,CAAC;AACH,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAC;AAE9F;;oEAEoE;AAEpE;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,sBAAsB;;;;iBAejC,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE;;oEAEoE;AAEpE,uCAAuC;AACvC,eAAO,MAAM,iCAAiC;;;iBAK5C,CAAC;AACH,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAC;AAE5F;;oEAEoE;AAEpE;;wDAEwD;AACxD,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;iBA8CjC,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;iBAErC,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;iBAE7C,CAAC;AACH,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAC;AAE9F,MAAM,MAAM,yBAAyB,GAAG,oBAAoB,GAAG,4BAA4B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"progression-state.shared.schemas.js","sourceRoot":"","sources":["../../../src/guidance/progression-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,aAAa,EAAE,MAAM,gDAAgD,CAAC;AAC/E,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEhE;;oEAEoE;AAEpE,+CAA+C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AAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,sBAAsB,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;SACrD,cAAc,CAAC,oBAAoB,CAAC,KAAK,CAAC,EAC7C,aAAa,CAAC,KAAK,CACpB;IACD,6EAA6E;IAC7E,kBAAkB,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,iCAAiC,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;CACxF,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,0BAA0B,GAAG,sBAAsB,CAAC,MAAM,CAAC;IACtE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,YAAY,EAAE,CAAC,cAAc,EAAE,CAAC,iBAAiB,EAAE;CAC5F,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,kCAAkC,GAAG,sBAAsB,CAAC,MAAM,CAAC;IAC9E,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,YAAY,EAAE,CAAC,cAAc,EAAE,CAAC,iBAAiB,EAAE;CACpG,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\nimport { PersonalDataCategory } from '../compliance/privacy/personal-data-category.shared.schemas';\nimport { RedactionType } from '../compliance/privacy/redaction.shared.schemas';\nimport { addImpersonalizeWith } from '@wildo-ai/zod-decorators';\n\n/** ──────────────────────────────────────────────────────────────\n * Progression State — Milestone Achievement Record\n * ────────────────────────────────────────────────────────────── */\n\n/** Record of a single milestone achievement */\nexport const ProgressionMilestoneAchievedSchema = z.object({\n /** When the milestone was achieved */\n achievedAt: z.coerce.date().describe('When the milestone was achieved.'),\n /** How many times the triggering operation occurred (for COUNT_THRESHOLD context) */\n count: z.number().int().default(0).describe('How many times the milestone\\'s triggering operation had been performed when the milestone was achieved.'),\n});\nexport type ProgressionMilestoneAchieved = z.infer<typeof ProgressionMilestoneAchievedSchema>;\n\n/** ──────────────────────────────────────────────────────────────\n * Progression State — Value Moment Record\n * ────────────────────────────────────────────────────────────── */\n\n/**\n * A value moment's state for one scope: what it has observed, and whether it fired.\n *\n * ## Why this lives on the progression state rather than in a resource of its own\n *\n * A value moment is an achievement keyed by an identifier, measured per USER or per ORGANIZATION,\n * derived from the same operation stream — the exact shape this row already holds for milestones,\n * with the same `PersonalDataCategory.USAGE` classification, the same erasure treatment, the same\n * subject-export provenance and the same `onParentCreate` / `onParentDelete` lifecycle. A second\n * resource would have re-declared every one of those obligations (#414).\n *\n * ## Why it is a SEPARATE FIELD from `milestonesAchieved`\n *\n * The two vocabularies are semantically distinct and their identifier spaces are independent: a\n * milestone is AUTHORED progression (dependencies, conditions, points, categories); a value moment\n * is a MEASURED behavioural moment (a `ValueMomentRole`, `ANY`/`ALL` composition over typed signals,\n * a cooldown, a suppressing `beforeStage`). Sharing one map would let a `milestoneRef` and a\n * `momentIdentifier` collide silently, and neither vocabulary constrains the other.\n *\n * ## What is NOT here, and why\n *\n * `ValueMomentRole.ANTI_PATTERN` is declared as NOT persisted — it re-fires on a cooldown rather than\n * being achieved once — so no anti-pattern ever writes a record here. Its cooldown is in-process; in\n * a multi-instance deployment each instance therefore keeps its own, which is what \"not persisted\"\n * means rather than a defect to fix here.\n */\nexport const ValueMomentStateSchema = z.object({\n /**\n * Signal keys observed so far, for `ValueMomentMode.ALL` composition. A moment in `ANY` mode fires\n * on the first signal and never needs this, but it is recorded for both so a moment whose mode is\n * changed after the fact does not silently lose the progress it already had.\n */\n signalsObserved: z.array(z.string()).default([]).describe('Signals observed so far. A signal that must occur several times is added once it reaches that count. The moment fires when any signal, or every signal, has been observed, depending on its mode.'),\n /** Matching event occurrences per path-safe signal identity, accumulated per moment and scope.\n * Optional for existing state rows; absent counts mean zero. Ordinary moment counters share the\n * progression record's retention/erasure lifecycle. Anti-pattern counts remain instance-local.\n */\n signalOccurrenceCounts: z.record(z.string(), z.number().int().nonnegative()).optional()\n .describe('Occurrences counted per signal, kept only for signals that must occur more than once before they count as observed. A missing count means zero.'),\n /** When the moment fired. Absent while it is still accumulating signals. */\n achievedAt: z.coerce.date().optional().describe('When the value moment fired. Absent while it is still collecting signals.'),\n});\nexport type ValueMomentState = z.infer<typeof ValueMomentStateSchema>;\n\n/** ──────────────────────────────────────────────────────────────\n * Progression State — Per-Category Aggregated Progress\n * ────────────────────────────────────────────────────────────── */\n\n/** Per-category aggregated progress */\nexport const ProgressionCategoryProgressSchema = z.object({\n /** Number of milestones completed in this category */\n completedCount: z.number().int().default(0).describe('Number of milestones achieved in this category.'),\n /** Total points earned in this category */\n totalPoints: z.number().int().default(0).describe('Points earned from the milestones achieved in this category.'),\n});\nexport type ProgressionCategoryProgress = z.infer<typeof ProgressionCategoryProgressSchema>;\n\n/** ──────────────────────────────────────────────────────────────\n * Progression State — Top-Level Document\n * ────────────────────────────────────────────────────────────── */\n\n/** Shared progression state payload body.\n * Scope-specific state resources extend this schema with their owning FK\n * (`userId` / `organizationId`) before persistence. */\nexport const ProgressionStateSchema = z.object({\n /** Map of milestoneRef → achievement record. Populated when a milestone is achieved. */\n // USAGE — a per-person record of what they accomplished and how often they acted.\n // RESET on erasure — returns this field to its schema default. It holds what this person achieved and when,\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 milestonesAchieved: addImpersonalizeWith(\n z.record(z.string(), ProgressionMilestoneAchievedSchema).default({})\n .dataCategories(PersonalDataCategory.USAGE),\n RedactionType.RESET,\n ),\n /** Map of `${resourceType}:${operation}` → count. Incremented on every matching operation.\n * This is the raw data used by COUNT_THRESHOLD conditions. */\n // RESET on erasure — returns this field to its schema default. It holds how often they performed each operation,\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 operationCounts: addImpersonalizeWith(\n z.record(z.string(), z.number().int()).default({}).dataCategories(PersonalDataCategory.USAGE),\n RedactionType.RESET,\n ),\n /** Total points across all achieved milestones. Updated atomically with achievements. */\n // RESET on erasure — returns this field to its schema default. It holds their points total,\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 totalPoints: addImpersonalizeWith(\n z.number().int().default(0).isSummaryField().dataCategories(PersonalDataCategory.USAGE),\n RedactionType.RESET,\n ),\n /** Map of momentIdentifier → value-moment state. See `ValueMomentStateSchema` for why it is\n * separate from `milestonesAchieved`. */\n // USAGE — a per-person record of which product moments they reached and when.\n // RESET on erasure — the same treatment as `milestonesAchieved` beside it, and for the same\n // reasons: the USAGE category is accurate (these are observations the product made about a named\n // person, so RETAIN_ONLY would be a false assertion), and the field is non-nullable WITH a\n // `.default()`, so REMOVE needs a clearable field and MASK needs a string. RESET returns it to\n // what it is when nobody has been observed, which is what erasure should leave behind.\n valueMomentsAchieved: addImpersonalizeWith(\n z.record(z.string(), ValueMomentStateSchema).default({})\n .dataCategories(PersonalDataCategory.USAGE),\n RedactionType.RESET,\n ),\n /** Per-category progress. Pre-aggregated for frontend display efficiency. */\n categoriesProgress: z.record(z.string(), ProgressionCategoryProgressSchema).default({}),\n});\nexport type ProgressionState = z.infer<typeof ProgressionStateSchema>;\n\nexport const UserProgressionStateSchema = ProgressionStateSchema.extend({\n userId: z.string().min(1).isDBIndexed().isForeignKey().isSummaryField().excludeFromUpdate(),\n});\nexport type UserProgressionState = z.infer<typeof UserProgressionStateSchema>;\n\nexport const OrganizationProgressionStateSchema = ProgressionStateSchema.extend({\n organizationId: z.string().min(1).isDBIndexed().isForeignKey().isSummaryField().excludeFromUpdate(),\n});\nexport type OrganizationProgressionState = z.infer<typeof OrganizationProgressionStateSchema>;\n\nexport type PersistedProgressionState = UserProgressionState | OrganizationProgressionState;\n"]}
1
+ {"version":3,"file":"progression-state.shared.schemas.js","sourceRoot":"","sources":["../../../../src/guidance/progression-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,aAAa,EAAE,MAAM,gDAAgD,CAAC;AAC/E,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEhE;;oEAEoE;AAEpE,+CAA+C;AAC/C,MAAM,CAAC,MAAM,kCAAkC,GAAG,CAAC,CAAC,MAAM,CAAC;IACzD,sCAAsC;IACtC,UAAU,EAAE,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,QAAQ,CAAC,kCAAkC,CAAC;IACxE,qFAAqF;IACrF,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,0GAA0G,CAAC;CACxJ,CAAC,CAAC;AAGH;;oEAEoE;AAEpE;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C;;;;OAIG;IACH,eAAe,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,mMAAmM,CAAC;IAC9P;;;OAGG;IACH,sBAAsB,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE,CAAC,CAAC,QAAQ,EAAE;SACpF,QAAQ,CAAC,iJAAiJ,CAAC;IAC9J,4EAA4E;IAC5E,UAAU,EAAE,CAAC,CAAC,MAAM,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ACjG,iGAAiG;IACjG,wFAAwF;IACxF,WAAW,EAAE,oBAAoB,CACjC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,cAAc,EAAE,CAAC,cAAc,CAAC,oBAAoB,CAAC,KAAK,CAAC,EACrF,aAAa,CAAC,KAAK,CACpB;IACD;8CAC0C;IAC1C,8EAA8E;IAC9E,4FAA4F;IAC5F,iGAAiG;IACjG,2FAA2F;IAC3F,+FAA+F;IAC/F,uFAAuF;IACvF,oBAAoB,EAAE,oBAAoB,CACxC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,sBAAsB,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;SACrD,cAAc,CAAC,oBAAoB,CAAC,KAAK,CAAC,EAC7C,aAAa,CAAC,KAAK,CACpB;IACD,6EAA6E;IAC7E,kBAAkB,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,iCAAiC,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;CACxF,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,0BAA0B,GAAG,sBAAsB,CAAC,MAAM,CAAC;IACtE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,YAAY,EAAE,CAAC,cAAc,EAAE,CAAC,iBAAiB,EAAE;CAC5F,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,kCAAkC,GAAG,sBAAsB,CAAC,MAAM,CAAC;IAC9E,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,YAAY,EAAE,CAAC,cAAc,EAAE,CAAC,iBAAiB,EAAE;CACpG,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\nimport { PersonalDataCategory } from '../compliance/privacy/personal-data-category.shared.schemas';\nimport { RedactionType } from '../compliance/privacy/redaction.shared.schemas';\nimport { addImpersonalizeWith } from '@wildo-ai/zod-decorators';\n\n/** ──────────────────────────────────────────────────────────────\n * Progression State — Milestone Achievement Record\n * ────────────────────────────────────────────────────────────── */\n\n/** Record of a single milestone achievement */\nexport const ProgressionMilestoneAchievedSchema = z.object({\n /** When the milestone was achieved */\n achievedAt: z.coerce.date().describe('When the milestone was achieved.'),\n /** How many times the triggering operation occurred (for COUNT_THRESHOLD context) */\n count: z.number().int().default(0).describe('How many times the milestone\\'s triggering operation had been performed when the milestone was achieved.'),\n});\nexport type ProgressionMilestoneAchieved = z.infer<typeof ProgressionMilestoneAchievedSchema>;\n\n/** ──────────────────────────────────────────────────────────────\n * Progression State — Value Moment Record\n * ────────────────────────────────────────────────────────────── */\n\n/**\n * A value moment's state for one scope: what it has observed, and whether it fired.\n *\n * ## Why this lives on the progression state rather than in a resource of its own\n *\n * A value moment is an achievement keyed by an identifier, measured per USER or per ORGANIZATION,\n * derived from the same operation stream — the exact shape this row already holds for milestones,\n * with the same `PersonalDataCategory.USAGE` classification, the same erasure treatment, the same\n * subject-export provenance and the same `onParentCreate` / `onParentDelete` lifecycle. A second\n * resource would have re-declared every one of those obligations (#414).\n *\n * ## Why it is a SEPARATE FIELD from `milestonesAchieved`\n *\n * The two vocabularies are semantically distinct and their identifier spaces are independent: a\n * milestone is AUTHORED progression (dependencies, conditions, points, categories); a value moment\n * is a MEASURED behavioural moment (a `ValueMomentRole`, `ANY`/`ALL` composition over typed signals,\n * a cooldown, a suppressing `beforeStage`). Sharing one map would let a `milestoneRef` and a\n * `momentIdentifier` collide silently, and neither vocabulary constrains the other.\n *\n * ## What is NOT here, and why\n *\n * `ValueMomentRole.ANTI_PATTERN` is declared as NOT persisted — it re-fires on a cooldown rather than\n * being achieved once — so no anti-pattern ever writes a record here. Its cooldown is in-process; in\n * a multi-instance deployment each instance therefore keeps its own, which is what \"not persisted\"\n * means rather than a defect to fix here.\n */\nexport const ValueMomentStateSchema = z.object({\n /**\n * Signal keys observed so far, for `ValueMomentMode.ALL` composition. A moment in `ANY` mode fires\n * on the first signal and never needs this, but it is recorded for both so a moment whose mode is\n * changed after the fact does not silently lose the progress it already had.\n */\n signalsObserved: z.array(z.string()).default([]).describe('Signals observed so far. A signal that must occur several times is added once it reaches that count. The moment fires when any signal, or every signal, has been observed, depending on its mode.'),\n /** Matching event occurrences per path-safe signal identity, accumulated per moment and scope.\n * Optional for existing state rows; absent counts mean zero. Ordinary moment counters share the\n * progression record's retention/erasure lifecycle. Anti-pattern counts remain instance-local.\n */\n signalOccurrenceCounts: z.record(z.string(), z.number().int().nonnegative()).optional()\n .describe('Occurrences counted per signal, kept only for signals that must occur more than once before they count as observed. A missing count means zero.'),\n /** When the moment fired. Absent while it is still accumulating signals. */\n achievedAt: z.coerce.date().optional().describe('When the value moment fired. Absent while it is still collecting signals.'),\n});\nexport type ValueMomentState = z.infer<typeof ValueMomentStateSchema>;\n\n/** ──────────────────────────────────────────────────────────────\n * Progression State — Per-Category Aggregated Progress\n * ────────────────────────────────────────────────────────────── */\n\n/** Per-category aggregated progress */\nexport const ProgressionCategoryProgressSchema = z.object({\n /** Number of milestones completed in this category */\n completedCount: z.number().int().default(0).describe('Number of milestones achieved in this category.'),\n /** Total points earned in this category */\n totalPoints: z.number().int().default(0).describe('Points earned from the milestones achieved in this category.'),\n});\nexport type ProgressionCategoryProgress = z.infer<typeof ProgressionCategoryProgressSchema>;\n\n/** ──────────────────────────────────────────────────────────────\n * Progression State — Top-Level Document\n * ────────────────────────────────────────────────────────────── */\n\n/** Shared progression state payload body.\n * Scope-specific state resources extend this schema with their owning FK\n * (`userId` / `organizationId`) before persistence. */\nexport const ProgressionStateSchema = z.object({\n /** Map of milestoneRef → achievement record. Populated when a milestone is achieved. */\n // USAGE — a per-person record of what they accomplished and how often they acted.\n // RESET on erasure — returns this field to its schema default. It holds what this person achieved and when,\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 milestonesAchieved: addImpersonalizeWith(\n z.record(z.string(), ProgressionMilestoneAchievedSchema).default({})\n .dataCategories(PersonalDataCategory.USAGE),\n RedactionType.RESET,\n ),\n /** Map of `${resourceType}:${operation}` → count. Incremented on every matching operation.\n * This is the raw data used by COUNT_THRESHOLD conditions. */\n // RESET on erasure — returns this field to its schema default. It holds how often they performed each operation,\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 operationCounts: addImpersonalizeWith(\n z.record(z.string(), z.number().int()).default({}).dataCategories(PersonalDataCategory.USAGE),\n RedactionType.RESET,\n ),\n /** Total points across all achieved milestones. Updated atomically with achievements. */\n // RESET on erasure — returns this field to its schema default. It holds their points total,\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 totalPoints: addImpersonalizeWith(\n z.number().int().default(0).isSummaryField().dataCategories(PersonalDataCategory.USAGE),\n RedactionType.RESET,\n ),\n /** Map of momentIdentifier → value-moment state. See `ValueMomentStateSchema` for why it is\n * separate from `milestonesAchieved`. */\n // USAGE — a per-person record of which product moments they reached and when.\n // RESET on erasure — the same treatment as `milestonesAchieved` beside it, and for the same\n // reasons: the USAGE category is accurate (these are observations the product made about a named\n // person, so RETAIN_ONLY would be a false assertion), and the field is non-nullable WITH a\n // `.default()`, so REMOVE needs a clearable field and MASK needs a string. RESET returns it to\n // what it is when nobody has been observed, which is what erasure should leave behind.\n valueMomentsAchieved: addImpersonalizeWith(\n z.record(z.string(), ValueMomentStateSchema).default({})\n .dataCategories(PersonalDataCategory.USAGE),\n RedactionType.RESET,\n ),\n /** Per-category progress. Pre-aggregated for frontend display efficiency. */\n categoriesProgress: z.record(z.string(), ProgressionCategoryProgressSchema).default({}),\n});\nexport type ProgressionState = z.infer<typeof ProgressionStateSchema>;\n\nexport const UserProgressionStateSchema = ProgressionStateSchema.extend({\n userId: z.string().min(1).isDBIndexed().isForeignKey().isSummaryField().excludeFromUpdate(),\n});\nexport type UserProgressionState = z.infer<typeof UserProgressionStateSchema>;\n\nexport const OrganizationProgressionStateSchema = ProgressionStateSchema.extend({\n organizationId: z.string().min(1).isDBIndexed().isForeignKey().isSummaryField().excludeFromUpdate(),\n});\nexport type OrganizationProgressionState = z.infer<typeof OrganizationProgressionStateSchema>;\n\nexport type PersistedProgressionState = UserProgressionState | OrganizationProgressionState;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"http-api-binding-id.shared.utils.d.ts","sourceRoot":"","sources":["../../../src/http-api-binding/http-api-binding-id.shared.utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAmBH,OAAO,EAGL,KAAK,eAAe,EACrB,MAAM,mCAAmC,CAAC;AAG3C;;;;;GAKG;AACH,qBAAa,sBAAuB,SAAQ,KAAK;gBACnC,OAAO,EAAE,MAAM;CAI5B;AAED,6EAA6E;AAC7E,MAAM,MAAM,wBAAwB,GAAG,MAAM,GAAG,MAAM,CAAC;AAEvD;;;GAGG;AACH,eAAO,MAAM,4BAA4B,EAAE,MAA6B,CAAC;AA6DzE;;;;GAIG;AACH,wBAAgB,4BAA4B,CAC1C,QAAQ,EAAE,eAAe,EACzB,QAAQ,EAAE,OAAO,GAChB,wBAAwB,CA4C1B;AAaD;;;;GAIG;AACH,wBAAgB,2BAA2B,CACzC,OAAO,EAAE;IAAE,SAAS,EAAE,SAAS,eAAe,EAAE,CAAA;CAAE,EAClD,aAAa,EAAE,SAAS,OAAO,EAAE,GAChC,MAAM,CAqBR;AAED;;;;;;;;GAQG;AACH,wBAAgB,2BAA2B,CACzC,OAAO,EAAE;IAAE,SAAS,EAAE,SAAS,eAAe,EAAE,CAAA;CAAE,EAClD,UAAU,EAAE,MAAM,GACjB,wBAAwB,EAAE,CAqC5B;AAED,yCAAyC;AACzC,wBAAgB,8BAA8B,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAEzE"}
1
+ {"version":3,"file":"http-api-binding-id.shared.utils.d.ts","sourceRoot":"","sources":["../../../../src/http-api-binding/http-api-binding-id.shared.utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAmBH,OAAO,EAGL,KAAK,eAAe,EACrB,MAAM,mCAAmC,CAAC;AAG3C;;;;;GAKG;AACH,qBAAa,sBAAuB,SAAQ,KAAK;gBACnC,OAAO,EAAE,MAAM;CAI5B;AAED,6EAA6E;AAC7E,MAAM,MAAM,wBAAwB,GAAG,MAAM,GAAG,MAAM,CAAC;AAEvD;;;GAGG;AACH,eAAO,MAAM,4BAA4B,EAAE,MAA6B,CAAC;AA6DzE;;;;GAIG;AACH,wBAAgB,4BAA4B,CAC1C,QAAQ,EAAE,eAAe,EACzB,QAAQ,EAAE,OAAO,GAChB,wBAAwB,CA4C1B;AAaD;;;;GAIG;AACH,wBAAgB,2BAA2B,CACzC,OAAO,EAAE;IAAE,SAAS,EAAE,SAAS,eAAe,EAAE,CAAA;CAAE,EAClD,aAAa,EAAE,SAAS,OAAO,EAAE,GAChC,MAAM,CAqBR;AAED;;;;;;;;GAQG;AACH,wBAAgB,2BAA2B,CACzC,OAAO,EAAE;IAAE,SAAS,EAAE,SAAS,eAAe,EAAE,CAAA;CAAE,EAClD,UAAU,EAAE,MAAM,GACjB,wBAAwB,EAAE,CAqC5B;AAED,yCAAyC;AACzC,wBAAgB,8BAA8B,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAEzE"}
@@ -1 +1 @@
1
- {"version":3,"file":"http-api-binding-id.shared.utils.js","sourceRoot":"","sources":["../../../src/http-api-binding/http-api-binding-id.shared.utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH;;;;;;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AS,GAAG,2BAA2B,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;IACnE,IAAI,SAAS,KAAK,UAAU,EAAE,CAAC;QAC7B,MAAM,IAAI,sBAAsB,CAC9B,wBAAwB,aAAa,CAAC,UAAU,CAAC,gCAAgC,aAAa,CAAC,SAAS,CAAC,8DAA8D,CACxK,CAAC;IACJ,CAAC;IACD,OAAO,UAAU,CAAC;AACpB,CAAC;AAED,yCAAyC;AACzC,MAAM,UAAU,8BAA8B,CAAC,SAAiB;IAC9D,OAAO,4BAA4B,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;AACtD,CAAC;AAED,SAAS,iBAAiB,CAAC,SAAiB;IAC1C,IAAI,CAAC,8BAA8B,CAAC,SAAS,CAAC,EAAE,CAAC;QAC/C,MAAM,IAAI,sBAAsB,CAC9B,iDAAiD,4BAA4B,KAAK,aAAa,CAAC,SAAS,CAAC,IAAI;cAC5G,mIAAmI,CACtI,CAAC;IACJ,CAAC;AACH,CAAC","sourcesContent":["/**\n * HTTP-API resource-id synthesis — THE single authority for encoding/decoding the engine-facing\n * `_id` of an `HTTP_API`-backed resource from its remote key components.\n *\n * Contract (design paper `.claude/plans/etl-composite-key-synthesis.md`):\n * - **Deterministic + injective**: the same remote row yields the same `_id` on every machine,\n * forever; two rows never collide (JSON array encoding preserves order and type).\n * - **Charset law**: every synthesized id matches `^[A-Za-z0-9._~-]+$` (URL-unreserved). This is\n * what survives the two measured hazards: the frontend's unencoded `String.replace` URL\n * substitution (forbids `/ ? # % $`) and colon-parsed websocket-room / Redis keys (forbids `:`).\n * - **Two static forms**, selected by the BINDING, never sniffed per row:\n * verbatim (single key whose codec's whole value space is charset-safe — GUID, INTEGER) or\n * encoded (base64url of the canonical JSON array of normalized components, no padding).\n * - **Decodable offline**: `_id` → key components needs no remote call.\n *\n * Errors are thrown as the typed {@link HttpApiResourceIdError} — this module is shared-tier (no\n * `ErrorBuilder` here; same precedent as `selectByPersistenceAdapter`). Backend callers classify\n * it by INSTANCE into a LOUD `VALIDATION` refusal — never a silent not-found (the Mongo\n * CastError-to-404 behavior is explicitly NOT mimicked).\n *\n * No `Buffer` here on purpose: this file must run in the browser bundle as well as Node, so\n * base64url is implemented over `TextEncoder`/`TextDecoder`.\n */\n\n/*\n * entrypoint-closure-waiver: this root-reachable module imports the external-data AUTHORING\n * contract, which only `@wildo-ai/saas-models/external-data` publishes (see\n * `external-data.exports.ts` for why that subpath exists).\n *\n * MEASURED SAFE 2026-08-29 by the probe `package-public-entrypoints.md` prescribes — a consumer\n * importing ONLY the package root, re-exporting these surfaces and deriving their parameter types\n * so declaration emit must WRITE them rather than alias them, compiled with `declaration: true`:\n * zero TS2742 / TS2883 / TS7056, and the emitted `.d.ts` names `@wildo-ai/saas-models` with no\n * `node_modules/...` path anywhere in it.\n *\n * The mechanism, so the next reader need not re-derive it: every crossing here is an EXPLICIT\n * ANNOTATION inside this package, so TypeScript emits a RELATIVE intra-package import in our own\n * `.d.ts` — which resolves by PATH for any consumer, whatever the exports map says. TS2742 bites\n * only when TypeScript must INVENT a specifier for an INFERRED type. Re-run the probe if a\n * root-exported contract here ever starts inferring one.\n */\nimport {\n HttpApiKeyComponentCodec,\n httpApiBindingUsesVerbatimKey,\n type HttpApiKeyField,\n} from './http-api-binding.shared.schemas';\n\nimport { describeCaughtError } from '../errors/caught-error-description.shared.utils';\n/**\n * The typed refusal every codec failure throws — undecodable ids, non-canonical aliases, missing\n * or malformed key components. Typed (rather than message-matched) so the backend adapter can\n * classify it into a VALIDATION projection without regexing prose that a reword would silently\n * break.\n */\nexport class HttpApiResourceIdError extends Error {\n constructor(message: string) {\n super(message);\n this.name = 'HttpApiResourceIdError';\n }\n}\n\n/** One normalized key component value as it participates in id synthesis. */\nexport type HttpApiKeyComponentValue = string | number;\n\n/**\n * The charset law for every synthesized HTTP-API resource id: URL-unreserved characters only.\n * See the module JSDoc for the two measured hazards this survives.\n */\nexport const HTTP_API_RESOURCE_ID_CHARSET: RegExp = /^[A-Za-z0-9._~-]+$/;\n\nconst GUID_PATTERN = /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/;\n\n// --------------------------------\n// base64url (portable, unpadded)\n// --------------------------------\n\nconst B64URL_ALPHABET = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_';\n\nconst B64URL_REVERSE: ReadonlyMap<string, number> = new Map(\n [...B64URL_ALPHABET].map((char, index) => [char, index]),\n);\n\nfunction bytesToBase64Url(bytes: Uint8Array): string {\n let out = '';\n for (let i = 0; i < bytes.length; i += 3) {\n const b0 = bytes[i];\n const b1 = i + 1 < bytes.length ? bytes[i + 1] : undefined;\n const b2 = i + 2 < bytes.length ? bytes[i + 2] : undefined;\n out += B64URL_ALPHABET[b0 >> 2];\n out += B64URL_ALPHABET[((b0 & 0x03) << 4) | ((b1 ?? 0) >> 4)];\n if (b1 !== undefined) {\n out += B64URL_ALPHABET[((b1 & 0x0f) << 2) | ((b2 ?? 0) >> 6)];\n }\n if (b2 !== undefined) {\n out += B64URL_ALPHABET[b2 & 0x3f];\n }\n }\n return out;\n}\n\nfunction base64UrlToBytes(encoded: string): Uint8Array {\n if (encoded.length % 4 === 1) {\n throw new HttpApiResourceIdError(`Invalid base64url payload length in HTTP-API resource id (length ${encoded.length}).`);\n }\n const byteLength = Math.floor((encoded.length * 3) / 4);\n const bytes = new Uint8Array(byteLength);\n let byteIndex = 0;\n let buffer = 0;\n let bitsInBuffer = 0;\n for (const char of encoded) {\n const value = B64URL_REVERSE.get(char);\n if (value === undefined) {\n throw new HttpApiResourceIdError(`Invalid base64url character '${char}' in HTTP-API resource id.`);\n }\n buffer = (buffer << 6) | value;\n bitsInBuffer += 6;\n if (bitsInBuffer >= 8) {\n bitsInBuffer -= 8;\n bytes[byteIndex] = (buffer >> bitsInBuffer) & 0xff;\n byteIndex += 1;\n }\n }\n return bytes;\n}\n\n// --------------------------------\n// Component normalization per codec\n// --------------------------------\n\n/**\n * Normalize one raw remote key value per its declared codec. Normalization is what makes the\n * synthesis STABLE: the same remote row must produce byte-identical components regardless of the\n * remote system's incidental formatting (GUID casing, datetime precision).\n */\nexport function normalizeHttpApiKeyComponent(\n keyField: HttpApiKeyField,\n rawValue: unknown,\n): HttpApiKeyComponentValue {\n switch (keyField.codec) {\n case HttpApiKeyComponentCodec.STRING: {\n if (typeof rawValue !== 'string' || rawValue.length === 0) {\n throw new HttpApiResourceIdError(\n `HTTP-API key component '${keyField.remoteField}' (codec STRING) must be a non-empty string, got ${describeValue(rawValue)}.`,\n );\n }\n return rawValue;\n }\n case HttpApiKeyComponentCodec.INTEGER: {\n const numeric = typeof rawValue === 'string' && /^-?\\d+$/.test(rawValue) ? Number(rawValue) : rawValue;\n if (typeof numeric !== 'number' || !Number.isSafeInteger(numeric)) {\n throw new HttpApiResourceIdError(\n `HTTP-API key component '${keyField.remoteField}' (codec INTEGER) must be a safe integer, got ${describeValue(rawValue)}.`,\n );\n }\n return numeric;\n }\n case HttpApiKeyComponentCodec.GUID: {\n if (typeof rawValue !== 'string' || !GUID_PATTERN.test(rawValue)) {\n throw new HttpApiResourceIdError(\n `HTTP-API key component '${keyField.remoteField}' (codec GUID) must be a GUID string, got ${describeValue(rawValue)}.`,\n );\n }\n // Lowercase so the same remote row synthesizes the same id regardless of the target's casing.\n return rawValue.toLowerCase();\n }\n case HttpApiKeyComponentCodec.DATETIME_ISO: {\n // Strict ISO 8601 shape gate BEFORE Date.parse: bare Date.parse accepts\n // implementation-defined non-ISO formats, which would make the synthesized id differ\n // across JS engines — the determinism the module contract promises would silently hold\n // only for genuinely ISO inputs.\n const isStrictIso = typeof rawValue === 'string'\n && /^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?(?:Z|[+-]\\d{2}:\\d{2})$/.test(rawValue);\n const timestamp = isStrictIso ? Date.parse(rawValue as string) : Number.NaN;\n if (Number.isNaN(timestamp)) {\n throw new HttpApiResourceIdError(\n `HTTP-API key component '${keyField.remoteField}' (codec DATETIME_ISO) must be an ISO 8601 datetime string with an explicit offset, got ${describeValue(rawValue)}.`,\n );\n }\n return new Date(timestamp).toISOString();\n }\n }\n}\n\nfunction describeValue(value: unknown): string {\n if (typeof value === 'string') {\n return `'${value.length > 64 ? `${value.slice(0, 64)}…` : value}'`;\n }\n return `${typeof value} ${String(value)}`;\n}\n\n// --------------------------------\n// Encode / decode (the two id forms)\n// --------------------------------\n\n/**\n * Synthesize the engine-facing `_id` for one remote row, from its raw remote key values in\n * `keyFields` order. The form (verbatim vs encoded) is a static property of the binding\n * (`httpApiBindingUsesVerbatimKey`).\n */\nexport function synthesizeHttpApiResourceId(\n binding: { keyFields: readonly HttpApiKeyField[] },\n rawComponents: readonly unknown[],\n): string {\n if (rawComponents.length !== binding.keyFields.length) {\n throw new HttpApiResourceIdError(\n `HTTP-API id synthesis received ${rawComponents.length} key component(s) for a binding declaring ${binding.keyFields.length}.`,\n );\n }\n const normalized = binding.keyFields.map((keyField, index) =>\n normalizeHttpApiKeyComponent(keyField, rawComponents[index]),\n );\n\n if (httpApiBindingUsesVerbatimKey(binding)) {\n const verbatim = String(normalized[0]);\n // Defensive: the codec gate should make this unreachable, but the charset law is the invariant\n // every downstream consumer relies on, so it is asserted where the id is minted.\n assertCharsetSafe(verbatim);\n return verbatim;\n }\n\n const encoded = bytesToBase64Url(new TextEncoder().encode(JSON.stringify(normalized)));\n assertCharsetSafe(encoded);\n return encoded;\n}\n\n/**\n * Resolve an engine-facing `_id` back to its normalized key components, in `keyFields` order.\n * Purely local — no remote call. Throws on any id this binding could not have synthesized —\n * INCLUDING every non-canonical ALIAS of a valid id (base64url trailing-bit variants,\n * JSON-whitespace variants, non-normalized verbatim forms such as an uppercase GUID): one remote\n * row answers to exactly ONE engine id, because row identity, URL canonicality, dedup keys and\n * id-based exclusion filters are all built on that equality. Enforced by re-synthesizing from the\n * resolved components and requiring byte-equality with the incoming id.\n */\nexport function resolveHttpApiKeyComponents(\n binding: { keyFields: readonly HttpApiKeyField[] },\n resourceId: string,\n): HttpApiKeyComponentValue[] {\n if (resourceId.length === 0) {\n throw new HttpApiResourceIdError('HTTP-API resource id must be a non-empty string.');\n }\n\n let components: HttpApiKeyComponentValue[];\n if (httpApiBindingUsesVerbatimKey(binding)) {\n components = [normalizeHttpApiKeyComponent(binding.keyFields[0], resourceId)];\n } else {\n assertCharsetSafe(resourceId);\n let parsed: unknown;\n try {\n parsed = JSON.parse(new TextDecoder().decode(base64UrlToBytes(resourceId)));\n } catch (error) {\n throw new HttpApiResourceIdError(\n `HTTP-API resource id '${resourceId}' is not a valid encoded composite key: ${describeCaughtError(error)}`,\n );\n }\n if (!Array.isArray(parsed) || parsed.length !== binding.keyFields.length) {\n throw new HttpApiResourceIdError(\n `HTTP-API resource id '${resourceId}' decodes to ${Array.isArray(parsed) ? `${parsed.length} component(s)` : 'a non-array'} for a binding declaring ${binding.keyFields.length}.`,\n );\n }\n components = binding.keyFields.map((keyField, index) => normalizeHttpApiKeyComponent(keyField, parsed[index]));\n }\n\n // Canonicality gate: re-synthesize and require byte-equality. Normalization is idempotent per\n // codec, so a canonical id always round-trips to itself; any alias (dropped-bit base64url\n // variant, whitespace-bearing JSON, '042' for an INTEGER key, 'ABC…' for a GUID key) differs\n // here and is refused rather than silently adopted as a second name for the same row.\n const canonical = synthesizeHttpApiResourceId(binding, components);\n if (canonical !== resourceId) {\n throw new HttpApiResourceIdError(\n `HTTP-API resource id ${describeValue(resourceId)} is a non-canonical alias of ${describeValue(canonical)} and is refused: every remote row has exactly one engine id.`,\n );\n }\n return components;\n}\n\n/** Runtime guard for the charset law. */\nexport function isCharsetSafeHttpApiResourceId(candidate: string): boolean {\n return HTTP_API_RESOURCE_ID_CHARSET.test(candidate);\n}\n\nfunction assertCharsetSafe(candidate: string): void {\n if (!isCharsetSafeHttpApiResourceId(candidate)) {\n throw new HttpApiResourceIdError(\n `HTTP-API resource id violates the charset law ${HTTP_API_RESOURCE_ID_CHARSET}: ${describeValue(candidate)}. `\n + 'Ids must stay URL-unreserved — the frontend substitutes them into URLs without encoding, and websocket room names parse on \\':\\'.',\n );\n }\n}\n"]}
1
+ {"version":3,"file":"http-api-binding-id.shared.utils.js","sourceRoot":"","sources":["../../../../src/http-api-binding/http-api-binding-id.shared.utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,EACL,wBAAwB,EACxB,6BAA6B,GAE9B,MAAM,mCAAmC,CAAC;AAE3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,iDAAiD,CAAC;AACtF;;;;;GAKG;AACH,MAAM,OAAO,sBAAuB,SAAQ,KAAK;IAC/C,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,wBAAwB,CAAC;IACvC,CAAC;CACF;AAKD;;;GAGG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAW,oBAAoB,CAAC;AAEzE,MAAM,YAAY,GAAG,+EAA+E,CAAC;AAErG,mCAAmC;AACnC,iCAAiC;AACjC,mCAAmC;AAEnC,MAAM,eAAe,GAAG,kEAAkE,CAAC;AAE3F,MAAM,cAAc,GAAgC,IAAI,GAAG,CACzD,CAAC,GAAG,eAAe,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CACzD,CAAC;AAEF,SAAS,gBAAgB,CAAC,KAAiB;IACzC,IAAI,GAAG,GAAG,EAAE,CAAC;IACb,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC;QACzC,MAAM,EAAE,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;QACpB,MAAM,EAAE,GAAG,CAAC,G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AAC,MAAM,GAAG,CAClL,CAAC;QACJ,CAAC;QACD,UAAU,GAAG,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,KAAK,EAAE,EAAE,CAAC,4BAA4B,CAAC,QAAQ,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACjH,CAAC;IAED,8FAA8F;IAC9F,0FAA0F;IAC1F,6FAA6F;IAC7F,sFAAsF;IACtF,MAAM,SAAS,GAAG,2BAA2B,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;IACnE,IAAI,SAAS,KAAK,UAAU,EAAE,CAAC;QAC7B,MAAM,IAAI,sBAAsB,CAC9B,wBAAwB,aAAa,CAAC,UAAU,CAAC,gCAAgC,aAAa,CAAC,SAAS,CAAC,8DAA8D,CACxK,CAAC;IACJ,CAAC;IACD,OAAO,UAAU,CAAC;AACpB,CAAC;AAED,yCAAyC;AACzC,MAAM,UAAU,8BAA8B,CAAC,SAAiB;IAC9D,OAAO,4BAA4B,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;AACtD,CAAC;AAED,SAAS,iBAAiB,CAAC,SAAiB;IAC1C,IAAI,CAAC,8BAA8B,CAAC,SAAS,CAAC,EAAE,CAAC;QAC/C,MAAM,IAAI,sBAAsB,CAC9B,iDAAiD,4BAA4B,KAAK,aAAa,CAAC,SAAS,CAAC,IAAI;cAC5G,mIAAmI,CACtI,CAAC;IACJ,CAAC;AACH,CAAC","sourcesContent":["/**\n * HTTP-API resource-id synthesis — THE single authority for encoding/decoding the engine-facing\n * `_id` of an `HTTP_API`-backed resource from its remote key components.\n *\n * Contract (design paper `.claude/plans/etl-composite-key-synthesis.md`):\n * - **Deterministic + injective**: the same remote row yields the same `_id` on every machine,\n * forever; two rows never collide (JSON array encoding preserves order and type).\n * - **Charset law**: every synthesized id matches `^[A-Za-z0-9._~-]+$` (URL-unreserved). This is\n * what survives the two measured hazards: the frontend's unencoded `String.replace` URL\n * substitution (forbids `/ ? # % $`) and colon-parsed websocket-room / Redis keys (forbids `:`).\n * - **Two static forms**, selected by the BINDING, never sniffed per row:\n * verbatim (single key whose codec's whole value space is charset-safe — GUID, INTEGER) or\n * encoded (base64url of the canonical JSON array of normalized components, no padding).\n * - **Decodable offline**: `_id` → key components needs no remote call.\n *\n * Errors are thrown as the typed {@link HttpApiResourceIdError} — this module is shared-tier (no\n * `ErrorBuilder` here; same precedent as `selectByPersistenceAdapter`). Backend callers classify\n * it by INSTANCE into a LOUD `VALIDATION` refusal — never a silent not-found (the Mongo\n * CastError-to-404 behavior is explicitly NOT mimicked).\n *\n * No `Buffer` here on purpose: this file must run in the browser bundle as well as Node, so\n * base64url is implemented over `TextEncoder`/`TextDecoder`.\n */\n\n/*\n * entrypoint-closure-waiver: this root-reachable module imports the external-data AUTHORING\n * contract, which only `@wildo-ai/saas-models/external-data` publishes (see\n * `external-data.exports.ts` for why that subpath exists).\n *\n * MEASURED SAFE 2026-08-29 by the probe `package-public-entrypoints.md` prescribes — a consumer\n * importing ONLY the package root, re-exporting these surfaces and deriving their parameter types\n * so declaration emit must WRITE them rather than alias them, compiled with `declaration: true`:\n * zero TS2742 / TS2883 / TS7056, and the emitted `.d.ts` names `@wildo-ai/saas-models` with no\n * `node_modules/...` path anywhere in it.\n *\n * The mechanism, so the next reader need not re-derive it: every crossing here is an EXPLICIT\n * ANNOTATION inside this package, so TypeScript emits a RELATIVE intra-package import in our own\n * `.d.ts` — which resolves by PATH for any consumer, whatever the exports map says. TS2742 bites\n * only when TypeScript must INVENT a specifier for an INFERRED type. Re-run the probe if a\n * root-exported contract here ever starts inferring one.\n */\nimport {\n HttpApiKeyComponentCodec,\n httpApiBindingUsesVerbatimKey,\n type HttpApiKeyField,\n} from './http-api-binding.shared.schemas';\n\nimport { describeCaughtError } from '../errors/caught-error-description.shared.utils';\n/**\n * The typed refusal every codec failure throws — undecodable ids, non-canonical aliases, missing\n * or malformed key components. Typed (rather than message-matched) so the backend adapter can\n * classify it into a VALIDATION projection without regexing prose that a reword would silently\n * break.\n */\nexport class HttpApiResourceIdError extends Error {\n constructor(message: string) {\n super(message);\n this.name = 'HttpApiResourceIdError';\n }\n}\n\n/** One normalized key component value as it participates in id synthesis. */\nexport type HttpApiKeyComponentValue = string | number;\n\n/**\n * The charset law for every synthesized HTTP-API resource id: URL-unreserved characters only.\n * See the module JSDoc for the two measured hazards this survives.\n */\nexport const HTTP_API_RESOURCE_ID_CHARSET: RegExp = /^[A-Za-z0-9._~-]+$/;\n\nconst GUID_PATTERN = /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/;\n\n// --------------------------------\n// base64url (portable, unpadded)\n// --------------------------------\n\nconst B64URL_ALPHABET = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_';\n\nconst B64URL_REVERSE: ReadonlyMap<string, number> = new Map(\n [...B64URL_ALPHABET].map((char, index) => [char, index]),\n);\n\nfunction bytesToBase64Url(bytes: Uint8Array): string {\n let out = '';\n for (let i = 0; i < bytes.length; i += 3) {\n const b0 = bytes[i];\n const b1 = i + 1 < bytes.length ? bytes[i + 1] : undefined;\n const b2 = i + 2 < bytes.length ? bytes[i + 2] : undefined;\n out += B64URL_ALPHABET[b0 >> 2];\n out += B64URL_ALPHABET[((b0 & 0x03) << 4) | ((b1 ?? 0) >> 4)];\n if (b1 !== undefined) {\n out += B64URL_ALPHABET[((b1 & 0x0f) << 2) | ((b2 ?? 0) >> 6)];\n }\n if (b2 !== undefined) {\n out += B64URL_ALPHABET[b2 & 0x3f];\n }\n }\n return out;\n}\n\nfunction base64UrlToBytes(encoded: string): Uint8Array {\n if (encoded.length % 4 === 1) {\n throw new HttpApiResourceIdError(`Invalid base64url payload length in HTTP-API resource id (length ${encoded.length}).`);\n }\n const byteLength = Math.floor((encoded.length * 3) / 4);\n const bytes = new Uint8Array(byteLength);\n let byteIndex = 0;\n let buffer = 0;\n let bitsInBuffer = 0;\n for (const char of encoded) {\n const value = B64URL_REVERSE.get(char);\n if (value === undefined) {\n throw new HttpApiResourceIdError(`Invalid base64url character '${char}' in HTTP-API resource id.`);\n }\n buffer = (buffer << 6) | value;\n bitsInBuffer += 6;\n if (bitsInBuffer >= 8) {\n bitsInBuffer -= 8;\n bytes[byteIndex] = (buffer >> bitsInBuffer) & 0xff;\n byteIndex += 1;\n }\n }\n return bytes;\n}\n\n// --------------------------------\n// Component normalization per codec\n// --------------------------------\n\n/**\n * Normalize one raw remote key value per its declared codec. Normalization is what makes the\n * synthesis STABLE: the same remote row must produce byte-identical components regardless of the\n * remote system's incidental formatting (GUID casing, datetime precision).\n */\nexport function normalizeHttpApiKeyComponent(\n keyField: HttpApiKeyField,\n rawValue: unknown,\n): HttpApiKeyComponentValue {\n switch (keyField.codec) {\n case HttpApiKeyComponentCodec.STRING: {\n if (typeof rawValue !== 'string' || rawValue.length === 0) {\n throw new HttpApiResourceIdError(\n `HTTP-API key component '${keyField.remoteField}' (codec STRING) must be a non-empty string, got ${describeValue(rawValue)}.`,\n );\n }\n return rawValue;\n }\n case HttpApiKeyComponentCodec.INTEGER: {\n const numeric = typeof rawValue === 'string' && /^-?\\d+$/.test(rawValue) ? Number(rawValue) : rawValue;\n if (typeof numeric !== 'number' || !Number.isSafeInteger(numeric)) {\n throw new HttpApiResourceIdError(\n `HTTP-API key component '${keyField.remoteField}' (codec INTEGER) must be a safe integer, got ${describeValue(rawValue)}.`,\n );\n }\n return numeric;\n }\n case HttpApiKeyComponentCodec.GUID: {\n if (typeof rawValue !== 'string' || !GUID_PATTERN.test(rawValue)) {\n throw new HttpApiResourceIdError(\n `HTTP-API key component '${keyField.remoteField}' (codec GUID) must be a GUID string, got ${describeValue(rawValue)}.`,\n );\n }\n // Lowercase so the same remote row synthesizes the same id regardless of the target's casing.\n return rawValue.toLowerCase();\n }\n case HttpApiKeyComponentCodec.DATETIME_ISO: {\n // Strict ISO 8601 shape gate BEFORE Date.parse: bare Date.parse accepts\n // implementation-defined non-ISO formats, which would make the synthesized id differ\n // across JS engines — the determinism the module contract promises would silently hold\n // only for genuinely ISO inputs.\n const isStrictIso = typeof rawValue === 'string'\n && /^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?(?:Z|[+-]\\d{2}:\\d{2})$/.test(rawValue);\n const timestamp = isStrictIso ? Date.parse(rawValue as string) : Number.NaN;\n if (Number.isNaN(timestamp)) {\n throw new HttpApiResourceIdError(\n `HTTP-API key component '${keyField.remoteField}' (codec DATETIME_ISO) must be an ISO 8601 datetime string with an explicit offset, got ${describeValue(rawValue)}.`,\n );\n }\n return new Date(timestamp).toISOString();\n }\n }\n}\n\nfunction describeValue(value: unknown): string {\n if (typeof value === 'string') {\n return `'${value.length > 64 ? `${value.slice(0, 64)}…` : value}'`;\n }\n return `${typeof value} ${String(value)}`;\n}\n\n// --------------------------------\n// Encode / decode (the two id forms)\n// --------------------------------\n\n/**\n * Synthesize the engine-facing `_id` for one remote row, from its raw remote key values in\n * `keyFields` order. The form (verbatim vs encoded) is a static property of the binding\n * (`httpApiBindingUsesVerbatimKey`).\n */\nexport function synthesizeHttpApiResourceId(\n binding: { keyFields: readonly HttpApiKeyField[] },\n rawComponents: readonly unknown[],\n): string {\n if (rawComponents.length !== binding.keyFields.length) {\n throw new HttpApiResourceIdError(\n `HTTP-API id synthesis received ${rawComponents.length} key component(s) for a binding declaring ${binding.keyFields.length}.`,\n );\n }\n const normalized = binding.keyFields.map((keyField, index) =>\n normalizeHttpApiKeyComponent(keyField, rawComponents[index]),\n );\n\n if (httpApiBindingUsesVerbatimKey(binding)) {\n const verbatim = String(normalized[0]);\n // Defensive: the codec gate should make this unreachable, but the charset law is the invariant\n // every downstream consumer relies on, so it is asserted where the id is minted.\n assertCharsetSafe(verbatim);\n return verbatim;\n }\n\n const encoded = bytesToBase64Url(new TextEncoder().encode(JSON.stringify(normalized)));\n assertCharsetSafe(encoded);\n return encoded;\n}\n\n/**\n * Resolve an engine-facing `_id` back to its normalized key components, in `keyFields` order.\n * Purely local — no remote call. Throws on any id this binding could not have synthesized —\n * INCLUDING every non-canonical ALIAS of a valid id (base64url trailing-bit variants,\n * JSON-whitespace variants, non-normalized verbatim forms such as an uppercase GUID): one remote\n * row answers to exactly ONE engine id, because row identity, URL canonicality, dedup keys and\n * id-based exclusion filters are all built on that equality. Enforced by re-synthesizing from the\n * resolved components and requiring byte-equality with the incoming id.\n */\nexport function resolveHttpApiKeyComponents(\n binding: { keyFields: readonly HttpApiKeyField[] },\n resourceId: string,\n): HttpApiKeyComponentValue[] {\n if (resourceId.length === 0) {\n throw new HttpApiResourceIdError('HTTP-API resource id must be a non-empty string.');\n }\n\n let components: HttpApiKeyComponentValue[];\n if (httpApiBindingUsesVerbatimKey(binding)) {\n components = [normalizeHttpApiKeyComponent(binding.keyFields[0], resourceId)];\n } else {\n assertCharsetSafe(resourceId);\n let parsed: unknown;\n try {\n parsed = JSON.parse(new TextDecoder().decode(base64UrlToBytes(resourceId)));\n } catch (error) {\n throw new HttpApiResourceIdError(\n `HTTP-API resource id '${resourceId}' is not a valid encoded composite key: ${describeCaughtError(error)}`,\n );\n }\n if (!Array.isArray(parsed) || parsed.length !== binding.keyFields.length) {\n throw new HttpApiResourceIdError(\n `HTTP-API resource id '${resourceId}' decodes to ${Array.isArray(parsed) ? `${parsed.length} component(s)` : 'a non-array'} for a binding declaring ${binding.keyFields.length}.`,\n );\n }\n components = binding.keyFields.map((keyField, index) => normalizeHttpApiKeyComponent(keyField, parsed[index]));\n }\n\n // Canonicality gate: re-synthesize and require byte-equality. Normalization is idempotent per\n // codec, so a canonical id always round-trips to itself; any alias (dropped-bit base64url\n // variant, whitespace-bearing JSON, '042' for an INTEGER key, 'ABC…' for a GUID key) differs\n // here and is refused rather than silently adopted as a second name for the same row.\n const canonical = synthesizeHttpApiResourceId(binding, components);\n if (canonical !== resourceId) {\n throw new HttpApiResourceIdError(\n `HTTP-API resource id ${describeValue(resourceId)} is a non-canonical alias of ${describeValue(canonical)} and is refused: every remote row has exactly one engine id.`,\n );\n }\n return components;\n}\n\n/** Runtime guard for the charset law. */\nexport function isCharsetSafeHttpApiResourceId(candidate: string): boolean {\n return HTTP_API_RESOURCE_ID_CHARSET.test(candidate);\n}\n\nfunction assertCharsetSafe(candidate: string): void {\n if (!isCharsetSafeHttpApiResourceId(candidate)) {\n throw new HttpApiResourceIdError(\n `HTTP-API resource id violates the charset law ${HTTP_API_RESOURCE_ID_CHARSET}: ${describeValue(candidate)}. `\n + 'Ids must stay URL-unreserved — the frontend substitutes them into URLs without encoding, and websocket room names parse on \\':\\'.',\n );\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"http-api-binding.shared.schemas.d.ts","sourceRoot":"","sources":["../../../src/http-api-binding/http-api-binding.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAC9E,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,EACL,sBAAsB,EAGvB,MAAM,iDAAiD,CAAC;AAUzD,4GAA4G;AAkE5G;;;;;;;;GAQG;AACH,oBAAY,wBAAwB;IAClC,+FAA+F;IAC/F,MAAM,WAAW;IAEjB,kFAAkF;IAClF,OAAO,YAAY;IAEnB,2EAA2E;IAC3E,IAAI,SAAS;IAEb;;;;OAIG;IACH,YAAY,iBAAiB;CAC9B;AAMD;;;;;;;;;;;;;;;;;;GAkBG;AACH,oBAAY,gBAAgB;IAC1B,8FAA8F;IAC9F,MAAM,WAAW;IACjB,6FAA6F;IAC7F,MAAM,WAAW;IACjB,gGAAgG;IAChG,MAAM,WAAW;CAClB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,oBAAY,2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AAsB,GAAG,IAAI,CAmK1F;AAED,0DAA0D;AAC1D,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAElF;;;;;;GAMG;AACH,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAgB1F;;;;GAIG;AACH,wBAAgB,6BAA6B,CAC3C,OAAO,EAAE;IAAE,SAAS,EAAE,SAAS,eAAe,EAAE,CAAA;CAAE,GACjD,OAAO,CAKT"}
1
+ {"version":3,"file":"http-api-binding.shared.schemas.d.ts","sourceRoot":"","sources":["../../../../src/http-api-binding/http-api-binding.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAC9E,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,EACL,sBAAsB,EAGvB,MAAM,iDAAiD,CAAC;AAUzD,4GAA4G;AAkE5G;;;;;;;;GAQG;AACH,oBAAY,wBAAwB;IAClC,+FAA+F;IAC/F,MAAM,WAAW;IAEjB,kFAAkF;IAClF,OAAO,YAAY;IAEnB,2EAA2E;IAC3E,IAAI,SAAS;IAEb;;;;OAIG;IACH,YAAY,iBAAiB;CAC9B;AAMD;;;;;;;;;;;;;;;;;;GAkBG;AACH,oBAAY,gBAAgB;IAC1B,8FAA8F;IAC9F,MAAM,WAAW;IACjB,6FAA6F;IAC7F,MAAM,WAAW;IACjB,gGAAgG;IAChG,MAAM,WAAW;CAClB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,oBAAY,2BAA2B;IACrC;;;OAGG;IACH,eAAe,oBAAoB;IACnC;;;;;OAKG;IACH,gBAAgB,qBAAqB;CACtC;AACD,0D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